From d54e20b5f69cefd2354490ff6decd1a14f11f7e7 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 26 Sep 2023 10:24:51 -0400 Subject: [PATCH 001/190] Set Hermes release version --- packages/react-native/sdks/.hermesversion | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages/react-native/sdks/.hermesversion diff --git a/packages/react-native/sdks/.hermesversion b/packages/react-native/sdks/.hermesversion new file mode 100644 index 000000000000..a612ccf72e73 --- /dev/null +++ b/packages/react-native/sdks/.hermesversion @@ -0,0 +1 @@ +hermes-2023-09-26-RNv0.73.0-ee2922a50fb719bdb378025d95dbd32ad93cd679 \ No newline at end of file From 90b8518073297691360d89348c7c5928f29fe701 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 26 Sep 2023 10:27:39 -0400 Subject: [PATCH 002/190] bumped packages versions #publish-packages-to-npm --- package.json | 4 ++-- packages/assets/package.json | 9 +++++++-- packages/babel-plugin-codegen/package.json | 11 +++++++++-- packages/community-cli-plugin/package.json | 6 +++--- packages/debugger-frontend/package.json | 2 +- packages/dev-middleware/package.json | 4 ++-- packages/eslint-config-react-native/package.json | 4 ++-- packages/eslint-plugin-react-native/package.json | 9 +++++++-- packages/eslint-plugin-specs/package.json | 11 +++++++++-- packages/metro-config/package.json | 12 ++++++++---- packages/normalize-color/package.json | 9 +++++++-- packages/polyfills/package.json | 10 ++++++++-- packages/react-native-babel-preset/package.json | 2 +- .../react-native-babel-transformer/package.json | 2 +- packages/react-native-codegen/package.json | 2 +- packages/react-native-gradle-plugin/package.json | 8 ++++++-- packages/react-native/package.json | 14 +++++++------- packages/react-native/template/package.json | 8 ++++---- packages/typescript-config/package.json | 8 ++++++-- packages/virtualized-lists/package.json | 9 +++++++-- 20 files changed, 98 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index 6735766f6cc5..3d451388a07f 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,8 @@ "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", "@pkgjs/parseargs": "^0.11.0", - "@react-native/metro-babel-transformer": "^0.73.11", - "@react-native/metro-config": "^0.73.0", + "@react-native/metro-babel-transformer": "^0.73.12", + "@react-native/metro-config": "^0.73.1", "@tsconfig/node18": "1.0.1", "@types/react": "^18.0.18", "@typescript-eslint/parser": "^5.57.1", diff --git a/packages/assets/package.json b/packages/assets/package.json index c8e5100a2cc4..ba116d356e54 100644 --- a/packages/assets/package.json +++ b/packages/assets/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/assets-registry", - "version": "0.73.0", + "version": "0.73.1", "description": "Asset support code for React Native.", "license": "MIT", "repository": { @@ -9,7 +9,12 @@ "directory": "packages/assets" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/assets#readme", - "keywords": ["assets", "registry", "react-native", "support"], + "keywords": [ + "assets", + "registry", + "react-native", + "support" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 3d85ab95eba7..7ee42b4a6dc6 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-plugin-codegen", - "version": "0.73.0", + "version": "0.73.1", "description": "Babel plugin to generate native module and view manager code for React Native.", "license": "MIT", "repository": { @@ -9,7 +9,14 @@ "directory": "packages/babel-plugin-codegen" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/babel-plugin-codegen#readme", - "keywords": ["babel", "plugin", "codegen", "react-native", "native-modules", "view-manager"], + "keywords": [ + "babel", + "plugin", + "codegen", + "react-native", + "native-modules", + "view-manager" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 3f47a0363900..dfb656950020 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.1", + "version": "0.73.2", "description": "Core CLI commands for React Native", "keywords": [ "react-native", @@ -22,10 +22,10 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "^0.73.0", + "@react-native/dev-middleware": "^0.73.2", "@react-native-community/cli-server-api": "12.0.0-alpha.15", "@react-native-community/cli-tools": "12.0.0-alpha.15", - "@react-native/metro-babel-transformer": "^0.73.11", + "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", "metro": "0.79.1", diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index 55ff9250d0b2..49544ddfd7b9 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/debugger-frontend", - "version": "0.73.0", + "version": "0.73.1", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index cf44092dc1cc..dc56263e6895 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.73.1", + "version": "0.73.2", "description": "Dev server middleware for React Native", "keywords": [ "react-native", @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "^0.73.0", + "@react-native/debugger-frontend": "^0.73.1", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^1.0.0", "connect": "^3.6.5", diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index 343b5f2e27bc..1eb71f2d4004 100644 --- a/packages/eslint-config-react-native/package.json +++ b/packages/eslint-config-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-config", - "version": "0.73.0", + "version": "0.73.1", "description": "ESLint config for React Native", "license": "MIT", "repository": { @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.20.0", "@babel/eslint-parser": "^7.20.0", - "@react-native/eslint-plugin": "^0.73.0", + "@react-native/eslint-plugin": "^0.73.1", "@typescript-eslint/eslint-plugin": "^5.57.1", "@typescript-eslint/parser": "^5.57.1", "eslint-config-prettier": "^8.5.0", diff --git a/packages/eslint-plugin-react-native/package.json b/packages/eslint-plugin-react-native/package.json index 3b098f815728..22d99e18b586 100644 --- a/packages/eslint-plugin-react-native/package.json +++ b/packages/eslint-plugin-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin", - "version": "0.73.0", + "version": "0.73.1", "description": "ESLint rules for @react-native/eslint-config", "license": "MIT", "repository": { @@ -9,7 +9,12 @@ "directory": "packages/eslint-plugin-react-native" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/eslint-plugin-react-native#readme", - "keywords": ["eslint", "rules", "eslint-config", "react-native"], + "keywords": [ + "eslint", + "rules", + "eslint-config", + "react-native" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index 3c5c534e2359..b7125bb71688 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/eslint-plugin-specs", - "version": "0.73.0", + "version": "0.73.1", "description": "ESLint rules to validate NativeModule and Component Specs", "license": "MIT", "repository": { @@ -9,7 +9,14 @@ "directory": "packages/eslint-plugin-specs" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/eslint-plugin-specs#readme", - "keywords": ["eslint", "rules", "react-native", "native-modules", "components", "specs"], + "keywords": [ + "eslint", + "rules", + "react-native", + "native-modules", + "components", + "specs" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index 39e03521aa32..21d9815f11d0 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-config", - "version": "0.73.0", + "version": "0.73.1", "description": "Metro configuration for React Native.", "license": "MIT", "repository": { @@ -9,15 +9,19 @@ "directory": "packages/metro-config" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/metro-config#readme", - "keywords": ["metro", "config", "react-native"], + "keywords": [ + "metro", + "config", + "react-native" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" }, "exports": "./index.js", "dependencies": { - "@react-native/metro-babel-transformer": "^0.73.11", - "@react-native/js-polyfills": "^0.73.0", + "@react-native/metro-babel-transformer": "^0.73.12", + "@react-native/js-polyfills": "^0.73.1", "metro-config": "0.79.1", "metro-runtime": "0.79.1" } diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index ab3fa6fd89f2..2da8f5d61617 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/normalize-colors", - "version": "0.73.0", + "version": "0.73.1", "description": "Color normalization for React Native.", "license": "MIT", "repository": { @@ -9,7 +9,12 @@ "directory": "packages/normalize-color" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/normalize-color#readme", - "keywords": ["color", "normalization", "normalize-colors", "react-native"], + "keywords": [ + "color", + "normalization", + "normalize-colors", + "react-native" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 8cefc9909f6b..40a6b359cf2b 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/js-polyfills", - "version": "0.73.0", + "version": "0.73.1", "description": "Polyfills for React Native.", "license": "MIT", "repository": { @@ -9,7 +9,13 @@ "directory": "packages/polyfills" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/polyfills#readme", - "keywords": ["polyfill", "polyfills", "js", "js-polyfills", "react-native"], + "keywords": [ + "polyfill", + "polyfills", + "js", + "js-polyfills", + "react-native" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index 2e6dbc5985cf..24451826c0b3 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-preset", - "version": "0.73.16", + "version": "0.73.17", "description": "Babel preset for React Native applications", "main": "src/index.js", "repository": { diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index 0862b76d176f..df87e3e4c8ff 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-babel-transformer", - "version": "0.73.11", + "version": "0.73.12", "description": "Babel transformer for React Native applications.", "main": "src/index.js", "repository": { diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 45f23b160b78..d557abf24592 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen", - "version": "0.73.0", + "version": "0.73.1", "description": "Code generation tools for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native-gradle-plugin/package.json b/packages/react-native-gradle-plugin/package.json index a1b8f3a2ce75..994a588e314e 100644 --- a/packages/react-native-gradle-plugin/package.json +++ b/packages/react-native-gradle-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/gradle-plugin", - "version": "0.73.0", + "version": "0.73.1", "description": "Gradle Plugin for React Native", "license": "MIT", "repository": { @@ -9,7 +9,11 @@ "directory": "packages/react-native-gradle-plugin" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-gradle-plugin#readme", - "keywords": ["gradle", "plugin", "react-native"], + "keywords": [ + "gradle", + "plugin", + "react-native" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 591bcf5b2663..72b4edd977b3 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -96,13 +96,13 @@ "@react-native-community/cli": "12.0.0-alpha.15", "@react-native-community/cli-platform-android": "12.0.0-alpha.15", "@react-native-community/cli-platform-ios": "12.0.0-alpha.15", - "@react-native/assets-registry": "^0.73.0", - "@react-native/community-cli-plugin": "^0.73.0", - "@react-native/codegen": "^0.73.0", - "@react-native/gradle-plugin": "^0.73.0", - "@react-native/js-polyfills": "^0.73.0", - "@react-native/normalize-colors": "^0.73.0", - "@react-native/virtualized-lists": "^0.73.0", + "@react-native/assets-registry": "^0.73.1", + "@react-native/community-cli-plugin": "^0.73.2", + "@react-native/codegen": "^0.73.1", + "@react-native/gradle-plugin": "^0.73.1", + "@react-native/js-polyfills": "^0.73.1", + "@react-native/normalize-colors": "^0.73.1", + "@react-native/virtualized-lists": "^0.73.1", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index a9d0a0d78618..18848714b3c2 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -17,10 +17,10 @@ "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", - "@react-native/babel-preset": "^0.73.16", - "@react-native/eslint-config": "^0.73.0", - "@react-native/metro-config": "^0.73.0", - "@react-native/typescript-config": "^0.73.0", + "@react-native/babel-preset": "^0.73.17", + "@react-native/eslint-config": "^0.73.1", + "@react-native/metro-config": "^0.73.1", + "@react-native/typescript-config": "^0.73.1", "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json index 896de154d849..f648eeb74031 100644 --- a/packages/typescript-config/package.json +++ b/packages/typescript-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/typescript-config", - "version": "0.73.0", + "version": "0.73.1", "description": "Default TypeScript configuration for React Native apps", "license": "MIT", "repository": { @@ -9,7 +9,11 @@ "directory": "packages/typescript-config" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/typescript-config#readme", - "keywords": ["typescript", "tsconfig", "react-native"], + "keywords": [ + "typescript", + "tsconfig", + "react-native" + ], "bugs": "https://github.com/facebook/react-native/issues", "main": "tsconfig.json" } diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index b2623813a690..0fca7912a98a 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/virtualized-lists", - "version": "0.73.0", + "version": "0.73.1", "description": "Virtualized lists for React Native.", "license": "MIT", "repository": { @@ -9,7 +9,12 @@ "directory": "packages/virtualized-lists" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/virtualized-lists#readme", - "keywords": ["lists", "virtualized-lists", "section-lists", "react-native"], + "keywords": [ + "lists", + "virtualized-lists", + "section-lists", + "react-native" + ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { "node": ">=18" From b07859ab1fd045ad85ef82369136af3682d72cd2 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Tue, 26 Sep 2023 12:16:15 -0400 Subject: [PATCH 003/190] Bump react-native-babel-preset to 0.73.18 #publish-packages-to-npm --- packages/react-native-babel-preset/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index 24451826c0b3..2f7884498b85 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/babel-preset", - "version": "0.73.17", + "version": "0.73.18", "description": "Babel preset for React Native applications", "main": "src/index.js", "repository": { From 9f5c77dab7c1187b14e477902ac2e51a6806a2e7 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Tue, 26 Sep 2023 09:59:16 -0700 Subject: [PATCH 004/190] Enable native view configs in bridgeless mode in OSS (#39476) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39476 This diff enables native view config interop layer in bridgeless mode by default for OSS. It also removes redundant `enableNativeViewConfigsInBridgelessMode` JS feature flag. Changelog: [General][Added] - Native view config interop layer enabled in bridgeless mode. Reviewed By: luluwu2032 Differential Revision: D49318325 fbshipit-source-id: ea2e38b2ea10637b578d98e38d97eed923498fb3 --- .../Libraries/AppDelegate/RCTAppDelegate.mm | 2 ++ .../Libraries/ReactNative/BridgelessUIManager.js | 11 +++++++---- .../Libraries/ReactNative/ReactNativeFeatureFlags.js | 5 ----- .../defaults/DefaultNewArchitectureEntryPoint.kt | 1 + 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index d16b85ce9e97..6e8e018b254c 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -87,6 +87,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( if (enableBridgeless) { #if RCT_NEW_ARCH_ENABLED + // Enable native view config interop only if both bridgeless mode and Fabric is enabled. + RCTSetUseNativeViewConfigsInBridgelessMode([self fabricEnabled]); [self createReactHost]; [self unstable_registerLegacyComponents]; [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; diff --git a/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js b/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js index 8b9a746815e5..d7f0efd654e1 100644 --- a/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js +++ b/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js @@ -13,7 +13,6 @@ import type {RootTag} from '../Types/RootTagTypes'; import {unstable_hasComponent} from '../NativeComponent/NativeComponentRegistryUnstable'; -import ReactNativeFeatureFlags from './ReactNativeFeatureFlags'; let cachedConstants = null; @@ -22,6 +21,10 @@ const errorMessageForMethod = (methodName: string): string => methodName + "' is not available in the new React Native architecture."; +function nativeViewConfigsInBridgelessModeEnabled(): boolean { + return global.RN$LegacyInterop_UIManager_getConstants !== undefined; +} + function getCachedConstants(): Object { if (!cachedConstants) { cachedConstants = global.RN$LegacyInterop_UIManager_getConstants(); @@ -31,7 +34,7 @@ function getCachedConstants(): Object { const UIManagerJS: {[string]: $FlowFixMe} = { getViewManagerConfig: (viewManagerName: string): mixed => { - if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) { + if (nativeViewConfigsInBridgelessModeEnabled()) { return getCachedConstants()[viewManagerName]; } else { console.error( @@ -46,7 +49,7 @@ const UIManagerJS: {[string]: $FlowFixMe} = { return unstable_hasComponent(viewManagerName); }, getConstants: (): Object => { - if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) { + if (nativeViewConfigsInBridgelessModeEnabled()) { return getCachedConstants(); } else { console.error(errorMessageForMethod('getConstants')); @@ -179,7 +182,7 @@ const UIManagerJS: {[string]: $FlowFixMe} = { console.error(errorMessageForMethod('dismissPopupMenu')), }; -if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) { +if (nativeViewConfigsInBridgelessModeEnabled()) { Object.keys(getCachedConstants()).forEach(viewConfigName => { UIManagerJS[viewConfigName] = getCachedConstants()[viewConfigName]; }); diff --git a/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js b/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js index 01a56fb5098b..95d15e6e2f96 100644 --- a/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js +++ b/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js @@ -54,10 +54,6 @@ export type FeatureFlags = {| * Enables use of setNativeProps in JS driven animations. */ shouldUseSetNativePropsInFabric: () => boolean, - /** - * Enables native view configs in brdgeless mode. - */ - enableNativeViewConfigsInBridgelessMode: () => boolean, /** * Enables a hotfix for forcing materialization of views with elevation set. */ @@ -74,7 +70,6 @@ const ReactNativeFeatureFlags: FeatureFlags = { enableAccessToHostTreeInFabric: () => false, shouldUseAnimatedObjectForTransform: () => false, shouldUseSetNativePropsInFabric: () => false, - enableNativeViewConfigsInBridgelessMode: () => false, shouldForceUnflattenForElevation: () => false, }; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt index e3aa9aebae05..c0d5e90e41b4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt @@ -34,6 +34,7 @@ object DefaultNewArchitectureEntryPoint { ReactFeatureFlags.enableFabricRenderer = fabricEnabled ReactFeatureFlags.unstable_useFabricInterop = fabricEnabled ReactFeatureFlags.enableBridgelessArchitecture = bridgelessEnabled + ReactFeatureFlags.useNativeViewConfigsInBridgelessMode = fabricEnabled && bridgelessEnabled this.privateFabricEnabled = fabricEnabled this.privateTurboModulesEnabled = turboModulesEnabled From 4c1418a2167a3a3bb1ae501fbca3288f6d96a9aa Mon Sep 17 00:00:00 2001 From: Lulu Wu Date: Tue, 26 Sep 2023 10:32:45 -0700 Subject: [PATCH 005/190] Enable Template with Bridgeless (#39661) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39661 Changelog: [Android][Changed] - Enable Template with Bridgeless Reviewed By: cortinico Differential Revision: D49464580 fbshipit-source-id: 26dd8e2a0b9a66421d58f147eed4d2fd28817dc7 --- .../com/facebook/react/flipper/ReactNativeFlipper.kt | 4 ++++ .../src/main/java/com/helloworld/MainApplication.kt | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/react-native/ReactAndroid/flipper-integration/src/debug/java/com/facebook/react/flipper/ReactNativeFlipper.kt b/packages/react-native/ReactAndroid/flipper-integration/src/debug/java/com/facebook/react/flipper/ReactNativeFlipper.kt index ecbef22f7731..e4bad1d94ed4 100644 --- a/packages/react-native/ReactAndroid/flipper-integration/src/debug/java/com/facebook/react/flipper/ReactNativeFlipper.kt +++ b/packages/react-native/ReactAndroid/flipper-integration/src/debug/java/com/facebook/react/flipper/ReactNativeFlipper.kt @@ -21,6 +21,7 @@ import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPl import com.facebook.react.ReactInstanceEventListener import com.facebook.react.ReactInstanceManager import com.facebook.react.bridge.ReactContext +import com.facebook.react.config.ReactFeatureFlags import com.facebook.react.modules.network.NetworkingModule /** @@ -30,6 +31,9 @@ import com.facebook.react.modules.network.NetworkingModule object ReactNativeFlipper { @JvmStatic fun initializeFlipper(context: Context, reactInstanceManager: ReactInstanceManager) { + if (ReactFeatureFlags.enableBridgelessArchitecture) { + return + } if (FlipperUtils.shouldEnableFlipper(context)) { val client = AndroidFlipperClient.getInstance(context) client.addPlugin(InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())) diff --git a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt index 77a64826ad98..7314ad2aad30 100644 --- a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt +++ b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt @@ -5,11 +5,15 @@ import com.facebook.react.PackageList import com.facebook.react.ReactApplication import com.facebook.react.ReactNativeHost import com.facebook.react.ReactPackage +import com.facebook.react.common.annotations.UnstableReactNativeAPI import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load +import com.facebook.react.defaults.DefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.react.flipper.ReactNativeFlipper +import com.facebook.react.interfaces.ReactHost import com.facebook.soloader.SoLoader +@UnstableReactNativeAPI class MainApplication : Application(), ReactApplication { override val reactNativeHost: ReactNativeHost = @@ -28,6 +32,14 @@ class MainApplication : Application(), ReactApplication { override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED } + override val reactHost: ReactHost + get() = + DefaultReactHost.getDefaultReactHost( + context = this, + packageList = PackageList(this).packages, + jsMainModulePath = "index", + isHermesEnabled = BuildConfig.IS_HERMES_ENABLED) + override fun onCreate() { super.onCreate() SoLoader.init(this, false) From 73cd7c0e6beee015b2452c396a7d0bb79db25da1 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Wed, 27 Sep 2023 12:18:28 -0400 Subject: [PATCH 006/190] [Hotfix] Remove node engines constraint for normalize-color (#39698) --- packages/normalize-color/package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index 2da8f5d61617..3c9a4527e443 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -15,8 +15,5 @@ "normalize-colors", "react-native" ], - "bugs": "https://github.com/facebook/react-native/issues", - "engines": { - "node": ">=18" - } + "bugs": "https://github.com/facebook/react-native/issues" } From 04d80478c8cde2c9478af6dcd6d08bf56598c3a8 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Wed, 27 Sep 2023 12:03:43 -0400 Subject: [PATCH 007/190] Bump CLI to 12.0.0-alpha.16 --- packages/community-cli-plugin/package.json | 4 +- packages/react-native/package.json | 6 +- yarn.lock | 140 ++++++++++----------- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index dfb656950020..81f085f0b93c 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -23,8 +23,8 @@ ], "dependencies": { "@react-native/dev-middleware": "^0.73.2", - "@react-native-community/cli-server-api": "12.0.0-alpha.15", - "@react-native-community/cli-tools": "12.0.0-alpha.15", + "@react-native-community/cli-server-api": "12.0.0-alpha.16", + "@react-native-community/cli-tools": "12.0.0-alpha.16", "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 72b4edd977b3..5b898be6cfb1 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -93,9 +93,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.0.0-alpha.15", - "@react-native-community/cli-platform-android": "12.0.0-alpha.15", - "@react-native-community/cli-platform-ios": "12.0.0-alpha.15", + "@react-native-community/cli": "12.0.0-alpha.16", + "@react-native-community/cli-platform-android": "12.0.0-alpha.16", + "@react-native-community/cli-platform-ios": "12.0.0-alpha.16", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.2", "@react-native/codegen": "^0.73.1", diff --git a/yarn.lock b/yarn.lock index 4701347d6cd2..c117fdf1c57b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2377,44 +2377,44 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0-alpha.15.tgz#9c67e7420a3b79bfb91c06ed38a2ef7951af6561" - integrity sha512-TSLKuJmO2SGZAmJ+IoB4XhHN911EASTKw59CS29WyDY0t+U9oVA3FARO3rGlQ6EPy3hDZPmP5TOnrW7kPriZTw== +"@react-native-community/cli-clean@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0-alpha.16.tgz#4ea16d04b8c31eea57cb0be43daaf21f3ba08325" + integrity sha512-FFqrEXJ6w1OoJLezekOhUA6cw0XeYmGASUqHitxdWc+T9Y9IUnGeutUOXxcl32+ZXv8pIM0rgGvh6t9wCP8nNg== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.15" + "@react-native-community/cli-tools" "12.0.0-alpha.16" chalk "^4.1.2" execa "^5.0.0" prompts "^2.4.2" -"@react-native-community/cli-config@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0-alpha.15.tgz#3be6f3b07490a3a1ee83d60d3c4d3ecb9770b967" - integrity sha512-VOg8wDnzgVb7bLsb2ZLDVM56Rmnh0Y3RlcBjF/VvwylxT7F+mXeHYB07S06EBFnregULoqCrbKCzUxm1HpMlZQ== +"@react-native-community/cli-config@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0-alpha.16.tgz#7cfa273bc6976c086dc5c30f80a8d8ce890b5998" + integrity sha512-M7yS1mzCBk1cEzxa1iHP1Kc00dA/dGiCjmvI/RCXdEJ9dJ2GdhW3RlICCIv+tv/F4T1sJtJ2f1y+6SZ/V/aCPA== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.15" + "@react-native-community/cli-tools" "12.0.0-alpha.16" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0-alpha.15.tgz#7b5f0e6ef7c379bba1eb56a10a30b1f0546c590c" - integrity sha512-s0W0EYFFDZr7fJgdi6g5I9/UFipNzup3dv5BwSESU+pRgJ2cBw+vdrPJ+K3gF/C/mL2gslGlVqj97FhlBEWIiw== +"@react-native-community/cli-debugger-ui@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0-alpha.16.tgz#ac82e80860aa2e27c48fcbb2c268002187527221" + integrity sha512-boNoLZEvbQC1CWxlh8fjmvk9xqBtJ+FCFtq6te0vfPIX4/rDoQu32J7fSqoRbx1pdxfmWnTq37WsS+mm6qujgA== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0-alpha.15.tgz#b77a195dc12b4625277bce2913309b414dc8284f" - integrity sha512-fXLCHZZ96yg1pSZBNXz2sDCcJxvX01jaCzA369djulFLYXhrbDefgcBGpVuEU2ha9NVUS4Mm5pSvuvoz1rfz+g== +"@react-native-community/cli-doctor@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0-alpha.16.tgz#0a2dd9f9ec5e3864a497ad1e8b37f0438f690748" + integrity sha512-e7vyY+F5QgZHgbaIKevlW8lUK3vuOoaHFYtad5vwnKR7HKqac6QXSdQh3Wf5BV5Yu9ZqQFtmFc/JLu7i1GatkA== dependencies: - "@react-native-community/cli-config" "12.0.0-alpha.15" - "@react-native-community/cli-platform-android" "12.0.0-alpha.15" - "@react-native-community/cli-platform-ios" "12.0.0-alpha.15" - "@react-native-community/cli-tools" "12.0.0-alpha.15" + "@react-native-community/cli-config" "12.0.0-alpha.16" + "@react-native-community/cli-platform-android" "12.0.0-alpha.16" + "@react-native-community/cli-platform-ios" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.16" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2430,53 +2430,53 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0-alpha.15.tgz#3b959a6a5efd530bf0b3d627e254aa114f6b6868" - integrity sha512-uW7328s19mgr8vH+FApQvr5ThZKiys0Pkt4h/AGgf+LKYPFEe1FAJJ+mYfRXi/On48iA473f/3xIFM+3EsTSZA== +"@react-native-community/cli-hermes@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0-alpha.16.tgz#686a1b4c73d08acff5b8e1c2c2c0d263cc4fe9e8" + integrity sha512-4RVgEoqlT/ireWhgZVcwEpPPXzS5Bu7KyN3xfya0SZNJTy07rt3aRULKhD+G/HMSMGBOzQxTu350kpo1ONxJ5g== dependencies: - "@react-native-community/cli-platform-android" "12.0.0-alpha.15" - "@react-native-community/cli-tools" "12.0.0-alpha.15" + "@react-native-community/cli-platform-android" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.16" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0-alpha.15.tgz#3608487f28bbfe7d8454c04e1234df4e6aaf4e9e" - integrity sha512-mNPFKuxSZnj8OND/CVZhOfo5Dctlo8SsXzbADZF0RV/SR9YJ3adqc5U2eiIYSMab47uPXfjnByMsaWBGEmQh1Q== +"@react-native-community/cli-platform-android@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0-alpha.16.tgz#3c347987791a71566d071b54fb273f1be3b4fcc0" + integrity sha512-eSyoDHyJ3/U4/Rk8BJPDw7+9sgN0ZQ8uolmd5Qyz2ahMaRQVVJfmDze+6gHWQc/TH13hRP4HFrMHVH0F+7QMYQ== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.15" + "@react-native-community/cli-tools" "12.0.0-alpha.16" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0-alpha.15.tgz#88377fb1300b80c9d157207d73081dc22016a80f" - integrity sha512-ULA667yPDI6RB2p+DyGaEAxiYBAJgs4nABqwoTxwR5RmsaZkbR9CJE0khCq/Zpq0cbeZfCRm4dS70p4caoKBbQ== +"@react-native-community/cli-platform-ios@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0-alpha.16.tgz#e5879eed73b27b2719984e1b4b7fa3f65cf1004d" + integrity sha512-/oJyB0n3oIoQ46zSCISm1LxeuVFoNXyu1i5TCffrZabPsGHVmNmaHafD4QD+NnITQI3CEgPnjs7delHuCxwi6w== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.15" + "@react-native-community/cli-tools" "12.0.0-alpha.16" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0-alpha.15.tgz#485179af3d5462417f20c32605c888cb663ba7d6" - integrity sha512-O6gjHHoiHmFQoxYLbXP7tTpDNQLcsaZvYzD+JzuDmk9/GLX1Oyec2gXPJ+Fnbqgpf76gAf+q11zldD/F3k1L7A== +"@react-native-community/cli-plugin-metro@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0-alpha.16.tgz#17ef4ec1ce6e5986cc4a68e3155dea161dfa53bb" + integrity sha512-5mxmgPjzo5N+m/fyHPyA97qgvK7Av/np1p4bsAA+W6r/jNqpQ8pksFyUVHCIFdhdXywWePR9SPKMI9KKnI2Jcw== -"@react-native-community/cli-server-api@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0-alpha.15.tgz#59ea9fdd8a9d9362c79597745771510cbed5b0c1" - integrity sha512-vGOnZsreBPaSpoGN2TkhJGfu56Ybf1PoC6PcrUzKh+QgsOiI0AWimWiKUUvnEaQlURI7CeiMe1N0zghhbfC3nA== +"@react-native-community/cli-server-api@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0-alpha.16.tgz#beb47137eff4bb2440e575b85cf4963548a95607" + integrity sha512-kwm1svKFM1q7vyvFDRA/9TivwDb0gGQQ5qkTsQPPoPzqUFpuKFiXslg9dhynP20SB5L0fhRwpmmsb5hAwI2uew== dependencies: - "@react-native-community/cli-debugger-ui" "12.0.0-alpha.15" - "@react-native-community/cli-tools" "12.0.0-alpha.15" + "@react-native-community/cli-debugger-ui" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.16" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -2485,10 +2485,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0-alpha.15.tgz#d9ee1fc6b49b0a34f982c6634a50e61ac332394a" - integrity sha512-AL/UskYhi4U79T5660oW/Aa27N/wp8lRgnpkFP7saL2zy/I0ZrBTUmHPt1pDdwMnjMfYXJGyyoomMbwqWUpLig== +"@react-native-community/cli-tools@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0-alpha.16.tgz#827e536a933583ae06d57d1d4738b81e110acc93" + integrity sha512-Y5gVCJKEEJt7GmBo1xtJShyPT6gDoAGU/lOjbQ5/jDrf5xayjR4oM9VKhHEVX0bOF6hwJUC9rWuG++yHrWQPPQ== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2501,27 +2501,27 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0-alpha.15.tgz#c5fc97902e9b983ec8d8df003043f44536dc7cd3" - integrity sha512-j1Lgi9eFqFGebyCY/kaqYguSSQ4yZzrGLRUx7zd/xxDF7PfQNpFqwxE7gPWtR6CUfVkVaoQyHbwTGHdoU0AakA== +"@react-native-community/cli-types@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0-alpha.16.tgz#0880505cfe652e0003e564ad22dacccbd67ff3a5" + integrity sha512-+7mM0A+4b+5vGTvNInGb380w8dv00INfKvpwm0ZfFu7pDsXH/WuOSRDdwG+JgGIkTKHl0F9SxwoNYhNHcVwpAA== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.0.0-alpha.15": - version "12.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0-alpha.15.tgz#819f0b5781a6cace226e0935ec5b0a82db32a777" - integrity sha512-8uHuAyTGzi8jGnAyuBPzIAPcpl6ol4UXVPENCKlGB5AfUzi643Xnh95NRUDy+6fi0PHl+w4ggRWUNKR6GjnRnQ== - dependencies: - "@react-native-community/cli-clean" "12.0.0-alpha.15" - "@react-native-community/cli-config" "12.0.0-alpha.15" - "@react-native-community/cli-debugger-ui" "12.0.0-alpha.15" - "@react-native-community/cli-doctor" "12.0.0-alpha.15" - "@react-native-community/cli-hermes" "12.0.0-alpha.15" - "@react-native-community/cli-plugin-metro" "12.0.0-alpha.15" - "@react-native-community/cli-server-api" "12.0.0-alpha.15" - "@react-native-community/cli-tools" "12.0.0-alpha.15" - "@react-native-community/cli-types" "12.0.0-alpha.15" +"@react-native-community/cli@12.0.0-alpha.16": + version "12.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0-alpha.16.tgz#3cf5bad3cb93ba2286a2cee2b1885fa856d9b22a" + integrity sha512-W2UpUV1qb73Tsd3Qj1h7uAt8THwbPQYxzpGJlb63ogVhhf2ASDkFYxPKy5P5CUSxMyDBxfZCZhA6ukcVllbRgg== + dependencies: + "@react-native-community/cli-clean" "12.0.0-alpha.16" + "@react-native-community/cli-config" "12.0.0-alpha.16" + "@react-native-community/cli-debugger-ui" "12.0.0-alpha.16" + "@react-native-community/cli-doctor" "12.0.0-alpha.16" + "@react-native-community/cli-hermes" "12.0.0-alpha.16" + "@react-native-community/cli-plugin-metro" "12.0.0-alpha.16" + "@react-native-community/cli-server-api" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-types" "12.0.0-alpha.16" chalk "^4.1.2" commander "^9.4.1" execa "^5.0.0" From 69e0c2d916d8b5a19da8fd7a5a2a87c011c7b0f6 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Wed, 27 Sep 2023 12:36:19 -0400 Subject: [PATCH 008/190] bumped packages versions #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 2 +- packages/normalize-color/package.json | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 81f085f0b93c..53847f19848c 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.2", + "version": "0.73.3", "description": "Core CLI commands for React Native", "keywords": [ "react-native", diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index 3c9a4527e443..ea7487bab9c3 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/normalize-colors", - "version": "0.73.1", + "version": "0.73.2", "description": "Color normalization for React Native.", "license": "MIT", "repository": { diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 5b898be6cfb1..14b394fe473d 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,11 +97,11 @@ "@react-native-community/cli-platform-android": "12.0.0-alpha.16", "@react-native-community/cli-platform-ios": "12.0.0-alpha.16", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.2", + "@react-native/community-cli-plugin": "^0.73.3", "@react-native/codegen": "^0.73.1", "@react-native/gradle-plugin": "^0.73.1", "@react-native/js-polyfills": "^0.73.1", - "@react-native/normalize-colors": "^0.73.1", + "@react-native/normalize-colors": "^0.73.2", "@react-native/virtualized-lists": "^0.73.1", "abort-controller": "^3.0.0", "anser": "^1.4.9", diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 18848714b3c2..e4fe7ccdc801 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -17,7 +17,7 @@ "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", - "@react-native/babel-preset": "^0.73.17", + "@react-native/babel-preset": "^0.73.18", "@react-native/eslint-config": "^0.73.1", "@react-native/metro-config": "^0.73.1", "@react-native/typescript-config": "^0.73.1", From a57a8b7782c4da4deba1717c56c87b2b8d9b2c90 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Tue, 26 Sep 2023 07:30:41 -0700 Subject: [PATCH 009/190] Reduce visibility of functions in ReactHostImpl (#39640) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39640 changelog: [internal] internal Reducing visibility from public to package only for `ReactHostImpl.getDefaultHardwareBackBtnHandler()` since it's only used within package Reviewed By: mdvacca Differential Revision: D49612859 fbshipit-source-id: 3c40888da732f33dc046d9363b08119e707f4ea4 --- .../main/java/com/facebook/react/runtime/ReactHostImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java index 70062476d337..a06f19d7ee44 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java @@ -597,7 +597,8 @@ T getNativeModule(Class nativeModuleInterface) { return null; } - public DefaultHardwareBackBtnHandler getDefaultBackButtonHandler() { + /* package */ + DefaultHardwareBackBtnHandler getDefaultBackButtonHandler() { return () -> { UiThreadUtil.assertOnUiThread(); if (mDefaultHardwareBackBtnHandler != null) { From 562109fdd3c2b171f07433bca0cc817ec6072b07 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Tue, 26 Sep 2023 14:51:02 -0700 Subject: [PATCH 010/190] Enable TurboModule interop in Bridgeless Mode (#39687) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39687 Bridgeless mode is releasing in 0.73. Bridgeless mode isn't stable inside RNTester (in 0.73) without the TurboModule interop layer: T164853040. **Changes:** Enable the TurboModule interop layer in RNTester (Bridgeless Mode). **Urgency:** This will unblock the 0.73. Changelog: [General][Added] - Enable TurboModule interop in Bridgeless mode Reviewed By: fkgozali, dmytrorykun, luluwu2032 Differential Revision: D49653919 fbshipit-source-id: a4a09a99544c2ef8713484dbeab5cb04f29256cc --- .../react-native/Libraries/AppDelegate/RCTAppDelegate.mm | 5 +++++ .../react/defaults/DefaultNewArchitectureEntryPoint.kt | 1 + 2 files changed, 6 insertions(+) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index 6e8e018b254c..d666fe31c100 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -89,6 +89,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( #if RCT_NEW_ARCH_ENABLED // Enable native view config interop only if both bridgeless mode and Fabric is enabled. RCTSetUseNativeViewConfigsInBridgelessMode([self fabricEnabled]); + + // Enable TurboModule interop by default in Bridgeless mode + RCTEnableTurboModuleInterop(YES); + RCTEnableTurboModuleInteropBridgeProxy(YES); + [self createReactHost]; [self unstable_registerLegacyComponents]; [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt index c0d5e90e41b4..fa6ff875dda2 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt @@ -35,6 +35,7 @@ object DefaultNewArchitectureEntryPoint { ReactFeatureFlags.unstable_useFabricInterop = fabricEnabled ReactFeatureFlags.enableBridgelessArchitecture = bridgelessEnabled ReactFeatureFlags.useNativeViewConfigsInBridgelessMode = fabricEnabled && bridgelessEnabled + ReactFeatureFlags.unstable_useTurboModuleInterop = bridgelessEnabled this.privateFabricEnabled = fabricEnabled this.privateTurboModulesEnabled = turboModulesEnabled From ea09bcd8cb5f5a9784006ea5816b08247901fad2 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Wed, 27 Sep 2023 10:05:33 -0700 Subject: [PATCH 011/190] Export Commands and Constants only if native view config interop is enabled (#39696) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39696 `Commands` and `Constants` should be set in native only if component data is instantiated via native view config interop layer. Changelog: [Internal] Reviewed By: RSNara Differential Revision: D49684166 fbshipit-source-id: ceaa29c2ed3336aa6e21a116a3f5f94e03c225c1 --- .../react-native/React/Modules/RCTUIManager.m | 7 ++++--- .../React/Views/RCTComponentData.m | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/packages/react-native/React/Modules/RCTUIManager.m b/packages/react-native/React/Modules/RCTUIManager.m index 14963e7d4a64..7027921fda70 100644 --- a/packages/react-native/React/Modules/RCTUIManager.m +++ b/packages/react-native/React/Modules/RCTUIManager.m @@ -1489,9 +1489,10 @@ static void RCTMeasureLayout(RCTShadowView *view, RCTShadowView *ancestor, RCTRe // lazifyViewManagerConfig function in JS. This fuction uses NativeModules global object that is not available in the // New Architecture. To make native view configs work in the New Architecture we will populate these properties in // native. - moduleConstants[@"Commands"] = viewConfig[@"Commands"]; - moduleConstants[@"Constants"] = viewConfig[@"Constants"]; - + if (RCTGetUseNativeViewConfigsInBridgelessMode()) { + moduleConstants[@"Commands"] = viewConfig[@"Commands"]; + moduleConstants[@"Constants"] = viewConfig[@"Constants"]; + } // Add direct events for (NSString *eventName in viewConfig[@"directEvents"]) { if (!directEvents[eventName]) { diff --git a/packages/react-native/React/Views/RCTComponentData.m b/packages/react-native/React/Views/RCTComponentData.m index 2c627b6cbef5..888cad59b88e 100644 --- a/packages/react-native/React/Views/RCTComponentData.m +++ b/packages/react-native/React/Views/RCTComponentData.m @@ -480,11 +480,6 @@ - (void)setProps:(NSDictionary *)props forShadowView:(RCTShadowV } } - NSDictionary *commands = [self commandsForViewMangerClass:managerClass - methods:methods - methodCount:count]; - free(methods); - #if RCT_DEBUG for (NSString *event in bubblingEvents) { if ([directEvents containsObject:event]) { @@ -499,15 +494,22 @@ - (void)setProps:(NSDictionary *)props forShadowView:(RCTShadowV Class superClass = [managerClass superclass]; - return @{ + NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithDictionary:@{ @"propTypes" : propTypes, @"directEvents" : directEvents, @"bubblingEvents" : bubblingEvents, @"capturingEvents" : capturingEvents, @"baseModuleName" : superClass == [NSObject class] ? (id)kCFNull : RCTViewManagerModuleNameForClass(superClass), - @"Commands" : commands, - @"Constants" : [self constantsForViewMangerClass:managerClass], - }; + }]; + + if (RCTGetUseNativeViewConfigsInBridgelessMode()) { + result[@"Commands"] = [self commandsForViewMangerClass:managerClass methods:methods methodCount:count]; + result[@"Constants"] = [self constantsForViewMangerClass:managerClass]; + } + + free(methods); + + return result; } - (NSDictionary *)viewConfig From 608b4bac44ae570371c7b383c5d030275f8c080a Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Wed, 27 Sep 2023 15:21:37 -0400 Subject: [PATCH 012/190] Bump CLI to 12.0.0-alpha.17 --- packages/community-cli-plugin/package.json | 4 +- packages/react-native/package.json | 6 +- yarn.lock | 140 ++++++++++----------- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 53847f19848c..220394666b76 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -23,8 +23,8 @@ ], "dependencies": { "@react-native/dev-middleware": "^0.73.2", - "@react-native-community/cli-server-api": "12.0.0-alpha.16", - "@react-native-community/cli-tools": "12.0.0-alpha.16", + "@react-native-community/cli-server-api": "12.0.0-alpha.17", + "@react-native-community/cli-tools": "12.0.0-alpha.17", "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 14b394fe473d..30cdf149b535 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -93,9 +93,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.0.0-alpha.16", - "@react-native-community/cli-platform-android": "12.0.0-alpha.16", - "@react-native-community/cli-platform-ios": "12.0.0-alpha.16", + "@react-native-community/cli": "12.0.0-alpha.17", + "@react-native-community/cli-platform-android": "12.0.0-alpha.17", + "@react-native-community/cli-platform-ios": "12.0.0-alpha.17", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.3", "@react-native/codegen": "^0.73.1", diff --git a/yarn.lock b/yarn.lock index c117fdf1c57b..d2e7544105ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2377,44 +2377,44 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0-alpha.16.tgz#4ea16d04b8c31eea57cb0be43daaf21f3ba08325" - integrity sha512-FFqrEXJ6w1OoJLezekOhUA6cw0XeYmGASUqHitxdWc+T9Y9IUnGeutUOXxcl32+ZXv8pIM0rgGvh6t9wCP8nNg== +"@react-native-community/cli-clean@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0-alpha.17.tgz#1b612ef1538ea5feca2a5ad3b4184fa1c54f7538" + integrity sha512-ZE5hB1c2wQo50Np4l+Vnmn4GZehhV6GFoK/35SQTbVOIRSSxXs2S/bOLzlS4MLOC7486EODodfQXpcDZqzkG1g== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.17" chalk "^4.1.2" execa "^5.0.0" prompts "^2.4.2" -"@react-native-community/cli-config@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0-alpha.16.tgz#7cfa273bc6976c086dc5c30f80a8d8ce890b5998" - integrity sha512-M7yS1mzCBk1cEzxa1iHP1Kc00dA/dGiCjmvI/RCXdEJ9dJ2GdhW3RlICCIv+tv/F4T1sJtJ2f1y+6SZ/V/aCPA== +"@react-native-community/cli-config@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0-alpha.17.tgz#e2c1489d01e0e3ca5e68907d6ad5dee78b6f5ef0" + integrity sha512-BzL6ix++hlGH3RibZhsDIB7B5tF8GlTeDrspg4FYw9+7uS2YqRNCQsemiCGm56gnftwFLCMbCqbiZMjaAVHtvg== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.17" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0-alpha.16.tgz#ac82e80860aa2e27c48fcbb2c268002187527221" - integrity sha512-boNoLZEvbQC1CWxlh8fjmvk9xqBtJ+FCFtq6te0vfPIX4/rDoQu32J7fSqoRbx1pdxfmWnTq37WsS+mm6qujgA== +"@react-native-community/cli-debugger-ui@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0-alpha.17.tgz#e984231ce3fe3fc9489bc5ca892718e8372de690" + integrity sha512-JWP3cmtoThy/xaH7E/hqalanEqfRTduMwxd5F4hpZvVgbNJ9CSjrJoEMC362g4R2Uq5h/ZiD0EzhXYEZH1pRIg== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0-alpha.16.tgz#0a2dd9f9ec5e3864a497ad1e8b37f0438f690748" - integrity sha512-e7vyY+F5QgZHgbaIKevlW8lUK3vuOoaHFYtad5vwnKR7HKqac6QXSdQh3Wf5BV5Yu9ZqQFtmFc/JLu7i1GatkA== +"@react-native-community/cli-doctor@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0-alpha.17.tgz#b6a02c7ef5e4026ff609c0b720843be12ad08fb6" + integrity sha512-ZNCmsoSsNJ+9KeNylw0Y7uHpPD/m0yPKtZTI7FFTY1HgcLgDufuE1FjcF9Az/vb+wPyqASvrP2owvKk+6OLBbg== dependencies: - "@react-native-community/cli-config" "12.0.0-alpha.16" - "@react-native-community/cli-platform-android" "12.0.0-alpha.16" - "@react-native-community/cli-platform-ios" "12.0.0-alpha.16" - "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-config" "12.0.0-alpha.17" + "@react-native-community/cli-platform-android" "12.0.0-alpha.17" + "@react-native-community/cli-platform-ios" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0-alpha.17" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2430,53 +2430,53 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0-alpha.16.tgz#686a1b4c73d08acff5b8e1c2c2c0d263cc4fe9e8" - integrity sha512-4RVgEoqlT/ireWhgZVcwEpPPXzS5Bu7KyN3xfya0SZNJTy07rt3aRULKhD+G/HMSMGBOzQxTu350kpo1ONxJ5g== +"@react-native-community/cli-hermes@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0-alpha.17.tgz#03e073cd9e93c923439a8846b2571014c0a673b0" + integrity sha512-/tW/iogp77REppUKUGvdYxSDudxCGXpURjsJevElgUxNYzW22mbHfi5FJATzcwou9wDlhP5z8lsSDPyanbxnmQ== dependencies: - "@react-native-community/cli-platform-android" "12.0.0-alpha.16" - "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-platform-android" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0-alpha.17" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0-alpha.16.tgz#3c347987791a71566d071b54fb273f1be3b4fcc0" - integrity sha512-eSyoDHyJ3/U4/Rk8BJPDw7+9sgN0ZQ8uolmd5Qyz2ahMaRQVVJfmDze+6gHWQc/TH13hRP4HFrMHVH0F+7QMYQ== +"@react-native-community/cli-platform-android@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0-alpha.17.tgz#74291d9ed59a02b3a0ef180808b0944883946996" + integrity sha512-1wEp4j8r9FJ1GBz2H4Q2SW3lDCVxnzBn8PetAhqlUPVptmazQN08x4u+EBhFJ9+ABUHUJ2hjtEUdA1/SqdyB2A== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.17" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0-alpha.16.tgz#e5879eed73b27b2719984e1b4b7fa3f65cf1004d" - integrity sha512-/oJyB0n3oIoQ46zSCISm1LxeuVFoNXyu1i5TCffrZabPsGHVmNmaHafD4QD+NnITQI3CEgPnjs7delHuCxwi6w== +"@react-native-community/cli-platform-ios@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0-alpha.17.tgz#b4143c79c3aa62aa55f1bce9e9d79a9dbb446d95" + integrity sha512-zbRIvJAnYnGDgJzUCOpo/XXewWZqMmrxQpTW4h4Vf2JWA3o3CWLX2lDd3eNWU73suE3dg76f6Og1FkXnns2QxA== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-tools" "12.0.0-alpha.17" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0-alpha.16.tgz#17ef4ec1ce6e5986cc4a68e3155dea161dfa53bb" - integrity sha512-5mxmgPjzo5N+m/fyHPyA97qgvK7Av/np1p4bsAA+W6r/jNqpQ8pksFyUVHCIFdhdXywWePR9SPKMI9KKnI2Jcw== +"@react-native-community/cli-plugin-metro@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0-alpha.17.tgz#7cc3e6a51fb31f02cb1cd36a43363e9b86c54dca" + integrity sha512-rhNNGaG0zjBBlCql5Ocq0oBdlYvfNHn9xH2YRT7+Dj+2j3P75uCiNExfdRNo1/3qdNY+dPmIVYbT4/0lglnVvA== -"@react-native-community/cli-server-api@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0-alpha.16.tgz#beb47137eff4bb2440e575b85cf4963548a95607" - integrity sha512-kwm1svKFM1q7vyvFDRA/9TivwDb0gGQQ5qkTsQPPoPzqUFpuKFiXslg9dhynP20SB5L0fhRwpmmsb5hAwI2uew== +"@react-native-community/cli-server-api@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0-alpha.17.tgz#f80fe0f40b465a0cbba0b3d166db6f45111ac9ef" + integrity sha512-G7qJZkHEC445ltX6hM7xByWfHajuCP+jDOTzV5I4CSFzGS4f1xVhkNtuWphsnP3dKvNgOzp4t5GZrWo9qksJQQ== dependencies: - "@react-native-community/cli-debugger-ui" "12.0.0-alpha.16" - "@react-native-community/cli-tools" "12.0.0-alpha.16" + "@react-native-community/cli-debugger-ui" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0-alpha.17" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -2485,10 +2485,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0-alpha.16.tgz#827e536a933583ae06d57d1d4738b81e110acc93" - integrity sha512-Y5gVCJKEEJt7GmBo1xtJShyPT6gDoAGU/lOjbQ5/jDrf5xayjR4oM9VKhHEVX0bOF6hwJUC9rWuG++yHrWQPPQ== +"@react-native-community/cli-tools@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0-alpha.17.tgz#0c7520b41aa411b52a4cdc83ece759aa3dba72fa" + integrity sha512-NcBEiPgAp1iM5NSnZffizRHUYF38w4d+chT3MUgJWEGqSgQBnITqOF/tsnk4XBU8UH1lnxt9Hqng0Dh4RpPNAQ== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2501,27 +2501,27 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0-alpha.16.tgz#0880505cfe652e0003e564ad22dacccbd67ff3a5" - integrity sha512-+7mM0A+4b+5vGTvNInGb380w8dv00INfKvpwm0ZfFu7pDsXH/WuOSRDdwG+JgGIkTKHl0F9SxwoNYhNHcVwpAA== +"@react-native-community/cli-types@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0-alpha.17.tgz#d52837a7c7c6e26d505ae0e43e535dc0fc994aa2" + integrity sha512-9GWpRdf+1BkrhLLGXOJYyEu/lw9XlWCgTfG2dnOBMfKRbb5Hb3JZTh5MvYdi+em27jy2cV/MlbfIyXj0W42arQ== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.0.0-alpha.16": - version "12.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0-alpha.16.tgz#3cf5bad3cb93ba2286a2cee2b1885fa856d9b22a" - integrity sha512-W2UpUV1qb73Tsd3Qj1h7uAt8THwbPQYxzpGJlb63ogVhhf2ASDkFYxPKy5P5CUSxMyDBxfZCZhA6ukcVllbRgg== - dependencies: - "@react-native-community/cli-clean" "12.0.0-alpha.16" - "@react-native-community/cli-config" "12.0.0-alpha.16" - "@react-native-community/cli-debugger-ui" "12.0.0-alpha.16" - "@react-native-community/cli-doctor" "12.0.0-alpha.16" - "@react-native-community/cli-hermes" "12.0.0-alpha.16" - "@react-native-community/cli-plugin-metro" "12.0.0-alpha.16" - "@react-native-community/cli-server-api" "12.0.0-alpha.16" - "@react-native-community/cli-tools" "12.0.0-alpha.16" - "@react-native-community/cli-types" "12.0.0-alpha.16" +"@react-native-community/cli@12.0.0-alpha.17": + version "12.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0-alpha.17.tgz#fbaddf8ff6fd6262f62055b1aae3017df63c30cd" + integrity sha512-pXmXrU24DDsnVuZEkkKMZV3xNH3Z5UZ+fjw/MJtXeAUUbgfbd0iF4lf59zMpil8mUzb2u7X4G2gBCiXBh5/oLQ== + dependencies: + "@react-native-community/cli-clean" "12.0.0-alpha.17" + "@react-native-community/cli-config" "12.0.0-alpha.17" + "@react-native-community/cli-debugger-ui" "12.0.0-alpha.17" + "@react-native-community/cli-doctor" "12.0.0-alpha.17" + "@react-native-community/cli-hermes" "12.0.0-alpha.17" + "@react-native-community/cli-plugin-metro" "12.0.0-alpha.17" + "@react-native-community/cli-server-api" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0-alpha.17" + "@react-native-community/cli-types" "12.0.0-alpha.17" chalk "^4.1.2" commander "^9.4.1" execa "^5.0.0" From 49bd0ed3031b66b4d56a010978400c51ed890e5a Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Wed, 27 Sep 2023 15:22:28 -0400 Subject: [PATCH 013/190] Bump package versions #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 2 +- packages/react-native/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 220394666b76..925d77c08b4c 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.3", + "version": "0.73.4", "description": "Core CLI commands for React Native", "keywords": [ "react-native", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 30cdf149b535..d095dabedf4d 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,7 +97,7 @@ "@react-native-community/cli-platform-android": "12.0.0-alpha.17", "@react-native-community/cli-platform-ios": "12.0.0-alpha.17", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.3", + "@react-native/community-cli-plugin": "^0.73.4", "@react-native/codegen": "^0.73.1", "@react-native/gradle-plugin": "^0.73.1", "@react-native/js-polyfills": "^0.73.1", From 67ebc7c7d5e04405d59b8cd29dd6cf7d33115cd5 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 29 Sep 2023 10:22:36 -0700 Subject: [PATCH 014/190] Update Xcode 15 patches to be more robust (#39710) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39710 Last week Apple released Xcode 15, which required us to ship a workaround for the new linker. Unfortunately, the previous fix was not good enough and there were some edge cases that were not covered. For example, in some occasions the flags are read as an array and the `-Wl` and the `-ld_classic` flags were separated and not properly removed when moving from Xcode 15 to Xcpde 14.3.1. This change fixes those edge cases, with a more robust solution where: - We convert the flags to a string. - We trim the string and the values properly. - We add the flags when running `pod install` with Xcode 15 as the default iOS toolchain. - We remove the flags when running `pod install` with Xcode <15 as the default iOS toolchain. ## Changelog: [Internal] - Make the Xcode 15 workaround more robust. Reviewed By: dmytrorykun Differential Revision: D49748844 fbshipit-source-id: 34976d148f123c5aacba6487a500874bb938fe99 --- .../scripts/cocoapods/__tests__/utils-test.rb | 4 +-- .../react-native/scripts/cocoapods/utils.rb | 26 ++++++++++++------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb b/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb index 89de036c170e..4c57727fa8f4 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb @@ -613,7 +613,7 @@ def test_applyXcode15Patch_whenXcodebuild15_correctlyAppliesNecessaryPatch # Assert user_project_mock.build_configurations.each do |config| - assert_equal("$(inherited) -Wl -ld_classic ", config.build_settings["OTHER_LDFLAGS"]) + assert_equal("$(inherited) -Wl -ld_classic", config.build_settings["OTHER_LDFLAGS"]) end # User project and Pods project @@ -662,7 +662,7 @@ def test_applyXcode15Patch_whenXcodebuild14ButProjectHasSettings_correctlyRemove # Assert user_project_mock.build_configurations.each do |config| - assert_equal("$(inherited) ", config.build_settings["OTHER_LDFLAGS"]) + assert_equal("$(inherited)", config.build_settings["OTHER_LDFLAGS"]) end # User project and Pods project diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index d034f40ac4c3..cf396cfcb211 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -76,7 +76,7 @@ def self.exclude_i386_architecture_while_using_hermes(installer) excluded_archs_includes_I386 = current_setting.include?("i386") if !excluded_archs_includes_I386 - # Hermes does not support `i386` architecture + # Hermes does not support 'i386' architecture config.build_settings[key] = "#{current_setting} i386".strip end end @@ -341,20 +341,26 @@ def self.safe_init(config, setting_name) def self.add_value_to_setting_if_missing(config, setting_name, value) old_config = config.build_settings[setting_name] - if !old_config.include?(value) - config.build_settings[setting_name] << value + if old_config.is_a?(Array) + old_config = old_config.join(" ") + end + + trimmed_value = value.strip() + if !old_config.include?(trimmed_value) + config.build_settings[setting_name] = "#{old_config.strip()} #{trimmed_value}".strip() end end def self.remove_value_to_setting_if_present(config, setting_name, value) old_config = config.build_settings[setting_name] - if old_config.include?(value) - # Old config can be either an Array or a String - if old_config.is_a?(Array) - old_config = old_config.join(" ") - end - new_config = old_config.gsub(value, "") - config.build_settings[setting_name] = new_config + if old_config.is_a?(Array) + old_config = old_config.join(" ") + end + + trimmed_value = value.strip() + if old_config.include?(trimmed_value) + new_config = old_config.gsub(trimmed_value, "") + config.build_settings[setting_name] = new_config.strip() end end From c116c1c26889ec0581abf2db57ce5a11c130a5cd Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Mon, 2 Oct 2023 10:28:17 -0700 Subject: [PATCH 015/190] Sync debugger-frontend Summary: Sync latest `debugger-frontend` artifacts, based on https://github.com/motiz88/rn-chrome-devtools-frontend/pull/12. Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D49502838 fbshipit-source-id: 25805066670ac35ec976dc820a73a722ee182dd2 --- packages/debugger-frontend/BUILD_INFO | 4 ++-- .../dist/third-party/front_end/Images/Images.js | 1 + .../third-party/front_end/Images/favicon.ico | Bin 0 -> 24838 bytes .../front_end/core/i18n/locales/en-US.json | 2 +- .../front_end/device_mode_emulation_frame.html | 3 ++- .../third-party/front_end/devtools_app.html | 3 ++- .../front_end/entrypoints/js_app/js_app.js | 2 +- .../front_end/entrypoints/main/main.js | 2 +- .../front_end/entrypoints/node_app/node_app.js | 2 +- .../entrypoints/rn_inspector/rn_inspector.js | 2 +- .../dist/third-party/front_end/inspector.html | 3 ++- .../dist/third-party/front_end/js_app.html | 3 ++- .../dist/third-party/front_end/ndb_app.html | 3 ++- .../dist/third-party/front_end/node_app.html | 3 ++- .../panels/js_profiler/js_profiler-meta.js | 2 +- .../front_end/panels/profiler/profiler.js | 2 +- .../front_end/panels/rn_welcome/rn_welcome.js | 2 +- .../third-party/front_end/rn_inspector.html | 3 ++- .../dist/third-party/front_end/worker_app.html | 3 ++- 19 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 packages/debugger-frontend/dist/third-party/front_end/Images/favicon.ico diff --git a/packages/debugger-frontend/BUILD_INFO b/packages/debugger-frontend/BUILD_INFO index fe942450d1b2..67e1ea665da8 100644 --- a/packages/debugger-frontend/BUILD_INFO +++ b/packages/debugger-frontend/BUILD_INFO @@ -1,5 +1,5 @@ -@generated SignedSource<<8a0bac4cfdcc3cd44a4f7136f2611ebb>> -Git revision: 0ffb687b8e049769d2e7162ba8d7205c90e4110c +@generated SignedSource<<7fdc9e65be03ba4c6654f14c6f23d645>> +Git revision: 18f202a1ae468a01afb44ffd2f71d28023126989 Built with --nohooks: false Is local checkout: false Remote URL: https://github.com/motiz88/rn-chrome-devtools-frontend diff --git a/packages/debugger-frontend/dist/third-party/front_end/Images/Images.js b/packages/debugger-frontend/dist/third-party/front_end/Images/Images.js index 6da713f6a5c8..0977e3575591 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/Images/Images.js +++ b/packages/debugger-frontend/dist/third-party/front_end/Images/Images.js @@ -13,6 +13,7 @@ style.setProperty('--image-file-chromeLeft', 'url(\"' + new URL('./chromeLeft.av style.setProperty('--image-file-chromeMiddle', 'url(\"' + new URL('./chromeMiddle.avif', import.meta.url).toString() + '\")'); style.setProperty('--image-file-chromeRight', 'url(\"' + new URL('./chromeRight.avif', import.meta.url).toString() + '\")'); style.setProperty('--image-file-cssoverview_icons_2x', 'url(\"' + new URL('./cssoverview_icons_2x.avif', import.meta.url).toString() + '\")'); +style.setProperty('--image-file-favicon', 'url(\"' + new URL('./favicon.ico', import.meta.url).toString() + '\")'); style.setProperty('--image-file-navigationControls_2x', 'url(\"' + new URL('./navigationControls_2x.png', import.meta.url).toString() + '\")'); style.setProperty('--image-file-navigationControls', 'url(\"' + new URL('./navigationControls.png', import.meta.url).toString() + '\")'); style.setProperty('--image-file-nodeIcon', 'url(\"' + new URL('./nodeIcon.avif', import.meta.url).toString() + '\")'); diff --git a/packages/debugger-frontend/dist/third-party/front_end/Images/favicon.ico b/packages/debugger-frontend/dist/third-party/front_end/Images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5c125de5d897c1ff5692a656485b3216123dcd89 GIT binary patch literal 24838 zcmeI4X^>UL6@VY56)S&I{`6Nu0RscWCdj@GJHx(%?6_-;yKy1n;EEf9f}pr1CW5HA zYt$%U#C=}?jWH&%G@BaHBxsWAoUb3}&6%Ei@4Ii_JRa1`RQ23*yU)_wJ$?H0>6gj0 z${d_I^w5kvTW3xYEc?FvyP3>p$!py@`@T`|dVepIsjbbvR}af%KKy7YuQ%SDC^zmNWPYR^7avI5P-@dKev}UZ^aDAOyci9Nn zwR4qEz~tSvrp|#ACvWzo9`3B;`}^{t18dxaH;?xT7#hmJiKAaI;|O=$yxzXNOHGw~ z^!5pE^SW`av%t_$22LFPsM^l%=PSp!3r`>9w%s+^ZQYnnTQ*Ggd9-1~kj_o$YdW@b ztCkJ(ZGYjusqV5L4{^)R9Gt@gzU1t|?xhE&c^q(|(R#oa*}Sj5c({A$mhrB8*Y@tc zr)K#C{KOp-eHl35ZWJ1&zkmI>9DL%!KJE@_!=W?aH;i?ZDb0O1HPFy6 zcV0Kf)eZ0BHmz9vowF7EA{z*aue9M)iJP&Zd)qYlfJ-c^sS1qY^?>s)!!Ta@x zr@Lz|80r)7<{QVk9Z$}5SDaVtz*Rc?oH5~Wcjoc^eA&EdJ^h@aZ-BvL{K2s_7Cvfr zFL&(R?D&(9OxsS%z_BzI9^Ai^AOF$PUpGk~oO(=OpMc3@Zh&KH1a9>G%%0rC)t@oQ z4d~M`hX+g^Wf8P>A&&qjq|tZe*44Laq7qVPK#QIc)s*Qj34P`NL`Q{xBI`SnR!RC? zlGdTvC%oVZ@0BgcH>}qc!uzul@{i@sH}L0|=eZBJ9qF!HHaw?`s0(_DJj(v`(memI z6jH}=BfGlSlRV4)ouv#h*65yRR>G zo;I#~BVK&l&{+H=_~Nq$d%bFLh7GE5pS&>Fr{RMe>)MM19~z6F1oQo_y>vtlpEZF# zIc82TpMc3z9;{Q)=zG5B#4+96yHCvYy8p4;C%6x`%y$2HccC9|#vGVD)**C0xX|R| z%h)}ze!Tnrvvb@RZ!GX@2lMEq`=`08b`9$%FnN@*zJLo2wD5?MbE&LN)Z>Kty*;m= zt{Cn0>Q3nk)`bR^{dVf!3ECg6Yz4YcskI>$XH*L8E)MsudhnkP0B>+M(XEcErHUBKi~ z1`fEP&WPhp{@Ew?cPlR(ma9iw8NbJWHqp=btCtM*FnP*@ZwwlJ&-Y|LEjgvJzUtPc zz5CrWNBRV8d0-bpWAl<=zM1PU8lJseDxBK^QuuCj2fg{&2#*IG5ezf1B(o%lU+OZx7So4D?yi2*h zFBkr5pG3AJs83uy!~C3mQZLp~ss7-N9oAY>t)!eC#s)CrPukK!(!G*)H?v(~JCoj# zfvgTxMV{4?zL1neQ;ITVBAdFDf`1yG$o{g7^1sR_n{RZ7tnXio?tM%240}(z9xFY0 zlz{^-G*RET;-`7`>e0b{{`!2kM)t7Si9ZqD$~wh*hyGC>z~qs@0T&u*;h}hiKGEga zHkJ;%7aNc^o_0(>Z{Gp069H;TwPTUnvvX0SJ+kGGZ0lFBWocl>kaa)AoiMta+x_-J-?#KHFnJ*! zwD1V?)4s#|?O)DlMBhVv4IgZs?d>b<6%xK3<{o91H?-%8?PK!_fm#3d>{{gQ z?*8`b{G6?bZKdO{_9IVlz{R$PcGjeL|3*|@upby()_Lf^eQ&XQe)CjsbJ3Uolrgt< zweld3GH|fZpn(=1@PencO_a_)v6tU?WV-w8wfXLbOGae0{<*C?Ead$6v+> z|EQKThJTmwXK!c6AOD+FgtDv7i<48{-OPce!KDVkzR+XKOcREPha(;$}iUb!*)f-Fb}Y4@r9z-_{OIg z`xn^T#ZtEPv_T$M*Sr+=Z{q#~8$|7Y{0!*2u${D*Jj%dfOrS~FzpH*_|55J!7kl4w z?LT!7T(!3!632pmZh?dh`n-z$_ts42pn6;c`}hx;TSYd0idsqal5&0uGV=UM{c9xQ z1KK6&TS+a^H|6B_hPo1W3 zh+Dun!`UkP%H3}*@IE18q{7&MH2f3?T6o}Jf+xI@fh=SyUOArw`*w1_-PUlHZTHc@ z--yqIxPtI}IjPRzLIZ8cPv4P=>?A&=E~~0)>&J#V;TwAR*6}`01iu~U$@prtzW6YS ze}E>gUX+0YuF}B+Uhw2x7a7Q+oOzMNFHTNN<)40Rzg#`pABKF18@l}5A>RL`?Ri;Z zC8ExD$)im1@R{N7(wIog8$Yn(6%q$yd9(zKe};OnH%;mWBs7)>ls~T3Wi6!Xqw6+dpJLVS1P| z9qV%io-nE*rYcPxiS31>U_>mbPTXxkC*!?*zefr#2vF|qr8{|4|u^7-pD|f z&OPc->UKu)=iHgIpysp;Lsbyj}GJWoBkufOA={CRTUjr%af zc5pUH9{pg?M5%+)oN`q9yBbBt@+3xHV)qGm8b)Cp-w7~CwEhtBUk0rbjrqM zTb|tQ3-5-pw^cul`T+X&s?O;?V(FD!(Q9Qg@(LTCNz{0-vBM^SX5lti3|GpxFn4;Ax6pGc~t)R!Bo${lYH(* z!F&5X*?S&}YoDCyzwv1H+XI(+rL`;RN9}iLxlfr-r&vGG8OQa@=>+a)+Ij)sd_{wu z1Am(+3-RFr4&N8N6+hqo19S#;SA1-hG>07p3}&*j4CR+rqdV)^6n; z_vFr!(a%-=#=kb{pYmNL@6|DWkw~%E2V2jYl*e1}c{e$fib?(O+hs}eoBLRo&9(;J}YV}0Mi;LZAe{U$(s= zT<-IaV$Z+q-P!~3{HxN>Kbw30jXzM&I(S<6Ksx^}HvU2Vntb!etSsm0>)j}Me^+L5{2yz--)?W`Q?az z!WLG4UNP}+#C+NKH+ZG-Q=E>IPp%LuKLx$$8NAOGr(#~P>!EA zDYlpXDR=xM?Xv5(-qp74Cw3LzBeASHSBY`OezkbOyjP!G%WSymju_C$VBl--z;dur=;desc="},"core/sdk/ServerTiming.ts | duplicateParameterSIgnored":{"message":"Duplicate parameter \"{PH1}\" ignored."},"core/sdk/ServerTiming.ts | extraneousTrailingCharacters":{"message":"Extraneous trailing characters."},"core/sdk/ServerTiming.ts | noValueFoundForParameterS":{"message":"No value found for parameter \"{PH1}\"."},"core/sdk/ServerTiming.ts | unableToParseSValueS":{"message":"Unable to parse \"{PH1}\" value \"{PH2}\"."},"core/sdk/ServerTiming.ts | unrecognizedParameterS":{"message":"Unrecognized parameter \"{PH1}\"."},"core/sdk/ServiceWorkerCacheModel.ts | serviceworkercacheagentError":{"message":"ServiceWorkerCacheAgent error deleting cache entry {PH1} in cache: {PH2}"},"core/sdk/ServiceWorkerManager.ts | activated":{"message":"activated"},"core/sdk/ServiceWorkerManager.ts | activating":{"message":"activating"},"core/sdk/ServiceWorkerManager.ts | installed":{"message":"installed"},"core/sdk/ServiceWorkerManager.ts | installing":{"message":"installing"},"core/sdk/ServiceWorkerManager.ts | new":{"message":"new"},"core/sdk/ServiceWorkerManager.ts | redundant":{"message":"redundant"},"core/sdk/ServiceWorkerManager.ts | running":{"message":"running"},"core/sdk/ServiceWorkerManager.ts | sSS":{"message":"{PH1} #{PH2} ({PH3})"},"core/sdk/ServiceWorkerManager.ts | starting":{"message":"starting"},"core/sdk/ServiceWorkerManager.ts | stopped":{"message":"stopped"},"core/sdk/ServiceWorkerManager.ts | stopping":{"message":"stopping"},"entrypoints/inspector_main/inspector_main-meta.ts | autoOpenDevTools":{"message":"Auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | blockAds":{"message":"Block ads on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | colorVisionDeficiency":{"message":"color vision deficiency"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaFeature":{"message":"CSS media feature"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaType":{"message":"CSS media type"},"entrypoints/inspector_main/inspector_main-meta.ts | disablePaused":{"message":"Disable paused state overlay"},"entrypoints/inspector_main/inspector_main-meta.ts | doNotAutoOpen":{"message":"Do not auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | forceAdBlocking":{"message":"Force ad blocking on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | fps":{"message":"fps"},"entrypoints/inspector_main/inspector_main-meta.ts | hardReloadPage":{"message":"Hard reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | layout":{"message":"layout"},"entrypoints/inspector_main/inspector_main-meta.ts | paint":{"message":"paint"},"entrypoints/inspector_main/inspector_main-meta.ts | reloadPage":{"message":"Reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | rendering":{"message":"Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | showAds":{"message":"Show ads on this site, if allowed"},"entrypoints/inspector_main/inspector_main-meta.ts | showRendering":{"message":"Show Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia":{"message":"Toggle CSS media feature prefers-color-scheme"},"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency":{"message":"vision deficiency"},"entrypoints/inspector_main/InspectorMain.ts | javascriptIsDisabled":{"message":"JavaScript is disabled"},"entrypoints/inspector_main/InspectorMain.ts | main":{"message":"Main"},"entrypoints/inspector_main/InspectorMain.ts | openDedicatedTools":{"message":"Open dedicated DevTools for Node.js"},"entrypoints/inspector_main/InspectorMain.ts | tab":{"message":"Tab"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetNotSelected":{"message":"Page: Not selected"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetS":{"message":"Page: {PH1}"},"entrypoints/inspector_main/RenderingOptions.ts | coreWebVitals":{"message":"Core Web Vitals"},"entrypoints/inspector_main/RenderingOptions.ts | disableAvifImageFormat":{"message":"Disable AVIF image format"},"entrypoints/inspector_main/RenderingOptions.ts | disableLocalFonts":{"message":"Disable local fonts"},"entrypoints/inspector_main/RenderingOptions.ts | disablesLocalSourcesInFontface":{"message":"Disables local() sources in @font-face rules. Requires a page reload to apply."},"entrypoints/inspector_main/RenderingOptions.ts | disableWebpImageFormat":{"message":"Disable WebP image format"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAutoDarkMode":{"message":"Enable automatic dark mode"},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAFocusedPage":{"message":"Emulates a focused page."},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAutoDarkMode":{"message":"Enables automatic dark mode and sets prefers-color-scheme to dark."},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature":{"message":"Forces CSS color-gamut media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors":{"message":"Forces CSS forced-colors media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia":{"message":"Forces CSS prefers-color-scheme media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscontrastMedia":{"message":"Forces CSS prefers-contrast media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreduceddataMedia":{"message":"Forces CSS prefers-reduced-data media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedmotion":{"message":"Forces CSS prefers-reduced-motion media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesMediaTypeForTestingPrint":{"message":"Forces media type for testing print and screen styles"},"entrypoints/inspector_main/RenderingOptions.ts | forcesVisionDeficiencyEmulation":{"message":"Forces vision deficiency emulation"},"entrypoints/inspector_main/RenderingOptions.ts | frameRenderingStats":{"message":"Frame Rendering Stats"},"entrypoints/inspector_main/RenderingOptions.ts | highlightAdFrames":{"message":"Highlight ad frames"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageBlueThat":{"message":"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageGreen":{"message":"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsElementsTealThatCan":{"message":"Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsFramesRedDetectedToBe":{"message":"Highlights frames (red) detected to be ads."},"entrypoints/inspector_main/RenderingOptions.ts | layerBorders":{"message":"Layer borders"},"entrypoints/inspector_main/RenderingOptions.ts | layoutShiftRegions":{"message":"Layout Shift Regions"},"entrypoints/inspector_main/RenderingOptions.ts | paintFlashing":{"message":"Paint flashing"},"entrypoints/inspector_main/RenderingOptions.ts | plotsFrameThroughputDropped":{"message":"Plots frame throughput, dropped frames distribution, and GPU memory."},"entrypoints/inspector_main/RenderingOptions.ts | requiresAPageReloadToApplyAnd":{"message":"Requires a page reload to apply and disables caching for image requests."},"entrypoints/inspector_main/RenderingOptions.ts | scrollingPerformanceIssues":{"message":"Scrolling performance issues"},"entrypoints/inspector_main/RenderingOptions.ts | showsAnOverlayWithCoreWebVitals":{"message":"Shows an overlay with Core Web Vitals."},"entrypoints/inspector_main/RenderingOptions.ts | showsLayerBordersOrangeoliveAnd":{"message":"Shows layer borders (orange/olive) and tiles (cyan)."},"entrypoints/js_app/js_app.ts | main":{"message":"Main"},"entrypoints/main/main-meta.ts | asAuthored":{"message":"As authored"},"entrypoints/main/main-meta.ts | auto":{"message":"auto"},"entrypoints/main/main-meta.ts | bottom":{"message":"Bottom"},"entrypoints/main/main-meta.ts | browserLanguage":{"message":"Browser UI language"},"entrypoints/main/main-meta.ts | cancelSearch":{"message":"Cancel search"},"entrypoints/main/main-meta.ts | colorFormat":{"message":"Color format:"},"entrypoints/main/main-meta.ts | colorFormatSettingDisabled":{"message":"This setting is deprecated because it is incompatible with modern color spaces. To re-enable it, disable the corresponding experiment."},"entrypoints/main/main-meta.ts | darkCapital":{"message":"Dark"},"entrypoints/main/main-meta.ts | darkLower":{"message":"dark"},"entrypoints/main/main-meta.ts | devtoolsDefault":{"message":"DevTools (Default)"},"entrypoints/main/main-meta.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/main-meta.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/main-meta.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/main-meta.ts | enableCtrlShortcutToSwitchPanels":{"message":"Enable Ctrl + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableShortcutToSwitchPanels":{"message":"Enable ⌘ + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableSync":{"message":"Enable settings sync"},"entrypoints/main/main-meta.ts | findNextResult":{"message":"Find next result"},"entrypoints/main/main-meta.ts | findPreviousResult":{"message":"Find previous result"},"entrypoints/main/main-meta.ts | focusDebuggee":{"message":"Focus debuggee"},"entrypoints/main/main-meta.ts | horizontal":{"message":"horizontal"},"entrypoints/main/main-meta.ts | language":{"message":"Language:"},"entrypoints/main/main-meta.ts | left":{"message":"Left"},"entrypoints/main/main-meta.ts | lightCapital":{"message":"Light"},"entrypoints/main/main-meta.ts | lightLower":{"message":"light"},"entrypoints/main/main-meta.ts | nextPanel":{"message":"Next panel"},"entrypoints/main/main-meta.ts | panelLayout":{"message":"Panel layout:"},"entrypoints/main/main-meta.ts | previousPanel":{"message":"Previous panel"},"entrypoints/main/main-meta.ts | reloadDevtools":{"message":"Reload DevTools"},"entrypoints/main/main-meta.ts | resetZoomLevel":{"message":"Reset zoom level"},"entrypoints/main/main-meta.ts | restoreLastDockPosition":{"message":"Restore last dock position"},"entrypoints/main/main-meta.ts | right":{"message":"Right"},"entrypoints/main/main-meta.ts | searchAsYouTypeCommand":{"message":"Enable search as you type"},"entrypoints/main/main-meta.ts | searchAsYouTypeSetting":{"message":"Search as you type"},"entrypoints/main/main-meta.ts | searchInPanel":{"message":"Search in panel"},"entrypoints/main/main-meta.ts | searchOnEnterCommand":{"message":"Disable search as you type (press Enter to search)"},"entrypoints/main/main-meta.ts | setColorFormatAsAuthored":{"message":"Set color format as authored"},"entrypoints/main/main-meta.ts | setColorFormatToHex":{"message":"Set color format to HEX"},"entrypoints/main/main-meta.ts | setColorFormatToHsl":{"message":"Set color format to HSL"},"entrypoints/main/main-meta.ts | setColorFormatToRgb":{"message":"Set color format to RGB"},"entrypoints/main/main-meta.ts | switchToDarkTheme":{"message":"Switch to dark theme"},"entrypoints/main/main-meta.ts | switchToLightTheme":{"message":"Switch to light theme"},"entrypoints/main/main-meta.ts | switchToSystemPreferredColor":{"message":"Switch to system preferred color theme"},"entrypoints/main/main-meta.ts | systemPreference":{"message":"System preference"},"entrypoints/main/main-meta.ts | theme":{"message":"Theme:"},"entrypoints/main/main-meta.ts | toggleDrawer":{"message":"Toggle drawer"},"entrypoints/main/main-meta.ts | undocked":{"message":"Undocked"},"entrypoints/main/main-meta.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/main/main-meta.ts | useAutomaticPanelLayout":{"message":"Use automatic panel layout"},"entrypoints/main/main-meta.ts | useHorizontalPanelLayout":{"message":"Use horizontal panel layout"},"entrypoints/main/main-meta.ts | useVerticalPanelLayout":{"message":"Use vertical panel layout"},"entrypoints/main/main-meta.ts | vertical":{"message":"vertical"},"entrypoints/main/main-meta.ts | zoomIn":{"message":"Zoom in"},"entrypoints/main/main-meta.ts | zoomOut":{"message":"Zoom out"},"entrypoints/main/MainImpl.ts | customizeAndControlDevtools":{"message":"Customize and control DevTools"},"entrypoints/main/MainImpl.ts | dockSide":{"message":"Dock side"},"entrypoints/main/MainImpl.ts | dockSideNaviation":{"message":"Use left and right arrow keys to navigate the options"},"entrypoints/main/MainImpl.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/MainImpl.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/MainImpl.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/MainImpl.ts | focusDebuggee":{"message":"Focus debuggee"},"entrypoints/main/MainImpl.ts | help":{"message":"Help"},"entrypoints/main/MainImpl.ts | hideConsoleDrawer":{"message":"Hide console drawer"},"entrypoints/main/MainImpl.ts | moreTools":{"message":"More tools"},"entrypoints/main/MainImpl.ts | placementOfDevtoolsRelativeToThe":{"message":"Placement of DevTools relative to the page. ({PH1} to restore last position)"},"entrypoints/main/MainImpl.ts | showConsoleDrawer":{"message":"Show console drawer"},"entrypoints/main/MainImpl.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/node_app/node_app.ts | connection":{"message":"Connection"},"entrypoints/node_app/node_app.ts | networkTitle":{"message":"Node"},"entrypoints/node_app/node_app.ts | node":{"message":"node"},"entrypoints/node_app/node_app.ts | showConnection":{"message":"Show Connection"},"entrypoints/node_app/node_app.ts | showNode":{"message":"Show Node"},"entrypoints/node_app/NodeConnectionsPanel.ts | addConnection":{"message":"Add connection"},"entrypoints/node_app/NodeConnectionsPanel.ts | networkAddressEgLocalhost":{"message":"Network address (e.g. localhost:9229)"},"entrypoints/node_app/NodeConnectionsPanel.ts | noConnectionsSpecified":{"message":"No connections specified"},"entrypoints/node_app/NodeConnectionsPanel.ts | nodejsDebuggingGuide":{"message":"Node.js debugging guide"},"entrypoints/node_app/NodeConnectionsPanel.ts | specifyNetworkEndpointAnd":{"message":"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more."},"entrypoints/node_app/NodeMain.ts | main":{"message":"Main"},"entrypoints/node_app/NodeMain.ts | nodejsS":{"message":"Node.js: {PH1}"},"entrypoints/worker_app/WorkerMain.ts | main":{"message":"Main"},"generated/Deprecation.ts | AuthorizationCoveredByWildcard":{"message":"Authorization will not be covered by the wildcard symbol (*) in CORS Access-Control-Allow-Headers handling."},"generated/Deprecation.ts | CanRequestURLHTTPContainingNewline":{"message":"Resource requests whose URLs contained both removed whitespace \\(n|r|t) characters and less-than characters (<) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources."},"generated/Deprecation.ts | ChromeLoadTimesConnectionInfo":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Navigation Timing 2."},"generated/Deprecation.ts | ChromeLoadTimesFirstPaintAfterLoadTime":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Paint Timing."},"generated/Deprecation.ts | ChromeLoadTimesWasAlternateProtocolAvailable":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2."},"generated/Deprecation.ts | CookieWithTruncatingChar":{"message":"Cookies containing a \\(0|r|n) character will be rejected instead of truncated."},"generated/Deprecation.ts | CrossOriginAccessBasedOnDocumentDomain":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting document.domain."},"generated/Deprecation.ts | CrossOriginWindowAlert":{"message":"Triggering window.alert from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CrossOriginWindowConfirm":{"message":"Triggering window.confirm from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CSSSelectorInternalMediaControlsOverlayCastButton":{"message":"The disableRemotePlayback attribute should be used in order to disable the default Cast integration instead of using -internal-media-controls-overlay-cast-button selector."},"generated/Deprecation.ts | DataUrlInSvgUse":{"message":"Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future."},"generated/Deprecation.ts | DocumentDomainSettingWithoutOriginAgentClusterHeader":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. To continue using this feature, please opt-out of origin-keyed agent clusters by sending an Origin-Agent-Cluster: ?0 header along with the HTTP response for the document and frames. See https://developer.chrome.com/blog/immutable-document-domain/ for more details."},"generated/Deprecation.ts | DOMMutationEvents":{"message":"DOM Mutation Events, including DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMNodeInsertedIntoDocument, and DOMCharacterDataModified are deprecated (https://w3c.github.io/uievents/#legacy-event-types) and will be removed. Please use MutationObserver instead."},"generated/Deprecation.ts | ExpectCTHeader":{"message":"The Expect-CT header is deprecated and will be removed. Chrome requires Certificate Transparency for all publicly trusted certificates issued after April 30, 2018."},"generated/Deprecation.ts | GeolocationInsecureOrigin":{"message":"getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GeolocationInsecureOriginDeprecatedNotRemoved":{"message":"getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GetUserMediaInsecureOrigin":{"message":"getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | HostCandidateAttributeGetter":{"message":"RTCPeerConnectionIceErrorEvent.hostCandidate is deprecated. Please use RTCPeerConnectionIceErrorEvent.address or RTCPeerConnectionIceErrorEvent.port instead."},"generated/Deprecation.ts | IdentityInCanMakePaymentEvent":{"message":"The merchant origin and arbitrary data from the canmakepayment service worker event are deprecated and will be removed: topOrigin, paymentRequestOrigin, methodData, modifiers."},"generated/Deprecation.ts | InsecurePrivateNetworkSubresourceRequest":{"message":"The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them."},"generated/Deprecation.ts | InterestGroupDailyUpdateUrl":{"message":"The dailyUpdateUrl field of InterestGroups passed to joinAdInterestGroup() has been renamed to updateUrl, to more accurately reflect its behavior."},"generated/Deprecation.ts | LocalCSSFileExtensionRejected":{"message":"CSS cannot be loaded from file: URLs unless they end in a .css file extension."},"generated/Deprecation.ts | MediaSourceAbortRemove":{"message":"Using SourceBuffer.abort() to abort remove()'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the updateend event instead. abort() is intended to only abort an asynchronous media append or reset parser state."},"generated/Deprecation.ts | MediaSourceDurationTruncatingBuffered":{"message":"Setting MediaSource.duration below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration."},"generated/Deprecation.ts | NonStandardDeclarativeShadowDOM":{"message":"The older, non-standardized shadowroot attribute is deprecated, and will *no longer function* in M119. Please use the new, standardized shadowrootmode attribute instead."},"generated/Deprecation.ts | NoSysexWebMIDIWithoutPermission":{"message":"Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions."},"generated/Deprecation.ts | NotificationInsecureOrigin":{"message":"The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | NotificationPermissionRequestedIframe":{"message":"Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead."},"generated/Deprecation.ts | ObsoleteCreateImageBitmapImageOrientationNone":{"message":"Option imageOrientation: 'none' in createImageBitmap is deprecated. Please use createImageBitmap with option {imageOrientation: 'from-image'} instead."},"generated/Deprecation.ts | ObsoleteWebRtcCipherSuite":{"message":"Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed."},"generated/Deprecation.ts | OverflowVisibleOnReplacedElement":{"message":"Specifying overflow: visible on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md."},"generated/Deprecation.ts | PaymentInstruments":{"message":"paymentManager.instruments is deprecated. Please use just-in-time install for payment handlers instead."},"generated/Deprecation.ts | PaymentRequestCSPViolation":{"message":"Your PaymentRequest call bypassed Content-Security-Policy (CSP) connect-src directive. This bypass is deprecated. Please add the payment method identifier from the PaymentRequest API (in supportedMethods field) to your CSP connect-src directive."},"generated/Deprecation.ts | PersistentQuotaType":{"message":"StorageType.persistent is deprecated. Please use standardized navigator.storage instead."},"generated/Deprecation.ts | PictureSourceSrc":{"message":" with a parent is invalid and therefore ignored. Please use instead."},"generated/Deprecation.ts | PrefixedCancelAnimationFrame":{"message":"webkitCancelAnimationFrame is vendor-specific. Please use the standard cancelAnimationFrame instead."},"generated/Deprecation.ts | PrefixedRequestAnimationFrame":{"message":"webkitRequestAnimationFrame is vendor-specific. Please use the standard requestAnimationFrame instead."},"generated/Deprecation.ts | PrefixedVideoDisplayingFullscreen":{"message":"HTMLVideoElement.webkitDisplayingFullscreen is deprecated. Please use Document.fullscreenElement instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullscreen":{"message":"HTMLVideoElement.webkitEnterFullscreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullScreen":{"message":"HTMLVideoElement.webkitEnterFullScreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullscreen":{"message":"HTMLVideoElement.webkitExitFullscreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullScreen":{"message":"HTMLVideoElement.webkitExitFullScreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoSupportsFullscreen":{"message":"HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead."},"generated/Deprecation.ts | PrivacySandboxExtensionsAPI":{"message":"We're deprecating the API chrome.privacy.websites.privacySandboxEnabled, though it will remain active for backward compatibility until release M113. Instead, please use chrome.privacy.websites.topicsEnabled, chrome.privacy.websites.fledgeEnabled and chrome.privacy.websites.adMeasurementEnabled. See https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled."},"generated/Deprecation.ts | RangeExpand":{"message":"Range.expand() is deprecated. Please use Selection.modify() instead."},"generated/Deprecation.ts | RequestedSubresourceWithEmbeddedCredentials":{"message":"Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/) are blocked."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpFalse":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a false value for this constraint, which is interpreted as an attempt to use the removed SDES key negotiation method. This functionality is removed; use a service that supports DTLS key negotiation instead."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpTrue":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a true value for this constraint, which had no effect, but you can remove this constraint for tidiness."},"generated/Deprecation.ts | RTCPeerConnectionGetStatsLegacyNonCompliant":{"message":"The callback-based getStats() is deprecated and will be removed. Use the spec-compliant getStats() instead."},"generated/Deprecation.ts | RtcpMuxPolicyNegotiate":{"message":"The rtcpMuxPolicy option is deprecated and will be removed."},"generated/Deprecation.ts | SharedArrayBufferConstructedWithoutIsolation":{"message":"SharedArrayBuffer will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details."},"generated/Deprecation.ts | TextToSpeech_DisallowedByAutoplay":{"message":"speechSynthesis.speak() without user activation is deprecated and will be removed."},"generated/Deprecation.ts | V8SharedArrayBufferConstructedInExtensionWithoutIsolation":{"message":"Extensions should opt into cross-origin isolation to continue using SharedArrayBuffer. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/."},"generated/Deprecation.ts | WebSQL":{"message":"Web SQL is deprecated. Please use SQLite WebAssembly or Indexed Database"},"generated/Deprecation.ts | WindowPlacementPermissionDescriptorUsed":{"message":"The permission descriptor window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | WindowPlacementPermissionPolicyParsed":{"message":"The permission policy window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | XHRJSONEncodingDetection":{"message":"UTF-16 is not supported by response json in XMLHttpRequest"},"generated/Deprecation.ts | XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload":{"message":"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."},"generated/Deprecation.ts | XRSupportsSession":{"message":"supportsSession() is deprecated. Please use isSessionSupported() and check the resolved boolean value instead."},"models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile":{"message":"Unknown error loading file"},"models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete":{"message":"The debug information for function {PH1} is incomplete"},"models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin":{"message":"Error in debugger language plugin: {PH1}"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsFor":{"message":"[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction":{"message":"No debug information for function \"{PH1}\""},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt":{"message":"[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForFound":{"message":"[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsFor":{"message":"[{PH1}] Loading debug symbols for {PH2}..."},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia":{"message":"[{PH1}] Loading debug symbols for {PH2} (via {PH3})..."},"models/bindings/IgnoreListManager.ts | addAllContentScriptsToIgnoreList":{"message":"Add all extension scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addAllThirdPartyScriptsToIgnoreList":{"message":"Add all third-party scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addDirectoryToIgnoreList":{"message":"Add directory to ignore list"},"models/bindings/IgnoreListManager.ts | addScriptToIgnoreList":{"message":"Add script to ignore list"},"models/bindings/IgnoreListManager.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed":{"message":"LiveEdit compile failed: {PH1}"},"models/bindings/ResourceScriptMapping.ts | liveEditFailed":{"message":"LiveEdit failed: {PH1}"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeANumberOr":{"message":"Device pixel ratio must be a number or blank."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeGreater":{"message":"Device pixel ratio must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeLessThanOr":{"message":"Device pixel ratio must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeANumber":{"message":"Height must be a number."},"models/emulation/DeviceModeModel.ts | heightMustBeGreaterThanOrEqualTo":{"message":"Height must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeLessThanOrEqualToS":{"message":"Height must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeANumber":{"message":"Width must be a number."},"models/emulation/DeviceModeModel.ts | widthMustBeGreaterThanOrEqualToS":{"message":"Width must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeLessThanOrEqualToS":{"message":"Width must be less than or equal to {PH1}."},"models/emulation/EmulatedDevices.ts | laptopWithHiDPIScreen":{"message":"Laptop with HiDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithMDPIScreen":{"message":"Laptop with MDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithTouch":{"message":"Laptop with touch"},"models/har/Writer.ts | collectingContent":{"message":"Collecting content…"},"models/har/Writer.ts | writingFile":{"message":"Writing file…"},"models/issues_manager/BounceTrackingIssue.ts | bounceTrackingMitigations":{"message":"Bounce Tracking Mitigations"},"models/issues_manager/ClientHintIssue.ts | clientHintsInfrastructure":{"message":"Client Hints Infrastructure"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyEval":{"message":"Content Security Policy - Eval"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyInlineCode":{"message":"Content Security Policy - Inline Code"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicySource":{"message":"Content Security Policy - Source Allowlists"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesFixViolations":{"message":"Trusted Types - Fix violations"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesPolicyViolation":{"message":"Trusted Types - Policy violation"},"models/issues_manager/CookieIssue.ts | anInsecure":{"message":"an insecure"},"models/issues_manager/CookieIssue.ts | aSecure":{"message":"a secure"},"models/issues_manager/CookieIssue.ts | firstPartySetsExplained":{"message":"First-Party Sets and the SameParty attribute"},"models/issues_manager/CookieIssue.ts | howSchemefulSamesiteWorks":{"message":"How Schemeful Same-Site Works"},"models/issues_manager/CookieIssue.ts | samesiteCookiesExplained":{"message":"SameSite cookies explained"},"models/issues_manager/CorsIssue.ts | CORS":{"message":"Cross-Origin Resource Sharing (CORS)"},"models/issues_manager/CorsIssue.ts | corsPrivateNetworkAccess":{"message":"Private Network Access"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | coopAndCoep":{"message":"COOP and COEP"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | samesiteAndSameorigin":{"message":"Same-Site and Same-Origin"},"models/issues_manager/DeprecationIssue.ts | feature":{"message":"Check the feature status page for more details."},"models/issues_manager/DeprecationIssue.ts | milestone":{"message":"This change will go into effect with milestone {milestone}."},"models/issues_manager/DeprecationIssue.ts | title":{"message":"Deprecated Feature Used"},"models/issues_manager/FederatedAuthRequestIssue.ts | fedCm":{"message":"Federated Credential Management API"},"models/issues_manager/FederatedAuthUserInfoRequestIssue.ts | fedCmUserInfo":{"message":"Federated Credential Management User Info API"},"models/issues_manager/GenericIssue.ts | autocompleteAttributePageTitle":{"message":"HTML attribute: autocomplete"},"models/issues_manager/GenericIssue.ts | crossOriginPortalPostMessage":{"message":"Portals - Same-origin communication channels"},"models/issues_manager/GenericIssue.ts | howDoesAutofillWorkPageTitle":{"message":"How does autofill work?"},"models/issues_manager/GenericIssue.ts | inputFormElementPageTitle":{"message":"The form input element"},"models/issues_manager/GenericIssue.ts | labelFormlementsPageTitle":{"message":"The label elements"},"models/issues_manager/HeavyAdIssue.ts | handlingHeavyAdInterventions":{"message":"Handling Heavy Ad Interventions"},"models/issues_manager/Issue.ts | breakingChangeIssue":{"message":"A breaking change issue: the page may stop working in an upcoming version of Chrome"},"models/issues_manager/Issue.ts | breakingChanges":{"message":"Breaking Changes"},"models/issues_manager/Issue.ts | improvementIssue":{"message":"An improvement issue: there is an opportunity to improve the page"},"models/issues_manager/Issue.ts | improvements":{"message":"Improvements"},"models/issues_manager/Issue.ts | pageErrorIssue":{"message":"A page error issue: the page is not working correctly"},"models/issues_manager/Issue.ts | pageErrors":{"message":"Page Errors"},"models/issues_manager/LowTextContrastIssue.ts | colorAndContrastAccessibility":{"message":"Color and contrast accessibility"},"models/issues_manager/MixedContentIssue.ts | preventingMixedContent":{"message":"Preventing mixed content"},"models/issues_manager/QuirksModeIssue.ts | documentCompatibilityMode":{"message":"Document compatibility mode"},"models/issues_manager/SharedArrayBufferIssue.ts | enablingSharedArrayBuffer":{"message":"Enabling SharedArrayBuffer"},"models/logs/logs-meta.ts | clear":{"message":"clear"},"models/logs/logs-meta.ts | doNotPreserveLogOnPageReload":{"message":"Do not preserve log on page reload / navigation"},"models/logs/logs-meta.ts | preserve":{"message":"preserve"},"models/logs/logs-meta.ts | preserveLog":{"message":"Preserve log"},"models/logs/logs-meta.ts | preserveLogOnPageReload":{"message":"Preserve log on page reload / navigation"},"models/logs/logs-meta.ts | recordNetworkLog":{"message":"Record network log"},"models/logs/logs-meta.ts | reset":{"message":"reset"},"models/logs/NetworkLog.ts | anonymous":{"message":""},"models/persistence/EditFileSystemView.ts | add":{"message":"Add"},"models/persistence/EditFileSystemView.ts | enterAPath":{"message":"Enter a path"},"models/persistence/EditFileSystemView.ts | enterAUniquePath":{"message":"Enter a unique path"},"models/persistence/EditFileSystemView.ts | excludedFolders":{"message":"Excluded folders"},"models/persistence/EditFileSystemView.ts | folderPath":{"message":"Folder path"},"models/persistence/EditFileSystemView.ts | none":{"message":"None"},"models/persistence/EditFileSystemView.ts | sViaDevtools":{"message":"{PH1} (via .devtools)"},"models/persistence/IsolatedFileSystem.ts | blobCouldNotBeLoaded":{"message":"Blob could not be loaded."},"models/persistence/IsolatedFileSystem.ts | cantReadFileSS":{"message":"Can't read file: {PH1}: {PH2}"},"models/persistence/IsolatedFileSystem.ts | fileSystemErrorS":{"message":"File system error: {PH1}"},"models/persistence/IsolatedFileSystem.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/IsolatedFileSystem.ts | unknownErrorReadingFileS":{"message":"Unknown error reading file: {PH1}"},"models/persistence/IsolatedFileSystemManager.ts | unableToAddFilesystemS":{"message":"Unable to add filesystem: {PH1}"},"models/persistence/persistence-meta.ts | disableOverrideNetworkRequests":{"message":"Disable override network requests"},"models/persistence/persistence-meta.ts | enableLocalOverrides":{"message":"Enable Local Overrides"},"models/persistence/persistence-meta.ts | enableOverrideNetworkRequests":{"message":"Enable override network requests"},"models/persistence/persistence-meta.ts | interception":{"message":"interception"},"models/persistence/persistence-meta.ts | network":{"message":"network"},"models/persistence/persistence-meta.ts | override":{"message":"override"},"models/persistence/persistence-meta.ts | request":{"message":"request"},"models/persistence/persistence-meta.ts | rewrite":{"message":"rewrite"},"models/persistence/persistence-meta.ts | showWorkspace":{"message":"Show Workspace"},"models/persistence/persistence-meta.ts | workspace":{"message":"Workspace"},"models/persistence/PersistenceActions.ts | openInContainingFolder":{"message":"Open in containing folder"},"models/persistence/PersistenceActions.ts | saveAs":{"message":"Save as..."},"models/persistence/PersistenceActions.ts | saveForOverrides":{"message":"Save for overrides"},"models/persistence/PersistenceActions.ts | saveImage":{"message":"Save image"},"models/persistence/PersistenceUtils.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/PersistenceUtils.ts | linkedToSourceMapS":{"message":"Linked to source map: {PH1}"},"models/persistence/PlatformFileSystem.ts | unableToReadFilesWithThis":{"message":"PlatformFileSystem cannot read files."},"models/persistence/WorkspaceSettingsTab.ts | addFolder":{"message":"Add folder…"},"models/persistence/WorkspaceSettingsTab.ts | folderExcludePattern":{"message":"Folder exclude pattern"},"models/persistence/WorkspaceSettingsTab.ts | mappingsAreInferredAutomatically":{"message":"Mappings are inferred automatically."},"models/persistence/WorkspaceSettingsTab.ts | remove":{"message":"Remove"},"models/persistence/WorkspaceSettingsTab.ts | workspace":{"message":"Workspace"},"models/timeline_model/TimelineJSProfile.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | bidderWorklet":{"message":"Bidder Worklet"},"models/timeline_model/TimelineModel.ts | bidderWorkletS":{"message":"Bidder Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | dedicatedWorker":{"message":"Dedicated Worker"},"models/timeline_model/TimelineModel.ts | sellerWorklet":{"message":"Seller Worklet"},"models/timeline_model/TimelineModel.ts | sellerWorkletS":{"message":"Seller Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | unknownWorklet":{"message":"Auction Worklet"},"models/timeline_model/TimelineModel.ts | unknownWorkletS":{"message":"Auction Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | workerS":{"message":"Worker — {PH1}"},"models/timeline_model/TimelineModel.ts | workerSS":{"message":"Worker: {PH1} — {PH2}"},"models/timeline_model/TimelineModel.ts | workletService":{"message":"Auction Worklet Service"},"models/timeline_model/TimelineModel.ts | workletServiceS":{"message":"Auction Worklet Service — {PH1}"},"models/workspace/UISourceCode.ts | index":{"message":"(index)"},"models/workspace/UISourceCode.ts | thisFileWasChangedExternally":{"message":"This file was changed externally. Would you like to reload it?"},"panels/accessibility/accessibility-meta.ts | accessibility":{"message":"Accessibility"},"panels/accessibility/accessibility-meta.ts | shoAccessibility":{"message":"Show Accessibility"},"panels/accessibility/AccessibilityNodeView.ts | accessibilityNodeNotExposed":{"message":"Accessibility node not exposed"},"panels/accessibility/AccessibilityNodeView.ts | ancestorChildrenAreAll":{"message":"Ancestor's children are all presentational: "},"panels/accessibility/AccessibilityNodeView.ts | computedProperties":{"message":"Computed Properties"},"panels/accessibility/AccessibilityNodeView.ts | elementHasEmptyAltText":{"message":"Element has empty alt text."},"panels/accessibility/AccessibilityNodeView.ts | elementHasPlaceholder":{"message":"Element has {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsHiddenBy":{"message":"Element is hidden by active modal dialog: "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInAnInertSubTree":{"message":"Element is in an inert subtree from "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInert":{"message":"Element is inert."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotRendered":{"message":"Element is not rendered."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotVisible":{"message":"Element is not visible."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPlaceholder":{"message":"Element is {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPresentational":{"message":"Element is presentational."},"panels/accessibility/AccessibilityNodeView.ts | elementNotInteresting":{"message":"Element not interesting for accessibility."},"panels/accessibility/AccessibilityNodeView.ts | elementsInheritsPresentational":{"message":"Element inherits presentational role from "},"panels/accessibility/AccessibilityNodeView.ts | invalidSource":{"message":"Invalid source."},"panels/accessibility/AccessibilityNodeView.ts | labelFor":{"message":"Label for "},"panels/accessibility/AccessibilityNodeView.ts | noAccessibilityNode":{"message":"No accessibility node"},"panels/accessibility/AccessibilityNodeView.ts | noNodeWithThisId":{"message":"No node with this ID."},"panels/accessibility/AccessibilityNodeView.ts | noTextContent":{"message":"No text content."},"panels/accessibility/AccessibilityNodeView.ts | notSpecified":{"message":"Not specified"},"panels/accessibility/AccessibilityNodeView.ts | partOfLabelElement":{"message":"Part of label element: "},"panels/accessibility/AccessibilityNodeView.ts | placeholderIsPlaceholderOnAncestor":{"message":"{PH1} is {PH2} on ancestor: "},"panels/accessibility/AccessibilityStrings.ts | activeDescendant":{"message":"Active descendant"},"panels/accessibility/AccessibilityStrings.ts | aHumanreadableVersionOfTheValue":{"message":"A human-readable version of the value of a range widget (where necessary)."},"panels/accessibility/AccessibilityStrings.ts | atomicLiveRegions":{"message":"Atomic (live regions)"},"panels/accessibility/AccessibilityStrings.ts | busyLiveRegions":{"message":"Busy (live regions)"},"panels/accessibility/AccessibilityStrings.ts | canSetValue":{"message":"Can set value"},"panels/accessibility/AccessibilityStrings.ts | checked":{"message":"Checked"},"panels/accessibility/AccessibilityStrings.ts | contents":{"message":"Contents"},"panels/accessibility/AccessibilityStrings.ts | controls":{"message":"Controls"},"panels/accessibility/AccessibilityStrings.ts | describedBy":{"message":"Described by"},"panels/accessibility/AccessibilityStrings.ts | description":{"message":"Description"},"panels/accessibility/AccessibilityStrings.ts | disabled":{"message":"Disabled"},"panels/accessibility/AccessibilityStrings.ts | editable":{"message":"Editable"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichFormThe":{"message":"Element or elements which form the description of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichMayFormThe":{"message":"Element or elements which may form the name of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichShouldBe":{"message":"Element or elements which should be considered descendants of this element, despite not being descendants in the DOM."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhoseContentOr":{"message":"Element or elements whose content or presence is/are controlled by this widget."},"panels/accessibility/AccessibilityStrings.ts | elementToWhichTheUserMayChooseTo":{"message":"Element to which the user may choose to navigate after this one, instead of the next element in the DOM order."},"panels/accessibility/AccessibilityStrings.ts | expanded":{"message":"Expanded"},"panels/accessibility/AccessibilityStrings.ts | focusable":{"message":"Focusable"},"panels/accessibility/AccessibilityStrings.ts | focused":{"message":"Focused"},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMaximumAllowed":{"message":"For a range widget, the maximum allowed value."},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMinimumAllowed":{"message":"For a range widget, the minimum allowed value."},"panels/accessibility/AccessibilityStrings.ts | fromAttribute":{"message":"From attribute"},"panels/accessibility/AccessibilityStrings.ts | fromCaption":{"message":"From caption"},"panels/accessibility/AccessibilityStrings.ts | fromDescription":{"message":"From description"},"panels/accessibility/AccessibilityStrings.ts | fromLabel":{"message":"From label"},"panels/accessibility/AccessibilityStrings.ts | fromLabelFor":{"message":"From label (for= attribute)"},"panels/accessibility/AccessibilityStrings.ts | fromLabelWrapped":{"message":"From label (wrapped)"},"panels/accessibility/AccessibilityStrings.ts | fromLegend":{"message":"From legend"},"panels/accessibility/AccessibilityStrings.ts | fromNativeHtml":{"message":"From native HTML"},"panels/accessibility/AccessibilityStrings.ts | fromPlaceholderAttribute":{"message":"From placeholder attribute"},"panels/accessibility/AccessibilityStrings.ts | fromRubyAnnotation":{"message":"From ruby annotation"},"panels/accessibility/AccessibilityStrings.ts | fromStyle":{"message":"From style"},"panels/accessibility/AccessibilityStrings.ts | fromTitle":{"message":"From title"},"panels/accessibility/AccessibilityStrings.ts | hasAutocomplete":{"message":"Has autocomplete"},"panels/accessibility/AccessibilityStrings.ts | hasPopup":{"message":"Has popup"},"panels/accessibility/AccessibilityStrings.ts | help":{"message":"Help"},"panels/accessibility/AccessibilityStrings.ts | ifAndHowThisElementCanBeEdited":{"message":"If and how this element can be edited."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLive":{"message":"If this element may receive live updates, whether the entire live region should be presented to the user on changes, or only changed nodes."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdates":{"message":"If this element may receive live updates, what type of updates should trigger a notification."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdatesThe":{"message":"If this element may receive live updates, the root element of the containing live region."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCanReceiveFocus":{"message":"If true, this element can receive focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyCannot":{"message":"If true, this element currently cannot be interacted with."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyHas":{"message":"If true, this element currently has focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementMayBeInteracted":{"message":"If true, this element may be interacted with, but its value cannot be changed."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementsUserentered":{"message":"If true, this element's user-entered value does not conform to validation requirement."},"panels/accessibility/AccessibilityStrings.ts | implicit":{"message":"Implicit"},"panels/accessibility/AccessibilityStrings.ts | implicitValue":{"message":"Implicit value."},"panels/accessibility/AccessibilityStrings.ts | indicatesThePurposeOfThisElement":{"message":"Indicates the purpose of this element, such as a user interface idiom for a widget, or structural role within a document."},"panels/accessibility/AccessibilityStrings.ts | invalidUserEntry":{"message":"Invalid user entry"},"panels/accessibility/AccessibilityStrings.ts | labeledBy":{"message":"Labeled by"},"panels/accessibility/AccessibilityStrings.ts | level":{"message":"Level"},"panels/accessibility/AccessibilityStrings.ts | liveRegion":{"message":"Live region"},"panels/accessibility/AccessibilityStrings.ts | liveRegionRoot":{"message":"Live region root"},"panels/accessibility/AccessibilityStrings.ts | maximumValue":{"message":"Maximum value"},"panels/accessibility/AccessibilityStrings.ts | minimumValue":{"message":"Minimum value"},"panels/accessibility/AccessibilityStrings.ts | multiline":{"message":"Multi-line"},"panels/accessibility/AccessibilityStrings.ts | multiselectable":{"message":"Multi-selectable"},"panels/accessibility/AccessibilityStrings.ts | orientation":{"message":"Orientation"},"panels/accessibility/AccessibilityStrings.ts | pressed":{"message":"Pressed"},"panels/accessibility/AccessibilityStrings.ts | readonlyString":{"message":"Read-only"},"panels/accessibility/AccessibilityStrings.ts | relatedElement":{"message":"Related element"},"panels/accessibility/AccessibilityStrings.ts | relevantLiveRegions":{"message":"Relevant (live regions)"},"panels/accessibility/AccessibilityStrings.ts | requiredString":{"message":"Required"},"panels/accessibility/AccessibilityStrings.ts | role":{"message":"Role"},"panels/accessibility/AccessibilityStrings.ts | selectedString":{"message":"Selected"},"panels/accessibility/AccessibilityStrings.ts | theAccessibleDescriptionForThis":{"message":"The accessible description for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedHelpTextForThis":{"message":"The computed help text for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedNameOfThisElement":{"message":"The computed name of this element."},"panels/accessibility/AccessibilityStrings.ts | theDescendantOfThisElementWhich":{"message":"The descendant of this element which is active; i.e. the element to which focus should be delegated."},"panels/accessibility/AccessibilityStrings.ts | theHierarchicalLevelOfThis":{"message":"The hierarchical level of this element."},"panels/accessibility/AccessibilityStrings.ts | theValueOfThisElementThisMayBe":{"message":"The value of this element; this may be user-provided or developer-provided, depending on the element."},"panels/accessibility/AccessibilityStrings.ts | value":{"message":"Value"},"panels/accessibility/AccessibilityStrings.ts | valueDescription":{"message":"Value description"},"panels/accessibility/AccessibilityStrings.ts | valueFromAttribute":{"message":"Value from attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromDescriptionElement":{"message":"Value from description element."},"panels/accessibility/AccessibilityStrings.ts | valueFromElementContents":{"message":"Value from element contents."},"panels/accessibility/AccessibilityStrings.ts | valueFromFigcaptionElement":{"message":"Value from figcaption element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElement":{"message":"Value from label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWithFor":{"message":"Value from label element with for= attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWrapped":{"message":"Value from a wrapping label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLegendElement":{"message":"Value from legend element."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlRuby":{"message":"Value from plain HTML ruby annotation."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlUnknownSource":{"message":"Value from native HTML (unknown source)."},"panels/accessibility/AccessibilityStrings.ts | valueFromPlaceholderAttribute":{"message":"Value from placeholder attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromRelatedElement":{"message":"Value from related element."},"panels/accessibility/AccessibilityStrings.ts | valueFromStyle":{"message":"Value from style."},"panels/accessibility/AccessibilityStrings.ts | valueFromTableCaption":{"message":"Value from table caption."},"panels/accessibility/AccessibilityStrings.ts | valueFromTitleAttribute":{"message":"Value from title attribute."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatPriorityOfLive":{"message":"Whether and what priority of live updates may be expected for this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatTypeOfAutocomplete":{"message":"Whether and what type of autocomplete suggestions are currently provided by this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAUserMaySelectMoreThanOne":{"message":"Whether a user may select more than one option from this widget."},"panels/accessibility/AccessibilityStrings.ts | whetherTheOptionRepresentedBy":{"message":"Whether the option represented by this element is currently selected."},"panels/accessibility/AccessibilityStrings.ts | whetherTheValueOfThisElementCan":{"message":"Whether the value of this element can be set."},"panels/accessibility/AccessibilityStrings.ts | whetherThisCheckboxRadioButtonOr":{"message":"Whether this checkbox, radio button or tree item is checked, unchecked, or mixed (e.g. has both checked and un-checked children)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementHasCausedSome":{"message":"Whether this element has caused some kind of pop-up (such as a menu) to appear."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementIsARequired":{"message":"Whether this element is a required field in a form."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrAnother":{"message":"Whether this element, or another grouping element it controls, is expanded."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrItsSubtree":{"message":"Whether this element or its subtree are currently being updated (and thus may be in an inconsistent state)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisLinearElements":{"message":"Whether this linear element's orientation is horizontal or vertical."},"panels/accessibility/AccessibilityStrings.ts | whetherThisTextBoxMayHaveMore":{"message":"Whether this text box may have more than one line."},"panels/accessibility/AccessibilityStrings.ts | whetherThisToggleButtonIs":{"message":"Whether this toggle button is currently in a pressed state."},"panels/accessibility/ARIAAttributesView.ts | ariaAttributes":{"message":"ARIA Attributes"},"panels/accessibility/ARIAAttributesView.ts | noAriaAttributes":{"message":"No ARIA attributes"},"panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree":{"message":"Accessibility Tree"},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription":{"message":"The accessibility tree moved to the top right corner of the DOM tree."},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName":{"message":"Enable full-page accessibility tree"},"panels/accessibility/AXBreadcrumbsPane.ts | ignored":{"message":"Ignored"},"panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired":{"message":"Reload required before the change takes effect."},"panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView":{"message":"Scroll into view"},"panels/accessibility/SourceOrderView.ts | noSourceOrderInformation":{"message":"No source order information available"},"panels/accessibility/SourceOrderView.ts | showSourceOrder":{"message":"Show source order"},"panels/accessibility/SourceOrderView.ts | sourceOrderViewer":{"message":"Source Order Viewer"},"panels/accessibility/SourceOrderView.ts | thereMayBeADelayInDisplaying":{"message":"There may be a delay in displaying source order for elements with many children"},"panels/animation/animation-meta.ts | animations":{"message":"Animations"},"panels/animation/animation-meta.ts | showAnimations":{"message":"Show Animations"},"panels/animation/AnimationTimeline.ts | animationPreviews":{"message":"Animation previews"},"panels/animation/AnimationTimeline.ts | animationPreviewS":{"message":"Animation Preview {PH1}"},"panels/animation/AnimationTimeline.ts | clearAll":{"message":"Clear all"},"panels/animation/AnimationTimeline.ts | pause":{"message":"Pause"},"panels/animation/AnimationTimeline.ts | pauseAll":{"message":"Pause all"},"panels/animation/AnimationTimeline.ts | pauseTimeline":{"message":"Pause timeline"},"panels/animation/AnimationTimeline.ts | playbackRatePlaceholder":{"message":"{PH1}%"},"panels/animation/AnimationTimeline.ts | playbackRates":{"message":"Playback rates"},"panels/animation/AnimationTimeline.ts | playTimeline":{"message":"Play timeline"},"panels/animation/AnimationTimeline.ts | replayTimeline":{"message":"Replay timeline"},"panels/animation/AnimationTimeline.ts | resumeAll":{"message":"Resume all"},"panels/animation/AnimationTimeline.ts | selectAnEffectAboveToInspectAnd":{"message":"Select an effect above to inspect and modify."},"panels/animation/AnimationTimeline.ts | setSpeedToS":{"message":"Set speed to {PH1}"},"panels/animation/AnimationTimeline.ts | waitingForAnimations":{"message":"Waiting for animations..."},"panels/animation/AnimationUI.ts | animationEndpointSlider":{"message":"Animation Endpoint slider"},"panels/animation/AnimationUI.ts | animationKeyframeSlider":{"message":"Animation Keyframe slider"},"panels/animation/AnimationUI.ts | sSlider":{"message":"{PH1} slider"},"panels/application/application-meta.ts | application":{"message":"Application"},"panels/application/application-meta.ts | clearSiteData":{"message":"Clear site data"},"panels/application/application-meta.ts | clearSiteDataIncludingThirdparty":{"message":"Clear site data (including third-party cookies)"},"panels/application/application-meta.ts | pwa":{"message":"pwa"},"panels/application/application-meta.ts | showApplication":{"message":"Show Application"},"panels/application/application-meta.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/application-meta.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/ApplicationPanelSidebar.ts | application":{"message":"Application"},"panels/application/ApplicationPanelSidebar.ts | applicationSidebarPanel":{"message":"Application panel sidebar"},"panels/application/ApplicationPanelSidebar.ts | appManifest":{"message":"App Manifest"},"panels/application/ApplicationPanelSidebar.ts | backgroundServices":{"message":"Background Services"},"panels/application/ApplicationPanelSidebar.ts | beforeInvokeAlert":{"message":"{PH1}: Invoke to scroll to this section in manifest"},"panels/application/ApplicationPanelSidebar.ts | clear":{"message":"Clear"},"panels/application/ApplicationPanelSidebar.ts | cookies":{"message":"Cookies"},"panels/application/ApplicationPanelSidebar.ts | cookiesUsedByFramesFromS":{"message":"Cookies used by frames from {PH1}"},"panels/application/ApplicationPanelSidebar.ts | documentNotAvailable":{"message":"Document not available"},"panels/application/ApplicationPanelSidebar.ts | frames":{"message":"Frames"},"panels/application/ApplicationPanelSidebar.ts | indexeddb":{"message":"IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | keyPathS":{"message":"Key path: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | localFiles":{"message":"Local Files"},"panels/application/ApplicationPanelSidebar.ts | localStorage":{"message":"Local Storage"},"panels/application/ApplicationPanelSidebar.ts | manifest":{"message":"Manifest"},"panels/application/ApplicationPanelSidebar.ts | noManifestDetected":{"message":"No manifest detected"},"panels/application/ApplicationPanelSidebar.ts | onInvokeAlert":{"message":"Scrolled to {PH1}"},"panels/application/ApplicationPanelSidebar.ts | onInvokeManifestAlert":{"message":"Manifest: Invoke to scroll to the top of manifest"},"panels/application/ApplicationPanelSidebar.ts | openedWindows":{"message":"Opened Windows"},"panels/application/ApplicationPanelSidebar.ts | preloading":{"message":"Preloading"},"panels/application/ApplicationPanelSidebar.ts | refreshIndexeddb":{"message":"Refresh IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | sessionStorage":{"message":"Session Storage"},"panels/application/ApplicationPanelSidebar.ts | storage":{"message":"Storage"},"panels/application/ApplicationPanelSidebar.ts | theContentOfThisDocumentHasBeen":{"message":"The content of this document has been generated dynamically via 'document.write()'."},"panels/application/ApplicationPanelSidebar.ts | versionS":{"message":"Version: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | versionSEmpty":{"message":"Version: {PH1} (empty)"},"panels/application/ApplicationPanelSidebar.ts | webSql":{"message":"Web SQL"},"panels/application/ApplicationPanelSidebar.ts | webWorkers":{"message":"Web Workers"},"panels/application/ApplicationPanelSidebar.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/ApplicationPanelSidebar.ts | worker":{"message":"worker"},"panels/application/AppManifestView.ts | actualHeightSpxOfSSDoesNotMatch":{"message":"Actual height ({PH1}px) of {PH2} {PH3} does not match specified height ({PH4}px)"},"panels/application/AppManifestView.ts | actualSizeSspxOfSSDoesNotMatch":{"message":"Actual size ({PH1}×{PH2})px of {PH3} {PH4} does not match specified size ({PH5}×{PH6}px)"},"panels/application/AppManifestView.ts | actualWidthSpxOfSSDoesNotMatch":{"message":"Actual width ({PH1}px) of {PH2} {PH3} does not match specified width ({PH4}px)"},"panels/application/AppManifestView.ts | appIdExplainer":{"message":"This is used by the browser to know whether the manifest should be updating an existing application, or whether it refers to a new web app that can be installed."},"panels/application/AppManifestView.ts | appIdNote":{"message":"{PH1} {PH2} is not specified in the manifest, {PH3} is used instead. To specify an App Id that matches the current identity, set the {PH4} field to {PH5} {PH6}."},"panels/application/AppManifestView.ts | aUrlInTheManifestContainsA":{"message":"A URL in the manifest contains a username, password, or port"},"panels/application/AppManifestView.ts | avoidPurposeAnyAndMaskable":{"message":"Declaring an icon with 'purpose: \"any maskable\"' is discouraged. It is likely to look incorrect on some platforms due to too much or too little padding."},"panels/application/AppManifestView.ts | backgroundColor":{"message":"Background color"},"panels/application/AppManifestView.ts | computedAppId":{"message":"Computed App Id"},"panels/application/AppManifestView.ts | copiedToClipboard":{"message":"Copied suggested ID {PH1} to clipboard"},"panels/application/AppManifestView.ts | copyToClipboard":{"message":"Copy to clipboard"},"panels/application/AppManifestView.ts | couldNotCheckServiceWorker":{"message":"Could not check service worker without a 'start_url' field in the manifest"},"panels/application/AppManifestView.ts | couldNotDownloadARequiredIcon":{"message":"Could not download a required icon from the manifest"},"panels/application/AppManifestView.ts | customizePwaTitleBar":{"message":"Customize the window controls overlay of your PWA's title bar."},"panels/application/AppManifestView.ts | darkBackgroundColor":{"message":"Dark background color"},"panels/application/AppManifestView.ts | darkThemeColor":{"message":"Dark theme color"},"panels/application/AppManifestView.ts | description":{"message":"Description"},"panels/application/AppManifestView.ts | descriptionMayBeTruncated":{"message":"Description may be truncated."},"panels/application/AppManifestView.ts | display":{"message":"Display"},"panels/application/AppManifestView.ts | displayOverride":{"message":"display-override"},"panels/application/AppManifestView.ts | documentationOnMaskableIcons":{"message":"documentation on maskable icons"},"panels/application/AppManifestView.ts | downloadedIconWasEmptyOr":{"message":"Downloaded icon was empty or corrupted"},"panels/application/AppManifestView.ts | errorsAndWarnings":{"message":"Errors and warnings"},"panels/application/AppManifestView.ts | icon":{"message":"Icon"},"panels/application/AppManifestView.ts | icons":{"message":"Icons"},"panels/application/AppManifestView.ts | identity":{"message":"Identity"},"panels/application/AppManifestView.ts | imageFromS":{"message":"Image from {PH1}"},"panels/application/AppManifestView.ts | installability":{"message":"Installability"},"panels/application/AppManifestView.ts | learnMore":{"message":"Learn more"},"panels/application/AppManifestView.ts | manifestContainsDisplayoverride":{"message":"Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestCouldNotBeFetchedIsEmpty":{"message":"Manifest could not be fetched, is empty, or could not be parsed"},"panels/application/AppManifestView.ts | manifestDisplayPropertyMustBeOne":{"message":"Manifest 'display' property must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestDoesNotContainANameOr":{"message":"Manifest does not contain a 'name' or 'short_name' field"},"panels/application/AppManifestView.ts | manifestDoesNotContainASuitable":{"message":"Manifest does not contain a suitable icon - PNG, SVG or WebP format of at least {PH1}px is required, the 'sizes' attribute must be set, and the 'purpose' attribute, if set, must include 'any'."},"panels/application/AppManifestView.ts | manifestSpecifies":{"message":"Manifest specifies 'prefer_related_applications: true'"},"panels/application/AppManifestView.ts | manifestStartUrlIsNotValid":{"message":"Manifest 'start_URL' is not valid"},"panels/application/AppManifestView.ts | name":{"message":"Name"},"panels/application/AppManifestView.ts | needHelpReadOurS":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | newNoteUrl":{"message":"New note URL"},"panels/application/AppManifestView.ts | noPlayStoreIdProvided":{"message":"No Play store ID provided"},"panels/application/AppManifestView.ts | noSuppliedIconIsAtLeastSpxSquare":{"message":"No supplied icon is at least {PH1} pixels square in PNG, SVG or WebP format, with the purpose attribute unset or set to 'any'."},"panels/application/AppManifestView.ts | note":{"message":"Note:"},"panels/application/AppManifestView.ts | orientation":{"message":"Orientation"},"panels/application/AppManifestView.ts | pageDoesNotWorkOffline":{"message":"Page does not work offline"},"panels/application/AppManifestView.ts | pageDoesNotWorkOfflineThePage":{"message":"Page does not work offline. Starting in Chrome 93, the installability criteria are changing, and this site will not be installable. See {PH1} for more information."},"panels/application/AppManifestView.ts | pageHasNoManifestLinkUrl":{"message":"Page has no manifest URL"},"panels/application/AppManifestView.ts | pageIsLoadedInAnIncognitoWindow":{"message":"Page is loaded in an incognito window"},"panels/application/AppManifestView.ts | pageIsNotLoadedInTheMainFrame":{"message":"Page is not loaded in the main frame"},"panels/application/AppManifestView.ts | pageIsNotServedFromASecureOrigin":{"message":"Page is not served from a secure origin"},"panels/application/AppManifestView.ts | preferrelatedapplicationsIsOnly":{"message":"'prefer_related_applications' is only supported on Chrome Beta and Stable channels on Android."},"panels/application/AppManifestView.ts | presentation":{"message":"Presentation"},"panels/application/AppManifestView.ts | protocolHandlers":{"message":"Protocol Handlers"},"panels/application/AppManifestView.ts | screenshot":{"message":"Screenshot"},"panels/application/AppManifestView.ts | screenshotPixelSize":{"message":"Screenshot {url} should specify a pixel size [width]x[height] instead of \"any\" as first size."},"panels/application/AppManifestView.ts | screenshotS":{"message":"Screenshot #{PH1}"},"panels/application/AppManifestView.ts | shortcutS":{"message":"Shortcut #{PH1}"},"panels/application/AppManifestView.ts | shortcutSShouldIncludeAXPixel":{"message":"Shortcut #{PH1} should include a 96x96 pixel icon"},"panels/application/AppManifestView.ts | shortName":{"message":"Short name"},"panels/application/AppManifestView.ts | showOnlyTheMinimumSafeAreaFor":{"message":"Show only the minimum safe area for maskable icons"},"panels/application/AppManifestView.ts | sSDoesNotSpecifyItsSizeInThe":{"message":"{PH1} {PH2} does not specify its size in the manifest"},"panels/application/AppManifestView.ts | sSFailedToLoad":{"message":"{PH1} {PH2} failed to load"},"panels/application/AppManifestView.ts | sSHeightDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} height can't be more than 2.3 times as long as the width"},"panels/application/AppManifestView.ts | sSrcIsNotSet":{"message":"{PH1} 'src' is not set"},"panels/application/AppManifestView.ts | sSShouldHaveSquareIcon":{"message":"Most operating systems require square icons. Please include at least one square icon in the array."},"panels/application/AppManifestView.ts | sSShouldSpecifyItsSizeAs":{"message":"{PH1} {PH2} should specify its size as [width]x[height]"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtLeast320":{"message":"{PH1} {PH2} size should be at least 320×320"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtMost3840":{"message":"{PH1} {PH2} size should be at most 3840×3840"},"panels/application/AppManifestView.ts | sSWidthDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} width can't be more than 2.3 times as long as the height"},"panels/application/AppManifestView.ts | startUrl":{"message":"Start URL"},"panels/application/AppManifestView.ts | sUrlSFailedToParse":{"message":"{PH1} URL ''{PH2}'' failed to parse"},"panels/application/AppManifestView.ts | theAppIsAlreadyInstalled":{"message":"The app is already installed"},"panels/application/AppManifestView.ts | themeColor":{"message":"Theme color"},"panels/application/AppManifestView.ts | thePlayStoreAppUrlAndPlayStoreId":{"message":"The Play Store app URL and Play Store ID do not match"},"panels/application/AppManifestView.ts | theSpecifiedApplicationPlatform":{"message":"The specified application platform is not supported on Android"},"panels/application/AppManifestView.ts | wcoFound":{"message":"Chrome has successfully found the {PH1} value for the {PH2} field in the {PH3}."},"panels/application/AppManifestView.ts | wcoNeedHelpReadMore":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | wcoNotFound":{"message":"Define {PH1} in the manifest to use the Window Controls Overlay API and customize your app's title bar."},"panels/application/AppManifestView.ts | windowControlsOverlay":{"message":"Window Controls Overlay"},"panels/application/BackForwardCacheTreeElement.ts | backForwardCache":{"message":"Back/forward cache"},"panels/application/BackgroundServiceView.ts | backgroundFetch":{"message":"Background Fetch"},"panels/application/BackgroundServiceView.ts | backgroundServices":{"message":"Background Services"},"panels/application/BackgroundServiceView.ts | backgroundSync":{"message":"Background Sync"},"panels/application/BackgroundServiceView.ts | clear":{"message":"Clear"},"panels/application/BackgroundServiceView.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start recording."},"panels/application/BackgroundServiceView.ts | devtoolsWillRecordAllSActivity":{"message":"DevTools will record all {PH1} activity for up to 3 days, even when closed."},"panels/application/BackgroundServiceView.ts | empty":{"message":"empty"},"panels/application/BackgroundServiceView.ts | event":{"message":"Event"},"panels/application/BackgroundServiceView.ts | instanceId":{"message":"Instance ID"},"panels/application/BackgroundServiceView.ts | learnMore":{"message":"Learn more"},"panels/application/BackgroundServiceView.ts | noMetadataForThisEvent":{"message":"No metadata for this event"},"panels/application/BackgroundServiceView.ts | notifications":{"message":"Notifications"},"panels/application/BackgroundServiceView.ts | origin":{"message":"Origin"},"panels/application/BackgroundServiceView.ts | paymentHandler":{"message":"Payment Handler"},"panels/application/BackgroundServiceView.ts | periodicBackgroundSync":{"message":"Periodic Background Sync"},"panels/application/BackgroundServiceView.ts | pushMessaging":{"message":"Push Messaging"},"panels/application/BackgroundServiceView.ts | recordingSActivity":{"message":"Recording {PH1} activity..."},"panels/application/BackgroundServiceView.ts | saveEvents":{"message":"Save events"},"panels/application/BackgroundServiceView.ts | selectAnEntryToViewMetadata":{"message":"Select an entry to view metadata"},"panels/application/BackgroundServiceView.ts | showEventsForOtherStorageKeys":{"message":"Show events from other storage partitions"},"panels/application/BackgroundServiceView.ts | showEventsFromOtherDomains":{"message":"Show events from other domains"},"panels/application/BackgroundServiceView.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/BackgroundServiceView.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/BackgroundServiceView.ts | storageKey":{"message":"Storage Key"},"panels/application/BackgroundServiceView.ts | swScope":{"message":"Service Worker Scope"},"panels/application/BackgroundServiceView.ts | timestamp":{"message":"Timestamp"},"panels/application/BounceTrackingMitigationsTreeElement.ts | bounceTrackingMitigations":{"message":"Bounce Tracking Mitigations"},"panels/application/components/BackForwardCacheStrings.ts | appBanner":{"message":"Pages that requested an AppBanner are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabled":{"message":"Back/forward cache is disabled by flags. Visit chrome://flags/#back-forward-cache to enable it locally on this device."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByCommandLine":{"message":"Back/forward cache is disabled by the command line."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByLowMemory":{"message":"Back/forward cache is disabled due to insufficient memory."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForDelegate":{"message":"Back/forward cache is not supported by delegate."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForPrerender":{"message":"Back/forward cache is disabled for prerenderer."},"panels/application/components/BackForwardCacheStrings.ts | broadcastChannel":{"message":"The page cannot be cached because it has a BroadcastChannel instance with registered listeners."},"panels/application/components/BackForwardCacheStrings.ts | cacheControlNoStore":{"message":"Pages with cache-control:no-store header cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cacheFlushed":{"message":"The cache was intentionally cleared."},"panels/application/components/BackForwardCacheStrings.ts | cacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | containsPlugins":{"message":"Pages containing plugins are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileChooser":{"message":"Pages that use FileChooser API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileSystemAccess":{"message":"Pages that use File System Access API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaDevicesDispatcherHost":{"message":"Pages that use Media Device Dispatcher are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaPlay":{"message":"A media player was playing upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSession":{"message":"Pages that use MediaSession API and set a playback state are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService":{"message":"Pages that use MediaSession API and set action handlers are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentScreenReader":{"message":"Back/forward cache is disabled due to screen reader."},"panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler":{"message":"Pages that use SecurityHandler are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentSerial":{"message":"Pages that use Serial API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebAuthenticationAPI":{"message":"Pages that use WebAuthetication API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebBluetooth":{"message":"Pages that use WebBluetooth API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebUSB":{"message":"Pages that use WebUSB API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cookieDisabled":{"message":"Back/forward cache is disabled because cookies are disabled on a page that uses Cache-Control: no-store."},"panels/application/components/BackForwardCacheStrings.ts | dedicatedWorkerOrWorklet":{"message":"Pages that use a dedicated worker or worklet are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | documentLoaded":{"message":"The document did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager":{"message":"App Banner was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager":{"message":"Chrome Password Manager was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate":{"message":"DOM distillation was in progress upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource":{"message":"DOM Distiller Viewer was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging":{"message":"Back/forward cache is disabled due to extensions using messaging API."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort":{"message":"Extensions with long-lived connection should close the connection before entering back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions":{"message":"Back/forward cache is disabled due to extensions."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame":{"message":"Extensions with long-lived connection attempted to send messages to frames in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog":{"message":"Modal dialog such as form resubmission or http password dialog was shown for the page upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage":{"message":"The offline page was shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper":{"message":"Out-Of-Memory Intervention bar was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager":{"message":"There were permission requests upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper":{"message":"Popup blocker was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails":{"message":"Safe Browsing details were shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker":{"message":"Safe Browsing considered this page to be abusive and blocked popup."},"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded":{"message":"A service worker was activated while the page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | errorDocument":{"message":"Back/forward cache is disabled due to a document error."},"panels/application/components/BackForwardCacheStrings.ts | fencedFramesEmbedder":{"message":"Pages using FencedFrames cannot be stored in bfcache."},"panels/application/components/BackForwardCacheStrings.ts | foregroundCacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | grantedMediaStreamAccess":{"message":"Pages that have granted media stream access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | haveInnerContents":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPMethodNotGET":{"message":"Only pages loaded via a GET request are eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPStatusNotOK":{"message":"Only pages with a status code of 2XX can be cached."},"panels/application/components/BackForwardCacheStrings.ts | idleManager":{"message":"Pages that use IdleManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBConnection":{"message":"Pages that have an open IndexedDB connection are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBEvent":{"message":"Back/forward cache is disabled due to an IndexedDB event."},"panels/application/components/BackForwardCacheStrings.ts | ineligibleAPI":{"message":"Ineligible APIs were used."},"panels/application/components/BackForwardCacheStrings.ts | injectedJavascript":{"message":"Pages that JavaScript is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | injectedStyleSheet":{"message":"Pages that a StyleSheet is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | internalError":{"message":"Internal error."},"panels/application/components/BackForwardCacheStrings.ts | JavaScriptExecution":{"message":"Chrome detected an attempt to execute JavaScript while in the cache."},"panels/application/components/BackForwardCacheStrings.ts | jsNetworkRequestReceivedCacheControlNoStoreResource":{"message":"Back/forward cache is disabled because some JavaScript network request received resource with Cache-Control: no-store header."},"panels/application/components/BackForwardCacheStrings.ts | keepaliveRequest":{"message":"Back/forward cache is disabled due to a keepalive request."},"panels/application/components/BackForwardCacheStrings.ts | keyboardLock":{"message":"Pages that use Keyboard lock are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | loading":{"message":"The page did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoCache":{"message":"Pages whose main resource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoStore":{"message":"Pages whose main resource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | navigationCancelledWhileRestoring":{"message":"Navigation was cancelled before the page could be restored from back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkExceedsBufferLimit":{"message":"The page was evicted from the cache because an active network connection received too much data. Chrome limits the amount of data that a page may receive while cached."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestDatapipeDrainedAsBytesConsumer":{"message":"Pages that have inflight fetch() or XHR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestRedirected":{"message":"The page was evicted from back/forward cache because an active network request involved a redirect."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestTimeout":{"message":"The page was evicted from the cache because a network connection was open too long. Chrome limits the amount of time that a page may receive data while cached."},"panels/application/components/BackForwardCacheStrings.ts | noResponseHead":{"message":"Pages that do not have a valid response head cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | notMainFrame":{"message":"Navigation happened in a frame other than the main frame."},"panels/application/components/BackForwardCacheStrings.ts | outstandingIndexedDBTransaction":{"message":"Page with ongoing indexed DB transactions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestDirectSocket":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestFetch":{"message":"Pages with an in-flight fetch network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestOthers":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestXHR":{"message":"Pages with an in-flight XHR network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | paymentManager":{"message":"Pages that use PaymentManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | pictureInPicture":{"message":"Pages that use Picture-in-Picture are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | portal":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | printing":{"message":"Pages that show Printing UI are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | relatedActiveContentsExist":{"message":"The page was opened using 'window.open()' and another tab has a reference to it, or the page opened a window."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessCrashed":{"message":"The renderer process for the page in back/forward cache crashed."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessKilled":{"message":"The renderer process for the page in back/forward cache was killed."},"panels/application/components/BackForwardCacheStrings.ts | requestedAudioCapturePermission":{"message":"Pages that have requested audio capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackForwardCacheBlockedSensors":{"message":"Pages that have requested sensor permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackgroundWorkPermission":{"message":"Pages that have requested background sync or fetch permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedMIDIPermission":{"message":"Pages that have requested MIDI permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedNotificationsPermission":{"message":"Pages that have requested notifications permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedStorageAccessGrant":{"message":"Pages that have requested storage access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedVideoCapturePermission":{"message":"Pages that have requested video capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | schemeNotHTTPOrHTTPS":{"message":"Only pages whose URL scheme is HTTP / HTTPS can be cached."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerClaim":{"message":"The page was claimed by a service worker while it is in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerPostMessage":{"message":"A service worker attempted to send the page in back/forward cache a MessageEvent."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerUnregistration":{"message":"ServiceWorker was unregistered while a page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerVersionActivation":{"message":"The page was evicted from back/forward cache due to a service worker activation."},"panels/application/components/BackForwardCacheStrings.ts | sessionRestored":{"message":"Chrome restarted and cleared the back/forward cache entries."},"panels/application/components/BackForwardCacheStrings.ts | sharedWorker":{"message":"Pages that use SharedWorker are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechRecognizer":{"message":"Pages that use SpeechRecognizer are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechSynthesis":{"message":"Pages that use SpeechSynthesis are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subframeIsNavigating":{"message":"An iframe on the page started a navigation that did not complete."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoCache":{"message":"Pages whose subresource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoStore":{"message":"Pages whose subresource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | timeout":{"message":"The page exceeded the maximum time in back/forward cache and was expired."},"panels/application/components/BackForwardCacheStrings.ts | timeoutPuttingInCache":{"message":"The page timed out entering back/forward cache (likely due to long-running pagehide handlers)."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInMainFrame":{"message":"The page has an unload handler in the main frame."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInSubFrame":{"message":"The page has an unload handler in a sub frame."},"panels/application/components/BackForwardCacheStrings.ts | userAgentOverrideDiffers":{"message":"Browser has changed the user agent override header."},"panels/application/components/BackForwardCacheStrings.ts | wasGrantedMediaAccess":{"message":"Pages that have granted access to record video or audio are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webDatabase":{"message":"Pages that use WebDatabase are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webHID":{"message":"Pages that use WebHID are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webLocks":{"message":"Pages that use WebLocks are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webNfc":{"message":"Pages that use WebNfc are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webOTPService":{"message":"Pages that use WebOTPService are not currently eligible for bfcache."},"panels/application/components/BackForwardCacheStrings.ts | webRTC":{"message":"Pages with WebRTC cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webRTCSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webShare":{"message":"Pages that use WebShare are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocket":{"message":"Pages with WebSocket cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocketSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webTransport":{"message":"Pages with WebTransport cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webTransportSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webXR":{"message":"Pages that use WebXR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | backForwardCacheTitle":{"message":"Back/forward cache"},"panels/application/components/BackForwardCacheView.ts | blankURLTitle":{"message":"Blank URL [{PH1}]"},"panels/application/components/BackForwardCacheView.ts | blockingExtensionId":{"message":"Extension id: "},"panels/application/components/BackForwardCacheView.ts | circumstantial":{"message":"Not Actionable"},"panels/application/components/BackForwardCacheView.ts | circumstantialExplanation":{"message":"These reasons are not actionable i.e. caching was prevented by something outside of the direct control of the page."},"panels/application/components/BackForwardCacheView.ts | framesPerIssue":{"message":"{n, plural, =1 {# frame} other {# frames}}"},"panels/application/components/BackForwardCacheView.ts | framesTitle":{"message":"Frames"},"panels/application/components/BackForwardCacheView.ts | issuesInMultipleFrames":{"message":"{n, plural, =1 {# issue found in {m} frames.} other {# issues found in {m} frames.}}"},"panels/application/components/BackForwardCacheView.ts | issuesInSingleFrame":{"message":"{n, plural, =1 {# issue found in 1 frame.} other {# issues found in 1 frame.}}"},"panels/application/components/BackForwardCacheView.ts | learnMore":{"message":"Learn more: back/forward cache eligibility"},"panels/application/components/BackForwardCacheView.ts | mainFrame":{"message":"Main Frame"},"panels/application/components/BackForwardCacheView.ts | neverUseUnload":{"message":"Learn more: Never use unload handler"},"panels/application/components/BackForwardCacheView.ts | normalNavigation":{"message":"Not served from back/forward cache: to trigger back/forward cache, use Chrome's back/forward buttons, or use the test button below to automatically navigate away and back."},"panels/application/components/BackForwardCacheView.ts | pageSupportNeeded":{"message":"Actionable"},"panels/application/components/BackForwardCacheView.ts | pageSupportNeededExplanation":{"message":"These reasons are actionable i.e. they can be cleaned up to make the page eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | restoredFromBFCache":{"message":"Successfully served from back/forward cache."},"panels/application/components/BackForwardCacheView.ts | runningTest":{"message":"Running test"},"panels/application/components/BackForwardCacheView.ts | runTest":{"message":"Test back/forward cache"},"panels/application/components/BackForwardCacheView.ts | supportPending":{"message":"Pending Support"},"panels/application/components/BackForwardCacheView.ts | supportPendingExplanation":{"message":"Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for back/forward cache in a future version of Chrome."},"panels/application/components/BackForwardCacheView.ts | unavailable":{"message":"unavailable"},"panels/application/components/BackForwardCacheView.ts | unknown":{"message":"Unknown Status"},"panels/application/components/BackForwardCacheView.ts | url":{"message":"URL:"},"panels/application/components/BounceTrackingMitigationsView.ts | bounceTrackingMitigationsTitle":{"message":"Bounce Tracking Mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | checkingPotentialTrackers":{"message":"Checking for potential bounce tracking sites."},"panels/application/components/BounceTrackingMitigationsView.ts | forceRun":{"message":"Force run"},"panels/application/components/BounceTrackingMitigationsView.ts | learnMore":{"message":"Learn more: Bounce Tracking Mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | noPotentialBounceTrackersIdentified":{"message":"State was not cleared for any potential bounce tracking sites. Either none were identified, bounce tracking mitigations are not enabled, or third-party cookies are not blocked."},"panels/application/components/BounceTrackingMitigationsView.ts | runningMitigations":{"message":"Running"},"panels/application/components/BounceTrackingMitigationsView.ts | stateDeletedFor":{"message":"State was deleted for the following sites:"},"panels/application/components/EndpointsGrid.ts | noEndpointsToDisplay":{"message":"No endpoints to display"},"panels/application/components/FrameDetailsView.ts | additionalInformation":{"message":"Additional Information"},"panels/application/components/FrameDetailsView.ts | adStatus":{"message":"Ad Status"},"panels/application/components/FrameDetailsView.ts | aFrameAncestorIsAnInsecure":{"message":"A frame ancestor is an insecure context"},"panels/application/components/FrameDetailsView.ts | apiAvailability":{"message":"API availability"},"panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends":{"message":"Availability of certain APIs depends on the document being cross-origin isolated."},"panels/application/components/FrameDetailsView.ts | available":{"message":"available"},"panels/application/components/FrameDetailsView.ts | availableNotTransferable":{"message":"available, not transferable"},"panels/application/components/FrameDetailsView.ts | availableTransferable":{"message":"available, transferable"},"panels/application/components/FrameDetailsView.ts | child":{"message":"child"},"panels/application/components/FrameDetailsView.ts | childDescription":{"message":"This frame has been identified as a child frame of an ad"},"panels/application/components/FrameDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanelMight":{"message":"Click to reveal in Network panel (might require page reload)"},"panels/application/components/FrameDetailsView.ts | clickToRevealInSourcesPanel":{"message":"Click to reveal in Sources panel"},"panels/application/components/FrameDetailsView.ts | createdByAdScriptExplanation":{"message":"There was an ad script in the (async) stack when this frame was created. Examining the creation stack trace of this frame might provide more insight."},"panels/application/components/FrameDetailsView.ts | creationStackTrace":{"message":"Frame Creation Stack Trace"},"panels/application/components/FrameDetailsView.ts | creationStackTraceExplanation":{"message":"This frame was created programmatically. The stack trace shows where this happened."},"panels/application/components/FrameDetailsView.ts | creatorAdScript":{"message":"Creator Ad Script"},"panels/application/components/FrameDetailsView.ts | crossoriginIsolated":{"message":"Cross-Origin Isolated"},"panels/application/components/FrameDetailsView.ts | document":{"message":"Document"},"panels/application/components/FrameDetailsView.ts | frameId":{"message":"Frame ID"},"panels/application/components/FrameDetailsView.ts | learnMore":{"message":"Learn more"},"panels/application/components/FrameDetailsView.ts | localhostIsAlwaysASecureContext":{"message":"Localhost is always a secure context"},"panels/application/components/FrameDetailsView.ts | matchedBlockingRuleExplanation":{"message":"This frame is considered an ad frame because its current (or previous) main document is an ad resource."},"panels/application/components/FrameDetailsView.ts | measureMemory":{"message":"Measure Memory"},"panels/application/components/FrameDetailsView.ts | no":{"message":"No"},"panels/application/components/FrameDetailsView.ts | origin":{"message":"Origin"},"panels/application/components/FrameDetailsView.ts | ownerElement":{"message":"Owner Element"},"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation":{"message":"This frame is considered an ad frame because its parent frame is an ad frame."},"panels/application/components/FrameDetailsView.ts | prerendering":{"message":"Prerendering"},"panels/application/components/FrameDetailsView.ts | prerenderingStatus":{"message":"Prerendering Status"},"panels/application/components/FrameDetailsView.ts | refresh":{"message":"Refresh"},"panels/application/components/FrameDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated":{"message":"requires cross-origin isolated context"},"panels/application/components/FrameDetailsView.ts | root":{"message":"root"},"panels/application/components/FrameDetailsView.ts | rootDescription":{"message":"This frame has been identified as the root frame of an ad"},"panels/application/components/FrameDetailsView.ts | secureContext":{"message":"Secure Context"},"panels/application/components/FrameDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIs":{"message":"SharedArrayBuffer constructor is available and SABs can be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIsAvailable":{"message":"SharedArrayBuffer constructor is available but SABs cannot be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | theFramesSchemeIsInsecure":{"message":"The frame's scheme is insecure"},"panels/application/components/FrameDetailsView.ts | thePerformanceAPI":{"message":"The performance.measureUserAgentSpecificMemory() API is available"},"panels/application/components/FrameDetailsView.ts | thePerformancemeasureuseragentspecificmemory":{"message":"The performance.measureUserAgentSpecificMemory() API is not available"},"panels/application/components/FrameDetailsView.ts | thisAdditionalDebugging":{"message":"This additional (debugging) information is shown because the 'Protocol Monitor' experiment is enabled."},"panels/application/components/FrameDetailsView.ts | transferRequiresCrossoriginIsolatedPermission":{"message":"SharedArrayBuffer transfer requires enabling the permission policy:"},"panels/application/components/FrameDetailsView.ts | unavailable":{"message":"unavailable"},"panels/application/components/FrameDetailsView.ts | unreachableUrl":{"message":"Unreachable URL"},"panels/application/components/FrameDetailsView.ts | url":{"message":"URL"},"panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated":{"message":"⚠️ will require cross-origin isolated context in the future"},"panels/application/components/FrameDetailsView.ts | yes":{"message":"Yes"},"panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents":{"message":"All interest group storage events."},"panels/application/components/InterestGroupAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/InterestGroupAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/InterestGroupAccessGrid.ts | groupName":{"message":"Name"},"panels/application/components/InterestGroupAccessGrid.ts | groupOwner":{"message":"Owner"},"panels/application/components/InterestGroupAccessGrid.ts | noEvents":{"message":"No interest group events recorded."},"panels/application/components/OriginTrialTreeView.ts | expiryTime":{"message":"Expiry Time"},"panels/application/components/OriginTrialTreeView.ts | isThirdParty":{"message":"Third Party"},"panels/application/components/OriginTrialTreeView.ts | matchSubDomains":{"message":"Subdomain Matching"},"panels/application/components/OriginTrialTreeView.ts | origin":{"message":"Origin"},"panels/application/components/OriginTrialTreeView.ts | rawTokenText":{"message":"Raw Token"},"panels/application/components/OriginTrialTreeView.ts | status":{"message":"Token Status"},"panels/application/components/OriginTrialTreeView.ts | token":{"message":"Token"},"panels/application/components/OriginTrialTreeView.ts | tokens":{"message":"{PH1} tokens"},"panels/application/components/OriginTrialTreeView.ts | trialName":{"message":"Trial Name"},"panels/application/components/OriginTrialTreeView.ts | usageRestriction":{"message":"Usage Restriction"},"panels/application/components/PermissionsPolicySection.ts | allowedFeatures":{"message":"Allowed Features"},"panels/application/components/PermissionsPolicySection.ts | clickToShowHeader":{"message":"Click to reveal the request whose \"Permissions-Policy\" HTTP header disables this feature."},"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe":{"message":"Click to reveal the top-most iframe which does not allow this feature in the elements panel."},"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame":{"message":"disabled inside a fencedframe"},"panels/application/components/PermissionsPolicySection.ts | disabledByHeader":{"message":"disabled by \"Permissions-Policy\" header"},"panels/application/components/PermissionsPolicySection.ts | disabledByIframe":{"message":"missing in iframe \"allow\" attribute"},"panels/application/components/PermissionsPolicySection.ts | disabledFeatures":{"message":"Disabled Features"},"panels/application/components/PermissionsPolicySection.ts | hideDetails":{"message":"Hide details"},"panels/application/components/PermissionsPolicySection.ts | showDetails":{"message":"Show details"},"panels/application/components/Prerender2.ts | Activated":{"message":"Activated."},"panels/application/components/Prerender2.ts | ActivatedBeforeStarted":{"message":"Activated before started"},"panels/application/components/Prerender2.ts | ActivationNavigationParameterMismatch":{"message":"The page was prerendered, but the navigation ended up being performed differently than the original prerender, so the prerendered page could not be activated."},"panels/application/components/Prerender2.ts | AudioOutputDeviceRequested":{"message":"Prerendering has not supported the AudioContext API yet."},"panels/application/components/Prerender2.ts | BlockedByClient":{"message":"Resource load is blocked by the client."},"panels/application/components/Prerender2.ts | CancelAllHostsForTesting":{"message":"CancelAllHostsForTesting."},"panels/application/components/Prerender2.ts | ClientCertRequested":{"message":"The page is requesting client cert, which is not suitable for a hidden page like prerendering."},"panels/application/components/Prerender2.ts | CrossSiteNavigation":{"message":"The prerendered page navigated to a cross-site URL after loading. Currently prerendering cross-site pages is disallowed."},"panels/application/components/Prerender2.ts | CrossSiteRedirect":{"message":"Attempted to prerender a URL which redirected to a cross-site URL. Currently prerendering cross-site pages is disallowed."},"panels/application/components/Prerender2.ts | DataSaverEnabled":{"message":"Data saver enabled"},"panels/application/components/Prerender2.ts | Destroyed":{"message":"A prerendered page was abandoned for unknown reasons."},"panels/application/components/Prerender2.ts | DidFailLoad":{"message":"DidFailLoadWithError happened during prerendering."},"panels/application/components/Prerender2.ts | DisallowedApiMethod":{"message":"Disallowed API method"},"panels/application/components/Prerender2.ts | Download":{"message":"Download is disallowed in Prerender."},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndCrossOriginRedirected":{"message":"Prerendering triggered by Chrome internal (e.g., Omnibox prerendering) is is canceled because the navigation is redirected to another cross-origin page."},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndSameOriginRedirected":{"message":"Prerendering triggered by Chrome internal (e.g., Omnibox prerendering) is canceled because the navigation is redirected to another same-origin page."},"panels/application/components/Prerender2.ts | FailToGetMemoryUsage":{"message":"Fail to get memory usage"},"panels/application/components/Prerender2.ts | HasEffectiveUrl":{"message":"Has effective URL"},"panels/application/components/Prerender2.ts | InactivePageRestriction":{"message":"Inactive page restriction"},"panels/application/components/Prerender2.ts | InProgressNavigation":{"message":"InProgressNavigation."},"panels/application/components/Prerender2.ts | InvalidSchemeNavigation":{"message":"Only HTTP(S) navigation allowed for Prerender."},"panels/application/components/Prerender2.ts | InvalidSchemeRedirect":{"message":"Attempted to prerender a URL that redirected to a non-HTTP(S) URL. Only HTTP(S) pages can be prerendered."},"panels/application/components/Prerender2.ts | LoginAuthRequested":{"message":"Prerender does not support auth requests from UI."},"panels/application/components/Prerender2.ts | LowEndDevice":{"message":"Prerendering is not supported for low-memory devices."},"panels/application/components/Prerender2.ts | MainFrameNavigation":{"message":"Navigations after the initial prerendering navigation are disallowed"},"panels/application/components/Prerender2.ts | MaxNumOfRunningPrerendersExceeded":{"message":"Max number of prerendering exceeded."},"panels/application/components/Prerender2.ts | MemoryLimitExceeded":{"message":"Memory limit exceeded"},"panels/application/components/Prerender2.ts | MixedContent":{"message":"Prerendering is canceled by a mixed content frame."},"panels/application/components/Prerender2.ts | MojoBinderPolicy":{"message":"A disallowed API was used by the prerendered page"},"panels/application/components/Prerender2.ts | NavigationBadHttpStatus":{"message":"The initial prerendering navigation was not successful due to the server returning a non-200/204/205 status code."},"panels/application/components/Prerender2.ts | NavigationNotCommitted":{"message":"The prerendering page is not committed in the end."},"panels/application/components/Prerender2.ts | NavigationRequestBlockedByCsp":{"message":"Navigation request is blocked by CSP."},"panels/application/components/Prerender2.ts | NavigationRequestNetworkError":{"message":"Encountered a network error during prerendering."},"panels/application/components/Prerender2.ts | PrerenderingOngoing":{"message":"Prerendering ongoing"},"panels/application/components/Prerender2.ts | RendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/components/Prerender2.ts | RendererProcessKilled":{"message":"The renderer process for the prerendering page was killed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigation":{"message":"The prerendered page navigated to a same-site cross-origin URL after loading. Currently prerendering cross-origin pages is disallowed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigationNotOptIn":{"message":"The prerendered page navigated to a same-site cross-origin URL after loading. This is disallowed unless the destination site sends a Supports-Loading-Mode: credentialed-prerender header."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirect":{"message":"Attempted to prerender a URL which redirected to a same-site cross-origin URL. Currently prerendering cross-origin pages is disallowed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirectNotOptIn":{"message":"Attempted to prerender a URL which redirected to a same-site cross-origin URL. This is disallowed unless the destination site sends a Supports-Loading-Mode: credentialed-prerender header."},"panels/application/components/Prerender2.ts | SslCertificateError":{"message":"SSL certificate error."},"panels/application/components/Prerender2.ts | StartFailed":{"message":"Start failed"},"panels/application/components/Prerender2.ts | Stop":{"message":"The tab is stopped."},"panels/application/components/Prerender2.ts | TriggerBackgrounded":{"message":"The tab is in the background"},"panels/application/components/Prerender2.ts | TriggerDestroyed":{"message":"Prerender is not activated and destroyed with the trigger."},"panels/application/components/Prerender2.ts | UaChangeRequiresReload":{"message":"Reload is needed after UserAgentOverride."},"panels/application/components/ProtocolHandlersView.ts | dropdownLabel":{"message":"Select protocol handler"},"panels/application/components/ProtocolHandlersView.ts | manifest":{"message":"manifest"},"panels/application/components/ProtocolHandlersView.ts | needHelpReadOur":{"message":"Need help? Read {PH1}."},"panels/application/components/ProtocolHandlersView.ts | protocolDetected":{"message":"Found valid protocol handler registration in the {PH1}. With the app installed, test the registered protocols."},"panels/application/components/ProtocolHandlersView.ts | protocolHandlerRegistrations":{"message":"URL protocol handler registration for PWAs"},"panels/application/components/ProtocolHandlersView.ts | protocolNotDetected":{"message":"Define protocol handlers in the {PH1} to register your app as a handler for custom protocols when your app is installed."},"panels/application/components/ProtocolHandlersView.ts | testProtocol":{"message":"Test protocol"},"panels/application/components/ProtocolHandlersView.ts | textboxLabel":{"message":"Query parameter or endpoint for protocol handler"},"panels/application/components/ProtocolHandlersView.ts | textboxPlaceholder":{"message":"Enter URL"},"panels/application/components/ReportsGrid.ts | destination":{"message":"Destination"},"panels/application/components/ReportsGrid.ts | generatedAt":{"message":"Generated at"},"panels/application/components/ReportsGrid.ts | noReportsToDisplay":{"message":"No reports to display"},"panels/application/components/ReportsGrid.ts | status":{"message":"Status"},"panels/application/components/SharedStorageAccessGrid.ts | allSharedStorageEvents":{"message":"All shared storage events for this page."},"panels/application/components/SharedStorageAccessGrid.ts | eventParams":{"message":"Optional Event Params"},"panels/application/components/SharedStorageAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/SharedStorageAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/SharedStorageAccessGrid.ts | mainFrameId":{"message":"Main Frame ID"},"panels/application/components/SharedStorageAccessGrid.ts | noEvents":{"message":"No shared storage events recorded."},"panels/application/components/SharedStorageAccessGrid.ts | ownerOrigin":{"message":"Owner Origin"},"panels/application/components/SharedStorageAccessGrid.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/components/SharedStorageMetadataView.ts | budgetExplanation":{"message":"Remaining data leakage allowed within a 24-hour period for this origin in bits of entropy"},"panels/application/components/SharedStorageMetadataView.ts | creation":{"message":"Creation Time"},"panels/application/components/SharedStorageMetadataView.ts | entropyBudget":{"message":"Entropy Budget for Fenced Frames"},"panels/application/components/SharedStorageMetadataView.ts | notYetCreated":{"message":"Not yet created"},"panels/application/components/SharedStorageMetadataView.ts | numEntries":{"message":"Number of Entries"},"panels/application/components/SharedStorageMetadataView.ts | resetBudget":{"message":"Reset Budget"},"panels/application/components/SharedStorageMetadataView.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/components/StackTrace.ts | cannotRenderStackTrace":{"message":"Cannot render stack trace"},"panels/application/components/StackTrace.ts | showLess":{"message":"Show less"},"panels/application/components/StackTrace.ts | showSMoreFrames":{"message":"{n, plural, =1 {Show # more frame} other {Show # more frames}}"},"panels/application/components/StorageMetadataView.ts | bucketName":{"message":"Bucket name"},"panels/application/components/StorageMetadataView.ts | durability":{"message":"Durability"},"panels/application/components/StorageMetadataView.ts | expiration":{"message":"Expiration"},"panels/application/components/StorageMetadataView.ts | isOpaque":{"message":"Is opaque"},"panels/application/components/StorageMetadataView.ts | isThirdParty":{"message":"Is third-party"},"panels/application/components/StorageMetadataView.ts | loading":{"message":"Loading…"},"panels/application/components/StorageMetadataView.ts | no":{"message":"No"},"panels/application/components/StorageMetadataView.ts | none":{"message":"None"},"panels/application/components/StorageMetadataView.ts | opaque":{"message":"(opaque)"},"panels/application/components/StorageMetadataView.ts | origin":{"message":"Origin"},"panels/application/components/StorageMetadataView.ts | persistent":{"message":"Is persistent"},"panels/application/components/StorageMetadataView.ts | quota":{"message":"Quota"},"panels/application/components/StorageMetadataView.ts | topLevelSite":{"message":"Top-level site"},"panels/application/components/StorageMetadataView.ts | yes":{"message":"Yes"},"panels/application/components/StorageMetadataView.ts | yesBecauseAncestorChainHasCrossSite":{"message":"Yes, because the ancestry chain contains a third-party origin"},"panels/application/components/StorageMetadataView.ts | yesBecauseKeyIsOpaque":{"message":"Yes, because the storage key is opaque"},"panels/application/components/StorageMetadataView.ts | yesBecauseOriginNotInTopLevelSite":{"message":"Yes, because the origin is outside of the top-level site"},"panels/application/components/StorageMetadataView.ts | yesBecauseTopLevelIsOpaque":{"message":"Yes, because the top-level site is opaque"},"panels/application/components/TrustTokensView.ts | allStoredTrustTokensAvailableIn":{"message":"All stored Private State Tokens available in this browser instance."},"panels/application/components/TrustTokensView.ts | deleteTrustTokens":{"message":"Delete all stored Private State Tokens issued by {PH1}."},"panels/application/components/TrustTokensView.ts | issuer":{"message":"Issuer"},"panels/application/components/TrustTokensView.ts | noTrustTokensStored":{"message":"No Private State Tokens are currently stored."},"panels/application/components/TrustTokensView.ts | storedTokenCount":{"message":"Stored token count"},"panels/application/components/TrustTokensView.ts | trustTokens":{"message":"Private State Tokens"},"panels/application/CookieItemsView.ts | clearAllCookies":{"message":"Clear all cookies"},"panels/application/CookieItemsView.ts | clearFilteredCookies":{"message":"Clear filtered cookies"},"panels/application/CookieItemsView.ts | cookies":{"message":"Cookies"},"panels/application/CookieItemsView.ts | numberOfCookiesShownInTableS":{"message":"Number of cookies shown in table: {PH1}"},"panels/application/CookieItemsView.ts | onlyShowCookiesWhichHaveAn":{"message":"Only show cookies that have an associated issue"},"panels/application/CookieItemsView.ts | onlyShowCookiesWithAnIssue":{"message":"Only show cookies with an issue"},"panels/application/CookieItemsView.ts | selectACookieToPreviewItsValue":{"message":"Select a cookie to preview its value"},"panels/application/CookieItemsView.ts | showUrlDecoded":{"message":"Show URL-decoded"},"panels/application/DatabaseModel.ts | anUnexpectedErrorSOccurred":{"message":"An unexpected error {PH1} occurred."},"panels/application/DatabaseModel.ts | databaseNoLongerHasExpected":{"message":"Database no longer has expected version."},"panels/application/DatabaseQueryView.ts | databaseQuery":{"message":"Database Query"},"panels/application/DatabaseQueryView.ts | queryS":{"message":"Query: {PH1}"},"panels/application/DatabaseTableView.ts | anErrorOccurredTryingToreadTheS":{"message":"An error occurred trying to read the \"{PH1}\" table."},"panels/application/DatabaseTableView.ts | database":{"message":"Database"},"panels/application/DatabaseTableView.ts | refresh":{"message":"Refresh"},"panels/application/DatabaseTableView.ts | theStableIsEmpty":{"message":"The \"{PH1}\" table is empty."},"panels/application/DatabaseTableView.ts | visibleColumns":{"message":"Visible columns"},"panels/application/DOMStorageItemsView.ts | domStorage":{"message":"DOM Storage"},"panels/application/DOMStorageItemsView.ts | domStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/DOMStorageItemsView.ts | domStorageItems":{"message":"DOM Storage Items"},"panels/application/DOMStorageItemsView.ts | domStorageItemsCleared":{"message":"DOM Storage Items cleared"},"panels/application/DOMStorageItemsView.ts | domStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/DOMStorageItemsView.ts | key":{"message":"Key"},"panels/application/DOMStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/DOMStorageItemsView.ts | value":{"message":"Value"},"panels/application/IndexedDBViews.ts | clearObjectStore":{"message":"Clear object store"},"panels/application/IndexedDBViews.ts | collapse":{"message":"Collapse"},"panels/application/IndexedDBViews.ts | dataMayBeStale":{"message":"Data may be stale"},"panels/application/IndexedDBViews.ts | deleteDatabase":{"message":"Delete database"},"panels/application/IndexedDBViews.ts | deleteSelected":{"message":"Delete selected"},"panels/application/IndexedDBViews.ts | expandRecursively":{"message":"Expand Recursively"},"panels/application/IndexedDBViews.ts | idb":{"message":"IDB"},"panels/application/IndexedDBViews.ts | indexedDb":{"message":"Indexed DB"},"panels/application/IndexedDBViews.ts | keyGeneratorValueS":{"message":"Key generator value: {PH1}"},"panels/application/IndexedDBViews.ts | keyPath":{"message":"Key path: "},"panels/application/IndexedDBViews.ts | keyString":{"message":"Key"},"panels/application/IndexedDBViews.ts | objectStores":{"message":"Object stores"},"panels/application/IndexedDBViews.ts | pleaseConfirmDeleteOfSDatabase":{"message":"Please confirm delete of \"{PH1}\" database."},"panels/application/IndexedDBViews.ts | primaryKey":{"message":"Primary key"},"panels/application/IndexedDBViews.ts | refresh":{"message":"Refresh"},"panels/application/IndexedDBViews.ts | refreshDatabase":{"message":"Refresh database"},"panels/application/IndexedDBViews.ts | showNextPage":{"message":"Show next page"},"panels/application/IndexedDBViews.ts | showPreviousPage":{"message":"Show previous page"},"panels/application/IndexedDBViews.ts | someEntriesMayHaveBeenModified":{"message":"Some entries may have been modified"},"panels/application/IndexedDBViews.ts | startFromKey":{"message":"Start from key"},"panels/application/IndexedDBViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/IndexedDBViews.ts | valueString":{"message":"Value"},"panels/application/IndexedDBViews.ts | version":{"message":"Version"},"panels/application/InterestGroupStorageView.ts | clickToDisplayBody":{"message":"Click on any interest group event to display the group's current state"},"panels/application/InterestGroupStorageView.ts | noDataAvailable":{"message":"No details available for the selected interest group. The browser may have left the group."},"panels/application/InterestGroupTreeElement.ts | interestGroups":{"message":"Interest Groups"},"panels/application/OpenedWindowDetailsView.ts | accessToOpener":{"message":"Access to opener"},"panels/application/OpenedWindowDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/OpenedWindowDetailsView.ts | closed":{"message":"closed"},"panels/application/OpenedWindowDetailsView.ts | crossoriginEmbedderPolicy":{"message":"Cross-Origin Embedder Policy"},"panels/application/OpenedWindowDetailsView.ts | document":{"message":"Document"},"panels/application/OpenedWindowDetailsView.ts | no":{"message":"No"},"panels/application/OpenedWindowDetailsView.ts | openerFrame":{"message":"Opener Frame"},"panels/application/OpenedWindowDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/OpenedWindowDetailsView.ts | security":{"message":"Security"},"panels/application/OpenedWindowDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/OpenedWindowDetailsView.ts | showsWhetherTheOpenedWindowIs":{"message":"Shows whether the opened window is able to access its opener and vice versa"},"panels/application/OpenedWindowDetailsView.ts | type":{"message":"Type"},"panels/application/OpenedWindowDetailsView.ts | unknown":{"message":"Unknown"},"panels/application/OpenedWindowDetailsView.ts | url":{"message":"URL"},"panels/application/OpenedWindowDetailsView.ts | webWorker":{"message":"Web Worker"},"panels/application/OpenedWindowDetailsView.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/OpenedWindowDetailsView.ts | worker":{"message":"worker"},"panels/application/OpenedWindowDetailsView.ts | yes":{"message":"Yes"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusFailure":{"message":"Preloading failed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusNotTriggered":{"message":"Preloading attempt is not yet triggered."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusPending":{"message":"Preloading attempt is eligible but pending."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusReady":{"message":"Preloading finished and the result is ready for the next navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusRunning":{"message":"Preloading is running."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusSuccess":{"message":"Preloading finished and used for a navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsAction":{"message":"Action"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsFailureReason":{"message":"Failure reason"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsRuleSet":{"message":"Rule set"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsStatus":{"message":"Status"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivatedDuringMainFrameNavigation":{"message":"Prerendered page activated during initiating page's main frame navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationFramePolicyNotCompatible":{"message":"The prerender was not used because the sandboxing flags or permissions policy of the initiating page was not compatible with those of the prerendering page."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationNavigationParameterMismatch":{"message":"The prerender was not used because during activation time, different navigation parameters (e.g., HTTP headers) were calculated than during the original prerendering navigation request."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusAudioOutputDeviceRequested":{"message":"The prerendered page requested audio output, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBatterySaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less battery."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusClientCertRequested":{"message":"The prerendering navigation required a HTTP client certificate."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInInitialNavigation":{"message":"The prerendering navigation failed because it targeted a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDataSaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less data."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDownload":{"message":"The prerendered page attempted to initiate a download, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusFailToGetMemoryUsage":{"message":"The prerender was not performed because the browser encountered an internal error attempting to determine current memory usage."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusHasEffectiveUrl":{"message":"The initiating page cannot perform prerendering, because it has an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeNavigation":{"message":"The URL was not eligible to be prerendered because its scheme was not http: or https:."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeRedirect":{"message":"The prerendering navigation failed because it redirected to a URL whose scheme was not http: or https:."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLoginAuthRequested":{"message":"The prerendering navigation required HTTP authentication, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLowEndDevice":{"message":"The prerender was not performed because this device does not have enough total system memory to support prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMainFrameNavigation":{"message":"The prerendered page navigated itself to another URL, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMaxNumOfRunningPrerendersExceeded":{"message":"The prerender was not performed because the initiating page already has too many prerenders ongoing. Remove other speculation rules to enable further prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryLimitExceeded":{"message":"The prerender was not performed because the browser exceeded the prerendering memory limit."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureAfterTriggered":{"message":"The prerendered page was unloaded because the browser came under critical memory pressure."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureOnTrigger":{"message":"The prerender was not performed because the browser was under critical memory pressure."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMixedContent":{"message":"The prerendered page contained mixed content."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMojoBinderPolicy":{"message":"The prerendered page used a forbidden JavaScript API that is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationBadHttpStatus":{"message":"The prerendering navigation failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestBlockedByCsp":{"message":"The prerendering navigation was blocked by a Content Security Policy."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestNetworkError":{"message":"The prerendering navigation encountered a network error."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPreloadingDisabled":{"message":"The prerender was not performed because the user disabled preloading in their browser settings."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrerenderingDisabledByDevTools":{"message":"The prerender was not performed because DevTools has been used to disable prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessCrashed":{"message":"The initiating page crashed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessKilled":{"message":"The initiating page was killed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessKilled":{"message":"The prerendered page was killed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusResourceLoadBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation":{"message":"The prerendered page navigated itself to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSslCertificateError":{"message":"The prerendering navigation failed because of an invalid SSL certificate."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTimeoutBackgrounded":{"message":"The initiating page was backgrounded for a long time, so the prerendered page was discarded."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTriggerBackgrounded":{"message":"The initiating page was backgrounded, so the prerendered page was discarded."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusUaChangeRequiresReload":{"message":"Changing User Agent occured in prerendering navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | selectAnElementForMoreDetails":{"message":"Select an element for more details"},"panels/application/preloading/components/PreloadingGrid.ts | action":{"message":"Action"},"panels/application/preloading/components/PreloadingGrid.ts | status":{"message":"Status"},"panels/application/preloading/components/PreloadingString.ts | PrefetchEvicted":{"message":"The prefetch was discarded for a newer prefetch because |kPrefetchNewLimits| is enabled"},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedIneligibleRedirect":{"message":"The prefetch was redirected, but the redirect URL is not eligible for prefetch."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedInvalidRedirect":{"message":"The prefetch was redirected, but there was a problem with the redirect."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedMIMENotSupported":{"message":"The prefetch failed because the response's Content-Type header was not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNetError":{"message":"The prefetch failed because of a network error."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNon2XX":{"message":"The prefetch failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedPerPageLimitExceeded":{"message":"The prefetch was not performed because the initiating page already has too many prefetches ongoing."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIneligibleRetryAfter":{"message":"A previous prefetch to the origin got a HTTP 503 response with an Retry-After header that has not elapsed yet."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsPrivacyDecoy":{"message":"The URL was not eligible to be prefetched because there was a registered service worker or cross-site cookies for that origin, but the prefetch was put on the network anyways and not used, to disguise that the user had some kind of previous relationship with the origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsStale":{"message":"Too much time elapsed between the prefetch and usage, so the prefetch was discarded."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBatterySaverEnabled":{"message":"The prefetch was not performed because the Battery Saver setting was enabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBrowserContextOffTheRecord":{"message":"The prefetch was not performed because the browser is in Incognito or Guest mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleDataSaverEnabled":{"message":"The prefetch was not performed because the operating system is in Data Saver mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleExistingProxy":{"message":"The URL is not eligible to be prefetched, because in the default network context it is configured to use a proxy server."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleHostIsNonUnique":{"message":"The URL was not eligible to be prefetched because its host was not unique (e.g., a non publicly routable IP address or a hostname which is not registry-controlled), but the prefetch was required to be proxied."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleNonDefaultStoragePartition":{"message":"The URL was not eligible to be prefetched because it uses a non-default storage partition."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligiblePreloadingDisabled":{"message":"The prefetch was not performed because preloading was disabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy":{"message":"The URL was not eligible to be prefetched because the default network context cannot be configured to use the prefetch proxy for a same-site cross-origin prefetch request."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSchemeIsNotHttps":{"message":"The URL was not eligible to be prefetched because its scheme was not https:."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasCookies":{"message":"The URL was not eligible to be prefetched because it was cross-site, but the user had cookies for that origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasServiceWorker":{"message":"The URL was not eligible to be prefetched because there was a registered service worker for that origin, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedCookiesChanged":{"message":"The prefetch was not used because it was a cross-site prefetch, and cookies were added for that URL while the prefetch was ongoing, so the prefetched response is now out-of-date."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedProbeFailed":{"message":"The prefetch was blocked by your Internet Service Provider or network administrator."},"panels/application/preloading/components/PreloadingString.ts | PrefetchProxyNotAvailable":{"message":"A network error was encountered when trying to set up a connection to the prefetching proxy."},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsError":{"message":"Error"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsLocation":{"message":"Location"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsSource":{"message":"Source"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsValidity":{"message":"Validity"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityInvalid":{"message":"Invalid; source is not a JSON object"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validitySomeRulesInvalid":{"message":"Some rules are invalid and ignored"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityValid":{"message":"Valid"},"panels/application/preloading/components/RuleSetGrid.ts | location":{"message":"Location"},"panels/application/preloading/components/RuleSetGrid.ts | validity":{"message":"Validity"},"panels/application/preloading/components/UsedPreloadingView.ts | prefetchUsed":{"message":"{PH1} prefetched resources are used for this page"},"panels/application/preloading/components/UsedPreloadingView.ts | preloadingUsedForThisPage":{"message":"Preloading used for this page"},"panels/application/preloading/components/UsedPreloadingView.ts | prerenderUsed":{"message":"This page was prerendered"},"panels/application/preloading/PreloadingView.ts | extensionSettings":{"message":"Extensions settings"},"panels/application/preloading/PreloadingView.ts | filterAllRuleSets":{"message":"All rule sets"},"panels/application/preloading/PreloadingView.ts | filterFilterByRuleSet":{"message":"Filter by rule set"},"panels/application/preloading/PreloadingView.ts | filterRuleSet":{"message":"Rule set: {PH1}"},"panels/application/preloading/PreloadingView.ts | preloadingPageSettings":{"message":"Preload pages settings"},"panels/application/preloading/PreloadingView.ts | statusFailure":{"message":"Failure"},"panels/application/preloading/PreloadingView.ts | statusNotTriggered":{"message":"Not triggered"},"panels/application/preloading/PreloadingView.ts | statusPending":{"message":"Pending"},"panels/application/preloading/PreloadingView.ts | statusReady":{"message":"Ready"},"panels/application/preloading/PreloadingView.ts | statusRunning":{"message":"Running"},"panels/application/preloading/PreloadingView.ts | statusSuccess":{"message":"Success"},"panels/application/preloading/PreloadingView.ts | validityInvalid":{"message":"Invalid"},"panels/application/preloading/PreloadingView.ts | validitySomeRulesInvalid":{"message":"Some rules invalid"},"panels/application/preloading/PreloadingView.ts | validityValid":{"message":"Valid"},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByBatterysaver":{"message":"Preloading is disabled because of the operating system's Battery Saver mode."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByDatasaver":{"message":"Preloading is disabled because of the operating system's Data Saver mode."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByFeatureFlag":{"message":"Preloading is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingStateDisabled":{"message":"Preloading is disabled because of user settings or an extension. Go to {PH1} to learn more, or go to {PH2} to disable the extension."},"panels/application/preloading/PreloadingView.ts | warningDetailPrerenderingDisabledByFeatureFlag":{"message":"Prerendering is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingDisabledByFeatureFlag":{"message":"Preloading was disabled, but is force-enabled now"},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingStateDisabled":{"message":"Preloading is disabled"},"panels/application/preloading/PreloadingView.ts | warningTitlePrerenderingDisabledByFeatureFlag":{"message":"Prerendering was disabled, but is force-enabled now"},"panels/application/PreloadingTreeElement.ts | prefetchingAndPrerendering":{"message":"Prefetching & Prerendering"},"panels/application/PreloadingTreeElement.ts | thisPage":{"message":"This Page"},"panels/application/ReportingApiReportsView.ts | clickToDisplayBody":{"message":"Click on any report to display its body"},"panels/application/ReportingApiTreeElement.ts | reportingApi":{"message":"Reporting API"},"panels/application/ServiceWorkerCacheTreeElement.ts | cacheStorage":{"message":"Cache Storage"},"panels/application/ServiceWorkerCacheTreeElement.ts | delete":{"message":"Delete"},"panels/application/ServiceWorkerCacheTreeElement.ts | refreshCaches":{"message":"Refresh Caches"},"panels/application/ServiceWorkerCacheViews.ts | cache":{"message":"Cache"},"panels/application/ServiceWorkerCacheViews.ts | deleteSelected":{"message":"Delete Selected"},"panels/application/ServiceWorkerCacheViews.ts | filterByPath":{"message":"Filter by Path"},"panels/application/ServiceWorkerCacheViews.ts | headers":{"message":"Headers"},"panels/application/ServiceWorkerCacheViews.ts | matchingEntriesS":{"message":"Matching entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | name":{"message":"Name"},"panels/application/ServiceWorkerCacheViews.ts | preview":{"message":"Preview"},"panels/application/ServiceWorkerCacheViews.ts | refresh":{"message":"Refresh"},"panels/application/ServiceWorkerCacheViews.ts | selectACacheEntryAboveToPreview":{"message":"Select a cache entry above to preview"},"panels/application/ServiceWorkerCacheViews.ts | serviceWorkerCache":{"message":"Service Worker Cache"},"panels/application/ServiceWorkerCacheViews.ts | timeCached":{"message":"Time Cached"},"panels/application/ServiceWorkerCacheViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | varyHeaderWarning":{"message":"⚠️ Set ignoreVary to true when matching this entry"},"panels/application/ServiceWorkersView.ts | bypassForNetwork":{"message":"Bypass for network"},"panels/application/ServiceWorkersView.ts | bypassTheServiceWorkerAndLoad":{"message":"Bypass the service worker and load resources from the network"},"panels/application/ServiceWorkersView.ts | clients":{"message":"Clients"},"panels/application/ServiceWorkersView.ts | focus":{"message":"focus"},"panels/application/ServiceWorkersView.ts | inspect":{"message":"inspect"},"panels/application/ServiceWorkersView.ts | networkRequests":{"message":"Network requests"},"panels/application/ServiceWorkersView.ts | onPageReloadForceTheService":{"message":"On page reload, force the service worker to update, and activate it"},"panels/application/ServiceWorkersView.ts | periodicSync":{"message":"Periodic Sync"},"panels/application/ServiceWorkersView.ts | periodicSyncTag":{"message":"Periodic Sync tag"},"panels/application/ServiceWorkersView.ts | pushData":{"message":"Push data"},"panels/application/ServiceWorkersView.ts | pushString":{"message":"Push"},"panels/application/ServiceWorkersView.ts | receivedS":{"message":"Received {PH1}"},"panels/application/ServiceWorkersView.ts | sActivatedAndIsS":{"message":"#{PH1} activated and is {PH2}"},"panels/application/ServiceWorkersView.ts | sDeleted":{"message":"{PH1} - deleted"},"panels/application/ServiceWorkersView.ts | seeAllRegistrations":{"message":"See all registrations"},"panels/application/ServiceWorkersView.ts | serviceWorkerForS":{"message":"Service worker for {PH1}"},"panels/application/ServiceWorkersView.ts | serviceWorkersFromOtherOrigins":{"message":"Service workers from other origins"},"panels/application/ServiceWorkersView.ts | sIsRedundant":{"message":"#{PH1} is redundant"},"panels/application/ServiceWorkersView.ts | source":{"message":"Source"},"panels/application/ServiceWorkersView.ts | sRegistrationErrors":{"message":"{PH1} registration errors"},"panels/application/ServiceWorkersView.ts | startString":{"message":"start"},"panels/application/ServiceWorkersView.ts | status":{"message":"Status"},"panels/application/ServiceWorkersView.ts | stopString":{"message":"stop"},"panels/application/ServiceWorkersView.ts | sTryingToInstall":{"message":"#{PH1} trying to install"},"panels/application/ServiceWorkersView.ts | sWaitingToActivate":{"message":"#{PH1} waiting to activate"},"panels/application/ServiceWorkersView.ts | syncString":{"message":"Sync"},"panels/application/ServiceWorkersView.ts | syncTag":{"message":"Sync tag"},"panels/application/ServiceWorkersView.ts | testPushMessageFromDevtools":{"message":"Test push message from DevTools."},"panels/application/ServiceWorkersView.ts | unregister":{"message":"Unregister"},"panels/application/ServiceWorkersView.ts | unregisterServiceWorker":{"message":"Unregister service worker"},"panels/application/ServiceWorkersView.ts | update":{"message":"Update"},"panels/application/ServiceWorkersView.ts | updateCycle":{"message":"Update Cycle"},"panels/application/ServiceWorkersView.ts | updateOnReload":{"message":"Update on reload"},"panels/application/ServiceWorkersView.ts | workerS":{"message":"Worker: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | endTimeS":{"message":"End time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | startTimeS":{"message":"Start time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | timeline":{"message":"Timeline"},"panels/application/ServiceWorkerUpdateCycleView.ts | updateActivity":{"message":"Update Activity"},"panels/application/ServiceWorkerUpdateCycleView.ts | version":{"message":"Version"},"panels/application/SharedStorageEventsView.ts | clickToDisplayBody":{"message":"Click on any shared storage event to display the event parameters."},"panels/application/SharedStorageItemsView.ts | key":{"message":"Key"},"panels/application/SharedStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/SharedStorageItemsView.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/SharedStorageItemsView.ts | sharedStorageFilteredItemsCleared":{"message":"Shared Storage filtered items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEditCanceled":{"message":"The storage item edit was canceled."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEdited":{"message":"The storage item was edited."},"panels/application/SharedStorageItemsView.ts | sharedStorageItems":{"message":"Shared Storage Items"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemsCleared":{"message":"Shared Storage items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/SharedStorageItemsView.ts | value":{"message":"Value"},"panels/application/SharedStorageListTreeElement.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/StorageItemsView.ts | clearAll":{"message":"Clear All"},"panels/application/StorageItemsView.ts | deleteSelected":{"message":"Delete Selected"},"panels/application/StorageItemsView.ts | filter":{"message":"Filter"},"panels/application/StorageItemsView.ts | refresh":{"message":"Refresh"},"panels/application/StorageItemsView.ts | refreshedStatus":{"message":"Table refreshed"},"panels/application/StorageView.ts | application":{"message":"Application"},"panels/application/StorageView.ts | cache":{"message":"Cache"},"panels/application/StorageView.ts | cacheStorage":{"message":"Cache storage"},"panels/application/StorageView.ts | clearing":{"message":"Clearing..."},"panels/application/StorageView.ts | clearSiteData":{"message":"Clear site data"},"panels/application/StorageView.ts | cookies":{"message":"Cookies"},"panels/application/StorageView.ts | fileSystem":{"message":"File System"},"panels/application/StorageView.ts | includingThirdPartyCookies":{"message":"including third-party cookies"},"panels/application/StorageView.ts | indexDB":{"message":"IndexedDB"},"panels/application/StorageView.ts | internalError":{"message":"Internal error"},"panels/application/StorageView.ts | learnMore":{"message":"Learn more"},"panels/application/StorageView.ts | localAndSessionStorage":{"message":"Local and session storage"},"panels/application/StorageView.ts | mb":{"message":"MB"},"panels/application/StorageView.ts | numberMustBeNonNegative":{"message":"Number must be non-negative"},"panels/application/StorageView.ts | numberMustBeSmaller":{"message":"Number must be smaller than {PH1}"},"panels/application/StorageView.ts | other":{"message":"Other"},"panels/application/StorageView.ts | pleaseEnterANumber":{"message":"Please enter a number"},"panels/application/StorageView.ts | serviceWorkers":{"message":"Service Workers"},"panels/application/StorageView.ts | sFailedToLoad":{"message":"{PH1} (failed to load)"},"panels/application/StorageView.ts | simulateCustomStorage":{"message":"Simulate custom storage quota"},"panels/application/StorageView.ts | SiteDataCleared":{"message":"Site data cleared"},"panels/application/StorageView.ts | storageQuotaIsLimitedIn":{"message":"Storage quota is limited in Incognito mode"},"panels/application/StorageView.ts | storageQuotaUsed":{"message":"{PH1} used out of {PH2} storage quota"},"panels/application/StorageView.ts | storageQuotaUsedWithBytes":{"message":"{PH1} bytes used out of {PH2} bytes storage quota"},"panels/application/StorageView.ts | storageTitle":{"message":"Storage"},"panels/application/StorageView.ts | storageUsage":{"message":"Storage usage"},"panels/application/StorageView.ts | storageWithCustomMarker":{"message":"{PH1} (custom)"},"panels/application/StorageView.ts | unregisterServiceWorker":{"message":"Unregister service workers"},"panels/application/StorageView.ts | usage":{"message":"Usage"},"panels/application/StorageView.ts | webSql":{"message":"Web SQL"},"panels/application/TrustTokensTreeElement.ts | trustTokens":{"message":"Private State Tokens"},"panels/browser_debugger/browser_debugger-meta.ts | contentScripts":{"message":"Content scripts"},"panels/browser_debugger/browser_debugger-meta.ts | cspViolationBreakpoints":{"message":"CSP Violation Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | domBreakpoints":{"message":"DOM Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | eventListenerBreakpoints":{"message":"Event Listener Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | globalListeners":{"message":"Global Listeners"},"panels/browser_debugger/browser_debugger-meta.ts | overrides":{"message":"Overrides"},"panels/browser_debugger/browser_debugger-meta.ts | page":{"message":"Page"},"panels/browser_debugger/browser_debugger-meta.ts | showContentScripts":{"message":"Show Content scripts"},"panels/browser_debugger/browser_debugger-meta.ts | showCspViolationBreakpoints":{"message":"Show CSP Violation Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showDomBreakpoints":{"message":"Show DOM Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showEventListenerBreakpoints":{"message":"Show Event Listener Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showGlobalListeners":{"message":"Show Global Listeners"},"panels/browser_debugger/browser_debugger-meta.ts | showOverrides":{"message":"Show Overrides"},"panels/browser_debugger/browser_debugger-meta.ts | showPage":{"message":"Show Page"},"panels/browser_debugger/browser_debugger-meta.ts | showXhrfetchBreakpoints":{"message":"Show XHR/fetch Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | xhrfetchBreakpoints":{"message":"XHR/fetch Breakpoints"},"panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | attributeModified":{"message":"Attribute modified"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakOn":{"message":"Break on"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointRemoved":{"message":"Breakpoint removed"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointSet":{"message":"Breakpoint set"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | checked":{"message":"checked"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | domBreakpointsList":{"message":"DOM Breakpoints list"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | noBreakpoints":{"message":"No breakpoints"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | nodeRemoved":{"message":"Node removed"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeAllDomBreakpoints":{"message":"Remove all DOM breakpoints"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | revealDomNodeInElementsPanel":{"message":"Reveal DOM node in Elements panel"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sBreakpointHit":{"message":"{PH1} breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sS":{"message":"{PH1}: {PH2}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sSS":{"message":"{PH1}: {PH2}, {PH3}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | subtreeModified":{"message":"Subtree modified"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | unchecked":{"message":"unchecked"},"panels/browser_debugger/ObjectEventListenersSidebarPane.ts | refreshGlobalListeners":{"message":"Refresh global listeners"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addXhrfetchBreakpoint":{"message":"Add XHR/fetch breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | anyXhrOrFetch":{"message":"Any XHR or fetch"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakWhenUrlContains":{"message":"Break when URL contains:"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | noBreakpoints":{"message":"No breakpoints"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeAllBreakpoints":{"message":"Remove all breakpoints"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlBreakpoint":{"message":"URL Breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlContainsS":{"message":"URL contains \"{PH1}\""},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | xhrfetchBreakpoints":{"message":"XHR/fetch Breakpoints"},"panels/changes/changes-meta.ts | changes":{"message":"Changes"},"panels/changes/changes-meta.ts | showChanges":{"message":"Show Changes"},"panels/changes/ChangesSidebar.ts | sFromSourceMap":{"message":"{PH1} (from source map)"},"panels/changes/ChangesView.ts | binaryData":{"message":"Binary data"},"panels/changes/ChangesView.ts | copy":{"message":"Copy"},"panels/changes/ChangesView.ts | copyAllChangesFromCurrentFile":{"message":"Copy all changes from current file"},"panels/changes/ChangesView.ts | noChanges":{"message":"No changes"},"panels/changes/ChangesView.ts | revertAllChangesToCurrentFile":{"message":"Revert all changes to current file"},"panels/changes/ChangesView.ts | sDeletions":{"message":"{n, plural, =1 {# deletion (-)} other {# deletions (-)}}"},"panels/changes/ChangesView.ts | sInsertions":{"message":"{n, plural, =1 {# insertion (+)} other {# insertions (+)}}"},"panels/console_counters/WarningErrorCounter.ts | openConsoleToViewS":{"message":"Open Console to view {PH1}"},"panels/console_counters/WarningErrorCounter.ts | openIssuesToView":{"message":"{n, plural, =1 {Open Issues to view # issue:} other {Open Issues to view # issues:}}"},"panels/console_counters/WarningErrorCounter.ts | sErrors":{"message":"{n, plural, =1 {# error} other {# errors}}"},"panels/console_counters/WarningErrorCounter.ts | sWarnings":{"message":"{n, plural, =1 {# warning} other {# warnings}}"},"panels/console/console-meta.ts | autocompleteFromHistory":{"message":"Autocomplete from history"},"panels/console/console-meta.ts | autocompleteOnEnter":{"message":"Accept autocomplete suggestion on Enter"},"panels/console/console-meta.ts | clearConsole":{"message":"Clear console"},"panels/console/console-meta.ts | clearConsoleHistory":{"message":"Clear console history"},"panels/console/console-meta.ts | collapseConsoleTraceMessagesByDefault":{"message":"Do not automatically expand console.trace() messages"},"panels/console/console-meta.ts | console":{"message":"Console"},"panels/console/console-meta.ts | createLiveExpression":{"message":"Create live expression"},"panels/console/console-meta.ts | doNotAutocompleteFromHistory":{"message":"Do not autocomplete from history"},"panels/console/console-meta.ts | doNotAutocompleteOnEnter":{"message":"Do not accept autocomplete suggestion on Enter"},"panels/console/console-meta.ts | doNotEagerlyEvaluateConsole":{"message":"Do not eagerly evaluate console prompt text"},"panels/console/console-meta.ts | doNotGroupSimilarMessagesIn":{"message":"Do not group similar messages in console"},"panels/console/console-meta.ts | doNotShowCorsErrorsIn":{"message":"Do not show CORS errors in console"},"panels/console/console-meta.ts | doNotTreatEvaluationAsUser":{"message":"Do not treat evaluation as user activation"},"panels/console/console-meta.ts | eagerEvaluation":{"message":"Eager evaluation"},"panels/console/console-meta.ts | eagerlyEvaluateConsolePromptText":{"message":"Eagerly evaluate console prompt text"},"panels/console/console-meta.ts | evaluateTriggersUserActivation":{"message":"Treat code evaluation as user action"},"panels/console/console-meta.ts | expandConsoleTraceMessagesByDefault":{"message":"Automatically expand console.trace() messages"},"panels/console/console-meta.ts | groupSimilarMessagesInConsole":{"message":"Group similar messages in console"},"panels/console/console-meta.ts | hideNetworkMessages":{"message":"Hide network messages"},"panels/console/console-meta.ts | hideTimestamps":{"message":"Hide timestamps"},"panels/console/console-meta.ts | logXmlhttprequests":{"message":"Log XMLHttpRequests"},"panels/console/console-meta.ts | onlyShowMessagesFromTheCurrent":{"message":"Only show messages from the current context (top, iframe, worker, extension)"},"panels/console/console-meta.ts | selectedContextOnly":{"message":"Selected context only"},"panels/console/console-meta.ts | showConsole":{"message":"Show Console"},"panels/console/console-meta.ts | showCorsErrorsInConsole":{"message":"Show CORS errors in console"},"panels/console/console-meta.ts | showMessagesFromAllContexts":{"message":"Show messages from all contexts"},"panels/console/console-meta.ts | showNetworkMessages":{"message":"Show network messages"},"panels/console/console-meta.ts | showTimestamps":{"message":"Show timestamps"},"panels/console/console-meta.ts | treatEvaluationAsUserActivation":{"message":"Treat evaluation as user activation"},"panels/console/ConsoleContextSelector.ts | extension":{"message":"Extension"},"panels/console/ConsoleContextSelector.ts | javascriptContextNotSelected":{"message":"JavaScript context: Not selected"},"panels/console/ConsoleContextSelector.ts | javascriptContextS":{"message":"JavaScript context: {PH1}"},"panels/console/ConsolePinPane.ts | evaluateAllowingSideEffects":{"message":"Evaluate, allowing side effects"},"panels/console/ConsolePinPane.ts | expression":{"message":"Expression"},"panels/console/ConsolePinPane.ts | liveExpressionEditor":{"message":"Live expression editor"},"panels/console/ConsolePinPane.ts | notAvailable":{"message":"not available"},"panels/console/ConsolePinPane.ts | removeAllExpressions":{"message":"Remove all expressions"},"panels/console/ConsolePinPane.ts | removeBlankExpression":{"message":"Remove blank expression"},"panels/console/ConsolePinPane.ts | removeExpression":{"message":"Remove expression"},"panels/console/ConsolePinPane.ts | removeExpressionS":{"message":"Remove expression: {PH1}"},"panels/console/ConsolePrompt.ts | consolePrompt":{"message":"Console prompt"},"panels/console/ConsoleSidebar.ts | dErrors":{"message":"{n, plural, =0 {No errors} =1 {# error} other {# errors}}"},"panels/console/ConsoleSidebar.ts | dInfo":{"message":"{n, plural, =0 {No info} =1 {# info} other {# info}}"},"panels/console/ConsoleSidebar.ts | dMessages":{"message":"{n, plural, =0 {No messages} =1 {# message} other {# messages}}"},"panels/console/ConsoleSidebar.ts | dUserMessages":{"message":"{n, plural, =0 {No user messages} =1 {# user message} other {# user messages}}"},"panels/console/ConsoleSidebar.ts | dVerbose":{"message":"{n, plural, =0 {No verbose} =1 {# verbose} other {# verbose}}"},"panels/console/ConsoleSidebar.ts | dWarnings":{"message":"{n, plural, =0 {No warnings} =1 {# warning} other {# warnings}}"},"panels/console/ConsoleSidebar.ts | other":{"message":""},"panels/console/ConsoleView.ts | allLevels":{"message":"All levels"},"panels/console/ConsoleView.ts | autocompleteFromHistory":{"message":"Autocomplete from history"},"panels/console/ConsoleView.ts | consoleCleared":{"message":"Console cleared"},"panels/console/ConsoleView.ts | consolePasteBlocked":{"message":"Pasting code is blocked on this page. Pasting code into devtools can allow attackers to take over your account."},"panels/console/ConsoleView.ts | consoleSettings":{"message":"Console settings"},"panels/console/ConsoleView.ts | consoleSidebarHidden":{"message":"Console sidebar hidden"},"panels/console/ConsoleView.ts | consoleSidebarShown":{"message":"Console sidebar shown"},"panels/console/ConsoleView.ts | copyVisibleStyledSelection":{"message":"Copy visible styled selection"},"panels/console/ConsoleView.ts | customLevels":{"message":"Custom levels"},"panels/console/ConsoleView.ts | default":{"message":"Default"},"panels/console/ConsoleView.ts | defaultLevels":{"message":"Default levels"},"panels/console/ConsoleView.ts | doNotClearLogOnPageReload":{"message":"Do not clear log on page reload / navigation"},"panels/console/ConsoleView.ts | eagerlyEvaluateTextInThePrompt":{"message":"Eagerly evaluate text in the prompt"},"panels/console/ConsoleView.ts | egEventdCdnUrlacom":{"message":"e.g. /eventd/ -cdn url:a.com"},"panels/console/ConsoleView.ts | errors":{"message":"Errors"},"panels/console/ConsoleView.ts | filter":{"message":"Filter"},"panels/console/ConsoleView.ts | filteredMessagesInConsole":{"message":"{PH1} messages in console"},"panels/console/ConsoleView.ts | findStringInLogs":{"message":"Find string in logs"},"panels/console/ConsoleView.ts | groupSimilarMessagesInConsole":{"message":"Group similar messages in console"},"panels/console/ConsoleView.ts | hideAll":{"message":"Hide all"},"panels/console/ConsoleView.ts | hideConsoleSidebar":{"message":"Hide console sidebar"},"panels/console/ConsoleView.ts | hideMessagesFromS":{"message":"Hide messages from {PH1}"},"panels/console/ConsoleView.ts | hideNetwork":{"message":"Hide network"},"panels/console/ConsoleView.ts | info":{"message":"Info"},"panels/console/ConsoleView.ts | issuesWithColon":{"message":"{n, plural, =0 {No Issues} =1 {# Issue:} other {# Issues:}}"},"panels/console/ConsoleView.ts | issueToolbarClickToGoToTheIssuesTab":{"message":"Click to go to the issues tab"},"panels/console/ConsoleView.ts | issueToolbarClickToView":{"message":"Click to view {issueEnumeration}"},"panels/console/ConsoleView.ts | issueToolbarTooltipGeneral":{"message":"Some problems no longer generate console messages, but are surfaced in the issues tab."},"panels/console/ConsoleView.ts | logLevels":{"message":"Log levels"},"panels/console/ConsoleView.ts | logLevelS":{"message":"Log level: {PH1}"},"panels/console/ConsoleView.ts | logXMLHttpRequests":{"message":"Log XMLHttpRequests"},"panels/console/ConsoleView.ts | onlyShowMessagesFromTheCurrentContext":{"message":"Only show messages from the current context (top, iframe, worker, extension)"},"panels/console/ConsoleView.ts | overriddenByFilterSidebar":{"message":"Overridden by filter sidebar"},"panels/console/ConsoleView.ts | preserveLog":{"message":"Preserve log"},"panels/console/ConsoleView.ts | replayXhr":{"message":"Replay XHR"},"panels/console/ConsoleView.ts | saveAs":{"message":"Save as..."},"panels/console/ConsoleView.ts | searching":{"message":"Searching…"},"panels/console/ConsoleView.ts | selectedContextOnly":{"message":"Selected context only"},"panels/console/ConsoleView.ts | sHidden":{"message":"{n, plural, =1 {# hidden} other {# hidden}}"},"panels/console/ConsoleView.ts | showConsoleSidebar":{"message":"Show console sidebar"},"panels/console/ConsoleView.ts | showCorsErrorsInConsole":{"message":"Show CORS errors in console"},"panels/console/ConsoleView.ts | sOnly":{"message":"{PH1} only"},"panels/console/ConsoleView.ts | treatEvaluationAsUserActivation":{"message":"Treat evaluation as user activation"},"panels/console/ConsoleView.ts | verbose":{"message":"Verbose"},"panels/console/ConsoleView.ts | warnings":{"message":"Warnings"},"panels/console/ConsoleView.ts | writingFile":{"message":"Writing file…"},"panels/console/ConsoleViewMessage.ts | assertionFailed":{"message":"Assertion failed: "},"panels/console/ConsoleViewMessage.ts | attribute":{"message":""},"panels/console/ConsoleViewMessage.ts | clearAllMessagesWithS":{"message":"Clear all messages with {PH1}"},"panels/console/ConsoleViewMessage.ts | cndBreakpoint":{"message":"Conditional Breakpoint"},"panels/console/ConsoleViewMessage.ts | console":{"message":"Console"},"panels/console/ConsoleViewMessage.ts | consoleclearWasPreventedDueTo":{"message":"console.clear() was prevented due to 'Preserve log'"},"panels/console/ConsoleViewMessage.ts | consoleWasCleared":{"message":"Console was cleared"},"panels/console/ConsoleViewMessage.ts | deprecationS":{"message":"[Deprecation] {PH1}"},"panels/console/ConsoleViewMessage.ts | error":{"message":"Error"},"panels/console/ConsoleViewMessage.ts | errorS":{"message":"{n, plural, =1 {Error, Repeated # time} other {Error, Repeated # times}}"},"panels/console/ConsoleViewMessage.ts | exception":{"message":""},"panels/console/ConsoleViewMessage.ts | functionWasResolvedFromBound":{"message":"Function was resolved from bound function."},"panels/console/ConsoleViewMessage.ts | index":{"message":"(index)"},"panels/console/ConsoleViewMessage.ts | interventionS":{"message":"[Intervention] {PH1}"},"panels/console/ConsoleViewMessage.ts | logpoint":{"message":"Logpoint"},"panels/console/ConsoleViewMessage.ts | Mxx":{"message":" M"},"panels/console/ConsoleViewMessage.ts | repeatS":{"message":"{n, plural, =1 {Repeated # time} other {Repeated # times}}"},"panels/console/ConsoleViewMessage.ts | someEvent":{"message":" event"},"panels/console/ConsoleViewMessage.ts | stackMessageCollapsed":{"message":"Stack table collapsed"},"panels/console/ConsoleViewMessage.ts | stackMessageExpanded":{"message":"Stack table expanded"},"panels/console/ConsoleViewMessage.ts | thisValueWasEvaluatedUponFirst":{"message":"This value was evaluated upon first expanding. It may have changed since then."},"panels/console/ConsoleViewMessage.ts | thisValueWillNotBeCollectedUntil":{"message":"This value will not be collected until console is cleared."},"panels/console/ConsoleViewMessage.ts | tookNms":{"message":"took ms"},"panels/console/ConsoleViewMessage.ts | url":{"message":""},"panels/console/ConsoleViewMessage.ts | value":{"message":"Value"},"panels/console/ConsoleViewMessage.ts | violationS":{"message":"[Violation] {PH1}"},"panels/console/ConsoleViewMessage.ts | warning":{"message":"Warning"},"panels/console/ConsoleViewMessage.ts | warningS":{"message":"{n, plural, =1 {Warning, Repeated # time} other {Warning, Repeated # times}}"},"panels/coverage/coverage-meta.ts | coverage":{"message":"Coverage"},"panels/coverage/coverage-meta.ts | instrumentCoverage":{"message":"Instrument coverage"},"panels/coverage/coverage-meta.ts | reloadPage":{"message":"Reload page"},"panels/coverage/coverage-meta.ts | showCoverage":{"message":"Show Coverage"},"panels/coverage/coverage-meta.ts | startInstrumentingCoverageAnd":{"message":"Start instrumenting coverage and reload page"},"panels/coverage/coverage-meta.ts | stopInstrumentingCoverageAndShow":{"message":"Stop instrumenting coverage and show results"},"panels/coverage/CoverageListView.ts | codeCoverage":{"message":"Code Coverage"},"panels/coverage/CoverageListView.ts | css":{"message":"CSS"},"panels/coverage/CoverageListView.ts | jsCoverageWithPerBlock":{"message":"JS coverage with per block granularity: Once a block of JavaScript was executed, that block is marked as covered."},"panels/coverage/CoverageListView.ts | jsCoverageWithPerFunction":{"message":"JS coverage with per function granularity: Once a function was executed, the whole function is marked as covered."},"panels/coverage/CoverageListView.ts | jsPerBlock":{"message":"JS (per block)"},"panels/coverage/CoverageListView.ts | jsPerFunction":{"message":"JS (per function)"},"panels/coverage/CoverageListView.ts | sBytes":{"message":"{n, plural, =1 {# byte} other {# bytes}}"},"panels/coverage/CoverageListView.ts | sBytesS":{"message":"{n, plural, =1 {# byte, {percentage}} other {# bytes, {percentage}}}"},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOf":{"message":"{PH1} bytes ({PH2}) belong to blocks of JavaScript that have not (yet) been executed."},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOfJavascript":{"message":"{PH1} bytes ({PH2}) belong to blocks of JavaScript that have executed at least once."},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHave":{"message":"{PH1} bytes ({PH2}) belong to functions that have not (yet) been executed."},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHaveExecuted":{"message":"{PH1} bytes ({PH2}) belong to functions that have executed at least once."},"panels/coverage/CoverageListView.ts | sOfFileUnusedSOfFileUsed":{"message":"{PH1} % of file unused, {PH2} % of file used"},"panels/coverage/CoverageListView.ts | totalBytes":{"message":"Total Bytes"},"panels/coverage/CoverageListView.ts | type":{"message":"Type"},"panels/coverage/CoverageListView.ts | unusedBytes":{"message":"Unused Bytes"},"panels/coverage/CoverageListView.ts | url":{"message":"URL"},"panels/coverage/CoverageListView.ts | usageVisualization":{"message":"Usage Visualization"},"panels/coverage/CoverageView.ts | activationNoCapture":{"message":"Could not capture coverage info because the page was prerendered in the background."},"panels/coverage/CoverageView.ts | all":{"message":"All"},"panels/coverage/CoverageView.ts | bfcacheNoCapture":{"message":"Could not capture coverage info because the page was served from the back/forward cache."},"panels/coverage/CoverageView.ts | chooseCoverageGranularityPer":{"message":"Choose coverage granularity: Per function has low overhead, per block has significant overhead."},"panels/coverage/CoverageView.ts | clearAll":{"message":"Clear all"},"panels/coverage/CoverageView.ts | clickTheRecordButtonSToStart":{"message":"Click the record button {PH1} to start capturing coverage."},"panels/coverage/CoverageView.ts | clickTheReloadButtonSToReloadAnd":{"message":"Click the reload button {PH1} to reload and start capturing coverage."},"panels/coverage/CoverageView.ts | contentScripts":{"message":"Content scripts"},"panels/coverage/CoverageView.ts | css":{"message":"CSS"},"panels/coverage/CoverageView.ts | export":{"message":"Export..."},"panels/coverage/CoverageView.ts | filterCoverageByType":{"message":"Filter coverage by type"},"panels/coverage/CoverageView.ts | filteredSTotalS":{"message":"Filtered: {PH1} Total: {PH2}"},"panels/coverage/CoverageView.ts | includeExtensionContentScripts":{"message":"Include extension content scripts"},"panels/coverage/CoverageView.ts | javascript":{"message":"JavaScript"},"panels/coverage/CoverageView.ts | perBlock":{"message":"Per block"},"panels/coverage/CoverageView.ts | perFunction":{"message":"Per function"},"panels/coverage/CoverageView.ts | reloadPrompt":{"message":"Click the reload button {PH1} to reload and get coverage."},"panels/coverage/CoverageView.ts | sOfSSUsedSoFarSUnused":{"message":"{PH1} of {PH2} ({PH3}%) used so far, {PH4} unused."},"panels/coverage/CoverageView.ts | urlFilter":{"message":"URL filter"},"panels/css_overview/components/CSSOverviewStartView.ts | captureOverview":{"message":"Capture overview"},"panels/css_overview/components/CSSOverviewStartView.ts | capturePageCSSOverview":{"message":"Capture an overview of your page’s CSS"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovements":{"message":"Identify potential CSS improvements"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovementsWithExampleIssues":{"message":"Identify potential CSS improvements (e.g. low contrast issues, unused declarations, color or font mismatches)"},"panels/css_overview/components/CSSOverviewStartView.ts | locateAffectedElements":{"message":"Locate the affected elements in the Elements panel"},"panels/css_overview/components/CSSOverviewStartView.ts | quickStartWithCSSOverview":{"message":"Quick start: get started with the new CSS Overview panel"},"panels/css_overview/css_overview-meta.ts | cssOverview":{"message":"CSS Overview"},"panels/css_overview/css_overview-meta.ts | showCssOverview":{"message":"Show CSS Overview"},"panels/css_overview/CSSOverviewCompletedView.ts | aa":{"message":"AA"},"panels/css_overview/CSSOverviewCompletedView.ts | aaa":{"message":"AAA"},"panels/css_overview/CSSOverviewCompletedView.ts | apca":{"message":"APCA"},"panels/css_overview/CSSOverviewCompletedView.ts | attributeSelectors":{"message":"Attribute selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | backgroundColorsS":{"message":"Background colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | borderColorsS":{"message":"Border colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | classSelectors":{"message":"Class selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | colors":{"message":"Colors"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssues":{"message":"Contrast issues"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssuesS":{"message":"Contrast issues: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastRatio":{"message":"Contrast ratio"},"panels/css_overview/CSSOverviewCompletedView.ts | cssOverviewElements":{"message":"CSS Overview Elements"},"panels/css_overview/CSSOverviewCompletedView.ts | declaration":{"message":"Declaration"},"panels/css_overview/CSSOverviewCompletedView.ts | element":{"message":"Element"},"panels/css_overview/CSSOverviewCompletedView.ts | elements":{"message":"Elements"},"panels/css_overview/CSSOverviewCompletedView.ts | externalStylesheets":{"message":"External stylesheets"},"panels/css_overview/CSSOverviewCompletedView.ts | fillColorsS":{"message":"Fill colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | fontInfo":{"message":"Font info"},"panels/css_overview/CSSOverviewCompletedView.ts | idSelectors":{"message":"ID selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | inlineStyleElements":{"message":"Inline style elements"},"panels/css_overview/CSSOverviewCompletedView.ts | mediaQueries":{"message":"Media queries"},"panels/css_overview/CSSOverviewCompletedView.ts | nOccurrences":{"message":"{n, plural, =1 {# occurrence} other {# occurrences}}"},"panels/css_overview/CSSOverviewCompletedView.ts | nonsimpleSelectors":{"message":"Non-simple selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | overviewSummary":{"message":"Overview summary"},"panels/css_overview/CSSOverviewCompletedView.ts | showElement":{"message":"Show element"},"panels/css_overview/CSSOverviewCompletedView.ts | source":{"message":"Source"},"panels/css_overview/CSSOverviewCompletedView.ts | styleRules":{"message":"Style rules"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorSOverSBackgroundResults":{"message":"Text color {PH1} over {PH2} background results in low contrast for {PH3} elements"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorsS":{"message":"Text colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoFonts":{"message":"There are no fonts."},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoMediaQueries":{"message":"There are no media queries."},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoUnusedDeclarations":{"message":"There are no unused declarations."},"panels/css_overview/CSSOverviewCompletedView.ts | typeSelectors":{"message":"Type selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | universalSelectors":{"message":"Universal selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | unusedDeclarations":{"message":"Unused declarations"},"panels/css_overview/CSSOverviewProcessingView.ts | cancel":{"message":"Cancel"},"panels/css_overview/CSSOverviewSidebarPanel.ts | clearOverview":{"message":"Clear overview"},"panels/css_overview/CSSOverviewSidebarPanel.ts | cssOverviewPanelSidebar":{"message":"CSS Overview panel sidebar"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | bottomAppliedToAStatically":{"message":"Bottom applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | heightAppliedToAnInlineElement":{"message":"Height applied to an inline element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | leftAppliedToAStatically":{"message":"Left applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | rightAppliedToAStatically":{"message":"Right applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | topAppliedToAStatically":{"message":"Top applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | verticalAlignmentAppliedTo":{"message":"Vertical alignment applied to element which is neither inline nor table-cell"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | widthAppliedToAnInlineElement":{"message":"Width applied to an inline element"},"panels/developer_resources/developer_resources-meta.ts | developerResources":{"message":"Developer Resources"},"panels/developer_resources/developer_resources-meta.ts | showDeveloperResources":{"message":"Show Developer Resources"},"panels/developer_resources/DeveloperResourcesListView.ts | copyInitiatorUrl":{"message":"Copy initiator URL"},"panels/developer_resources/DeveloperResourcesListView.ts | copyUrl":{"message":"Copy URL"},"panels/developer_resources/DeveloperResourcesListView.ts | developerResources":{"message":"Developer Resources"},"panels/developer_resources/DeveloperResourcesListView.ts | error":{"message":"Error"},"panels/developer_resources/DeveloperResourcesListView.ts | failure":{"message":"failure"},"panels/developer_resources/DeveloperResourcesListView.ts | initiator":{"message":"Initiator"},"panels/developer_resources/DeveloperResourcesListView.ts | pending":{"message":"pending"},"panels/developer_resources/DeveloperResourcesListView.ts | sBytes":{"message":"{n, plural, =1 {# byte} other {# bytes}}"},"panels/developer_resources/DeveloperResourcesListView.ts | status":{"message":"Status"},"panels/developer_resources/DeveloperResourcesListView.ts | success":{"message":"success"},"panels/developer_resources/DeveloperResourcesListView.ts | totalBytes":{"message":"Total Bytes"},"panels/developer_resources/DeveloperResourcesListView.ts | url":{"message":"URL"},"panels/developer_resources/DeveloperResourcesView.ts | enableLoadingThroughTarget":{"message":"Load through website"},"panels/developer_resources/DeveloperResourcesView.ts | enterTextToSearchTheUrlAndError":{"message":"Enter text to search the URL and Error columns"},"panels/developer_resources/DeveloperResourcesView.ts | loadHttpsDeveloperResources":{"message":"Load HTTP(S) developer resources through the website you inspect, not through DevTools"},"panels/developer_resources/DeveloperResourcesView.ts | resources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/developer_resources/DeveloperResourcesView.ts | resourcesCurrentlyLoading":{"message":"{PH1} resources, {PH2} currently loading"},"panels/elements/ClassesPaneWidget.ts | addNewClass":{"message":"Add new class"},"panels/elements/ClassesPaneWidget.ts | classesSAdded":{"message":"Classes {PH1} added"},"panels/elements/ClassesPaneWidget.ts | classSAdded":{"message":"Class {PH1} added"},"panels/elements/ClassesPaneWidget.ts | elementClasses":{"message":"Element Classes"},"panels/elements/ColorSwatchPopoverIcon.ts | openCubicBezierEditor":{"message":"Open cubic bezier editor"},"panels/elements/ColorSwatchPopoverIcon.ts | openShadowEditor":{"message":"Open shadow editor"},"panels/elements/components/AccessibilityTreeNode.ts | ignored":{"message":"Ignored"},"panels/elements/components/AdornerSettingsPane.ts | closeButton":{"message":"Close"},"panels/elements/components/AdornerSettingsPane.ts | settingsTitle":{"message":"Show badges"},"panels/elements/components/CSSHintDetailsView.ts | learnMore":{"message":"Learn More"},"panels/elements/components/CSSPropertyDocsView.ts | dontShow":{"message":"Don't show"},"panels/elements/components/CSSPropertyDocsView.ts | learnMore":{"message":"Learn more"},"panels/elements/components/ElementsBreadcrumbs.ts | breadcrumbs":{"message":"DOM tree breadcrumbs"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollLeft":{"message":"Scroll left"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollRight":{"message":"Scroll right"},"panels/elements/components/ElementsBreadcrumbsUtils.ts | text":{"message":"(text)"},"panels/elements/components/LayoutPane.ts | chooseElementOverlayColor":{"message":"Choose the overlay color for this element"},"panels/elements/components/LayoutPane.ts | colorPickerOpened":{"message":"Color picker opened."},"panels/elements/components/LayoutPane.ts | flexbox":{"message":"Flexbox"},"panels/elements/components/LayoutPane.ts | flexboxOverlays":{"message":"Flexbox overlays"},"panels/elements/components/LayoutPane.ts | grid":{"message":"Grid"},"panels/elements/components/LayoutPane.ts | gridOverlays":{"message":"Grid overlays"},"panels/elements/components/LayoutPane.ts | noFlexboxLayoutsFoundOnThisPage":{"message":"No flexbox layouts found on this page"},"panels/elements/components/LayoutPane.ts | noGridLayoutsFoundOnThisPage":{"message":"No grid layouts found on this page"},"panels/elements/components/LayoutPane.ts | overlayDisplaySettings":{"message":"Overlay display settings"},"panels/elements/components/LayoutPane.ts | showElementInTheElementsPanel":{"message":"Show element in the Elements panel"},"panels/elements/components/StylePropertyEditor.ts | deselectButton":{"message":"Remove {propertyName}: {propertyValue}"},"panels/elements/components/StylePropertyEditor.ts | selectButton":{"message":"Add {propertyName}: {propertyValue}"},"panels/elements/ComputedStyleWidget.ts | filter":{"message":"Filter"},"panels/elements/ComputedStyleWidget.ts | filterComputedStyles":{"message":"Filter Computed Styles"},"panels/elements/ComputedStyleWidget.ts | group":{"message":"Group"},"panels/elements/ComputedStyleWidget.ts | navigateToSelectorSource":{"message":"Navigate to selector source"},"panels/elements/ComputedStyleWidget.ts | navigateToStyle":{"message":"Navigate to style"},"panels/elements/ComputedStyleWidget.ts | noMatchingProperty":{"message":"No matching property"},"panels/elements/ComputedStyleWidget.ts | showAll":{"message":"Show all"},"panels/elements/CSSRuleValidator.ts | fontVariationSettingsWarning":{"message":"Value for setting “{PH1}” {PH2} is outside the supported range [{PH3}, {PH4}] for font-family “{PH5}”."},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleFix":{"message":"Try setting the {EXISTING_PARENT_ELEMENT_RULE} property on the parent to {TARGET_PARENT_ELEMENT_RULE}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleReason":{"message":"The {REASON_PROPERTY_DECLARATION_CODE} property on the parent element prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleChangeSuggestion":{"message":"Try setting the {EXISTING_PROPERTY_DECLARATION} property to {TARGET_PROPERTY_DECLARATION}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleFix":{"message":"Try setting {PROPERTY_NAME} to something other than {PROPERTY_VALUE}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleReason":{"message":"The {REASON_PROPERTY_DECLARATION_CODE} property prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect."},"panels/elements/DOMLinkifier.ts | node":{"message":""},"panels/elements/elements-meta.ts | captureAreaScreenshot":{"message":"Capture area screenshot"},"panels/elements/elements-meta.ts | copyStyles":{"message":"Copy styles"},"panels/elements/elements-meta.ts | disableDomWordWrap":{"message":"Disable DOM word wrap"},"panels/elements/elements-meta.ts | duplicateElement":{"message":"Duplicate element"},"panels/elements/elements-meta.ts | editAsHtml":{"message":"Edit as HTML"},"panels/elements/elements-meta.ts | elements":{"message":"Elements"},"panels/elements/elements-meta.ts | enableDomWordWrap":{"message":"Enable DOM word wrap"},"panels/elements/elements-meta.ts | eventListeners":{"message":"Event Listeners"},"panels/elements/elements-meta.ts | hideElement":{"message":"Hide element"},"panels/elements/elements-meta.ts | hideHtmlComments":{"message":"Hide HTML comments"},"panels/elements/elements-meta.ts | layout":{"message":"Layout"},"panels/elements/elements-meta.ts | properties":{"message":"Properties"},"panels/elements/elements-meta.ts | redo":{"message":"Redo"},"panels/elements/elements-meta.ts | revealDomNodeOnHover":{"message":"Reveal DOM node on hover"},"panels/elements/elements-meta.ts | selectAnElementInThePageTo":{"message":"Select an element in the page to inspect it"},"panels/elements/elements-meta.ts | showComputedStyles":{"message":"Show Computed Styles"},"panels/elements/elements-meta.ts | showCSSDocumentationTooltip":{"message":"Show CSS documentation tooltip"},"panels/elements/elements-meta.ts | showDetailedInspectTooltip":{"message":"Show detailed inspect tooltip"},"panels/elements/elements-meta.ts | showElements":{"message":"Show Elements"},"panels/elements/elements-meta.ts | showEventListeners":{"message":"Show Event Listeners"},"panels/elements/elements-meta.ts | showHtmlComments":{"message":"Show HTML comments"},"panels/elements/elements-meta.ts | showLayout":{"message":"Show Layout"},"panels/elements/elements-meta.ts | showProperties":{"message":"Show Properties"},"panels/elements/elements-meta.ts | showStackTrace":{"message":"Show Stack Trace"},"panels/elements/elements-meta.ts | showStyles":{"message":"Show Styles"},"panels/elements/elements-meta.ts | showUserAgentShadowDOM":{"message":"Show user agent shadow DOM"},"panels/elements/elements-meta.ts | stackTrace":{"message":"Stack Trace"},"panels/elements/elements-meta.ts | toggleEyeDropper":{"message":"Toggle eye dropper"},"panels/elements/elements-meta.ts | undo":{"message":"Undo"},"panels/elements/elements-meta.ts | wordWrap":{"message":"Word wrap"},"panels/elements/ElementsPanel.ts | computed":{"message":"Computed"},"panels/elements/ElementsPanel.ts | computedStylesHidden":{"message":"Computed Styles sidebar hidden"},"panels/elements/ElementsPanel.ts | computedStylesShown":{"message":"Computed Styles sidebar shown"},"panels/elements/ElementsPanel.ts | domTreeExplorer":{"message":"DOM tree explorer"},"panels/elements/ElementsPanel.ts | elementStateS":{"message":"Element state: {PH1}"},"panels/elements/ElementsPanel.ts | findByStringSelectorOrXpath":{"message":"Find by string, selector, or XPath"},"panels/elements/ElementsPanel.ts | hideComputedStylesSidebar":{"message":"Hide Computed Styles sidebar"},"panels/elements/ElementsPanel.ts | nodeCannotBeFoundInTheCurrent":{"message":"Node cannot be found in the current page."},"panels/elements/ElementsPanel.ts | revealInElementsPanel":{"message":"Reveal in Elements panel"},"panels/elements/ElementsPanel.ts | showComputedStylesSidebar":{"message":"Show Computed Styles sidebar"},"panels/elements/ElementsPanel.ts | sidePanelContent":{"message":"Side panel content"},"panels/elements/ElementsPanel.ts | sidePanelToolbar":{"message":"Side panel toolbar"},"panels/elements/ElementsPanel.ts | styles":{"message":"Styles"},"panels/elements/ElementsPanel.ts | switchToAccessibilityTreeView":{"message":"Switch to Accessibility Tree view"},"panels/elements/ElementsPanel.ts | switchToDomTreeView":{"message":"Switch to DOM Tree view"},"panels/elements/ElementsPanel.ts | theDeferredDomNodeCouldNotBe":{"message":"The deferred DOM Node could not be resolved to a valid node."},"panels/elements/ElementsPanel.ts | theRemoteObjectCouldNotBe":{"message":"The remote object could not be resolved to a valid node."},"panels/elements/ElementStatePaneWidget.ts | forceElementState":{"message":"Force element state"},"panels/elements/ElementStatePaneWidget.ts | toggleElementState":{"message":"Toggle Element State"},"panels/elements/ElementsTreeElement.ts | addAttribute":{"message":"Add attribute"},"panels/elements/ElementsTreeElement.ts | captureNodeScreenshot":{"message":"Capture node screenshot"},"panels/elements/ElementsTreeElement.ts | children":{"message":"Children:"},"panels/elements/ElementsTreeElement.ts | collapseChildren":{"message":"Collapse children"},"panels/elements/ElementsTreeElement.ts | copy":{"message":"Copy"},"panels/elements/ElementsTreeElement.ts | copyElement":{"message":"Copy element"},"panels/elements/ElementsTreeElement.ts | copyFullXpath":{"message":"Copy full XPath"},"panels/elements/ElementsTreeElement.ts | copyJsPath":{"message":"Copy JS path"},"panels/elements/ElementsTreeElement.ts | copyOuterhtml":{"message":"Copy outerHTML"},"panels/elements/ElementsTreeElement.ts | copySelector":{"message":"Copy selector"},"panels/elements/ElementsTreeElement.ts | copyStyles":{"message":"Copy styles"},"panels/elements/ElementsTreeElement.ts | copyXpath":{"message":"Copy XPath"},"panels/elements/ElementsTreeElement.ts | cut":{"message":"Cut"},"panels/elements/ElementsTreeElement.ts | deleteElement":{"message":"Delete element"},"panels/elements/ElementsTreeElement.ts | disableFlexMode":{"message":"Disable flex mode"},"panels/elements/ElementsTreeElement.ts | disableGridMode":{"message":"Disable grid mode"},"panels/elements/ElementsTreeElement.ts | disableScrollSnap":{"message":"Disable scroll-snap overlay"},"panels/elements/ElementsTreeElement.ts | duplicateElement":{"message":"Duplicate element"},"panels/elements/ElementsTreeElement.ts | editAsHtml":{"message":"Edit as HTML"},"panels/elements/ElementsTreeElement.ts | editAttribute":{"message":"Edit attribute"},"panels/elements/ElementsTreeElement.ts | editText":{"message":"Edit text"},"panels/elements/ElementsTreeElement.ts | enableFlexMode":{"message":"Enable flex mode"},"panels/elements/ElementsTreeElement.ts | enableGridMode":{"message":"Enable grid mode"},"panels/elements/ElementsTreeElement.ts | enableScrollSnap":{"message":"Enable scroll-snap overlay"},"panels/elements/ElementsTreeElement.ts | expandRecursively":{"message":"Expand recursively"},"panels/elements/ElementsTreeElement.ts | focus":{"message":"Focus"},"panels/elements/ElementsTreeElement.ts | forceState":{"message":"Force state"},"panels/elements/ElementsTreeElement.ts | hideElement":{"message":"Hide element"},"panels/elements/ElementsTreeElement.ts | paste":{"message":"Paste"},"panels/elements/ElementsTreeElement.ts | scrollIntoView":{"message":"Scroll into view"},"panels/elements/ElementsTreeElement.ts | showFrameDetails":{"message":"Show iframe details"},"panels/elements/ElementsTreeElement.ts | thisFrameWasIdentifiedAsAnAd":{"message":"This frame was identified as an ad frame"},"panels/elements/ElementsTreeElement.ts | useSInTheConsoleToReferToThis":{"message":"Use {PH1} in the console to refer to this element."},"panels/elements/ElementsTreeElement.ts | valueIsTooLargeToEdit":{"message":""},"panels/elements/ElementsTreeOutline.ts | adornerSettings":{"message":"Badge settings…"},"panels/elements/ElementsTreeOutline.ts | pageDom":{"message":"Page DOM"},"panels/elements/ElementsTreeOutline.ts | reveal":{"message":"reveal"},"panels/elements/ElementsTreeOutline.ts | showAllNodesDMore":{"message":"Show All Nodes ({PH1} More)"},"panels/elements/ElementsTreeOutline.ts | storeAsGlobalVariable":{"message":"Store as global variable"},"panels/elements/EventListenersWidget.ts | all":{"message":"All"},"panels/elements/EventListenersWidget.ts | ancestors":{"message":"Ancestors"},"panels/elements/EventListenersWidget.ts | blocking":{"message":"Blocking"},"panels/elements/EventListenersWidget.ts | eventListenersCategory":{"message":"Event listeners category"},"panels/elements/EventListenersWidget.ts | frameworkListeners":{"message":"Framework listeners"},"panels/elements/EventListenersWidget.ts | passive":{"message":"Passive"},"panels/elements/EventListenersWidget.ts | refresh":{"message":"Refresh"},"panels/elements/EventListenersWidget.ts | resolveEventListenersBoundWith":{"message":"Resolve event listeners bound with framework"},"panels/elements/EventListenersWidget.ts | showListenersOnTheAncestors":{"message":"Show listeners on the ancestors"},"panels/elements/LayersWidget.ts | cssLayersTitle":{"message":"CSS layers"},"panels/elements/LayersWidget.ts | toggleCSSLayers":{"message":"Toggle CSS Layers view"},"panels/elements/MarkerDecorator.ts | domBreakpoint":{"message":"DOM Breakpoint"},"panels/elements/MarkerDecorator.ts | elementIsHidden":{"message":"Element is hidden"},"panels/elements/NodeStackTraceWidget.ts | noStackTraceAvailable":{"message":"No stack trace available"},"panels/elements/PlatformFontsWidget.ts | dGlyphs":{"message":"{n, plural, =1 {(# glyph)} other {(# glyphs)}}"},"panels/elements/PlatformFontsWidget.ts | localFile":{"message":"Local file"},"panels/elements/PlatformFontsWidget.ts | networkResource":{"message":"Network resource"},"panels/elements/PlatformFontsWidget.ts | renderedFonts":{"message":"Rendered Fonts"},"panels/elements/PropertiesWidget.ts | filter":{"message":"Filter"},"panels/elements/PropertiesWidget.ts | filterProperties":{"message":"Filter Properties"},"panels/elements/PropertiesWidget.ts | noMatchingProperty":{"message":"No matching property"},"panels/elements/PropertiesWidget.ts | showAll":{"message":"Show all"},"panels/elements/PropertiesWidget.ts | showAllTooltip":{"message":"When unchecked, only properties whose values are neither null nor undefined will be shown"},"panels/elements/StylePropertiesSection.ts | constructedStylesheet":{"message":"constructed stylesheet"},"panels/elements/StylePropertiesSection.ts | copyAllCSSChanges":{"message":"Copy all CSS changes"},"panels/elements/StylePropertiesSection.ts | copyAllDeclarations":{"message":"Copy all declarations"},"panels/elements/StylePropertiesSection.ts | copyRule":{"message":"Copy rule"},"panels/elements/StylePropertiesSection.ts | copySelector":{"message":"Copy selector"},"panels/elements/StylePropertiesSection.ts | cssSelector":{"message":"CSS selector"},"panels/elements/StylePropertiesSection.ts | injectedStylesheet":{"message":"injected stylesheet"},"panels/elements/StylePropertiesSection.ts | insertStyleRuleBelow":{"message":"Insert Style Rule Below"},"panels/elements/StylePropertiesSection.ts | sattributesStyle":{"message":"{PH1}[Attributes Style]"},"panels/elements/StylePropertiesSection.ts | showAllPropertiesSMore":{"message":"Show All Properties ({PH1} more)"},"panels/elements/StylePropertiesSection.ts | styleAttribute":{"message":"style attribute"},"panels/elements/StylePropertiesSection.ts | userAgentStylesheet":{"message":"user agent stylesheet"},"panels/elements/StylePropertiesSection.ts | viaInspector":{"message":"via inspector"},"panels/elements/StylePropertyTreeElement.ts | copyAllCSSChanges":{"message":"Copy all CSS changes"},"panels/elements/StylePropertyTreeElement.ts | copyAllCssDeclarationsAsJs":{"message":"Copy all declarations as JS"},"panels/elements/StylePropertyTreeElement.ts | copyAllDeclarations":{"message":"Copy all declarations"},"panels/elements/StylePropertyTreeElement.ts | copyCssDeclarationAsJs":{"message":"Copy declaration as JS"},"panels/elements/StylePropertyTreeElement.ts | copyDeclaration":{"message":"Copy declaration"},"panels/elements/StylePropertyTreeElement.ts | copyProperty":{"message":"Copy property"},"panels/elements/StylePropertyTreeElement.ts | copyRule":{"message":"Copy rule"},"panels/elements/StylePropertyTreeElement.ts | copyValue":{"message":"Copy value"},"panels/elements/StylePropertyTreeElement.ts | flexboxEditorButton":{"message":"Open flexbox editor"},"panels/elements/StylePropertyTreeElement.ts | gridEditorButton":{"message":"Open grid editor"},"panels/elements/StylePropertyTreeElement.ts | openColorPickerS":{"message":"Open color picker. {PH1}"},"panels/elements/StylePropertyTreeElement.ts | revealInSourcesPanel":{"message":"Reveal in Sources panel"},"panels/elements/StylePropertyTreeElement.ts | shiftClickToChangeColorFormat":{"message":"Shift + Click to change color format."},"panels/elements/StylePropertyTreeElement.ts | togglePropertyAndContinueEditing":{"message":"Toggle property and continue editing"},"panels/elements/StylePropertyTreeElement.ts | viewComputedValue":{"message":"View computed value"},"panels/elements/StylesSidebarPane.ts | automaticDarkMode":{"message":"Automatic dark mode"},"panels/elements/StylesSidebarPane.ts | clickToRevealLayer":{"message":"Click to reveal layer in layer tree"},"panels/elements/StylesSidebarPane.ts | copiedToClipboard":{"message":"Copied to clipboard"},"panels/elements/StylesSidebarPane.ts | copyAllCSSChanges":{"message":"Copy CSS changes"},"panels/elements/StylesSidebarPane.ts | cssPropertyName":{"message":"CSS property name: {PH1}"},"panels/elements/StylesSidebarPane.ts | cssPropertyValue":{"message":"CSS property value: {PH1}"},"panels/elements/StylesSidebarPane.ts | filter":{"message":"Filter"},"panels/elements/StylesSidebarPane.ts | filterStyles":{"message":"Filter Styles"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelHundred":{"message":"Increment/decrement with mousewheel or up/down keys. {PH1}: ±100, Shift: ±10, Alt: ±0.1"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelOne":{"message":"Increment/decrement with mousewheel or up/down keys. {PH1}: R ±1, Shift: G ±1, Alt: B ±1"},"panels/elements/StylesSidebarPane.ts | inheritedFroms":{"message":"Inherited from "},"panels/elements/StylesSidebarPane.ts | inheritedFromSPseudoOf":{"message":"Inherited from ::{PH1} pseudo of "},"panels/elements/StylesSidebarPane.ts | invalidPropertyValue":{"message":"Invalid property value"},"panels/elements/StylesSidebarPane.ts | invalidString":{"message":"{PH1}, property name: {PH2}, property value: {PH3}"},"panels/elements/StylesSidebarPane.ts | layer":{"message":"Layer"},"panels/elements/StylesSidebarPane.ts | newStyleRule":{"message":"New Style Rule"},"panels/elements/StylesSidebarPane.ts | noMatchingSelectorOrStyle":{"message":"No matching selector or style"},"panels/elements/StylesSidebarPane.ts | pseudoSElement":{"message":"Pseudo ::{PH1} element"},"panels/elements/StylesSidebarPane.ts | specificity":{"message":"Specificity: {PH1}"},"panels/elements/StylesSidebarPane.ts | toggleRenderingEmulations":{"message":"Toggle common rendering emulations"},"panels/elements/StylesSidebarPane.ts | unknownPropertyName":{"message":"Unknown property name"},"panels/elements/StylesSidebarPane.ts | visibleSelectors":{"message":"{n, plural, =1 {# visible selector listed below} other {# visible selectors listed below}}"},"panels/elements/TopLayerContainer.ts | reveal":{"message":"reveal"},"panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio":{"message":"Add device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | addDeviceType":{"message":"Add device type"},"panels/emulation/DeviceModeToolbar.ts | autoadjustZoom":{"message":"Auto-adjust zoom"},"panels/emulation/DeviceModeToolbar.ts | closeDevtools":{"message":"Close DevTools"},"panels/emulation/DeviceModeToolbar.ts | defaultF":{"message":"Default: {PH1}"},"panels/emulation/DeviceModeToolbar.ts | devicePixelRatio":{"message":"Device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | deviceType":{"message":"Device type"},"panels/emulation/DeviceModeToolbar.ts | dimensions":{"message":"Dimensions"},"panels/emulation/DeviceModeToolbar.ts | edit":{"message":"Edit…"},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeature":{"message":"\"Experimental Web Platform Feature\" flag is enabled. Click to disable it."},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeatureFlag":{"message":"\"Experimental Web Platform Feature\" flag is disabled. Click to enable it."},"panels/emulation/DeviceModeToolbar.ts | fitToWindowF":{"message":"Fit to window ({PH1}%)"},"panels/emulation/DeviceModeToolbar.ts | heightLeaveEmptyForFull":{"message":"Height (leave empty for full)"},"panels/emulation/DeviceModeToolbar.ts | hideDeviceFrame":{"message":"Hide device frame"},"panels/emulation/DeviceModeToolbar.ts | hideMediaQueries":{"message":"Hide media queries"},"panels/emulation/DeviceModeToolbar.ts | hideRulers":{"message":"Hide rulers"},"panels/emulation/DeviceModeToolbar.ts | landscape":{"message":"Landscape"},"panels/emulation/DeviceModeToolbar.ts | moreOptions":{"message":"More options"},"panels/emulation/DeviceModeToolbar.ts | none":{"message":"None"},"panels/emulation/DeviceModeToolbar.ts | portrait":{"message":"Portrait"},"panels/emulation/DeviceModeToolbar.ts | removeDevicePixelRatio":{"message":"Remove device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | removeDeviceType":{"message":"Remove device type"},"panels/emulation/DeviceModeToolbar.ts | resetToDefaults":{"message":"Reset to defaults"},"panels/emulation/DeviceModeToolbar.ts | responsive":{"message":"Responsive"},"panels/emulation/DeviceModeToolbar.ts | rotate":{"message":"Rotate"},"panels/emulation/DeviceModeToolbar.ts | screenOrientationOptions":{"message":"Screen orientation options"},"panels/emulation/DeviceModeToolbar.ts | showDeviceFrame":{"message":"Show device frame"},"panels/emulation/DeviceModeToolbar.ts | showMediaQueries":{"message":"Show media queries"},"panels/emulation/DeviceModeToolbar.ts | showRulers":{"message":"Show rulers"},"panels/emulation/DeviceModeToolbar.ts | toggleDualscreenMode":{"message":"Toggle dual-screen mode"},"panels/emulation/DeviceModeToolbar.ts | width":{"message":"Width"},"panels/emulation/DeviceModeToolbar.ts | zoom":{"message":"Zoom"},"panels/emulation/DeviceModeView.ts | doubleclickForFullHeight":{"message":"Double-click for full height"},"panels/emulation/DeviceModeView.ts | laptop":{"message":"Laptop"},"panels/emulation/DeviceModeView.ts | laptopL":{"message":"Laptop L"},"panels/emulation/DeviceModeView.ts | mobileL":{"message":"Mobile L"},"panels/emulation/DeviceModeView.ts | mobileM":{"message":"Mobile M"},"panels/emulation/DeviceModeView.ts | mobileS":{"message":"Mobile S"},"panels/emulation/DeviceModeView.ts | tablet":{"message":"Tablet"},"panels/emulation/emulation-meta.ts | captureFullSizeScreenshot":{"message":"Capture full size screenshot"},"panels/emulation/emulation-meta.ts | captureNodeScreenshot":{"message":"Capture node screenshot"},"panels/emulation/emulation-meta.ts | captureScreenshot":{"message":"Capture screenshot"},"panels/emulation/emulation-meta.ts | device":{"message":"device"},"panels/emulation/emulation-meta.ts | hideDeviceFrame":{"message":"Hide device frame"},"panels/emulation/emulation-meta.ts | hideMediaQueries":{"message":"Hide media queries"},"panels/emulation/emulation-meta.ts | hideRulers":{"message":"Hide rulers in the Device Mode toolbar"},"panels/emulation/emulation-meta.ts | showDeviceFrame":{"message":"Show device frame"},"panels/emulation/emulation-meta.ts | showMediaQueries":{"message":"Show media queries"},"panels/emulation/emulation-meta.ts | showRulers":{"message":"Show rulers in the Device Mode toolbar"},"panels/emulation/emulation-meta.ts | toggleDeviceToolbar":{"message":"Toggle device toolbar"},"panels/emulation/MediaQueryInspector.ts | revealInSourceCode":{"message":"Reveal in source code"},"panels/event_listeners/EventListenersView.ts | deleteEventListener":{"message":"Delete event listener"},"panels/event_listeners/EventListenersView.ts | noEventListeners":{"message":"No event listeners"},"panels/event_listeners/EventListenersView.ts | passive":{"message":"Passive"},"panels/event_listeners/EventListenersView.ts | remove":{"message":"Remove"},"panels/event_listeners/EventListenersView.ts | revealInElementsPanel":{"message":"Reveal in Elements panel"},"panels/event_listeners/EventListenersView.ts | togglePassive":{"message":"Toggle Passive"},"panels/event_listeners/EventListenersView.ts | toggleWhetherEventListenerIs":{"message":"Toggle whether event listener is passive or blocking"},"panels/issues/AffectedBlockedByResponseView.ts | blockedResource":{"message":"Blocked Resource"},"panels/issues/AffectedBlockedByResponseView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/AffectedBlockedByResponseView.ts | parentFrame":{"message":"Parent Frame"},"panels/issues/AffectedBlockedByResponseView.ts | requestC":{"message":"Request"},"panels/issues/AffectedCookiesView.ts | domain":{"message":"Domain"},"panels/issues/AffectedCookiesView.ts | filterSetCookieTitle":{"message":"Show network requests that include this Set-Cookie header in the network panel"},"panels/issues/AffectedCookiesView.ts | name":{"message":"Name"},"panels/issues/AffectedCookiesView.ts | nCookies":{"message":"{n, plural, =1 {# cookie} other {# cookies}}"},"panels/issues/AffectedCookiesView.ts | nRawCookieLines":{"message":"{n, plural, =1 {1 Raw Set-Cookie header} other {# Raw Set-Cookie headers}}"},"panels/issues/AffectedCookiesView.ts | path":{"message":"Path"},"panels/issues/AffectedDirectivesView.ts | blocked":{"message":"blocked"},"panels/issues/AffectedDirectivesView.ts | clickToRevealTheViolatingDomNode":{"message":"Click to reveal the violating DOM node in the Elements panel"},"panels/issues/AffectedDirectivesView.ts | directiveC":{"message":"Directive"},"panels/issues/AffectedDirectivesView.ts | element":{"message":"Element"},"panels/issues/AffectedDirectivesView.ts | nDirectives":{"message":"{n, plural, =1 {# directive} other {# directives}}"},"panels/issues/AffectedDirectivesView.ts | reportonly":{"message":"report-only"},"panels/issues/AffectedDirectivesView.ts | resourceC":{"message":"Resource"},"panels/issues/AffectedDirectivesView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/AffectedDirectivesView.ts | status":{"message":"Status"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | documentInTheDOMTree":{"message":"Document in the DOM tree"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | mode":{"message":"Mode"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | nDocuments":{"message":"{n, plural, =1 { document} other { documents}}"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | url":{"message":"URL"},"panels/issues/AffectedElementsView.ts | nElements":{"message":"{n, plural, =1 {# element} other {# elements}}"},"panels/issues/AffectedElementsWithLowContrastView.ts | contrastRatio":{"message":"Contrast ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | element":{"message":"Element"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAA":{"message":"Minimum AA ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAAA":{"message":"Minimum AAA ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | textSize":{"message":"Text size"},"panels/issues/AffectedElementsWithLowContrastView.ts | textWeight":{"message":"Text weight"},"panels/issues/AffectedHeavyAdView.ts | cpuPeakLimit":{"message":"CPU peak limit"},"panels/issues/AffectedHeavyAdView.ts | cpuTotalLimit":{"message":"CPU total limit"},"panels/issues/AffectedHeavyAdView.ts | frameUrl":{"message":"Frame URL"},"panels/issues/AffectedHeavyAdView.ts | limitExceeded":{"message":"Limit exceeded"},"panels/issues/AffectedHeavyAdView.ts | networkLimit":{"message":"Network limit"},"panels/issues/AffectedHeavyAdView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/AffectedHeavyAdView.ts | removed":{"message":"Removed"},"panels/issues/AffectedHeavyAdView.ts | resolutionStatus":{"message":"Resolution Status"},"panels/issues/AffectedHeavyAdView.ts | warned":{"message":"Warned"},"panels/issues/AffectedResourcesView.ts | clickToRevealTheFramesDomNodeIn":{"message":"Click to reveal the frame's DOM node in the Elements panel"},"panels/issues/AffectedResourcesView.ts | unavailable":{"message":"unavailable"},"panels/issues/AffectedResourcesView.ts | unknown":{"message":"unknown"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | aSharedarraybufferWas":{"message":"A SharedArrayBuffer was instantiated in a context that is not cross-origin isolated"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | blocked":{"message":"blocked"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | instantiation":{"message":"Instantiation"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | nViolations":{"message":"{n, plural, =1 {# violation} other {# violations}}"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sharedarraybufferWasTransferedTo":{"message":"SharedArrayBuffer was transfered to a context that is not cross-origin isolated"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | status":{"message":"Status"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | transfer":{"message":"Transfer"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | trigger":{"message":"Trigger"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | warning":{"message":"warning"},"panels/issues/AffectedSourcesView.ts | nSources":{"message":"{n, plural, =1 {# source} other {# sources}}"},"panels/issues/AffectedTrackingSitesView.ts | nTrackingSites":{"message":"{n, plural, =1 {1 potentially tracking website} other {# potentially tracking websites}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | element":{"message":"Element"},"panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue":{"message":"Invalid Header Value"},"panels/issues/AttributionReportingIssueDetailsView.ts | nViolations":{"message":"{n, plural, =1 {# violation} other {# violations}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | request":{"message":"Request"},"panels/issues/AttributionReportingIssueDetailsView.ts | untrustworthyOrigin":{"message":"Untrustworthy origin"},"panels/issues/ComboBoxOfCheckBoxes.ts | genericMenuLabel":{"message":"Menu"},"panels/issues/components/HideIssuesMenu.ts | tooltipTitle":{"message":"Hide issues"},"panels/issues/CorsIssueDetailsView.ts | allowCredentialsValueFromHeader":{"message":"Access-Control-Allow-Credentials Header Value"},"panels/issues/CorsIssueDetailsView.ts | allowedOrigin":{"message":"Allowed Origin (from header)"},"panels/issues/CorsIssueDetailsView.ts | blocked":{"message":"blocked"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestHeader":{"message":"Disallowed Request Header"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod":{"message":"Disallowed Request Method"},"panels/issues/CorsIssueDetailsView.ts | failedRequest":{"message":"Failed Request"},"panels/issues/CorsIssueDetailsView.ts | header":{"message":"Header"},"panels/issues/CorsIssueDetailsView.ts | initiatorAddressSpace":{"message":"Initiator Address"},"panels/issues/CorsIssueDetailsView.ts | initiatorContext":{"message":"Initiator Context"},"panels/issues/CorsIssueDetailsView.ts | insecure":{"message":"insecure"},"panels/issues/CorsIssueDetailsView.ts | invalidValue":{"message":"Invalid Value (if available)"},"panels/issues/CorsIssueDetailsView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/CorsIssueDetailsView.ts | preflightDisallowedRedirect":{"message":"Response to preflight was a redirect"},"panels/issues/CorsIssueDetailsView.ts | preflightInvalidStatus":{"message":"HTTP status of preflight request didn't indicate success"},"panels/issues/CorsIssueDetailsView.ts | preflightRequest":{"message":"Preflight Request"},"panels/issues/CorsIssueDetailsView.ts | preflightRequestIfProblematic":{"message":"Preflight Request (if problematic)"},"panels/issues/CorsIssueDetailsView.ts | problem":{"message":"Problem"},"panels/issues/CorsIssueDetailsView.ts | problemInvalidValue":{"message":"Invalid Value"},"panels/issues/CorsIssueDetailsView.ts | problemMissingHeader":{"message":"Missing Header"},"panels/issues/CorsIssueDetailsView.ts | problemMultipleValues":{"message":"Multiple Values"},"panels/issues/CorsIssueDetailsView.ts | request":{"message":"Request"},"panels/issues/CorsIssueDetailsView.ts | resourceAddressSpace":{"message":"Resource Address"},"panels/issues/CorsIssueDetailsView.ts | secure":{"message":"secure"},"panels/issues/CorsIssueDetailsView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/CorsIssueDetailsView.ts | status":{"message":"Status"},"panels/issues/CorsIssueDetailsView.ts | unsupportedScheme":{"message":"Unsupported Scheme"},"panels/issues/CorsIssueDetailsView.ts | warning":{"message":"warning"},"panels/issues/CSPViolationsView.ts | filter":{"message":"Filter"},"panels/issues/GenericIssueDetailsView.ts | frameId":{"message":"Frame"},"panels/issues/GenericIssueDetailsView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/GenericIssueDetailsView.ts | violatingNode":{"message":"Violating node"},"panels/issues/HiddenIssuesRow.ts | hiddenIssues":{"message":"Hidden issues"},"panels/issues/HiddenIssuesRow.ts | unhideAll":{"message":"Unhide all"},"panels/issues/IssueKindView.ts | hideAllCurrentBreakingChanges":{"message":"Hide all current Breaking Changes"},"panels/issues/IssueKindView.ts | hideAllCurrentImprovements":{"message":"Hide all current Improvements"},"panels/issues/IssueKindView.ts | hideAllCurrentPageErrors":{"message":"Hide all current Page Errors"},"panels/issues/issues-meta.ts | cspViolations":{"message":"CSP Violations"},"panels/issues/issues-meta.ts | issues":{"message":"Issues"},"panels/issues/issues-meta.ts | showCspViolations":{"message":"Show CSP Violations"},"panels/issues/issues-meta.ts | showIssues":{"message":"Show Issues"},"panels/issues/IssuesPane.ts | attributionReporting":{"message":"Attribution Reporting API"},"panels/issues/IssuesPane.ts | contentSecurityPolicy":{"message":"Content Security Policy"},"panels/issues/IssuesPane.ts | cors":{"message":"Cross Origin Resource Sharing"},"panels/issues/IssuesPane.ts | crossOriginEmbedderPolicy":{"message":"Cross Origin Embedder Policy"},"panels/issues/IssuesPane.ts | generic":{"message":"Generic"},"panels/issues/IssuesPane.ts | groupByCategory":{"message":"Group by category"},"panels/issues/IssuesPane.ts | groupByKind":{"message":"Group by kind"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnder":{"message":"Group displayed issues under associated categories"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnderKind":{"message":"Group displayed issues as Page errors, Breaking changes and Improvements"},"panels/issues/IssuesPane.ts | heavyAds":{"message":"Heavy Ads"},"panels/issues/IssuesPane.ts | includeCookieIssuesCausedBy":{"message":"Include cookie Issues caused by third-party sites"},"panels/issues/IssuesPane.ts | includeThirdpartyCookieIssues":{"message":"Include third-party cookie issues"},"panels/issues/IssuesPane.ts | lowTextContrast":{"message":"Low Text Contrast"},"panels/issues/IssuesPane.ts | mixedContent":{"message":"Mixed Content"},"panels/issues/IssuesPane.ts | noIssuesDetectedSoFar":{"message":"No issues detected so far"},"panels/issues/IssuesPane.ts | onlyThirdpartyCookieIssues":{"message":"Only third-party cookie issues detected so far"},"panels/issues/IssuesPane.ts | other":{"message":"Other"},"panels/issues/IssuesPane.ts | quirksMode":{"message":"Quirks Mode"},"panels/issues/IssuesPane.ts | samesiteCookie":{"message":"SameSite Cookie"},"panels/issues/IssueView.ts | affectedResources":{"message":"Affected Resources"},"panels/issues/IssueView.ts | automaticallyUpgraded":{"message":"automatically upgraded"},"panels/issues/IssueView.ts | blocked":{"message":"blocked"},"panels/issues/IssueView.ts | hideIssuesLikeThis":{"message":"Hide issues like this"},"panels/issues/IssueView.ts | learnMoreS":{"message":"Learn more: {PH1}"},"panels/issues/IssueView.ts | name":{"message":"Name"},"panels/issues/IssueView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/IssueView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/IssueView.ts | restrictionStatus":{"message":"Restriction Status"},"panels/issues/IssueView.ts | unhideIssuesLikeThis":{"message":"Unhide issues like this"},"panels/issues/IssueView.ts | warned":{"message":"Warned"},"panels/js_profiler/js_profiler-meta.ts | performance":{"message":"Performance"},"panels/js_profiler/js_profiler-meta.ts | profiler":{"message":"Profiler"},"panels/js_profiler/js_profiler-meta.ts | record":{"message":"Record"},"panels/js_profiler/js_profiler-meta.ts | showPerformance":{"message":"Show Performance"},"panels/js_profiler/js_profiler-meta.ts | showProfiler":{"message":"Show Profiler"},"panels/js_profiler/js_profiler-meta.ts | showRecentTimelineSessions":{"message":"Show recent timeline sessions"},"panels/js_profiler/js_profiler-meta.ts | startProfilingAndReloadPage":{"message":"Start profiling and reload page"},"panels/js_profiler/js_profiler-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/js_profiler/js_profiler-meta.ts | stop":{"message":"Stop"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateDown":{"message":"Pan or rotate down"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateLeft":{"message":"Pan or rotate left"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateRight":{"message":"Pan or rotate right"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateUp":{"message":"Pan or rotate up"},"panels/layer_viewer/layer_viewer-meta.ts | resetView":{"message":"Reset view"},"panels/layer_viewer/layer_viewer-meta.ts | switchToPanMode":{"message":"Switch to pan mode"},"panels/layer_viewer/layer_viewer-meta.ts | switchToRotateMode":{"message":"Switch to rotate mode"},"panels/layer_viewer/layer_viewer-meta.ts | zoomIn":{"message":"Zoom in"},"panels/layer_viewer/layer_viewer-meta.ts | zoomOut":{"message":"Zoom out"},"panels/layer_viewer/LayerDetailsView.ts | compositingReasons":{"message":"Compositing Reasons"},"panels/layer_viewer/LayerDetailsView.ts | containingBlocRectangleDimensions":{"message":"Containing Block {PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | mainThreadScrollingReason":{"message":"Main thread scrolling reason"},"panels/layer_viewer/LayerDetailsView.ts | memoryEstimate":{"message":"Memory estimate"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingContaining":{"message":"Nearest Layer Shifting Containing Block"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingStickyBox":{"message":"Nearest Layer Shifting Sticky Box"},"panels/layer_viewer/LayerDetailsView.ts | nonFastScrollable":{"message":"Non fast scrollable"},"panels/layer_viewer/LayerDetailsView.ts | paintCount":{"message":"Paint count"},"panels/layer_viewer/LayerDetailsView.ts | paintProfiler":{"message":"Paint Profiler"},"panels/layer_viewer/LayerDetailsView.ts | repaintsOnScroll":{"message":"Repaints on scroll"},"panels/layer_viewer/LayerDetailsView.ts | scrollRectangleDimensions":{"message":"{PH1} {PH2} × {PH3} (at {PH4}, {PH5})"},"panels/layer_viewer/LayerDetailsView.ts | selectALayerToSeeItsDetails":{"message":"Select a layer to see its details"},"panels/layer_viewer/LayerDetailsView.ts | size":{"message":"Size"},"panels/layer_viewer/LayerDetailsView.ts | slowScrollRegions":{"message":"Slow scroll regions"},"panels/layer_viewer/LayerDetailsView.ts | stickyAncenstorLayersS":{"message":"{PH1}: {PH2} ({PH3})"},"panels/layer_viewer/LayerDetailsView.ts | stickyBoxRectangleDimensions":{"message":"Sticky Box {PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | stickyPositionConstraint":{"message":"Sticky position constraint"},"panels/layer_viewer/LayerDetailsView.ts | touchEventHandler":{"message":"Touch event handler"},"panels/layer_viewer/LayerDetailsView.ts | unnamed":{"message":""},"panels/layer_viewer/LayerDetailsView.ts | updateRectangleDimensions":{"message":"{PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | wheelEventHandler":{"message":"Wheel event handler"},"panels/layer_viewer/Layers3DView.ts | cantDisplayLayers":{"message":"Can't display layers,"},"panels/layer_viewer/Layers3DView.ts | checkSForPossibleReasons":{"message":"Check {PH1} for possible reasons."},"panels/layer_viewer/Layers3DView.ts | dLayersView":{"message":"3D Layers View"},"panels/layer_viewer/Layers3DView.ts | layerInformationIsNotYet":{"message":"Layer information is not yet available."},"panels/layer_viewer/Layers3DView.ts | paints":{"message":"Paints"},"panels/layer_viewer/Layers3DView.ts | resetView":{"message":"Reset View"},"panels/layer_viewer/Layers3DView.ts | showPaintProfiler":{"message":"Show Paint Profiler"},"panels/layer_viewer/Layers3DView.ts | slowScrollRects":{"message":"Slow scroll rects"},"panels/layer_viewer/Layers3DView.ts | webglSupportIsDisabledInYour":{"message":"WebGL support is disabled in your browser."},"panels/layer_viewer/LayerTreeOutline.ts | layersTreePane":{"message":"Layers Tree Pane"},"panels/layer_viewer/LayerTreeOutline.ts | showPaintProfiler":{"message":"Show Paint Profiler"},"panels/layer_viewer/LayerTreeOutline.ts | updateChildDimension":{"message":" ({PH1} × {PH2})"},"panels/layer_viewer/LayerViewHost.ts | showInternalLayers":{"message":"Show internal layers"},"panels/layer_viewer/PaintProfilerView.ts | bitmap":{"message":"Bitmap"},"panels/layer_viewer/PaintProfilerView.ts | commandLog":{"message":"Command Log"},"panels/layer_viewer/PaintProfilerView.ts | misc":{"message":"Misc"},"panels/layer_viewer/PaintProfilerView.ts | profiling":{"message":"Profiling…"},"panels/layer_viewer/PaintProfilerView.ts | profilingResults":{"message":"Profiling results"},"panels/layer_viewer/PaintProfilerView.ts | shapes":{"message":"Shapes"},"panels/layer_viewer/PaintProfilerView.ts | text":{"message":"Text"},"panels/layer_viewer/TransformController.ts | panModeX":{"message":"Pan mode (X)"},"panels/layer_viewer/TransformController.ts | resetTransform":{"message":"Reset transform (0)"},"panels/layer_viewer/TransformController.ts | rotateModeV":{"message":"Rotate mode (V)"},"panels/layers/layers-meta.ts | layers":{"message":"Layers"},"panels/layers/layers-meta.ts | showLayers":{"message":"Show Layers"},"panels/layers/LayersPanel.ts | details":{"message":"Details"},"panels/layers/LayersPanel.ts | profiler":{"message":"Profiler"},"panels/lighthouse/lighthouse-meta.ts | showLighthouse":{"message":"Show Lighthouse"},"panels/lighthouse/LighthouseController.ts | accessibility":{"message":"Accessibility"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulation":{"message":"Apply mobile emulation"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulationDuring":{"message":"Apply mobile emulation during auditing"},"panels/lighthouse/LighthouseController.ts | atLeastOneCategoryMustBeSelected":{"message":"At least one category must be selected."},"panels/lighthouse/LighthouseController.ts | bestPractices":{"message":"Best practices"},"panels/lighthouse/LighthouseController.ts | canOnlyAuditHttphttpsPages":{"message":"Can only audit pages on HTTP or HTTPS. Navigate to a different page."},"panels/lighthouse/LighthouseController.ts | clearStorage":{"message":"Clear storage"},"panels/lighthouse/LighthouseController.ts | desktop":{"message":"Desktop"},"panels/lighthouse/LighthouseController.ts | devtoolsThrottling":{"message":"DevTools throttling (advanced)"},"panels/lighthouse/LighthouseController.ts | doesThisPageFollowBestPractices":{"message":"Does this page follow best practices for modern web development"},"panels/lighthouse/LighthouseController.ts | doesThisPageMeetTheStandardOfA":{"message":"Does this page meet the standard of a Progressive Web App"},"panels/lighthouse/LighthouseController.ts | howLongDoesThisAppTakeToShow":{"message":"How long does this app take to show content and become usable"},"panels/lighthouse/LighthouseController.ts | indexeddb":{"message":"IndexedDB"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForAdSpeedAnd":{"message":"Is this page optimized for ad speed and quality"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForSearch":{"message":"Is this page optimized for search engine results ranking"},"panels/lighthouse/LighthouseController.ts | isThisPageUsableByPeopleWith":{"message":"Is this page usable by people with disabilities or impairments"},"panels/lighthouse/LighthouseController.ts | javaScriptDisabled":{"message":"JavaScript is disabled. You need to enable JavaScript to audit this page. Open the Command Menu and run the Enable JavaScript command to enable JavaScript."},"panels/lighthouse/LighthouseController.ts | legacyNavigation":{"message":"Legacy navigation"},"panels/lighthouse/LighthouseController.ts | lighthouseMode":{"message":"Lighthouse mode"},"panels/lighthouse/LighthouseController.ts | localStorage":{"message":"Local Storage"},"panels/lighthouse/LighthouseController.ts | mobile":{"message":"Mobile"},"panels/lighthouse/LighthouseController.ts | multipleTabsAreBeingControlledBy":{"message":"Multiple tabs are being controlled by the same service worker. Close your other tabs on the same origin to audit this page."},"panels/lighthouse/LighthouseController.ts | navigation":{"message":"Navigation (Default)"},"panels/lighthouse/LighthouseController.ts | navigationTooltip":{"message":"Navigation mode analyzes a page load, exactly like the original Lighthouse reports."},"panels/lighthouse/LighthouseController.ts | performance":{"message":"Performance"},"panels/lighthouse/LighthouseController.ts | progressiveWebApp":{"message":"Progressive Web App"},"panels/lighthouse/LighthouseController.ts | publisherAds":{"message":"Publisher Ads"},"panels/lighthouse/LighthouseController.ts | resetStorageLocalstorage":{"message":"Reset storage (cache, service workers, etc) before auditing. (Good for performance & PWA testing)"},"panels/lighthouse/LighthouseController.ts | runLighthouseInMode":{"message":"Run Lighthouse in navigation, timespan, or snapshot mode"},"panels/lighthouse/LighthouseController.ts | seo":{"message":"SEO"},"panels/lighthouse/LighthouseController.ts | simulateASlowerPageLoadBasedOn":{"message":"Simulated throttling simulates a slower page load based on data from an initial unthrottled load. DevTools throttling actually slows down the page."},"panels/lighthouse/LighthouseController.ts | simulatedThrottling":{"message":"Simulated throttling (default)"},"panels/lighthouse/LighthouseController.ts | snapshot":{"message":"Snapshot"},"panels/lighthouse/LighthouseController.ts | snapshotTooltip":{"message":"Snapshot mode analyzes the page in a particular state, typically after user interactions."},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingLoadingPlural":{"message":"There may be stored data affecting loading performance in these locations: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular":{"message":"There may be stored data affecting loading performance in this location: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."},"panels/lighthouse/LighthouseController.ts | throttlingMethod":{"message":"Throttling method"},"panels/lighthouse/LighthouseController.ts | timespan":{"message":"Timespan"},"panels/lighthouse/LighthouseController.ts | timespanTooltip":{"message":"Timespan mode analyzes an arbitrary period of time, typically containing user interactions."},"panels/lighthouse/LighthouseController.ts | useLegacyNavigation":{"message":"Analyze the page using classic Lighthouse when in navigation mode."},"panels/lighthouse/LighthouseController.ts | webSql":{"message":"Web SQL"},"panels/lighthouse/LighthousePanel.ts | cancelling":{"message":"Cancelling"},"panels/lighthouse/LighthousePanel.ts | clearAll":{"message":"Clear all"},"panels/lighthouse/LighthousePanel.ts | dropLighthouseJsonHere":{"message":"Drop Lighthouse JSON here"},"panels/lighthouse/LighthousePanel.ts | lighthouseSettings":{"message":"Lighthouse settings"},"panels/lighthouse/LighthousePanel.ts | performAnAudit":{"message":"Perform an audit…"},"panels/lighthouse/LighthousePanel.ts | printing":{"message":"Printing"},"panels/lighthouse/LighthousePanel.ts | thePrintPopupWindowIsOpenPlease":{"message":"The print popup window is open. Please close it to continue."},"panels/lighthouse/LighthouseReportSelector.ts | newReport":{"message":"(new report)"},"panels/lighthouse/LighthouseReportSelector.ts | reports":{"message":"Reports"},"panels/lighthouse/LighthouseStartView.ts | analyzeNavigation":{"message":"Analyze page load"},"panels/lighthouse/LighthouseStartView.ts | analyzeSnapshot":{"message":"Analyze page state"},"panels/lighthouse/LighthouseStartView.ts | categories":{"message":"Categories"},"panels/lighthouse/LighthouseStartView.ts | device":{"message":"Device"},"panels/lighthouse/LighthouseStartView.ts | generateLighthouseReport":{"message":"Generate a Lighthouse report"},"panels/lighthouse/LighthouseStartView.ts | learnMore":{"message":"Learn more"},"panels/lighthouse/LighthouseStartView.ts | mode":{"message":"Mode"},"panels/lighthouse/LighthouseStartView.ts | plugins":{"message":"Plugins"},"panels/lighthouse/LighthouseStartView.ts | startTimespan":{"message":"Start timespan"},"panels/lighthouse/LighthouseStatusView.ts | ahSorryWeRanIntoAnError":{"message":"Ah, sorry! We ran into an error."},"panels/lighthouse/LighthouseStatusView.ts | almostThereLighthouseIsNow":{"message":"Almost there! Lighthouse is now generating your report."},"panels/lighthouse/LighthouseStatusView.ts | asPageLoadTimeIncreasesFromOne":{"message":"As page load time increases from one second to seven seconds, the probability of a mobile site visitor bouncing increases 113%. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | asTheNumberOfElementsOnAPage":{"message":"As the number of elements on a page increases from 400 to 6,000, the probability of conversion drops 95%. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | auditingS":{"message":"Auditing {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | auditingYourWebPage":{"message":"Auditing your web page"},"panels/lighthouse/LighthouseStatusView.ts | byReducingTheResponseSizeOfJson":{"message":"By reducing the response size of JSON needed for displaying comments, Instagram saw increased impressions [Source: WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | cancel":{"message":"Cancel"},"panels/lighthouse/LighthouseStatusView.ts | cancelling":{"message":"Cancelling…"},"panels/lighthouse/LighthouseStatusView.ts | fastFactMessageWithPlaceholder":{"message":"💡 {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | ifASiteTakesSecondToBecome":{"message":"If a site takes >1 second to become interactive, users lose attention, and their perception of completing the page task is broken [Source: Google Developers Blog]"},"panels/lighthouse/LighthouseStatusView.ts | ifThisIssueIsReproduciblePlease":{"message":"If this issue is reproducible, please report it at the Lighthouse GitHub repo."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsGatheringInformation":{"message":"Lighthouse is gathering information about the page to compute your score."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingThePage":{"message":"Lighthouse is loading the page."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPage":{"message":"Lighthouse is loading your page"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWith":{"message":"Lighthouse is loading your page with throttling to measure performance on a mobile device on 3G."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithMobile":{"message":"Lighthouse is loading your page with mobile emulation."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithThrottling":{"message":"Lighthouse is loading your page with throttling to measure performance on a slow desktop on 3G."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsWarmingUp":{"message":"Lighthouse is warming up…"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseOnlySimulatesMobile":{"message":"Lighthouse only simulates mobile performance; to measure performance on a real device, try WebPageTest.org [Source: Lighthouse team]"},"panels/lighthouse/LighthouseStatusView.ts | loading":{"message":"Loading…"},"panels/lighthouse/LighthouseStatusView.ts | mbTakesAMinimumOfSecondsTo":{"message":"1MB takes a minimum of 5 seconds to download on a typical 3G connection [Source: WebPageTest and DevTools 3G definition]."},"panels/lighthouse/LighthouseStatusView.ts | OfGlobalMobileUsersInWereOnGOrG":{"message":"75% of global mobile users in 2016 were on 2G or 3G [Source: GSMA Mobile]"},"panels/lighthouse/LighthouseStatusView.ts | OfMobilePagesTakeNearlySeconds":{"message":"70% of mobile pages take nearly 7 seconds for the visual content above the fold to display on the screen. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | rebuildingPinterestPagesFor":{"message":"Rebuilding Pinterest pages for performance increased conversion rates by 15% [Source: WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | SecondsIsTheAverageTimeAMobile":{"message":"19 seconds is the average time a mobile web page takes to load on a 3G connection [Source: Google DoubleClick blog]"},"panels/lighthouse/LighthouseStatusView.ts | theAverageUserDeviceCostsLess":{"message":"The average user device costs less than 200 USD. [Source: International Data Corporation]"},"panels/lighthouse/LighthouseStatusView.ts | tryToNavigateToTheUrlInAFresh":{"message":"Try to navigate to the URL in a fresh Chrome profile without any other tabs or extensions open and try again."},"panels/lighthouse/LighthouseStatusView.ts | walmartSawAIncreaseInRevenueFor":{"message":"Walmart saw a 1% increase in revenue for every 100ms improvement in page load [Source: WPO Stats]"},"panels/lighthouse/LighthouseTimespanView.ts | cancel":{"message":"Cancel"},"panels/lighthouse/LighthouseTimespanView.ts | endTimespan":{"message":"End timespan"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarted":{"message":"Timespan started, interact with the page"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarting":{"message":"Timespan starting…"},"panels/media/EventDisplayTable.ts | eventDisplay":{"message":"Event display"},"panels/media/EventDisplayTable.ts | eventName":{"message":"Event name"},"panels/media/EventDisplayTable.ts | timestamp":{"message":"Timestamp"},"panels/media/EventDisplayTable.ts | value":{"message":"Value"},"panels/media/EventTimelineView.ts | bufferingStatus":{"message":"Buffering Status"},"panels/media/EventTimelineView.ts | playbackStatus":{"message":"Playback Status"},"panels/media/media-meta.ts | media":{"message":"Media"},"panels/media/media-meta.ts | showMedia":{"message":"Show Media"},"panels/media/media-meta.ts | video":{"message":"video"},"panels/media/PlayerDetailView.ts | events":{"message":"Events"},"panels/media/PlayerDetailView.ts | messages":{"message":"Messages"},"panels/media/PlayerDetailView.ts | playerEvents":{"message":"Player events"},"panels/media/PlayerDetailView.ts | playerMessages":{"message":"Player messages"},"panels/media/PlayerDetailView.ts | playerProperties":{"message":"Player properties"},"panels/media/PlayerDetailView.ts | playerTimeline":{"message":"Player timeline"},"panels/media/PlayerDetailView.ts | properties":{"message":"Properties"},"panels/media/PlayerDetailView.ts | timeline":{"message":"Timeline"},"panels/media/PlayerListView.ts | hideAllOthers":{"message":"Hide all others"},"panels/media/PlayerListView.ts | hidePlayer":{"message":"Hide player"},"panels/media/PlayerListView.ts | players":{"message":"Players"},"panels/media/PlayerListView.ts | savePlayerInfo":{"message":"Save player info"},"panels/media/PlayerMessagesView.ts | all":{"message":"All"},"panels/media/PlayerMessagesView.ts | custom":{"message":"Custom"},"panels/media/PlayerMessagesView.ts | debug":{"message":"Debug"},"panels/media/PlayerMessagesView.ts | default":{"message":"Default"},"panels/media/PlayerMessagesView.ts | error":{"message":"Error"},"panels/media/PlayerMessagesView.ts | errorCauseLabel":{"message":"Caused by:"},"panels/media/PlayerMessagesView.ts | errorCodeLabel":{"message":"Error Code:"},"panels/media/PlayerMessagesView.ts | errorDataLabel":{"message":"Data:"},"panels/media/PlayerMessagesView.ts | errorGroupLabel":{"message":"Error Group:"},"panels/media/PlayerMessagesView.ts | errorStackLabel":{"message":"Stacktrace:"},"panels/media/PlayerMessagesView.ts | filterLogMessages":{"message":"Filter log messages"},"panels/media/PlayerMessagesView.ts | info":{"message":"Info"},"panels/media/PlayerMessagesView.ts | logLevel":{"message":"Log level:"},"panels/media/PlayerMessagesView.ts | warning":{"message":"Warning"},"panels/media/PlayerPropertiesView.ts | audio":{"message":"Audio"},"panels/media/PlayerPropertiesView.ts | bitrate":{"message":"Bitrate"},"panels/media/PlayerPropertiesView.ts | decoder":{"message":"Decoder"},"panels/media/PlayerPropertiesView.ts | decoderName":{"message":"Decoder name"},"panels/media/PlayerPropertiesView.ts | decryptingDemuxer":{"message":"Decrypting demuxer"},"panels/media/PlayerPropertiesView.ts | duration":{"message":"Duration"},"panels/media/PlayerPropertiesView.ts | encoderName":{"message":"Encoder name"},"panels/media/PlayerPropertiesView.ts | fileSize":{"message":"File size"},"panels/media/PlayerPropertiesView.ts | frameRate":{"message":"Frame rate"},"panels/media/PlayerPropertiesView.ts | hardwareDecoder":{"message":"Hardware decoder"},"panels/media/PlayerPropertiesView.ts | hardwareEncoder":{"message":"Hardware encoder"},"panels/media/PlayerPropertiesView.ts | noDecoder":{"message":"No decoder"},"panels/media/PlayerPropertiesView.ts | noEncoder":{"message":"No encoder"},"panels/media/PlayerPropertiesView.ts | noTextTracks":{"message":"No text tracks"},"panels/media/PlayerPropertiesView.ts | playbackFrameTitle":{"message":"Playback frame title"},"panels/media/PlayerPropertiesView.ts | playbackFrameUrl":{"message":"Playback frame URL"},"panels/media/PlayerPropertiesView.ts | properties":{"message":"Properties"},"panels/media/PlayerPropertiesView.ts | rangeHeaderSupport":{"message":"Range header support"},"panels/media/PlayerPropertiesView.ts | rendererName":{"message":"Renderer name"},"panels/media/PlayerPropertiesView.ts | resolution":{"message":"Resolution"},"panels/media/PlayerPropertiesView.ts | singleoriginPlayback":{"message":"Single-origin playback"},"panels/media/PlayerPropertiesView.ts | startTime":{"message":"Start time"},"panels/media/PlayerPropertiesView.ts | streaming":{"message":"Streaming"},"panels/media/PlayerPropertiesView.ts | textTrack":{"message":"Text track"},"panels/media/PlayerPropertiesView.ts | track":{"message":"Track"},"panels/media/PlayerPropertiesView.ts | video":{"message":"Video"},"panels/media/PlayerPropertiesView.ts | videoFreezingScore":{"message":"Video freezing score"},"panels/media/PlayerPropertiesView.ts | videoPlaybackRoughness":{"message":"Video playback roughness"},"panels/mobile_throttling/mobile_throttling-meta.ts | device":{"message":"device"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableFastGThrottling":{"message":"Enable fast 3G throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableSlowGThrottling":{"message":"Enable slow 3G throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOffline":{"message":"Go offline"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOnline":{"message":"Go online"},"panels/mobile_throttling/mobile_throttling-meta.ts | showThrottling":{"message":"Show Throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttling":{"message":"Throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttlingTag":{"message":"throttling"},"panels/mobile_throttling/MobileThrottlingSelector.ts | advanced":{"message":"Advanced"},"panels/mobile_throttling/MobileThrottlingSelector.ts | disabled":{"message":"Disabled"},"panels/mobile_throttling/MobileThrottlingSelector.ts | presets":{"message":"Presets"},"panels/mobile_throttling/NetworkPanelIndicator.ts | acceptedEncodingOverrideSet":{"message":"The set of accepted Content-Encoding headers has been modified by DevTools. See the Network Conditions panel."},"panels/mobile_throttling/NetworkPanelIndicator.ts | networkThrottlingIsEnabled":{"message":"Network throttling is enabled"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeBlocked":{"message":"Requests may be blocked"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeRewrittenByLocal":{"message":"Requests may be rewritten by local overrides"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | custom":{"message":"Custom"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | disabled":{"message":"Disabled"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | presets":{"message":"Presets"},"panels/mobile_throttling/ThrottlingManager.ts | add":{"message":"Add…"},"panels/mobile_throttling/ThrottlingManager.ts | addS":{"message":"Add {PH1}"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottling":{"message":"CPU throttling"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottlingIsEnabled":{"message":"CPU throttling is enabled"},"panels/mobile_throttling/ThrottlingManager.ts | dSlowdown":{"message":"{PH1}× slowdown"},"panels/mobile_throttling/ThrottlingManager.ts | excessConcurrency":{"message":"Exceeding the default value may degrade system performance."},"panels/mobile_throttling/ThrottlingManager.ts | forceDisconnectedFromNetwork":{"message":"Force disconnected from network"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrency":{"message":"Hardware concurrency"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyIsEnabled":{"message":"Hardware concurrency override is enabled"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyValue":{"message":"Value of navigator.hardwareConcurrency"},"panels/mobile_throttling/ThrottlingManager.ts | noThrottling":{"message":"No throttling"},"panels/mobile_throttling/ThrottlingManager.ts | offline":{"message":"Offline"},"panels/mobile_throttling/ThrottlingManager.ts | resetConcurrency":{"message":"Reset to the default value"},"panels/mobile_throttling/ThrottlingManager.ts | sS":{"message":"{PH1}: {PH2}"},"panels/mobile_throttling/ThrottlingManager.ts | throttling":{"message":"Throttling"},"panels/mobile_throttling/ThrottlingPresets.ts | checkNetworkAndPerformancePanels":{"message":"Check Network and Performance panels"},"panels/mobile_throttling/ThrottlingPresets.ts | custom":{"message":"Custom"},"panels/mobile_throttling/ThrottlingPresets.ts | fastGXCpuSlowdown":{"message":"Fast 3G & 4x CPU slowdown"},"panels/mobile_throttling/ThrottlingPresets.ts | lowendMobile":{"message":"Low-end mobile"},"panels/mobile_throttling/ThrottlingPresets.ts | midtierMobile":{"message":"Mid-tier mobile"},"panels/mobile_throttling/ThrottlingPresets.ts | noInternetConnectivity":{"message":"No internet connectivity"},"panels/mobile_throttling/ThrottlingPresets.ts | noThrottling":{"message":"No throttling"},"panels/mobile_throttling/ThrottlingPresets.ts | slowGXCpuSlowdown":{"message":"Slow 3G & 6x CPU slowdown"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | addCustomProfile":{"message":"Add custom profile..."},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dms":{"message":"{PH1} ms"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | download":{"message":"Download"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dskbits":{"message":"{PH1} kbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | fsmbits":{"message":"{PH1} Mbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latency":{"message":"Latency"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latencyMustBeAnIntegerBetweenSms":{"message":"Latency must be an integer between {PH1} ms to {PH2} ms inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | networkThrottlingProfiles":{"message":"Network Throttling Profiles"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | optional":{"message":"optional"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileName":{"message":"Profile Name"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileNameCharactersLengthMust":{"message":"Profile Name characters length must be between 1 to {PH1} inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | sMustBeANumberBetweenSkbsToSkbs":{"message":"{PH1} must be a number between {PH2} kbit/s to {PH3} kbit/s inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | upload":{"message":"Upload"},"panels/network/BinaryResourceView.ts | binaryViewType":{"message":"Binary view type"},"panels/network/BinaryResourceView.ts | copiedAsBase":{"message":"Copied as Base64"},"panels/network/BinaryResourceView.ts | copiedAsHex":{"message":"Copied as Hex"},"panels/network/BinaryResourceView.ts | copiedAsUtf":{"message":"Copied as UTF-8"},"panels/network/BinaryResourceView.ts | copyAsBase":{"message":"Copy as Base64"},"panels/network/BinaryResourceView.ts | copyAsHex":{"message":"Copy as Hex"},"panels/network/BinaryResourceView.ts | copyAsUtf":{"message":"Copy as UTF-8"},"panels/network/BinaryResourceView.ts | copyToClipboard":{"message":"Copy to clipboard"},"panels/network/BinaryResourceView.ts | hexViewer":{"message":"Hex Viewer"},"panels/network/BlockedURLsPane.ts | addNetworkRequestBlockingPattern":{"message":"Add network request blocking pattern"},"panels/network/BlockedURLsPane.ts | addPattern":{"message":"Add pattern"},"panels/network/BlockedURLsPane.ts | dBlocked":{"message":"{PH1} blocked"},"panels/network/BlockedURLsPane.ts | enableNetworkRequestBlocking":{"message":"Enable network request blocking"},"panels/network/BlockedURLsPane.ts | itemDeleted":{"message":"Item successfully deleted"},"panels/network/BlockedURLsPane.ts | networkRequestsAreNotBlockedS":{"message":"Network requests are not blocked. {PH1}"},"panels/network/BlockedURLsPane.ts | patternAlreadyExists":{"message":"Pattern already exists."},"panels/network/BlockedURLsPane.ts | patternInputCannotBeEmpty":{"message":"Pattern input cannot be empty."},"panels/network/BlockedURLsPane.ts | removeAllPatterns":{"message":"Remove all patterns"},"panels/network/BlockedURLsPane.ts | textPatternToBlockMatching":{"message":"Text pattern to block matching requests; use * for wildcard"},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariation":{"message":"Active client experiment variation IDs."},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariationIds":{"message":"Active client experiment variation IDs that trigger server-side behavior."},"panels/network/components/HeaderSectionRow.ts | decoded":{"message":"Decoded:"},"panels/network/components/HeaderSectionRow.ts | editHeader":{"message":"Override header"},"panels/network/components/HeaderSectionRow.ts | headerNamesOnlyLetters":{"message":"Header names should contain only letters, digits, hyphens or underscores"},"panels/network/components/HeaderSectionRow.ts | learnMore":{"message":"Learn more"},"panels/network/components/HeaderSectionRow.ts | learnMoreInTheIssuesTab":{"message":"Learn more in the issues tab"},"panels/network/components/HeaderSectionRow.ts | reloadPrompt":{"message":"Refresh the page/request for these changes to take effect"},"panels/network/components/HeaderSectionRow.ts | removeOverride":{"message":"Remove this header override"},"panels/network/components/RequestHeaderSection.ts | learnMore":{"message":"Learn more"},"panels/network/components/RequestHeaderSection.ts | onlyProvisionalHeadersAre":{"message":"Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers."},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShown":{"message":"Provisional headers are shown."},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShownDisableCache":{"message":"Provisional headers are shown. Disable cache to see full headers."},"panels/network/components/RequestHeadersView.ts | fromDiskCache":{"message":"(from disk cache)"},"panels/network/components/RequestHeadersView.ts | fromMemoryCache":{"message":"(from memory cache)"},"panels/network/components/RequestHeadersView.ts | fromPrefetchCache":{"message":"(from prefetch cache)"},"panels/network/components/RequestHeadersView.ts | fromServiceWorker":{"message":"(from service worker)"},"panels/network/components/RequestHeadersView.ts | fromSignedexchange":{"message":"(from signed-exchange)"},"panels/network/components/RequestHeadersView.ts | fromWebBundle":{"message":"(from Web Bundle)"},"panels/network/components/RequestHeadersView.ts | general":{"message":"General"},"panels/network/components/RequestHeadersView.ts | headerOverrides":{"message":"Header overrides"},"panels/network/components/RequestHeadersView.ts | raw":{"message":"Raw"},"panels/network/components/RequestHeadersView.ts | referrerPolicy":{"message":"Referrer Policy"},"panels/network/components/RequestHeadersView.ts | remoteAddress":{"message":"Remote Address"},"panels/network/components/RequestHeadersView.ts | requestHeaders":{"message":"Request Headers"},"panels/network/components/RequestHeadersView.ts | requestMethod":{"message":"Request Method"},"panels/network/components/RequestHeadersView.ts | requestUrl":{"message":"Request URL"},"panels/network/components/RequestHeadersView.ts | responseHeaders":{"message":"Response Headers"},"panels/network/components/RequestHeadersView.ts | revealHeaderOverrides":{"message":"Reveal header override definitions"},"panels/network/components/RequestHeadersView.ts | showMore":{"message":"Show more"},"panels/network/components/RequestHeadersView.ts | statusCode":{"message":"Status Code"},"panels/network/components/RequestTrustTokensView.ts | aClientprovidedArgumentWas":{"message":"A client-provided argument was malformed or otherwise invalid."},"panels/network/components/RequestTrustTokensView.ts | eitherNoInputsForThisOperation":{"message":"Either no inputs for this operation are available or the output exceeds the operations quota."},"panels/network/components/RequestTrustTokensView.ts | failure":{"message":"Failure"},"panels/network/components/RequestTrustTokensView.ts | issuer":{"message":"Issuer"},"panels/network/components/RequestTrustTokensView.ts | issuers":{"message":"Issuers"},"panels/network/components/RequestTrustTokensView.ts | numberOfIssuedTokens":{"message":"Number of issued tokens"},"panels/network/components/RequestTrustTokensView.ts | parameters":{"message":"Parameters"},"panels/network/components/RequestTrustTokensView.ts | refreshPolicy":{"message":"Refresh policy"},"panels/network/components/RequestTrustTokensView.ts | result":{"message":"Result"},"panels/network/components/RequestTrustTokensView.ts | status":{"message":"Status"},"panels/network/components/RequestTrustTokensView.ts | success":{"message":"Success"},"panels/network/components/RequestTrustTokensView.ts | theKeysForThisPSTIssuerAreUnavailable":{"message":"The keys for this PST issuer are unavailable. The issuer may need to be registered via the Chrome registration process."},"panels/network/components/RequestTrustTokensView.ts | theOperationFailedForAnUnknown":{"message":"The operation failed for an unknown reason."},"panels/network/components/RequestTrustTokensView.ts | theOperationsResultWasServedFrom":{"message":"The operations result was served from cache."},"panels/network/components/RequestTrustTokensView.ts | theOperationWasFulfilledLocally":{"message":"The operation was fulfilled locally, no request was sent."},"panels/network/components/RequestTrustTokensView.ts | theServersResponseWasMalformedOr":{"message":"The servers response was malformed or otherwise invalid."},"panels/network/components/RequestTrustTokensView.ts | topLevelOrigin":{"message":"Top level origin"},"panels/network/components/RequestTrustTokensView.ts | type":{"message":"Type"},"panels/network/components/ResponseHeaderSection.ts | addHeader":{"message":"Add header"},"panels/network/components/ResponseHeaderSection.ts | chooseThisOptionIfTheResourceAnd":{"message":"Choose this option if the resource and the document are served from the same site."},"panels/network/components/ResponseHeaderSection.ts | onlyChooseThisOptionIfAn":{"message":"Only choose this option if an arbitrary website including this resource does not impose a security risk."},"panels/network/components/ResponseHeaderSection.ts | thisDocumentWasBlockedFrom":{"message":"This document was blocked from loading in an iframe with a sandbox attribute because this document specified a cross-origin opener policy."},"panels/network/components/ResponseHeaderSection.ts | toEmbedThisFrameInYourDocument":{"message":"To embed this frame in your document, the response needs to enable the cross-origin embedder policy by specifying the following response header:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferent":{"message":"To use this resource from a different origin, the server needs to specify a cross-origin resource policy in the response headers:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentOrigin":{"message":"To use this resource from a different origin, the server may relax the cross-origin resource policy response header:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentSite":{"message":"To use this resource from a different site, the server may relax the cross-origin resource policy response header:"},"panels/network/components/WebBundleInfoView.ts | bundledResource":{"message":"Bundled resource"},"panels/network/EventSourceMessagesView.ts | copyMessage":{"message":"Copy message"},"panels/network/EventSourceMessagesView.ts | data":{"message":"Data"},"panels/network/EventSourceMessagesView.ts | eventSource":{"message":"Event Source"},"panels/network/EventSourceMessagesView.ts | id":{"message":"Id"},"panels/network/EventSourceMessagesView.ts | time":{"message":"Time"},"panels/network/EventSourceMessagesView.ts | type":{"message":"Type"},"panels/network/network-meta.ts | clear":{"message":"Clear network log"},"panels/network/network-meta.ts | colorCode":{"message":"color code"},"panels/network/network-meta.ts | colorCodeByResourceType":{"message":"Color code by resource type"},"panels/network/network-meta.ts | colorcodeResourceTypes":{"message":"Color-code resource types"},"panels/network/network-meta.ts | diskCache":{"message":"disk cache"},"panels/network/network-meta.ts | dontGroupNetworkLogItemsByFrame":{"message":"Don't group network log items by frame"},"panels/network/network-meta.ts | frame":{"message":"frame"},"panels/network/network-meta.ts | group":{"message":"group"},"panels/network/network-meta.ts | groupNetworkLogByFrame":{"message":"Group network log by frame"},"panels/network/network-meta.ts | groupNetworkLogItemsByFrame":{"message":"Group network log items by frame"},"panels/network/network-meta.ts | hideRequestDetails":{"message":"Hide request details"},"panels/network/network-meta.ts | network":{"message":"Network"},"panels/network/network-meta.ts | netWork":{"message":"network"},"panels/network/network-meta.ts | networkConditions":{"message":"Network conditions"},"panels/network/network-meta.ts | networkRequestBlocking":{"message":"Network request blocking"},"panels/network/network-meta.ts | networkThrottling":{"message":"network throttling"},"panels/network/network-meta.ts | recordNetworkLog":{"message":"Record network log"},"panels/network/network-meta.ts | resourceType":{"message":"resource type"},"panels/network/network-meta.ts | search":{"message":"Search"},"panels/network/network-meta.ts | showNetwork":{"message":"Show Network"},"panels/network/network-meta.ts | showNetworkConditions":{"message":"Show Network conditions"},"panels/network/network-meta.ts | showNetworkRequestBlocking":{"message":"Show Network request blocking"},"panels/network/network-meta.ts | showSearch":{"message":"Show Search"},"panels/network/network-meta.ts | stopRecordingNetworkLog":{"message":"Stop recording network log"},"panels/network/network-meta.ts | useDefaultColors":{"message":"Use default colors"},"panels/network/NetworkConfigView.ts | acceptedEncoding":{"message":"Accepted Content-Encodings"},"panels/network/NetworkConfigView.ts | caching":{"message":"Caching"},"panels/network/NetworkConfigView.ts | clientHintsStatusText":{"message":"User agent updated."},"panels/network/NetworkConfigView.ts | custom":{"message":"Custom..."},"panels/network/NetworkConfigView.ts | customUserAgentFieldIsRequired":{"message":"Custom user agent field is required"},"panels/network/NetworkConfigView.ts | disableCache":{"message":"Disable cache"},"panels/network/NetworkConfigView.ts | enterACustomUserAgent":{"message":"Enter a custom user agent"},"panels/network/NetworkConfigView.ts | networkConditionsPanelShown":{"message":"Network conditions shown"},"panels/network/NetworkConfigView.ts | networkThrottling":{"message":"Network throttling"},"panels/network/NetworkConfigView.ts | selectAutomatically":{"message":"Use browser default"},"panels/network/NetworkConfigView.ts | userAgent":{"message":"User agent"},"panels/network/NetworkDataGridNode.ts | alternativeJobWonRace":{"message":"Chrome used a HTTP/3 connection induced by an 'Alt-Svc' header because it won a race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | alternativeJobWonWithoutRace":{"message":"Chrome used a HTTP/3 connection induced by an 'Alt-Svc' header without racing against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | blockeds":{"message":"(blocked:{PH1})"},"panels/network/NetworkDataGridNode.ts | blockedTooltip":{"message":"This request was blocked due to misconfigured response headers, click to view the headers"},"panels/network/NetworkDataGridNode.ts | broken":{"message":"Chrome did not try to establish a HTTP/3 connection because it was marked as broken."},"panels/network/NetworkDataGridNode.ts | canceled":{"message":"(canceled)"},"panels/network/NetworkDataGridNode.ts | corsError":{"message":"CORS error"},"panels/network/NetworkDataGridNode.ts | crossoriginResourceSharingErrorS":{"message":"Cross-Origin Resource Sharing error: {PH1}"},"panels/network/NetworkDataGridNode.ts | csp":{"message":"csp"},"panels/network/NetworkDataGridNode.ts | data":{"message":"(data)"},"panels/network/NetworkDataGridNode.ts | devtools":{"message":"devtools"},"panels/network/NetworkDataGridNode.ts | diskCache":{"message":"(disk cache)"},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonRace":{"message":"Chrome used a HTTP/3 connection due to the DNS record indicating HTTP/3 support, which won a race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonWithoutRace":{"message":"Chrome used a HTTP/3 connection due to the DNS record indicating HTTP/3 support. There was no race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | failed":{"message":"(failed)"},"panels/network/NetworkDataGridNode.ts | finished":{"message":"Finished"},"panels/network/NetworkDataGridNode.ts | hasOverriddenHeaders":{"message":"Request has overridden headers"},"panels/network/NetworkDataGridNode.ts | level":{"message":"level 1"},"panels/network/NetworkDataGridNode.ts | mainJobWonRace":{"message":"Chrome used this protocol because it won a race against establishing a HTTP/3 connection."},"panels/network/NetworkDataGridNode.ts | mappingMissing":{"message":"Chrome did not use an alternative HTTP version because no alternative protocol information was available when the request was issued, but an 'Alt-Svc' header was present in the response."},"panels/network/NetworkDataGridNode.ts | memoryCache":{"message":"(memory cache)"},"panels/network/NetworkDataGridNode.ts | origin":{"message":"origin"},"panels/network/NetworkDataGridNode.ts | other":{"message":"other"},"panels/network/NetworkDataGridNode.ts | otherC":{"message":"Other"},"panels/network/NetworkDataGridNode.ts | parser":{"message":"Parser"},"panels/network/NetworkDataGridNode.ts | pending":{"message":"Pending"},"panels/network/NetworkDataGridNode.ts | pendingq":{"message":"(pending)"},"panels/network/NetworkDataGridNode.ts | prefetchCache":{"message":"(prefetch cache)"},"panels/network/NetworkDataGridNode.ts | preflight":{"message":"Preflight"},"panels/network/NetworkDataGridNode.ts | preload":{"message":"Preload"},"panels/network/NetworkDataGridNode.ts | push":{"message":"Push / "},"panels/network/NetworkDataGridNode.ts | redirect":{"message":"Redirect"},"panels/network/NetworkDataGridNode.ts | script":{"message":"Script"},"panels/network/NetworkDataGridNode.ts | selectPreflightRequest":{"message":"Select preflight request"},"panels/network/NetworkDataGridNode.ts | selectTheRequestThatTriggered":{"message":"Select the request that triggered this preflight"},"panels/network/NetworkDataGridNode.ts | servedFromDiskCacheResourceSizeS":{"message":"Served from disk cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromMemoryCacheResource":{"message":"Served from memory cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromPrefetchCacheResource":{"message":"Served from prefetch cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromServiceworkerResource":{"message":"Served from ServiceWorker, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromSignedHttpExchange":{"message":"Served from Signed HTTP Exchange, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromWebBundle":{"message":"Served from Web Bundle, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | serviceworker":{"message":"(ServiceWorker)"},"panels/network/NetworkDataGridNode.ts | signedexchange":{"message":"signed-exchange"},"panels/network/NetworkDataGridNode.ts | sPreflight":{"message":"{PH1} + Preflight"},"panels/network/NetworkDataGridNode.ts | timeSubtitleTooltipText":{"message":"Latency (response received time - start time)"},"panels/network/NetworkDataGridNode.ts | unknown":{"message":"(unknown)"},"panels/network/NetworkDataGridNode.ts | unknownExplanation":{"message":"The request status cannot be shown here because the page that issued it unloaded while the request was in flight. You can use chrome://net-export to capture a network log and see all request details."},"panels/network/NetworkDataGridNode.ts | webBundle":{"message":"(Web Bundle)"},"panels/network/NetworkDataGridNode.ts | webBundleError":{"message":"Web Bundle error"},"panels/network/NetworkDataGridNode.ts | webBundleInnerRequest":{"message":"Served from Web Bundle"},"panels/network/NetworkItemView.ts | cookies":{"message":"Cookies"},"panels/network/NetworkItemView.ts | eventstream":{"message":"EventStream"},"panels/network/NetworkItemView.ts | headers":{"message":"Headers"},"panels/network/NetworkItemView.ts | initiator":{"message":"Initiator"},"panels/network/NetworkItemView.ts | messages":{"message":"Messages"},"panels/network/NetworkItemView.ts | payload":{"message":"Payload"},"panels/network/NetworkItemView.ts | preview":{"message":"Preview"},"panels/network/NetworkItemView.ts | rawResponseData":{"message":"Raw response data"},"panels/network/NetworkItemView.ts | requestAndResponseCookies":{"message":"Request and response cookies"},"panels/network/NetworkItemView.ts | requestAndResponseTimeline":{"message":"Request and response timeline"},"panels/network/NetworkItemView.ts | requestInitiatorCallStack":{"message":"Request initiator call stack"},"panels/network/NetworkItemView.ts | response":{"message":"Response"},"panels/network/NetworkItemView.ts | responsePreview":{"message":"Response preview"},"panels/network/NetworkItemView.ts | signedexchangeError":{"message":"SignedExchange error"},"panels/network/NetworkItemView.ts | timing":{"message":"Timing"},"panels/network/NetworkItemView.ts | trustTokenOperationDetails":{"message":"Private State Token operation details"},"panels/network/NetworkItemView.ts | trustTokens":{"message":"Private State Tokens"},"panels/network/NetworkItemView.ts | websocketMessages":{"message":"WebSocket messages"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowser":{"message":"Are you sure you want to clear browser cache?"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowserCookies":{"message":"Are you sure you want to clear browser cookies?"},"panels/network/NetworkLogView.ts | blockedRequests":{"message":"Blocked Requests"},"panels/network/NetworkLogView.ts | blockRequestDomain":{"message":"Block request domain"},"panels/network/NetworkLogView.ts | blockRequestUrl":{"message":"Block request URL"},"panels/network/NetworkLogView.ts | clearBrowserCache":{"message":"Clear browser cache"},"panels/network/NetworkLogView.ts | clearBrowserCookies":{"message":"Clear browser cookies"},"panels/network/NetworkLogView.ts | copy":{"message":"Copy"},"panels/network/NetworkLogView.ts | copyAllAsCurl":{"message":"Copy all as cURL"},"panels/network/NetworkLogView.ts | copyAllAsCurlBash":{"message":"Copy all as cURL (bash)"},"panels/network/NetworkLogView.ts | copyAllAsCurlCmd":{"message":"Copy all as cURL (cmd)"},"panels/network/NetworkLogView.ts | copyAllAsFetch":{"message":"Copy all as fetch"},"panels/network/NetworkLogView.ts | copyAllAsHar":{"message":"Copy all as HAR"},"panels/network/NetworkLogView.ts | copyAllAsNodejsFetch":{"message":"Copy all as Node.js fetch"},"panels/network/NetworkLogView.ts | copyAllAsPowershell":{"message":"Copy all as PowerShell"},"panels/network/NetworkLogView.ts | copyAsCurl":{"message":"Copy as cURL"},"panels/network/NetworkLogView.ts | copyAsCurlBash":{"message":"Copy as cURL (bash)"},"panels/network/NetworkLogView.ts | copyAsCurlCmd":{"message":"Copy as cURL (cmd)"},"panels/network/NetworkLogView.ts | copyAsFetch":{"message":"Copy as fetch"},"panels/network/NetworkLogView.ts | copyAsNodejsFetch":{"message":"Copy as Node.js fetch"},"panels/network/NetworkLogView.ts | copyAsPowershell":{"message":"Copy as PowerShell"},"panels/network/NetworkLogView.ts | copyRequestHeaders":{"message":"Copy request headers"},"panels/network/NetworkLogView.ts | copyResponse":{"message":"Copy response"},"panels/network/NetworkLogView.ts | copyResponseHeaders":{"message":"Copy response headers"},"panels/network/NetworkLogView.ts | copyStacktrace":{"message":"Copy stack trace"},"panels/network/NetworkLogView.ts | domcontentloadedS":{"message":"DOMContentLoaded: {PH1}"},"panels/network/NetworkLogView.ts | dropHarFilesHere":{"message":"Drop HAR files here"},"panels/network/NetworkLogView.ts | finishS":{"message":"Finish: {PH1}"},"panels/network/NetworkLogView.ts | hasBlockedCookies":{"message":"Has blocked cookies"},"panels/network/NetworkLogView.ts | hideDataUrls":{"message":"Hide data URLs"},"panels/network/NetworkLogView.ts | hidesDataAndBlobUrls":{"message":"Hides data: and blob: URLs"},"panels/network/NetworkLogView.ts | invertFilter":{"message":"Invert"},"panels/network/NetworkLogView.ts | invertsFilter":{"message":"Inverts the search filter"},"panels/network/NetworkLogView.ts | learnMore":{"message":"Learn more"},"panels/network/NetworkLogView.ts | loadS":{"message":"Load: {PH1}"},"panels/network/NetworkLogView.ts | networkDataAvailable":{"message":"Network Data Available"},"panels/network/NetworkLogView.ts | onlyShowBlockedRequests":{"message":"Only show blocked requests"},"panels/network/NetworkLogView.ts | onlyShowRequestsWithBlocked":{"message":"Only show requests with blocked response cookies"},"panels/network/NetworkLogView.ts | onlyShowThirdPartyRequests":{"message":"Shows only requests with origin different from page origin"},"panels/network/NetworkLogView.ts | overrideHeaders":{"message":"Override headers"},"panels/network/NetworkLogView.ts | performARequestOrHitSToRecordThe":{"message":"Perform a request or hit {PH1} to record the reload."},"panels/network/NetworkLogView.ts | recordingNetworkActivity":{"message":"Recording network activity…"},"panels/network/NetworkLogView.ts | recordToDisplayNetworkActivity":{"message":"Record network log ({PH1}) to display network activity."},"panels/network/NetworkLogView.ts | replayXhr":{"message":"Replay XHR"},"panels/network/NetworkLogView.ts | resourceTypesToInclude":{"message":"Resource types to include"},"panels/network/NetworkLogView.ts | saveAllAsHarWithContent":{"message":"Save all as HAR with content"},"panels/network/NetworkLogView.ts | sBResourcesLoadedByThePage":{"message":"{PH1} B resources loaded by the page"},"panels/network/NetworkLogView.ts | sBSBResourcesLoadedByThePage":{"message":"{PH1} B / {PH2} B resources loaded by the page"},"panels/network/NetworkLogView.ts | sBSBTransferredOverNetwork":{"message":"{PH1} B / {PH2} B transferred over network"},"panels/network/NetworkLogView.ts | sBTransferredOverNetwork":{"message":"{PH1} B transferred over network"},"panels/network/NetworkLogView.ts | sRequests":{"message":"{PH1} requests"},"panels/network/NetworkLogView.ts | sResources":{"message":"{PH1} resources"},"panels/network/NetworkLogView.ts | sSRequests":{"message":"{PH1} / {PH2} requests"},"panels/network/NetworkLogView.ts | sSResources":{"message":"{PH1} / {PH2} resources"},"panels/network/NetworkLogView.ts | sSTransferred":{"message":"{PH1} / {PH2} transferred"},"panels/network/NetworkLogView.ts | sTransferred":{"message":"{PH1} transferred"},"panels/network/NetworkLogView.ts | thirdParty":{"message":"3rd-party requests"},"panels/network/NetworkLogView.ts | unblockS":{"message":"Unblock {PH1}"},"panels/network/NetworkLogViewColumns.ts | connectionId":{"message":"Connection ID"},"panels/network/NetworkLogViewColumns.ts | content":{"message":"Content"},"panels/network/NetworkLogViewColumns.ts | cookies":{"message":"Cookies"},"panels/network/NetworkLogViewColumns.ts | domain":{"message":"Domain"},"panels/network/NetworkLogViewColumns.ts | endTime":{"message":"End Time"},"panels/network/NetworkLogViewColumns.ts | initiator":{"message":"Initiator"},"panels/network/NetworkLogViewColumns.ts | initiatorAddressSpace":{"message":"Initiator Address Space"},"panels/network/NetworkLogViewColumns.ts | latency":{"message":"Latency"},"panels/network/NetworkLogViewColumns.ts | manageHeaderColumns":{"message":"Manage Header Columns…"},"panels/network/NetworkLogViewColumns.ts | method":{"message":"Method"},"panels/network/NetworkLogViewColumns.ts | name":{"message":"Name"},"panels/network/NetworkLogViewColumns.ts | networkLog":{"message":"Network Log"},"panels/network/NetworkLogViewColumns.ts | path":{"message":"Path"},"panels/network/NetworkLogViewColumns.ts | priority":{"message":"Priority"},"panels/network/NetworkLogViewColumns.ts | protocol":{"message":"Protocol"},"panels/network/NetworkLogViewColumns.ts | remoteAddress":{"message":"Remote Address"},"panels/network/NetworkLogViewColumns.ts | remoteAddressSpace":{"message":"Remote Address Space"},"panels/network/NetworkLogViewColumns.ts | responseHeaders":{"message":"Response Headers"},"panels/network/NetworkLogViewColumns.ts | responseTime":{"message":"Response Time"},"panels/network/NetworkLogViewColumns.ts | scheme":{"message":"Scheme"},"panels/network/NetworkLogViewColumns.ts | setCookies":{"message":"Set Cookies"},"panels/network/NetworkLogViewColumns.ts | size":{"message":"Size"},"panels/network/NetworkLogViewColumns.ts | startTime":{"message":"Start Time"},"panels/network/NetworkLogViewColumns.ts | status":{"message":"Status"},"panels/network/NetworkLogViewColumns.ts | text":{"message":"Text"},"panels/network/NetworkLogViewColumns.ts | time":{"message":"Time"},"panels/network/NetworkLogViewColumns.ts | totalDuration":{"message":"Total Duration"},"panels/network/NetworkLogViewColumns.ts | type":{"message":"Type"},"panels/network/NetworkLogViewColumns.ts | url":{"message":"Url"},"panels/network/NetworkLogViewColumns.ts | waterfall":{"message":"Waterfall"},"panels/network/NetworkManageCustomHeadersView.ts | addCustomHeader":{"message":"Add custom header…"},"panels/network/NetworkManageCustomHeadersView.ts | headerName":{"message":"Header Name"},"panels/network/NetworkManageCustomHeadersView.ts | manageHeaderColumns":{"message":"Manage Header Columns"},"panels/network/NetworkManageCustomHeadersView.ts | noCustomHeaders":{"message":"No custom headers"},"panels/network/NetworkPanel.ts | captureScreenshots":{"message":"Capture screenshots"},"panels/network/NetworkPanel.ts | captureScreenshotsWhenLoadingA":{"message":"Capture screenshots when loading a page"},"panels/network/NetworkPanel.ts | close":{"message":"Close"},"panels/network/NetworkPanel.ts | disableCache":{"message":"Disable cache"},"panels/network/NetworkPanel.ts | disableCacheWhileDevtoolsIsOpen":{"message":"Disable cache (while DevTools is open)"},"panels/network/NetworkPanel.ts | doNotClearLogOnPageReload":{"message":"Do not clear log on page reload / navigation"},"panels/network/NetworkPanel.ts | exportHar":{"message":"Export HAR..."},"panels/network/NetworkPanel.ts | fetchingFrames":{"message":"Fetching frames..."},"panels/network/NetworkPanel.ts | groupByFrame":{"message":"Group by frame"},"panels/network/NetworkPanel.ts | groupRequestsByTopLevelRequest":{"message":"Group requests by top level request frame"},"panels/network/NetworkPanel.ts | hitSToReloadAndCaptureFilmstrip":{"message":"Hit {PH1} to reload and capture filmstrip."},"panels/network/NetworkPanel.ts | importHarFile":{"message":"Import HAR file..."},"panels/network/NetworkPanel.ts | moreNetworkConditions":{"message":"More network conditions…"},"panels/network/NetworkPanel.ts | networkSettings":{"message":"Network settings"},"panels/network/NetworkPanel.ts | preserveLog":{"message":"Preserve log"},"panels/network/NetworkPanel.ts | recordingFrames":{"message":"Recording frames..."},"panels/network/NetworkPanel.ts | revealInNetworkPanel":{"message":"Reveal in Network panel"},"panels/network/NetworkPanel.ts | search":{"message":"Search"},"panels/network/NetworkPanel.ts | showMoreInformationInRequestRows":{"message":"Show more information in request rows"},"panels/network/NetworkPanel.ts | showOverview":{"message":"Show overview"},"panels/network/NetworkPanel.ts | showOverviewOfNetworkRequests":{"message":"Show overview of network requests"},"panels/network/NetworkPanel.ts | throttling":{"message":"Throttling"},"panels/network/NetworkPanel.ts | useLargeRequestRows":{"message":"Use large request rows"},"panels/network/NetworkSearchScope.ts | url":{"message":"URL"},"panels/network/NetworkTimeCalculator.ts | sDownload":{"message":"{PH1} download"},"panels/network/NetworkTimeCalculator.ts | sFromCache":{"message":"{PH1} (from cache)"},"panels/network/NetworkTimeCalculator.ts | sFromServiceworker":{"message":"{PH1} (from ServiceWorker)"},"panels/network/NetworkTimeCalculator.ts | sLatency":{"message":"{PH1} latency"},"panels/network/NetworkTimeCalculator.ts | sLatencySDownloadSTotal":{"message":"{PH1} latency, {PH2} download ({PH3} total)"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromThe":{"message":"Cookies that were received from the server in the 'set-cookie' header of the response"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromTheServer":{"message":"Cookies that were received from the server in the 'set-cookie' header of the response but were malformed"},"panels/network/RequestCookiesView.ts | cookiesThatWereSentToTheServerIn":{"message":"Cookies that were sent to the server in the 'cookie' header of the request"},"panels/network/RequestCookiesView.ts | learnMore":{"message":"Learn more"},"panels/network/RequestCookiesView.ts | malformedResponseCookies":{"message":"Malformed Response Cookies"},"panels/network/RequestCookiesView.ts | noRequestCookiesWereSent":{"message":"No request cookies were sent."},"panels/network/RequestCookiesView.ts | requestCookies":{"message":"Request Cookies"},"panels/network/RequestCookiesView.ts | responseCookies":{"message":"Response Cookies"},"panels/network/RequestCookiesView.ts | showFilteredOutRequestCookies":{"message":"show filtered out request cookies"},"panels/network/RequestCookiesView.ts | siteHasCookieInOtherPartition":{"message":"This site has cookies in another partition, that were not sent with this request. {PH1}"},"panels/network/RequestCookiesView.ts | thisRequestHasNoCookies":{"message":"This request has no cookies."},"panels/network/RequestHeadersView.ts | activeClientExperimentVariation":{"message":"Active client experiment variation IDs."},"panels/network/RequestHeadersView.ts | activeClientExperimentVariationIds":{"message":"Active client experiment variation IDs that trigger server-side behavior."},"panels/network/RequestHeadersView.ts | chooseThisOptionIfTheResourceAnd":{"message":"Choose this option if the resource and the document are served from the same site."},"panels/network/RequestHeadersView.ts | copyValue":{"message":"Copy value"},"panels/network/RequestHeadersView.ts | decoded":{"message":"Decoded:"},"panels/network/RequestHeadersView.ts | fromDiskCache":{"message":"(from disk cache)"},"panels/network/RequestHeadersView.ts | fromMemoryCache":{"message":"(from memory cache)"},"panels/network/RequestHeadersView.ts | fromPrefetchCache":{"message":"(from prefetch cache)"},"panels/network/RequestHeadersView.ts | fromServiceWorker":{"message":"(from service worker)"},"panels/network/RequestHeadersView.ts | fromSignedexchange":{"message":"(from signed-exchange)"},"panels/network/RequestHeadersView.ts | fromWebBundle":{"message":"(from Web Bundle)"},"panels/network/RequestHeadersView.ts | general":{"message":"General"},"panels/network/RequestHeadersView.ts | headerOverrides":{"message":"Header overrides"},"panels/network/RequestHeadersView.ts | learnMore":{"message":"Learn more"},"panels/network/RequestHeadersView.ts | learnMoreInTheIssuesTab":{"message":"Learn more in the issues tab"},"panels/network/RequestHeadersView.ts | onlyChooseThisOptionIfAn":{"message":"Only choose this option if an arbitrary website including this resource does not impose a security risk."},"panels/network/RequestHeadersView.ts | onlyProvisionalHeadersAre":{"message":"Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers."},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShown":{"message":"Provisional headers are shown"},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShownS":{"message":"Provisional headers are shown. Disable cache to see full headers."},"panels/network/RequestHeadersView.ts | referrerPolicy":{"message":"Referrer Policy"},"panels/network/RequestHeadersView.ts | remoteAddress":{"message":"Remote Address"},"panels/network/RequestHeadersView.ts | requestHeaders":{"message":"Request Headers"},"panels/network/RequestHeadersView.ts | requestMethod":{"message":"Request Method"},"panels/network/RequestHeadersView.ts | requestUrl":{"message":"Request URL"},"panels/network/RequestHeadersView.ts | responseHeaders":{"message":"Response Headers"},"panels/network/RequestHeadersView.ts | showMore":{"message":"Show more"},"panels/network/RequestHeadersView.ts | statusCode":{"message":"Status Code"},"panels/network/RequestHeadersView.ts | thisDocumentWasBlockedFrom":{"message":"This document was blocked from loading in an iframe with a sandbox attribute because this document specified a cross-origin opener policy."},"panels/network/RequestHeadersView.ts | toEmbedThisFrameInYourDocument":{"message":"To embed this frame in your document, the response needs to enable the cross-origin embedder policy by specifying the following response header:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferent":{"message":"To use this resource from a different origin, the server needs to specify a cross-origin resource policy in the response headers:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentOrigin":{"message":"To use this resource from a different origin, the server may relax the cross-origin resource policy response header:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentSite":{"message":"To use this resource from a different site, the server may relax the cross-origin resource policy response header:"},"panels/network/RequestHeadersView.ts | viewParsed":{"message":"View parsed"},"panels/network/RequestHeadersView.ts | viewSource":{"message":"View source"},"panels/network/RequestInitiatorView.ts | requestCallStack":{"message":"Request call stack"},"panels/network/RequestInitiatorView.ts | requestInitiatorChain":{"message":"Request initiator chain"},"panels/network/RequestInitiatorView.ts | thisRequestHasNoInitiatorData":{"message":"This request has no initiator data."},"panels/network/RequestPayloadView.ts | copyValue":{"message":"Copy value"},"panels/network/RequestPayloadView.ts | empty":{"message":"(empty)"},"panels/network/RequestPayloadView.ts | formData":{"message":"Form Data"},"panels/network/RequestPayloadView.ts | queryStringParameters":{"message":"Query String Parameters"},"panels/network/RequestPayloadView.ts | requestPayload":{"message":"Request Payload"},"panels/network/RequestPayloadView.ts | showMore":{"message":"Show more"},"panels/network/RequestPayloadView.ts | unableToDecodeValue":{"message":"(unable to decode value)"},"panels/network/RequestPayloadView.ts | viewDecoded":{"message":"View decoded"},"panels/network/RequestPayloadView.ts | viewDecodedL":{"message":"view decoded"},"panels/network/RequestPayloadView.ts | viewParsed":{"message":"View parsed"},"panels/network/RequestPayloadView.ts | viewParsedL":{"message":"view parsed"},"panels/network/RequestPayloadView.ts | viewSource":{"message":"View source"},"panels/network/RequestPayloadView.ts | viewSourceL":{"message":"view source"},"panels/network/RequestPayloadView.ts | viewUrlEncoded":{"message":"View URL-encoded"},"panels/network/RequestPayloadView.ts | viewUrlEncodedL":{"message":"view URL-encoded"},"panels/network/RequestPreviewView.ts | failedToLoadResponseData":{"message":"Failed to load response data"},"panels/network/RequestPreviewView.ts | previewNotAvailable":{"message":"Preview not available"},"panels/network/RequestResponseView.ts | failedToLoadResponseData":{"message":"Failed to load response data"},"panels/network/RequestResponseView.ts | thisRequestHasNoResponseData":{"message":"This request has no response data available."},"panels/network/RequestTimingView.ts | cacheStorageCacheNameS":{"message":"Cache storage cache name: {PH1}"},"panels/network/RequestTimingView.ts | cacheStorageCacheNameUnknown":{"message":"Cache storage cache name: Unknown"},"panels/network/RequestTimingView.ts | cautionRequestIsNotFinishedYet":{"message":"CAUTION: request is not finished yet!"},"panels/network/RequestTimingView.ts | connectionStart":{"message":"Connection Start"},"panels/network/RequestTimingView.ts | contentDownload":{"message":"Content Download"},"panels/network/RequestTimingView.ts | dnsLookup":{"message":"DNS Lookup"},"panels/network/RequestTimingView.ts | duration":{"message":"Duration"},"panels/network/RequestTimingView.ts | durationC":{"message":"DURATION"},"panels/network/RequestTimingView.ts | duringDevelopmentYouCanUseSToAdd":{"message":"During development, you can use {PH1} to add insights into the server-side timing of this request."},"panels/network/RequestTimingView.ts | explanation":{"message":"Explanation"},"panels/network/RequestTimingView.ts | fallbackCode":{"message":"Fallback code"},"panels/network/RequestTimingView.ts | fromHttpCache":{"message":"From HTTP cache"},"panels/network/RequestTimingView.ts | initialConnection":{"message":"Initial connection"},"panels/network/RequestTimingView.ts | label":{"message":"Label"},"panels/network/RequestTimingView.ts | networkFetch":{"message":"Network fetch"},"panels/network/RequestTimingView.ts | originalRequest":{"message":"Original Request"},"panels/network/RequestTimingView.ts | proxyNegotiation":{"message":"Proxy negotiation"},"panels/network/RequestTimingView.ts | queuedAtS":{"message":"Queued at {PH1}"},"panels/network/RequestTimingView.ts | queueing":{"message":"Queueing"},"panels/network/RequestTimingView.ts | readingPush":{"message":"Reading Push"},"panels/network/RequestTimingView.ts | receivingPush":{"message":"Receiving Push"},"panels/network/RequestTimingView.ts | requestresponse":{"message":"Request/Response"},"panels/network/RequestTimingView.ts | requestSent":{"message":"Request sent"},"panels/network/RequestTimingView.ts | requestToServiceworker":{"message":"Request to ServiceWorker"},"panels/network/RequestTimingView.ts | resourceScheduling":{"message":"Resource Scheduling"},"panels/network/RequestTimingView.ts | respondwith":{"message":"respondWith"},"panels/network/RequestTimingView.ts | responseReceived":{"message":"Response Received"},"panels/network/RequestTimingView.ts | retrievalTimeS":{"message":"Retrieval Time: {PH1}"},"panels/network/RequestTimingView.ts | serverPush":{"message":"Server Push"},"panels/network/RequestTimingView.ts | serverTiming":{"message":"Server Timing"},"panels/network/RequestTimingView.ts | serviceworkerCacheStorage":{"message":"ServiceWorker cache storage"},"panels/network/RequestTimingView.ts | sourceOfResponseS":{"message":"Source of response: {PH1}"},"panels/network/RequestTimingView.ts | ssl":{"message":"SSL"},"panels/network/RequestTimingView.ts | stalled":{"message":"Stalled"},"panels/network/RequestTimingView.ts | startedAtS":{"message":"Started at {PH1}"},"panels/network/RequestTimingView.ts | startup":{"message":"Startup"},"panels/network/RequestTimingView.ts | theServerTimingApi":{"message":"the Server Timing API"},"panels/network/RequestTimingView.ts | time":{"message":"TIME"},"panels/network/RequestTimingView.ts | total":{"message":"Total"},"panels/network/RequestTimingView.ts | unknown":{"message":"Unknown"},"panels/network/RequestTimingView.ts | waitingTtfb":{"message":"Waiting for server response"},"panels/network/RequestTimingView.ts | waterfall":{"message":"Waterfall"},"panels/network/ResourceWebSocketFrameView.ts | all":{"message":"All"},"panels/network/ResourceWebSocketFrameView.ts | binaryMessage":{"message":"Binary Message"},"panels/network/ResourceWebSocketFrameView.ts | clearAll":{"message":"Clear All"},"panels/network/ResourceWebSocketFrameView.ts | clearAllL":{"message":"Clear all"},"panels/network/ResourceWebSocketFrameView.ts | connectionCloseMessage":{"message":"Connection Close Message"},"panels/network/ResourceWebSocketFrameView.ts | continuationFrame":{"message":"Continuation Frame"},"panels/network/ResourceWebSocketFrameView.ts | copyMessage":{"message":"Copy message"},"panels/network/ResourceWebSocketFrameView.ts | copyMessageD":{"message":"Copy message..."},"panels/network/ResourceWebSocketFrameView.ts | data":{"message":"Data"},"panels/network/ResourceWebSocketFrameView.ts | enterRegex":{"message":"Enter regex, for example: (web)?socket"},"panels/network/ResourceWebSocketFrameView.ts | filter":{"message":"Filter"},"panels/network/ResourceWebSocketFrameView.ts | length":{"message":"Length"},"panels/network/ResourceWebSocketFrameView.ts | na":{"message":"N/A"},"panels/network/ResourceWebSocketFrameView.ts | pingMessage":{"message":"Ping Message"},"panels/network/ResourceWebSocketFrameView.ts | pongMessage":{"message":"Pong Message"},"panels/network/ResourceWebSocketFrameView.ts | receive":{"message":"Receive"},"panels/network/ResourceWebSocketFrameView.ts | selectMessageToBrowseItsContent":{"message":"Select message to browse its content."},"panels/network/ResourceWebSocketFrameView.ts | send":{"message":"Send"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeS":{"message":"{PH1} (Opcode {PH2})"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeSMask":{"message":"{PH1} (Opcode {PH2}, mask)"},"panels/network/ResourceWebSocketFrameView.ts | textMessage":{"message":"Text Message"},"panels/network/ResourceWebSocketFrameView.ts | time":{"message":"Time"},"panels/network/ResourceWebSocketFrameView.ts | webSocketFrame":{"message":"Web Socket Frame"},"panels/network/SignedExchangeInfoView.ts | certificate":{"message":"Certificate"},"panels/network/SignedExchangeInfoView.ts | certificateSha":{"message":"Certificate SHA256"},"panels/network/SignedExchangeInfoView.ts | certificateUrl":{"message":"Certificate URL"},"panels/network/SignedExchangeInfoView.ts | date":{"message":"Date"},"panels/network/SignedExchangeInfoView.ts | errors":{"message":"Errors"},"panels/network/SignedExchangeInfoView.ts | expires":{"message":"Expires"},"panels/network/SignedExchangeInfoView.ts | headerIntegrityHash":{"message":"Header integrity hash"},"panels/network/SignedExchangeInfoView.ts | integrity":{"message":"Integrity"},"panels/network/SignedExchangeInfoView.ts | issuer":{"message":"Issuer"},"panels/network/SignedExchangeInfoView.ts | label":{"message":"Label"},"panels/network/SignedExchangeInfoView.ts | learnmore":{"message":"Learn more"},"panels/network/SignedExchangeInfoView.ts | requestUrl":{"message":"Request URL"},"panels/network/SignedExchangeInfoView.ts | responseCode":{"message":"Response code"},"panels/network/SignedExchangeInfoView.ts | responseHeaders":{"message":"Response headers"},"panels/network/SignedExchangeInfoView.ts | signature":{"message":"Signature"},"panels/network/SignedExchangeInfoView.ts | signedHttpExchange":{"message":"Signed HTTP exchange"},"panels/network/SignedExchangeInfoView.ts | subject":{"message":"Subject"},"panels/network/SignedExchangeInfoView.ts | validFrom":{"message":"Valid from"},"panels/network/SignedExchangeInfoView.ts | validityUrl":{"message":"Validity URL"},"panels/network/SignedExchangeInfoView.ts | validUntil":{"message":"Valid until"},"panels/network/SignedExchangeInfoView.ts | viewCertificate":{"message":"View certificate"},"panels/performance_monitor/performance_monitor-meta.ts | activity":{"message":"activity"},"panels/performance_monitor/performance_monitor-meta.ts | metrics":{"message":"metrics"},"panels/performance_monitor/performance_monitor-meta.ts | monitor":{"message":"monitor"},"panels/performance_monitor/performance_monitor-meta.ts | performance":{"message":"performance"},"panels/performance_monitor/performance_monitor-meta.ts | performanceMonitor":{"message":"Performance monitor"},"panels/performance_monitor/performance_monitor-meta.ts | showPerformanceMonitor":{"message":"Show Performance monitor"},"panels/performance_monitor/performance_monitor-meta.ts | systemMonitor":{"message":"system monitor"},"panels/performance_monitor/PerformanceMonitor.ts | cpuUsage":{"message":"CPU usage"},"panels/performance_monitor/PerformanceMonitor.ts | documentFrames":{"message":"Document Frames"},"panels/performance_monitor/PerformanceMonitor.ts | documents":{"message":"Documents"},"panels/performance_monitor/PerformanceMonitor.ts | domNodes":{"message":"DOM Nodes"},"panels/performance_monitor/PerformanceMonitor.ts | graphsDisplayingARealtimeViewOf":{"message":"Graphs displaying a real-time view of performance metrics"},"panels/performance_monitor/PerformanceMonitor.ts | jsEventListeners":{"message":"JS event listeners"},"panels/performance_monitor/PerformanceMonitor.ts | jsHeapSize":{"message":"JS heap size"},"panels/performance_monitor/PerformanceMonitor.ts | layoutsSec":{"message":"Layouts / sec"},"panels/performance_monitor/PerformanceMonitor.ts | paused":{"message":"Paused"},"panels/performance_monitor/PerformanceMonitor.ts | styleRecalcsSec":{"message":"Style recalcs / sec"},"panels/profiler/CPUProfileView.ts | aggregatedSelfTime":{"message":"Aggregated self time"},"panels/profiler/CPUProfileView.ts | aggregatedTotalTime":{"message":"Aggregated total time"},"panels/profiler/CPUProfileView.ts | cpuProfiles":{"message":"CPU PROFILES"},"panels/profiler/CPUProfileView.ts | cpuProfilesShow":{"message":"CPU profiles show where the execution time is spent in your page's JavaScript functions."},"panels/profiler/CPUProfileView.ts | fms":{"message":"{PH1} ms"},"panels/profiler/CPUProfileView.ts | formatPercent":{"message":"{PH1} %"},"panels/profiler/CPUProfileView.ts | name":{"message":"Name"},"panels/profiler/CPUProfileView.ts | notOptimized":{"message":"Not optimized"},"panels/profiler/CPUProfileView.ts | recording":{"message":"Recording…"},"panels/profiler/CPUProfileView.ts | recordJavascriptCpuProfile":{"message":"Record JavaScript CPU Profile"},"panels/profiler/CPUProfileView.ts | selfTime":{"message":"Self Time"},"panels/profiler/CPUProfileView.ts | startCpuProfiling":{"message":"Start CPU profiling"},"panels/profiler/CPUProfileView.ts | stopCpuProfiling":{"message":"Stop CPU profiling"},"panels/profiler/CPUProfileView.ts | totalTime":{"message":"Total Time"},"panels/profiler/CPUProfileView.ts | url":{"message":"URL"},"panels/profiler/HeapProfilerPanel.ts | revealInSummaryView":{"message":"Reveal in Summary view"},"panels/profiler/HeapProfileView.ts | allocationSampling":{"message":"Allocation sampling"},"panels/profiler/HeapProfileView.ts | formatPercent":{"message":"{PH1} %"},"panels/profiler/HeapProfileView.ts | heapProfilerIsRecording":{"message":"Heap profiler is recording"},"panels/profiler/HeapProfileView.ts | itProvidesGoodApproximation":{"message":"It provides good approximation of allocations broken down by JavaScript execution stack."},"panels/profiler/HeapProfileView.ts | name":{"message":"Name"},"panels/profiler/HeapProfileView.ts | profileD":{"message":"Profile {PH1}"},"panels/profiler/HeapProfileView.ts | recording":{"message":"Recording…"},"panels/profiler/HeapProfileView.ts | recordMemoryAllocations":{"message":"Record memory allocations using sampling method."},"panels/profiler/HeapProfileView.ts | samplingProfiles":{"message":"SAMPLING PROFILES"},"panels/profiler/HeapProfileView.ts | sBytes":{"message":"{PH1} bytes"},"panels/profiler/HeapProfileView.ts | selectedSizeS":{"message":"Selected size: {PH1}"},"panels/profiler/HeapProfileView.ts | selfSize":{"message":"Self size"},"panels/profiler/HeapProfileView.ts | selfSizeBytes":{"message":"Self Size (bytes)"},"panels/profiler/HeapProfileView.ts | skb":{"message":"{PH1} kB"},"panels/profiler/HeapProfileView.ts | startHeapProfiling":{"message":"Start heap profiling"},"panels/profiler/HeapProfileView.ts | stopHeapProfiling":{"message":"Stop heap profiling"},"panels/profiler/HeapProfileView.ts | stopping":{"message":"Stopping…"},"panels/profiler/HeapProfileView.ts | thisProfileTypeHasMinimal":{"message":"This profile type has minimal performance overhead and can be used for long running operations."},"panels/profiler/HeapProfileView.ts | totalSize":{"message":"Total size"},"panels/profiler/HeapProfileView.ts | totalSizeBytes":{"message":"Total Size (bytes)"},"panels/profiler/HeapProfileView.ts | url":{"message":"URL"},"panels/profiler/HeapSnapshotDataGrids.ts | allocation":{"message":"Allocation"},"panels/profiler/HeapSnapshotDataGrids.ts | allocSize":{"message":"Alloc. Size"},"panels/profiler/HeapSnapshotDataGrids.ts | constructorString":{"message":"Constructor"},"panels/profiler/HeapSnapshotDataGrids.ts | count":{"message":"Count"},"panels/profiler/HeapSnapshotDataGrids.ts | Deleted":{"message":"# Deleted"},"panels/profiler/HeapSnapshotDataGrids.ts | Delta":{"message":"# Delta"},"panels/profiler/HeapSnapshotDataGrids.ts | distance":{"message":"Distance"},"panels/profiler/HeapSnapshotDataGrids.ts | distanceFromWindowObject":{"message":"Distance from window object"},"panels/profiler/HeapSnapshotDataGrids.ts | freedSize":{"message":"Freed Size"},"panels/profiler/HeapSnapshotDataGrids.ts | function":{"message":"Function"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotConstructors":{"message":"Heap Snapshot Constructors"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotDiff":{"message":"Heap Snapshot Diff"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotRetainment":{"message":"Heap Snapshot Retainment"},"panels/profiler/HeapSnapshotDataGrids.ts | liveCount":{"message":"Live Count"},"panels/profiler/HeapSnapshotDataGrids.ts | liveSize":{"message":"Live Size"},"panels/profiler/HeapSnapshotDataGrids.ts | New":{"message":"# New"},"panels/profiler/HeapSnapshotDataGrids.ts | object":{"message":"Object"},"panels/profiler/HeapSnapshotDataGrids.ts | retainedSize":{"message":"Retained Size"},"panels/profiler/HeapSnapshotDataGrids.ts | shallowSize":{"message":"Shallow Size"},"panels/profiler/HeapSnapshotDataGrids.ts | size":{"message":"Size"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeDelta":{"message":"Size Delta"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectItselfInBytes":{"message":"Size of the object itself in bytes"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectPlusTheGraphIt":{"message":"Size of the object plus the graph it retains in bytes"},"panels/profiler/HeapSnapshotGridNodes.ts | detachedFromDomTree":{"message":"Detached from DOM tree"},"panels/profiler/HeapSnapshotGridNodes.ts | genericStringsTwoPlaceholders":{"message":"{PH1}, {PH2}"},"panels/profiler/HeapSnapshotGridNodes.ts | inElement":{"message":"in"},"panels/profiler/HeapSnapshotGridNodes.ts | internalArray":{"message":"(internal array)[]"},"panels/profiler/HeapSnapshotGridNodes.ts | previewIsNotAvailable":{"message":"Preview is not available"},"panels/profiler/HeapSnapshotGridNodes.ts | revealInSummaryView":{"message":"Reveal in Summary view"},"panels/profiler/HeapSnapshotGridNodes.ts | revealObjectSWithIdSInSummary":{"message":"Reveal object ''{PH1}'' with id @{PH2} in Summary view"},"panels/profiler/HeapSnapshotGridNodes.ts | storeAsGlobalVariable":{"message":"Store as global variable"},"panels/profiler/HeapSnapshotGridNodes.ts | summary":{"message":"Summary"},"panels/profiler/HeapSnapshotGridNodes.ts | userObjectReachableFromWindow":{"message":"User object reachable from window"},"panels/profiler/HeapSnapshotProxy.ts | anErrorOccurredWhenACallToMethod":{"message":"An error occurred when a call to method ''{PH1}'' was requested"},"panels/profiler/HeapSnapshotView.ts | allObjects":{"message":"All objects"},"panels/profiler/HeapSnapshotView.ts | allocation":{"message":"Allocation"},"panels/profiler/HeapSnapshotView.ts | allocationInstrumentationOn":{"message":"Allocation instrumentation on timeline"},"panels/profiler/HeapSnapshotView.ts | allocationStack":{"message":"Allocation stack"},"panels/profiler/HeapSnapshotView.ts | allocationTimelines":{"message":"ALLOCATION TIMELINES"},"panels/profiler/HeapSnapshotView.ts | AllocationTimelinesShowInstrumented":{"message":"Allocation timelines show instrumented JavaScript memory allocations over time. Once profile is recorded you can select a time interval to see objects that were allocated within it and still alive by the end of recording. Use this profile type to isolate memory leaks."},"panels/profiler/HeapSnapshotView.ts | baseSnapshot":{"message":"Base snapshot"},"panels/profiler/HeapSnapshotView.ts | captureNumericValue":{"message":"Include numerical values in capture"},"panels/profiler/HeapSnapshotView.ts | classFilter":{"message":"Class filter"},"panels/profiler/HeapSnapshotView.ts | code":{"message":"Code"},"panels/profiler/HeapSnapshotView.ts | comparison":{"message":"Comparison"},"panels/profiler/HeapSnapshotView.ts | containment":{"message":"Containment"},"panels/profiler/HeapSnapshotView.ts | exposeInternals":{"message":"Expose internals (includes additional implementation-specific details)"},"panels/profiler/HeapSnapshotView.ts | filter":{"message":"Filter"},"panels/profiler/HeapSnapshotView.ts | find":{"message":"Find"},"panels/profiler/HeapSnapshotView.ts | heapMemoryUsage":{"message":"Heap memory usage"},"panels/profiler/HeapSnapshotView.ts | heapSnapshot":{"message":"Heap snapshot"},"panels/profiler/HeapSnapshotView.ts | heapSnapshotProfilesShowMemory":{"message":"Heap snapshot profiles show memory distribution among your page's JavaScript objects and related DOM nodes."},"panels/profiler/HeapSnapshotView.ts | heapSnapshots":{"message":"HEAP SNAPSHOTS"},"panels/profiler/HeapSnapshotView.ts | jsArrays":{"message":"JS arrays"},"panels/profiler/HeapSnapshotView.ts | liveObjects":{"message":"Live objects"},"panels/profiler/HeapSnapshotView.ts | loading":{"message":"Loading…"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBeforeS":{"message":"Objects allocated before {PH1}"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBetweenSAndS":{"message":"Objects allocated between {PH1} and {PH2}"},"panels/profiler/HeapSnapshotView.ts | percentagePlaceholder":{"message":"{PH1}%"},"panels/profiler/HeapSnapshotView.ts | perspective":{"message":"Perspective"},"panels/profiler/HeapSnapshotView.ts | recordAllocationStacksExtra":{"message":"Record stack traces of allocations (extra performance overhead)"},"panels/profiler/HeapSnapshotView.ts | recording":{"message":"Recording…"},"panels/profiler/HeapSnapshotView.ts | retainers":{"message":"Retainers"},"panels/profiler/HeapSnapshotView.ts | savingD":{"message":"Saving… {PH1}%"},"panels/profiler/HeapSnapshotView.ts | selectedSizeS":{"message":"Selected size: {PH1}"},"panels/profiler/HeapSnapshotView.ts | sKb":{"message":"{PH1} kB"},"panels/profiler/HeapSnapshotView.ts | snapshotD":{"message":"Snapshot {PH1}"},"panels/profiler/HeapSnapshotView.ts | snapshotting":{"message":"Snapshotting…"},"panels/profiler/HeapSnapshotView.ts | stackWasNotRecordedForThisObject":{"message":"Stack was not recorded for this object because it had been allocated before this profile recording started."},"panels/profiler/HeapSnapshotView.ts | startRecordingHeapProfile":{"message":"Start recording heap profile"},"panels/profiler/HeapSnapshotView.ts | statistics":{"message":"Statistics"},"panels/profiler/HeapSnapshotView.ts | stopRecordingHeapProfile":{"message":"Stop recording heap profile"},"panels/profiler/HeapSnapshotView.ts | strings":{"message":"Strings"},"panels/profiler/HeapSnapshotView.ts | summary":{"message":"Summary"},"panels/profiler/HeapSnapshotView.ts | systemObjects":{"message":"System objects"},"panels/profiler/HeapSnapshotView.ts | takeHeapSnapshot":{"message":"Take heap snapshot"},"panels/profiler/HeapSnapshotView.ts | typedArrays":{"message":"Typed arrays"},"panels/profiler/IsolateSelector.ts | changeRate":{"message":"{PH1}/s"},"panels/profiler/IsolateSelector.ts | decreasingBySPerSecond":{"message":"decreasing by {PH1} per second"},"panels/profiler/IsolateSelector.ts | empty":{"message":"(empty)"},"panels/profiler/IsolateSelector.ts | heapSizeChangeTrendOverTheLastS":{"message":"Heap size change trend over the last {PH1} minutes."},"panels/profiler/IsolateSelector.ts | heapSizeInUseByLiveJsObjects":{"message":"Heap size in use by live JS objects."},"panels/profiler/IsolateSelector.ts | increasingBySPerSecond":{"message":"increasing by {PH1} per second"},"panels/profiler/IsolateSelector.ts | javascriptVmInstances":{"message":"JavaScript VM instances"},"panels/profiler/IsolateSelector.ts | totalJsHeapSize":{"message":"Total JS heap size"},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeAcrossAllVm":{"message":"Total page JS heap size across all VM instances."},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeChangeTrend":{"message":"Total page JS heap size change trend over the last {PH1} minutes."},"panels/profiler/LiveHeapProfileView.ts | allocatedJsHeapSizeCurrentlyIn":{"message":"Allocated JS heap size currently in use"},"panels/profiler/LiveHeapProfileView.ts | anonymousScriptS":{"message":"(Anonymous Script {PH1})"},"panels/profiler/LiveHeapProfileView.ts | heapProfile":{"message":"Heap Profile"},"panels/profiler/LiveHeapProfileView.ts | jsHeap":{"message":"JS Heap"},"panels/profiler/LiveHeapProfileView.ts | kb":{"message":"kB"},"panels/profiler/LiveHeapProfileView.ts | numberOfVmsSharingTheSameScript":{"message":"Number of VMs sharing the same script source"},"panels/profiler/LiveHeapProfileView.ts | scriptUrl":{"message":"Script URL"},"panels/profiler/LiveHeapProfileView.ts | urlOfTheScriptSource":{"message":"URL of the script source"},"panels/profiler/LiveHeapProfileView.ts | vms":{"message":"VMs"},"panels/profiler/ModuleUIStrings.ts | buildingAllocationStatistics":{"message":"Building allocation statistics…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatedNodes":{"message":"Building dominated nodes…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatorTree":{"message":"Building dominator tree…"},"panels/profiler/ModuleUIStrings.ts | buildingEdgeIndexes":{"message":"Building edge indexes…"},"panels/profiler/ModuleUIStrings.ts | buildingLocations":{"message":"Building locations…"},"panels/profiler/ModuleUIStrings.ts | buildingPostorderIndex":{"message":"Building postorder index…"},"panels/profiler/ModuleUIStrings.ts | buildingRetainers":{"message":"Building retainers…"},"panels/profiler/ModuleUIStrings.ts | calculatingDistances":{"message":"Calculating distances…"},"panels/profiler/ModuleUIStrings.ts | calculatingNodeFlags":{"message":"Calculating node flags…"},"panels/profiler/ModuleUIStrings.ts | calculatingRetainedSizes":{"message":"Calculating retained sizes…"},"panels/profiler/ModuleUIStrings.ts | calculatingSamples":{"message":"Calculating samples…"},"panels/profiler/ModuleUIStrings.ts | calculatingStatistics":{"message":"Calculating statistics…"},"panels/profiler/ModuleUIStrings.ts | done":{"message":"Done"},"panels/profiler/ModuleUIStrings.ts | finishedProcessing":{"message":"Finished processing."},"panels/profiler/ModuleUIStrings.ts | loadingAllocationTracesD":{"message":"Loading allocation traces… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingEdgesD":{"message":"Loading edges… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingLocations":{"message":"Loading locations…"},"panels/profiler/ModuleUIStrings.ts | loadingNodesD":{"message":"Loading nodes… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingSamples":{"message":"Loading samples…"},"panels/profiler/ModuleUIStrings.ts | loadingSnapshotInfo":{"message":"Loading snapshot info…"},"panels/profiler/ModuleUIStrings.ts | loadingStrings":{"message":"Loading strings…"},"panels/profiler/ModuleUIStrings.ts | parsingStrings":{"message":"Parsing strings…"},"panels/profiler/ModuleUIStrings.ts | processingSnapshot":{"message":"Processing snapshot…"},"panels/profiler/ModuleUIStrings.ts | propagatingDomState":{"message":"Propagating DOM state…"},"panels/profiler/ProfileDataGrid.ts | genericTextTwoPlaceholders":{"message":"{PH1}, {PH2}"},"panels/profiler/ProfileDataGrid.ts | notOptimizedS":{"message":"Not optimized: {PH1}"},"panels/profiler/ProfileLauncherView.ts | load":{"message":"Load"},"panels/profiler/ProfileLauncherView.ts | selectJavascriptVmInstance":{"message":"Select JavaScript VM instance"},"panels/profiler/ProfileLauncherView.ts | selectProfilingType":{"message":"Select profiling type"},"panels/profiler/ProfileLauncherView.ts | start":{"message":"Start"},"panels/profiler/ProfileLauncherView.ts | stop":{"message":"Stop"},"panels/profiler/ProfileLauncherView.ts | takeSnapshot":{"message":"Take snapshot"},"panels/profiler/profiler-meta.ts | liveHeapProfile":{"message":"Live Heap Profile"},"panels/profiler/profiler-meta.ts | memory":{"message":"Memory"},"panels/profiler/profiler-meta.ts | showLiveHeapProfile":{"message":"Show Live Heap Profile"},"panels/profiler/profiler-meta.ts | showMemory":{"message":"Show Memory"},"panels/profiler/profiler-meta.ts | showNativeFunctions":{"message":"Show native functions in JS Profile"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocations":{"message":"Start recording heap allocations"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocationsAndReload":{"message":"Start recording heap allocations and reload the page"},"panels/profiler/profiler-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/profiler/profiler-meta.ts | stopRecordingHeapAllocations":{"message":"Stop recording heap allocations"},"panels/profiler/ProfileSidebarTreeElement.ts | delete":{"message":"Delete"},"panels/profiler/ProfileSidebarTreeElement.ts | load":{"message":"Load…"},"panels/profiler/ProfileSidebarTreeElement.ts | save":{"message":"Save"},"panels/profiler/ProfileSidebarTreeElement.ts | saveWithEllipsis":{"message":"Save…"},"panels/profiler/ProfilesPanel.ts | cantLoadFileSupportedFile":{"message":"Can’t load file. Supported file extensions: ''{PH1}''."},"panels/profiler/ProfilesPanel.ts | cantLoadProfileWhileAnother":{"message":"Can’t load profile while another profile is being recorded."},"panels/profiler/ProfilesPanel.ts | clearAllProfiles":{"message":"Clear all profiles"},"panels/profiler/ProfilesPanel.ts | deprecationWarnMsg":{"message":"This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles."},"panels/profiler/ProfilesPanel.ts | enableThisPanelTemporarily":{"message":"Enable this panel temporarily"},"panels/profiler/ProfilesPanel.ts | feedback":{"message":"Feedback"},"panels/profiler/ProfilesPanel.ts | goToPerformancePanel":{"message":"Go to Performance Panel"},"panels/profiler/ProfilesPanel.ts | learnMore":{"message":"Learn more"},"panels/profiler/ProfilesPanel.ts | load":{"message":"Load…"},"panels/profiler/ProfilesPanel.ts | profileLoadingFailedS":{"message":"Profile loading failed: {PH1}."},"panels/profiler/ProfilesPanel.ts | profiles":{"message":"Profiles"},"panels/profiler/ProfilesPanel.ts | runD":{"message":"Run {PH1}"},"panels/profiler/ProfileView.ts | chart":{"message":"Chart"},"panels/profiler/ProfileView.ts | excludeSelectedFunction":{"message":"Exclude selected function"},"panels/profiler/ProfileView.ts | failedToReadFile":{"message":"Failed to read file"},"panels/profiler/ProfileView.ts | fileSReadErrorS":{"message":"File ''{PH1}'' read error: {PH2}"},"panels/profiler/ProfileView.ts | findByCostMsNameOrFile":{"message":"Find by cost (>50ms), name or file"},"panels/profiler/ProfileView.ts | focusSelectedFunction":{"message":"Focus selected function"},"panels/profiler/ProfileView.ts | function":{"message":"Function"},"panels/profiler/ProfileView.ts | heavyBottomUp":{"message":"Heavy (Bottom Up)"},"panels/profiler/ProfileView.ts | loaded":{"message":"Loaded"},"panels/profiler/ProfileView.ts | loading":{"message":"Loading…"},"panels/profiler/ProfileView.ts | loadingD":{"message":"Loading… {PH1}%"},"panels/profiler/ProfileView.ts | parsing":{"message":"Parsing…"},"panels/profiler/ProfileView.ts | profile":{"message":"Profile"},"panels/profiler/ProfileView.ts | profileD":{"message":"Profile {PH1}"},"panels/profiler/ProfileView.ts | profiler":{"message":"Profiler"},"panels/profiler/ProfileView.ts | profileViewMode":{"message":"Profile view mode"},"panels/profiler/ProfileView.ts | restoreAllFunctions":{"message":"Restore all functions"},"panels/profiler/ProfileView.ts | treeTopDown":{"message":"Tree (Top Down)"},"panels/protocol_monitor/protocol_monitor-meta.ts | protocolMonitor":{"message":"Protocol monitor"},"panels/protocol_monitor/protocol_monitor-meta.ts | showProtocolMonitor":{"message":"Show Protocol monitor"},"panels/protocol_monitor/ProtocolMonitor.ts | CDPCommandEditorHidden":{"message":"CDP command editor hidden"},"panels/protocol_monitor/ProtocolMonitor.ts | CDPCommandEditorShown":{"message":"CDP command editor shown"},"panels/protocol_monitor/ProtocolMonitor.ts | clearAll":{"message":"Clear all"},"panels/protocol_monitor/ProtocolMonitor.ts | documentation":{"message":"Documentation"},"panels/protocol_monitor/ProtocolMonitor.ts | elapsedTime":{"message":"Elapsed time"},"panels/protocol_monitor/ProtocolMonitor.ts | filter":{"message":"Filter"},"panels/protocol_monitor/ProtocolMonitor.ts | hideCDPCommandEditor":{"message":"Hide CDP command editor"},"panels/protocol_monitor/ProtocolMonitor.ts | method":{"message":"Method"},"panels/protocol_monitor/ProtocolMonitor.ts | noMessageSelected":{"message":"No message selected"},"panels/protocol_monitor/ProtocolMonitor.ts | record":{"message":"Record"},"panels/protocol_monitor/ProtocolMonitor.ts | request":{"message":"Request"},"panels/protocol_monitor/ProtocolMonitor.ts | response":{"message":"Response"},"panels/protocol_monitor/ProtocolMonitor.ts | save":{"message":"Save"},"panels/protocol_monitor/ProtocolMonitor.ts | selectTarget":{"message":"Select a target"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommand":{"message":"Send a raw CDP command"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommandExplanation":{"message":"Format: 'Domain.commandName' for a command without parameters, or '{\"command\":\"Domain.commandName\", \"parameters\": {...}}' as a JSON object for a command with parameters. 'cmd'/'method' and 'args'/'params'/'arguments' are also supported as alternative keys for the JSON object."},"panels/protocol_monitor/ProtocolMonitor.ts | session":{"message":"Session"},"panels/protocol_monitor/ProtocolMonitor.ts | showCDPCommandEditor":{"message":"Show CDP command editor"},"panels/protocol_monitor/ProtocolMonitor.ts | sMs":{"message":"{PH1} ms"},"panels/protocol_monitor/ProtocolMonitor.ts | target":{"message":"Target"},"panels/protocol_monitor/ProtocolMonitor.ts | timestamp":{"message":"Timestamp"},"panels/protocol_monitor/ProtocolMonitor.ts | type":{"message":"Type"},"panels/recorder/components/CreateRecordingView.ts | cancelRecording":{"message":"Cancel recording"},"panels/recorder/components/CreateRecordingView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/CreateRecordingView.ts | includeNecessarySelectors":{"message":"You must choose CSS, Pierce, or XPath as one of your options. Only these selectors are guaranteed to be recorded since ARIA and text selectors may not be unique."},"panels/recorder/components/CreateRecordingView.ts | recordingName":{"message":"Recording name"},"panels/recorder/components/CreateRecordingView.ts | recordingNameIsRequired":{"message":"Recording name is required"},"panels/recorder/components/CreateRecordingView.ts | selectorAttribute":{"message":"Selector attribute"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeARIA":{"message":"ARIA"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeCSS":{"message":"CSS"},"panels/recorder/components/CreateRecordingView.ts | selectorTypePierce":{"message":"Pierce"},"panels/recorder/components/CreateRecordingView.ts | selectorTypes":{"message":"Selector types to record"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeText":{"message":"Text"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeXPath":{"message":"XPath"},"panels/recorder/components/CreateRecordingView.ts | startRecording":{"message":"Start recording"},"panels/recorder/components/ExtensionView.ts | closeView":{"message":"Close"},"panels/recorder/components/ExtensionView.ts | extension":{"message":"Content provided by a browser extension"},"panels/recorder/components/RecordingListView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/RecordingListView.ts | deleteRecording":{"message":"Delete recording"},"panels/recorder/components/RecordingListView.ts | openRecording":{"message":"Open recording"},"panels/recorder/components/RecordingListView.ts | playRecording":{"message":"Play recording"},"panels/recorder/components/RecordingListView.ts | savedRecordings":{"message":"Saved recordings"},"panels/recorder/components/RecordingView.ts | addAssertion":{"message":"Add assertion"},"panels/recorder/components/RecordingView.ts | cancelReplay":{"message":"Cancel replay"},"panels/recorder/components/RecordingView.ts | default":{"message":"Default"},"panels/recorder/components/RecordingView.ts | desktop":{"message":"Desktop"},"panels/recorder/components/RecordingView.ts | download":{"message":"Download: {value}"},"panels/recorder/components/RecordingView.ts | editReplaySettings":{"message":"Edit replay settings"},"panels/recorder/components/RecordingView.ts | editTitle":{"message":"Edit title"},"panels/recorder/components/RecordingView.ts | endRecording":{"message":"End recording"},"panels/recorder/components/RecordingView.ts | environment":{"message":"Environment"},"panels/recorder/components/RecordingView.ts | hideCode":{"message":"Hide code"},"panels/recorder/components/RecordingView.ts | latency":{"message":"Latency: {value} ms"},"panels/recorder/components/RecordingView.ts | mobile":{"message":"Mobile"},"panels/recorder/components/RecordingView.ts | network":{"message":"Network"},"panels/recorder/components/RecordingView.ts | performancePanel":{"message":"Performance panel"},"panels/recorder/components/RecordingView.ts | recording":{"message":"Recording…"},"panels/recorder/components/RecordingView.ts | recordingIsBeingStopped":{"message":"Stopping recording…"},"panels/recorder/components/RecordingView.ts | replaySettings":{"message":"Replay settings"},"panels/recorder/components/RecordingView.ts | requiredTitleError":{"message":"Title is required"},"panels/recorder/components/RecordingView.ts | screenshotForSection":{"message":"Screenshot for this section"},"panels/recorder/components/RecordingView.ts | showCode":{"message":"Show code"},"panels/recorder/components/RecordingView.ts | timeout":{"message":"Timeout: {value} ms"},"panels/recorder/components/RecordingView.ts | timeoutExplanation":{"message":"The timeout setting (in milliseconds) applies to every action when replaying the recording. For example, if a DOM element identified by a CSS selector does not appear on the page within the specified timeout, the replay fails with an error."},"panels/recorder/components/RecordingView.ts | timeoutLabel":{"message":"Timeout"},"panels/recorder/components/RecordingView.ts | upload":{"message":"Upload: {value}"},"panels/recorder/components/ReplayButton.ts | extensionGroup":{"message":"Extensions"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowButtonLabel":{"message":"Extremely slow replay"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowItemLabel":{"message":"Extremely slow"},"panels/recorder/components/ReplayButton.ts | ReplayNormalButtonLabel":{"message":"Replay"},"panels/recorder/components/ReplayButton.ts | ReplayNormalItemLabel":{"message":"Normal (Default)"},"panels/recorder/components/ReplayButton.ts | ReplaySlowButtonLabel":{"message":"Slow replay"},"panels/recorder/components/ReplayButton.ts | ReplaySlowItemLabel":{"message":"Slow"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowButtonLabel":{"message":"Very slow replay"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowItemLabel":{"message":"Very slow"},"panels/recorder/components/ReplayButton.ts | speedGroup":{"message":"Speed"},"panels/recorder/components/StartView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/StartView.ts | header":{"message":"Measure performance across an entire user journey"},"panels/recorder/components/StartView.ts | quickStart":{"message":"Quick start: learn the new Recorder panel in DevTools"},"panels/recorder/components/StartView.ts | step1":{"message":"Record a common user journey on your website or app"},"panels/recorder/components/StartView.ts | step2":{"message":"Replay the recording to check if the flow is working"},"panels/recorder/components/StartView.ts | step3":{"message":"Generate a detailed performance trace or export a Puppeteer script for testing"},"panels/recorder/components/StepEditor.ts | addAttribute":{"message":"Add {attributeName}"},"panels/recorder/components/StepEditor.ts | addFrameIndex":{"message":"Add frame index within the frame tree"},"panels/recorder/components/StepEditor.ts | addSelector":{"message":"Add a selector"},"panels/recorder/components/StepEditor.ts | addSelectorPart":{"message":"Add a selector part"},"panels/recorder/components/StepEditor.ts | deleteRow":{"message":"Delete row"},"panels/recorder/components/StepEditor.ts | notSaved":{"message":"Not saved: {error}"},"panels/recorder/components/StepEditor.ts | removeFrameIndex":{"message":"Remove frame index"},"panels/recorder/components/StepEditor.ts | removeSelector":{"message":"Remove a selector"},"panels/recorder/components/StepEditor.ts | removeSelectorPart":{"message":"Remove a selector part"},"panels/recorder/components/StepEditor.ts | selectorPicker":{"message":"Select an element in the page to update selectors"},"panels/recorder/components/StepEditor.ts | unknownActionType":{"message":"Unknown action type."},"panels/recorder/components/StepView.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/recorder/components/StepView.ts | addStepAfter":{"message":"Add step after"},"panels/recorder/components/StepView.ts | addStepBefore":{"message":"Add step before"},"panels/recorder/components/StepView.ts | breakpoints":{"message":"Breakpoints"},"panels/recorder/components/StepView.ts | changeStepTitle":{"message":"Change"},"panels/recorder/components/StepView.ts | clickStepTitle":{"message":"Click"},"panels/recorder/components/StepView.ts | closeStepTitle":{"message":"Close"},"panels/recorder/components/StepView.ts | copyAs":{"message":"Copy as"},"panels/recorder/components/StepView.ts | customStepTitle":{"message":"Custom step"},"panels/recorder/components/StepView.ts | doubleClickStepTitle":{"message":"Double click"},"panels/recorder/components/StepView.ts | elementRoleButton":{"message":"Button"},"panels/recorder/components/StepView.ts | elementRoleFallback":{"message":"Element"},"panels/recorder/components/StepView.ts | elementRoleInput":{"message":"Input"},"panels/recorder/components/StepView.ts | emulateNetworkConditionsStepTitle":{"message":"Emulate network conditions"},"panels/recorder/components/StepView.ts | hoverStepTitle":{"message":"Hover"},"panels/recorder/components/StepView.ts | keyDownStepTitle":{"message":"Key down"},"panels/recorder/components/StepView.ts | keyUpStepTitle":{"message":"Key up"},"panels/recorder/components/StepView.ts | navigateStepTitle":{"message":"Navigate"},"panels/recorder/components/StepView.ts | openStepActions":{"message":"Open step actions"},"panels/recorder/components/StepView.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/recorder/components/StepView.ts | removeStep":{"message":"Remove step"},"panels/recorder/components/StepView.ts | scrollStepTitle":{"message":"Scroll"},"panels/recorder/components/StepView.ts | setViewportClickTitle":{"message":"Set viewport"},"panels/recorder/components/StepView.ts | stepManagement":{"message":"Manage steps"},"panels/recorder/components/StepView.ts | waitForElementStepTitle":{"message":"Wait for element"},"panels/recorder/components/StepView.ts | waitForExpressionStepTitle":{"message":"Wait for expression"},"panels/recorder/models/RecorderSettings.ts | defaultRecordingName":{"message":"Recording {DATE} at {TIME}"},"panels/recorder/recorder-meta.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/recorder-meta.ts | recorder":{"message":"Recorder"},"panels/recorder/recorder-meta.ts | replayRecording":{"message":"Replay recording"},"panels/recorder/recorder-meta.ts | showRecorder":{"message":"Show Recorder"},"panels/recorder/recorder-meta.ts | startStopRecording":{"message":"Start/Stop recording"},"panels/recorder/recorder-meta.ts | toggleCode":{"message":"Toggle code view"},"panels/recorder/RecorderController.ts | continueReplay":{"message":"Continue"},"panels/recorder/RecorderController.ts | copyShortcut":{"message":"Copy recording or selected step"},"panels/recorder/RecorderController.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/RecorderController.ts | deleteRecording":{"message":"Delete recording"},"panels/recorder/RecorderController.ts | export":{"message":"Export"},"panels/recorder/RecorderController.ts | exportRecording":{"message":"Export"},"panels/recorder/RecorderController.ts | exportViaExtensions":{"message":"Export via extensions"},"panels/recorder/RecorderController.ts | getExtensions":{"message":"Get extensions…"},"panels/recorder/RecorderController.ts | importRecording":{"message":"Import recording"},"panels/recorder/RecorderController.ts | replayRecording":{"message":"Replay recording"},"panels/recorder/RecorderController.ts | sendFeedback":{"message":"Send feedback"},"panels/recorder/RecorderController.ts | startStopRecording":{"message":"Start/Stop recording"},"panels/recorder/RecorderController.ts | stepOverReplay":{"message":"Execute one step"},"panels/recorder/RecorderController.ts | toggleCode":{"message":"Toggle code view"},"panels/rn_welcome/rn_welcome-meta.ts | rnWelcome":{"message":"⚛️ Welcome"},"panels/rn_welcome/rn_welcome-meta.ts | showRnWelcome":{"message":"Show React Native Welcome panel"},"panels/rn_welcome/RNWelcome.ts | debuggerBrandName":{"message":"React Native JS Inspector"},"panels/rn_welcome/RNWelcome.ts | docsLabel":{"message":"Debugging docs"},"panels/rn_welcome/RNWelcome.ts | welcomeMessage":{"message":"Welcome to debugging in React Native"},"panels/rn_welcome/RNWelcome.ts | whatsNewLabel":{"message":"What's new"},"panels/screencast/ScreencastApp.ts | toggleScreencast":{"message":"Toggle screencast"},"panels/screencast/ScreencastView.ts | addressBar":{"message":"Address bar"},"panels/screencast/ScreencastView.ts | back":{"message":"back"},"panels/screencast/ScreencastView.ts | forward":{"message":"forward"},"panels/screencast/ScreencastView.ts | profilingInProgress":{"message":"Profiling in progress"},"panels/screencast/ScreencastView.ts | reload":{"message":"reload"},"panels/screencast/ScreencastView.ts | screencastViewOfDebugTarget":{"message":"Screencast view of debug target"},"panels/screencast/ScreencastView.ts | theTabIsInactive":{"message":"The tab is inactive"},"panels/search/SearchResultsPane.ts | lineS":{"message":"Line {PH1}"},"panels/search/SearchResultsPane.ts | matchesCountS":{"message":"Matches Count {PH1}"},"panels/search/SearchResultsPane.ts | showDMore":{"message":"Show {PH1} more"},"panels/search/SearchView.ts | clear":{"message":"Clear"},"panels/search/SearchView.ts | foundDMatchingLinesInDFiles":{"message":"Found {PH1} matching lines in {PH2} files."},"panels/search/SearchView.ts | foundDMatchingLinesInFile":{"message":"Found {PH1} matching lines in 1 file."},"panels/search/SearchView.ts | foundMatchingLineInFile":{"message":"Found 1 matching line in 1 file."},"panels/search/SearchView.ts | indexing":{"message":"Indexing…"},"panels/search/SearchView.ts | indexingInterrupted":{"message":"Indexing interrupted."},"panels/search/SearchView.ts | matchCase":{"message":"Match Case"},"panels/search/SearchView.ts | noMatchesFound":{"message":"No matches found."},"panels/search/SearchView.ts | refresh":{"message":"Refresh"},"panels/search/SearchView.ts | search":{"message":"Search"},"panels/search/SearchView.ts | searchFinished":{"message":"Search finished."},"panels/search/SearchView.ts | searching":{"message":"Searching…"},"panels/search/SearchView.ts | searchInterrupted":{"message":"Search interrupted."},"panels/search/SearchView.ts | searchQuery":{"message":"Search Query"},"panels/search/SearchView.ts | useRegularExpression":{"message":"Use Regular Expression"},"panels/security/security-meta.ts | security":{"message":"Security"},"panels/security/security-meta.ts | showSecurity":{"message":"Show Security"},"panels/security/SecurityModel.ts | cipherWithMAC":{"message":"{PH1} with {PH2}"},"panels/security/SecurityModel.ts | keyExchangeWithGroup":{"message":"{PH1} with {PH2}"},"panels/security/SecurityModel.ts | theSecurityOfThisPageIsUnknown":{"message":"The security of this page is unknown."},"panels/security/SecurityModel.ts | thisPageIsNotSecure":{"message":"This page is not secure."},"panels/security/SecurityModel.ts | thisPageIsNotSecureBrokenHttps":{"message":"This page is not secure (broken HTTPS)."},"panels/security/SecurityModel.ts | thisPageIsSecureValidHttps":{"message":"This page is secure (valid HTTPS)."},"panels/security/SecurityPanel.ts | activeContentWithCertificate":{"message":"active content with certificate errors"},"panels/security/SecurityPanel.ts | activeMixedContent":{"message":"active mixed content"},"panels/security/SecurityPanel.ts | allResourcesOnThisPageAreServed":{"message":"All resources on this page are served securely."},"panels/security/SecurityPanel.ts | allServedSecurely":{"message":"all served securely"},"panels/security/SecurityPanel.ts | blockedMixedContent":{"message":"Blocked mixed content"},"panels/security/SecurityPanel.ts | certificate":{"message":"Certificate"},"panels/security/SecurityPanel.ts | certificateExpiresSoon":{"message":"Certificate expires soon"},"panels/security/SecurityPanel.ts | certificateTransparency":{"message":"Certificate Transparency"},"panels/security/SecurityPanel.ts | chromeHasDeterminedThatThisSiteS":{"message":"Chrome has determined that this site could be fake or fraudulent."},"panels/security/SecurityPanel.ts | cipher":{"message":"Cipher"},"panels/security/SecurityPanel.ts | connection":{"message":"Connection"},"panels/security/SecurityPanel.ts | contentWithCertificateErrors":{"message":"content with certificate errors"},"panels/security/SecurityPanel.ts | enabled":{"message":"enabled"},"panels/security/SecurityPanel.ts | encryptedClientHello":{"message":"Encrypted ClientHello"},"panels/security/SecurityPanel.ts | flaggedByGoogleSafeBrowsing":{"message":"Flagged by Google Safe Browsing"},"panels/security/SecurityPanel.ts | hashAlgorithm":{"message":"Hash algorithm"},"panels/security/SecurityPanel.ts | hideFullDetails":{"message":"Hide full details"},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownIn":{"message":"If you believe this is shown in error please visit https://g.co/chrome/lookalike-warnings."},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownInErrorSafety":{"message":"If you believe this is shown in error please visit https://g.co/chrome/lookalike-warnings."},"panels/security/SecurityPanel.ts | info":{"message":"Info"},"panels/security/SecurityPanel.ts | insecureSha":{"message":"insecure (SHA-1)"},"panels/security/SecurityPanel.ts | issuedAt":{"message":"Issued at"},"panels/security/SecurityPanel.ts | issuer":{"message":"Issuer"},"panels/security/SecurityPanel.ts | keyExchange":{"message":"Key exchange"},"panels/security/SecurityPanel.ts | logId":{"message":"Log ID"},"panels/security/SecurityPanel.ts | logName":{"message":"Log name"},"panels/security/SecurityPanel.ts | mainOrigin":{"message":"Main origin"},"panels/security/SecurityPanel.ts | mainOriginNonsecure":{"message":"Main origin (non-secure)"},"panels/security/SecurityPanel.ts | mainOriginSecure":{"message":"Main origin (secure)"},"panels/security/SecurityPanel.ts | missing":{"message":"missing"},"panels/security/SecurityPanel.ts | mixedContent":{"message":"mixed content"},"panels/security/SecurityPanel.ts | na":{"message":"(n/a)"},"panels/security/SecurityPanel.ts | nonsecureForm":{"message":"non-secure form"},"panels/security/SecurityPanel.ts | nonsecureOrigins":{"message":"Non-secure origins"},"panels/security/SecurityPanel.ts | noSecurityDetailsAreAvailableFor":{"message":"No security details are available for this origin."},"panels/security/SecurityPanel.ts | noSecurityInformation":{"message":"No security information"},"panels/security/SecurityPanel.ts | notSecure":{"message":"Not secure"},"panels/security/SecurityPanel.ts | notSecureBroken":{"message":"Not secure (broken)"},"panels/security/SecurityPanel.ts | obsoleteConnectionSettings":{"message":"obsolete connection settings"},"panels/security/SecurityPanel.ts | openFullCertificateDetails":{"message":"Open full certificate details"},"panels/security/SecurityPanel.ts | origin":{"message":"Origin"},"panels/security/SecurityPanel.ts | overview":{"message":"Overview"},"panels/security/SecurityPanel.ts | possibleSpoofingUrl":{"message":"Possible spoofing URL"},"panels/security/SecurityPanel.ts | protocol":{"message":"Protocol"},"panels/security/SecurityPanel.ts | publickeypinningBypassed":{"message":"Public-Key-Pinning bypassed"},"panels/security/SecurityPanel.ts | publickeypinningWasBypassedByA":{"message":"Public-Key-Pinning was bypassed by a local root certificate."},"panels/security/SecurityPanel.ts | reloadThePageToRecordRequestsFor":{"message":"Reload the page to record requests for HTTP resources."},"panels/security/SecurityPanel.ts | reloadToViewDetails":{"message":"Reload to view details"},"panels/security/SecurityPanel.ts | resources":{"message":"Resources"},"panels/security/SecurityPanel.ts | rsaKeyExchangeIsObsoleteEnableAn":{"message":"RSA key exchange is obsolete. Enable an ECDHE-based cipher suite."},"panels/security/SecurityPanel.ts | sct":{"message":"SCT"},"panels/security/SecurityPanel.ts | secure":{"message":"Secure"},"panels/security/SecurityPanel.ts | secureConnectionSettings":{"message":"secure connection settings"},"panels/security/SecurityPanel.ts | secureOrigins":{"message":"Secure origins"},"panels/security/SecurityPanel.ts | securityOverview":{"message":"Security overview"},"panels/security/SecurityPanel.ts | serverSignature":{"message":"Server signature"},"panels/security/SecurityPanel.ts | showFullDetails":{"message":"Show full details"},"panels/security/SecurityPanel.ts | showLess":{"message":"Show less"},"panels/security/SecurityPanel.ts | showMoreSTotal":{"message":"Show more ({PH1} total)"},"panels/security/SecurityPanel.ts | signatureAlgorithm":{"message":"Signature algorithm"},"panels/security/SecurityPanel.ts | signatureData":{"message":"Signature data"},"panels/security/SecurityPanel.ts | sIsObsoleteEnableAnAesgcmbased":{"message":"{PH1} is obsolete. Enable an AES-GCM-based cipher suite."},"panels/security/SecurityPanel.ts | sIsObsoleteEnableTlsOrLater":{"message":"{PH1} is obsolete. Enable TLS 1.2 or later."},"panels/security/SecurityPanel.ts | source":{"message":"Source"},"panels/security/SecurityPanel.ts | subject":{"message":"Subject"},"panels/security/SecurityPanel.ts | subjectAlternativeNameMissing":{"message":"Subject Alternative Name missing"},"panels/security/SecurityPanel.ts | theCertificateChainForThisSite":{"message":"The certificate chain for this site contains a certificate signed using SHA-1."},"panels/security/SecurityPanel.ts | theCertificateForThisSiteDoesNot":{"message":"The certificate for this site does not contain a Subject Alternative Name extension containing a domain name or IP address."},"panels/security/SecurityPanel.ts | theCertificateForThisSiteExpires":{"message":"The certificate for this site expires in less than 48 hours and needs to be renewed."},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIs":{"message":"The connection to this site is encrypted and authenticated using {PH1}, {PH2}, and {PH3}."},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIsUsingA":{"message":"The connection to this site is using a valid, trusted server certificate issued by {PH1}."},"panels/security/SecurityPanel.ts | theSecurityDetailsAboveAreFrom":{"message":"The security details above are from the first inspected response."},"panels/security/SecurityPanel.ts | theServerSignatureUsesShaWhichIs":{"message":"The server signature uses SHA-1, which is obsolete. Enable a SHA-2 signature algorithm instead. (Note this is different from the signature in the certificate.)"},"panels/security/SecurityPanel.ts | thisIsAnErrorPage":{"message":"This is an error page."},"panels/security/SecurityPanel.ts | thisOriginIsANonhttpsSecure":{"message":"This origin is a non-HTTPS secure origin."},"panels/security/SecurityPanel.ts | thisPageHasANonhttpsSecureOrigin":{"message":"This page has a non-HTTPS secure origin."},"panels/security/SecurityPanel.ts | thisPageIncludesAFormWithA":{"message":"This page includes a form with a non-secure \"action\" attribute."},"panels/security/SecurityPanel.ts | thisPageIncludesHttpResources":{"message":"This page includes HTTP resources."},"panels/security/SecurityPanel.ts | thisPageIncludesResourcesThat":{"message":"This page includes resources that were loaded with certificate errors."},"panels/security/SecurityPanel.ts | thisPageIsDangerousFlaggedBy":{"message":"This page is dangerous (flagged by Google Safe Browsing)."},"panels/security/SecurityPanel.ts | thisPageIsInsecureUnencrypted":{"message":"This page is insecure (unencrypted HTTP)."},"panels/security/SecurityPanel.ts | thisPageIsSuspicious":{"message":"This page is suspicious"},"panels/security/SecurityPanel.ts | thisPageIsSuspiciousFlaggedBy":{"message":"This page is suspicious (flagged by Chrome)."},"panels/security/SecurityPanel.ts | thisRequestCompliesWithChromes":{"message":"This request complies with Chrome's Certificate Transparency policy."},"panels/security/SecurityPanel.ts | thisRequestDoesNotComplyWith":{"message":"This request does not comply with Chrome's Certificate Transparency policy."},"panels/security/SecurityPanel.ts | thisResponseWasLoadedFromCache":{"message":"This response was loaded from cache. Some security details might be missing."},"panels/security/SecurityPanel.ts | thisSiteIsMissingAValidTrusted":{"message":"This site is missing a valid, trusted certificate ({PH1})."},"panels/security/SecurityPanel.ts | thisSitesHostnameLooksSimilarToP":{"message":"This site's hostname looks similar to {PH1}. Attackers sometimes mimic sites by making small, hard-to-see changes to the domain name."},"panels/security/SecurityPanel.ts | toCheckThisPagesStatusVisit":{"message":"To check this page's status, visit g.co/safebrowsingstatus."},"panels/security/SecurityPanel.ts | unknownCanceled":{"message":"Unknown / canceled"},"panels/security/SecurityPanel.ts | unknownField":{"message":"unknown"},"panels/security/SecurityPanel.ts | validAndTrusted":{"message":"valid and trusted"},"panels/security/SecurityPanel.ts | validationStatus":{"message":"Validation status"},"panels/security/SecurityPanel.ts | validFrom":{"message":"Valid from"},"panels/security/SecurityPanel.ts | validUntil":{"message":"Valid until"},"panels/security/SecurityPanel.ts | viewCertificate":{"message":"View certificate"},"panels/security/SecurityPanel.ts | viewDRequestsInNetworkPanel":{"message":"{n, plural, =1 {View # request in Network Panel} other {View # requests in Network Panel}}"},"panels/security/SecurityPanel.ts | viewRequestsInNetworkPanel":{"message":"View requests in Network Panel"},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedContent":{"message":"You have recently allowed content loaded with certificate errors (such as scripts or iframes) to run on this site."},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedNonsecure":{"message":"You have recently allowed non-secure content (such as scripts or iframes) to run on this site."},"panels/security/SecurityPanel.ts | yourConnectionToThisOriginIsNot":{"message":"Your connection to this origin is not secure."},"panels/security/SecurityPanel.ts | yourPageRequestedNonsecure":{"message":"Your page requested non-secure resources that were blocked."},"panels/sensors/LocationsSettingsTab.ts | addLocation":{"message":"Add location..."},"panels/sensors/LocationsSettingsTab.ts | customLocations":{"message":"Custom locations"},"panels/sensors/LocationsSettingsTab.ts | lat":{"message":"Lat"},"panels/sensors/LocationsSettingsTab.ts | latitude":{"message":"Latitude"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeANumber":{"message":"Latitude must be a number"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeGreaterThanOrEqual":{"message":"Latitude must be greater than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeLessThanOrEqualToS":{"message":"Latitude must be less than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | locale":{"message":"Locale"},"panels/sensors/LocationsSettingsTab.ts | localeMustContainAlphabetic":{"message":"Locale must contain alphabetic characters"},"panels/sensors/LocationsSettingsTab.ts | locationName":{"message":"Location name"},"panels/sensors/LocationsSettingsTab.ts | locationNameCannotBeEmpty":{"message":"Location name cannot be empty"},"panels/sensors/LocationsSettingsTab.ts | locationNameMustBeLessThanS":{"message":"Location name must be less than {PH1} characters"},"panels/sensors/LocationsSettingsTab.ts | long":{"message":"Long"},"panels/sensors/LocationsSettingsTab.ts | longitude":{"message":"Longitude"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeANumber":{"message":"Longitude must be a number"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeGreaterThanOr":{"message":"Longitude must be greater than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeLessThanOrEqualTo":{"message":"Longitude must be less than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | timezoneId":{"message":"Timezone ID"},"panels/sensors/LocationsSettingsTab.ts | timezoneIdMustContainAlphabetic":{"message":"Timezone ID must contain alphabetic characters"},"panels/sensors/sensors-meta.ts | accelerometer":{"message":"accelerometer"},"panels/sensors/sensors-meta.ts | devicebased":{"message":"Device-based"},"panels/sensors/sensors-meta.ts | deviceOrientation":{"message":"device orientation"},"panels/sensors/sensors-meta.ts | emulateIdleDetectorState":{"message":"Emulate Idle Detector state"},"panels/sensors/sensors-meta.ts | forceEnabled":{"message":"Force enabled"},"panels/sensors/sensors-meta.ts | geolocation":{"message":"geolocation"},"panels/sensors/sensors-meta.ts | locale":{"message":"locale"},"panels/sensors/sensors-meta.ts | locales":{"message":"locales"},"panels/sensors/sensors-meta.ts | locations":{"message":"Locations"},"panels/sensors/sensors-meta.ts | noIdleEmulation":{"message":"No idle emulation"},"panels/sensors/sensors-meta.ts | sensors":{"message":"Sensors"},"panels/sensors/sensors-meta.ts | showLocations":{"message":"Show Locations"},"panels/sensors/sensors-meta.ts | showSensors":{"message":"Show Sensors"},"panels/sensors/sensors-meta.ts | timezones":{"message":"timezones"},"panels/sensors/sensors-meta.ts | touch":{"message":"Touch"},"panels/sensors/sensors-meta.ts | userActiveScreenLocked":{"message":"User active, screen locked"},"panels/sensors/sensors-meta.ts | userActiveScreenUnlocked":{"message":"User active, screen unlocked"},"panels/sensors/sensors-meta.ts | userIdleScreenLocked":{"message":"User idle, screen locked"},"panels/sensors/sensors-meta.ts | userIdleScreenUnlocked":{"message":"User idle, screen unlocked"},"panels/sensors/SensorsView.ts | adjustWithMousewheelOrUpdownKeys":{"message":"Adjust with mousewheel or up/down keys. {PH1}: ±10, Shift: ±1, Alt: ±0.01"},"panels/sensors/SensorsView.ts | alpha":{"message":"α (alpha)"},"panels/sensors/SensorsView.ts | beta":{"message":"β (beta)"},"panels/sensors/SensorsView.ts | customOrientation":{"message":"Custom orientation"},"panels/sensors/SensorsView.ts | deviceOrientationSetToAlphaSBeta":{"message":"Device orientation set to alpha: {PH1}, beta: {PH2}, gamma: {PH3}"},"panels/sensors/SensorsView.ts | displayDown":{"message":"Display down"},"panels/sensors/SensorsView.ts | displayUp":{"message":"Display up"},"panels/sensors/SensorsView.ts | enableOrientationToRotate":{"message":"Enable orientation to rotate"},"panels/sensors/SensorsView.ts | error":{"message":"Error"},"panels/sensors/SensorsView.ts | forcesSelectedIdleStateEmulation":{"message":"Forces selected idle state emulation"},"panels/sensors/SensorsView.ts | forcesTouchInsteadOfClick":{"message":"Forces touch instead of click"},"panels/sensors/SensorsView.ts | gamma":{"message":"γ (gamma)"},"panels/sensors/SensorsView.ts | landscapeLeft":{"message":"Landscape left"},"panels/sensors/SensorsView.ts | landscapeRight":{"message":"Landscape right"},"panels/sensors/SensorsView.ts | latitude":{"message":"Latitude"},"panels/sensors/SensorsView.ts | locale":{"message":"Locale"},"panels/sensors/SensorsView.ts | location":{"message":"Location"},"panels/sensors/SensorsView.ts | locationUnavailable":{"message":"Location unavailable"},"panels/sensors/SensorsView.ts | longitude":{"message":"Longitude"},"panels/sensors/SensorsView.ts | manage":{"message":"Manage"},"panels/sensors/SensorsView.ts | manageTheListOfLocations":{"message":"Manage the list of locations"},"panels/sensors/SensorsView.ts | noOverride":{"message":"No override"},"panels/sensors/SensorsView.ts | off":{"message":"Off"},"panels/sensors/SensorsView.ts | orientation":{"message":"Orientation"},"panels/sensors/SensorsView.ts | other":{"message":"Other…"},"panels/sensors/SensorsView.ts | overrides":{"message":"Overrides"},"panels/sensors/SensorsView.ts | portrait":{"message":"Portrait"},"panels/sensors/SensorsView.ts | portraitUpsideDown":{"message":"Portrait upside down"},"panels/sensors/SensorsView.ts | presets":{"message":"Presets"},"panels/sensors/SensorsView.ts | reset":{"message":"Reset"},"panels/sensors/SensorsView.ts | resetDeviceOrientation":{"message":"Reset device orientation"},"panels/sensors/SensorsView.ts | shiftdragHorizontallyToRotate":{"message":"Shift+drag horizontally to rotate around the y-axis"},"panels/sensors/SensorsView.ts | timezoneId":{"message":"Timezone ID"},"panels/settings/components/SyncSection.ts | preferencesSyncDisabled":{"message":"To turn this setting on, you must first enable settings sync in Chrome."},"panels/settings/components/SyncSection.ts | settings":{"message":"Go to Settings"},"panels/settings/components/SyncSection.ts | signedIn":{"message":"Signed into Chrome as:"},"panels/settings/components/SyncSection.ts | syncDisabled":{"message":"To turn this setting on, you must enable Chrome sync."},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addBrand":{"message":"Add Brand"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addedBrand":{"message":"Added brand row"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecture":{"message":"Architecture (Sec-CH-UA-Arch)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecturePlaceholder":{"message":"Architecture (e.g. x86)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandFullVersionListDelete":{"message":"Delete brand from full version list"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandName":{"message":"Brand"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandNameAriaLabel":{"message":"Brand {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandProperties":{"message":"User agent properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandUserAgentDelete":{"message":"Delete brand from user agent section"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionAriaLabel":{"message":"Version {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionPlaceholder":{"message":"Version (e.g. 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deletedBrand":{"message":"Deleted brand row"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceModel":{"message":"Device model (Sec-CH-UA-Model)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceProperties":{"message":"Device properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersion":{"message":"Full browser version (Sec-CH-UA-Full-Browser-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersionPlaceholder":{"message":"Full browser version (e.g. 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullVersionList":{"message":"Full version list (Sec-CH-UA-Full-Version-List)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | learnMore":{"message":"Learn more"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | mobileCheckboxLabel":{"message":"Mobile"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | notRepresentable":{"message":"Not representable as structured headers string."},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformLabel":{"message":"Platform (Sec-CH-UA-Platform / Sec-CH-UA-Platform-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformPlaceholder":{"message":"Platform (e.g. Android)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformProperties":{"message":"Platform properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformVersion":{"message":"Platform version"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | significantBrandVersionPlaceholder":{"message":"Significant version (e.g. 87)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | title":{"message":"User agent client hints"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | update":{"message":"Update"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | useragent":{"message":"User agent (Sec-CH-UA)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | userAgentClientHintsInfo":{"message":"User agent client hints are an alternative to the user agent string that identify the browser and the device in a more structured way with better privacy accounting."},"panels/settings/emulation/DevicesSettingsTab.ts | addCustomDevice":{"message":"Add custom device..."},"panels/settings/emulation/DevicesSettingsTab.ts | device":{"message":"Device"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceAddedOrUpdated":{"message":"Device {PH1} successfully added/updated."},"panels/settings/emulation/DevicesSettingsTab.ts | deviceName":{"message":"Device Name"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameCannotBeEmpty":{"message":"Device name cannot be empty."},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameMustBeLessThanS":{"message":"Device name must be less than {PH1} characters."},"panels/settings/emulation/DevicesSettingsTab.ts | devicePixelRatio":{"message":"Device pixel ratio"},"panels/settings/emulation/DevicesSettingsTab.ts | emulatedDevices":{"message":"Emulated Devices"},"panels/settings/emulation/DevicesSettingsTab.ts | height":{"message":"Height"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentString":{"message":"User agent string"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentType":{"message":"User agent type"},"panels/settings/emulation/DevicesSettingsTab.ts | width":{"message":"Width"},"panels/settings/emulation/emulation-meta.ts | devices":{"message":"Devices"},"panels/settings/emulation/emulation-meta.ts | showDevices":{"message":"Show Devices"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addFilenamePattern":{"message":"Add filename pattern"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addPattern":{"message":"Add pattern..."},"panels/settings/FrameworkIgnoreListSettingsTab.ts | automaticallyIgnoreListKnownThirdPartyScripts":{"message":"Known third-party scripts from source maps"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | customExclusionRules":{"message":"Custom exclusion rules:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | debuggerWillSkipThroughThe":{"message":"Debugger will skip through the scripts and will not stop on exceptions thrown by them."},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListing":{"message":"Enable Ignore Listing"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListingTooltip":{"message":"Uncheck to disable all ignore listing"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | frameworkIgnoreList":{"message":"Framework Ignore List"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | generalExclusionRules":{"message":"General exclusion rules:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreListContentScripts":{"message":"Content scripts injected by extensions"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreScriptsWhoseNamesMatchS":{"message":"Ignore scripts whose names match ''{PH1}''"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | learnMore":{"message":"Learn more"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | pattern":{"message":"Add Pattern"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternAlreadyExists":{"message":"Pattern already exists"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternCannotBeEmpty":{"message":"Pattern cannot be empty"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternMustBeAValidRegular":{"message":"Pattern must be a valid regular expression"},"panels/settings/KeybindsSettingsTab.ts | addAShortcut":{"message":"Add a shortcut"},"panels/settings/KeybindsSettingsTab.ts | confirmChanges":{"message":"Confirm changes"},"panels/settings/KeybindsSettingsTab.ts | discardChanges":{"message":"Discard changes"},"panels/settings/KeybindsSettingsTab.ts | editShortcut":{"message":"Edit shortcut"},"panels/settings/KeybindsSettingsTab.ts | FullListOfDevtoolsKeyboard":{"message":"Full list of DevTools keyboard shortcuts and gestures"},"panels/settings/KeybindsSettingsTab.ts | keyboardShortcutsList":{"message":"Keyboard shortcuts list"},"panels/settings/KeybindsSettingsTab.ts | matchShortcutsFromPreset":{"message":"Match shortcuts from preset"},"panels/settings/KeybindsSettingsTab.ts | noShortcutForAction":{"message":"No shortcut for action"},"panels/settings/KeybindsSettingsTab.ts | removeShortcut":{"message":"Remove shortcut"},"panels/settings/KeybindsSettingsTab.ts | ResetShortcutsForAction":{"message":"Reset shortcuts for action"},"panels/settings/KeybindsSettingsTab.ts | RestoreDefaultShortcuts":{"message":"Restore default shortcuts"},"panels/settings/KeybindsSettingsTab.ts | shortcutModified":{"message":"Shortcut modified"},"panels/settings/KeybindsSettingsTab.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/KeybindsSettingsTab.ts | shortcutsCannotContainOnly":{"message":"Shortcuts cannot contain only modifier keys."},"panels/settings/KeybindsSettingsTab.ts | thisShortcutIsInUseByS":{"message":"This shortcut is in use by {PH1}: {PH2}."},"panels/settings/settings-meta.ts | documentation":{"message":"Documentation"},"panels/settings/settings-meta.ts | experiments":{"message":"Experiments"},"panels/settings/settings-meta.ts | ignoreList":{"message":"Ignore List"},"panels/settings/settings-meta.ts | preferences":{"message":"Preferences"},"panels/settings/settings-meta.ts | settings":{"message":"Settings"},"panels/settings/settings-meta.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/settings-meta.ts | showExperiments":{"message":"Show Experiments"},"panels/settings/settings-meta.ts | showIgnoreList":{"message":"Show Ignore List"},"panels/settings/settings-meta.ts | showPreferences":{"message":"Show Preferences"},"panels/settings/settings-meta.ts | showShortcuts":{"message":"Show Shortcuts"},"panels/settings/SettingsScreen.ts | experiments":{"message":"Experiments"},"panels/settings/SettingsScreen.ts | filterExperimentsLabel":{"message":"Filter"},"panels/settings/SettingsScreen.ts | learnMore":{"message":"Learn more"},"panels/settings/SettingsScreen.ts | noResults":{"message":"No experiments match the filter"},"panels/settings/SettingsScreen.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"panels/settings/SettingsScreen.ts | preferences":{"message":"Preferences"},"panels/settings/SettingsScreen.ts | restoreDefaultsAndReload":{"message":"Restore defaults and reload"},"panels/settings/SettingsScreen.ts | sendFeedback":{"message":"Send feedback"},"panels/settings/SettingsScreen.ts | settings":{"message":"Settings"},"panels/settings/SettingsScreen.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/SettingsScreen.ts | theseExperimentsAreParticularly":{"message":"These experiments are particularly unstable. Enable at your own risk."},"panels/settings/SettingsScreen.ts | theseExperimentsCouldBeUnstable":{"message":"These experiments could be unstable or unreliable and may require you to restart DevTools."},"panels/settings/SettingsScreen.ts | warning":{"message":"WARNING:"},"panels/snippets/ScriptSnippetFileSystem.ts | linkedTo":{"message":"Linked to {PH1}"},"panels/snippets/ScriptSnippetFileSystem.ts | scriptSnippet":{"message":"Script snippet #{PH1}"},"panels/snippets/SnippetsQuickOpen.ts | noSnippetsFound":{"message":"No snippets found."},"panels/snippets/SnippetsQuickOpen.ts | run":{"message":"Run"},"panels/snippets/SnippetsQuickOpen.ts | snippet":{"message":"Snippet"},"panels/sources/AddSourceMapURLDialog.ts | add":{"message":"Add"},"panels/sources/AddSourceMapURLDialog.ts | debugInfoUrl":{"message":"DWARF symbols URL: "},"panels/sources/AddSourceMapURLDialog.ts | sourceMapUrl":{"message":"Source map URL: "},"panels/sources/BreakpointEditDialog.ts | breakpoint":{"message":"Breakpoint"},"panels/sources/BreakpointEditDialog.ts | breakpointType":{"message":"Breakpoint type"},"panels/sources/BreakpointEditDialog.ts | closeDialog":{"message":"Close edit dialog and save changes"},"panels/sources/BreakpointEditDialog.ts | conditionalBreakpoint":{"message":"Conditional breakpoint"},"panels/sources/BreakpointEditDialog.ts | expressionToCheckBeforePausingEg":{"message":"Expression to check before pausing, e.g. x > 5"},"panels/sources/BreakpointEditDialog.ts | learnMoreOnBreakpointTypes":{"message":"Learn more: Breakpoint Types"},"panels/sources/BreakpointEditDialog.ts | logAMessageToConsoleDoNotBreak":{"message":"Log a message to Console, do not break"},"panels/sources/BreakpointEditDialog.ts | logMessageEgXIsX":{"message":"Log message, e.g. 'x is', x"},"panels/sources/BreakpointEditDialog.ts | logpoint":{"message":"Logpoint"},"panels/sources/BreakpointEditDialog.ts | pauseOnlyWhenTheConditionIsTrue":{"message":"Pause only when the condition is true"},"panels/sources/CallStackSidebarPane.ts | callFrameWarnings":{"message":"Some call frames have warnings"},"panels/sources/CallStackSidebarPane.ts | callStack":{"message":"Call Stack"},"panels/sources/CallStackSidebarPane.ts | copyStackTrace":{"message":"Copy stack trace"},"panels/sources/CallStackSidebarPane.ts | debugFileNotFound":{"message":"Failed to load debug file \"{PH1}\"."},"panels/sources/CallStackSidebarPane.ts | notPaused":{"message":"Not paused"},"panels/sources/CallStackSidebarPane.ts | onIgnoreList":{"message":"on ignore list"},"panels/sources/CallStackSidebarPane.ts | restartFrame":{"message":"Restart frame"},"panels/sources/CallStackSidebarPane.ts | showIgnorelistedFrames":{"message":"Show ignore-listed frames"},"panels/sources/CallStackSidebarPane.ts | showMore":{"message":"Show more"},"panels/sources/components/BreakpointsView.ts | breakpointHit":{"message":"{PH1} breakpoint hit"},"panels/sources/components/BreakpointsView.ts | checked":{"message":"checked"},"panels/sources/components/BreakpointsView.ts | conditionCode":{"message":"Condition: {PH1}"},"panels/sources/components/BreakpointsView.ts | disableAllBreakpointsInFile":{"message":"Disable all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | editCondition":{"message":"Edit condition"},"panels/sources/components/BreakpointsView.ts | editLogpoint":{"message":"Edit logpoint"},"panels/sources/components/BreakpointsView.ts | enableAllBreakpointsInFile":{"message":"Enable all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | indeterminate":{"message":"mixed"},"panels/sources/components/BreakpointsView.ts | logpointCode":{"message":"Logpoint: {PH1}"},"panels/sources/components/BreakpointsView.ts | pauseOnCaughtExceptions":{"message":"Pause on caught exceptions"},"panels/sources/components/BreakpointsView.ts | pauseOnUncaughtExceptions":{"message":"Pause on uncaught exceptions"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpoints":{"message":"Remove all breakpoints"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpointsInFile":{"message":"Remove all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/sources/components/BreakpointsView.ts | removeOtherBreakpoints":{"message":"Remove other breakpoints"},"panels/sources/components/BreakpointsView.ts | revealLocation":{"message":"Reveal location"},"panels/sources/components/BreakpointsView.ts | unchecked":{"message":"unchecked"},"panels/sources/components/HeadersView.ts | addHeader":{"message":"Add a header"},"panels/sources/components/HeadersView.ts | addOverrideRule":{"message":"Add override rule"},"panels/sources/components/HeadersView.ts | errorWhenParsing":{"message":"Error when parsing ''{PH1}''."},"panels/sources/components/HeadersView.ts | learnMore":{"message":"Learn more"},"panels/sources/components/HeadersView.ts | parsingErrorExplainer":{"message":"This is most likely due to a syntax error in ''{PH1}''. Try opening this file in an external editor to fix the error or delete the file and re-create the override."},"panels/sources/components/HeadersView.ts | removeBlock":{"message":"Remove this 'ApplyTo'-section"},"panels/sources/components/HeadersView.ts | removeHeader":{"message":"Remove this header"},"panels/sources/CoveragePlugin.ts | clickToShowCoveragePanel":{"message":"Click to show Coverage Panel"},"panels/sources/CoveragePlugin.ts | coverageNa":{"message":"Coverage: n/a"},"panels/sources/CoveragePlugin.ts | coverageS":{"message":"Coverage: {PH1}"},"panels/sources/CoveragePlugin.ts | showDetails":{"message":"Show Details"},"panels/sources/CSSPlugin.ts | openColorPicker":{"message":"Open color picker."},"panels/sources/CSSPlugin.ts | openCubicBezierEditor":{"message":"Open cubic bezier editor."},"panels/sources/DebuggerPausedMessage.ts | attributeModifications":{"message":"attribute modifications"},"panels/sources/DebuggerPausedMessage.ts | childSAdded":{"message":"Child {PH1} added"},"panels/sources/DebuggerPausedMessage.ts | debuggerPaused":{"message":"Debugger paused"},"panels/sources/DebuggerPausedMessage.ts | descendantSAdded":{"message":"Descendant {PH1} added"},"panels/sources/DebuggerPausedMessage.ts | descendantSRemoved":{"message":"Descendant {PH1} removed"},"panels/sources/DebuggerPausedMessage.ts | nodeRemoval":{"message":"node removal"},"panels/sources/DebuggerPausedMessage.ts | pausedBeforePotentialOutofmemory":{"message":"Paused before potential out-of-memory crash"},"panels/sources/DebuggerPausedMessage.ts | pausedOnAssertion":{"message":"Paused on assertion"},"panels/sources/DebuggerPausedMessage.ts | pausedOnBreakpoint":{"message":"Paused on breakpoint"},"panels/sources/DebuggerPausedMessage.ts | pausedOnCspViolation":{"message":"Paused on CSP violation"},"panels/sources/DebuggerPausedMessage.ts | pausedOnDebuggedFunction":{"message":"Paused on debugged function"},"panels/sources/DebuggerPausedMessage.ts | pausedOnEventListener":{"message":"Paused on event listener"},"panels/sources/DebuggerPausedMessage.ts | pausedOnException":{"message":"Paused on exception"},"panels/sources/DebuggerPausedMessage.ts | pausedOnPromiseRejection":{"message":"Paused on promise rejection"},"panels/sources/DebuggerPausedMessage.ts | pausedOnS":{"message":"Paused on {PH1}"},"panels/sources/DebuggerPausedMessage.ts | pausedOnXhrOrFetch":{"message":"Paused on XHR or fetch"},"panels/sources/DebuggerPausedMessage.ts | subtreeModifications":{"message":"subtree modifications"},"panels/sources/DebuggerPausedMessage.ts | trustedTypePolicyViolation":{"message":"Trusted Type Policy Violation"},"panels/sources/DebuggerPausedMessage.ts | trustedTypeSinkViolation":{"message":"Trusted Type Sink Violation"},"panels/sources/DebuggerPlugin.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/sources/DebuggerPlugin.ts | addConditionalBreakpoint":{"message":"Add conditional breakpoint…"},"panels/sources/DebuggerPlugin.ts | addLogpoint":{"message":"Add logpoint…"},"panels/sources/DebuggerPlugin.ts | addSourceMap":{"message":"Add source map…"},"panels/sources/DebuggerPlugin.ts | addWasmDebugInfo":{"message":"Add DWARF debug info…"},"panels/sources/DebuggerPlugin.ts | associatedFilesAreAvailable":{"message":"Associated files are available via file tree or {PH1}."},"panels/sources/DebuggerPlugin.ts | associatedFilesShouldBeAdded":{"message":"Associated files should be added to the file tree. You can debug these resolved source files as regular JavaScript files."},"panels/sources/DebuggerPlugin.ts | configure":{"message":"Configure"},"panels/sources/DebuggerPlugin.ts | debugFileNotFound":{"message":"Failed to load debug file \"{PH1}\"."},"panels/sources/DebuggerPlugin.ts | debugInfoNotFound":{"message":"Failed to load any debug info for {PH1}."},"panels/sources/DebuggerPlugin.ts | disableBreakpoint":{"message":"{n, plural, =1 {Disable breakpoint} other {Disable all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | editBreakpoint":{"message":"Edit breakpoint…"},"panels/sources/DebuggerPlugin.ts | enableBreakpoint":{"message":"{n, plural, =1 {Enable breakpoint} other {Enable all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | neverPauseHere":{"message":"Never pause here"},"panels/sources/DebuggerPlugin.ts | removeBreakpoint":{"message":"{n, plural, =1 {Remove breakpoint} other {Remove all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"panels/sources/DebuggerPlugin.ts | sourceMapDetected":{"message":"Source map detected."},"panels/sources/DebuggerPlugin.ts | sourceMapFoundButIgnoredForFile":{"message":"Source map found, but ignored for file on ignore list."},"panels/sources/DebuggerPlugin.ts | theDebuggerWillSkipStepping":{"message":"The debugger will skip stepping through this script, and will not stop on exceptions."},"panels/sources/DebuggerPlugin.ts | thisScriptIsOnTheDebuggersIgnore":{"message":"This script is on the debugger's ignore list"},"panels/sources/FilteredUISourceCodeListProvider.ts | noFilesFound":{"message":"No files found"},"panels/sources/FilteredUISourceCodeListProvider.ts | sIgnoreListed":{"message":"{PH1} (ignore listed)"},"panels/sources/GoToLineQuickOpen.ts | currentLineSTypeALineNumber":{"message":"Current line: {PH1}. Type a line number between 1 and {PH2} to navigate to."},"panels/sources/GoToLineQuickOpen.ts | currentPositionXsTypeAnOffset":{"message":"Current position: 0x{PH1}. Type an offset between 0x{PH2} and 0x{PH3} to navigate to."},"panels/sources/GoToLineQuickOpen.ts | goToLineS":{"message":"Go to line {PH1}."},"panels/sources/GoToLineQuickOpen.ts | goToLineSAndColumnS":{"message":"Go to line {PH1} and column {PH2}."},"panels/sources/GoToLineQuickOpen.ts | goToOffsetXs":{"message":"Go to offset 0x{PH1}."},"panels/sources/GoToLineQuickOpen.ts | noFileSelected":{"message":"No file selected."},"panels/sources/GoToLineQuickOpen.ts | noResultsFound":{"message":"No results found"},"panels/sources/GoToLineQuickOpen.ts | typeANumberToGoToThatLine":{"message":"Type a number to go to that line."},"panels/sources/InplaceFormatterEditorAction.ts | format":{"message":"Format"},"panels/sources/InplaceFormatterEditorAction.ts | formatS":{"message":"Format {PH1}"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteAll":{"message":"Are you sure you want to delete all overrides contained in this folder?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteThis":{"message":"Are you sure you want to delete this file?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToExcludeThis":{"message":"Are you sure you want to exclude this folder?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToRemoveThis":{"message":"Are you sure you want to remove this folder?"},"panels/sources/NavigatorView.ts | authored":{"message":"Authored"},"panels/sources/NavigatorView.ts | authoredTooltip":{"message":"Contains original sources"},"panels/sources/NavigatorView.ts | delete":{"message":"Delete"},"panels/sources/NavigatorView.ts | deleteAllOverrides":{"message":"Delete all overrides"},"panels/sources/NavigatorView.ts | deployed":{"message":"Deployed"},"panels/sources/NavigatorView.ts | deployedTooltip":{"message":"Contains final sources the browser sees"},"panels/sources/NavigatorView.ts | excludeFolder":{"message":"Exclude folder"},"panels/sources/NavigatorView.ts | makeACopy":{"message":"Make a copy…"},"panels/sources/NavigatorView.ts | newFile":{"message":"New file"},"panels/sources/NavigatorView.ts | noDomain":{"message":"(no domain)"},"panels/sources/NavigatorView.ts | openFolder":{"message":"Open folder"},"panels/sources/NavigatorView.ts | removeFolderFromWorkspace":{"message":"Remove folder from workspace"},"panels/sources/NavigatorView.ts | rename":{"message":"Rename…"},"panels/sources/NavigatorView.ts | searchInAllFiles":{"message":"Search in all files"},"panels/sources/NavigatorView.ts | searchInFolder":{"message":"Search in folder"},"panels/sources/NavigatorView.ts | sFromSourceMap":{"message":"{PH1} (from source map)"},"panels/sources/NavigatorView.ts | sIgnoreListed":{"message":"{PH1} (ignore listed)"},"panels/sources/OutlineQuickOpen.ts | noFileSelected":{"message":"No file selected."},"panels/sources/OutlineQuickOpen.ts | noResultsFound":{"message":"No results found"},"panels/sources/OutlineQuickOpen.ts | openAJavascriptOrCssFileToSee":{"message":"Open a JavaScript or CSS file to see symbols"},"panels/sources/ProfilePlugin.ts | kb":{"message":"kB"},"panels/sources/ProfilePlugin.ts | mb":{"message":"MB"},"panels/sources/ProfilePlugin.ts | ms":{"message":"ms"},"panels/sources/ResourceOriginPlugin.ts | fromS":{"message":"(From {PH1})"},"panels/sources/ResourceOriginPlugin.ts | sourceMappedFromS":{"message":"(Source mapped from {PH1})"},"panels/sources/ScopeChainSidebarPane.ts | closure":{"message":"Closure"},"panels/sources/ScopeChainSidebarPane.ts | closureS":{"message":"Closure ({PH1})"},"panels/sources/ScopeChainSidebarPane.ts | exception":{"message":"Exception"},"panels/sources/ScopeChainSidebarPane.ts | loading":{"message":"Loading..."},"panels/sources/ScopeChainSidebarPane.ts | notPaused":{"message":"Not paused"},"panels/sources/ScopeChainSidebarPane.ts | noVariables":{"message":"No variables"},"panels/sources/ScopeChainSidebarPane.ts | returnValue":{"message":"Return value"},"panels/sources/ScopeChainSidebarPane.ts | revealInMemoryInspectorPanel":{"message":"Reveal in Memory Inspector panel"},"panels/sources/SnippetsPlugin.ts | ctrlenter":{"message":"Ctrl+Enter"},"panels/sources/SnippetsPlugin.ts | enter":{"message":"⌘+Enter"},"panels/sources/sources-meta.ts | activateBreakpoints":{"message":"Activate breakpoints"},"panels/sources/sources-meta.ts | addFolderToWorkspace":{"message":"Add folder to workspace"},"panels/sources/sources-meta.ts | addSelectedTextToWatches":{"message":"Add selected text to watches"},"panels/sources/sources-meta.ts | all":{"message":"All"},"panels/sources/sources-meta.ts | allowScrollingPastEndOfFile":{"message":"Allow scrolling past end of file"},"panels/sources/sources-meta.ts | autocompletion":{"message":"Autocompletion"},"panels/sources/sources-meta.ts | automaticallyRevealFilesIn":{"message":"Automatically reveal files in sidebar"},"panels/sources/sources-meta.ts | bracketMatching":{"message":"Bracket matching"},"panels/sources/sources-meta.ts | breakpoints":{"message":"Breakpoints"},"panels/sources/sources-meta.ts | closeAll":{"message":"Close All"},"panels/sources/sources-meta.ts | closeTheActiveTab":{"message":"Close the active tab"},"panels/sources/sources-meta.ts | codeFolding":{"message":"Code folding"},"panels/sources/sources-meta.ts | createNewSnippet":{"message":"Create new snippet"},"panels/sources/sources-meta.ts | deactivateBreakpoints":{"message":"Deactivate breakpoints"},"panels/sources/sources-meta.ts | decrementCssUnitBy":{"message":"Decrement CSS unit by {PH1}"},"panels/sources/sources-meta.ts | detectIndentation":{"message":"Detect indentation"},"panels/sources/sources-meta.ts | disableAutocompletion":{"message":"Disable autocompletion"},"panels/sources/sources-meta.ts | disableAutoFocusOnDebuggerPaused":{"message":"Do not focus Sources panel when triggering a breakpoint"},"panels/sources/sources-meta.ts | disableBracketMatching":{"message":"Disable bracket matching"},"panels/sources/sources-meta.ts | disableCodeFolding":{"message":"Disable code folding"},"panels/sources/sources-meta.ts | disableCssSourceMaps":{"message":"Disable CSS source maps"},"panels/sources/sources-meta.ts | disableJavascriptSourceMaps":{"message":"Disable JavaScript source maps"},"panels/sources/sources-meta.ts | disableTabMovesFocus":{"message":"Disable tab moves focus"},"panels/sources/sources-meta.ts | disableWasmAutoStepping":{"message":"Disable wasm auto-stepping"},"panels/sources/sources-meta.ts | disallowScrollingPastEndOfFile":{"message":"Disallow scrolling past end of file"},"panels/sources/sources-meta.ts | displayVariableValuesInlineWhile":{"message":"Display variable values inline while debugging"},"panels/sources/sources-meta.ts | doNotAutomaticallyRevealFilesIn":{"message":"Do not automatically reveal files in sidebar"},"panels/sources/sources-meta.ts | doNotDetectIndentation":{"message":"Do not detect indentation"},"panels/sources/sources-meta.ts | doNotDisplayVariableValuesInline":{"message":"Do not display variable values inline while debugging"},"panels/sources/sources-meta.ts | doNotSearchInAnonymousAndContent":{"message":"Do not search in anonymous and content scripts"},"panels/sources/sources-meta.ts | doNotShowWhitespaceCharacters":{"message":"Do not show whitespace characters"},"panels/sources/sources-meta.ts | enableAutocompletion":{"message":"Enable autocompletion"},"panels/sources/sources-meta.ts | enableAutoFocusOnDebuggerPaused":{"message":"Focus Sources panel when triggering a breakpoint"},"panels/sources/sources-meta.ts | enableBracketMatching":{"message":"Enable bracket matching"},"panels/sources/sources-meta.ts | enableCodeFolding":{"message":"Enable code folding"},"panels/sources/sources-meta.ts | enableCssSourceMaps":{"message":"Enable CSS source maps"},"panels/sources/sources-meta.ts | enableJavascriptSourceMaps":{"message":"Enable JavaScript source maps"},"panels/sources/sources-meta.ts | enableTabMovesFocus":{"message":"Enable tab moves focus"},"panels/sources/sources-meta.ts | enableWasmAutoStepping":{"message":"Enable wasm auto-stepping"},"panels/sources/sources-meta.ts | evaluateSelectedTextInConsole":{"message":"Evaluate selected text in console"},"panels/sources/sources-meta.ts | file":{"message":"File"},"panels/sources/sources-meta.ts | filesystem":{"message":"Filesystem"},"panels/sources/sources-meta.ts | goTo":{"message":"Go to"},"panels/sources/sources-meta.ts | goToAFunctionDeclarationruleSet":{"message":"Go to a function declaration/rule set"},"panels/sources/sources-meta.ts | goToLine":{"message":"Go to line"},"panels/sources/sources-meta.ts | incrementCssUnitBy":{"message":"Increment CSS unit by {PH1}"},"panels/sources/sources-meta.ts | jumpToNextEditingLocation":{"message":"Jump to next editing location"},"panels/sources/sources-meta.ts | jumpToPreviousEditingLocation":{"message":"Jump to previous editing location"},"panels/sources/sources-meta.ts | line":{"message":"Line"},"panels/sources/sources-meta.ts | nextCallFrame":{"message":"Next call frame"},"panels/sources/sources-meta.ts | nextEditorTab":{"message":"Next editor"},"panels/sources/sources-meta.ts | none":{"message":"None"},"panels/sources/sources-meta.ts | open":{"message":"Open"},"panels/sources/sources-meta.ts | pauseScriptExecution":{"message":"Pause script execution"},"panels/sources/sources-meta.ts | previousCallFrame":{"message":"Previous call frame"},"panels/sources/sources-meta.ts | previousEditorTab":{"message":"Previous editor"},"panels/sources/sources-meta.ts | quickSource":{"message":"Quick source"},"panels/sources/sources-meta.ts | rename":{"message":"Rename"},"panels/sources/sources-meta.ts | resumeScriptExecution":{"message":"Resume script execution"},"panels/sources/sources-meta.ts | runSnippet":{"message":"Run snippet"},"panels/sources/sources-meta.ts | save":{"message":"Save"},"panels/sources/sources-meta.ts | saveAll":{"message":"Save all"},"panels/sources/sources-meta.ts | scope":{"message":"Scope"},"panels/sources/sources-meta.ts | search":{"message":"Search"},"panels/sources/sources-meta.ts | searchInAnonymousAndContent":{"message":"Search in anonymous and content scripts"},"panels/sources/sources-meta.ts | showAllWhitespaceCharacters":{"message":"Show all whitespace characters"},"panels/sources/sources-meta.ts | showBreakpoints":{"message":"Show Breakpoints"},"panels/sources/sources-meta.ts | showFilesystem":{"message":"Show Filesystem"},"panels/sources/sources-meta.ts | showQuickSource":{"message":"Show Quick source"},"panels/sources/sources-meta.ts | showScope":{"message":"Show Scope"},"panels/sources/sources-meta.ts | showSearch":{"message":"Show Search"},"panels/sources/sources-meta.ts | showSnippets":{"message":"Show Snippets"},"panels/sources/sources-meta.ts | showSources":{"message":"Show Sources"},"panels/sources/sources-meta.ts | showThreads":{"message":"Show Threads"},"panels/sources/sources-meta.ts | showTrailingWhitespaceCharacters":{"message":"Show trailing whitespace characters"},"panels/sources/sources-meta.ts | showWatch":{"message":"Show Watch"},"panels/sources/sources-meta.ts | showWhitespaceCharacters":{"message":"Show whitespace characters:"},"panels/sources/sources-meta.ts | snippets":{"message":"Snippets"},"panels/sources/sources-meta.ts | sources":{"message":"Sources"},"panels/sources/sources-meta.ts | step":{"message":"Step"},"panels/sources/sources-meta.ts | stepIntoNextFunctionCall":{"message":"Step into next function call"},"panels/sources/sources-meta.ts | stepOutOfCurrentFunction":{"message":"Step out of current function"},"panels/sources/sources-meta.ts | stepOverNextFunctionCall":{"message":"Step over next function call"},"panels/sources/sources-meta.ts | switchFile":{"message":"Switch file"},"panels/sources/sources-meta.ts | symbol":{"message":"Symbol"},"panels/sources/sources-meta.ts | threads":{"message":"Threads"},"panels/sources/sources-meta.ts | toggleBreakpoint":{"message":"Toggle breakpoint"},"panels/sources/sources-meta.ts | toggleBreakpointEnabled":{"message":"Toggle breakpoint enabled"},"panels/sources/sources-meta.ts | toggleBreakpointInputWindow":{"message":"Toggle breakpoint input window"},"panels/sources/sources-meta.ts | toggleDebuggerSidebar":{"message":"Toggle debugger sidebar"},"panels/sources/sources-meta.ts | toggleNavigatorSidebar":{"message":"Toggle navigator sidebar"},"panels/sources/sources-meta.ts | trailing":{"message":"Trailing"},"panels/sources/sources-meta.ts | wasmAutoStepping":{"message":"When debugging wasm with debug information, do not pause on wasm bytecode if possible"},"panels/sources/sources-meta.ts | watch":{"message":"Watch"},"panels/sources/SourcesNavigator.ts | clearConfiguration":{"message":"Clear configuration"},"panels/sources/SourcesNavigator.ts | contentScriptsServedByExtensions":{"message":"Content scripts served by extensions appear here"},"panels/sources/SourcesNavigator.ts | createAndSaveCodeSnippetsFor":{"message":"Create and save code snippets for later reuse"},"panels/sources/SourcesNavigator.ts | createNewSnippet":{"message":"Create new snippet"},"panels/sources/SourcesNavigator.ts | learnMore":{"message":"Learn more"},"panels/sources/SourcesNavigator.ts | learnMoreAboutWorkspaces":{"message":"Learn more about Workspaces"},"panels/sources/SourcesNavigator.ts | newSnippet":{"message":"New snippet"},"panels/sources/SourcesNavigator.ts | overridePageAssetsWithFilesFromA":{"message":"Override page assets with files from a local folder"},"panels/sources/SourcesNavigator.ts | remove":{"message":"Remove"},"panels/sources/SourcesNavigator.ts | rename":{"message":"Rename…"},"panels/sources/SourcesNavigator.ts | run":{"message":"Run"},"panels/sources/SourcesNavigator.ts | saveAs":{"message":"Save as..."},"panels/sources/SourcesNavigator.ts | selectFolderForOverrides":{"message":"Select folder for overrides"},"panels/sources/SourcesNavigator.ts | syncChangesInDevtoolsWithThe":{"message":"Sync changes in DevTools with the local filesystem"},"panels/sources/SourcesPanel.ts | continueToHere":{"message":"Continue to here"},"panels/sources/SourcesPanel.ts | copyS":{"message":"Copy {PH1}"},"panels/sources/SourcesPanel.ts | copyStringAsJSLiteral":{"message":"Copy string as JavaScript literal"},"panels/sources/SourcesPanel.ts | copyStringAsJSONLiteral":{"message":"Copy string as JSON literal"},"panels/sources/SourcesPanel.ts | copyStringContents":{"message":"Copy string contents"},"panels/sources/SourcesPanel.ts | debuggerHidden":{"message":"Debugger sidebar hidden"},"panels/sources/SourcesPanel.ts | debuggerShown":{"message":"Debugger sidebar shown"},"panels/sources/SourcesPanel.ts | dropWorkspaceFolderHere":{"message":"Drop workspace folder here"},"panels/sources/SourcesPanel.ts | groupByAuthored":{"message":"Group by Authored/Deployed"},"panels/sources/SourcesPanel.ts | groupByFolder":{"message":"Group by folder"},"panels/sources/SourcesPanel.ts | hideDebugger":{"message":"Hide debugger"},"panels/sources/SourcesPanel.ts | hideIgnoreListed":{"message":"Hide ignore-listed sources"},"panels/sources/SourcesPanel.ts | hideNavigator":{"message":"Hide navigator"},"panels/sources/SourcesPanel.ts | moreOptions":{"message":"More options"},"panels/sources/SourcesPanel.ts | navigatorHidden":{"message":"Navigator sidebar hidden"},"panels/sources/SourcesPanel.ts | navigatorShown":{"message":"Navigator sidebar shown"},"panels/sources/SourcesPanel.ts | openInSourcesPanel":{"message":"Open in Sources panel"},"panels/sources/SourcesPanel.ts | pauseOnCaughtExceptions":{"message":"Pause on caught exceptions"},"panels/sources/SourcesPanel.ts | resumeWithAllPausesBlockedForMs":{"message":"Resume with all pauses blocked for 500 ms"},"panels/sources/SourcesPanel.ts | revealInSidebar":{"message":"Reveal in sidebar"},"panels/sources/SourcesPanel.ts | showDebugger":{"message":"Show debugger"},"panels/sources/SourcesPanel.ts | showFunctionDefinition":{"message":"Show function definition"},"panels/sources/SourcesPanel.ts | showNavigator":{"message":"Show navigator"},"panels/sources/SourcesPanel.ts | storeSAsGlobalVariable":{"message":"Store {PH1} as global variable"},"panels/sources/SourcesPanel.ts | terminateCurrentJavascriptCall":{"message":"Terminate current JavaScript call"},"panels/sources/SourcesView.ts | dropInAFolderToAddToWorkspace":{"message":"Drop in a folder to add to workspace"},"panels/sources/SourcesView.ts | openFile":{"message":"Open file"},"panels/sources/SourcesView.ts | runCommand":{"message":"Run command"},"panels/sources/SourcesView.ts | sourceViewActions":{"message":"Source View Actions"},"panels/sources/TabbedEditorContainer.ts | areYouSureYouWantToCloseUnsaved":{"message":"Are you sure you want to close unsaved file: {PH1}?"},"panels/sources/TabbedEditorContainer.ts | changesToThisFileWereNotSavedTo":{"message":"Changes to this file were not saved to file system."},"panels/sources/TabbedEditorContainer.ts | unableToLoadThisContent":{"message":"Unable to load this content."},"panels/sources/ThreadsSidebarPane.ts | paused":{"message":"paused"},"panels/sources/WatchExpressionsSidebarPane.ts | addPropertyPathToWatch":{"message":"Add property path to watch"},"panels/sources/WatchExpressionsSidebarPane.ts | addWatchExpression":{"message":"Add watch expression"},"panels/sources/WatchExpressionsSidebarPane.ts | copyValue":{"message":"Copy value"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteAllWatchExpressions":{"message":"Delete all watch expressions"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteWatchExpression":{"message":"Delete watch expression"},"panels/sources/WatchExpressionsSidebarPane.ts | notAvailable":{"message":""},"panels/sources/WatchExpressionsSidebarPane.ts | noWatchExpressions":{"message":"No watch expressions"},"panels/sources/WatchExpressionsSidebarPane.ts | refreshWatchExpressions":{"message":"Refresh watch expressions"},"panels/timeline/AppenderUtils.ts | sSelfS":{"message":"{PH1} (self {PH2})"},"panels/timeline/CountersGraph.ts | documents":{"message":"Documents"},"panels/timeline/CountersGraph.ts | gpuMemory":{"message":"GPU Memory"},"panels/timeline/CountersGraph.ts | jsHeap":{"message":"JS Heap"},"panels/timeline/CountersGraph.ts | listeners":{"message":"Listeners"},"panels/timeline/CountersGraph.ts | nodes":{"message":"Nodes"},"panels/timeline/CountersGraph.ts | ss":{"message":"[{PH1} – {PH2}]"},"panels/timeline/EventsTimelineTreeView.ts | all":{"message":"All"},"panels/timeline/EventsTimelineTreeView.ts | Dms":{"message":"{PH1} ms"},"panels/timeline/EventsTimelineTreeView.ts | durationFilter":{"message":"Duration filter"},"panels/timeline/EventsTimelineTreeView.ts | filterEventLog":{"message":"Filter event log"},"panels/timeline/EventsTimelineTreeView.ts | startTime":{"message":"Start Time"},"panels/timeline/GPUTrackAppender.ts | gpu":{"message":"GPU"},"panels/timeline/InteractionsTrackAppender.ts | interactions":{"message":"Interactions"},"panels/timeline/LayoutShiftsTrackAppender.ts | layoutShifts":{"message":"Layout Shifts"},"panels/timeline/timeline-meta.ts | hideChromeFrameInLayersView":{"message":"Hide chrome frame in Layers view"},"panels/timeline/timeline-meta.ts | javascriptProfiler":{"message":"JavaScript Profiler"},"panels/timeline/timeline-meta.ts | loadProfile":{"message":"Load profile…"},"panels/timeline/timeline-meta.ts | nextFrame":{"message":"Next frame"},"panels/timeline/timeline-meta.ts | nextRecording":{"message":"Next recording"},"panels/timeline/timeline-meta.ts | performance":{"message":"Performance"},"panels/timeline/timeline-meta.ts | previousFrame":{"message":"Previous frame"},"panels/timeline/timeline-meta.ts | previousRecording":{"message":"Previous recording"},"panels/timeline/timeline-meta.ts | record":{"message":"Record"},"panels/timeline/timeline-meta.ts | saveProfile":{"message":"Save profile…"},"panels/timeline/timeline-meta.ts | showJavascriptProfiler":{"message":"Show JavaScript Profiler"},"panels/timeline/timeline-meta.ts | showPerformance":{"message":"Show Performance"},"panels/timeline/timeline-meta.ts | showRecentTimelineSessions":{"message":"Show recent timeline sessions"},"panels/timeline/timeline-meta.ts | startProfilingAndReloadPage":{"message":"Start profiling and reload page"},"panels/timeline/timeline-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/timeline/timeline-meta.ts | stop":{"message":"Stop"},"panels/timeline/TimelineController.ts | cpuProfileForATargetIsNot":{"message":"CPU profile for a target is not available."},"panels/timeline/TimelineController.ts | tracingNotSupported":{"message":"Performance trace recording not supported for this type of target"},"panels/timeline/TimelineDetailsView.ts | bottomup":{"message":"Bottom-Up"},"panels/timeline/TimelineDetailsView.ts | callTree":{"message":"Call Tree"},"panels/timeline/TimelineDetailsView.ts | estimated":{"message":"estimated"},"panels/timeline/TimelineDetailsView.ts | eventLog":{"message":"Event Log"},"panels/timeline/TimelineDetailsView.ts | layers":{"message":"Layers"},"panels/timeline/TimelineDetailsView.ts | learnMore":{"message":"Learn more"},"panels/timeline/TimelineDetailsView.ts | paintProfiler":{"message":"Paint Profiler"},"panels/timeline/TimelineDetailsView.ts | rangeSS":{"message":"Range: {PH1} – {PH2}"},"panels/timeline/TimelineDetailsView.ts | summary":{"message":"Summary"},"panels/timeline/TimelineDetailsView.ts | totalBlockingTimeSmss":{"message":"Total blocking time: {PH1}ms{PH2}"},"panels/timeline/TimelineEventOverview.ts | cpu":{"message":"CPU"},"panels/timeline/TimelineEventOverview.ts | heap":{"message":"HEAP"},"panels/timeline/TimelineEventOverview.ts | net":{"message":"NET"},"panels/timeline/TimelineEventOverview.ts | sSDash":{"message":"{PH1} – {PH2}"},"panels/timeline/TimelineFlameChartDataProvider.ts | animation":{"message":"Animation"},"panels/timeline/TimelineFlameChartDataProvider.ts | droppedFrame":{"message":"Dropped Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | frame":{"message":"Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | frames":{"message":"Frames"},"panels/timeline/TimelineFlameChartDataProvider.ts | frameS":{"message":"Frame — {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | idleFrame":{"message":"Idle Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | longFrame":{"message":"Long frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | main":{"message":"Main"},"panels/timeline/TimelineFlameChartDataProvider.ts | mainS":{"message":"Main — {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | onIgnoreList":{"message":"On ignore list"},"panels/timeline/TimelineFlameChartDataProvider.ts | partiallyPresentedFrame":{"message":"Partially Presented Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | raster":{"message":"Raster"},"panels/timeline/TimelineFlameChartDataProvider.ts | rasterizerThreadS":{"message":"Rasterizer Thread {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | sSelfS":{"message":"{PH1} (self {PH2})"},"panels/timeline/TimelineFlameChartDataProvider.ts | subframe":{"message":"Subframe"},"panels/timeline/TimelineFlameChartDataProvider.ts | thread":{"message":"Thread"},"panels/timeline/TimelineFlameChartNetworkDataProvider.ts | network":{"message":"Network"},"panels/timeline/TimelineFlameChartView.ts | sAtS":{"message":"{PH1} at {PH2}"},"panels/timeline/TimelineHistoryManager.ts | currentSessionSS":{"message":"Current Session: {PH1}. {PH2}"},"panels/timeline/TimelineHistoryManager.ts | moments":{"message":"moments"},"panels/timeline/TimelineHistoryManager.ts | noRecordings":{"message":"(no recordings)"},"panels/timeline/TimelineHistoryManager.ts | sAgo":{"message":"({PH1} ago)"},"panels/timeline/TimelineHistoryManager.ts | sD":{"message":"{PH1} #{PH2}"},"panels/timeline/TimelineHistoryManager.ts | selectTimelineSession":{"message":"Select Timeline Session"},"panels/timeline/TimelineHistoryManager.ts | sH":{"message":"{PH1} h"},"panels/timeline/TimelineHistoryManager.ts | sM":{"message":"{PH1} m"},"panels/timeline/TimelineLoader.ts | legacyTimelineFormatIsNot":{"message":"Legacy Timeline format is not supported."},"panels/timeline/TimelineLoader.ts | malformedCpuProfileFormat":{"message":"Malformed CPU profile format"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataS":{"message":"Malformed timeline data: {PH1}"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataUnknownJson":{"message":"Malformed timeline data: Unknown JSON format"},"panels/timeline/TimelineLoader.ts | malformedTimelineInputWrongJson":{"message":"Malformed timeline input, wrong JSON brackets balance"},"panels/timeline/TimelinePanel.ts | afterRecordingSelectAnAreaOf":{"message":"After recording, select an area of interest in the overview by dragging. Then, zoom and pan the timeline with the mousewheel or {PH1} keys. {PH2}"},"panels/timeline/TimelinePanel.ts | bufferUsage":{"message":"Buffer usage"},"panels/timeline/TimelinePanel.ts | capturesAdvancedPaint":{"message":"Captures advanced paint instrumentation, introduces significant performance overhead"},"panels/timeline/TimelinePanel.ts | captureScreenshots":{"message":"Capture screenshots"},"panels/timeline/TimelinePanel.ts | captureSettings":{"message":"Capture settings"},"panels/timeline/TimelinePanel.ts | clear":{"message":"Clear"},"panels/timeline/TimelinePanel.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start a new recording."},"panels/timeline/TimelinePanel.ts | clickTheReloadButtonSOrHitSTo":{"message":"Click the reload button {PH1} or hit {PH2} to record the page load."},"panels/timeline/TimelinePanel.ts | close":{"message":"Close"},"panels/timeline/TimelinePanel.ts | couldNotStart":{"message":"Could not start recording, please try again later"},"panels/timeline/TimelinePanel.ts | cpu":{"message":"CPU:"},"panels/timeline/TimelinePanel.ts | CpuThrottlingIsEnabled":{"message":"- CPU throttling is enabled"},"panels/timeline/TimelinePanel.ts | description":{"message":"Description"},"panels/timeline/TimelinePanel.ts | disableJavascriptSamples":{"message":"Disable JavaScript samples"},"panels/timeline/TimelinePanel.ts | disablesJavascriptSampling":{"message":"Disables JavaScript sampling, reduces overhead when running against mobile devices"},"panels/timeline/TimelinePanel.ts | dropTimelineFileOrUrlHere":{"message":"Drop timeline file or URL here"},"panels/timeline/TimelinePanel.ts | enableAdvancedPaint":{"message":"Enable advanced paint instrumentation (slow)"},"panels/timeline/TimelinePanel.ts | failedToSaveTimelineSS":{"message":"Failed to save timeline: {PH1} ({PH2})"},"panels/timeline/TimelinePanel.ts | HardwareConcurrencyIsEnabled":{"message":"- Hardware concurrency override is enabled"},"panels/timeline/TimelinePanel.ts | initializingProfiler":{"message":"Initializing profiler…"},"panels/timeline/TimelinePanel.ts | JavascriptSamplingIsDisabled":{"message":"- JavaScript sampling is disabled"},"panels/timeline/TimelinePanel.ts | learnmore":{"message":"Learn more"},"panels/timeline/TimelinePanel.ts | loadingProfile":{"message":"Loading profile…"},"panels/timeline/TimelinePanel.ts | loadProfile":{"message":"Load profile…"},"panels/timeline/TimelinePanel.ts | memory":{"message":"Memory"},"panels/timeline/TimelinePanel.ts | network":{"message":"Network:"},"panels/timeline/TimelinePanel.ts | networkConditions":{"message":"Network conditions"},"panels/timeline/TimelinePanel.ts | NetworkThrottlingIsEnabled":{"message":"- Network throttling is enabled"},"panels/timeline/TimelinePanel.ts | processingProfile":{"message":"Processing profile…"},"panels/timeline/TimelinePanel.ts | profiling":{"message":"Profiling…"},"panels/timeline/TimelinePanel.ts | received":{"message":"Received"},"panels/timeline/TimelinePanel.ts | recordingFailed":{"message":"Recording failed"},"panels/timeline/TimelinePanel.ts | saveProfile":{"message":"Save profile…"},"panels/timeline/TimelinePanel.ts | screenshots":{"message":"Screenshots"},"panels/timeline/TimelinePanel.ts | showMemoryTimeline":{"message":"Show memory timeline"},"panels/timeline/TimelinePanel.ts | SignificantOverheadDueToPaint":{"message":"- Significant overhead due to paint instrumentation"},"panels/timeline/TimelinePanel.ts | ssec":{"message":"{PH1} sec"},"panels/timeline/TimelinePanel.ts | status":{"message":"Status"},"panels/timeline/TimelinePanel.ts | stop":{"message":"Stop"},"panels/timeline/TimelinePanel.ts | stoppingTimeline":{"message":"Stopping timeline…"},"panels/timeline/TimelinePanel.ts | time":{"message":"Time"},"panels/timeline/TimelinePanel.ts | wasd":{"message":"WASD"},"panels/timeline/TimelineTreeView.ts | activity":{"message":"Activity"},"panels/timeline/TimelineTreeView.ts | chromeExtensionsOverhead":{"message":"[Chrome extensions overhead]"},"panels/timeline/TimelineTreeView.ts | filter":{"message":"Filter"},"panels/timeline/TimelineTreeView.ts | filterBottomup":{"message":"Filter bottom-up"},"panels/timeline/TimelineTreeView.ts | filterCallTree":{"message":"Filter call tree"},"panels/timeline/TimelineTreeView.ts | fms":{"message":"{PH1} ms"},"panels/timeline/TimelineTreeView.ts | groupBy":{"message":"Group by"},"panels/timeline/TimelineTreeView.ts | groupByActivity":{"message":"Group by Activity"},"panels/timeline/TimelineTreeView.ts | groupByCategory":{"message":"Group by Category"},"panels/timeline/TimelineTreeView.ts | groupByDomain":{"message":"Group by Domain"},"panels/timeline/TimelineTreeView.ts | groupByFrame":{"message":"Group by Frame"},"panels/timeline/TimelineTreeView.ts | groupBySubdomain":{"message":"Group by Subdomain"},"panels/timeline/TimelineTreeView.ts | groupByUrl":{"message":"Group by URL"},"panels/timeline/TimelineTreeView.ts | heaviestStack":{"message":"Heaviest stack"},"panels/timeline/TimelineTreeView.ts | heaviestStackHidden":{"message":"Heaviest stack sidebar hidden"},"panels/timeline/TimelineTreeView.ts | heaviestStackShown":{"message":"Heaviest stack sidebar shown"},"panels/timeline/TimelineTreeView.ts | hideHeaviestStack":{"message":"Hide Heaviest stack"},"panels/timeline/TimelineTreeView.ts | javascript":{"message":"JavaScript"},"panels/timeline/TimelineTreeView.ts | noGrouping":{"message":"No Grouping"},"panels/timeline/TimelineTreeView.ts | notOptimizedS":{"message":"Not optimized: {PH1}"},"panels/timeline/TimelineTreeView.ts | page":{"message":"Page"},"panels/timeline/TimelineTreeView.ts | percentPlaceholder":{"message":"{PH1} %"},"panels/timeline/TimelineTreeView.ts | performance":{"message":"Performance"},"panels/timeline/TimelineTreeView.ts | selectItemForDetails":{"message":"Select item for details."},"panels/timeline/TimelineTreeView.ts | selfTime":{"message":"Self Time"},"panels/timeline/TimelineTreeView.ts | showHeaviestStack":{"message":"Show Heaviest stack"},"panels/timeline/TimelineTreeView.ts | timelineStack":{"message":"Timeline Stack"},"panels/timeline/TimelineTreeView.ts | totalTime":{"message":"Total Time"},"panels/timeline/TimelineTreeView.ts | unattributed":{"message":"[unattributed]"},"panels/timeline/TimelineTreeView.ts | vRuntime":{"message":"[V8 Runtime]"},"panels/timeline/TimelineUIUtils.ts | aggregatedTime":{"message":"Aggregated Time"},"panels/timeline/TimelineUIUtils.ts | allottedTime":{"message":"Allotted Time"},"panels/timeline/TimelineUIUtils.ts | animation":{"message":"Animation"},"panels/timeline/TimelineUIUtils.ts | animationFrameFired":{"message":"Animation Frame Fired"},"panels/timeline/TimelineUIUtils.ts | animationFrameRequested":{"message":"Animation Frame Requested"},"panels/timeline/TimelineUIUtils.ts | async":{"message":"Async"},"panels/timeline/TimelineUIUtils.ts | asyncTask":{"message":"Async Task"},"panels/timeline/TimelineUIUtils.ts | cachedWasmModule":{"message":"Cached Wasm Module"},"panels/timeline/TimelineUIUtils.ts | cacheModule":{"message":"Cache Module Code"},"panels/timeline/TimelineUIUtils.ts | cacheScript":{"message":"Cache Script Code"},"panels/timeline/TimelineUIUtils.ts | callbackFunction":{"message":"Callback Function"},"panels/timeline/TimelineUIUtils.ts | callbackId":{"message":"Callback ID"},"panels/timeline/TimelineUIUtils.ts | callStacks":{"message":"Call Stacks"},"panels/timeline/TimelineUIUtils.ts | cancelAnimationFrame":{"message":"Cancel Animation Frame"},"panels/timeline/TimelineUIUtils.ts | cancelIdleCallback":{"message":"Cancel Idle Callback"},"panels/timeline/TimelineUIUtils.ts | changedAttributeToSs":{"message":"(changed attribute to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedClassToSs":{"message":"(changed class to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedIdToSs":{"message":"(changed id to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedPesudoToSs":{"message":"(changed pseudo to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedSs":{"message":"(changed \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | collected":{"message":"Collected"},"panels/timeline/TimelineUIUtils.ts | commit":{"message":"Commit"},"panels/timeline/TimelineUIUtils.ts | compilationCacheSize":{"message":"Compilation cache size"},"panels/timeline/TimelineUIUtils.ts | compilationCacheStatus":{"message":"Compilation cache status"},"panels/timeline/TimelineUIUtils.ts | compile":{"message":"Compile"},"panels/timeline/TimelineUIUtils.ts | compileCode":{"message":"Compile Code"},"panels/timeline/TimelineUIUtils.ts | compiledWasmModule":{"message":"Compiled Wasm Module"},"panels/timeline/TimelineUIUtils.ts | compileModule":{"message":"Compile Module"},"panels/timeline/TimelineUIUtils.ts | compileScript":{"message":"Compile Script"},"panels/timeline/TimelineUIUtils.ts | compositeLayers":{"message":"Composite Layers"},"panels/timeline/TimelineUIUtils.ts | computeIntersections":{"message":"Compute Intersections"},"panels/timeline/TimelineUIUtils.ts | consoleTime":{"message":"Console Time"},"panels/timeline/TimelineUIUtils.ts | consumedCacheSize":{"message":"Consumed Cache Size"},"panels/timeline/TimelineUIUtils.ts | cpuTime":{"message":"CPU time"},"panels/timeline/TimelineUIUtils.ts | createWebsocket":{"message":"Create WebSocket"},"panels/timeline/TimelineUIUtils.ts | cumulativeLayoutShifts":{"message":"Cumulative Layout Shifts"},"panels/timeline/TimelineUIUtils.ts | cumulativeScore":{"message":"Cumulative Score"},"panels/timeline/TimelineUIUtils.ts | currentClusterId":{"message":"Current Cluster ID"},"panels/timeline/TimelineUIUtils.ts | currentClusterScore":{"message":"Current Cluster Score"},"panels/timeline/TimelineUIUtils.ts | decodedBody":{"message":"Decoded Body"},"panels/timeline/TimelineUIUtils.ts | decrypt":{"message":"Decrypt"},"panels/timeline/TimelineUIUtils.ts | decryptReply":{"message":"Decrypt Reply"},"panels/timeline/TimelineUIUtils.ts | deserializeCodeCache":{"message":"Deserialize Code Cache"},"panels/timeline/TimelineUIUtils.ts | destroyWebsocket":{"message":"Destroy WebSocket"},"panels/timeline/TimelineUIUtils.ts | details":{"message":"Details"},"panels/timeline/TimelineUIUtils.ts | digest":{"message":"Digest"},"panels/timeline/TimelineUIUtils.ts | digestReply":{"message":"Digest Reply"},"panels/timeline/TimelineUIUtils.ts | dimensions":{"message":"Dimensions"},"panels/timeline/TimelineUIUtils.ts | domcontentloadedEvent":{"message":"DOMContentLoaded Event"},"panels/timeline/TimelineUIUtils.ts | domGc":{"message":"DOM GC"},"panels/timeline/TimelineUIUtils.ts | drawFrame":{"message":"Draw Frame"},"panels/timeline/TimelineUIUtils.ts | duration":{"message":"Duration"},"panels/timeline/TimelineUIUtils.ts | eagerCompile":{"message":"Compiling all functions eagerly"},"panels/timeline/TimelineUIUtils.ts | elementsAffected":{"message":"Elements Affected"},"panels/timeline/TimelineUIUtils.ts | embedderCallback":{"message":"Embedder Callback"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholder":{"message":"{PH1}"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholderColon":{"message":": {PH1}"},"panels/timeline/TimelineUIUtils.ts | encodedData":{"message":"Encoded Data"},"panels/timeline/TimelineUIUtils.ts | encrypt":{"message":"Encrypt"},"panels/timeline/TimelineUIUtils.ts | encryptReply":{"message":"Encrypt Reply"},"panels/timeline/TimelineUIUtils.ts | evaluateModule":{"message":"Evaluate Module"},"panels/timeline/TimelineUIUtils.ts | evaluateScript":{"message":"Evaluate Script"},"panels/timeline/TimelineUIUtils.ts | event":{"message":"Event"},"panels/timeline/TimelineUIUtils.ts | eventTiming":{"message":"Event Timing"},"panels/timeline/TimelineUIUtils.ts | evolvedClsLink":{"message":"evolved"},"panels/timeline/TimelineUIUtils.ts | experience":{"message":"Experience"},"panels/timeline/TimelineUIUtils.ts | failedToLoadScriptFromCache":{"message":"failed to load script from cache"},"panels/timeline/TimelineUIUtils.ts | finishLoading":{"message":"Finish Loading"},"panels/timeline/TimelineUIUtils.ts | fireIdleCallback":{"message":"Fire Idle Callback"},"panels/timeline/TimelineUIUtils.ts | firstContentfulPaint":{"message":"First Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | firstInvalidated":{"message":"First Invalidated"},"panels/timeline/TimelineUIUtils.ts | firstLayoutInvalidation":{"message":"First Layout Invalidation"},"panels/timeline/TimelineUIUtils.ts | firstPaint":{"message":"First Paint"},"panels/timeline/TimelineUIUtils.ts | forcedReflow":{"message":"Forced reflow"},"panels/timeline/TimelineUIUtils.ts | frame":{"message":"Frame"},"panels/timeline/TimelineUIUtils.ts | frameStart":{"message":"Frame Start"},"panels/timeline/TimelineUIUtils.ts | frameStartedLoading":{"message":"Frame Started Loading"},"panels/timeline/TimelineUIUtils.ts | frameStartMainThread":{"message":"Frame Start (main thread)"},"panels/timeline/TimelineUIUtils.ts | FromCache":{"message":" (from cache)"},"panels/timeline/TimelineUIUtils.ts | FromMemoryCache":{"message":" (from memory cache)"},"panels/timeline/TimelineUIUtils.ts | FromPush":{"message":" (from push)"},"panels/timeline/TimelineUIUtils.ts | FromServiceWorker":{"message":" (from service worker)"},"panels/timeline/TimelineUIUtils.ts | function":{"message":"Function"},"panels/timeline/TimelineUIUtils.ts | functionCall":{"message":"Function Call"},"panels/timeline/TimelineUIUtils.ts | gcEvent":{"message":"GC Event"},"panels/timeline/TimelineUIUtils.ts | gpu":{"message":"GPU"},"panels/timeline/TimelineUIUtils.ts | hadRecentInput":{"message":"Had recent input"},"panels/timeline/TimelineUIUtils.ts | handlerTookS":{"message":"Handler took {PH1}"},"panels/timeline/TimelineUIUtils.ts | hitTest":{"message":"Hit Test"},"panels/timeline/TimelineUIUtils.ts | idle":{"message":"Idle"},"panels/timeline/TimelineUIUtils.ts | idleCallbackExecutionExtended":{"message":"Idle callback execution extended beyond deadline by {PH1}"},"panels/timeline/TimelineUIUtils.ts | idleCallbackRequested":{"message":"Idle Callback Requested"},"panels/timeline/TimelineUIUtils.ts | imageDecode":{"message":"Image Decode"},"panels/timeline/TimelineUIUtils.ts | imageResize":{"message":"Image Resize"},"panels/timeline/TimelineUIUtils.ts | imageUrl":{"message":"Image URL"},"panels/timeline/TimelineUIUtils.ts | initiator":{"message":"Initiator"},"panels/timeline/TimelineUIUtils.ts | installTimer":{"message":"Install Timer"},"panels/timeline/TimelineUIUtils.ts | interactionID":{"message":"ID"},"panels/timeline/TimelineUIUtils.ts | invalidateLayout":{"message":"Invalidate Layout"},"panels/timeline/TimelineUIUtils.ts | invalidations":{"message":"Invalidations"},"panels/timeline/TimelineUIUtils.ts | invokedByTimeout":{"message":"Invoked by Timeout"},"panels/timeline/TimelineUIUtils.ts | jank":{"message":"jank"},"panels/timeline/TimelineUIUtils.ts | jsFrame":{"message":"JS Frame"},"panels/timeline/TimelineUIUtils.ts | jsIdleFrame":{"message":"JS Idle Frame"},"panels/timeline/TimelineUIUtils.ts | jsRoot":{"message":"JS Root"},"panels/timeline/TimelineUIUtils.ts | jsSystemFrame":{"message":"JS System Frame"},"panels/timeline/TimelineUIUtils.ts | largestContentfulPaint":{"message":"Largest Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | layerize":{"message":"Layerize"},"panels/timeline/TimelineUIUtils.ts | layerRoot":{"message":"Layer Root"},"panels/timeline/TimelineUIUtils.ts | layerTree":{"message":"Layer tree"},"panels/timeline/TimelineUIUtils.ts | layout":{"message":"Layout"},"panels/timeline/TimelineUIUtils.ts | layoutForced":{"message":"Layout Forced"},"panels/timeline/TimelineUIUtils.ts | layoutInvalidations":{"message":"Layout Invalidations"},"panels/timeline/TimelineUIUtils.ts | layoutRoot":{"message":"Layout root"},"panels/timeline/TimelineUIUtils.ts | layoutShift":{"message":"Layout Shift"},"panels/timeline/TimelineUIUtils.ts | learnMore":{"message":"Learn more"},"panels/timeline/TimelineUIUtils.ts | loadFromCache":{"message":"load from cache"},"panels/timeline/TimelineUIUtils.ts | loading":{"message":"Loading"},"panels/timeline/TimelineUIUtils.ts | location":{"message":"Location"},"panels/timeline/TimelineUIUtils.ts | longInteractionINP":{"message":"Long interaction"},"panels/timeline/TimelineUIUtils.ts | longTask":{"message":"Long task"},"panels/timeline/TimelineUIUtils.ts | majorGc":{"message":"Major GC"},"panels/timeline/TimelineUIUtils.ts | message":{"message":"Message"},"panels/timeline/TimelineUIUtils.ts | mimeType":{"message":"Mime Type"},"panels/timeline/TimelineUIUtils.ts | mimeTypeCaps":{"message":"MIME Type"},"panels/timeline/TimelineUIUtils.ts | minorGc":{"message":"Minor GC"},"panels/timeline/TimelineUIUtils.ts | module":{"message":"Module"},"panels/timeline/TimelineUIUtils.ts | movedFrom":{"message":"Moved from"},"panels/timeline/TimelineUIUtils.ts | movedTo":{"message":"Moved to"},"panels/timeline/TimelineUIUtils.ts | networkRequest":{"message":"Network request"},"panels/timeline/TimelineUIUtils.ts | networkTransfer":{"message":"network transfer"},"panels/timeline/TimelineUIUtils.ts | no":{"message":"No"},"panels/timeline/TimelineUIUtils.ts | node":{"message":"Node:"},"panels/timeline/TimelineUIUtils.ts | nodes":{"message":"Nodes:"},"panels/timeline/TimelineUIUtils.ts | nodesThatNeedLayout":{"message":"Nodes That Need Layout"},"panels/timeline/TimelineUIUtils.ts | notOptimized":{"message":"Not optimized"},"panels/timeline/TimelineUIUtils.ts | onloadEvent":{"message":"Onload Event"},"panels/timeline/TimelineUIUtils.ts | optimizeCode":{"message":"Optimize Code"},"panels/timeline/TimelineUIUtils.ts | other":{"message":"Other"},"panels/timeline/TimelineUIUtils.ts | otherInvalidations":{"message":"Other Invalidations"},"panels/timeline/TimelineUIUtils.ts | ownerElement":{"message":"Owner Element"},"panels/timeline/TimelineUIUtils.ts | paint":{"message":"Paint"},"panels/timeline/TimelineUIUtils.ts | paintImage":{"message":"Paint Image"},"panels/timeline/TimelineUIUtils.ts | painting":{"message":"Painting"},"panels/timeline/TimelineUIUtils.ts | paintProfiler":{"message":"Paint Profiler"},"panels/timeline/TimelineUIUtils.ts | paintSetup":{"message":"Paint Setup"},"panels/timeline/TimelineUIUtils.ts | parse":{"message":"Parse"},"panels/timeline/TimelineUIUtils.ts | parseAndCompile":{"message":"Parse and Compile"},"panels/timeline/TimelineUIUtils.ts | parseHtml":{"message":"Parse HTML"},"panels/timeline/TimelineUIUtils.ts | parseStylesheet":{"message":"Parse Stylesheet"},"panels/timeline/TimelineUIUtils.ts | pendingFor":{"message":"Pending for"},"panels/timeline/TimelineUIUtils.ts | prePaint":{"message":"Pre-Paint"},"panels/timeline/TimelineUIUtils.ts | preview":{"message":"Preview"},"panels/timeline/TimelineUIUtils.ts | priority":{"message":"Priority"},"panels/timeline/TimelineUIUtils.ts | producedCacheSize":{"message":"Produced Cache Size"},"panels/timeline/TimelineUIUtils.ts | profilingOverhead":{"message":"Profiling Overhead"},"panels/timeline/TimelineUIUtils.ts | range":{"message":"Range"},"panels/timeline/TimelineUIUtils.ts | rasterizePaint":{"message":"Rasterize Paint"},"panels/timeline/TimelineUIUtils.ts | recalculateStyle":{"message":"Recalculate Style"},"panels/timeline/TimelineUIUtils.ts | recalculationForced":{"message":"Recalculation Forced"},"panels/timeline/TimelineUIUtils.ts | receiveData":{"message":"Receive Data"},"panels/timeline/TimelineUIUtils.ts | receiveResponse":{"message":"Receive Response"},"panels/timeline/TimelineUIUtils.ts | receiveWebsocketHandshake":{"message":"Receive WebSocket Handshake"},"panels/timeline/TimelineUIUtils.ts | recurringHandlerTookS":{"message":"Recurring handler took {PH1}"},"panels/timeline/TimelineUIUtils.ts | relatedNode":{"message":"Related Node"},"panels/timeline/TimelineUIUtils.ts | removeTimer":{"message":"Remove Timer"},"panels/timeline/TimelineUIUtils.ts | rendering":{"message":"Rendering"},"panels/timeline/TimelineUIUtils.ts | repeats":{"message":"Repeats"},"panels/timeline/TimelineUIUtils.ts | requestAnimationFrame":{"message":"Request Animation Frame"},"panels/timeline/TimelineUIUtils.ts | requestIdleCallback":{"message":"Request Idle Callback"},"panels/timeline/TimelineUIUtils.ts | requestMainThreadFrame":{"message":"Request Main Thread Frame"},"panels/timeline/TimelineUIUtils.ts | requestMethod":{"message":"Request Method"},"panels/timeline/TimelineUIUtils.ts | resource":{"message":"Resource"},"panels/timeline/TimelineUIUtils.ts | reveal":{"message":"Reveal"},"panels/timeline/TimelineUIUtils.ts | runMicrotasks":{"message":"Run Microtasks"},"panels/timeline/TimelineUIUtils.ts | sAndS":{"message":"{PH1} and {PH2}"},"panels/timeline/TimelineUIUtils.ts | sAndSOther":{"message":"{PH1}, {PH2}, and 1 other"},"panels/timeline/TimelineUIUtils.ts | sAtS":{"message":"{PH1} at {PH2}"},"panels/timeline/TimelineUIUtils.ts | sAtSParentheses":{"message":"{PH1} (at {PH2})"},"panels/timeline/TimelineUIUtils.ts | sBytes":{"message":"{n, plural, =1 {# Byte} other {# Bytes}}"},"panels/timeline/TimelineUIUtils.ts | scheduleStyleRecalculation":{"message":"Schedule Style Recalculation"},"panels/timeline/TimelineUIUtils.ts | sChildren":{"message":"{PH1} (children)"},"panels/timeline/TimelineUIUtils.ts | sCLSInformation":{"message":"{PH1} can result in poor user experiences. It has recently {PH2}."},"panels/timeline/TimelineUIUtils.ts | sCollected":{"message":"{PH1} collected"},"panels/timeline/TimelineUIUtils.ts | score":{"message":"Score"},"panels/timeline/TimelineUIUtils.ts | script":{"message":"Script"},"panels/timeline/TimelineUIUtils.ts | scripting":{"message":"Scripting"},"panels/timeline/TimelineUIUtils.ts | scriptLoadedFromCache":{"message":"script loaded from cache"},"panels/timeline/TimelineUIUtils.ts | scriptNotEligible":{"message":"script not eligible"},"panels/timeline/TimelineUIUtils.ts | scroll":{"message":"Scroll"},"panels/timeline/TimelineUIUtils.ts | selfTime":{"message":"Self Time"},"panels/timeline/TimelineUIUtils.ts | sendRequest":{"message":"Send Request"},"panels/timeline/TimelineUIUtils.ts | sendWebsocketHandshake":{"message":"Send WebSocket Handshake"},"panels/timeline/TimelineUIUtils.ts | sForS":{"message":"{PH1} for {PH2}"},"panels/timeline/TimelineUIUtils.ts | show":{"message":"Show"},"panels/timeline/TimelineUIUtils.ts | sign":{"message":"Sign"},"panels/timeline/TimelineUIUtils.ts | signReply":{"message":"Sign Reply"},"panels/timeline/TimelineUIUtils.ts | sIsALikelyPerformanceBottleneck":{"message":"{PH1} is a likely performance bottleneck."},"panels/timeline/TimelineUIUtils.ts | sIsLikelyPoorPageResponsiveness":{"message":"{PH1} is indicating poor page responsiveness."},"panels/timeline/TimelineUIUtils.ts | size":{"message":"Size"},"panels/timeline/TimelineUIUtils.ts | sLongFrameTimesAreAnIndicationOf":{"message":"{PH1}. Long frame times are an indication of {PH2}"},"panels/timeline/TimelineUIUtils.ts | sOfS":{"message":"{PH1} of {PH2}"},"panels/timeline/TimelineUIUtils.ts | sS":{"message":"{PH1}: {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSAndSOthers":{"message":"{PH1}, {PH2}, and {PH3} others"},"panels/timeline/TimelineUIUtils.ts | sSCurlyBrackets":{"message":"({PH1}, {PH2})"},"panels/timeline/TimelineUIUtils.ts | sSDimensions":{"message":"{PH1} × {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSDot":{"message":"{PH1}. {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSelf":{"message":"{PH1} (self)"},"panels/timeline/TimelineUIUtils.ts | sSs":{"message":"{PH1} [{PH2}…{PH3}]"},"panels/timeline/TimelineUIUtils.ts | sSSquareBrackets":{"message":"{PH1} [{PH2}…]"},"panels/timeline/TimelineUIUtils.ts | SSSResourceLoading":{"message":" ({PH1} {PH2} + {PH3} resource loading)"},"panels/timeline/TimelineUIUtils.ts | stackTrace":{"message":"Stack Trace"},"panels/timeline/TimelineUIUtils.ts | stackTraceColon":{"message":"Stack trace:"},"panels/timeline/TimelineUIUtils.ts | state":{"message":"State"},"panels/timeline/TimelineUIUtils.ts | statusCode":{"message":"Status Code"},"panels/timeline/TimelineUIUtils.ts | sTookS":{"message":"{PH1} took {PH2}."},"panels/timeline/TimelineUIUtils.ts | streamed":{"message":"Streamed"},"panels/timeline/TimelineUIUtils.ts | streamingCompileTask":{"message":"Streaming Compile Task"},"panels/timeline/TimelineUIUtils.ts | streamingWasmResponse":{"message":"Streaming Wasm Response"},"panels/timeline/TimelineUIUtils.ts | styleInvalidations":{"message":"Style Invalidations"},"panels/timeline/TimelineUIUtils.ts | stylesheetUrl":{"message":"Stylesheet URL"},"panels/timeline/TimelineUIUtils.ts | system":{"message":"System"},"panels/timeline/TimelineUIUtils.ts | task":{"message":"Task"},"panels/timeline/TimelineUIUtils.ts | timeout":{"message":"Timeout"},"panels/timeline/TimelineUIUtils.ts | timerFired":{"message":"Timer Fired"},"panels/timeline/TimelineUIUtils.ts | timerId":{"message":"Timer ID"},"panels/timeline/TimelineUIUtils.ts | timerInstalled":{"message":"Timer Installed"},"panels/timeline/TimelineUIUtils.ts | timeSpentInRendering":{"message":"Time spent in rendering"},"panels/timeline/TimelineUIUtils.ts | timestamp":{"message":"Timestamp"},"panels/timeline/TimelineUIUtils.ts | totalTime":{"message":"Total Time"},"panels/timeline/TimelineUIUtils.ts | type":{"message":"Type"},"panels/timeline/TimelineUIUtils.ts | unknown":{"message":"unknown"},"panels/timeline/TimelineUIUtils.ts | unknownCause":{"message":"Unknown cause"},"panels/timeline/TimelineUIUtils.ts | UnknownNode":{"message":"[ unknown node ]"},"panels/timeline/TimelineUIUtils.ts | updateLayer":{"message":"Update Layer"},"panels/timeline/TimelineUIUtils.ts | updateLayerTree":{"message":"Update Layer Tree"},"panels/timeline/TimelineUIUtils.ts | url":{"message":"Url"},"panels/timeline/TimelineUIUtils.ts | userTiming":{"message":"User Timing"},"panels/timeline/TimelineUIUtils.ts | verify":{"message":"Verify"},"panels/timeline/TimelineUIUtils.ts | verifyReply":{"message":"Verify Reply"},"panels/timeline/TimelineUIUtils.ts | waitingForNetwork":{"message":"Waiting for Network"},"panels/timeline/TimelineUIUtils.ts | warning":{"message":"Warning"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheHit":{"message":"Wasm Module Cache Hit"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheInvalid":{"message":"Wasm Module Cache Invalid"},"panels/timeline/TimelineUIUtils.ts | websocketProtocol":{"message":"WebSocket Protocol"},"panels/timeline/TimelineUIUtils.ts | willSendRequest":{"message":"Will Send Request"},"panels/timeline/TimelineUIUtils.ts | xhrLoad":{"message":"XHR Load"},"panels/timeline/TimelineUIUtils.ts | xhrReadyStateChange":{"message":"XHR Ready State Change"},"panels/timeline/TimelineUIUtils.ts | yes":{"message":"Yes"},"panels/timeline/TimingsTrackAppender.ts | timings":{"message":"Timings"},"panels/timeline/UIDevtoolsUtils.ts | drawFrame":{"message":"Draw Frame"},"panels/timeline/UIDevtoolsUtils.ts | drawing":{"message":"Drawing"},"panels/timeline/UIDevtoolsUtils.ts | frameStart":{"message":"Frame Start"},"panels/timeline/UIDevtoolsUtils.ts | idle":{"message":"Idle"},"panels/timeline/UIDevtoolsUtils.ts | layout":{"message":"Layout"},"panels/timeline/UIDevtoolsUtils.ts | painting":{"message":"Painting"},"panels/timeline/UIDevtoolsUtils.ts | rasterizing":{"message":"Rasterizing"},"panels/timeline/UIDevtoolsUtils.ts | system":{"message":"System"},"panels/web_audio/AudioContextContentBuilder.ts | callbackBufferSize":{"message":"Callback Buffer Size"},"panels/web_audio/AudioContextContentBuilder.ts | callbackInterval":{"message":"Callback Interval"},"panels/web_audio/AudioContextContentBuilder.ts | currentTime":{"message":"Current Time"},"panels/web_audio/AudioContextContentBuilder.ts | maxOutputChannels":{"message":"Max Output Channels"},"panels/web_audio/AudioContextContentBuilder.ts | renderCapacity":{"message":"Render Capacity"},"panels/web_audio/AudioContextContentBuilder.ts | sampleRate":{"message":"Sample Rate"},"panels/web_audio/AudioContextContentBuilder.ts | state":{"message":"State"},"panels/web_audio/AudioContextSelector.ts | audioContextS":{"message":"Audio context: {PH1}"},"panels/web_audio/AudioContextSelector.ts | noRecordings":{"message":"(no recordings)"},"panels/web_audio/web_audio-meta.ts | audio":{"message":"audio"},"panels/web_audio/web_audio-meta.ts | showWebaudio":{"message":"Show WebAudio"},"panels/web_audio/web_audio-meta.ts | webaudio":{"message":"WebAudio"},"panels/web_audio/WebAudioView.ts | openAPageThatUsesWebAudioApiTo":{"message":"Open a page that uses Web Audio API to start monitoring."},"panels/webauthn/webauthn-meta.ts | showWebauthn":{"message":"Show WebAuthn"},"panels/webauthn/webauthn-meta.ts | webauthn":{"message":"WebAuthn"},"panels/webauthn/WebauthnPane.ts | actions":{"message":"Actions"},"panels/webauthn/WebauthnPane.ts | active":{"message":"Active"},"panels/webauthn/WebauthnPane.ts | add":{"message":"Add"},"panels/webauthn/WebauthnPane.ts | addAuthenticator":{"message":"Add authenticator"},"panels/webauthn/WebauthnPane.ts | authenticatorS":{"message":"Authenticator {PH1}"},"panels/webauthn/WebauthnPane.ts | credentials":{"message":"Credentials"},"panels/webauthn/WebauthnPane.ts | editName":{"message":"Edit name"},"panels/webauthn/WebauthnPane.ts | enableVirtualAuthenticator":{"message":"Enable virtual authenticator environment"},"panels/webauthn/WebauthnPane.ts | export":{"message":"Export"},"panels/webauthn/WebauthnPane.ts | id":{"message":"ID"},"panels/webauthn/WebauthnPane.ts | isResident":{"message":"Is Resident"},"panels/webauthn/WebauthnPane.ts | learnMore":{"message":"Learn more"},"panels/webauthn/WebauthnPane.ts | newAuthenticator":{"message":"New authenticator"},"panels/webauthn/WebauthnPane.ts | no":{"message":"No"},"panels/webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour":{"message":"No credentials. Try calling {PH1} from your website."},"panels/webauthn/WebauthnPane.ts | privateKeypem":{"message":"Private key.pem"},"panels/webauthn/WebauthnPane.ts | protocol":{"message":"Protocol"},"panels/webauthn/WebauthnPane.ts | remove":{"message":"Remove"},"panels/webauthn/WebauthnPane.ts | rpId":{"message":"RP ID"},"panels/webauthn/WebauthnPane.ts | saveName":{"message":"Save name"},"panels/webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator":{"message":"Set {PH1} as the active authenticator"},"panels/webauthn/WebauthnPane.ts | signCount":{"message":"Signature Count"},"panels/webauthn/WebauthnPane.ts | supportsLargeBlob":{"message":"Supports large blob"},"panels/webauthn/WebauthnPane.ts | supportsResidentKeys":{"message":"Supports resident keys"},"panels/webauthn/WebauthnPane.ts | supportsUserVerification":{"message":"Supports user verification"},"panels/webauthn/WebauthnPane.ts | transport":{"message":"Transport"},"panels/webauthn/WebauthnPane.ts | userHandle":{"message":"User Handle"},"panels/webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant":{"message":"Use WebAuthn for phishing-resistant authentication"},"panels/webauthn/WebauthnPane.ts | uuid":{"message":"UUID"},"panels/webauthn/WebauthnPane.ts | yes":{"message":"Yes"},"ui/components/data_grid/DataGrid.ts | enterToSort":{"message":"Column sort state: {PH1}. Press enter to apply sorting filter"},"ui/components/data_grid/DataGrid.ts | headerOptions":{"message":"Header Options"},"ui/components/data_grid/DataGrid.ts | resetColumns":{"message":"Reset Columns"},"ui/components/data_grid/DataGrid.ts | sortAsc":{"message":"ascending"},"ui/components/data_grid/DataGrid.ts | sortBy":{"message":"Sort By"},"ui/components/data_grid/DataGrid.ts | sortDesc":{"message":"descending"},"ui/components/data_grid/DataGrid.ts | sortNone":{"message":"none"},"ui/components/data_grid/DataGridController.ts | sortInAscendingOrder":{"message":"{PH1} sorted in ascending order"},"ui/components/data_grid/DataGridController.ts | sortInDescendingOrder":{"message":"{PH1} sorted in descending order"},"ui/components/data_grid/DataGridController.ts | sortingCanceled":{"message":"{PH1} sorting canceled"},"ui/components/dialogs/ShortcutDialog.ts | close":{"message":"Close"},"ui/components/dialogs/ShortcutDialog.ts | dialogTitle":{"message":"Keyboard shortcuts"},"ui/components/dialogs/ShortcutDialog.ts | showShortcutTitle":{"message":"Show shortcuts"},"ui/components/diff_view/DiffView.ts | additions":{"message":"Addition:"},"ui/components/diff_view/DiffView.ts | changesDiffViewer":{"message":"Changes diff viewer"},"ui/components/diff_view/DiffView.ts | deletions":{"message":"Deletion:"},"ui/components/diff_view/DiffView.ts | SkippingDMatchingLines":{"message":"( … Skipping {PH1} matching lines … )"},"ui/components/issue_counter/IssueCounter.ts | breakingChanges":{"message":"{issueCount, plural, =1 {# breaking change} other {# breaking changes}}"},"ui/components/issue_counter/IssueCounter.ts | pageErrors":{"message":"{issueCount, plural, =1 {# page error} other {# page errors}}"},"ui/components/issue_counter/IssueCounter.ts | possibleImprovements":{"message":"{issueCount, plural, =1 {# possible improvement} other {# possible improvements}}"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssue":{"message":"Click to show issue in the issues tab"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssueWithTitle":{"message":"Click to open the issue tab and show issue: {title}"},"ui/components/issue_counter/IssueLinkIcon.ts | issueUnavailable":{"message":"Issue unavailable at this time"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | memoryInspector":{"message":"Memory Inspector"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector":{"message":"Show Memory Inspector"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight":{"message":"Stop highlighting this memory"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress":{"message":"Jump to this memory"},"ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd":{"message":"Address has to be a number between {PH1} and {PH2}"},"ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts | couldNotOpenLinearMemory":{"message":"Could not open linear memory inspector: failed locating buffer."},"ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts | noOpenInspections":{"message":"No open inspections"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | enterAddress":{"message":"Enter address"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goBackInAddressHistory":{"message":"Go back in address history"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goForwardInAddressHistory":{"message":"Go forward in address history"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | nextPage":{"message":"Next page"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | previousPage":{"message":"Previous page"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | refresh":{"message":"Refresh"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | changeEndianness":{"message":"Change Endianness"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | toggleValueTypeSettings":{"message":"Toggle value type settings"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | addressOutOfRange":{"message":"Address out of memory range"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | changeValueTypeMode":{"message":"Change mode"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | jumpToPointer":{"message":"Jump to address"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | signedValue":{"message":"Signed value"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | unsignedValue":{"message":"Unsigned value"},"ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.ts | notApplicable":{"message":"N/A"},"ui/components/linear_memory_inspector/ValueInterpreterSettings.ts | otherGroup":{"message":"Other"},"ui/components/panel_feedback/FeedbackButton.ts | feedback":{"message":"Feedback"},"ui/components/panel_feedback/PanelFeedback.ts | previewFeature":{"message":"Preview feature"},"ui/components/panel_feedback/PanelFeedback.ts | previewText":{"message":"Our team is actively working on this feature and we would love to know what you think."},"ui/components/panel_feedback/PanelFeedback.ts | previewTextFeedbackLink":{"message":"Send us your feedback."},"ui/components/panel_feedback/PanelFeedback.ts | videoAndDocumentation":{"message":"Video and documentation"},"ui/components/panel_feedback/PreviewToggle.ts | learnMoreLink":{"message":"Learn More"},"ui/components/panel_feedback/PreviewToggle.ts | previewTextFeedbackLink":{"message":"Send us your feedback."},"ui/components/panel_feedback/PreviewToggle.ts | shortFeedbackLink":{"message":"Send feedback"},"ui/components/request_link_icon/RequestLinkIcon.ts | clickToShowRequestInTheNetwork":{"message":"Click to open the network panel and show request for URL: {url}"},"ui/components/request_link_icon/RequestLinkIcon.ts | requestUnavailableInTheNetwork":{"message":"Request unavailable in the network panel, try reloading the inspected page"},"ui/components/request_link_icon/RequestLinkIcon.ts | shortenedURL":{"message":"Shortened URL"},"ui/components/survey_link/SurveyLink.ts | anErrorOccurredWithTheSurvey":{"message":"An error occurred with the survey"},"ui/components/survey_link/SurveyLink.ts | openingSurvey":{"message":"Opening survey …"},"ui/components/survey_link/SurveyLink.ts | thankYouForYourFeedback":{"message":"Thank you for your feedback"},"ui/components/text_editor/config.ts | codeEditor":{"message":"Code editor"},"ui/components/text_editor/config.ts | sSuggestionSOfS":{"message":"{PH1}, suggestion {PH2} of {PH3}"},"ui/legacy/ActionRegistration.ts | background_services":{"message":"Background Services"},"ui/legacy/ActionRegistration.ts | console":{"message":"Console"},"ui/legacy/ActionRegistration.ts | debugger":{"message":"Debugger"},"ui/legacy/ActionRegistration.ts | drawer":{"message":"Drawer"},"ui/legacy/ActionRegistration.ts | elements":{"message":"Elements"},"ui/legacy/ActionRegistration.ts | global":{"message":"Global"},"ui/legacy/ActionRegistration.ts | help":{"message":"Help"},"ui/legacy/ActionRegistration.ts | javascript_profiler":{"message":"JavaScript Profiler"},"ui/legacy/ActionRegistration.ts | layers":{"message":"Layers"},"ui/legacy/ActionRegistration.ts | memory":{"message":"Memory"},"ui/legacy/ActionRegistration.ts | mobile":{"message":"Mobile"},"ui/legacy/ActionRegistration.ts | navigation":{"message":"Navigation"},"ui/legacy/ActionRegistration.ts | network":{"message":"Network"},"ui/legacy/ActionRegistration.ts | performance":{"message":"Performance"},"ui/legacy/ActionRegistration.ts | rendering":{"message":"Rendering"},"ui/legacy/ActionRegistration.ts | resources":{"message":"Resources"},"ui/legacy/ActionRegistration.ts | screenshot":{"message":"Screenshot"},"ui/legacy/ActionRegistration.ts | settings":{"message":"Settings"},"ui/legacy/ActionRegistration.ts | sources":{"message":"Sources"},"ui/legacy/components/color_picker/ContrastDetails.ts | aa":{"message":"AA"},"ui/legacy/components/color_picker/ContrastDetails.ts | aaa":{"message":"AAA"},"ui/legacy/components/color_picker/ContrastDetails.ts | apca":{"message":"APCA"},"ui/legacy/components/color_picker/ContrastDetails.ts | contrastRatio":{"message":"Contrast ratio"},"ui/legacy/components/color_picker/ContrastDetails.ts | noContrastInformationAvailable":{"message":"No contrast information available"},"ui/legacy/components/color_picker/ContrastDetails.ts | pickBackgroundColor":{"message":"Pick background color"},"ui/legacy/components/color_picker/ContrastDetails.ts | placeholderWithColon":{"message":": {PH1}"},"ui/legacy/components/color_picker/ContrastDetails.ts | showLess":{"message":"Show less"},"ui/legacy/components/color_picker/ContrastDetails.ts | showMore":{"message":"Show more"},"ui/legacy/components/color_picker/ContrastDetails.ts | toggleBackgroundColorPicker":{"message":"Toggle background color picker"},"ui/legacy/components/color_picker/ContrastDetails.ts | useSuggestedColorStoFixLow":{"message":"Use suggested color {PH1}to fix low contrast"},"ui/legacy/components/color_picker/FormatPickerContextMenu.ts | colorClippedTooltipText":{"message":"This color was clipped to match the format's gamut. The actual result was {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | addToPalette":{"message":"Add to palette"},"ui/legacy/components/color_picker/Spectrum.ts | changeAlpha":{"message":"Change alpha"},"ui/legacy/components/color_picker/Spectrum.ts | changeColorFormat":{"message":"Change color format"},"ui/legacy/components/color_picker/Spectrum.ts | changeHue":{"message":"Change hue"},"ui/legacy/components/color_picker/Spectrum.ts | clearPalette":{"message":"Clear palette"},"ui/legacy/components/color_picker/Spectrum.ts | colorPalettes":{"message":"Color Palettes"},"ui/legacy/components/color_picker/Spectrum.ts | colorS":{"message":"Color {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | copyColorToClipboard":{"message":"Copy color to clipboard"},"ui/legacy/components/color_picker/Spectrum.ts | hex":{"message":"HEX"},"ui/legacy/components/color_picker/Spectrum.ts | longclickOrLongpressSpaceToShow":{"message":"Long-click or long-press space to show alternate shades of {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | pressArrowKeysMessage":{"message":"Press arrow keys with or without modifiers to move swatch position. Arrow key with Shift key moves position largely, with Ctrl key it is less and with Alt key it is even less"},"ui/legacy/components/color_picker/Spectrum.ts | previewPalettes":{"message":"Preview palettes"},"ui/legacy/components/color_picker/Spectrum.ts | removeAllToTheRight":{"message":"Remove all to the right"},"ui/legacy/components/color_picker/Spectrum.ts | removeColor":{"message":"Remove color"},"ui/legacy/components/color_picker/Spectrum.ts | returnToColorPicker":{"message":"Return to color picker"},"ui/legacy/components/color_picker/Spectrum.ts | sInS":{"message":"{PH1} in {PH2}"},"ui/legacy/components/color_picker/Spectrum.ts | toggleColorPicker":{"message":"Eye dropper [{PH1}]"},"ui/legacy/components/cookie_table/CookiesTable.ts | cookies":{"message":"Cookies"},"ui/legacy/components/cookie_table/CookiesTable.ts | editableCookies":{"message":"Editable Cookies"},"ui/legacy/components/cookie_table/CookiesTable.ts | na":{"message":"N/A"},"ui/legacy/components/cookie_table/CookiesTable.ts | name":{"message":"Name"},"ui/legacy/components/cookie_table/CookiesTable.ts | opaquePartitionKey":{"message":"(opaque)"},"ui/legacy/components/cookie_table/CookiesTable.ts | session":{"message":"Session"},"ui/legacy/components/cookie_table/CookiesTable.ts | showIssueAssociatedWithThis":{"message":"Show issue associated with this cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | showRequestsWithThisCookie":{"message":"Show Requests With This Cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | size":{"message":"Size"},"ui/legacy/components/cookie_table/CookiesTable.ts | sourcePortTooltip":{"message":"Shows the source port (range 1-65535) the cookie was set on. If the port is unknown, this shows -1."},"ui/legacy/components/cookie_table/CookiesTable.ts | sourceSchemeTooltip":{"message":"Shows the source scheme (Secure, NonSecure) the cookie was set on. If the scheme is unknown, this shows Unset."},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfter":{"message":"after {date}"},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfterTooltip":{"message":"The expiration timestamp is {seconds}, which corresponds to a date after {date}"},"ui/legacy/components/cookie_table/CookiesTable.ts | value":{"message":"Value"},"ui/legacy/components/data_grid/DataGrid.ts | addNew":{"message":"Add new"},"ui/legacy/components/data_grid/DataGrid.ts | checked":{"message":"checked"},"ui/legacy/components/data_grid/DataGrid.ts | collapsed":{"message":"collapsed"},"ui/legacy/components/data_grid/DataGrid.ts | delete":{"message":"Delete"},"ui/legacy/components/data_grid/DataGrid.ts | editS":{"message":"Edit \"{PH1}\""},"ui/legacy/components/data_grid/DataGrid.ts | emptyRowCreated":{"message":"An empty table row has been created. You may double click or use context menu to edit."},"ui/legacy/components/data_grid/DataGrid.ts | expanded":{"message":"expanded"},"ui/legacy/components/data_grid/DataGrid.ts | headerOptions":{"message":"Header Options"},"ui/legacy/components/data_grid/DataGrid.ts | levelS":{"message":"level {PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | refresh":{"message":"Refresh"},"ui/legacy/components/data_grid/DataGrid.ts | resetColumns":{"message":"Reset Columns"},"ui/legacy/components/data_grid/DataGrid.ts | rowsS":{"message":"Rows: {PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | sortByString":{"message":"Sort By"},"ui/legacy/components/data_grid/DataGrid.ts | sRowS":{"message":"{PH1} Row {PH2}"},"ui/legacy/components/data_grid/DataGrid.ts | sSUseTheUpAndDownArrowKeysTo":{"message":"{PH1} {PH2}, use the up and down arrow keys to navigate and interact with the rows of the table; Use browse mode to read cell by cell."},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showAllD":{"message":"Show all {PH1}"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDAfter":{"message":"Show {PH1} after"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDBefore":{"message":"Show {PH1} before"},"ui/legacy/components/data_grid/ViewportDataGrid.ts | collapsed":{"message":"collapsed"},"ui/legacy/components/inline_editor/ColorSwatch.ts | shiftclickToChangeColorFormat":{"message":"Shift-click to change color format"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | blur":{"message":"Blur"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | spread":{"message":"Spread"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | type":{"message":"Type"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | xOffset":{"message":"X offset"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | yOffset":{"message":"Y offset"},"ui/legacy/components/inline_editor/FontEditor.ts | cssProperties":{"message":"CSS Properties"},"ui/legacy/components/inline_editor/FontEditor.ts | deleteS":{"message":"Delete {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fallbackS":{"message":"Fallback {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fontFamily":{"message":"Font Family"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSelectorDeletedAtIndexS":{"message":"Font Selector deleted at index: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSize":{"message":"Font Size"},"ui/legacy/components/inline_editor/FontEditor.ts | fontWeight":{"message":"Font Weight"},"ui/legacy/components/inline_editor/FontEditor.ts | lineHeight":{"message":"Line Height"},"ui/legacy/components/inline_editor/FontEditor.ts | PleaseEnterAValidValueForSText":{"message":"* Please enter a valid value for {PH1} text input"},"ui/legacy/components/inline_editor/FontEditor.ts | selectorInputMode":{"message":"Selector Input Mode"},"ui/legacy/components/inline_editor/FontEditor.ts | sKeyValueSelector":{"message":"{PH1} Key Value Selector"},"ui/legacy/components/inline_editor/FontEditor.ts | sliderInputMode":{"message":"Slider Input Mode"},"ui/legacy/components/inline_editor/FontEditor.ts | spacing":{"message":"Spacing"},"ui/legacy/components/inline_editor/FontEditor.ts | sSliderInput":{"message":"{PH1} Slider Input"},"ui/legacy/components/inline_editor/FontEditor.ts | sTextInput":{"message":"{PH1} Text Input"},"ui/legacy/components/inline_editor/FontEditor.ts | sToggleInputType":{"message":"{PH1} toggle input type"},"ui/legacy/components/inline_editor/FontEditor.ts | sUnitInput":{"message":"{PH1} Unit Input"},"ui/legacy/components/inline_editor/FontEditor.ts | thereIsNoValueToDeleteAtIndexS":{"message":"There is no value to delete at index: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | thisPropertyIsSetToContainUnits":{"message":"This property is set to contain units but does not have a defined corresponding unitsArray: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | units":{"message":"Units"},"ui/legacy/components/inline_editor/LinkSwatch.ts | sIsNotDefined":{"message":"{PH1} is not defined"},"ui/legacy/components/object_ui/CustomPreviewComponent.ts | showAsJavascriptObject":{"message":"Show as JavaScript object"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | collapseChildren":{"message":"Collapse children"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copy":{"message":"Copy"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyPropertyPath":{"message":"Copy property path"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyValue":{"message":"Copy value"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | dots":{"message":"(...)"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | exceptionS":{"message":"[Exception: {PH1}]"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | expandRecursively":{"message":"Expand recursively"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | invokePropertyGetter":{"message":"Invoke property getter"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | longTextWasTruncatedS":{"message":"long text was truncated ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | noProperties":{"message":"No properties"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | revealInMemoryInpector":{"message":"Reveal in Memory Inspector panel"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showAllD":{"message":"Show all {PH1}"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showMoreS":{"message":"Show more ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | stringIsTooLargeToEdit":{"message":""},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | unknown":{"message":"unknown"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueNotAccessibleToTheDebugger":{"message":"Value is not accessible to the debugger"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueUnavailable":{"message":""},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | empty":{"message":"empty"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | emptyD":{"message":"empty × {PH1}"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | thePropertyIsComputedWithAGetter":{"message":"The property is computed with a getter"},"ui/legacy/components/perf_ui/FilmStripView.ts | doubleclickToZoomImageClickTo":{"message":"Doubleclick to zoom image. Click to view preceding requests."},"ui/legacy/components/perf_ui/FilmStripView.ts | nextFrame":{"message":"Next frame"},"ui/legacy/components/perf_ui/FilmStripView.ts | previousFrame":{"message":"Previous frame"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshot":{"message":"Screenshot"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshotForSSelectToView":{"message":"Screenshot for {PH1} - select to view preceding requests."},"ui/legacy/components/perf_ui/FlameChart.ts | flameChart":{"message":"Flame Chart"},"ui/legacy/components/perf_ui/FlameChart.ts | sCollapsed":{"message":"{PH1} collapsed"},"ui/legacy/components/perf_ui/FlameChart.ts | sExpanded":{"message":"{PH1} expanded"},"ui/legacy/components/perf_ui/FlameChart.ts | sHovered":{"message":"{PH1} hovered"},"ui/legacy/components/perf_ui/FlameChart.ts | sSelected":{"message":"{PH1} selected"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | high":{"message":"High"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | highest":{"message":"Highest"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | low":{"message":"Low"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | lowest":{"message":"Lowest"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | medium":{"message":"Medium"},"ui/legacy/components/perf_ui/OverviewGrid.ts | leftResizer":{"message":"Left Resizer"},"ui/legacy/components/perf_ui/OverviewGrid.ts | overviewGridWindow":{"message":"Overview grid window"},"ui/legacy/components/perf_ui/OverviewGrid.ts | rightResizer":{"message":"Right Resizer"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | collectGarbage":{"message":"Collect garbage"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | flamechartMouseWheelAction":{"message":"Flamechart mouse wheel action:"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | hideLiveMemoryAllocation":{"message":"Hide live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | liveMemoryAllocationAnnotations":{"message":"Live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | scroll":{"message":"Scroll"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | showLiveMemoryAllocation":{"message":"Show live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | zoom":{"message":"Zoom"},"ui/legacy/components/perf_ui/PieChart.ts | total":{"message":"Total"},"ui/legacy/components/quick_open/CommandMenu.ts | command":{"message":"Command"},"ui/legacy/components/quick_open/CommandMenu.ts | deprecated":{"message":"— deprecated"},"ui/legacy/components/quick_open/CommandMenu.ts | noCommandsFound":{"message":"No commands found"},"ui/legacy/components/quick_open/CommandMenu.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"ui/legacy/components/quick_open/CommandMenu.ts | run":{"message":"Run"},"ui/legacy/components/quick_open/FilteredListWidget.ts | noResultsFound":{"message":"No results found"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpen":{"message":"Quick open"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpenPrompt":{"message":"Quick open prompt"},"ui/legacy/components/quick_open/quick_open-meta.ts | openFile":{"message":"Open file"},"ui/legacy/components/quick_open/quick_open-meta.ts | runCommand":{"message":"Run command"},"ui/legacy/components/quick_open/QuickOpen.ts | typeToSeeAvailableCommands":{"message":"Type ? to see available commands"},"ui/legacy/components/source_frame/FontView.ts | font":{"message":"Font"},"ui/legacy/components/source_frame/FontView.ts | previewOfFontFromS":{"message":"Preview of font from {PH1}"},"ui/legacy/components/source_frame/ImageView.ts | copyImageAsDataUri":{"message":"Copy image as data URI"},"ui/legacy/components/source_frame/ImageView.ts | copyImageUrl":{"message":"Copy image URL"},"ui/legacy/components/source_frame/ImageView.ts | dD":{"message":"{PH1} × {PH2}"},"ui/legacy/components/source_frame/ImageView.ts | download":{"message":"download"},"ui/legacy/components/source_frame/ImageView.ts | dropImageFileHere":{"message":"Drop image file here"},"ui/legacy/components/source_frame/ImageView.ts | image":{"message":"Image"},"ui/legacy/components/source_frame/ImageView.ts | imageFromS":{"message":"Image from {PH1}"},"ui/legacy/components/source_frame/ImageView.ts | openImageInNewTab":{"message":"Open image in new tab"},"ui/legacy/components/source_frame/ImageView.ts | saveImageAs":{"message":"Save image as..."},"ui/legacy/components/source_frame/JSONView.ts | find":{"message":"Find"},"ui/legacy/components/source_frame/PreviewFactory.ts | nothingToPreview":{"message":"Nothing to preview"},"ui/legacy/components/source_frame/ResourceSourceFrame.ts | find":{"message":"Find"},"ui/legacy/components/source_frame/source_frame-meta.ts | defaultIndentation":{"message":"Default indentation:"},"ui/legacy/components/source_frame/source_frame-meta.ts | eSpaces":{"message":"8 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | fSpaces":{"message":"4 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToESpaces":{"message":"Set indentation to 8 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToFSpaces":{"message":"Set indentation to 4 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToSpaces":{"message":"Set indentation to 2 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToTabCharacter":{"message":"Set indentation to tab character"},"ui/legacy/components/source_frame/source_frame-meta.ts | Spaces":{"message":"2 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | tabCharacter":{"message":"Tab character"},"ui/legacy/components/source_frame/SourceFrame.ts | bytecodePositionXs":{"message":"Bytecode position 0x{PH1}"},"ui/legacy/components/source_frame/SourceFrame.ts | dCharactersSelected":{"message":"{PH1} characters selected"},"ui/legacy/components/source_frame/SourceFrame.ts | dLinesDCharactersSelected":{"message":"{PH1} lines, {PH2} characters selected"},"ui/legacy/components/source_frame/SourceFrame.ts | dSelectionRegions":{"message":"{PH1} selection regions"},"ui/legacy/components/source_frame/SourceFrame.ts | lineSColumnS":{"message":"Line {PH1}, Column {PH2}"},"ui/legacy/components/source_frame/SourceFrame.ts | loading":{"message":"Loading…"},"ui/legacy/components/source_frame/SourceFrame.ts | prettyPrint":{"message":"Pretty print"},"ui/legacy/components/source_frame/SourceFrame.ts | source":{"message":"Source"},"ui/legacy/components/source_frame/XMLView.ts | find":{"message":"Find"},"ui/legacy/components/utils/ImagePreview.ts | currentSource":{"message":"Current source:"},"ui/legacy/components/utils/ImagePreview.ts | fileSize":{"message":"File size:"},"ui/legacy/components/utils/ImagePreview.ts | imageFromS":{"message":"Image from {PH1}"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicAspectRatio":{"message":"Intrinsic aspect ratio:"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicSize":{"message":"Intrinsic size:"},"ui/legacy/components/utils/ImagePreview.ts | renderedAspectRatio":{"message":"Rendered aspect ratio:"},"ui/legacy/components/utils/ImagePreview.ts | renderedSize":{"message":"Rendered size:"},"ui/legacy/components/utils/ImagePreview.ts | unknownSource":{"message":"unknown source"},"ui/legacy/components/utils/JSPresentationUtils.ts | addToIgnore":{"message":"Add script to ignore list"},"ui/legacy/components/utils/JSPresentationUtils.ts | removeFromIgnore":{"message":"Remove from ignore list"},"ui/legacy/components/utils/JSPresentationUtils.ts | showLess":{"message":"Show less"},"ui/legacy/components/utils/JSPresentationUtils.ts | showSMoreFrames":{"message":"{n, plural, =1 {Show # more frame} other {Show # more frames}}"},"ui/legacy/components/utils/JSPresentationUtils.ts | unknownSource":{"message":"unknown"},"ui/legacy/components/utils/Linkifier.ts | auto":{"message":"auto"},"ui/legacy/components/utils/Linkifier.ts | linkHandling":{"message":"Link handling:"},"ui/legacy/components/utils/Linkifier.ts | openUsingS":{"message":"Open using {PH1}"},"ui/legacy/components/utils/Linkifier.ts | reveal":{"message":"Reveal"},"ui/legacy/components/utils/Linkifier.ts | revealInS":{"message":"Reveal in {PH1}"},"ui/legacy/components/utils/Linkifier.ts | unknown":{"message":"(unknown)"},"ui/legacy/components/utils/TargetDetachedDialog.ts | websocketDisconnected":{"message":"WebSocket disconnected"},"ui/legacy/DockController.ts | close":{"message":"Close"},"ui/legacy/DockController.ts | devToolsDockedTo":{"message":"DevTools is docked to {PH1}"},"ui/legacy/DockController.ts | devtoolsUndocked":{"message":"DevTools is undocked"},"ui/legacy/DockController.ts | dockToBottom":{"message":"Dock to bottom"},"ui/legacy/DockController.ts | dockToLeft":{"message":"Dock to left"},"ui/legacy/DockController.ts | dockToRight":{"message":"Dock to right"},"ui/legacy/DockController.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"ui/legacy/EmptyWidget.ts | learnMore":{"message":"Learn more"},"ui/legacy/FilterBar.ts | allStrings":{"message":"All"},"ui/legacy/FilterBar.ts | clearFilter":{"message":"Clear input"},"ui/legacy/FilterBar.ts | egSmalldUrlacomb":{"message":"e.g. /small[d]+/ url:a.com/b"},"ui/legacy/FilterBar.ts | filter":{"message":"Filter"},"ui/legacy/FilterBar.ts | sclickToSelectMultipleTypes":{"message":"{PH1}Click to select multiple types"},"ui/legacy/Infobar.ts | close":{"message":"Close"},"ui/legacy/Infobar.ts | dontShowAgain":{"message":"Don't show again"},"ui/legacy/Infobar.ts | learnMore":{"message":"Learn more"},"ui/legacy/InspectorView.ts | closeDrawer":{"message":"Close drawer"},"ui/legacy/InspectorView.ts | devToolsLanguageMissmatch":{"message":"DevTools is now available in {PH1}!"},"ui/legacy/InspectorView.ts | drawer":{"message":"Tool drawer"},"ui/legacy/InspectorView.ts | drawerHidden":{"message":"Drawer hidden"},"ui/legacy/InspectorView.ts | drawerShown":{"message":"Drawer shown"},"ui/legacy/InspectorView.ts | mainToolbar":{"message":"Main toolbar"},"ui/legacy/InspectorView.ts | moreTools":{"message":"More Tools"},"ui/legacy/InspectorView.ts | moveToBottom":{"message":"Move to bottom"},"ui/legacy/InspectorView.ts | moveToTop":{"message":"Move to top"},"ui/legacy/InspectorView.ts | panels":{"message":"Panels"},"ui/legacy/InspectorView.ts | reloadDevtools":{"message":"Reload DevTools"},"ui/legacy/InspectorView.ts | selectFolder":{"message":"Select folder"},"ui/legacy/InspectorView.ts | selectOverrideFolder":{"message":"Select a folder to store override files in."},"ui/legacy/InspectorView.ts | setToBrowserLanguage":{"message":"Always match Chrome's language"},"ui/legacy/InspectorView.ts | setToSpecificLanguage":{"message":"Switch DevTools to {PH1}"},"ui/legacy/ListWidget.ts | addString":{"message":"Add"},"ui/legacy/ListWidget.ts | cancelString":{"message":"Cancel"},"ui/legacy/ListWidget.ts | editString":{"message":"Edit"},"ui/legacy/ListWidget.ts | removeString":{"message":"Remove"},"ui/legacy/ListWidget.ts | saveString":{"message":"Save"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | debuggingConnectionWasClosed":{"message":"Debugging connection was closed. Reason: "},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectDevtools":{"message":"Reconnect DevTools"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectWhenReadyByReopening":{"message":"Reconnect when ready by reopening DevTools."},"ui/legacy/SearchableView.ts | cancel":{"message":"Cancel"},"ui/legacy/SearchableView.ts | dMatches":{"message":"{PH1} matches"},"ui/legacy/SearchableView.ts | dOfD":{"message":"{PH1} of {PH2}"},"ui/legacy/SearchableView.ts | findString":{"message":"Find"},"ui/legacy/SearchableView.ts | matchCase":{"message":"Match Case"},"ui/legacy/SearchableView.ts | matchString":{"message":"1 match"},"ui/legacy/SearchableView.ts | replace":{"message":"Replace"},"ui/legacy/SearchableView.ts | replaceAll":{"message":"Replace all"},"ui/legacy/SearchableView.ts | searchNext":{"message":"Search next"},"ui/legacy/SearchableView.ts | searchPrevious":{"message":"Search previous"},"ui/legacy/SearchableView.ts | useRegularExpression":{"message":"Use Regular Expression"},"ui/legacy/SettingsUI.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"ui/legacy/SettingsUI.ts | srequiresReload":{"message":"*Requires reload"},"ui/legacy/SoftContextMenu.ts | checked":{"message":"checked"},"ui/legacy/SoftContextMenu.ts | sS":{"message":"{PH1}, {PH2}"},"ui/legacy/SoftContextMenu.ts | sSS":{"message":"{PH1}, {PH2}, {PH3}"},"ui/legacy/SoftContextMenu.ts | unchecked":{"message":"unchecked"},"ui/legacy/SoftDropDown.ts | noItemSelected":{"message":"(no item selected)"},"ui/legacy/SuggestBox.ts | sSuggestionSOfS":{"message":"{PH1}, suggestion {PH2} of {PH3}"},"ui/legacy/SuggestBox.ts | sSuggestionSSelected":{"message":"{PH1}, suggestion selected"},"ui/legacy/TabbedPane.ts | close":{"message":"Close"},"ui/legacy/TabbedPane.ts | closeAll":{"message":"Close all"},"ui/legacy/TabbedPane.ts | closeOthers":{"message":"Close others"},"ui/legacy/TabbedPane.ts | closeS":{"message":"Close {PH1}"},"ui/legacy/TabbedPane.ts | closeTabsToTheRight":{"message":"Close tabs to the right"},"ui/legacy/TabbedPane.ts | moreTabs":{"message":"More tabs"},"ui/legacy/TabbedPane.ts | previewFeature":{"message":"Preview feature"},"ui/legacy/TargetCrashedScreen.ts | devtoolsWasDisconnectedFromThe":{"message":"DevTools was disconnected from the page."},"ui/legacy/TargetCrashedScreen.ts | oncePageIsReloadedDevtoolsWill":{"message":"Once page is reloaded, DevTools will automatically reconnect."},"ui/legacy/Toolbar.ts | clearInput":{"message":"Clear input"},"ui/legacy/Toolbar.ts | notPressed":{"message":"not pressed"},"ui/legacy/Toolbar.ts | pressed":{"message":"pressed"},"ui/legacy/UIUtils.ts | anonymous":{"message":"(anonymous)"},"ui/legacy/UIUtils.ts | anotherProfilerIsAlreadyActive":{"message":"Another profiler is already active"},"ui/legacy/UIUtils.ts | asyncCall":{"message":"Async Call"},"ui/legacy/UIUtils.ts | cancel":{"message":"Cancel"},"ui/legacy/UIUtils.ts | close":{"message":"Close"},"ui/legacy/UIUtils.ts | copyFileName":{"message":"Copy file name"},"ui/legacy/UIUtils.ts | copyLinkAddress":{"message":"Copy link address"},"ui/legacy/UIUtils.ts | ok":{"message":"OK"},"ui/legacy/UIUtils.ts | openInNewTab":{"message":"Open in new tab"},"ui/legacy/UIUtils.ts | promiseRejectedAsync":{"message":"Promise rejected (async)"},"ui/legacy/UIUtils.ts | promiseResolvedAsync":{"message":"Promise resolved (async)"},"ui/legacy/UIUtils.ts | sAsync":{"message":"{PH1} (async)"},"ui/legacy/ViewManager.ts | sPanel":{"message":"{PH1} panel"},"ui/legacy/ViewRegistration.ts | drawer":{"message":"Drawer"},"ui/legacy/ViewRegistration.ts | drawer_sidebar":{"message":"Drawer sidebar"},"ui/legacy/ViewRegistration.ts | elements":{"message":"Elements"},"ui/legacy/ViewRegistration.ts | network":{"message":"Network"},"ui/legacy/ViewRegistration.ts | panel":{"message":"Panel"},"ui/legacy/ViewRegistration.ts | settings":{"message":"Settings"},"ui/legacy/ViewRegistration.ts | sources":{"message":"Sources"}} \ No newline at end of file +{"core/common/ResourceType.ts | cspviolationreport":{"message":"CSPViolationReport"},"core/common/ResourceType.ts | css":{"message":"CSS"},"core/common/ResourceType.ts | doc":{"message":"Doc"},"core/common/ResourceType.ts | document":{"message":"Document"},"core/common/ResourceType.ts | documents":{"message":"Documents"},"core/common/ResourceType.ts | eventsource":{"message":"EventSource"},"core/common/ResourceType.ts | fetch":{"message":"Fetch"},"core/common/ResourceType.ts | font":{"message":"Font"},"core/common/ResourceType.ts | fonts":{"message":"Fonts"},"core/common/ResourceType.ts | image":{"message":"Image"},"core/common/ResourceType.ts | images":{"message":"Images"},"core/common/ResourceType.ts | img":{"message":"Img"},"core/common/ResourceType.ts | js":{"message":"JS"},"core/common/ResourceType.ts | manifest":{"message":"Manifest"},"core/common/ResourceType.ts | media":{"message":"Media"},"core/common/ResourceType.ts | other":{"message":"Other"},"core/common/ResourceType.ts | ping":{"message":"Ping"},"core/common/ResourceType.ts | preflight":{"message":"Preflight"},"core/common/ResourceType.ts | script":{"message":"Script"},"core/common/ResourceType.ts | scripts":{"message":"Scripts"},"core/common/ResourceType.ts | signedexchange":{"message":"SignedExchange"},"core/common/ResourceType.ts | stylesheet":{"message":"Stylesheet"},"core/common/ResourceType.ts | stylesheets":{"message":"Stylesheets"},"core/common/ResourceType.ts | texttrack":{"message":"TextTrack"},"core/common/ResourceType.ts | wasm":{"message":"Wasm"},"core/common/ResourceType.ts | webassembly":{"message":"WebAssembly"},"core/common/ResourceType.ts | webbundle":{"message":"WebBundle"},"core/common/ResourceType.ts | websocket":{"message":"WebSocket"},"core/common/ResourceType.ts | websockets":{"message":"WebSockets"},"core/common/ResourceType.ts | webtransport":{"message":"WebTransport"},"core/common/ResourceType.ts | ws":{"message":"WS"},"core/common/ResourceType.ts | xhrAndFetch":{"message":"XHR and Fetch"},"core/common/Revealer.ts | applicationPanel":{"message":"Application panel"},"core/common/Revealer.ts | changesDrawer":{"message":"Changes drawer"},"core/common/Revealer.ts | elementsPanel":{"message":"Elements panel"},"core/common/Revealer.ts | issuesView":{"message":"Issues view"},"core/common/Revealer.ts | networkPanel":{"message":"Network panel"},"core/common/Revealer.ts | sourcesPanel":{"message":"Sources panel"},"core/common/Revealer.ts | stylesSidebar":{"message":"styles sidebar"},"core/common/SettingRegistration.ts | adorner":{"message":"Adorner"},"core/common/SettingRegistration.ts | appearance":{"message":"Appearance"},"core/common/SettingRegistration.ts | console":{"message":"Console"},"core/common/SettingRegistration.ts | debugger":{"message":"Debugger"},"core/common/SettingRegistration.ts | elements":{"message":"Elements"},"core/common/SettingRegistration.ts | extension":{"message":"Extension"},"core/common/SettingRegistration.ts | global":{"message":"Global"},"core/common/SettingRegistration.ts | grid":{"message":"Grid"},"core/common/SettingRegistration.ts | memory":{"message":"Memory"},"core/common/SettingRegistration.ts | mobile":{"message":"Mobile"},"core/common/SettingRegistration.ts | network":{"message":"Network"},"core/common/SettingRegistration.ts | performance":{"message":"Performance"},"core/common/SettingRegistration.ts | persistence":{"message":"Persistence"},"core/common/SettingRegistration.ts | rendering":{"message":"Rendering"},"core/common/SettingRegistration.ts | sources":{"message":"Sources"},"core/common/SettingRegistration.ts | sync":{"message":"Sync"},"core/host/InspectorFrontendHost.ts | devtoolsS":{"message":"DevTools - {PH1}"},"core/host/ResourceLoader.ts | cacheError":{"message":"Cache error"},"core/host/ResourceLoader.ts | certificateError":{"message":"Certificate error"},"core/host/ResourceLoader.ts | certificateManagerError":{"message":"Certificate manager error"},"core/host/ResourceLoader.ts | connectionError":{"message":"Connection error"},"core/host/ResourceLoader.ts | decodingDataUrlFailed":{"message":"Decoding Data URL failed"},"core/host/ResourceLoader.ts | dnsResolverError":{"message":"DNS resolver error"},"core/host/ResourceLoader.ts | ftpError":{"message":"FTP error"},"core/host/ResourceLoader.ts | httpError":{"message":"HTTP error"},"core/host/ResourceLoader.ts | httpErrorStatusCodeSS":{"message":"HTTP error: status code {PH1}, {PH2}"},"core/host/ResourceLoader.ts | invalidUrl":{"message":"Invalid URL"},"core/host/ResourceLoader.ts | signedExchangeError":{"message":"Signed Exchange error"},"core/host/ResourceLoader.ts | systemError":{"message":"System error"},"core/host/ResourceLoader.ts | unknownError":{"message":"Unknown error"},"core/i18n/time-utilities.ts | fdays":{"message":"{PH1} days"},"core/i18n/time-utilities.ts | fhrs":{"message":"{PH1} hrs"},"core/i18n/time-utilities.ts | fmin":{"message":"{PH1} min"},"core/i18n/time-utilities.ts | fmms":{"message":"{PH1} μs"},"core/i18n/time-utilities.ts | fms":{"message":"{PH1} ms"},"core/i18n/time-utilities.ts | fs":{"message":"{PH1} s"},"core/sdk/CompilerSourceMappingContentProvider.ts | couldNotLoadContentForSS":{"message":"Could not load content for {PH1} ({PH2})"},"core/sdk/ConsoleModel.ts | bfcacheNavigation":{"message":"Navigation to {PH1} was restored from back/forward cache (see https://web.dev/bfcache/)"},"core/sdk/ConsoleModel.ts | failedToSaveToTempVariable":{"message":"Failed to save to temp variable."},"core/sdk/ConsoleModel.ts | navigatedToS":{"message":"Navigated to {PH1}"},"core/sdk/ConsoleModel.ts | profileSFinished":{"message":"Profile ''{PH1}'' finished."},"core/sdk/ConsoleModel.ts | profileSStarted":{"message":"Profile ''{PH1}'' started."},"core/sdk/CPUProfilerModel.ts | profileD":{"message":"Profile {PH1}"},"core/sdk/CSSStyleSheetHeader.ts | couldNotFindTheOriginalStyle":{"message":"Could not find the original style sheet."},"core/sdk/CSSStyleSheetHeader.ts | thereWasAnErrorRetrievingThe":{"message":"There was an error retrieving the source styles."},"core/sdk/DebuggerModel.ts | block":{"message":"Block"},"core/sdk/DebuggerModel.ts | catchBlock":{"message":"Catch block"},"core/sdk/DebuggerModel.ts | closure":{"message":"Closure"},"core/sdk/DebuggerModel.ts | expression":{"message":"Expression"},"core/sdk/DebuggerModel.ts | global":{"message":"Global"},"core/sdk/DebuggerModel.ts | local":{"message":"Local"},"core/sdk/DebuggerModel.ts | module":{"message":"Module"},"core/sdk/DebuggerModel.ts | script":{"message":"Script"},"core/sdk/DebuggerModel.ts | withBlock":{"message":"With block"},"core/sdk/DOMDebuggerModel.ts | animation":{"message":"Animation"},"core/sdk/DOMDebuggerModel.ts | animationFrameFired":{"message":"Animation Frame Fired"},"core/sdk/DOMDebuggerModel.ts | cancelAnimationFrame":{"message":"Cancel Animation Frame"},"core/sdk/DOMDebuggerModel.ts | canvas":{"message":"Canvas"},"core/sdk/DOMDebuggerModel.ts | clipboard":{"message":"Clipboard"},"core/sdk/DOMDebuggerModel.ts | closeAudiocontext":{"message":"Close AudioContext"},"core/sdk/DOMDebuggerModel.ts | control":{"message":"Control"},"core/sdk/DOMDebuggerModel.ts | createAudiocontext":{"message":"Create AudioContext"},"core/sdk/DOMDebuggerModel.ts | createCanvasContext":{"message":"Create canvas context"},"core/sdk/DOMDebuggerModel.ts | device":{"message":"Device"},"core/sdk/DOMDebuggerModel.ts | domMutation":{"message":"DOM Mutation"},"core/sdk/DOMDebuggerModel.ts | dragDrop":{"message":"Drag / drop"},"core/sdk/DOMDebuggerModel.ts | geolocation":{"message":"Geolocation"},"core/sdk/DOMDebuggerModel.ts | keyboard":{"message":"Keyboard"},"core/sdk/DOMDebuggerModel.ts | load":{"message":"Load"},"core/sdk/DOMDebuggerModel.ts | media":{"message":"Media"},"core/sdk/DOMDebuggerModel.ts | mouse":{"message":"Mouse"},"core/sdk/DOMDebuggerModel.ts | notification":{"message":"Notification"},"core/sdk/DOMDebuggerModel.ts | parse":{"message":"Parse"},"core/sdk/DOMDebuggerModel.ts | pictureinpicture":{"message":"Picture-in-Picture"},"core/sdk/DOMDebuggerModel.ts | pointer":{"message":"Pointer"},"core/sdk/DOMDebuggerModel.ts | policyViolations":{"message":"Policy Violations"},"core/sdk/DOMDebuggerModel.ts | requestAnimationFrame":{"message":"Request Animation Frame"},"core/sdk/DOMDebuggerModel.ts | resumeAudiocontext":{"message":"Resume AudioContext"},"core/sdk/DOMDebuggerModel.ts | script":{"message":"Script"},"core/sdk/DOMDebuggerModel.ts | scriptBlockedByContentSecurity":{"message":"Script Blocked by Content Security Policy"},"core/sdk/DOMDebuggerModel.ts | scriptBlockedDueToContent":{"message":"Script blocked due to Content Security Policy directive: {PH1}"},"core/sdk/DOMDebuggerModel.ts | scriptFirstStatement":{"message":"Script First Statement"},"core/sdk/DOMDebuggerModel.ts | setInnerhtml":{"message":"Set innerHTML"},"core/sdk/DOMDebuggerModel.ts | setTimeoutOrIntervalFired":{"message":"{PH1} fired"},"core/sdk/DOMDebuggerModel.ts | sinkViolations":{"message":"Sink Violations"},"core/sdk/DOMDebuggerModel.ts | suspendAudiocontext":{"message":"Suspend AudioContext"},"core/sdk/DOMDebuggerModel.ts | timer":{"message":"Timer"},"core/sdk/DOMDebuggerModel.ts | touch":{"message":"Touch"},"core/sdk/DOMDebuggerModel.ts | trustedTypeViolations":{"message":"Trusted Type Violations"},"core/sdk/DOMDebuggerModel.ts | webaudio":{"message":"WebAudio"},"core/sdk/DOMDebuggerModel.ts | webglErrorFired":{"message":"WebGL Error Fired"},"core/sdk/DOMDebuggerModel.ts | webglErrorFiredS":{"message":"WebGL Error Fired ({PH1})"},"core/sdk/DOMDebuggerModel.ts | webglWarningFired":{"message":"WebGL Warning Fired"},"core/sdk/DOMDebuggerModel.ts | window":{"message":"Window"},"core/sdk/DOMDebuggerModel.ts | worker":{"message":"Worker"},"core/sdk/DOMDebuggerModel.ts | xhr":{"message":"XHR"},"core/sdk/EventBreakpointsModel.ts | auctionWorklet":{"message":"Ad Auction Worklet"},"core/sdk/EventBreakpointsModel.ts | beforeBidderWorkletBiddingStart":{"message":"Bidder Bidding Phase Start"},"core/sdk/EventBreakpointsModel.ts | beforeBidderWorkletReportingStart":{"message":"Bidder Reporting Phase Start"},"core/sdk/EventBreakpointsModel.ts | beforeSellerWorkletReportingStart":{"message":"Seller Reporting Phase Start"},"core/sdk/EventBreakpointsModel.ts | beforeSellerWorkletScoringStart":{"message":"Seller Scoring Phase Start"},"core/sdk/NetworkManager.ts | crossoriginReadBlockingCorb":{"message":"Cross-Origin Read Blocking (CORB) blocked cross-origin response {PH1} with MIME type {PH2}. See https://www.chromestatus.com/feature/5629709824032768 for more details."},"core/sdk/NetworkManager.ts | fastG":{"message":"Fast 3G"},"core/sdk/NetworkManager.ts | noContentForPreflight":{"message":"No content available for preflight request"},"core/sdk/NetworkManager.ts | noContentForRedirect":{"message":"No content available because this request was redirected"},"core/sdk/NetworkManager.ts | noContentForWebSocket":{"message":"Content for WebSockets is currently not supported"},"core/sdk/NetworkManager.ts | noThrottling":{"message":"No throttling"},"core/sdk/NetworkManager.ts | offline":{"message":"Offline"},"core/sdk/NetworkManager.ts | requestWasBlockedByDevtoolsS":{"message":"Request was blocked by DevTools: \"{PH1}\""},"core/sdk/NetworkManager.ts | sFailedLoadingSS":{"message":"{PH1} failed loading: {PH2} \"{PH3}\"."},"core/sdk/NetworkManager.ts | sFinishedLoadingSS":{"message":"{PH1} finished loading: {PH2} \"{PH3}\"."},"core/sdk/NetworkManager.ts | slowG":{"message":"Slow 3G"},"core/sdk/NetworkRequest.ts | anUnknownErrorWasEncounteredWhenTrying":{"message":"An unknown error was encountered when trying to store this cookie."},"core/sdk/NetworkRequest.ts | binary":{"message":"(binary)"},"core/sdk/NetworkRequest.ts | blockedReasonInvalidDomain":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because its Domain attribute was invalid with regards to the current host url."},"core/sdk/NetworkRequest.ts | blockedReasonInvalidPrefix":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it used the \"__Secure-\" or \"__Host-\" prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in https://tools.ietf.org/html/draft-west-cookie-prefixes-05."},"core/sdk/NetworkRequest.ts | blockedReasonOverwriteSecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it was not sent over a secure connection and would have overwritten a cookie with the Secure attribute."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteNoneInsecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameSite=None\" attribute but did not have the \"Secure\" attribute, which is required in order to use \"SameSite=None\"."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"{PH1}\" attribute but came from a cross-site response which was not the response to a top-level navigation."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteUnspecifiedTreatedAsLax":{"message":"This Set-Cookie header didn't specify a \"SameSite\" attribute and was defaulted to \"SameSite=Lax,\" and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The Set-Cookie had to have been set with \"SameSite=None\" to enable cross-site usage."},"core/sdk/NetworkRequest.ts | blockedReasonSecureOnly":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"Secure\" attribute but was not received over a secure connection."},"core/sdk/NetworkRequest.ts | domainMismatch":{"message":"This cookie was blocked because neither did the request URL's domain exactly match the cookie's domain, nor was the request URL's domain a subdomain of the cookie's Domain attribute value."},"core/sdk/NetworkRequest.ts | nameValuePairExceedsMaxSize":{"message":"This cookie was blocked because it was too large. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | notOnPath":{"message":"This cookie was blocked because its path was not an exact match for or a superdirectory of the request url's path."},"core/sdk/NetworkRequest.ts | samePartyFromCrossPartyContext":{"message":"This cookie was blocked because it had the \"SameParty\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set."},"core/sdk/NetworkRequest.ts | sameSiteLax":{"message":"This cookie was blocked because it had the \"SameSite=Lax\" attribute and the request was made from a different site and was not initiated by a top-level navigation."},"core/sdk/NetworkRequest.ts | sameSiteNoneInsecure":{"message":"This cookie was blocked because it had the \"SameSite=None\" attribute but was not marked \"Secure\". Cookies without SameSite restrictions must be marked \"Secure\" and sent over a secure connection."},"core/sdk/NetworkRequest.ts | sameSiteStrict":{"message":"This cookie was blocked because it had the \"SameSite=Strict\" attribute and the request was made from a different site. This includes top-level navigation requests initiated by other sites."},"core/sdk/NetworkRequest.ts | sameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a \"SameSite\" attribute when it was stored and was defaulted to \"SameSite=Lax,\" and was blocked because the request was made from a different site and was not initiated by a top-level navigation. The cookie had to have been set with \"SameSite=None\" to enable cross-site usage."},"core/sdk/NetworkRequest.ts | schemefulSameSiteLax":{"message":"This cookie was blocked because it had the \"SameSite=Lax\" attribute but the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteStrict":{"message":"This cookie was blocked because it had the \"SameSite=Strict\" attribute but the request was cross-site. This includes top-level navigation requests initiated by other sites. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a \"SameSite\" attribute when it was stored, was defaulted to \"SameSite=Lax\", and was blocked because the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | secureOnly":{"message":"This cookie was blocked because it had the \"Secure\" attribute and the connection was not secure."},"core/sdk/NetworkRequest.ts | setcookieHeaderIsIgnoredIn":{"message":"Set-Cookie header is ignored in response from url: {PH1}. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | theSchemeOfThisConnectionIsNot":{"message":"The scheme of this connection is not allowed to store cookies."},"core/sdk/NetworkRequest.ts | thisSetcookieDidntSpecifyASamesite":{"message":"This Set-Cookie header didn't specify a \"SameSite\" attribute, was defaulted to \"SameSite=Lax\", and was blocked because it came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieHadInvalidSyntax":{"message":"This Set-Cookie header had invalid syntax."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSameparty":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameParty\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameParty\" attribute but also had other conflicting attributes. Chrome requires cookies that use the \"SameParty\" attribute to also have the \"Secure\" attribute, and to not be restricted to \"SameSite=Strict\"."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"{PH1}\" attribute but came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because the cookie was too large. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedDueToUser":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked due to user preferences."},"core/sdk/NetworkRequest.ts | unknownError":{"message":"An unknown error was encountered when trying to send this cookie."},"core/sdk/NetworkRequest.ts | userPreferences":{"message":"This cookie was blocked due to user preferences."},"core/sdk/OverlayModel.ts | pausedInDebugger":{"message":"Paused in debugger"},"core/sdk/PageResourceLoader.ts | loadCanceledDueToReloadOf":{"message":"Load canceled due to reload of inspected page"},"core/sdk/Script.ts | scriptRemovedOrDeleted":{"message":"Script removed or deleted."},"core/sdk/Script.ts | unableToFetchScriptSource":{"message":"Unable to fetch script source."},"core/sdk/sdk-meta.ts | achromatopsia":{"message":"Achromatopsia (no color)"},"core/sdk/sdk-meta.ts | blurredVision":{"message":"Blurred vision"},"core/sdk/sdk-meta.ts | captureAsyncStackTraces":{"message":"Capture async stack traces"},"core/sdk/sdk-meta.ts | deuteranopia":{"message":"Deuteranopia (no green)"},"core/sdk/sdk-meta.ts | disableAsyncStackTraces":{"message":"Disable async stack traces"},"core/sdk/sdk-meta.ts | disableAvifFormat":{"message":"Disable AVIF format"},"core/sdk/sdk-meta.ts | disableCache":{"message":"Disable cache (while DevTools is open)"},"core/sdk/sdk-meta.ts | disableJavascript":{"message":"Disable JavaScript"},"core/sdk/sdk-meta.ts | disableLocalFonts":{"message":"Disable local fonts"},"core/sdk/sdk-meta.ts | disableNetworkRequestBlocking":{"message":"Disable network request blocking"},"core/sdk/sdk-meta.ts | disableWebpFormat":{"message":"Disable WebP format"},"core/sdk/sdk-meta.ts | doNotCaptureAsyncStackTraces":{"message":"Do not capture async stack traces"},"core/sdk/sdk-meta.ts | doNotEmulateAFocusedPage":{"message":"Do not emulate a focused page"},"core/sdk/sdk-meta.ts | doNotEmulateAnyVisionDeficiency":{"message":"Do not emulate any vision deficiency"},"core/sdk/sdk-meta.ts | doNotEmulateCss":{"message":"Do not emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | doNotEmulateCssMediaType":{"message":"Do not emulate CSS media type"},"core/sdk/sdk-meta.ts | doNotExtendGridLines":{"message":"Do not extend grid lines"},"core/sdk/sdk-meta.ts | doNotHighlightAdFrames":{"message":"Do not highlight ad frames"},"core/sdk/sdk-meta.ts | doNotPauseOnExceptions":{"message":"Do not pause on exceptions"},"core/sdk/sdk-meta.ts | doNotPreserveLogUponNavigation":{"message":"Do not preserve log upon navigation"},"core/sdk/sdk-meta.ts | doNotShowGridNamedAreas":{"message":"Do not show grid named areas"},"core/sdk/sdk-meta.ts | doNotShowGridTrackSizes":{"message":"Do not show grid track sizes"},"core/sdk/sdk-meta.ts | doNotShowRulersOnHover":{"message":"Do not show rulers on hover"},"core/sdk/sdk-meta.ts | emulateAchromatopsia":{"message":"Emulate achromatopsia (no color)"},"core/sdk/sdk-meta.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"core/sdk/sdk-meta.ts | emulateAutoDarkMode":{"message":"Emulate auto dark mode"},"core/sdk/sdk-meta.ts | emulateBlurredVision":{"message":"Emulate blurred vision"},"core/sdk/sdk-meta.ts | emulateCss":{"message":"Emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaFeature":{"message":"Emulate CSS media feature {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaType":{"message":"Emulate CSS media type"},"core/sdk/sdk-meta.ts | emulateCssPrintMediaType":{"message":"Emulate CSS print media type"},"core/sdk/sdk-meta.ts | emulateCssScreenMediaType":{"message":"Emulate CSS screen media type"},"core/sdk/sdk-meta.ts | emulateDeuteranopia":{"message":"Emulate deuteranopia (no green)"},"core/sdk/sdk-meta.ts | emulateProtanopia":{"message":"Emulate protanopia (no red)"},"core/sdk/sdk-meta.ts | emulateReducedContrast":{"message":"Emulate reduced contrast"},"core/sdk/sdk-meta.ts | emulateTritanopia":{"message":"Emulate tritanopia (no blue)"},"core/sdk/sdk-meta.ts | emulateVisionDeficiencies":{"message":"Emulate vision deficiencies"},"core/sdk/sdk-meta.ts | enableAvifFormat":{"message":"Enable AVIF format"},"core/sdk/sdk-meta.ts | enableCache":{"message":"Enable cache"},"core/sdk/sdk-meta.ts | enableCustomFormatters":{"message":"Enable custom formatters"},"core/sdk/sdk-meta.ts | enableJavascript":{"message":"Enable JavaScript"},"core/sdk/sdk-meta.ts | enableLocalFonts":{"message":"Enable local fonts"},"core/sdk/sdk-meta.ts | enableNetworkRequestBlocking":{"message":"Enable network request blocking"},"core/sdk/sdk-meta.ts | enableRemoteFileLoading":{"message":"Allow DevTools to load resources, such as source maps, from remote file paths. Disabled by default for security reasons."},"core/sdk/sdk-meta.ts | enableWebpFormat":{"message":"Enable WebP format"},"core/sdk/sdk-meta.ts | extendGridLines":{"message":"Extend grid lines"},"core/sdk/sdk-meta.ts | hideCoreWebVitalsOverlay":{"message":"Hide Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | hideFramesPerSecondFpsMeter":{"message":"Hide frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | hideLayerBorders":{"message":"Hide layer borders"},"core/sdk/sdk-meta.ts | hideLayoutShiftRegions":{"message":"Hide layout shift regions"},"core/sdk/sdk-meta.ts | hideLineLabels":{"message":"Hide line labels"},"core/sdk/sdk-meta.ts | hidePaintFlashingRectangles":{"message":"Hide paint flashing rectangles"},"core/sdk/sdk-meta.ts | hideScrollPerformanceBottlenecks":{"message":"Hide scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | highlightAdFrames":{"message":"Highlight ad frames"},"core/sdk/sdk-meta.ts | noEmulation":{"message":"No emulation"},"core/sdk/sdk-meta.ts | pauseOnExceptions":{"message":"Pause on exceptions"},"core/sdk/sdk-meta.ts | preserveLogUponNavigation":{"message":"Preserve log upon navigation"},"core/sdk/sdk-meta.ts | print":{"message":"print"},"core/sdk/sdk-meta.ts | protanopia":{"message":"Protanopia (no red)"},"core/sdk/sdk-meta.ts | query":{"message":"query"},"core/sdk/sdk-meta.ts | reducedContrast":{"message":"Reduced contrast"},"core/sdk/sdk-meta.ts | screen":{"message":"screen"},"core/sdk/sdk-meta.ts | showAreaNames":{"message":"Show area names"},"core/sdk/sdk-meta.ts | showCoreWebVitalsOverlay":{"message":"Show Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | showFramesPerSecondFpsMeter":{"message":"Show frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | showGridNamedAreas":{"message":"Show grid named areas"},"core/sdk/sdk-meta.ts | showGridTrackSizes":{"message":"Show grid track sizes"},"core/sdk/sdk-meta.ts | showLayerBorders":{"message":"Show layer borders"},"core/sdk/sdk-meta.ts | showLayoutShiftRegions":{"message":"Show layout shift regions"},"core/sdk/sdk-meta.ts | showLineLabels":{"message":"Show line labels"},"core/sdk/sdk-meta.ts | showLineNames":{"message":"Show line names"},"core/sdk/sdk-meta.ts | showLineNumbers":{"message":"Show line numbers"},"core/sdk/sdk-meta.ts | showPaintFlashingRectangles":{"message":"Show paint flashing rectangles"},"core/sdk/sdk-meta.ts | showRulersOnHover":{"message":"Show rulers on hover"},"core/sdk/sdk-meta.ts | showScrollPerformanceBottlenecks":{"message":"Show scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | showTrackSizes":{"message":"Show track sizes"},"core/sdk/sdk-meta.ts | tritanopia":{"message":"Tritanopia (no blue)"},"core/sdk/ServerTiming.ts | deprecatedSyntaxFoundPleaseUse":{"message":"Deprecated syntax found. Please use: ;dur=;desc="},"core/sdk/ServerTiming.ts | duplicateParameterSIgnored":{"message":"Duplicate parameter \"{PH1}\" ignored."},"core/sdk/ServerTiming.ts | extraneousTrailingCharacters":{"message":"Extraneous trailing characters."},"core/sdk/ServerTiming.ts | noValueFoundForParameterS":{"message":"No value found for parameter \"{PH1}\"."},"core/sdk/ServerTiming.ts | unableToParseSValueS":{"message":"Unable to parse \"{PH1}\" value \"{PH2}\"."},"core/sdk/ServerTiming.ts | unrecognizedParameterS":{"message":"Unrecognized parameter \"{PH1}\"."},"core/sdk/ServiceWorkerCacheModel.ts | serviceworkercacheagentError":{"message":"ServiceWorkerCacheAgent error deleting cache entry {PH1} in cache: {PH2}"},"core/sdk/ServiceWorkerManager.ts | activated":{"message":"activated"},"core/sdk/ServiceWorkerManager.ts | activating":{"message":"activating"},"core/sdk/ServiceWorkerManager.ts | installed":{"message":"installed"},"core/sdk/ServiceWorkerManager.ts | installing":{"message":"installing"},"core/sdk/ServiceWorkerManager.ts | new":{"message":"new"},"core/sdk/ServiceWorkerManager.ts | redundant":{"message":"redundant"},"core/sdk/ServiceWorkerManager.ts | running":{"message":"running"},"core/sdk/ServiceWorkerManager.ts | sSS":{"message":"{PH1} #{PH2} ({PH3})"},"core/sdk/ServiceWorkerManager.ts | starting":{"message":"starting"},"core/sdk/ServiceWorkerManager.ts | stopped":{"message":"stopped"},"core/sdk/ServiceWorkerManager.ts | stopping":{"message":"stopping"},"entrypoints/inspector_main/inspector_main-meta.ts | autoOpenDevTools":{"message":"Auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | blockAds":{"message":"Block ads on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | colorVisionDeficiency":{"message":"color vision deficiency"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaFeature":{"message":"CSS media feature"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaType":{"message":"CSS media type"},"entrypoints/inspector_main/inspector_main-meta.ts | disablePaused":{"message":"Disable paused state overlay"},"entrypoints/inspector_main/inspector_main-meta.ts | doNotAutoOpen":{"message":"Do not auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | forceAdBlocking":{"message":"Force ad blocking on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | fps":{"message":"fps"},"entrypoints/inspector_main/inspector_main-meta.ts | hardReloadPage":{"message":"Hard reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | layout":{"message":"layout"},"entrypoints/inspector_main/inspector_main-meta.ts | paint":{"message":"paint"},"entrypoints/inspector_main/inspector_main-meta.ts | reloadPage":{"message":"Reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | rendering":{"message":"Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | showAds":{"message":"Show ads on this site, if allowed"},"entrypoints/inspector_main/inspector_main-meta.ts | showRendering":{"message":"Show Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia":{"message":"Toggle CSS media feature prefers-color-scheme"},"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency":{"message":"vision deficiency"},"entrypoints/inspector_main/InspectorMain.ts | javascriptIsDisabled":{"message":"JavaScript is disabled"},"entrypoints/inspector_main/InspectorMain.ts | main":{"message":"Main"},"entrypoints/inspector_main/InspectorMain.ts | openDedicatedTools":{"message":"Open dedicated DevTools for Node.js"},"entrypoints/inspector_main/InspectorMain.ts | tab":{"message":"Tab"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetNotSelected":{"message":"Page: Not selected"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetS":{"message":"Page: {PH1}"},"entrypoints/inspector_main/RenderingOptions.ts | coreWebVitals":{"message":"Core Web Vitals"},"entrypoints/inspector_main/RenderingOptions.ts | disableAvifImageFormat":{"message":"Disable AVIF image format"},"entrypoints/inspector_main/RenderingOptions.ts | disableLocalFonts":{"message":"Disable local fonts"},"entrypoints/inspector_main/RenderingOptions.ts | disablesLocalSourcesInFontface":{"message":"Disables local() sources in @font-face rules. Requires a page reload to apply."},"entrypoints/inspector_main/RenderingOptions.ts | disableWebpImageFormat":{"message":"Disable WebP image format"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAutoDarkMode":{"message":"Enable automatic dark mode"},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAFocusedPage":{"message":"Emulates a focused page."},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAutoDarkMode":{"message":"Enables automatic dark mode and sets prefers-color-scheme to dark."},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature":{"message":"Forces CSS color-gamut media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors":{"message":"Forces CSS forced-colors media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia":{"message":"Forces CSS prefers-color-scheme media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscontrastMedia":{"message":"Forces CSS prefers-contrast media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreduceddataMedia":{"message":"Forces CSS prefers-reduced-data media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedmotion":{"message":"Forces CSS prefers-reduced-motion media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesMediaTypeForTestingPrint":{"message":"Forces media type for testing print and screen styles"},"entrypoints/inspector_main/RenderingOptions.ts | forcesVisionDeficiencyEmulation":{"message":"Forces vision deficiency emulation"},"entrypoints/inspector_main/RenderingOptions.ts | frameRenderingStats":{"message":"Frame Rendering Stats"},"entrypoints/inspector_main/RenderingOptions.ts | highlightAdFrames":{"message":"Highlight ad frames"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageBlueThat":{"message":"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageGreen":{"message":"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsElementsTealThatCan":{"message":"Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsFramesRedDetectedToBe":{"message":"Highlights frames (red) detected to be ads."},"entrypoints/inspector_main/RenderingOptions.ts | layerBorders":{"message":"Layer borders"},"entrypoints/inspector_main/RenderingOptions.ts | layoutShiftRegions":{"message":"Layout Shift Regions"},"entrypoints/inspector_main/RenderingOptions.ts | paintFlashing":{"message":"Paint flashing"},"entrypoints/inspector_main/RenderingOptions.ts | plotsFrameThroughputDropped":{"message":"Plots frame throughput, dropped frames distribution, and GPU memory."},"entrypoints/inspector_main/RenderingOptions.ts | requiresAPageReloadToApplyAnd":{"message":"Requires a page reload to apply and disables caching for image requests."},"entrypoints/inspector_main/RenderingOptions.ts | scrollingPerformanceIssues":{"message":"Scrolling performance issues"},"entrypoints/inspector_main/RenderingOptions.ts | showsAnOverlayWithCoreWebVitals":{"message":"Shows an overlay with Core Web Vitals."},"entrypoints/inspector_main/RenderingOptions.ts | showsLayerBordersOrangeoliveAnd":{"message":"Shows layer borders (orange/olive) and tiles (cyan)."},"entrypoints/js_app/js_app.ts | main":{"message":"Main"},"entrypoints/main/main-meta.ts | asAuthored":{"message":"As authored"},"entrypoints/main/main-meta.ts | auto":{"message":"auto"},"entrypoints/main/main-meta.ts | bottom":{"message":"Bottom"},"entrypoints/main/main-meta.ts | browserLanguage":{"message":"Browser UI language"},"entrypoints/main/main-meta.ts | cancelSearch":{"message":"Cancel search"},"entrypoints/main/main-meta.ts | colorFormat":{"message":"Color format:"},"entrypoints/main/main-meta.ts | colorFormatSettingDisabled":{"message":"This setting is deprecated because it is incompatible with modern color spaces. To re-enable it, disable the corresponding experiment."},"entrypoints/main/main-meta.ts | darkCapital":{"message":"Dark"},"entrypoints/main/main-meta.ts | darkLower":{"message":"dark"},"entrypoints/main/main-meta.ts | devtoolsDefault":{"message":"DevTools (Default)"},"entrypoints/main/main-meta.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/main-meta.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/main-meta.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/main-meta.ts | enableCtrlShortcutToSwitchPanels":{"message":"Enable Ctrl + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableShortcutToSwitchPanels":{"message":"Enable ⌘ + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableSync":{"message":"Enable settings sync"},"entrypoints/main/main-meta.ts | findNextResult":{"message":"Find next result"},"entrypoints/main/main-meta.ts | findPreviousResult":{"message":"Find previous result"},"entrypoints/main/main-meta.ts | focusDebuggee":{"message":"Focus debuggee"},"entrypoints/main/main-meta.ts | horizontal":{"message":"horizontal"},"entrypoints/main/main-meta.ts | language":{"message":"Language:"},"entrypoints/main/main-meta.ts | left":{"message":"Left"},"entrypoints/main/main-meta.ts | lightCapital":{"message":"Light"},"entrypoints/main/main-meta.ts | lightLower":{"message":"light"},"entrypoints/main/main-meta.ts | nextPanel":{"message":"Next panel"},"entrypoints/main/main-meta.ts | panelLayout":{"message":"Panel layout:"},"entrypoints/main/main-meta.ts | previousPanel":{"message":"Previous panel"},"entrypoints/main/main-meta.ts | reloadDevtools":{"message":"Reload DevTools"},"entrypoints/main/main-meta.ts | resetZoomLevel":{"message":"Reset zoom level"},"entrypoints/main/main-meta.ts | restoreLastDockPosition":{"message":"Restore last dock position"},"entrypoints/main/main-meta.ts | right":{"message":"Right"},"entrypoints/main/main-meta.ts | searchAsYouTypeCommand":{"message":"Enable search as you type"},"entrypoints/main/main-meta.ts | searchAsYouTypeSetting":{"message":"Search as you type"},"entrypoints/main/main-meta.ts | searchInPanel":{"message":"Search in panel"},"entrypoints/main/main-meta.ts | searchOnEnterCommand":{"message":"Disable search as you type (press Enter to search)"},"entrypoints/main/main-meta.ts | setColorFormatAsAuthored":{"message":"Set color format as authored"},"entrypoints/main/main-meta.ts | setColorFormatToHex":{"message":"Set color format to HEX"},"entrypoints/main/main-meta.ts | setColorFormatToHsl":{"message":"Set color format to HSL"},"entrypoints/main/main-meta.ts | setColorFormatToRgb":{"message":"Set color format to RGB"},"entrypoints/main/main-meta.ts | switchToDarkTheme":{"message":"Switch to dark theme"},"entrypoints/main/main-meta.ts | switchToLightTheme":{"message":"Switch to light theme"},"entrypoints/main/main-meta.ts | switchToSystemPreferredColor":{"message":"Switch to system preferred color theme"},"entrypoints/main/main-meta.ts | systemPreference":{"message":"System preference"},"entrypoints/main/main-meta.ts | theme":{"message":"Theme:"},"entrypoints/main/main-meta.ts | toggleDrawer":{"message":"Toggle drawer"},"entrypoints/main/main-meta.ts | undocked":{"message":"Undocked"},"entrypoints/main/main-meta.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/main/main-meta.ts | useAutomaticPanelLayout":{"message":"Use automatic panel layout"},"entrypoints/main/main-meta.ts | useHorizontalPanelLayout":{"message":"Use horizontal panel layout"},"entrypoints/main/main-meta.ts | useVerticalPanelLayout":{"message":"Use vertical panel layout"},"entrypoints/main/main-meta.ts | vertical":{"message":"vertical"},"entrypoints/main/main-meta.ts | zoomIn":{"message":"Zoom in"},"entrypoints/main/main-meta.ts | zoomOut":{"message":"Zoom out"},"entrypoints/main/MainImpl.ts | customizeAndControlDevtools":{"message":"Customize and control DevTools"},"entrypoints/main/MainImpl.ts | dockSide":{"message":"Dock side"},"entrypoints/main/MainImpl.ts | dockSideNaviation":{"message":"Use left and right arrow keys to navigate the options"},"entrypoints/main/MainImpl.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/MainImpl.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/MainImpl.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/MainImpl.ts | focusDebuggee":{"message":"Focus debuggee"},"entrypoints/main/MainImpl.ts | help":{"message":"Help"},"entrypoints/main/MainImpl.ts | hideConsoleDrawer":{"message":"Hide console drawer"},"entrypoints/main/MainImpl.ts | moreTools":{"message":"More tools"},"entrypoints/main/MainImpl.ts | placementOfDevtoolsRelativeToThe":{"message":"Placement of DevTools relative to the page. ({PH1} to restore last position)"},"entrypoints/main/MainImpl.ts | showConsoleDrawer":{"message":"Show console drawer"},"entrypoints/main/MainImpl.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/node_app/node_app.ts | connection":{"message":"Connection"},"entrypoints/node_app/node_app.ts | networkTitle":{"message":"Node"},"entrypoints/node_app/node_app.ts | node":{"message":"node"},"entrypoints/node_app/node_app.ts | showConnection":{"message":"Show Connection"},"entrypoints/node_app/node_app.ts | showNode":{"message":"Show Node"},"entrypoints/node_app/NodeConnectionsPanel.ts | addConnection":{"message":"Add connection"},"entrypoints/node_app/NodeConnectionsPanel.ts | networkAddressEgLocalhost":{"message":"Network address (e.g. localhost:9229)"},"entrypoints/node_app/NodeConnectionsPanel.ts | noConnectionsSpecified":{"message":"No connections specified"},"entrypoints/node_app/NodeConnectionsPanel.ts | nodejsDebuggingGuide":{"message":"Node.js debugging guide"},"entrypoints/node_app/NodeConnectionsPanel.ts | specifyNetworkEndpointAnd":{"message":"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more."},"entrypoints/node_app/NodeMain.ts | main":{"message":"Main"},"entrypoints/node_app/NodeMain.ts | nodejsS":{"message":"Node.js: {PH1}"},"entrypoints/worker_app/WorkerMain.ts | main":{"message":"Main"},"generated/Deprecation.ts | AuthorizationCoveredByWildcard":{"message":"Authorization will not be covered by the wildcard symbol (*) in CORS Access-Control-Allow-Headers handling."},"generated/Deprecation.ts | CanRequestURLHTTPContainingNewline":{"message":"Resource requests whose URLs contained both removed whitespace \\(n|r|t) characters and less-than characters (<) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources."},"generated/Deprecation.ts | ChromeLoadTimesConnectionInfo":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Navigation Timing 2."},"generated/Deprecation.ts | ChromeLoadTimesFirstPaintAfterLoadTime":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Paint Timing."},"generated/Deprecation.ts | ChromeLoadTimesWasAlternateProtocolAvailable":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2."},"generated/Deprecation.ts | CookieWithTruncatingChar":{"message":"Cookies containing a \\(0|r|n) character will be rejected instead of truncated."},"generated/Deprecation.ts | CrossOriginAccessBasedOnDocumentDomain":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting document.domain."},"generated/Deprecation.ts | CrossOriginWindowAlert":{"message":"Triggering window.alert from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CrossOriginWindowConfirm":{"message":"Triggering window.confirm from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CSSSelectorInternalMediaControlsOverlayCastButton":{"message":"The disableRemotePlayback attribute should be used in order to disable the default Cast integration instead of using -internal-media-controls-overlay-cast-button selector."},"generated/Deprecation.ts | DataUrlInSvgUse":{"message":"Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future."},"generated/Deprecation.ts | DocumentDomainSettingWithoutOriginAgentClusterHeader":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. To continue using this feature, please opt-out of origin-keyed agent clusters by sending an Origin-Agent-Cluster: ?0 header along with the HTTP response for the document and frames. See https://developer.chrome.com/blog/immutable-document-domain/ for more details."},"generated/Deprecation.ts | DOMMutationEvents":{"message":"DOM Mutation Events, including DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMNodeInsertedIntoDocument, and DOMCharacterDataModified are deprecated (https://w3c.github.io/uievents/#legacy-event-types) and will be removed. Please use MutationObserver instead."},"generated/Deprecation.ts | ExpectCTHeader":{"message":"The Expect-CT header is deprecated and will be removed. Chrome requires Certificate Transparency for all publicly trusted certificates issued after April 30, 2018."},"generated/Deprecation.ts | GeolocationInsecureOrigin":{"message":"getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GeolocationInsecureOriginDeprecatedNotRemoved":{"message":"getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GetUserMediaInsecureOrigin":{"message":"getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | HostCandidateAttributeGetter":{"message":"RTCPeerConnectionIceErrorEvent.hostCandidate is deprecated. Please use RTCPeerConnectionIceErrorEvent.address or RTCPeerConnectionIceErrorEvent.port instead."},"generated/Deprecation.ts | IdentityInCanMakePaymentEvent":{"message":"The merchant origin and arbitrary data from the canmakepayment service worker event are deprecated and will be removed: topOrigin, paymentRequestOrigin, methodData, modifiers."},"generated/Deprecation.ts | InsecurePrivateNetworkSubresourceRequest":{"message":"The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them."},"generated/Deprecation.ts | InterestGroupDailyUpdateUrl":{"message":"The dailyUpdateUrl field of InterestGroups passed to joinAdInterestGroup() has been renamed to updateUrl, to more accurately reflect its behavior."},"generated/Deprecation.ts | LocalCSSFileExtensionRejected":{"message":"CSS cannot be loaded from file: URLs unless they end in a .css file extension."},"generated/Deprecation.ts | MediaSourceAbortRemove":{"message":"Using SourceBuffer.abort() to abort remove()'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the updateend event instead. abort() is intended to only abort an asynchronous media append or reset parser state."},"generated/Deprecation.ts | MediaSourceDurationTruncatingBuffered":{"message":"Setting MediaSource.duration below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration."},"generated/Deprecation.ts | NonStandardDeclarativeShadowDOM":{"message":"The older, non-standardized shadowroot attribute is deprecated, and will *no longer function* in M119. Please use the new, standardized shadowrootmode attribute instead."},"generated/Deprecation.ts | NoSysexWebMIDIWithoutPermission":{"message":"Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions."},"generated/Deprecation.ts | NotificationInsecureOrigin":{"message":"The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | NotificationPermissionRequestedIframe":{"message":"Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead."},"generated/Deprecation.ts | ObsoleteCreateImageBitmapImageOrientationNone":{"message":"Option imageOrientation: 'none' in createImageBitmap is deprecated. Please use createImageBitmap with option {imageOrientation: 'from-image'} instead."},"generated/Deprecation.ts | ObsoleteWebRtcCipherSuite":{"message":"Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed."},"generated/Deprecation.ts | OverflowVisibleOnReplacedElement":{"message":"Specifying overflow: visible on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md."},"generated/Deprecation.ts | PaymentInstruments":{"message":"paymentManager.instruments is deprecated. Please use just-in-time install for payment handlers instead."},"generated/Deprecation.ts | PaymentRequestCSPViolation":{"message":"Your PaymentRequest call bypassed Content-Security-Policy (CSP) connect-src directive. This bypass is deprecated. Please add the payment method identifier from the PaymentRequest API (in supportedMethods field) to your CSP connect-src directive."},"generated/Deprecation.ts | PersistentQuotaType":{"message":"StorageType.persistent is deprecated. Please use standardized navigator.storage instead."},"generated/Deprecation.ts | PictureSourceSrc":{"message":" with a parent is invalid and therefore ignored. Please use instead."},"generated/Deprecation.ts | PrefixedCancelAnimationFrame":{"message":"webkitCancelAnimationFrame is vendor-specific. Please use the standard cancelAnimationFrame instead."},"generated/Deprecation.ts | PrefixedRequestAnimationFrame":{"message":"webkitRequestAnimationFrame is vendor-specific. Please use the standard requestAnimationFrame instead."},"generated/Deprecation.ts | PrefixedVideoDisplayingFullscreen":{"message":"HTMLVideoElement.webkitDisplayingFullscreen is deprecated. Please use Document.fullscreenElement instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullscreen":{"message":"HTMLVideoElement.webkitEnterFullscreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullScreen":{"message":"HTMLVideoElement.webkitEnterFullScreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullscreen":{"message":"HTMLVideoElement.webkitExitFullscreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullScreen":{"message":"HTMLVideoElement.webkitExitFullScreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoSupportsFullscreen":{"message":"HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead."},"generated/Deprecation.ts | PrivacySandboxExtensionsAPI":{"message":"We're deprecating the API chrome.privacy.websites.privacySandboxEnabled, though it will remain active for backward compatibility until release M113. Instead, please use chrome.privacy.websites.topicsEnabled, chrome.privacy.websites.fledgeEnabled and chrome.privacy.websites.adMeasurementEnabled. See https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled."},"generated/Deprecation.ts | RangeExpand":{"message":"Range.expand() is deprecated. Please use Selection.modify() instead."},"generated/Deprecation.ts | RequestedSubresourceWithEmbeddedCredentials":{"message":"Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/) are blocked."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpFalse":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a false value for this constraint, which is interpreted as an attempt to use the removed SDES key negotiation method. This functionality is removed; use a service that supports DTLS key negotiation instead."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpTrue":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a true value for this constraint, which had no effect, but you can remove this constraint for tidiness."},"generated/Deprecation.ts | RTCPeerConnectionGetStatsLegacyNonCompliant":{"message":"The callback-based getStats() is deprecated and will be removed. Use the spec-compliant getStats() instead."},"generated/Deprecation.ts | RtcpMuxPolicyNegotiate":{"message":"The rtcpMuxPolicy option is deprecated and will be removed."},"generated/Deprecation.ts | SharedArrayBufferConstructedWithoutIsolation":{"message":"SharedArrayBuffer will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details."},"generated/Deprecation.ts | TextToSpeech_DisallowedByAutoplay":{"message":"speechSynthesis.speak() without user activation is deprecated and will be removed."},"generated/Deprecation.ts | V8SharedArrayBufferConstructedInExtensionWithoutIsolation":{"message":"Extensions should opt into cross-origin isolation to continue using SharedArrayBuffer. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/."},"generated/Deprecation.ts | WebSQL":{"message":"Web SQL is deprecated. Please use SQLite WebAssembly or Indexed Database"},"generated/Deprecation.ts | WindowPlacementPermissionDescriptorUsed":{"message":"The permission descriptor window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | WindowPlacementPermissionPolicyParsed":{"message":"The permission policy window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | XHRJSONEncodingDetection":{"message":"UTF-16 is not supported by response json in XMLHttpRequest"},"generated/Deprecation.ts | XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload":{"message":"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."},"generated/Deprecation.ts | XRSupportsSession":{"message":"supportsSession() is deprecated. Please use isSessionSupported() and check the resolved boolean value instead."},"models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile":{"message":"Unknown error loading file"},"models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete":{"message":"The debug information for function {PH1} is incomplete"},"models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin":{"message":"Error in debugger language plugin: {PH1}"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsFor":{"message":"[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction":{"message":"No debug information for function \"{PH1}\""},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt":{"message":"[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForFound":{"message":"[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsFor":{"message":"[{PH1}] Loading debug symbols for {PH2}..."},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia":{"message":"[{PH1}] Loading debug symbols for {PH2} (via {PH3})..."},"models/bindings/IgnoreListManager.ts | addAllContentScriptsToIgnoreList":{"message":"Add all extension scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addAllThirdPartyScriptsToIgnoreList":{"message":"Add all third-party scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addDirectoryToIgnoreList":{"message":"Add directory to ignore list"},"models/bindings/IgnoreListManager.ts | addScriptToIgnoreList":{"message":"Add script to ignore list"},"models/bindings/IgnoreListManager.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed":{"message":"LiveEdit compile failed: {PH1}"},"models/bindings/ResourceScriptMapping.ts | liveEditFailed":{"message":"LiveEdit failed: {PH1}"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeANumberOr":{"message":"Device pixel ratio must be a number or blank."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeGreater":{"message":"Device pixel ratio must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeLessThanOr":{"message":"Device pixel ratio must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeANumber":{"message":"Height must be a number."},"models/emulation/DeviceModeModel.ts | heightMustBeGreaterThanOrEqualTo":{"message":"Height must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeLessThanOrEqualToS":{"message":"Height must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeANumber":{"message":"Width must be a number."},"models/emulation/DeviceModeModel.ts | widthMustBeGreaterThanOrEqualToS":{"message":"Width must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeLessThanOrEqualToS":{"message":"Width must be less than or equal to {PH1}."},"models/emulation/EmulatedDevices.ts | laptopWithHiDPIScreen":{"message":"Laptop with HiDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithMDPIScreen":{"message":"Laptop with MDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithTouch":{"message":"Laptop with touch"},"models/har/Writer.ts | collectingContent":{"message":"Collecting content…"},"models/har/Writer.ts | writingFile":{"message":"Writing file…"},"models/issues_manager/BounceTrackingIssue.ts | bounceTrackingMitigations":{"message":"Bounce Tracking Mitigations"},"models/issues_manager/ClientHintIssue.ts | clientHintsInfrastructure":{"message":"Client Hints Infrastructure"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyEval":{"message":"Content Security Policy - Eval"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyInlineCode":{"message":"Content Security Policy - Inline Code"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicySource":{"message":"Content Security Policy - Source Allowlists"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesFixViolations":{"message":"Trusted Types - Fix violations"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesPolicyViolation":{"message":"Trusted Types - Policy violation"},"models/issues_manager/CookieIssue.ts | anInsecure":{"message":"an insecure"},"models/issues_manager/CookieIssue.ts | aSecure":{"message":"a secure"},"models/issues_manager/CookieIssue.ts | firstPartySetsExplained":{"message":"First-Party Sets and the SameParty attribute"},"models/issues_manager/CookieIssue.ts | howSchemefulSamesiteWorks":{"message":"How Schemeful Same-Site Works"},"models/issues_manager/CookieIssue.ts | samesiteCookiesExplained":{"message":"SameSite cookies explained"},"models/issues_manager/CorsIssue.ts | CORS":{"message":"Cross-Origin Resource Sharing (CORS)"},"models/issues_manager/CorsIssue.ts | corsPrivateNetworkAccess":{"message":"Private Network Access"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | coopAndCoep":{"message":"COOP and COEP"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | samesiteAndSameorigin":{"message":"Same-Site and Same-Origin"},"models/issues_manager/DeprecationIssue.ts | feature":{"message":"Check the feature status page for more details."},"models/issues_manager/DeprecationIssue.ts | milestone":{"message":"This change will go into effect with milestone {milestone}."},"models/issues_manager/DeprecationIssue.ts | title":{"message":"Deprecated Feature Used"},"models/issues_manager/FederatedAuthRequestIssue.ts | fedCm":{"message":"Federated Credential Management API"},"models/issues_manager/FederatedAuthUserInfoRequestIssue.ts | fedCmUserInfo":{"message":"Federated Credential Management User Info API"},"models/issues_manager/GenericIssue.ts | autocompleteAttributePageTitle":{"message":"HTML attribute: autocomplete"},"models/issues_manager/GenericIssue.ts | crossOriginPortalPostMessage":{"message":"Portals - Same-origin communication channels"},"models/issues_manager/GenericIssue.ts | howDoesAutofillWorkPageTitle":{"message":"How does autofill work?"},"models/issues_manager/GenericIssue.ts | inputFormElementPageTitle":{"message":"The form input element"},"models/issues_manager/GenericIssue.ts | labelFormlementsPageTitle":{"message":"The label elements"},"models/issues_manager/HeavyAdIssue.ts | handlingHeavyAdInterventions":{"message":"Handling Heavy Ad Interventions"},"models/issues_manager/Issue.ts | breakingChangeIssue":{"message":"A breaking change issue: the page may stop working in an upcoming version of Chrome"},"models/issues_manager/Issue.ts | breakingChanges":{"message":"Breaking Changes"},"models/issues_manager/Issue.ts | improvementIssue":{"message":"An improvement issue: there is an opportunity to improve the page"},"models/issues_manager/Issue.ts | improvements":{"message":"Improvements"},"models/issues_manager/Issue.ts | pageErrorIssue":{"message":"A page error issue: the page is not working correctly"},"models/issues_manager/Issue.ts | pageErrors":{"message":"Page Errors"},"models/issues_manager/LowTextContrastIssue.ts | colorAndContrastAccessibility":{"message":"Color and contrast accessibility"},"models/issues_manager/MixedContentIssue.ts | preventingMixedContent":{"message":"Preventing mixed content"},"models/issues_manager/QuirksModeIssue.ts | documentCompatibilityMode":{"message":"Document compatibility mode"},"models/issues_manager/SharedArrayBufferIssue.ts | enablingSharedArrayBuffer":{"message":"Enabling SharedArrayBuffer"},"models/logs/logs-meta.ts | clear":{"message":"clear"},"models/logs/logs-meta.ts | doNotPreserveLogOnPageReload":{"message":"Do not preserve log on page reload / navigation"},"models/logs/logs-meta.ts | preserve":{"message":"preserve"},"models/logs/logs-meta.ts | preserveLog":{"message":"Preserve log"},"models/logs/logs-meta.ts | preserveLogOnPageReload":{"message":"Preserve log on page reload / navigation"},"models/logs/logs-meta.ts | recordNetworkLog":{"message":"Record network log"},"models/logs/logs-meta.ts | reset":{"message":"reset"},"models/logs/NetworkLog.ts | anonymous":{"message":""},"models/persistence/EditFileSystemView.ts | add":{"message":"Add"},"models/persistence/EditFileSystemView.ts | enterAPath":{"message":"Enter a path"},"models/persistence/EditFileSystemView.ts | enterAUniquePath":{"message":"Enter a unique path"},"models/persistence/EditFileSystemView.ts | excludedFolders":{"message":"Excluded folders"},"models/persistence/EditFileSystemView.ts | folderPath":{"message":"Folder path"},"models/persistence/EditFileSystemView.ts | none":{"message":"None"},"models/persistence/EditFileSystemView.ts | sViaDevtools":{"message":"{PH1} (via .devtools)"},"models/persistence/IsolatedFileSystem.ts | blobCouldNotBeLoaded":{"message":"Blob could not be loaded."},"models/persistence/IsolatedFileSystem.ts | cantReadFileSS":{"message":"Can't read file: {PH1}: {PH2}"},"models/persistence/IsolatedFileSystem.ts | fileSystemErrorS":{"message":"File system error: {PH1}"},"models/persistence/IsolatedFileSystem.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/IsolatedFileSystem.ts | unknownErrorReadingFileS":{"message":"Unknown error reading file: {PH1}"},"models/persistence/IsolatedFileSystemManager.ts | unableToAddFilesystemS":{"message":"Unable to add filesystem: {PH1}"},"models/persistence/persistence-meta.ts | disableOverrideNetworkRequests":{"message":"Disable override network requests"},"models/persistence/persistence-meta.ts | enableLocalOverrides":{"message":"Enable Local Overrides"},"models/persistence/persistence-meta.ts | enableOverrideNetworkRequests":{"message":"Enable override network requests"},"models/persistence/persistence-meta.ts | interception":{"message":"interception"},"models/persistence/persistence-meta.ts | network":{"message":"network"},"models/persistence/persistence-meta.ts | override":{"message":"override"},"models/persistence/persistence-meta.ts | request":{"message":"request"},"models/persistence/persistence-meta.ts | rewrite":{"message":"rewrite"},"models/persistence/persistence-meta.ts | showWorkspace":{"message":"Show Workspace"},"models/persistence/persistence-meta.ts | workspace":{"message":"Workspace"},"models/persistence/PersistenceActions.ts | openInContainingFolder":{"message":"Open in containing folder"},"models/persistence/PersistenceActions.ts | saveAs":{"message":"Save as..."},"models/persistence/PersistenceActions.ts | saveForOverrides":{"message":"Save for overrides"},"models/persistence/PersistenceActions.ts | saveImage":{"message":"Save image"},"models/persistence/PersistenceUtils.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/PersistenceUtils.ts | linkedToSourceMapS":{"message":"Linked to source map: {PH1}"},"models/persistence/PlatformFileSystem.ts | unableToReadFilesWithThis":{"message":"PlatformFileSystem cannot read files."},"models/persistence/WorkspaceSettingsTab.ts | addFolder":{"message":"Add folder…"},"models/persistence/WorkspaceSettingsTab.ts | folderExcludePattern":{"message":"Folder exclude pattern"},"models/persistence/WorkspaceSettingsTab.ts | mappingsAreInferredAutomatically":{"message":"Mappings are inferred automatically."},"models/persistence/WorkspaceSettingsTab.ts | remove":{"message":"Remove"},"models/persistence/WorkspaceSettingsTab.ts | workspace":{"message":"Workspace"},"models/timeline_model/TimelineJSProfile.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | bidderWorklet":{"message":"Bidder Worklet"},"models/timeline_model/TimelineModel.ts | bidderWorkletS":{"message":"Bidder Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | dedicatedWorker":{"message":"Dedicated Worker"},"models/timeline_model/TimelineModel.ts | sellerWorklet":{"message":"Seller Worklet"},"models/timeline_model/TimelineModel.ts | sellerWorkletS":{"message":"Seller Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | unknownWorklet":{"message":"Auction Worklet"},"models/timeline_model/TimelineModel.ts | unknownWorkletS":{"message":"Auction Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | workerS":{"message":"Worker — {PH1}"},"models/timeline_model/TimelineModel.ts | workerSS":{"message":"Worker: {PH1} — {PH2}"},"models/timeline_model/TimelineModel.ts | workletService":{"message":"Auction Worklet Service"},"models/timeline_model/TimelineModel.ts | workletServiceS":{"message":"Auction Worklet Service — {PH1}"},"models/workspace/UISourceCode.ts | index":{"message":"(index)"},"models/workspace/UISourceCode.ts | thisFileWasChangedExternally":{"message":"This file was changed externally. Would you like to reload it?"},"panels/accessibility/accessibility-meta.ts | accessibility":{"message":"Accessibility"},"panels/accessibility/accessibility-meta.ts | shoAccessibility":{"message":"Show Accessibility"},"panels/accessibility/AccessibilityNodeView.ts | accessibilityNodeNotExposed":{"message":"Accessibility node not exposed"},"panels/accessibility/AccessibilityNodeView.ts | ancestorChildrenAreAll":{"message":"Ancestor's children are all presentational: "},"panels/accessibility/AccessibilityNodeView.ts | computedProperties":{"message":"Computed Properties"},"panels/accessibility/AccessibilityNodeView.ts | elementHasEmptyAltText":{"message":"Element has empty alt text."},"panels/accessibility/AccessibilityNodeView.ts | elementHasPlaceholder":{"message":"Element has {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsHiddenBy":{"message":"Element is hidden by active modal dialog: "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInAnInertSubTree":{"message":"Element is in an inert subtree from "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInert":{"message":"Element is inert."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotRendered":{"message":"Element is not rendered."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotVisible":{"message":"Element is not visible."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPlaceholder":{"message":"Element is {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPresentational":{"message":"Element is presentational."},"panels/accessibility/AccessibilityNodeView.ts | elementNotInteresting":{"message":"Element not interesting for accessibility."},"panels/accessibility/AccessibilityNodeView.ts | elementsInheritsPresentational":{"message":"Element inherits presentational role from "},"panels/accessibility/AccessibilityNodeView.ts | invalidSource":{"message":"Invalid source."},"panels/accessibility/AccessibilityNodeView.ts | labelFor":{"message":"Label for "},"panels/accessibility/AccessibilityNodeView.ts | noAccessibilityNode":{"message":"No accessibility node"},"panels/accessibility/AccessibilityNodeView.ts | noNodeWithThisId":{"message":"No node with this ID."},"panels/accessibility/AccessibilityNodeView.ts | noTextContent":{"message":"No text content."},"panels/accessibility/AccessibilityNodeView.ts | notSpecified":{"message":"Not specified"},"panels/accessibility/AccessibilityNodeView.ts | partOfLabelElement":{"message":"Part of label element: "},"panels/accessibility/AccessibilityNodeView.ts | placeholderIsPlaceholderOnAncestor":{"message":"{PH1} is {PH2} on ancestor: "},"panels/accessibility/AccessibilityStrings.ts | activeDescendant":{"message":"Active descendant"},"panels/accessibility/AccessibilityStrings.ts | aHumanreadableVersionOfTheValue":{"message":"A human-readable version of the value of a range widget (where necessary)."},"panels/accessibility/AccessibilityStrings.ts | atomicLiveRegions":{"message":"Atomic (live regions)"},"panels/accessibility/AccessibilityStrings.ts | busyLiveRegions":{"message":"Busy (live regions)"},"panels/accessibility/AccessibilityStrings.ts | canSetValue":{"message":"Can set value"},"panels/accessibility/AccessibilityStrings.ts | checked":{"message":"Checked"},"panels/accessibility/AccessibilityStrings.ts | contents":{"message":"Contents"},"panels/accessibility/AccessibilityStrings.ts | controls":{"message":"Controls"},"panels/accessibility/AccessibilityStrings.ts | describedBy":{"message":"Described by"},"panels/accessibility/AccessibilityStrings.ts | description":{"message":"Description"},"panels/accessibility/AccessibilityStrings.ts | disabled":{"message":"Disabled"},"panels/accessibility/AccessibilityStrings.ts | editable":{"message":"Editable"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichFormThe":{"message":"Element or elements which form the description of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichMayFormThe":{"message":"Element or elements which may form the name of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichShouldBe":{"message":"Element or elements which should be considered descendants of this element, despite not being descendants in the DOM."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhoseContentOr":{"message":"Element or elements whose content or presence is/are controlled by this widget."},"panels/accessibility/AccessibilityStrings.ts | elementToWhichTheUserMayChooseTo":{"message":"Element to which the user may choose to navigate after this one, instead of the next element in the DOM order."},"panels/accessibility/AccessibilityStrings.ts | expanded":{"message":"Expanded"},"panels/accessibility/AccessibilityStrings.ts | focusable":{"message":"Focusable"},"panels/accessibility/AccessibilityStrings.ts | focused":{"message":"Focused"},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMaximumAllowed":{"message":"For a range widget, the maximum allowed value."},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMinimumAllowed":{"message":"For a range widget, the minimum allowed value."},"panels/accessibility/AccessibilityStrings.ts | fromAttribute":{"message":"From attribute"},"panels/accessibility/AccessibilityStrings.ts | fromCaption":{"message":"From caption"},"panels/accessibility/AccessibilityStrings.ts | fromDescription":{"message":"From description"},"panels/accessibility/AccessibilityStrings.ts | fromLabel":{"message":"From label"},"panels/accessibility/AccessibilityStrings.ts | fromLabelFor":{"message":"From label (for= attribute)"},"panels/accessibility/AccessibilityStrings.ts | fromLabelWrapped":{"message":"From label (wrapped)"},"panels/accessibility/AccessibilityStrings.ts | fromLegend":{"message":"From legend"},"panels/accessibility/AccessibilityStrings.ts | fromNativeHtml":{"message":"From native HTML"},"panels/accessibility/AccessibilityStrings.ts | fromPlaceholderAttribute":{"message":"From placeholder attribute"},"panels/accessibility/AccessibilityStrings.ts | fromRubyAnnotation":{"message":"From ruby annotation"},"panels/accessibility/AccessibilityStrings.ts | fromStyle":{"message":"From style"},"panels/accessibility/AccessibilityStrings.ts | fromTitle":{"message":"From title"},"panels/accessibility/AccessibilityStrings.ts | hasAutocomplete":{"message":"Has autocomplete"},"panels/accessibility/AccessibilityStrings.ts | hasPopup":{"message":"Has popup"},"panels/accessibility/AccessibilityStrings.ts | help":{"message":"Help"},"panels/accessibility/AccessibilityStrings.ts | ifAndHowThisElementCanBeEdited":{"message":"If and how this element can be edited."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLive":{"message":"If this element may receive live updates, whether the entire live region should be presented to the user on changes, or only changed nodes."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdates":{"message":"If this element may receive live updates, what type of updates should trigger a notification."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdatesThe":{"message":"If this element may receive live updates, the root element of the containing live region."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCanReceiveFocus":{"message":"If true, this element can receive focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyCannot":{"message":"If true, this element currently cannot be interacted with."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyHas":{"message":"If true, this element currently has focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementMayBeInteracted":{"message":"If true, this element may be interacted with, but its value cannot be changed."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementsUserentered":{"message":"If true, this element's user-entered value does not conform to validation requirement."},"panels/accessibility/AccessibilityStrings.ts | implicit":{"message":"Implicit"},"panels/accessibility/AccessibilityStrings.ts | implicitValue":{"message":"Implicit value."},"panels/accessibility/AccessibilityStrings.ts | indicatesThePurposeOfThisElement":{"message":"Indicates the purpose of this element, such as a user interface idiom for a widget, or structural role within a document."},"panels/accessibility/AccessibilityStrings.ts | invalidUserEntry":{"message":"Invalid user entry"},"panels/accessibility/AccessibilityStrings.ts | labeledBy":{"message":"Labeled by"},"panels/accessibility/AccessibilityStrings.ts | level":{"message":"Level"},"panels/accessibility/AccessibilityStrings.ts | liveRegion":{"message":"Live region"},"panels/accessibility/AccessibilityStrings.ts | liveRegionRoot":{"message":"Live region root"},"panels/accessibility/AccessibilityStrings.ts | maximumValue":{"message":"Maximum value"},"panels/accessibility/AccessibilityStrings.ts | minimumValue":{"message":"Minimum value"},"panels/accessibility/AccessibilityStrings.ts | multiline":{"message":"Multi-line"},"panels/accessibility/AccessibilityStrings.ts | multiselectable":{"message":"Multi-selectable"},"panels/accessibility/AccessibilityStrings.ts | orientation":{"message":"Orientation"},"panels/accessibility/AccessibilityStrings.ts | pressed":{"message":"Pressed"},"panels/accessibility/AccessibilityStrings.ts | readonlyString":{"message":"Read-only"},"panels/accessibility/AccessibilityStrings.ts | relatedElement":{"message":"Related element"},"panels/accessibility/AccessibilityStrings.ts | relevantLiveRegions":{"message":"Relevant (live regions)"},"panels/accessibility/AccessibilityStrings.ts | requiredString":{"message":"Required"},"panels/accessibility/AccessibilityStrings.ts | role":{"message":"Role"},"panels/accessibility/AccessibilityStrings.ts | selectedString":{"message":"Selected"},"panels/accessibility/AccessibilityStrings.ts | theAccessibleDescriptionForThis":{"message":"The accessible description for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedHelpTextForThis":{"message":"The computed help text for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedNameOfThisElement":{"message":"The computed name of this element."},"panels/accessibility/AccessibilityStrings.ts | theDescendantOfThisElementWhich":{"message":"The descendant of this element which is active; i.e. the element to which focus should be delegated."},"panels/accessibility/AccessibilityStrings.ts | theHierarchicalLevelOfThis":{"message":"The hierarchical level of this element."},"panels/accessibility/AccessibilityStrings.ts | theValueOfThisElementThisMayBe":{"message":"The value of this element; this may be user-provided or developer-provided, depending on the element."},"panels/accessibility/AccessibilityStrings.ts | value":{"message":"Value"},"panels/accessibility/AccessibilityStrings.ts | valueDescription":{"message":"Value description"},"panels/accessibility/AccessibilityStrings.ts | valueFromAttribute":{"message":"Value from attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromDescriptionElement":{"message":"Value from description element."},"panels/accessibility/AccessibilityStrings.ts | valueFromElementContents":{"message":"Value from element contents."},"panels/accessibility/AccessibilityStrings.ts | valueFromFigcaptionElement":{"message":"Value from figcaption element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElement":{"message":"Value from label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWithFor":{"message":"Value from label element with for= attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWrapped":{"message":"Value from a wrapping label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLegendElement":{"message":"Value from legend element."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlRuby":{"message":"Value from plain HTML ruby annotation."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlUnknownSource":{"message":"Value from native HTML (unknown source)."},"panels/accessibility/AccessibilityStrings.ts | valueFromPlaceholderAttribute":{"message":"Value from placeholder attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromRelatedElement":{"message":"Value from related element."},"panels/accessibility/AccessibilityStrings.ts | valueFromStyle":{"message":"Value from style."},"panels/accessibility/AccessibilityStrings.ts | valueFromTableCaption":{"message":"Value from table caption."},"panels/accessibility/AccessibilityStrings.ts | valueFromTitleAttribute":{"message":"Value from title attribute."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatPriorityOfLive":{"message":"Whether and what priority of live updates may be expected for this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatTypeOfAutocomplete":{"message":"Whether and what type of autocomplete suggestions are currently provided by this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAUserMaySelectMoreThanOne":{"message":"Whether a user may select more than one option from this widget."},"panels/accessibility/AccessibilityStrings.ts | whetherTheOptionRepresentedBy":{"message":"Whether the option represented by this element is currently selected."},"panels/accessibility/AccessibilityStrings.ts | whetherTheValueOfThisElementCan":{"message":"Whether the value of this element can be set."},"panels/accessibility/AccessibilityStrings.ts | whetherThisCheckboxRadioButtonOr":{"message":"Whether this checkbox, radio button or tree item is checked, unchecked, or mixed (e.g. has both checked and un-checked children)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementHasCausedSome":{"message":"Whether this element has caused some kind of pop-up (such as a menu) to appear."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementIsARequired":{"message":"Whether this element is a required field in a form."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrAnother":{"message":"Whether this element, or another grouping element it controls, is expanded."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrItsSubtree":{"message":"Whether this element or its subtree are currently being updated (and thus may be in an inconsistent state)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisLinearElements":{"message":"Whether this linear element's orientation is horizontal or vertical."},"panels/accessibility/AccessibilityStrings.ts | whetherThisTextBoxMayHaveMore":{"message":"Whether this text box may have more than one line."},"panels/accessibility/AccessibilityStrings.ts | whetherThisToggleButtonIs":{"message":"Whether this toggle button is currently in a pressed state."},"panels/accessibility/ARIAAttributesView.ts | ariaAttributes":{"message":"ARIA Attributes"},"panels/accessibility/ARIAAttributesView.ts | noAriaAttributes":{"message":"No ARIA attributes"},"panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree":{"message":"Accessibility Tree"},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription":{"message":"The accessibility tree moved to the top right corner of the DOM tree."},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName":{"message":"Enable full-page accessibility tree"},"panels/accessibility/AXBreadcrumbsPane.ts | ignored":{"message":"Ignored"},"panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired":{"message":"Reload required before the change takes effect."},"panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView":{"message":"Scroll into view"},"panels/accessibility/SourceOrderView.ts | noSourceOrderInformation":{"message":"No source order information available"},"panels/accessibility/SourceOrderView.ts | showSourceOrder":{"message":"Show source order"},"panels/accessibility/SourceOrderView.ts | sourceOrderViewer":{"message":"Source Order Viewer"},"panels/accessibility/SourceOrderView.ts | thereMayBeADelayInDisplaying":{"message":"There may be a delay in displaying source order for elements with many children"},"panels/animation/animation-meta.ts | animations":{"message":"Animations"},"panels/animation/animation-meta.ts | showAnimations":{"message":"Show Animations"},"panels/animation/AnimationTimeline.ts | animationPreviews":{"message":"Animation previews"},"panels/animation/AnimationTimeline.ts | animationPreviewS":{"message":"Animation Preview {PH1}"},"panels/animation/AnimationTimeline.ts | clearAll":{"message":"Clear all"},"panels/animation/AnimationTimeline.ts | pause":{"message":"Pause"},"panels/animation/AnimationTimeline.ts | pauseAll":{"message":"Pause all"},"panels/animation/AnimationTimeline.ts | pauseTimeline":{"message":"Pause timeline"},"panels/animation/AnimationTimeline.ts | playbackRatePlaceholder":{"message":"{PH1}%"},"panels/animation/AnimationTimeline.ts | playbackRates":{"message":"Playback rates"},"panels/animation/AnimationTimeline.ts | playTimeline":{"message":"Play timeline"},"panels/animation/AnimationTimeline.ts | replayTimeline":{"message":"Replay timeline"},"panels/animation/AnimationTimeline.ts | resumeAll":{"message":"Resume all"},"panels/animation/AnimationTimeline.ts | selectAnEffectAboveToInspectAnd":{"message":"Select an effect above to inspect and modify."},"panels/animation/AnimationTimeline.ts | setSpeedToS":{"message":"Set speed to {PH1}"},"panels/animation/AnimationTimeline.ts | waitingForAnimations":{"message":"Waiting for animations..."},"panels/animation/AnimationUI.ts | animationEndpointSlider":{"message":"Animation Endpoint slider"},"panels/animation/AnimationUI.ts | animationKeyframeSlider":{"message":"Animation Keyframe slider"},"panels/animation/AnimationUI.ts | sSlider":{"message":"{PH1} slider"},"panels/application/application-meta.ts | application":{"message":"Application"},"panels/application/application-meta.ts | clearSiteData":{"message":"Clear site data"},"panels/application/application-meta.ts | clearSiteDataIncludingThirdparty":{"message":"Clear site data (including third-party cookies)"},"panels/application/application-meta.ts | pwa":{"message":"pwa"},"panels/application/application-meta.ts | showApplication":{"message":"Show Application"},"panels/application/application-meta.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/application-meta.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/ApplicationPanelSidebar.ts | application":{"message":"Application"},"panels/application/ApplicationPanelSidebar.ts | applicationSidebarPanel":{"message":"Application panel sidebar"},"panels/application/ApplicationPanelSidebar.ts | appManifest":{"message":"App Manifest"},"panels/application/ApplicationPanelSidebar.ts | backgroundServices":{"message":"Background Services"},"panels/application/ApplicationPanelSidebar.ts | beforeInvokeAlert":{"message":"{PH1}: Invoke to scroll to this section in manifest"},"panels/application/ApplicationPanelSidebar.ts | clear":{"message":"Clear"},"panels/application/ApplicationPanelSidebar.ts | cookies":{"message":"Cookies"},"panels/application/ApplicationPanelSidebar.ts | cookiesUsedByFramesFromS":{"message":"Cookies used by frames from {PH1}"},"panels/application/ApplicationPanelSidebar.ts | documentNotAvailable":{"message":"Document not available"},"panels/application/ApplicationPanelSidebar.ts | frames":{"message":"Frames"},"panels/application/ApplicationPanelSidebar.ts | indexeddb":{"message":"IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | keyPathS":{"message":"Key path: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | localFiles":{"message":"Local Files"},"panels/application/ApplicationPanelSidebar.ts | localStorage":{"message":"Local Storage"},"panels/application/ApplicationPanelSidebar.ts | manifest":{"message":"Manifest"},"panels/application/ApplicationPanelSidebar.ts | noManifestDetected":{"message":"No manifest detected"},"panels/application/ApplicationPanelSidebar.ts | onInvokeAlert":{"message":"Scrolled to {PH1}"},"panels/application/ApplicationPanelSidebar.ts | onInvokeManifestAlert":{"message":"Manifest: Invoke to scroll to the top of manifest"},"panels/application/ApplicationPanelSidebar.ts | openedWindows":{"message":"Opened Windows"},"panels/application/ApplicationPanelSidebar.ts | preloading":{"message":"Preloading"},"panels/application/ApplicationPanelSidebar.ts | refreshIndexeddb":{"message":"Refresh IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | sessionStorage":{"message":"Session Storage"},"panels/application/ApplicationPanelSidebar.ts | storage":{"message":"Storage"},"panels/application/ApplicationPanelSidebar.ts | theContentOfThisDocumentHasBeen":{"message":"The content of this document has been generated dynamically via 'document.write()'."},"panels/application/ApplicationPanelSidebar.ts | versionS":{"message":"Version: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | versionSEmpty":{"message":"Version: {PH1} (empty)"},"panels/application/ApplicationPanelSidebar.ts | webSql":{"message":"Web SQL"},"panels/application/ApplicationPanelSidebar.ts | webWorkers":{"message":"Web Workers"},"panels/application/ApplicationPanelSidebar.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/ApplicationPanelSidebar.ts | worker":{"message":"worker"},"panels/application/AppManifestView.ts | actualHeightSpxOfSSDoesNotMatch":{"message":"Actual height ({PH1}px) of {PH2} {PH3} does not match specified height ({PH4}px)"},"panels/application/AppManifestView.ts | actualSizeSspxOfSSDoesNotMatch":{"message":"Actual size ({PH1}×{PH2})px of {PH3} {PH4} does not match specified size ({PH5}×{PH6}px)"},"panels/application/AppManifestView.ts | actualWidthSpxOfSSDoesNotMatch":{"message":"Actual width ({PH1}px) of {PH2} {PH3} does not match specified width ({PH4}px)"},"panels/application/AppManifestView.ts | appIdExplainer":{"message":"This is used by the browser to know whether the manifest should be updating an existing application, or whether it refers to a new web app that can be installed."},"panels/application/AppManifestView.ts | appIdNote":{"message":"{PH1} {PH2} is not specified in the manifest, {PH3} is used instead. To specify an App Id that matches the current identity, set the {PH4} field to {PH5} {PH6}."},"panels/application/AppManifestView.ts | aUrlInTheManifestContainsA":{"message":"A URL in the manifest contains a username, password, or port"},"panels/application/AppManifestView.ts | avoidPurposeAnyAndMaskable":{"message":"Declaring an icon with 'purpose: \"any maskable\"' is discouraged. It is likely to look incorrect on some platforms due to too much or too little padding."},"panels/application/AppManifestView.ts | backgroundColor":{"message":"Background color"},"panels/application/AppManifestView.ts | computedAppId":{"message":"Computed App Id"},"panels/application/AppManifestView.ts | copiedToClipboard":{"message":"Copied suggested ID {PH1} to clipboard"},"panels/application/AppManifestView.ts | copyToClipboard":{"message":"Copy to clipboard"},"panels/application/AppManifestView.ts | couldNotCheckServiceWorker":{"message":"Could not check service worker without a 'start_url' field in the manifest"},"panels/application/AppManifestView.ts | couldNotDownloadARequiredIcon":{"message":"Could not download a required icon from the manifest"},"panels/application/AppManifestView.ts | customizePwaTitleBar":{"message":"Customize the window controls overlay of your PWA's title bar."},"panels/application/AppManifestView.ts | darkBackgroundColor":{"message":"Dark background color"},"panels/application/AppManifestView.ts | darkThemeColor":{"message":"Dark theme color"},"panels/application/AppManifestView.ts | description":{"message":"Description"},"panels/application/AppManifestView.ts | descriptionMayBeTruncated":{"message":"Description may be truncated."},"panels/application/AppManifestView.ts | display":{"message":"Display"},"panels/application/AppManifestView.ts | displayOverride":{"message":"display-override"},"panels/application/AppManifestView.ts | documentationOnMaskableIcons":{"message":"documentation on maskable icons"},"panels/application/AppManifestView.ts | downloadedIconWasEmptyOr":{"message":"Downloaded icon was empty or corrupted"},"panels/application/AppManifestView.ts | errorsAndWarnings":{"message":"Errors and warnings"},"panels/application/AppManifestView.ts | icon":{"message":"Icon"},"panels/application/AppManifestView.ts | icons":{"message":"Icons"},"panels/application/AppManifestView.ts | identity":{"message":"Identity"},"panels/application/AppManifestView.ts | imageFromS":{"message":"Image from {PH1}"},"panels/application/AppManifestView.ts | installability":{"message":"Installability"},"panels/application/AppManifestView.ts | learnMore":{"message":"Learn more"},"panels/application/AppManifestView.ts | manifestContainsDisplayoverride":{"message":"Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestCouldNotBeFetchedIsEmpty":{"message":"Manifest could not be fetched, is empty, or could not be parsed"},"panels/application/AppManifestView.ts | manifestDisplayPropertyMustBeOne":{"message":"Manifest 'display' property must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestDoesNotContainANameOr":{"message":"Manifest does not contain a 'name' or 'short_name' field"},"panels/application/AppManifestView.ts | manifestDoesNotContainASuitable":{"message":"Manifest does not contain a suitable icon - PNG, SVG or WebP format of at least {PH1}px is required, the 'sizes' attribute must be set, and the 'purpose' attribute, if set, must include 'any'."},"panels/application/AppManifestView.ts | manifestSpecifies":{"message":"Manifest specifies 'prefer_related_applications: true'"},"panels/application/AppManifestView.ts | manifestStartUrlIsNotValid":{"message":"Manifest 'start_URL' is not valid"},"panels/application/AppManifestView.ts | name":{"message":"Name"},"panels/application/AppManifestView.ts | needHelpReadOurS":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | newNoteUrl":{"message":"New note URL"},"panels/application/AppManifestView.ts | noPlayStoreIdProvided":{"message":"No Play store ID provided"},"panels/application/AppManifestView.ts | noSuppliedIconIsAtLeastSpxSquare":{"message":"No supplied icon is at least {PH1} pixels square in PNG, SVG or WebP format, with the purpose attribute unset or set to 'any'."},"panels/application/AppManifestView.ts | note":{"message":"Note:"},"panels/application/AppManifestView.ts | orientation":{"message":"Orientation"},"panels/application/AppManifestView.ts | pageDoesNotWorkOffline":{"message":"Page does not work offline"},"panels/application/AppManifestView.ts | pageDoesNotWorkOfflineThePage":{"message":"Page does not work offline. Starting in Chrome 93, the installability criteria are changing, and this site will not be installable. See {PH1} for more information."},"panels/application/AppManifestView.ts | pageHasNoManifestLinkUrl":{"message":"Page has no manifest URL"},"panels/application/AppManifestView.ts | pageIsLoadedInAnIncognitoWindow":{"message":"Page is loaded in an incognito window"},"panels/application/AppManifestView.ts | pageIsNotLoadedInTheMainFrame":{"message":"Page is not loaded in the main frame"},"panels/application/AppManifestView.ts | pageIsNotServedFromASecureOrigin":{"message":"Page is not served from a secure origin"},"panels/application/AppManifestView.ts | preferrelatedapplicationsIsOnly":{"message":"'prefer_related_applications' is only supported on Chrome Beta and Stable channels on Android."},"panels/application/AppManifestView.ts | presentation":{"message":"Presentation"},"panels/application/AppManifestView.ts | protocolHandlers":{"message":"Protocol Handlers"},"panels/application/AppManifestView.ts | screenshot":{"message":"Screenshot"},"panels/application/AppManifestView.ts | screenshotPixelSize":{"message":"Screenshot {url} should specify a pixel size [width]x[height] instead of \"any\" as first size."},"panels/application/AppManifestView.ts | screenshotS":{"message":"Screenshot #{PH1}"},"panels/application/AppManifestView.ts | shortcutS":{"message":"Shortcut #{PH1}"},"panels/application/AppManifestView.ts | shortcutSShouldIncludeAXPixel":{"message":"Shortcut #{PH1} should include a 96x96 pixel icon"},"panels/application/AppManifestView.ts | shortName":{"message":"Short name"},"panels/application/AppManifestView.ts | showOnlyTheMinimumSafeAreaFor":{"message":"Show only the minimum safe area for maskable icons"},"panels/application/AppManifestView.ts | sSDoesNotSpecifyItsSizeInThe":{"message":"{PH1} {PH2} does not specify its size in the manifest"},"panels/application/AppManifestView.ts | sSFailedToLoad":{"message":"{PH1} {PH2} failed to load"},"panels/application/AppManifestView.ts | sSHeightDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} height can't be more than 2.3 times as long as the width"},"panels/application/AppManifestView.ts | sSrcIsNotSet":{"message":"{PH1} 'src' is not set"},"panels/application/AppManifestView.ts | sSShouldHaveSquareIcon":{"message":"Most operating systems require square icons. Please include at least one square icon in the array."},"panels/application/AppManifestView.ts | sSShouldSpecifyItsSizeAs":{"message":"{PH1} {PH2} should specify its size as [width]x[height]"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtLeast320":{"message":"{PH1} {PH2} size should be at least 320×320"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtMost3840":{"message":"{PH1} {PH2} size should be at most 3840×3840"},"panels/application/AppManifestView.ts | sSWidthDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} width can't be more than 2.3 times as long as the height"},"panels/application/AppManifestView.ts | startUrl":{"message":"Start URL"},"panels/application/AppManifestView.ts | sUrlSFailedToParse":{"message":"{PH1} URL ''{PH2}'' failed to parse"},"panels/application/AppManifestView.ts | theAppIsAlreadyInstalled":{"message":"The app is already installed"},"panels/application/AppManifestView.ts | themeColor":{"message":"Theme color"},"panels/application/AppManifestView.ts | thePlayStoreAppUrlAndPlayStoreId":{"message":"The Play Store app URL and Play Store ID do not match"},"panels/application/AppManifestView.ts | theSpecifiedApplicationPlatform":{"message":"The specified application platform is not supported on Android"},"panels/application/AppManifestView.ts | wcoFound":{"message":"Chrome has successfully found the {PH1} value for the {PH2} field in the {PH3}."},"panels/application/AppManifestView.ts | wcoNeedHelpReadMore":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | wcoNotFound":{"message":"Define {PH1} in the manifest to use the Window Controls Overlay API and customize your app's title bar."},"panels/application/AppManifestView.ts | windowControlsOverlay":{"message":"Window Controls Overlay"},"panels/application/BackForwardCacheTreeElement.ts | backForwardCache":{"message":"Back/forward cache"},"panels/application/BackgroundServiceView.ts | backgroundFetch":{"message":"Background Fetch"},"panels/application/BackgroundServiceView.ts | backgroundServices":{"message":"Background Services"},"panels/application/BackgroundServiceView.ts | backgroundSync":{"message":"Background Sync"},"panels/application/BackgroundServiceView.ts | clear":{"message":"Clear"},"panels/application/BackgroundServiceView.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start recording."},"panels/application/BackgroundServiceView.ts | devtoolsWillRecordAllSActivity":{"message":"DevTools will record all {PH1} activity for up to 3 days, even when closed."},"panels/application/BackgroundServiceView.ts | empty":{"message":"empty"},"panels/application/BackgroundServiceView.ts | event":{"message":"Event"},"panels/application/BackgroundServiceView.ts | instanceId":{"message":"Instance ID"},"panels/application/BackgroundServiceView.ts | learnMore":{"message":"Learn more"},"panels/application/BackgroundServiceView.ts | noMetadataForThisEvent":{"message":"No metadata for this event"},"panels/application/BackgroundServiceView.ts | notifications":{"message":"Notifications"},"panels/application/BackgroundServiceView.ts | origin":{"message":"Origin"},"panels/application/BackgroundServiceView.ts | paymentHandler":{"message":"Payment Handler"},"panels/application/BackgroundServiceView.ts | periodicBackgroundSync":{"message":"Periodic Background Sync"},"panels/application/BackgroundServiceView.ts | pushMessaging":{"message":"Push Messaging"},"panels/application/BackgroundServiceView.ts | recordingSActivity":{"message":"Recording {PH1} activity..."},"panels/application/BackgroundServiceView.ts | saveEvents":{"message":"Save events"},"panels/application/BackgroundServiceView.ts | selectAnEntryToViewMetadata":{"message":"Select an entry to view metadata"},"panels/application/BackgroundServiceView.ts | showEventsForOtherStorageKeys":{"message":"Show events from other storage partitions"},"panels/application/BackgroundServiceView.ts | showEventsFromOtherDomains":{"message":"Show events from other domains"},"panels/application/BackgroundServiceView.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/BackgroundServiceView.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/BackgroundServiceView.ts | storageKey":{"message":"Storage Key"},"panels/application/BackgroundServiceView.ts | swScope":{"message":"Service Worker Scope"},"panels/application/BackgroundServiceView.ts | timestamp":{"message":"Timestamp"},"panels/application/BounceTrackingMitigationsTreeElement.ts | bounceTrackingMitigations":{"message":"Bounce Tracking Mitigations"},"panels/application/components/BackForwardCacheStrings.ts | appBanner":{"message":"Pages that requested an AppBanner are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabled":{"message":"Back/forward cache is disabled by flags. Visit chrome://flags/#back-forward-cache to enable it locally on this device."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByCommandLine":{"message":"Back/forward cache is disabled by the command line."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByLowMemory":{"message":"Back/forward cache is disabled due to insufficient memory."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForDelegate":{"message":"Back/forward cache is not supported by delegate."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForPrerender":{"message":"Back/forward cache is disabled for prerenderer."},"panels/application/components/BackForwardCacheStrings.ts | broadcastChannel":{"message":"The page cannot be cached because it has a BroadcastChannel instance with registered listeners."},"panels/application/components/BackForwardCacheStrings.ts | cacheControlNoStore":{"message":"Pages with cache-control:no-store header cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cacheFlushed":{"message":"The cache was intentionally cleared."},"panels/application/components/BackForwardCacheStrings.ts | cacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | containsPlugins":{"message":"Pages containing plugins are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileChooser":{"message":"Pages that use FileChooser API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileSystemAccess":{"message":"Pages that use File System Access API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaDevicesDispatcherHost":{"message":"Pages that use Media Device Dispatcher are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaPlay":{"message":"A media player was playing upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSession":{"message":"Pages that use MediaSession API and set a playback state are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService":{"message":"Pages that use MediaSession API and set action handlers are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentScreenReader":{"message":"Back/forward cache is disabled due to screen reader."},"panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler":{"message":"Pages that use SecurityHandler are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentSerial":{"message":"Pages that use Serial API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebAuthenticationAPI":{"message":"Pages that use WebAuthetication API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebBluetooth":{"message":"Pages that use WebBluetooth API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebUSB":{"message":"Pages that use WebUSB API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cookieDisabled":{"message":"Back/forward cache is disabled because cookies are disabled on a page that uses Cache-Control: no-store."},"panels/application/components/BackForwardCacheStrings.ts | dedicatedWorkerOrWorklet":{"message":"Pages that use a dedicated worker or worklet are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | documentLoaded":{"message":"The document did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager":{"message":"App Banner was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager":{"message":"Chrome Password Manager was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate":{"message":"DOM distillation was in progress upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource":{"message":"DOM Distiller Viewer was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging":{"message":"Back/forward cache is disabled due to extensions using messaging API."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort":{"message":"Extensions with long-lived connection should close the connection before entering back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions":{"message":"Back/forward cache is disabled due to extensions."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame":{"message":"Extensions with long-lived connection attempted to send messages to frames in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog":{"message":"Modal dialog such as form resubmission or http password dialog was shown for the page upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage":{"message":"The offline page was shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper":{"message":"Out-Of-Memory Intervention bar was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager":{"message":"There were permission requests upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper":{"message":"Popup blocker was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails":{"message":"Safe Browsing details were shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker":{"message":"Safe Browsing considered this page to be abusive and blocked popup."},"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded":{"message":"A service worker was activated while the page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | errorDocument":{"message":"Back/forward cache is disabled due to a document error."},"panels/application/components/BackForwardCacheStrings.ts | fencedFramesEmbedder":{"message":"Pages using FencedFrames cannot be stored in bfcache."},"panels/application/components/BackForwardCacheStrings.ts | foregroundCacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | grantedMediaStreamAccess":{"message":"Pages that have granted media stream access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | haveInnerContents":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPMethodNotGET":{"message":"Only pages loaded via a GET request are eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPStatusNotOK":{"message":"Only pages with a status code of 2XX can be cached."},"panels/application/components/BackForwardCacheStrings.ts | idleManager":{"message":"Pages that use IdleManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBConnection":{"message":"Pages that have an open IndexedDB connection are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBEvent":{"message":"Back/forward cache is disabled due to an IndexedDB event."},"panels/application/components/BackForwardCacheStrings.ts | ineligibleAPI":{"message":"Ineligible APIs were used."},"panels/application/components/BackForwardCacheStrings.ts | injectedJavascript":{"message":"Pages that JavaScript is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | injectedStyleSheet":{"message":"Pages that a StyleSheet is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | internalError":{"message":"Internal error."},"panels/application/components/BackForwardCacheStrings.ts | JavaScriptExecution":{"message":"Chrome detected an attempt to execute JavaScript while in the cache."},"panels/application/components/BackForwardCacheStrings.ts | jsNetworkRequestReceivedCacheControlNoStoreResource":{"message":"Back/forward cache is disabled because some JavaScript network request received resource with Cache-Control: no-store header."},"panels/application/components/BackForwardCacheStrings.ts | keepaliveRequest":{"message":"Back/forward cache is disabled due to a keepalive request."},"panels/application/components/BackForwardCacheStrings.ts | keyboardLock":{"message":"Pages that use Keyboard lock are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | loading":{"message":"The page did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoCache":{"message":"Pages whose main resource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoStore":{"message":"Pages whose main resource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | navigationCancelledWhileRestoring":{"message":"Navigation was cancelled before the page could be restored from back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkExceedsBufferLimit":{"message":"The page was evicted from the cache because an active network connection received too much data. Chrome limits the amount of data that a page may receive while cached."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestDatapipeDrainedAsBytesConsumer":{"message":"Pages that have inflight fetch() or XHR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestRedirected":{"message":"The page was evicted from back/forward cache because an active network request involved a redirect."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestTimeout":{"message":"The page was evicted from the cache because a network connection was open too long. Chrome limits the amount of time that a page may receive data while cached."},"panels/application/components/BackForwardCacheStrings.ts | noResponseHead":{"message":"Pages that do not have a valid response head cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | notMainFrame":{"message":"Navigation happened in a frame other than the main frame."},"panels/application/components/BackForwardCacheStrings.ts | outstandingIndexedDBTransaction":{"message":"Page with ongoing indexed DB transactions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestDirectSocket":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestFetch":{"message":"Pages with an in-flight fetch network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestOthers":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestXHR":{"message":"Pages with an in-flight XHR network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | paymentManager":{"message":"Pages that use PaymentManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | pictureInPicture":{"message":"Pages that use Picture-in-Picture are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | portal":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | printing":{"message":"Pages that show Printing UI are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | relatedActiveContentsExist":{"message":"The page was opened using 'window.open()' and another tab has a reference to it, or the page opened a window."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessCrashed":{"message":"The renderer process for the page in back/forward cache crashed."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessKilled":{"message":"The renderer process for the page in back/forward cache was killed."},"panels/application/components/BackForwardCacheStrings.ts | requestedAudioCapturePermission":{"message":"Pages that have requested audio capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackForwardCacheBlockedSensors":{"message":"Pages that have requested sensor permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackgroundWorkPermission":{"message":"Pages that have requested background sync or fetch permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedMIDIPermission":{"message":"Pages that have requested MIDI permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedNotificationsPermission":{"message":"Pages that have requested notifications permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedStorageAccessGrant":{"message":"Pages that have requested storage access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedVideoCapturePermission":{"message":"Pages that have requested video capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | schemeNotHTTPOrHTTPS":{"message":"Only pages whose URL scheme is HTTP / HTTPS can be cached."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerClaim":{"message":"The page was claimed by a service worker while it is in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerPostMessage":{"message":"A service worker attempted to send the page in back/forward cache a MessageEvent."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerUnregistration":{"message":"ServiceWorker was unregistered while a page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerVersionActivation":{"message":"The page was evicted from back/forward cache due to a service worker activation."},"panels/application/components/BackForwardCacheStrings.ts | sessionRestored":{"message":"Chrome restarted and cleared the back/forward cache entries."},"panels/application/components/BackForwardCacheStrings.ts | sharedWorker":{"message":"Pages that use SharedWorker are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechRecognizer":{"message":"Pages that use SpeechRecognizer are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechSynthesis":{"message":"Pages that use SpeechSynthesis are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subframeIsNavigating":{"message":"An iframe on the page started a navigation that did not complete."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoCache":{"message":"Pages whose subresource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoStore":{"message":"Pages whose subresource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | timeout":{"message":"The page exceeded the maximum time in back/forward cache and was expired."},"panels/application/components/BackForwardCacheStrings.ts | timeoutPuttingInCache":{"message":"The page timed out entering back/forward cache (likely due to long-running pagehide handlers)."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInMainFrame":{"message":"The page has an unload handler in the main frame."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInSubFrame":{"message":"The page has an unload handler in a sub frame."},"panels/application/components/BackForwardCacheStrings.ts | userAgentOverrideDiffers":{"message":"Browser has changed the user agent override header."},"panels/application/components/BackForwardCacheStrings.ts | wasGrantedMediaAccess":{"message":"Pages that have granted access to record video or audio are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webDatabase":{"message":"Pages that use WebDatabase are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webHID":{"message":"Pages that use WebHID are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webLocks":{"message":"Pages that use WebLocks are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webNfc":{"message":"Pages that use WebNfc are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webOTPService":{"message":"Pages that use WebOTPService are not currently eligible for bfcache."},"panels/application/components/BackForwardCacheStrings.ts | webRTC":{"message":"Pages with WebRTC cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webRTCSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webShare":{"message":"Pages that use WebShare are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocket":{"message":"Pages with WebSocket cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocketSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webTransport":{"message":"Pages with WebTransport cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webTransportSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webXR":{"message":"Pages that use WebXR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | backForwardCacheTitle":{"message":"Back/forward cache"},"panels/application/components/BackForwardCacheView.ts | blankURLTitle":{"message":"Blank URL [{PH1}]"},"panels/application/components/BackForwardCacheView.ts | blockingExtensionId":{"message":"Extension id: "},"panels/application/components/BackForwardCacheView.ts | circumstantial":{"message":"Not Actionable"},"panels/application/components/BackForwardCacheView.ts | circumstantialExplanation":{"message":"These reasons are not actionable i.e. caching was prevented by something outside of the direct control of the page."},"panels/application/components/BackForwardCacheView.ts | framesPerIssue":{"message":"{n, plural, =1 {# frame} other {# frames}}"},"panels/application/components/BackForwardCacheView.ts | framesTitle":{"message":"Frames"},"panels/application/components/BackForwardCacheView.ts | issuesInMultipleFrames":{"message":"{n, plural, =1 {# issue found in {m} frames.} other {# issues found in {m} frames.}}"},"panels/application/components/BackForwardCacheView.ts | issuesInSingleFrame":{"message":"{n, plural, =1 {# issue found in 1 frame.} other {# issues found in 1 frame.}}"},"panels/application/components/BackForwardCacheView.ts | learnMore":{"message":"Learn more: back/forward cache eligibility"},"panels/application/components/BackForwardCacheView.ts | mainFrame":{"message":"Main Frame"},"panels/application/components/BackForwardCacheView.ts | neverUseUnload":{"message":"Learn more: Never use unload handler"},"panels/application/components/BackForwardCacheView.ts | normalNavigation":{"message":"Not served from back/forward cache: to trigger back/forward cache, use Chrome's back/forward buttons, or use the test button below to automatically navigate away and back."},"panels/application/components/BackForwardCacheView.ts | pageSupportNeeded":{"message":"Actionable"},"panels/application/components/BackForwardCacheView.ts | pageSupportNeededExplanation":{"message":"These reasons are actionable i.e. they can be cleaned up to make the page eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | restoredFromBFCache":{"message":"Successfully served from back/forward cache."},"panels/application/components/BackForwardCacheView.ts | runningTest":{"message":"Running test"},"panels/application/components/BackForwardCacheView.ts | runTest":{"message":"Test back/forward cache"},"panels/application/components/BackForwardCacheView.ts | supportPending":{"message":"Pending Support"},"panels/application/components/BackForwardCacheView.ts | supportPendingExplanation":{"message":"Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for back/forward cache in a future version of Chrome."},"panels/application/components/BackForwardCacheView.ts | unavailable":{"message":"unavailable"},"panels/application/components/BackForwardCacheView.ts | unknown":{"message":"Unknown Status"},"panels/application/components/BackForwardCacheView.ts | url":{"message":"URL:"},"panels/application/components/BounceTrackingMitigationsView.ts | bounceTrackingMitigationsTitle":{"message":"Bounce Tracking Mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | checkingPotentialTrackers":{"message":"Checking for potential bounce tracking sites."},"panels/application/components/BounceTrackingMitigationsView.ts | forceRun":{"message":"Force run"},"panels/application/components/BounceTrackingMitigationsView.ts | learnMore":{"message":"Learn more: Bounce Tracking Mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | noPotentialBounceTrackersIdentified":{"message":"State was not cleared for any potential bounce tracking sites. Either none were identified, bounce tracking mitigations are not enabled, or third-party cookies are not blocked."},"panels/application/components/BounceTrackingMitigationsView.ts | runningMitigations":{"message":"Running"},"panels/application/components/BounceTrackingMitigationsView.ts | stateDeletedFor":{"message":"State was deleted for the following sites:"},"panels/application/components/EndpointsGrid.ts | noEndpointsToDisplay":{"message":"No endpoints to display"},"panels/application/components/FrameDetailsView.ts | additionalInformation":{"message":"Additional Information"},"panels/application/components/FrameDetailsView.ts | adStatus":{"message":"Ad Status"},"panels/application/components/FrameDetailsView.ts | aFrameAncestorIsAnInsecure":{"message":"A frame ancestor is an insecure context"},"panels/application/components/FrameDetailsView.ts | apiAvailability":{"message":"API availability"},"panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends":{"message":"Availability of certain APIs depends on the document being cross-origin isolated."},"panels/application/components/FrameDetailsView.ts | available":{"message":"available"},"panels/application/components/FrameDetailsView.ts | availableNotTransferable":{"message":"available, not transferable"},"panels/application/components/FrameDetailsView.ts | availableTransferable":{"message":"available, transferable"},"panels/application/components/FrameDetailsView.ts | child":{"message":"child"},"panels/application/components/FrameDetailsView.ts | childDescription":{"message":"This frame has been identified as a child frame of an ad"},"panels/application/components/FrameDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanelMight":{"message":"Click to reveal in Network panel (might require page reload)"},"panels/application/components/FrameDetailsView.ts | clickToRevealInSourcesPanel":{"message":"Click to reveal in Sources panel"},"panels/application/components/FrameDetailsView.ts | createdByAdScriptExplanation":{"message":"There was an ad script in the (async) stack when this frame was created. Examining the creation stack trace of this frame might provide more insight."},"panels/application/components/FrameDetailsView.ts | creationStackTrace":{"message":"Frame Creation Stack Trace"},"panels/application/components/FrameDetailsView.ts | creationStackTraceExplanation":{"message":"This frame was created programmatically. The stack trace shows where this happened."},"panels/application/components/FrameDetailsView.ts | creatorAdScript":{"message":"Creator Ad Script"},"panels/application/components/FrameDetailsView.ts | crossoriginIsolated":{"message":"Cross-Origin Isolated"},"panels/application/components/FrameDetailsView.ts | document":{"message":"Document"},"panels/application/components/FrameDetailsView.ts | frameId":{"message":"Frame ID"},"panels/application/components/FrameDetailsView.ts | learnMore":{"message":"Learn more"},"panels/application/components/FrameDetailsView.ts | localhostIsAlwaysASecureContext":{"message":"Localhost is always a secure context"},"panels/application/components/FrameDetailsView.ts | matchedBlockingRuleExplanation":{"message":"This frame is considered an ad frame because its current (or previous) main document is an ad resource."},"panels/application/components/FrameDetailsView.ts | measureMemory":{"message":"Measure Memory"},"panels/application/components/FrameDetailsView.ts | no":{"message":"No"},"panels/application/components/FrameDetailsView.ts | origin":{"message":"Origin"},"panels/application/components/FrameDetailsView.ts | ownerElement":{"message":"Owner Element"},"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation":{"message":"This frame is considered an ad frame because its parent frame is an ad frame."},"panels/application/components/FrameDetailsView.ts | prerendering":{"message":"Prerendering"},"panels/application/components/FrameDetailsView.ts | prerenderingStatus":{"message":"Prerendering Status"},"panels/application/components/FrameDetailsView.ts | refresh":{"message":"Refresh"},"panels/application/components/FrameDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated":{"message":"requires cross-origin isolated context"},"panels/application/components/FrameDetailsView.ts | root":{"message":"root"},"panels/application/components/FrameDetailsView.ts | rootDescription":{"message":"This frame has been identified as the root frame of an ad"},"panels/application/components/FrameDetailsView.ts | secureContext":{"message":"Secure Context"},"panels/application/components/FrameDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIs":{"message":"SharedArrayBuffer constructor is available and SABs can be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIsAvailable":{"message":"SharedArrayBuffer constructor is available but SABs cannot be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | theFramesSchemeIsInsecure":{"message":"The frame's scheme is insecure"},"panels/application/components/FrameDetailsView.ts | thePerformanceAPI":{"message":"The performance.measureUserAgentSpecificMemory() API is available"},"panels/application/components/FrameDetailsView.ts | thePerformancemeasureuseragentspecificmemory":{"message":"The performance.measureUserAgentSpecificMemory() API is not available"},"panels/application/components/FrameDetailsView.ts | thisAdditionalDebugging":{"message":"This additional (debugging) information is shown because the 'Protocol Monitor' experiment is enabled."},"panels/application/components/FrameDetailsView.ts | transferRequiresCrossoriginIsolatedPermission":{"message":"SharedArrayBuffer transfer requires enabling the permission policy:"},"panels/application/components/FrameDetailsView.ts | unavailable":{"message":"unavailable"},"panels/application/components/FrameDetailsView.ts | unreachableUrl":{"message":"Unreachable URL"},"panels/application/components/FrameDetailsView.ts | url":{"message":"URL"},"panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated":{"message":"⚠️ will require cross-origin isolated context in the future"},"panels/application/components/FrameDetailsView.ts | yes":{"message":"Yes"},"panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents":{"message":"All interest group storage events."},"panels/application/components/InterestGroupAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/InterestGroupAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/InterestGroupAccessGrid.ts | groupName":{"message":"Name"},"panels/application/components/InterestGroupAccessGrid.ts | groupOwner":{"message":"Owner"},"panels/application/components/InterestGroupAccessGrid.ts | noEvents":{"message":"No interest group events recorded."},"panels/application/components/OriginTrialTreeView.ts | expiryTime":{"message":"Expiry Time"},"panels/application/components/OriginTrialTreeView.ts | isThirdParty":{"message":"Third Party"},"panels/application/components/OriginTrialTreeView.ts | matchSubDomains":{"message":"Subdomain Matching"},"panels/application/components/OriginTrialTreeView.ts | origin":{"message":"Origin"},"panels/application/components/OriginTrialTreeView.ts | rawTokenText":{"message":"Raw Token"},"panels/application/components/OriginTrialTreeView.ts | status":{"message":"Token Status"},"panels/application/components/OriginTrialTreeView.ts | token":{"message":"Token"},"panels/application/components/OriginTrialTreeView.ts | tokens":{"message":"{PH1} tokens"},"panels/application/components/OriginTrialTreeView.ts | trialName":{"message":"Trial Name"},"panels/application/components/OriginTrialTreeView.ts | usageRestriction":{"message":"Usage Restriction"},"panels/application/components/PermissionsPolicySection.ts | allowedFeatures":{"message":"Allowed Features"},"panels/application/components/PermissionsPolicySection.ts | clickToShowHeader":{"message":"Click to reveal the request whose \"Permissions-Policy\" HTTP header disables this feature."},"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe":{"message":"Click to reveal the top-most iframe which does not allow this feature in the elements panel."},"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame":{"message":"disabled inside a fencedframe"},"panels/application/components/PermissionsPolicySection.ts | disabledByHeader":{"message":"disabled by \"Permissions-Policy\" header"},"panels/application/components/PermissionsPolicySection.ts | disabledByIframe":{"message":"missing in iframe \"allow\" attribute"},"panels/application/components/PermissionsPolicySection.ts | disabledFeatures":{"message":"Disabled Features"},"panels/application/components/PermissionsPolicySection.ts | hideDetails":{"message":"Hide details"},"panels/application/components/PermissionsPolicySection.ts | showDetails":{"message":"Show details"},"panels/application/components/Prerender2.ts | Activated":{"message":"Activated."},"panels/application/components/Prerender2.ts | ActivatedBeforeStarted":{"message":"Activated before started"},"panels/application/components/Prerender2.ts | ActivationNavigationParameterMismatch":{"message":"The page was prerendered, but the navigation ended up being performed differently than the original prerender, so the prerendered page could not be activated."},"panels/application/components/Prerender2.ts | AudioOutputDeviceRequested":{"message":"Prerendering has not supported the AudioContext API yet."},"panels/application/components/Prerender2.ts | BlockedByClient":{"message":"Resource load is blocked by the client."},"panels/application/components/Prerender2.ts | CancelAllHostsForTesting":{"message":"CancelAllHostsForTesting."},"panels/application/components/Prerender2.ts | ClientCertRequested":{"message":"The page is requesting client cert, which is not suitable for a hidden page like prerendering."},"panels/application/components/Prerender2.ts | CrossSiteNavigation":{"message":"The prerendered page navigated to a cross-site URL after loading. Currently prerendering cross-site pages is disallowed."},"panels/application/components/Prerender2.ts | CrossSiteRedirect":{"message":"Attempted to prerender a URL which redirected to a cross-site URL. Currently prerendering cross-site pages is disallowed."},"panels/application/components/Prerender2.ts | DataSaverEnabled":{"message":"Data saver enabled"},"panels/application/components/Prerender2.ts | Destroyed":{"message":"A prerendered page was abandoned for unknown reasons."},"panels/application/components/Prerender2.ts | DidFailLoad":{"message":"DidFailLoadWithError happened during prerendering."},"panels/application/components/Prerender2.ts | DisallowedApiMethod":{"message":"Disallowed API method"},"panels/application/components/Prerender2.ts | Download":{"message":"Download is disallowed in Prerender."},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndCrossOriginRedirected":{"message":"Prerendering triggered by Chrome internal (e.g., Omnibox prerendering) is is canceled because the navigation is redirected to another cross-origin page."},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndSameOriginRedirected":{"message":"Prerendering triggered by Chrome internal (e.g., Omnibox prerendering) is canceled because the navigation is redirected to another same-origin page."},"panels/application/components/Prerender2.ts | FailToGetMemoryUsage":{"message":"Fail to get memory usage"},"panels/application/components/Prerender2.ts | HasEffectiveUrl":{"message":"Has effective URL"},"panels/application/components/Prerender2.ts | InactivePageRestriction":{"message":"Inactive page restriction"},"panels/application/components/Prerender2.ts | InProgressNavigation":{"message":"InProgressNavigation."},"panels/application/components/Prerender2.ts | InvalidSchemeNavigation":{"message":"Only HTTP(S) navigation allowed for Prerender."},"panels/application/components/Prerender2.ts | InvalidSchemeRedirect":{"message":"Attempted to prerender a URL that redirected to a non-HTTP(S) URL. Only HTTP(S) pages can be prerendered."},"panels/application/components/Prerender2.ts | LoginAuthRequested":{"message":"Prerender does not support auth requests from UI."},"panels/application/components/Prerender2.ts | LowEndDevice":{"message":"Prerendering is not supported for low-memory devices."},"panels/application/components/Prerender2.ts | MainFrameNavigation":{"message":"Navigations after the initial prerendering navigation are disallowed"},"panels/application/components/Prerender2.ts | MaxNumOfRunningPrerendersExceeded":{"message":"Max number of prerendering exceeded."},"panels/application/components/Prerender2.ts | MemoryLimitExceeded":{"message":"Memory limit exceeded"},"panels/application/components/Prerender2.ts | MixedContent":{"message":"Prerendering is canceled by a mixed content frame."},"panels/application/components/Prerender2.ts | MojoBinderPolicy":{"message":"A disallowed API was used by the prerendered page"},"panels/application/components/Prerender2.ts | NavigationBadHttpStatus":{"message":"The initial prerendering navigation was not successful due to the server returning a non-200/204/205 status code."},"panels/application/components/Prerender2.ts | NavigationNotCommitted":{"message":"The prerendering page is not committed in the end."},"panels/application/components/Prerender2.ts | NavigationRequestBlockedByCsp":{"message":"Navigation request is blocked by CSP."},"panels/application/components/Prerender2.ts | NavigationRequestNetworkError":{"message":"Encountered a network error during prerendering."},"panels/application/components/Prerender2.ts | PrerenderingOngoing":{"message":"Prerendering ongoing"},"panels/application/components/Prerender2.ts | RendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/components/Prerender2.ts | RendererProcessKilled":{"message":"The renderer process for the prerendering page was killed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigation":{"message":"The prerendered page navigated to a same-site cross-origin URL after loading. Currently prerendering cross-origin pages is disallowed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigationNotOptIn":{"message":"The prerendered page navigated to a same-site cross-origin URL after loading. This is disallowed unless the destination site sends a Supports-Loading-Mode: credentialed-prerender header."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirect":{"message":"Attempted to prerender a URL which redirected to a same-site cross-origin URL. Currently prerendering cross-origin pages is disallowed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirectNotOptIn":{"message":"Attempted to prerender a URL which redirected to a same-site cross-origin URL. This is disallowed unless the destination site sends a Supports-Loading-Mode: credentialed-prerender header."},"panels/application/components/Prerender2.ts | SslCertificateError":{"message":"SSL certificate error."},"panels/application/components/Prerender2.ts | StartFailed":{"message":"Start failed"},"panels/application/components/Prerender2.ts | Stop":{"message":"The tab is stopped."},"panels/application/components/Prerender2.ts | TriggerBackgrounded":{"message":"The tab is in the background"},"panels/application/components/Prerender2.ts | TriggerDestroyed":{"message":"Prerender is not activated and destroyed with the trigger."},"panels/application/components/Prerender2.ts | UaChangeRequiresReload":{"message":"Reload is needed after UserAgentOverride."},"panels/application/components/ProtocolHandlersView.ts | dropdownLabel":{"message":"Select protocol handler"},"panels/application/components/ProtocolHandlersView.ts | manifest":{"message":"manifest"},"panels/application/components/ProtocolHandlersView.ts | needHelpReadOur":{"message":"Need help? Read {PH1}."},"panels/application/components/ProtocolHandlersView.ts | protocolDetected":{"message":"Found valid protocol handler registration in the {PH1}. With the app installed, test the registered protocols."},"panels/application/components/ProtocolHandlersView.ts | protocolHandlerRegistrations":{"message":"URL protocol handler registration for PWAs"},"panels/application/components/ProtocolHandlersView.ts | protocolNotDetected":{"message":"Define protocol handlers in the {PH1} to register your app as a handler for custom protocols when your app is installed."},"panels/application/components/ProtocolHandlersView.ts | testProtocol":{"message":"Test protocol"},"panels/application/components/ProtocolHandlersView.ts | textboxLabel":{"message":"Query parameter or endpoint for protocol handler"},"panels/application/components/ProtocolHandlersView.ts | textboxPlaceholder":{"message":"Enter URL"},"panels/application/components/ReportsGrid.ts | destination":{"message":"Destination"},"panels/application/components/ReportsGrid.ts | generatedAt":{"message":"Generated at"},"panels/application/components/ReportsGrid.ts | noReportsToDisplay":{"message":"No reports to display"},"panels/application/components/ReportsGrid.ts | status":{"message":"Status"},"panels/application/components/SharedStorageAccessGrid.ts | allSharedStorageEvents":{"message":"All shared storage events for this page."},"panels/application/components/SharedStorageAccessGrid.ts | eventParams":{"message":"Optional Event Params"},"panels/application/components/SharedStorageAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/SharedStorageAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/SharedStorageAccessGrid.ts | mainFrameId":{"message":"Main Frame ID"},"panels/application/components/SharedStorageAccessGrid.ts | noEvents":{"message":"No shared storage events recorded."},"panels/application/components/SharedStorageAccessGrid.ts | ownerOrigin":{"message":"Owner Origin"},"panels/application/components/SharedStorageAccessGrid.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/components/SharedStorageMetadataView.ts | budgetExplanation":{"message":"Remaining data leakage allowed within a 24-hour period for this origin in bits of entropy"},"panels/application/components/SharedStorageMetadataView.ts | creation":{"message":"Creation Time"},"panels/application/components/SharedStorageMetadataView.ts | entropyBudget":{"message":"Entropy Budget for Fenced Frames"},"panels/application/components/SharedStorageMetadataView.ts | notYetCreated":{"message":"Not yet created"},"panels/application/components/SharedStorageMetadataView.ts | numEntries":{"message":"Number of Entries"},"panels/application/components/SharedStorageMetadataView.ts | resetBudget":{"message":"Reset Budget"},"panels/application/components/SharedStorageMetadataView.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/components/StackTrace.ts | cannotRenderStackTrace":{"message":"Cannot render stack trace"},"panels/application/components/StackTrace.ts | showLess":{"message":"Show less"},"panels/application/components/StackTrace.ts | showSMoreFrames":{"message":"{n, plural, =1 {Show # more frame} other {Show # more frames}}"},"panels/application/components/StorageMetadataView.ts | bucketName":{"message":"Bucket name"},"panels/application/components/StorageMetadataView.ts | durability":{"message":"Durability"},"panels/application/components/StorageMetadataView.ts | expiration":{"message":"Expiration"},"panels/application/components/StorageMetadataView.ts | isOpaque":{"message":"Is opaque"},"panels/application/components/StorageMetadataView.ts | isThirdParty":{"message":"Is third-party"},"panels/application/components/StorageMetadataView.ts | loading":{"message":"Loading…"},"panels/application/components/StorageMetadataView.ts | no":{"message":"No"},"panels/application/components/StorageMetadataView.ts | none":{"message":"None"},"panels/application/components/StorageMetadataView.ts | opaque":{"message":"(opaque)"},"panels/application/components/StorageMetadataView.ts | origin":{"message":"Origin"},"panels/application/components/StorageMetadataView.ts | persistent":{"message":"Is persistent"},"panels/application/components/StorageMetadataView.ts | quota":{"message":"Quota"},"panels/application/components/StorageMetadataView.ts | topLevelSite":{"message":"Top-level site"},"panels/application/components/StorageMetadataView.ts | yes":{"message":"Yes"},"panels/application/components/StorageMetadataView.ts | yesBecauseAncestorChainHasCrossSite":{"message":"Yes, because the ancestry chain contains a third-party origin"},"panels/application/components/StorageMetadataView.ts | yesBecauseKeyIsOpaque":{"message":"Yes, because the storage key is opaque"},"panels/application/components/StorageMetadataView.ts | yesBecauseOriginNotInTopLevelSite":{"message":"Yes, because the origin is outside of the top-level site"},"panels/application/components/StorageMetadataView.ts | yesBecauseTopLevelIsOpaque":{"message":"Yes, because the top-level site is opaque"},"panels/application/components/TrustTokensView.ts | allStoredTrustTokensAvailableIn":{"message":"All stored Private State Tokens available in this browser instance."},"panels/application/components/TrustTokensView.ts | deleteTrustTokens":{"message":"Delete all stored Private State Tokens issued by {PH1}."},"panels/application/components/TrustTokensView.ts | issuer":{"message":"Issuer"},"panels/application/components/TrustTokensView.ts | noTrustTokensStored":{"message":"No Private State Tokens are currently stored."},"panels/application/components/TrustTokensView.ts | storedTokenCount":{"message":"Stored token count"},"panels/application/components/TrustTokensView.ts | trustTokens":{"message":"Private State Tokens"},"panels/application/CookieItemsView.ts | clearAllCookies":{"message":"Clear all cookies"},"panels/application/CookieItemsView.ts | clearFilteredCookies":{"message":"Clear filtered cookies"},"panels/application/CookieItemsView.ts | cookies":{"message":"Cookies"},"panels/application/CookieItemsView.ts | numberOfCookiesShownInTableS":{"message":"Number of cookies shown in table: {PH1}"},"panels/application/CookieItemsView.ts | onlyShowCookiesWhichHaveAn":{"message":"Only show cookies that have an associated issue"},"panels/application/CookieItemsView.ts | onlyShowCookiesWithAnIssue":{"message":"Only show cookies with an issue"},"panels/application/CookieItemsView.ts | selectACookieToPreviewItsValue":{"message":"Select a cookie to preview its value"},"panels/application/CookieItemsView.ts | showUrlDecoded":{"message":"Show URL-decoded"},"panels/application/DatabaseModel.ts | anUnexpectedErrorSOccurred":{"message":"An unexpected error {PH1} occurred."},"panels/application/DatabaseModel.ts | databaseNoLongerHasExpected":{"message":"Database no longer has expected version."},"panels/application/DatabaseQueryView.ts | databaseQuery":{"message":"Database Query"},"panels/application/DatabaseQueryView.ts | queryS":{"message":"Query: {PH1}"},"panels/application/DatabaseTableView.ts | anErrorOccurredTryingToreadTheS":{"message":"An error occurred trying to read the \"{PH1}\" table."},"panels/application/DatabaseTableView.ts | database":{"message":"Database"},"panels/application/DatabaseTableView.ts | refresh":{"message":"Refresh"},"panels/application/DatabaseTableView.ts | theStableIsEmpty":{"message":"The \"{PH1}\" table is empty."},"panels/application/DatabaseTableView.ts | visibleColumns":{"message":"Visible columns"},"panels/application/DOMStorageItemsView.ts | domStorage":{"message":"DOM Storage"},"panels/application/DOMStorageItemsView.ts | domStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/DOMStorageItemsView.ts | domStorageItems":{"message":"DOM Storage Items"},"panels/application/DOMStorageItemsView.ts | domStorageItemsCleared":{"message":"DOM Storage Items cleared"},"panels/application/DOMStorageItemsView.ts | domStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/DOMStorageItemsView.ts | key":{"message":"Key"},"panels/application/DOMStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/DOMStorageItemsView.ts | value":{"message":"Value"},"panels/application/IndexedDBViews.ts | clearObjectStore":{"message":"Clear object store"},"panels/application/IndexedDBViews.ts | collapse":{"message":"Collapse"},"panels/application/IndexedDBViews.ts | dataMayBeStale":{"message":"Data may be stale"},"panels/application/IndexedDBViews.ts | deleteDatabase":{"message":"Delete database"},"panels/application/IndexedDBViews.ts | deleteSelected":{"message":"Delete selected"},"panels/application/IndexedDBViews.ts | expandRecursively":{"message":"Expand Recursively"},"panels/application/IndexedDBViews.ts | idb":{"message":"IDB"},"panels/application/IndexedDBViews.ts | indexedDb":{"message":"Indexed DB"},"panels/application/IndexedDBViews.ts | keyGeneratorValueS":{"message":"Key generator value: {PH1}"},"panels/application/IndexedDBViews.ts | keyPath":{"message":"Key path: "},"panels/application/IndexedDBViews.ts | keyString":{"message":"Key"},"panels/application/IndexedDBViews.ts | objectStores":{"message":"Object stores"},"panels/application/IndexedDBViews.ts | pleaseConfirmDeleteOfSDatabase":{"message":"Please confirm delete of \"{PH1}\" database."},"panels/application/IndexedDBViews.ts | primaryKey":{"message":"Primary key"},"panels/application/IndexedDBViews.ts | refresh":{"message":"Refresh"},"panels/application/IndexedDBViews.ts | refreshDatabase":{"message":"Refresh database"},"panels/application/IndexedDBViews.ts | showNextPage":{"message":"Show next page"},"panels/application/IndexedDBViews.ts | showPreviousPage":{"message":"Show previous page"},"panels/application/IndexedDBViews.ts | someEntriesMayHaveBeenModified":{"message":"Some entries may have been modified"},"panels/application/IndexedDBViews.ts | startFromKey":{"message":"Start from key"},"panels/application/IndexedDBViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/IndexedDBViews.ts | valueString":{"message":"Value"},"panels/application/IndexedDBViews.ts | version":{"message":"Version"},"panels/application/InterestGroupStorageView.ts | clickToDisplayBody":{"message":"Click on any interest group event to display the group's current state"},"panels/application/InterestGroupStorageView.ts | noDataAvailable":{"message":"No details available for the selected interest group. The browser may have left the group."},"panels/application/InterestGroupTreeElement.ts | interestGroups":{"message":"Interest Groups"},"panels/application/OpenedWindowDetailsView.ts | accessToOpener":{"message":"Access to opener"},"panels/application/OpenedWindowDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/OpenedWindowDetailsView.ts | closed":{"message":"closed"},"panels/application/OpenedWindowDetailsView.ts | crossoriginEmbedderPolicy":{"message":"Cross-Origin Embedder Policy"},"panels/application/OpenedWindowDetailsView.ts | document":{"message":"Document"},"panels/application/OpenedWindowDetailsView.ts | no":{"message":"No"},"panels/application/OpenedWindowDetailsView.ts | openerFrame":{"message":"Opener Frame"},"panels/application/OpenedWindowDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/OpenedWindowDetailsView.ts | security":{"message":"Security"},"panels/application/OpenedWindowDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/OpenedWindowDetailsView.ts | showsWhetherTheOpenedWindowIs":{"message":"Shows whether the opened window is able to access its opener and vice versa"},"panels/application/OpenedWindowDetailsView.ts | type":{"message":"Type"},"panels/application/OpenedWindowDetailsView.ts | unknown":{"message":"Unknown"},"panels/application/OpenedWindowDetailsView.ts | url":{"message":"URL"},"panels/application/OpenedWindowDetailsView.ts | webWorker":{"message":"Web Worker"},"panels/application/OpenedWindowDetailsView.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/OpenedWindowDetailsView.ts | worker":{"message":"worker"},"panels/application/OpenedWindowDetailsView.ts | yes":{"message":"Yes"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusFailure":{"message":"Preloading failed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusNotTriggered":{"message":"Preloading attempt is not yet triggered."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusPending":{"message":"Preloading attempt is eligible but pending."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusReady":{"message":"Preloading finished and the result is ready for the next navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusRunning":{"message":"Preloading is running."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusSuccess":{"message":"Preloading finished and used for a navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsAction":{"message":"Action"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsFailureReason":{"message":"Failure reason"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsRuleSet":{"message":"Rule set"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsStatus":{"message":"Status"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivatedDuringMainFrameNavigation":{"message":"Prerendered page activated during initiating page's main frame navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationFramePolicyNotCompatible":{"message":"The prerender was not used because the sandboxing flags or permissions policy of the initiating page was not compatible with those of the prerendering page."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationNavigationParameterMismatch":{"message":"The prerender was not used because during activation time, different navigation parameters (e.g., HTTP headers) were calculated than during the original prerendering navigation request."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusAudioOutputDeviceRequested":{"message":"The prerendered page requested audio output, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBatterySaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less battery."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusClientCertRequested":{"message":"The prerendering navigation required a HTTP client certificate."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInInitialNavigation":{"message":"The prerendering navigation failed because it targeted a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDataSaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less data."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDownload":{"message":"The prerendered page attempted to initiate a download, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusFailToGetMemoryUsage":{"message":"The prerender was not performed because the browser encountered an internal error attempting to determine current memory usage."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusHasEffectiveUrl":{"message":"The initiating page cannot perform prerendering, because it has an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeNavigation":{"message":"The URL was not eligible to be prerendered because its scheme was not http: or https:."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeRedirect":{"message":"The prerendering navigation failed because it redirected to a URL whose scheme was not http: or https:."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLoginAuthRequested":{"message":"The prerendering navigation required HTTP authentication, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLowEndDevice":{"message":"The prerender was not performed because this device does not have enough total system memory to support prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMainFrameNavigation":{"message":"The prerendered page navigated itself to another URL, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMaxNumOfRunningPrerendersExceeded":{"message":"The prerender was not performed because the initiating page already has too many prerenders ongoing. Remove other speculation rules to enable further prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryLimitExceeded":{"message":"The prerender was not performed because the browser exceeded the prerendering memory limit."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureAfterTriggered":{"message":"The prerendered page was unloaded because the browser came under critical memory pressure."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureOnTrigger":{"message":"The prerender was not performed because the browser was under critical memory pressure."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMixedContent":{"message":"The prerendered page contained mixed content."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMojoBinderPolicy":{"message":"The prerendered page used a forbidden JavaScript API that is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationBadHttpStatus":{"message":"The prerendering navigation failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestBlockedByCsp":{"message":"The prerendering navigation was blocked by a Content Security Policy."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestNetworkError":{"message":"The prerendering navigation encountered a network error."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPreloadingDisabled":{"message":"The prerender was not performed because the user disabled preloading in their browser settings."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrerenderingDisabledByDevTools":{"message":"The prerender was not performed because DevTools has been used to disable prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessCrashed":{"message":"The initiating page crashed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessKilled":{"message":"The initiating page was killed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessKilled":{"message":"The prerendered page was killed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusResourceLoadBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation":{"message":"The prerendered page navigated itself to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSslCertificateError":{"message":"The prerendering navigation failed because of an invalid SSL certificate."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTimeoutBackgrounded":{"message":"The initiating page was backgrounded for a long time, so the prerendered page was discarded."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTriggerBackgrounded":{"message":"The initiating page was backgrounded, so the prerendered page was discarded."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusUaChangeRequiresReload":{"message":"Changing User Agent occured in prerendering navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | selectAnElementForMoreDetails":{"message":"Select an element for more details"},"panels/application/preloading/components/PreloadingGrid.ts | action":{"message":"Action"},"panels/application/preloading/components/PreloadingGrid.ts | status":{"message":"Status"},"panels/application/preloading/components/PreloadingString.ts | PrefetchEvicted":{"message":"The prefetch was discarded for a newer prefetch because |kPrefetchNewLimits| is enabled"},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedIneligibleRedirect":{"message":"The prefetch was redirected, but the redirect URL is not eligible for prefetch."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedInvalidRedirect":{"message":"The prefetch was redirected, but there was a problem with the redirect."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedMIMENotSupported":{"message":"The prefetch failed because the response's Content-Type header was not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNetError":{"message":"The prefetch failed because of a network error."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNon2XX":{"message":"The prefetch failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedPerPageLimitExceeded":{"message":"The prefetch was not performed because the initiating page already has too many prefetches ongoing."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIneligibleRetryAfter":{"message":"A previous prefetch to the origin got a HTTP 503 response with an Retry-After header that has not elapsed yet."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsPrivacyDecoy":{"message":"The URL was not eligible to be prefetched because there was a registered service worker or cross-site cookies for that origin, but the prefetch was put on the network anyways and not used, to disguise that the user had some kind of previous relationship with the origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsStale":{"message":"Too much time elapsed between the prefetch and usage, so the prefetch was discarded."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBatterySaverEnabled":{"message":"The prefetch was not performed because the Battery Saver setting was enabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBrowserContextOffTheRecord":{"message":"The prefetch was not performed because the browser is in Incognito or Guest mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleDataSaverEnabled":{"message":"The prefetch was not performed because the operating system is in Data Saver mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleExistingProxy":{"message":"The URL is not eligible to be prefetched, because in the default network context it is configured to use a proxy server."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleHostIsNonUnique":{"message":"The URL was not eligible to be prefetched because its host was not unique (e.g., a non publicly routable IP address or a hostname which is not registry-controlled), but the prefetch was required to be proxied."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleNonDefaultStoragePartition":{"message":"The URL was not eligible to be prefetched because it uses a non-default storage partition."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligiblePreloadingDisabled":{"message":"The prefetch was not performed because preloading was disabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy":{"message":"The URL was not eligible to be prefetched because the default network context cannot be configured to use the prefetch proxy for a same-site cross-origin prefetch request."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSchemeIsNotHttps":{"message":"The URL was not eligible to be prefetched because its scheme was not https:."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasCookies":{"message":"The URL was not eligible to be prefetched because it was cross-site, but the user had cookies for that origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasServiceWorker":{"message":"The URL was not eligible to be prefetched because there was a registered service worker for that origin, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedCookiesChanged":{"message":"The prefetch was not used because it was a cross-site prefetch, and cookies were added for that URL while the prefetch was ongoing, so the prefetched response is now out-of-date."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedProbeFailed":{"message":"The prefetch was blocked by your Internet Service Provider or network administrator."},"panels/application/preloading/components/PreloadingString.ts | PrefetchProxyNotAvailable":{"message":"A network error was encountered when trying to set up a connection to the prefetching proxy."},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsError":{"message":"Error"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsLocation":{"message":"Location"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsSource":{"message":"Source"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsValidity":{"message":"Validity"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityInvalid":{"message":"Invalid; source is not a JSON object"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validitySomeRulesInvalid":{"message":"Some rules are invalid and ignored"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityValid":{"message":"Valid"},"panels/application/preloading/components/RuleSetGrid.ts | location":{"message":"Location"},"panels/application/preloading/components/RuleSetGrid.ts | validity":{"message":"Validity"},"panels/application/preloading/components/UsedPreloadingView.ts | prefetchUsed":{"message":"{PH1} prefetched resources are used for this page"},"panels/application/preloading/components/UsedPreloadingView.ts | preloadingUsedForThisPage":{"message":"Preloading used for this page"},"panels/application/preloading/components/UsedPreloadingView.ts | prerenderUsed":{"message":"This page was prerendered"},"panels/application/preloading/PreloadingView.ts | extensionSettings":{"message":"Extensions settings"},"panels/application/preloading/PreloadingView.ts | filterAllRuleSets":{"message":"All rule sets"},"panels/application/preloading/PreloadingView.ts | filterFilterByRuleSet":{"message":"Filter by rule set"},"panels/application/preloading/PreloadingView.ts | filterRuleSet":{"message":"Rule set: {PH1}"},"panels/application/preloading/PreloadingView.ts | preloadingPageSettings":{"message":"Preload pages settings"},"panels/application/preloading/PreloadingView.ts | statusFailure":{"message":"Failure"},"panels/application/preloading/PreloadingView.ts | statusNotTriggered":{"message":"Not triggered"},"panels/application/preloading/PreloadingView.ts | statusPending":{"message":"Pending"},"panels/application/preloading/PreloadingView.ts | statusReady":{"message":"Ready"},"panels/application/preloading/PreloadingView.ts | statusRunning":{"message":"Running"},"panels/application/preloading/PreloadingView.ts | statusSuccess":{"message":"Success"},"panels/application/preloading/PreloadingView.ts | validityInvalid":{"message":"Invalid"},"panels/application/preloading/PreloadingView.ts | validitySomeRulesInvalid":{"message":"Some rules invalid"},"panels/application/preloading/PreloadingView.ts | validityValid":{"message":"Valid"},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByBatterysaver":{"message":"Preloading is disabled because of the operating system's Battery Saver mode."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByDatasaver":{"message":"Preloading is disabled because of the operating system's Data Saver mode."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByFeatureFlag":{"message":"Preloading is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingStateDisabled":{"message":"Preloading is disabled because of user settings or an extension. Go to {PH1} to learn more, or go to {PH2} to disable the extension."},"panels/application/preloading/PreloadingView.ts | warningDetailPrerenderingDisabledByFeatureFlag":{"message":"Prerendering is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingDisabledByFeatureFlag":{"message":"Preloading was disabled, but is force-enabled now"},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingStateDisabled":{"message":"Preloading is disabled"},"panels/application/preloading/PreloadingView.ts | warningTitlePrerenderingDisabledByFeatureFlag":{"message":"Prerendering was disabled, but is force-enabled now"},"panels/application/PreloadingTreeElement.ts | prefetchingAndPrerendering":{"message":"Prefetching & Prerendering"},"panels/application/PreloadingTreeElement.ts | thisPage":{"message":"This Page"},"panels/application/ReportingApiReportsView.ts | clickToDisplayBody":{"message":"Click on any report to display its body"},"panels/application/ReportingApiTreeElement.ts | reportingApi":{"message":"Reporting API"},"panels/application/ServiceWorkerCacheTreeElement.ts | cacheStorage":{"message":"Cache Storage"},"panels/application/ServiceWorkerCacheTreeElement.ts | delete":{"message":"Delete"},"panels/application/ServiceWorkerCacheTreeElement.ts | refreshCaches":{"message":"Refresh Caches"},"panels/application/ServiceWorkerCacheViews.ts | cache":{"message":"Cache"},"panels/application/ServiceWorkerCacheViews.ts | deleteSelected":{"message":"Delete Selected"},"panels/application/ServiceWorkerCacheViews.ts | filterByPath":{"message":"Filter by Path"},"panels/application/ServiceWorkerCacheViews.ts | headers":{"message":"Headers"},"panels/application/ServiceWorkerCacheViews.ts | matchingEntriesS":{"message":"Matching entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | name":{"message":"Name"},"panels/application/ServiceWorkerCacheViews.ts | preview":{"message":"Preview"},"panels/application/ServiceWorkerCacheViews.ts | refresh":{"message":"Refresh"},"panels/application/ServiceWorkerCacheViews.ts | selectACacheEntryAboveToPreview":{"message":"Select a cache entry above to preview"},"panels/application/ServiceWorkerCacheViews.ts | serviceWorkerCache":{"message":"Service Worker Cache"},"panels/application/ServiceWorkerCacheViews.ts | timeCached":{"message":"Time Cached"},"panels/application/ServiceWorkerCacheViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | varyHeaderWarning":{"message":"⚠️ Set ignoreVary to true when matching this entry"},"panels/application/ServiceWorkersView.ts | bypassForNetwork":{"message":"Bypass for network"},"panels/application/ServiceWorkersView.ts | bypassTheServiceWorkerAndLoad":{"message":"Bypass the service worker and load resources from the network"},"panels/application/ServiceWorkersView.ts | clients":{"message":"Clients"},"panels/application/ServiceWorkersView.ts | focus":{"message":"focus"},"panels/application/ServiceWorkersView.ts | inspect":{"message":"inspect"},"panels/application/ServiceWorkersView.ts | networkRequests":{"message":"Network requests"},"panels/application/ServiceWorkersView.ts | onPageReloadForceTheService":{"message":"On page reload, force the service worker to update, and activate it"},"panels/application/ServiceWorkersView.ts | periodicSync":{"message":"Periodic Sync"},"panels/application/ServiceWorkersView.ts | periodicSyncTag":{"message":"Periodic Sync tag"},"panels/application/ServiceWorkersView.ts | pushData":{"message":"Push data"},"panels/application/ServiceWorkersView.ts | pushString":{"message":"Push"},"panels/application/ServiceWorkersView.ts | receivedS":{"message":"Received {PH1}"},"panels/application/ServiceWorkersView.ts | sActivatedAndIsS":{"message":"#{PH1} activated and is {PH2}"},"panels/application/ServiceWorkersView.ts | sDeleted":{"message":"{PH1} - deleted"},"panels/application/ServiceWorkersView.ts | seeAllRegistrations":{"message":"See all registrations"},"panels/application/ServiceWorkersView.ts | serviceWorkerForS":{"message":"Service worker for {PH1}"},"panels/application/ServiceWorkersView.ts | serviceWorkersFromOtherOrigins":{"message":"Service workers from other origins"},"panels/application/ServiceWorkersView.ts | sIsRedundant":{"message":"#{PH1} is redundant"},"panels/application/ServiceWorkersView.ts | source":{"message":"Source"},"panels/application/ServiceWorkersView.ts | sRegistrationErrors":{"message":"{PH1} registration errors"},"panels/application/ServiceWorkersView.ts | startString":{"message":"start"},"panels/application/ServiceWorkersView.ts | status":{"message":"Status"},"panels/application/ServiceWorkersView.ts | stopString":{"message":"stop"},"panels/application/ServiceWorkersView.ts | sTryingToInstall":{"message":"#{PH1} trying to install"},"panels/application/ServiceWorkersView.ts | sWaitingToActivate":{"message":"#{PH1} waiting to activate"},"panels/application/ServiceWorkersView.ts | syncString":{"message":"Sync"},"panels/application/ServiceWorkersView.ts | syncTag":{"message":"Sync tag"},"panels/application/ServiceWorkersView.ts | testPushMessageFromDevtools":{"message":"Test push message from DevTools."},"panels/application/ServiceWorkersView.ts | unregister":{"message":"Unregister"},"panels/application/ServiceWorkersView.ts | unregisterServiceWorker":{"message":"Unregister service worker"},"panels/application/ServiceWorkersView.ts | update":{"message":"Update"},"panels/application/ServiceWorkersView.ts | updateCycle":{"message":"Update Cycle"},"panels/application/ServiceWorkersView.ts | updateOnReload":{"message":"Update on reload"},"panels/application/ServiceWorkersView.ts | workerS":{"message":"Worker: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | endTimeS":{"message":"End time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | startTimeS":{"message":"Start time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | timeline":{"message":"Timeline"},"panels/application/ServiceWorkerUpdateCycleView.ts | updateActivity":{"message":"Update Activity"},"panels/application/ServiceWorkerUpdateCycleView.ts | version":{"message":"Version"},"panels/application/SharedStorageEventsView.ts | clickToDisplayBody":{"message":"Click on any shared storage event to display the event parameters."},"panels/application/SharedStorageItemsView.ts | key":{"message":"Key"},"panels/application/SharedStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/SharedStorageItemsView.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/SharedStorageItemsView.ts | sharedStorageFilteredItemsCleared":{"message":"Shared Storage filtered items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEditCanceled":{"message":"The storage item edit was canceled."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEdited":{"message":"The storage item was edited."},"panels/application/SharedStorageItemsView.ts | sharedStorageItems":{"message":"Shared Storage Items"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemsCleared":{"message":"Shared Storage items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/SharedStorageItemsView.ts | value":{"message":"Value"},"panels/application/SharedStorageListTreeElement.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/StorageItemsView.ts | clearAll":{"message":"Clear All"},"panels/application/StorageItemsView.ts | deleteSelected":{"message":"Delete Selected"},"panels/application/StorageItemsView.ts | filter":{"message":"Filter"},"panels/application/StorageItemsView.ts | refresh":{"message":"Refresh"},"panels/application/StorageItemsView.ts | refreshedStatus":{"message":"Table refreshed"},"panels/application/StorageView.ts | application":{"message":"Application"},"panels/application/StorageView.ts | cache":{"message":"Cache"},"panels/application/StorageView.ts | cacheStorage":{"message":"Cache storage"},"panels/application/StorageView.ts | clearing":{"message":"Clearing..."},"panels/application/StorageView.ts | clearSiteData":{"message":"Clear site data"},"panels/application/StorageView.ts | cookies":{"message":"Cookies"},"panels/application/StorageView.ts | fileSystem":{"message":"File System"},"panels/application/StorageView.ts | includingThirdPartyCookies":{"message":"including third-party cookies"},"panels/application/StorageView.ts | indexDB":{"message":"IndexedDB"},"panels/application/StorageView.ts | internalError":{"message":"Internal error"},"panels/application/StorageView.ts | learnMore":{"message":"Learn more"},"panels/application/StorageView.ts | localAndSessionStorage":{"message":"Local and session storage"},"panels/application/StorageView.ts | mb":{"message":"MB"},"panels/application/StorageView.ts | numberMustBeNonNegative":{"message":"Number must be non-negative"},"panels/application/StorageView.ts | numberMustBeSmaller":{"message":"Number must be smaller than {PH1}"},"panels/application/StorageView.ts | other":{"message":"Other"},"panels/application/StorageView.ts | pleaseEnterANumber":{"message":"Please enter a number"},"panels/application/StorageView.ts | serviceWorkers":{"message":"Service Workers"},"panels/application/StorageView.ts | sFailedToLoad":{"message":"{PH1} (failed to load)"},"panels/application/StorageView.ts | simulateCustomStorage":{"message":"Simulate custom storage quota"},"panels/application/StorageView.ts | SiteDataCleared":{"message":"Site data cleared"},"panels/application/StorageView.ts | storageQuotaIsLimitedIn":{"message":"Storage quota is limited in Incognito mode"},"panels/application/StorageView.ts | storageQuotaUsed":{"message":"{PH1} used out of {PH2} storage quota"},"panels/application/StorageView.ts | storageQuotaUsedWithBytes":{"message":"{PH1} bytes used out of {PH2} bytes storage quota"},"panels/application/StorageView.ts | storageTitle":{"message":"Storage"},"panels/application/StorageView.ts | storageUsage":{"message":"Storage usage"},"panels/application/StorageView.ts | storageWithCustomMarker":{"message":"{PH1} (custom)"},"panels/application/StorageView.ts | unregisterServiceWorker":{"message":"Unregister service workers"},"panels/application/StorageView.ts | usage":{"message":"Usage"},"panels/application/StorageView.ts | webSql":{"message":"Web SQL"},"panels/application/TrustTokensTreeElement.ts | trustTokens":{"message":"Private State Tokens"},"panels/browser_debugger/browser_debugger-meta.ts | contentScripts":{"message":"Content scripts"},"panels/browser_debugger/browser_debugger-meta.ts | cspViolationBreakpoints":{"message":"CSP Violation Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | domBreakpoints":{"message":"DOM Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | eventListenerBreakpoints":{"message":"Event Listener Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | globalListeners":{"message":"Global Listeners"},"panels/browser_debugger/browser_debugger-meta.ts | overrides":{"message":"Overrides"},"panels/browser_debugger/browser_debugger-meta.ts | page":{"message":"Page"},"panels/browser_debugger/browser_debugger-meta.ts | showContentScripts":{"message":"Show Content scripts"},"panels/browser_debugger/browser_debugger-meta.ts | showCspViolationBreakpoints":{"message":"Show CSP Violation Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showDomBreakpoints":{"message":"Show DOM Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showEventListenerBreakpoints":{"message":"Show Event Listener Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showGlobalListeners":{"message":"Show Global Listeners"},"panels/browser_debugger/browser_debugger-meta.ts | showOverrides":{"message":"Show Overrides"},"panels/browser_debugger/browser_debugger-meta.ts | showPage":{"message":"Show Page"},"panels/browser_debugger/browser_debugger-meta.ts | showXhrfetchBreakpoints":{"message":"Show XHR/fetch Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | xhrfetchBreakpoints":{"message":"XHR/fetch Breakpoints"},"panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | attributeModified":{"message":"Attribute modified"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakOn":{"message":"Break on"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointRemoved":{"message":"Breakpoint removed"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointSet":{"message":"Breakpoint set"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | checked":{"message":"checked"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | domBreakpointsList":{"message":"DOM Breakpoints list"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | noBreakpoints":{"message":"No breakpoints"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | nodeRemoved":{"message":"Node removed"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeAllDomBreakpoints":{"message":"Remove all DOM breakpoints"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | revealDomNodeInElementsPanel":{"message":"Reveal DOM node in Elements panel"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sBreakpointHit":{"message":"{PH1} breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sS":{"message":"{PH1}: {PH2}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sSS":{"message":"{PH1}: {PH2}, {PH3}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | subtreeModified":{"message":"Subtree modified"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | unchecked":{"message":"unchecked"},"panels/browser_debugger/ObjectEventListenersSidebarPane.ts | refreshGlobalListeners":{"message":"Refresh global listeners"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addXhrfetchBreakpoint":{"message":"Add XHR/fetch breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | anyXhrOrFetch":{"message":"Any XHR or fetch"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakWhenUrlContains":{"message":"Break when URL contains:"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | noBreakpoints":{"message":"No breakpoints"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeAllBreakpoints":{"message":"Remove all breakpoints"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlBreakpoint":{"message":"URL Breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlContainsS":{"message":"URL contains \"{PH1}\""},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | xhrfetchBreakpoints":{"message":"XHR/fetch Breakpoints"},"panels/changes/changes-meta.ts | changes":{"message":"Changes"},"panels/changes/changes-meta.ts | showChanges":{"message":"Show Changes"},"panels/changes/ChangesSidebar.ts | sFromSourceMap":{"message":"{PH1} (from source map)"},"panels/changes/ChangesView.ts | binaryData":{"message":"Binary data"},"panels/changes/ChangesView.ts | copy":{"message":"Copy"},"panels/changes/ChangesView.ts | copyAllChangesFromCurrentFile":{"message":"Copy all changes from current file"},"panels/changes/ChangesView.ts | noChanges":{"message":"No changes"},"panels/changes/ChangesView.ts | revertAllChangesToCurrentFile":{"message":"Revert all changes to current file"},"panels/changes/ChangesView.ts | sDeletions":{"message":"{n, plural, =1 {# deletion (-)} other {# deletions (-)}}"},"panels/changes/ChangesView.ts | sInsertions":{"message":"{n, plural, =1 {# insertion (+)} other {# insertions (+)}}"},"panels/console_counters/WarningErrorCounter.ts | openConsoleToViewS":{"message":"Open Console to view {PH1}"},"panels/console_counters/WarningErrorCounter.ts | openIssuesToView":{"message":"{n, plural, =1 {Open Issues to view # issue:} other {Open Issues to view # issues:}}"},"panels/console_counters/WarningErrorCounter.ts | sErrors":{"message":"{n, plural, =1 {# error} other {# errors}}"},"panels/console_counters/WarningErrorCounter.ts | sWarnings":{"message":"{n, plural, =1 {# warning} other {# warnings}}"},"panels/console/console-meta.ts | autocompleteFromHistory":{"message":"Autocomplete from history"},"panels/console/console-meta.ts | autocompleteOnEnter":{"message":"Accept autocomplete suggestion on Enter"},"panels/console/console-meta.ts | clearConsole":{"message":"Clear console"},"panels/console/console-meta.ts | clearConsoleHistory":{"message":"Clear console history"},"panels/console/console-meta.ts | collapseConsoleTraceMessagesByDefault":{"message":"Do not automatically expand console.trace() messages"},"panels/console/console-meta.ts | console":{"message":"Console"},"panels/console/console-meta.ts | createLiveExpression":{"message":"Create live expression"},"panels/console/console-meta.ts | doNotAutocompleteFromHistory":{"message":"Do not autocomplete from history"},"panels/console/console-meta.ts | doNotAutocompleteOnEnter":{"message":"Do not accept autocomplete suggestion on Enter"},"panels/console/console-meta.ts | doNotEagerlyEvaluateConsole":{"message":"Do not eagerly evaluate console prompt text"},"panels/console/console-meta.ts | doNotGroupSimilarMessagesIn":{"message":"Do not group similar messages in console"},"panels/console/console-meta.ts | doNotShowCorsErrorsIn":{"message":"Do not show CORS errors in console"},"panels/console/console-meta.ts | doNotTreatEvaluationAsUser":{"message":"Do not treat evaluation as user activation"},"panels/console/console-meta.ts | eagerEvaluation":{"message":"Eager evaluation"},"panels/console/console-meta.ts | eagerlyEvaluateConsolePromptText":{"message":"Eagerly evaluate console prompt text"},"panels/console/console-meta.ts | evaluateTriggersUserActivation":{"message":"Treat code evaluation as user action"},"panels/console/console-meta.ts | expandConsoleTraceMessagesByDefault":{"message":"Automatically expand console.trace() messages"},"panels/console/console-meta.ts | groupSimilarMessagesInConsole":{"message":"Group similar messages in console"},"panels/console/console-meta.ts | hideNetworkMessages":{"message":"Hide network messages"},"panels/console/console-meta.ts | hideTimestamps":{"message":"Hide timestamps"},"panels/console/console-meta.ts | logXmlhttprequests":{"message":"Log XMLHttpRequests"},"panels/console/console-meta.ts | onlyShowMessagesFromTheCurrent":{"message":"Only show messages from the current context (top, iframe, worker, extension)"},"panels/console/console-meta.ts | selectedContextOnly":{"message":"Selected context only"},"panels/console/console-meta.ts | showConsole":{"message":"Show Console"},"panels/console/console-meta.ts | showCorsErrorsInConsole":{"message":"Show CORS errors in console"},"panels/console/console-meta.ts | showMessagesFromAllContexts":{"message":"Show messages from all contexts"},"panels/console/console-meta.ts | showNetworkMessages":{"message":"Show network messages"},"panels/console/console-meta.ts | showTimestamps":{"message":"Show timestamps"},"panels/console/console-meta.ts | treatEvaluationAsUserActivation":{"message":"Treat evaluation as user activation"},"panels/console/ConsoleContextSelector.ts | extension":{"message":"Extension"},"panels/console/ConsoleContextSelector.ts | javascriptContextNotSelected":{"message":"JavaScript context: Not selected"},"panels/console/ConsoleContextSelector.ts | javascriptContextS":{"message":"JavaScript context: {PH1}"},"panels/console/ConsolePinPane.ts | evaluateAllowingSideEffects":{"message":"Evaluate, allowing side effects"},"panels/console/ConsolePinPane.ts | expression":{"message":"Expression"},"panels/console/ConsolePinPane.ts | liveExpressionEditor":{"message":"Live expression editor"},"panels/console/ConsolePinPane.ts | notAvailable":{"message":"not available"},"panels/console/ConsolePinPane.ts | removeAllExpressions":{"message":"Remove all expressions"},"panels/console/ConsolePinPane.ts | removeBlankExpression":{"message":"Remove blank expression"},"panels/console/ConsolePinPane.ts | removeExpression":{"message":"Remove expression"},"panels/console/ConsolePinPane.ts | removeExpressionS":{"message":"Remove expression: {PH1}"},"panels/console/ConsolePrompt.ts | consolePrompt":{"message":"Console prompt"},"panels/console/ConsoleSidebar.ts | dErrors":{"message":"{n, plural, =0 {No errors} =1 {# error} other {# errors}}"},"panels/console/ConsoleSidebar.ts | dInfo":{"message":"{n, plural, =0 {No info} =1 {# info} other {# info}}"},"panels/console/ConsoleSidebar.ts | dMessages":{"message":"{n, plural, =0 {No messages} =1 {# message} other {# messages}}"},"panels/console/ConsoleSidebar.ts | dUserMessages":{"message":"{n, plural, =0 {No user messages} =1 {# user message} other {# user messages}}"},"panels/console/ConsoleSidebar.ts | dVerbose":{"message":"{n, plural, =0 {No verbose} =1 {# verbose} other {# verbose}}"},"panels/console/ConsoleSidebar.ts | dWarnings":{"message":"{n, plural, =0 {No warnings} =1 {# warning} other {# warnings}}"},"panels/console/ConsoleSidebar.ts | other":{"message":""},"panels/console/ConsoleView.ts | allLevels":{"message":"All levels"},"panels/console/ConsoleView.ts | autocompleteFromHistory":{"message":"Autocomplete from history"},"panels/console/ConsoleView.ts | consoleCleared":{"message":"Console cleared"},"panels/console/ConsoleView.ts | consolePasteBlocked":{"message":"Pasting code is blocked on this page. Pasting code into devtools can allow attackers to take over your account."},"panels/console/ConsoleView.ts | consoleSettings":{"message":"Console settings"},"panels/console/ConsoleView.ts | consoleSidebarHidden":{"message":"Console sidebar hidden"},"panels/console/ConsoleView.ts | consoleSidebarShown":{"message":"Console sidebar shown"},"panels/console/ConsoleView.ts | copyVisibleStyledSelection":{"message":"Copy visible styled selection"},"panels/console/ConsoleView.ts | customLevels":{"message":"Custom levels"},"panels/console/ConsoleView.ts | default":{"message":"Default"},"panels/console/ConsoleView.ts | defaultLevels":{"message":"Default levels"},"panels/console/ConsoleView.ts | doNotClearLogOnPageReload":{"message":"Do not clear log on page reload / navigation"},"panels/console/ConsoleView.ts | eagerlyEvaluateTextInThePrompt":{"message":"Eagerly evaluate text in the prompt"},"panels/console/ConsoleView.ts | egEventdCdnUrlacom":{"message":"e.g. /eventd/ -cdn url:a.com"},"panels/console/ConsoleView.ts | errors":{"message":"Errors"},"panels/console/ConsoleView.ts | filter":{"message":"Filter"},"panels/console/ConsoleView.ts | filteredMessagesInConsole":{"message":"{PH1} messages in console"},"panels/console/ConsoleView.ts | findStringInLogs":{"message":"Find string in logs"},"panels/console/ConsoleView.ts | groupSimilarMessagesInConsole":{"message":"Group similar messages in console"},"panels/console/ConsoleView.ts | hideAll":{"message":"Hide all"},"panels/console/ConsoleView.ts | hideConsoleSidebar":{"message":"Hide console sidebar"},"panels/console/ConsoleView.ts | hideMessagesFromS":{"message":"Hide messages from {PH1}"},"panels/console/ConsoleView.ts | hideNetwork":{"message":"Hide network"},"panels/console/ConsoleView.ts | info":{"message":"Info"},"panels/console/ConsoleView.ts | issuesWithColon":{"message":"{n, plural, =0 {No Issues} =1 {# Issue:} other {# Issues:}}"},"panels/console/ConsoleView.ts | issueToolbarClickToGoToTheIssuesTab":{"message":"Click to go to the issues tab"},"panels/console/ConsoleView.ts | issueToolbarClickToView":{"message":"Click to view {issueEnumeration}"},"panels/console/ConsoleView.ts | issueToolbarTooltipGeneral":{"message":"Some problems no longer generate console messages, but are surfaced in the issues tab."},"panels/console/ConsoleView.ts | logLevels":{"message":"Log levels"},"panels/console/ConsoleView.ts | logLevelS":{"message":"Log level: {PH1}"},"panels/console/ConsoleView.ts | logXMLHttpRequests":{"message":"Log XMLHttpRequests"},"panels/console/ConsoleView.ts | onlyShowMessagesFromTheCurrentContext":{"message":"Only show messages from the current context (top, iframe, worker, extension)"},"panels/console/ConsoleView.ts | overriddenByFilterSidebar":{"message":"Overridden by filter sidebar"},"panels/console/ConsoleView.ts | preserveLog":{"message":"Preserve log"},"panels/console/ConsoleView.ts | replayXhr":{"message":"Replay XHR"},"panels/console/ConsoleView.ts | saveAs":{"message":"Save as..."},"panels/console/ConsoleView.ts | searching":{"message":"Searching…"},"panels/console/ConsoleView.ts | selectedContextOnly":{"message":"Selected context only"},"panels/console/ConsoleView.ts | sHidden":{"message":"{n, plural, =1 {# hidden} other {# hidden}}"},"panels/console/ConsoleView.ts | showConsoleSidebar":{"message":"Show console sidebar"},"panels/console/ConsoleView.ts | showCorsErrorsInConsole":{"message":"Show CORS errors in console"},"panels/console/ConsoleView.ts | sOnly":{"message":"{PH1} only"},"panels/console/ConsoleView.ts | treatEvaluationAsUserActivation":{"message":"Treat evaluation as user activation"},"panels/console/ConsoleView.ts | verbose":{"message":"Verbose"},"panels/console/ConsoleView.ts | warnings":{"message":"Warnings"},"panels/console/ConsoleView.ts | writingFile":{"message":"Writing file…"},"panels/console/ConsoleViewMessage.ts | assertionFailed":{"message":"Assertion failed: "},"panels/console/ConsoleViewMessage.ts | attribute":{"message":""},"panels/console/ConsoleViewMessage.ts | clearAllMessagesWithS":{"message":"Clear all messages with {PH1}"},"panels/console/ConsoleViewMessage.ts | cndBreakpoint":{"message":"Conditional Breakpoint"},"panels/console/ConsoleViewMessage.ts | console":{"message":"Console"},"panels/console/ConsoleViewMessage.ts | consoleclearWasPreventedDueTo":{"message":"console.clear() was prevented due to 'Preserve log'"},"panels/console/ConsoleViewMessage.ts | consoleWasCleared":{"message":"Console was cleared"},"panels/console/ConsoleViewMessage.ts | deprecationS":{"message":"[Deprecation] {PH1}"},"panels/console/ConsoleViewMessage.ts | error":{"message":"Error"},"panels/console/ConsoleViewMessage.ts | errorS":{"message":"{n, plural, =1 {Error, Repeated # time} other {Error, Repeated # times}}"},"panels/console/ConsoleViewMessage.ts | exception":{"message":""},"panels/console/ConsoleViewMessage.ts | functionWasResolvedFromBound":{"message":"Function was resolved from bound function."},"panels/console/ConsoleViewMessage.ts | index":{"message":"(index)"},"panels/console/ConsoleViewMessage.ts | interventionS":{"message":"[Intervention] {PH1}"},"panels/console/ConsoleViewMessage.ts | logpoint":{"message":"Logpoint"},"panels/console/ConsoleViewMessage.ts | Mxx":{"message":" M"},"panels/console/ConsoleViewMessage.ts | repeatS":{"message":"{n, plural, =1 {Repeated # time} other {Repeated # times}}"},"panels/console/ConsoleViewMessage.ts | someEvent":{"message":" event"},"panels/console/ConsoleViewMessage.ts | stackMessageCollapsed":{"message":"Stack table collapsed"},"panels/console/ConsoleViewMessage.ts | stackMessageExpanded":{"message":"Stack table expanded"},"panels/console/ConsoleViewMessage.ts | thisValueWasEvaluatedUponFirst":{"message":"This value was evaluated upon first expanding. It may have changed since then."},"panels/console/ConsoleViewMessage.ts | thisValueWillNotBeCollectedUntil":{"message":"This value will not be collected until console is cleared."},"panels/console/ConsoleViewMessage.ts | tookNms":{"message":"took ms"},"panels/console/ConsoleViewMessage.ts | url":{"message":""},"panels/console/ConsoleViewMessage.ts | value":{"message":"Value"},"panels/console/ConsoleViewMessage.ts | violationS":{"message":"[Violation] {PH1}"},"panels/console/ConsoleViewMessage.ts | warning":{"message":"Warning"},"panels/console/ConsoleViewMessage.ts | warningS":{"message":"{n, plural, =1 {Warning, Repeated # time} other {Warning, Repeated # times}}"},"panels/coverage/coverage-meta.ts | coverage":{"message":"Coverage"},"panels/coverage/coverage-meta.ts | instrumentCoverage":{"message":"Instrument coverage"},"panels/coverage/coverage-meta.ts | reloadPage":{"message":"Reload page"},"panels/coverage/coverage-meta.ts | showCoverage":{"message":"Show Coverage"},"panels/coverage/coverage-meta.ts | startInstrumentingCoverageAnd":{"message":"Start instrumenting coverage and reload page"},"panels/coverage/coverage-meta.ts | stopInstrumentingCoverageAndShow":{"message":"Stop instrumenting coverage and show results"},"panels/coverage/CoverageListView.ts | codeCoverage":{"message":"Code Coverage"},"panels/coverage/CoverageListView.ts | css":{"message":"CSS"},"panels/coverage/CoverageListView.ts | jsCoverageWithPerBlock":{"message":"JS coverage with per block granularity: Once a block of JavaScript was executed, that block is marked as covered."},"panels/coverage/CoverageListView.ts | jsCoverageWithPerFunction":{"message":"JS coverage with per function granularity: Once a function was executed, the whole function is marked as covered."},"panels/coverage/CoverageListView.ts | jsPerBlock":{"message":"JS (per block)"},"panels/coverage/CoverageListView.ts | jsPerFunction":{"message":"JS (per function)"},"panels/coverage/CoverageListView.ts | sBytes":{"message":"{n, plural, =1 {# byte} other {# bytes}}"},"panels/coverage/CoverageListView.ts | sBytesS":{"message":"{n, plural, =1 {# byte, {percentage}} other {# bytes, {percentage}}}"},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOf":{"message":"{PH1} bytes ({PH2}) belong to blocks of JavaScript that have not (yet) been executed."},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOfJavascript":{"message":"{PH1} bytes ({PH2}) belong to blocks of JavaScript that have executed at least once."},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHave":{"message":"{PH1} bytes ({PH2}) belong to functions that have not (yet) been executed."},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHaveExecuted":{"message":"{PH1} bytes ({PH2}) belong to functions that have executed at least once."},"panels/coverage/CoverageListView.ts | sOfFileUnusedSOfFileUsed":{"message":"{PH1} % of file unused, {PH2} % of file used"},"panels/coverage/CoverageListView.ts | totalBytes":{"message":"Total Bytes"},"panels/coverage/CoverageListView.ts | type":{"message":"Type"},"panels/coverage/CoverageListView.ts | unusedBytes":{"message":"Unused Bytes"},"panels/coverage/CoverageListView.ts | url":{"message":"URL"},"panels/coverage/CoverageListView.ts | usageVisualization":{"message":"Usage Visualization"},"panels/coverage/CoverageView.ts | activationNoCapture":{"message":"Could not capture coverage info because the page was prerendered in the background."},"panels/coverage/CoverageView.ts | all":{"message":"All"},"panels/coverage/CoverageView.ts | bfcacheNoCapture":{"message":"Could not capture coverage info because the page was served from the back/forward cache."},"panels/coverage/CoverageView.ts | chooseCoverageGranularityPer":{"message":"Choose coverage granularity: Per function has low overhead, per block has significant overhead."},"panels/coverage/CoverageView.ts | clearAll":{"message":"Clear all"},"panels/coverage/CoverageView.ts | clickTheRecordButtonSToStart":{"message":"Click the record button {PH1} to start capturing coverage."},"panels/coverage/CoverageView.ts | clickTheReloadButtonSToReloadAnd":{"message":"Click the reload button {PH1} to reload and start capturing coverage."},"panels/coverage/CoverageView.ts | contentScripts":{"message":"Content scripts"},"panels/coverage/CoverageView.ts | css":{"message":"CSS"},"panels/coverage/CoverageView.ts | export":{"message":"Export..."},"panels/coverage/CoverageView.ts | filterCoverageByType":{"message":"Filter coverage by type"},"panels/coverage/CoverageView.ts | filteredSTotalS":{"message":"Filtered: {PH1} Total: {PH2}"},"panels/coverage/CoverageView.ts | includeExtensionContentScripts":{"message":"Include extension content scripts"},"panels/coverage/CoverageView.ts | javascript":{"message":"JavaScript"},"panels/coverage/CoverageView.ts | perBlock":{"message":"Per block"},"panels/coverage/CoverageView.ts | perFunction":{"message":"Per function"},"panels/coverage/CoverageView.ts | reloadPrompt":{"message":"Click the reload button {PH1} to reload and get coverage."},"panels/coverage/CoverageView.ts | sOfSSUsedSoFarSUnused":{"message":"{PH1} of {PH2} ({PH3}%) used so far, {PH4} unused."},"panels/coverage/CoverageView.ts | urlFilter":{"message":"URL filter"},"panels/css_overview/components/CSSOverviewStartView.ts | captureOverview":{"message":"Capture overview"},"panels/css_overview/components/CSSOverviewStartView.ts | capturePageCSSOverview":{"message":"Capture an overview of your page’s CSS"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovements":{"message":"Identify potential CSS improvements"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovementsWithExampleIssues":{"message":"Identify potential CSS improvements (e.g. low contrast issues, unused declarations, color or font mismatches)"},"panels/css_overview/components/CSSOverviewStartView.ts | locateAffectedElements":{"message":"Locate the affected elements in the Elements panel"},"panels/css_overview/components/CSSOverviewStartView.ts | quickStartWithCSSOverview":{"message":"Quick start: get started with the new CSS Overview panel"},"panels/css_overview/css_overview-meta.ts | cssOverview":{"message":"CSS Overview"},"panels/css_overview/css_overview-meta.ts | showCssOverview":{"message":"Show CSS Overview"},"panels/css_overview/CSSOverviewCompletedView.ts | aa":{"message":"AA"},"panels/css_overview/CSSOverviewCompletedView.ts | aaa":{"message":"AAA"},"panels/css_overview/CSSOverviewCompletedView.ts | apca":{"message":"APCA"},"panels/css_overview/CSSOverviewCompletedView.ts | attributeSelectors":{"message":"Attribute selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | backgroundColorsS":{"message":"Background colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | borderColorsS":{"message":"Border colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | classSelectors":{"message":"Class selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | colors":{"message":"Colors"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssues":{"message":"Contrast issues"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssuesS":{"message":"Contrast issues: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastRatio":{"message":"Contrast ratio"},"panels/css_overview/CSSOverviewCompletedView.ts | cssOverviewElements":{"message":"CSS Overview Elements"},"panels/css_overview/CSSOverviewCompletedView.ts | declaration":{"message":"Declaration"},"panels/css_overview/CSSOverviewCompletedView.ts | element":{"message":"Element"},"panels/css_overview/CSSOverviewCompletedView.ts | elements":{"message":"Elements"},"panels/css_overview/CSSOverviewCompletedView.ts | externalStylesheets":{"message":"External stylesheets"},"panels/css_overview/CSSOverviewCompletedView.ts | fillColorsS":{"message":"Fill colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | fontInfo":{"message":"Font info"},"panels/css_overview/CSSOverviewCompletedView.ts | idSelectors":{"message":"ID selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | inlineStyleElements":{"message":"Inline style elements"},"panels/css_overview/CSSOverviewCompletedView.ts | mediaQueries":{"message":"Media queries"},"panels/css_overview/CSSOverviewCompletedView.ts | nOccurrences":{"message":"{n, plural, =1 {# occurrence} other {# occurrences}}"},"panels/css_overview/CSSOverviewCompletedView.ts | nonsimpleSelectors":{"message":"Non-simple selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | overviewSummary":{"message":"Overview summary"},"panels/css_overview/CSSOverviewCompletedView.ts | showElement":{"message":"Show element"},"panels/css_overview/CSSOverviewCompletedView.ts | source":{"message":"Source"},"panels/css_overview/CSSOverviewCompletedView.ts | styleRules":{"message":"Style rules"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorSOverSBackgroundResults":{"message":"Text color {PH1} over {PH2} background results in low contrast for {PH3} elements"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorsS":{"message":"Text colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoFonts":{"message":"There are no fonts."},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoMediaQueries":{"message":"There are no media queries."},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoUnusedDeclarations":{"message":"There are no unused declarations."},"panels/css_overview/CSSOverviewCompletedView.ts | typeSelectors":{"message":"Type selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | universalSelectors":{"message":"Universal selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | unusedDeclarations":{"message":"Unused declarations"},"panels/css_overview/CSSOverviewProcessingView.ts | cancel":{"message":"Cancel"},"panels/css_overview/CSSOverviewSidebarPanel.ts | clearOverview":{"message":"Clear overview"},"panels/css_overview/CSSOverviewSidebarPanel.ts | cssOverviewPanelSidebar":{"message":"CSS Overview panel sidebar"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | bottomAppliedToAStatically":{"message":"Bottom applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | heightAppliedToAnInlineElement":{"message":"Height applied to an inline element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | leftAppliedToAStatically":{"message":"Left applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | rightAppliedToAStatically":{"message":"Right applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | topAppliedToAStatically":{"message":"Top applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | verticalAlignmentAppliedTo":{"message":"Vertical alignment applied to element which is neither inline nor table-cell"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | widthAppliedToAnInlineElement":{"message":"Width applied to an inline element"},"panels/developer_resources/developer_resources-meta.ts | developerResources":{"message":"Developer Resources"},"panels/developer_resources/developer_resources-meta.ts | showDeveloperResources":{"message":"Show Developer Resources"},"panels/developer_resources/DeveloperResourcesListView.ts | copyInitiatorUrl":{"message":"Copy initiator URL"},"panels/developer_resources/DeveloperResourcesListView.ts | copyUrl":{"message":"Copy URL"},"panels/developer_resources/DeveloperResourcesListView.ts | developerResources":{"message":"Developer Resources"},"panels/developer_resources/DeveloperResourcesListView.ts | error":{"message":"Error"},"panels/developer_resources/DeveloperResourcesListView.ts | failure":{"message":"failure"},"panels/developer_resources/DeveloperResourcesListView.ts | initiator":{"message":"Initiator"},"panels/developer_resources/DeveloperResourcesListView.ts | pending":{"message":"pending"},"panels/developer_resources/DeveloperResourcesListView.ts | sBytes":{"message":"{n, plural, =1 {# byte} other {# bytes}}"},"panels/developer_resources/DeveloperResourcesListView.ts | status":{"message":"Status"},"panels/developer_resources/DeveloperResourcesListView.ts | success":{"message":"success"},"panels/developer_resources/DeveloperResourcesListView.ts | totalBytes":{"message":"Total Bytes"},"panels/developer_resources/DeveloperResourcesListView.ts | url":{"message":"URL"},"panels/developer_resources/DeveloperResourcesView.ts | enableLoadingThroughTarget":{"message":"Load through website"},"panels/developer_resources/DeveloperResourcesView.ts | enterTextToSearchTheUrlAndError":{"message":"Enter text to search the URL and Error columns"},"panels/developer_resources/DeveloperResourcesView.ts | loadHttpsDeveloperResources":{"message":"Load HTTP(S) developer resources through the website you inspect, not through DevTools"},"panels/developer_resources/DeveloperResourcesView.ts | resources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/developer_resources/DeveloperResourcesView.ts | resourcesCurrentlyLoading":{"message":"{PH1} resources, {PH2} currently loading"},"panels/elements/ClassesPaneWidget.ts | addNewClass":{"message":"Add new class"},"panels/elements/ClassesPaneWidget.ts | classesSAdded":{"message":"Classes {PH1} added"},"panels/elements/ClassesPaneWidget.ts | classSAdded":{"message":"Class {PH1} added"},"panels/elements/ClassesPaneWidget.ts | elementClasses":{"message":"Element Classes"},"panels/elements/ColorSwatchPopoverIcon.ts | openCubicBezierEditor":{"message":"Open cubic bezier editor"},"panels/elements/ColorSwatchPopoverIcon.ts | openShadowEditor":{"message":"Open shadow editor"},"panels/elements/components/AccessibilityTreeNode.ts | ignored":{"message":"Ignored"},"panels/elements/components/AdornerSettingsPane.ts | closeButton":{"message":"Close"},"panels/elements/components/AdornerSettingsPane.ts | settingsTitle":{"message":"Show badges"},"panels/elements/components/CSSHintDetailsView.ts | learnMore":{"message":"Learn More"},"panels/elements/components/CSSPropertyDocsView.ts | dontShow":{"message":"Don't show"},"panels/elements/components/CSSPropertyDocsView.ts | learnMore":{"message":"Learn more"},"panels/elements/components/ElementsBreadcrumbs.ts | breadcrumbs":{"message":"DOM tree breadcrumbs"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollLeft":{"message":"Scroll left"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollRight":{"message":"Scroll right"},"panels/elements/components/ElementsBreadcrumbsUtils.ts | text":{"message":"(text)"},"panels/elements/components/LayoutPane.ts | chooseElementOverlayColor":{"message":"Choose the overlay color for this element"},"panels/elements/components/LayoutPane.ts | colorPickerOpened":{"message":"Color picker opened."},"panels/elements/components/LayoutPane.ts | flexbox":{"message":"Flexbox"},"panels/elements/components/LayoutPane.ts | flexboxOverlays":{"message":"Flexbox overlays"},"panels/elements/components/LayoutPane.ts | grid":{"message":"Grid"},"panels/elements/components/LayoutPane.ts | gridOverlays":{"message":"Grid overlays"},"panels/elements/components/LayoutPane.ts | noFlexboxLayoutsFoundOnThisPage":{"message":"No flexbox layouts found on this page"},"panels/elements/components/LayoutPane.ts | noGridLayoutsFoundOnThisPage":{"message":"No grid layouts found on this page"},"panels/elements/components/LayoutPane.ts | overlayDisplaySettings":{"message":"Overlay display settings"},"panels/elements/components/LayoutPane.ts | showElementInTheElementsPanel":{"message":"Show element in the Elements panel"},"panels/elements/components/StylePropertyEditor.ts | deselectButton":{"message":"Remove {propertyName}: {propertyValue}"},"panels/elements/components/StylePropertyEditor.ts | selectButton":{"message":"Add {propertyName}: {propertyValue}"},"panels/elements/ComputedStyleWidget.ts | filter":{"message":"Filter"},"panels/elements/ComputedStyleWidget.ts | filterComputedStyles":{"message":"Filter Computed Styles"},"panels/elements/ComputedStyleWidget.ts | group":{"message":"Group"},"panels/elements/ComputedStyleWidget.ts | navigateToSelectorSource":{"message":"Navigate to selector source"},"panels/elements/ComputedStyleWidget.ts | navigateToStyle":{"message":"Navigate to style"},"panels/elements/ComputedStyleWidget.ts | noMatchingProperty":{"message":"No matching property"},"panels/elements/ComputedStyleWidget.ts | showAll":{"message":"Show all"},"panels/elements/CSSRuleValidator.ts | fontVariationSettingsWarning":{"message":"Value for setting “{PH1}” {PH2} is outside the supported range [{PH3}, {PH4}] for font-family “{PH5}”."},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleFix":{"message":"Try setting the {EXISTING_PARENT_ELEMENT_RULE} property on the parent to {TARGET_PARENT_ELEMENT_RULE}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleReason":{"message":"The {REASON_PROPERTY_DECLARATION_CODE} property on the parent element prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleChangeSuggestion":{"message":"Try setting the {EXISTING_PROPERTY_DECLARATION} property to {TARGET_PROPERTY_DECLARATION}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleFix":{"message":"Try setting {PROPERTY_NAME} to something other than {PROPERTY_VALUE}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleReason":{"message":"The {REASON_PROPERTY_DECLARATION_CODE} property prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect."},"panels/elements/DOMLinkifier.ts | node":{"message":""},"panels/elements/elements-meta.ts | captureAreaScreenshot":{"message":"Capture area screenshot"},"panels/elements/elements-meta.ts | copyStyles":{"message":"Copy styles"},"panels/elements/elements-meta.ts | disableDomWordWrap":{"message":"Disable DOM word wrap"},"panels/elements/elements-meta.ts | duplicateElement":{"message":"Duplicate element"},"panels/elements/elements-meta.ts | editAsHtml":{"message":"Edit as HTML"},"panels/elements/elements-meta.ts | elements":{"message":"Elements"},"panels/elements/elements-meta.ts | enableDomWordWrap":{"message":"Enable DOM word wrap"},"panels/elements/elements-meta.ts | eventListeners":{"message":"Event Listeners"},"panels/elements/elements-meta.ts | hideElement":{"message":"Hide element"},"panels/elements/elements-meta.ts | hideHtmlComments":{"message":"Hide HTML comments"},"panels/elements/elements-meta.ts | layout":{"message":"Layout"},"panels/elements/elements-meta.ts | properties":{"message":"Properties"},"panels/elements/elements-meta.ts | redo":{"message":"Redo"},"panels/elements/elements-meta.ts | revealDomNodeOnHover":{"message":"Reveal DOM node on hover"},"panels/elements/elements-meta.ts | selectAnElementInThePageTo":{"message":"Select an element in the page to inspect it"},"panels/elements/elements-meta.ts | showComputedStyles":{"message":"Show Computed Styles"},"panels/elements/elements-meta.ts | showCSSDocumentationTooltip":{"message":"Show CSS documentation tooltip"},"panels/elements/elements-meta.ts | showDetailedInspectTooltip":{"message":"Show detailed inspect tooltip"},"panels/elements/elements-meta.ts | showElements":{"message":"Show Elements"},"panels/elements/elements-meta.ts | showEventListeners":{"message":"Show Event Listeners"},"panels/elements/elements-meta.ts | showHtmlComments":{"message":"Show HTML comments"},"panels/elements/elements-meta.ts | showLayout":{"message":"Show Layout"},"panels/elements/elements-meta.ts | showProperties":{"message":"Show Properties"},"panels/elements/elements-meta.ts | showStackTrace":{"message":"Show Stack Trace"},"panels/elements/elements-meta.ts | showStyles":{"message":"Show Styles"},"panels/elements/elements-meta.ts | showUserAgentShadowDOM":{"message":"Show user agent shadow DOM"},"panels/elements/elements-meta.ts | stackTrace":{"message":"Stack Trace"},"panels/elements/elements-meta.ts | toggleEyeDropper":{"message":"Toggle eye dropper"},"panels/elements/elements-meta.ts | undo":{"message":"Undo"},"panels/elements/elements-meta.ts | wordWrap":{"message":"Word wrap"},"panels/elements/ElementsPanel.ts | computed":{"message":"Computed"},"panels/elements/ElementsPanel.ts | computedStylesHidden":{"message":"Computed Styles sidebar hidden"},"panels/elements/ElementsPanel.ts | computedStylesShown":{"message":"Computed Styles sidebar shown"},"panels/elements/ElementsPanel.ts | domTreeExplorer":{"message":"DOM tree explorer"},"panels/elements/ElementsPanel.ts | elementStateS":{"message":"Element state: {PH1}"},"panels/elements/ElementsPanel.ts | findByStringSelectorOrXpath":{"message":"Find by string, selector, or XPath"},"panels/elements/ElementsPanel.ts | hideComputedStylesSidebar":{"message":"Hide Computed Styles sidebar"},"panels/elements/ElementsPanel.ts | nodeCannotBeFoundInTheCurrent":{"message":"Node cannot be found in the current page."},"panels/elements/ElementsPanel.ts | revealInElementsPanel":{"message":"Reveal in Elements panel"},"panels/elements/ElementsPanel.ts | showComputedStylesSidebar":{"message":"Show Computed Styles sidebar"},"panels/elements/ElementsPanel.ts | sidePanelContent":{"message":"Side panel content"},"panels/elements/ElementsPanel.ts | sidePanelToolbar":{"message":"Side panel toolbar"},"panels/elements/ElementsPanel.ts | styles":{"message":"Styles"},"panels/elements/ElementsPanel.ts | switchToAccessibilityTreeView":{"message":"Switch to Accessibility Tree view"},"panels/elements/ElementsPanel.ts | switchToDomTreeView":{"message":"Switch to DOM Tree view"},"panels/elements/ElementsPanel.ts | theDeferredDomNodeCouldNotBe":{"message":"The deferred DOM Node could not be resolved to a valid node."},"panels/elements/ElementsPanel.ts | theRemoteObjectCouldNotBe":{"message":"The remote object could not be resolved to a valid node."},"panels/elements/ElementStatePaneWidget.ts | forceElementState":{"message":"Force element state"},"panels/elements/ElementStatePaneWidget.ts | toggleElementState":{"message":"Toggle Element State"},"panels/elements/ElementsTreeElement.ts | addAttribute":{"message":"Add attribute"},"panels/elements/ElementsTreeElement.ts | captureNodeScreenshot":{"message":"Capture node screenshot"},"panels/elements/ElementsTreeElement.ts | children":{"message":"Children:"},"panels/elements/ElementsTreeElement.ts | collapseChildren":{"message":"Collapse children"},"panels/elements/ElementsTreeElement.ts | copy":{"message":"Copy"},"panels/elements/ElementsTreeElement.ts | copyElement":{"message":"Copy element"},"panels/elements/ElementsTreeElement.ts | copyFullXpath":{"message":"Copy full XPath"},"panels/elements/ElementsTreeElement.ts | copyJsPath":{"message":"Copy JS path"},"panels/elements/ElementsTreeElement.ts | copyOuterhtml":{"message":"Copy outerHTML"},"panels/elements/ElementsTreeElement.ts | copySelector":{"message":"Copy selector"},"panels/elements/ElementsTreeElement.ts | copyStyles":{"message":"Copy styles"},"panels/elements/ElementsTreeElement.ts | copyXpath":{"message":"Copy XPath"},"panels/elements/ElementsTreeElement.ts | cut":{"message":"Cut"},"panels/elements/ElementsTreeElement.ts | deleteElement":{"message":"Delete element"},"panels/elements/ElementsTreeElement.ts | disableFlexMode":{"message":"Disable flex mode"},"panels/elements/ElementsTreeElement.ts | disableGridMode":{"message":"Disable grid mode"},"panels/elements/ElementsTreeElement.ts | disableScrollSnap":{"message":"Disable scroll-snap overlay"},"panels/elements/ElementsTreeElement.ts | duplicateElement":{"message":"Duplicate element"},"panels/elements/ElementsTreeElement.ts | editAsHtml":{"message":"Edit as HTML"},"panels/elements/ElementsTreeElement.ts | editAttribute":{"message":"Edit attribute"},"panels/elements/ElementsTreeElement.ts | editText":{"message":"Edit text"},"panels/elements/ElementsTreeElement.ts | enableFlexMode":{"message":"Enable flex mode"},"panels/elements/ElementsTreeElement.ts | enableGridMode":{"message":"Enable grid mode"},"panels/elements/ElementsTreeElement.ts | enableScrollSnap":{"message":"Enable scroll-snap overlay"},"panels/elements/ElementsTreeElement.ts | expandRecursively":{"message":"Expand recursively"},"panels/elements/ElementsTreeElement.ts | focus":{"message":"Focus"},"panels/elements/ElementsTreeElement.ts | forceState":{"message":"Force state"},"panels/elements/ElementsTreeElement.ts | hideElement":{"message":"Hide element"},"panels/elements/ElementsTreeElement.ts | paste":{"message":"Paste"},"panels/elements/ElementsTreeElement.ts | scrollIntoView":{"message":"Scroll into view"},"panels/elements/ElementsTreeElement.ts | showFrameDetails":{"message":"Show iframe details"},"panels/elements/ElementsTreeElement.ts | thisFrameWasIdentifiedAsAnAd":{"message":"This frame was identified as an ad frame"},"panels/elements/ElementsTreeElement.ts | useSInTheConsoleToReferToThis":{"message":"Use {PH1} in the console to refer to this element."},"panels/elements/ElementsTreeElement.ts | valueIsTooLargeToEdit":{"message":""},"panels/elements/ElementsTreeOutline.ts | adornerSettings":{"message":"Badge settings…"},"panels/elements/ElementsTreeOutline.ts | pageDom":{"message":"Page DOM"},"panels/elements/ElementsTreeOutline.ts | reveal":{"message":"reveal"},"panels/elements/ElementsTreeOutline.ts | showAllNodesDMore":{"message":"Show All Nodes ({PH1} More)"},"panels/elements/ElementsTreeOutline.ts | storeAsGlobalVariable":{"message":"Store as global variable"},"panels/elements/EventListenersWidget.ts | all":{"message":"All"},"panels/elements/EventListenersWidget.ts | ancestors":{"message":"Ancestors"},"panels/elements/EventListenersWidget.ts | blocking":{"message":"Blocking"},"panels/elements/EventListenersWidget.ts | eventListenersCategory":{"message":"Event listeners category"},"panels/elements/EventListenersWidget.ts | frameworkListeners":{"message":"Framework listeners"},"panels/elements/EventListenersWidget.ts | passive":{"message":"Passive"},"panels/elements/EventListenersWidget.ts | refresh":{"message":"Refresh"},"panels/elements/EventListenersWidget.ts | resolveEventListenersBoundWith":{"message":"Resolve event listeners bound with framework"},"panels/elements/EventListenersWidget.ts | showListenersOnTheAncestors":{"message":"Show listeners on the ancestors"},"panels/elements/LayersWidget.ts | cssLayersTitle":{"message":"CSS layers"},"panels/elements/LayersWidget.ts | toggleCSSLayers":{"message":"Toggle CSS Layers view"},"panels/elements/MarkerDecorator.ts | domBreakpoint":{"message":"DOM Breakpoint"},"panels/elements/MarkerDecorator.ts | elementIsHidden":{"message":"Element is hidden"},"panels/elements/NodeStackTraceWidget.ts | noStackTraceAvailable":{"message":"No stack trace available"},"panels/elements/PlatformFontsWidget.ts | dGlyphs":{"message":"{n, plural, =1 {(# glyph)} other {(# glyphs)}}"},"panels/elements/PlatformFontsWidget.ts | localFile":{"message":"Local file"},"panels/elements/PlatformFontsWidget.ts | networkResource":{"message":"Network resource"},"panels/elements/PlatformFontsWidget.ts | renderedFonts":{"message":"Rendered Fonts"},"panels/elements/PropertiesWidget.ts | filter":{"message":"Filter"},"panels/elements/PropertiesWidget.ts | filterProperties":{"message":"Filter Properties"},"panels/elements/PropertiesWidget.ts | noMatchingProperty":{"message":"No matching property"},"panels/elements/PropertiesWidget.ts | showAll":{"message":"Show all"},"panels/elements/PropertiesWidget.ts | showAllTooltip":{"message":"When unchecked, only properties whose values are neither null nor undefined will be shown"},"panels/elements/StylePropertiesSection.ts | constructedStylesheet":{"message":"constructed stylesheet"},"panels/elements/StylePropertiesSection.ts | copyAllCSSChanges":{"message":"Copy all CSS changes"},"panels/elements/StylePropertiesSection.ts | copyAllDeclarations":{"message":"Copy all declarations"},"panels/elements/StylePropertiesSection.ts | copyRule":{"message":"Copy rule"},"panels/elements/StylePropertiesSection.ts | copySelector":{"message":"Copy selector"},"panels/elements/StylePropertiesSection.ts | cssSelector":{"message":"CSS selector"},"panels/elements/StylePropertiesSection.ts | injectedStylesheet":{"message":"injected stylesheet"},"panels/elements/StylePropertiesSection.ts | insertStyleRuleBelow":{"message":"Insert Style Rule Below"},"panels/elements/StylePropertiesSection.ts | sattributesStyle":{"message":"{PH1}[Attributes Style]"},"panels/elements/StylePropertiesSection.ts | showAllPropertiesSMore":{"message":"Show All Properties ({PH1} more)"},"panels/elements/StylePropertiesSection.ts | styleAttribute":{"message":"style attribute"},"panels/elements/StylePropertiesSection.ts | userAgentStylesheet":{"message":"user agent stylesheet"},"panels/elements/StylePropertiesSection.ts | viaInspector":{"message":"via inspector"},"panels/elements/StylePropertyTreeElement.ts | copyAllCSSChanges":{"message":"Copy all CSS changes"},"panels/elements/StylePropertyTreeElement.ts | copyAllCssDeclarationsAsJs":{"message":"Copy all declarations as JS"},"panels/elements/StylePropertyTreeElement.ts | copyAllDeclarations":{"message":"Copy all declarations"},"panels/elements/StylePropertyTreeElement.ts | copyCssDeclarationAsJs":{"message":"Copy declaration as JS"},"panels/elements/StylePropertyTreeElement.ts | copyDeclaration":{"message":"Copy declaration"},"panels/elements/StylePropertyTreeElement.ts | copyProperty":{"message":"Copy property"},"panels/elements/StylePropertyTreeElement.ts | copyRule":{"message":"Copy rule"},"panels/elements/StylePropertyTreeElement.ts | copyValue":{"message":"Copy value"},"panels/elements/StylePropertyTreeElement.ts | flexboxEditorButton":{"message":"Open flexbox editor"},"panels/elements/StylePropertyTreeElement.ts | gridEditorButton":{"message":"Open grid editor"},"panels/elements/StylePropertyTreeElement.ts | openColorPickerS":{"message":"Open color picker. {PH1}"},"panels/elements/StylePropertyTreeElement.ts | revealInSourcesPanel":{"message":"Reveal in Sources panel"},"panels/elements/StylePropertyTreeElement.ts | shiftClickToChangeColorFormat":{"message":"Shift + Click to change color format."},"panels/elements/StylePropertyTreeElement.ts | togglePropertyAndContinueEditing":{"message":"Toggle property and continue editing"},"panels/elements/StylePropertyTreeElement.ts | viewComputedValue":{"message":"View computed value"},"panels/elements/StylesSidebarPane.ts | automaticDarkMode":{"message":"Automatic dark mode"},"panels/elements/StylesSidebarPane.ts | clickToRevealLayer":{"message":"Click to reveal layer in layer tree"},"panels/elements/StylesSidebarPane.ts | copiedToClipboard":{"message":"Copied to clipboard"},"panels/elements/StylesSidebarPane.ts | copyAllCSSChanges":{"message":"Copy CSS changes"},"panels/elements/StylesSidebarPane.ts | cssPropertyName":{"message":"CSS property name: {PH1}"},"panels/elements/StylesSidebarPane.ts | cssPropertyValue":{"message":"CSS property value: {PH1}"},"panels/elements/StylesSidebarPane.ts | filter":{"message":"Filter"},"panels/elements/StylesSidebarPane.ts | filterStyles":{"message":"Filter Styles"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelHundred":{"message":"Increment/decrement with mousewheel or up/down keys. {PH1}: ±100, Shift: ±10, Alt: ±0.1"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelOne":{"message":"Increment/decrement with mousewheel or up/down keys. {PH1}: R ±1, Shift: G ±1, Alt: B ±1"},"panels/elements/StylesSidebarPane.ts | inheritedFroms":{"message":"Inherited from "},"panels/elements/StylesSidebarPane.ts | inheritedFromSPseudoOf":{"message":"Inherited from ::{PH1} pseudo of "},"panels/elements/StylesSidebarPane.ts | invalidPropertyValue":{"message":"Invalid property value"},"panels/elements/StylesSidebarPane.ts | invalidString":{"message":"{PH1}, property name: {PH2}, property value: {PH3}"},"panels/elements/StylesSidebarPane.ts | layer":{"message":"Layer"},"panels/elements/StylesSidebarPane.ts | newStyleRule":{"message":"New Style Rule"},"panels/elements/StylesSidebarPane.ts | noMatchingSelectorOrStyle":{"message":"No matching selector or style"},"panels/elements/StylesSidebarPane.ts | pseudoSElement":{"message":"Pseudo ::{PH1} element"},"panels/elements/StylesSidebarPane.ts | specificity":{"message":"Specificity: {PH1}"},"panels/elements/StylesSidebarPane.ts | toggleRenderingEmulations":{"message":"Toggle common rendering emulations"},"panels/elements/StylesSidebarPane.ts | unknownPropertyName":{"message":"Unknown property name"},"panels/elements/StylesSidebarPane.ts | visibleSelectors":{"message":"{n, plural, =1 {# visible selector listed below} other {# visible selectors listed below}}"},"panels/elements/TopLayerContainer.ts | reveal":{"message":"reveal"},"panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio":{"message":"Add device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | addDeviceType":{"message":"Add device type"},"panels/emulation/DeviceModeToolbar.ts | autoadjustZoom":{"message":"Auto-adjust zoom"},"panels/emulation/DeviceModeToolbar.ts | closeDevtools":{"message":"Close DevTools"},"panels/emulation/DeviceModeToolbar.ts | defaultF":{"message":"Default: {PH1}"},"panels/emulation/DeviceModeToolbar.ts | devicePixelRatio":{"message":"Device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | deviceType":{"message":"Device type"},"panels/emulation/DeviceModeToolbar.ts | dimensions":{"message":"Dimensions"},"panels/emulation/DeviceModeToolbar.ts | edit":{"message":"Edit…"},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeature":{"message":"\"Experimental Web Platform Feature\" flag is enabled. Click to disable it."},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeatureFlag":{"message":"\"Experimental Web Platform Feature\" flag is disabled. Click to enable it."},"panels/emulation/DeviceModeToolbar.ts | fitToWindowF":{"message":"Fit to window ({PH1}%)"},"panels/emulation/DeviceModeToolbar.ts | heightLeaveEmptyForFull":{"message":"Height (leave empty for full)"},"panels/emulation/DeviceModeToolbar.ts | hideDeviceFrame":{"message":"Hide device frame"},"panels/emulation/DeviceModeToolbar.ts | hideMediaQueries":{"message":"Hide media queries"},"panels/emulation/DeviceModeToolbar.ts | hideRulers":{"message":"Hide rulers"},"panels/emulation/DeviceModeToolbar.ts | landscape":{"message":"Landscape"},"panels/emulation/DeviceModeToolbar.ts | moreOptions":{"message":"More options"},"panels/emulation/DeviceModeToolbar.ts | none":{"message":"None"},"panels/emulation/DeviceModeToolbar.ts | portrait":{"message":"Portrait"},"panels/emulation/DeviceModeToolbar.ts | removeDevicePixelRatio":{"message":"Remove device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | removeDeviceType":{"message":"Remove device type"},"panels/emulation/DeviceModeToolbar.ts | resetToDefaults":{"message":"Reset to defaults"},"panels/emulation/DeviceModeToolbar.ts | responsive":{"message":"Responsive"},"panels/emulation/DeviceModeToolbar.ts | rotate":{"message":"Rotate"},"panels/emulation/DeviceModeToolbar.ts | screenOrientationOptions":{"message":"Screen orientation options"},"panels/emulation/DeviceModeToolbar.ts | showDeviceFrame":{"message":"Show device frame"},"panels/emulation/DeviceModeToolbar.ts | showMediaQueries":{"message":"Show media queries"},"panels/emulation/DeviceModeToolbar.ts | showRulers":{"message":"Show rulers"},"panels/emulation/DeviceModeToolbar.ts | toggleDualscreenMode":{"message":"Toggle dual-screen mode"},"panels/emulation/DeviceModeToolbar.ts | width":{"message":"Width"},"panels/emulation/DeviceModeToolbar.ts | zoom":{"message":"Zoom"},"panels/emulation/DeviceModeView.ts | doubleclickForFullHeight":{"message":"Double-click for full height"},"panels/emulation/DeviceModeView.ts | laptop":{"message":"Laptop"},"panels/emulation/DeviceModeView.ts | laptopL":{"message":"Laptop L"},"panels/emulation/DeviceModeView.ts | mobileL":{"message":"Mobile L"},"panels/emulation/DeviceModeView.ts | mobileM":{"message":"Mobile M"},"panels/emulation/DeviceModeView.ts | mobileS":{"message":"Mobile S"},"panels/emulation/DeviceModeView.ts | tablet":{"message":"Tablet"},"panels/emulation/emulation-meta.ts | captureFullSizeScreenshot":{"message":"Capture full size screenshot"},"panels/emulation/emulation-meta.ts | captureNodeScreenshot":{"message":"Capture node screenshot"},"panels/emulation/emulation-meta.ts | captureScreenshot":{"message":"Capture screenshot"},"panels/emulation/emulation-meta.ts | device":{"message":"device"},"panels/emulation/emulation-meta.ts | hideDeviceFrame":{"message":"Hide device frame"},"panels/emulation/emulation-meta.ts | hideMediaQueries":{"message":"Hide media queries"},"panels/emulation/emulation-meta.ts | hideRulers":{"message":"Hide rulers in the Device Mode toolbar"},"panels/emulation/emulation-meta.ts | showDeviceFrame":{"message":"Show device frame"},"panels/emulation/emulation-meta.ts | showMediaQueries":{"message":"Show media queries"},"panels/emulation/emulation-meta.ts | showRulers":{"message":"Show rulers in the Device Mode toolbar"},"panels/emulation/emulation-meta.ts | toggleDeviceToolbar":{"message":"Toggle device toolbar"},"panels/emulation/MediaQueryInspector.ts | revealInSourceCode":{"message":"Reveal in source code"},"panels/event_listeners/EventListenersView.ts | deleteEventListener":{"message":"Delete event listener"},"panels/event_listeners/EventListenersView.ts | noEventListeners":{"message":"No event listeners"},"panels/event_listeners/EventListenersView.ts | passive":{"message":"Passive"},"panels/event_listeners/EventListenersView.ts | remove":{"message":"Remove"},"panels/event_listeners/EventListenersView.ts | revealInElementsPanel":{"message":"Reveal in Elements panel"},"panels/event_listeners/EventListenersView.ts | togglePassive":{"message":"Toggle Passive"},"panels/event_listeners/EventListenersView.ts | toggleWhetherEventListenerIs":{"message":"Toggle whether event listener is passive or blocking"},"panels/issues/AffectedBlockedByResponseView.ts | blockedResource":{"message":"Blocked Resource"},"panels/issues/AffectedBlockedByResponseView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/AffectedBlockedByResponseView.ts | parentFrame":{"message":"Parent Frame"},"panels/issues/AffectedBlockedByResponseView.ts | requestC":{"message":"Request"},"panels/issues/AffectedCookiesView.ts | domain":{"message":"Domain"},"panels/issues/AffectedCookiesView.ts | filterSetCookieTitle":{"message":"Show network requests that include this Set-Cookie header in the network panel"},"panels/issues/AffectedCookiesView.ts | name":{"message":"Name"},"panels/issues/AffectedCookiesView.ts | nCookies":{"message":"{n, plural, =1 {# cookie} other {# cookies}}"},"panels/issues/AffectedCookiesView.ts | nRawCookieLines":{"message":"{n, plural, =1 {1 Raw Set-Cookie header} other {# Raw Set-Cookie headers}}"},"panels/issues/AffectedCookiesView.ts | path":{"message":"Path"},"panels/issues/AffectedDirectivesView.ts | blocked":{"message":"blocked"},"panels/issues/AffectedDirectivesView.ts | clickToRevealTheViolatingDomNode":{"message":"Click to reveal the violating DOM node in the Elements panel"},"panels/issues/AffectedDirectivesView.ts | directiveC":{"message":"Directive"},"panels/issues/AffectedDirectivesView.ts | element":{"message":"Element"},"panels/issues/AffectedDirectivesView.ts | nDirectives":{"message":"{n, plural, =1 {# directive} other {# directives}}"},"panels/issues/AffectedDirectivesView.ts | reportonly":{"message":"report-only"},"panels/issues/AffectedDirectivesView.ts | resourceC":{"message":"Resource"},"panels/issues/AffectedDirectivesView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/AffectedDirectivesView.ts | status":{"message":"Status"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | documentInTheDOMTree":{"message":"Document in the DOM tree"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | mode":{"message":"Mode"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | nDocuments":{"message":"{n, plural, =1 { document} other { documents}}"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | url":{"message":"URL"},"panels/issues/AffectedElementsView.ts | nElements":{"message":"{n, plural, =1 {# element} other {# elements}}"},"panels/issues/AffectedElementsWithLowContrastView.ts | contrastRatio":{"message":"Contrast ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | element":{"message":"Element"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAA":{"message":"Minimum AA ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAAA":{"message":"Minimum AAA ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | textSize":{"message":"Text size"},"panels/issues/AffectedElementsWithLowContrastView.ts | textWeight":{"message":"Text weight"},"panels/issues/AffectedHeavyAdView.ts | cpuPeakLimit":{"message":"CPU peak limit"},"panels/issues/AffectedHeavyAdView.ts | cpuTotalLimit":{"message":"CPU total limit"},"panels/issues/AffectedHeavyAdView.ts | frameUrl":{"message":"Frame URL"},"panels/issues/AffectedHeavyAdView.ts | limitExceeded":{"message":"Limit exceeded"},"panels/issues/AffectedHeavyAdView.ts | networkLimit":{"message":"Network limit"},"panels/issues/AffectedHeavyAdView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/AffectedHeavyAdView.ts | removed":{"message":"Removed"},"panels/issues/AffectedHeavyAdView.ts | resolutionStatus":{"message":"Resolution Status"},"panels/issues/AffectedHeavyAdView.ts | warned":{"message":"Warned"},"panels/issues/AffectedResourcesView.ts | clickToRevealTheFramesDomNodeIn":{"message":"Click to reveal the frame's DOM node in the Elements panel"},"panels/issues/AffectedResourcesView.ts | unavailable":{"message":"unavailable"},"panels/issues/AffectedResourcesView.ts | unknown":{"message":"unknown"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | aSharedarraybufferWas":{"message":"A SharedArrayBuffer was instantiated in a context that is not cross-origin isolated"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | blocked":{"message":"blocked"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | instantiation":{"message":"Instantiation"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | nViolations":{"message":"{n, plural, =1 {# violation} other {# violations}}"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sharedarraybufferWasTransferedTo":{"message":"SharedArrayBuffer was transfered to a context that is not cross-origin isolated"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | status":{"message":"Status"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | transfer":{"message":"Transfer"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | trigger":{"message":"Trigger"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | warning":{"message":"warning"},"panels/issues/AffectedSourcesView.ts | nSources":{"message":"{n, plural, =1 {# source} other {# sources}}"},"panels/issues/AffectedTrackingSitesView.ts | nTrackingSites":{"message":"{n, plural, =1 {1 potentially tracking website} other {# potentially tracking websites}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | element":{"message":"Element"},"panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue":{"message":"Invalid Header Value"},"panels/issues/AttributionReportingIssueDetailsView.ts | nViolations":{"message":"{n, plural, =1 {# violation} other {# violations}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | request":{"message":"Request"},"panels/issues/AttributionReportingIssueDetailsView.ts | untrustworthyOrigin":{"message":"Untrustworthy origin"},"panels/issues/ComboBoxOfCheckBoxes.ts | genericMenuLabel":{"message":"Menu"},"panels/issues/components/HideIssuesMenu.ts | tooltipTitle":{"message":"Hide issues"},"panels/issues/CorsIssueDetailsView.ts | allowCredentialsValueFromHeader":{"message":"Access-Control-Allow-Credentials Header Value"},"panels/issues/CorsIssueDetailsView.ts | allowedOrigin":{"message":"Allowed Origin (from header)"},"panels/issues/CorsIssueDetailsView.ts | blocked":{"message":"blocked"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestHeader":{"message":"Disallowed Request Header"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod":{"message":"Disallowed Request Method"},"panels/issues/CorsIssueDetailsView.ts | failedRequest":{"message":"Failed Request"},"panels/issues/CorsIssueDetailsView.ts | header":{"message":"Header"},"panels/issues/CorsIssueDetailsView.ts | initiatorAddressSpace":{"message":"Initiator Address"},"panels/issues/CorsIssueDetailsView.ts | initiatorContext":{"message":"Initiator Context"},"panels/issues/CorsIssueDetailsView.ts | insecure":{"message":"insecure"},"panels/issues/CorsIssueDetailsView.ts | invalidValue":{"message":"Invalid Value (if available)"},"panels/issues/CorsIssueDetailsView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/CorsIssueDetailsView.ts | preflightDisallowedRedirect":{"message":"Response to preflight was a redirect"},"panels/issues/CorsIssueDetailsView.ts | preflightInvalidStatus":{"message":"HTTP status of preflight request didn't indicate success"},"panels/issues/CorsIssueDetailsView.ts | preflightRequest":{"message":"Preflight Request"},"panels/issues/CorsIssueDetailsView.ts | preflightRequestIfProblematic":{"message":"Preflight Request (if problematic)"},"panels/issues/CorsIssueDetailsView.ts | problem":{"message":"Problem"},"panels/issues/CorsIssueDetailsView.ts | problemInvalidValue":{"message":"Invalid Value"},"panels/issues/CorsIssueDetailsView.ts | problemMissingHeader":{"message":"Missing Header"},"panels/issues/CorsIssueDetailsView.ts | problemMultipleValues":{"message":"Multiple Values"},"panels/issues/CorsIssueDetailsView.ts | request":{"message":"Request"},"panels/issues/CorsIssueDetailsView.ts | resourceAddressSpace":{"message":"Resource Address"},"panels/issues/CorsIssueDetailsView.ts | secure":{"message":"secure"},"panels/issues/CorsIssueDetailsView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/CorsIssueDetailsView.ts | status":{"message":"Status"},"panels/issues/CorsIssueDetailsView.ts | unsupportedScheme":{"message":"Unsupported Scheme"},"panels/issues/CorsIssueDetailsView.ts | warning":{"message":"warning"},"panels/issues/CSPViolationsView.ts | filter":{"message":"Filter"},"panels/issues/GenericIssueDetailsView.ts | frameId":{"message":"Frame"},"panels/issues/GenericIssueDetailsView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/GenericIssueDetailsView.ts | violatingNode":{"message":"Violating node"},"panels/issues/HiddenIssuesRow.ts | hiddenIssues":{"message":"Hidden issues"},"panels/issues/HiddenIssuesRow.ts | unhideAll":{"message":"Unhide all"},"panels/issues/IssueKindView.ts | hideAllCurrentBreakingChanges":{"message":"Hide all current Breaking Changes"},"panels/issues/IssueKindView.ts | hideAllCurrentImprovements":{"message":"Hide all current Improvements"},"panels/issues/IssueKindView.ts | hideAllCurrentPageErrors":{"message":"Hide all current Page Errors"},"panels/issues/issues-meta.ts | cspViolations":{"message":"CSP Violations"},"panels/issues/issues-meta.ts | issues":{"message":"Issues"},"panels/issues/issues-meta.ts | showCspViolations":{"message":"Show CSP Violations"},"panels/issues/issues-meta.ts | showIssues":{"message":"Show Issues"},"panels/issues/IssuesPane.ts | attributionReporting":{"message":"Attribution Reporting API"},"panels/issues/IssuesPane.ts | contentSecurityPolicy":{"message":"Content Security Policy"},"panels/issues/IssuesPane.ts | cors":{"message":"Cross Origin Resource Sharing"},"panels/issues/IssuesPane.ts | crossOriginEmbedderPolicy":{"message":"Cross Origin Embedder Policy"},"panels/issues/IssuesPane.ts | generic":{"message":"Generic"},"panels/issues/IssuesPane.ts | groupByCategory":{"message":"Group by category"},"panels/issues/IssuesPane.ts | groupByKind":{"message":"Group by kind"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnder":{"message":"Group displayed issues under associated categories"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnderKind":{"message":"Group displayed issues as Page errors, Breaking changes and Improvements"},"panels/issues/IssuesPane.ts | heavyAds":{"message":"Heavy Ads"},"panels/issues/IssuesPane.ts | includeCookieIssuesCausedBy":{"message":"Include cookie Issues caused by third-party sites"},"panels/issues/IssuesPane.ts | includeThirdpartyCookieIssues":{"message":"Include third-party cookie issues"},"panels/issues/IssuesPane.ts | lowTextContrast":{"message":"Low Text Contrast"},"panels/issues/IssuesPane.ts | mixedContent":{"message":"Mixed Content"},"panels/issues/IssuesPane.ts | noIssuesDetectedSoFar":{"message":"No issues detected so far"},"panels/issues/IssuesPane.ts | onlyThirdpartyCookieIssues":{"message":"Only third-party cookie issues detected so far"},"panels/issues/IssuesPane.ts | other":{"message":"Other"},"panels/issues/IssuesPane.ts | quirksMode":{"message":"Quirks Mode"},"panels/issues/IssuesPane.ts | samesiteCookie":{"message":"SameSite Cookie"},"panels/issues/IssueView.ts | affectedResources":{"message":"Affected Resources"},"panels/issues/IssueView.ts | automaticallyUpgraded":{"message":"automatically upgraded"},"panels/issues/IssueView.ts | blocked":{"message":"blocked"},"panels/issues/IssueView.ts | hideIssuesLikeThis":{"message":"Hide issues like this"},"panels/issues/IssueView.ts | learnMoreS":{"message":"Learn more: {PH1}"},"panels/issues/IssueView.ts | name":{"message":"Name"},"panels/issues/IssueView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/IssueView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/IssueView.ts | restrictionStatus":{"message":"Restriction Status"},"panels/issues/IssueView.ts | unhideIssuesLikeThis":{"message":"Unhide issues like this"},"panels/issues/IssueView.ts | warned":{"message":"Warned"},"panels/js_profiler/js_profiler-meta.ts | performance":{"message":"Performance"},"panels/js_profiler/js_profiler-meta.ts | profiler":{"message":"Profiler"},"panels/js_profiler/js_profiler-meta.ts | record":{"message":"Record"},"panels/js_profiler/js_profiler-meta.ts | showPerformance":{"message":"Show Performance"},"panels/js_profiler/js_profiler-meta.ts | showProfiler":{"message":"Show Profiler"},"panels/js_profiler/js_profiler-meta.ts | showRecentTimelineSessions":{"message":"Show recent timeline sessions"},"panels/js_profiler/js_profiler-meta.ts | startProfilingAndReloadPage":{"message":"Start profiling and reload page"},"panels/js_profiler/js_profiler-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/js_profiler/js_profiler-meta.ts | stop":{"message":"Stop"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateDown":{"message":"Pan or rotate down"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateLeft":{"message":"Pan or rotate left"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateRight":{"message":"Pan or rotate right"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateUp":{"message":"Pan or rotate up"},"panels/layer_viewer/layer_viewer-meta.ts | resetView":{"message":"Reset view"},"panels/layer_viewer/layer_viewer-meta.ts | switchToPanMode":{"message":"Switch to pan mode"},"panels/layer_viewer/layer_viewer-meta.ts | switchToRotateMode":{"message":"Switch to rotate mode"},"panels/layer_viewer/layer_viewer-meta.ts | zoomIn":{"message":"Zoom in"},"panels/layer_viewer/layer_viewer-meta.ts | zoomOut":{"message":"Zoom out"},"panels/layer_viewer/LayerDetailsView.ts | compositingReasons":{"message":"Compositing Reasons"},"panels/layer_viewer/LayerDetailsView.ts | containingBlocRectangleDimensions":{"message":"Containing Block {PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | mainThreadScrollingReason":{"message":"Main thread scrolling reason"},"panels/layer_viewer/LayerDetailsView.ts | memoryEstimate":{"message":"Memory estimate"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingContaining":{"message":"Nearest Layer Shifting Containing Block"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingStickyBox":{"message":"Nearest Layer Shifting Sticky Box"},"panels/layer_viewer/LayerDetailsView.ts | nonFastScrollable":{"message":"Non fast scrollable"},"panels/layer_viewer/LayerDetailsView.ts | paintCount":{"message":"Paint count"},"panels/layer_viewer/LayerDetailsView.ts | paintProfiler":{"message":"Paint Profiler"},"panels/layer_viewer/LayerDetailsView.ts | repaintsOnScroll":{"message":"Repaints on scroll"},"panels/layer_viewer/LayerDetailsView.ts | scrollRectangleDimensions":{"message":"{PH1} {PH2} × {PH3} (at {PH4}, {PH5})"},"panels/layer_viewer/LayerDetailsView.ts | selectALayerToSeeItsDetails":{"message":"Select a layer to see its details"},"panels/layer_viewer/LayerDetailsView.ts | size":{"message":"Size"},"panels/layer_viewer/LayerDetailsView.ts | slowScrollRegions":{"message":"Slow scroll regions"},"panels/layer_viewer/LayerDetailsView.ts | stickyAncenstorLayersS":{"message":"{PH1}: {PH2} ({PH3})"},"panels/layer_viewer/LayerDetailsView.ts | stickyBoxRectangleDimensions":{"message":"Sticky Box {PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | stickyPositionConstraint":{"message":"Sticky position constraint"},"panels/layer_viewer/LayerDetailsView.ts | touchEventHandler":{"message":"Touch event handler"},"panels/layer_viewer/LayerDetailsView.ts | unnamed":{"message":""},"panels/layer_viewer/LayerDetailsView.ts | updateRectangleDimensions":{"message":"{PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | wheelEventHandler":{"message":"Wheel event handler"},"panels/layer_viewer/Layers3DView.ts | cantDisplayLayers":{"message":"Can't display layers,"},"panels/layer_viewer/Layers3DView.ts | checkSForPossibleReasons":{"message":"Check {PH1} for possible reasons."},"panels/layer_viewer/Layers3DView.ts | dLayersView":{"message":"3D Layers View"},"panels/layer_viewer/Layers3DView.ts | layerInformationIsNotYet":{"message":"Layer information is not yet available."},"panels/layer_viewer/Layers3DView.ts | paints":{"message":"Paints"},"panels/layer_viewer/Layers3DView.ts | resetView":{"message":"Reset View"},"panels/layer_viewer/Layers3DView.ts | showPaintProfiler":{"message":"Show Paint Profiler"},"panels/layer_viewer/Layers3DView.ts | slowScrollRects":{"message":"Slow scroll rects"},"panels/layer_viewer/Layers3DView.ts | webglSupportIsDisabledInYour":{"message":"WebGL support is disabled in your browser."},"panels/layer_viewer/LayerTreeOutline.ts | layersTreePane":{"message":"Layers Tree Pane"},"panels/layer_viewer/LayerTreeOutline.ts | showPaintProfiler":{"message":"Show Paint Profiler"},"panels/layer_viewer/LayerTreeOutline.ts | updateChildDimension":{"message":" ({PH1} × {PH2})"},"panels/layer_viewer/LayerViewHost.ts | showInternalLayers":{"message":"Show internal layers"},"panels/layer_viewer/PaintProfilerView.ts | bitmap":{"message":"Bitmap"},"panels/layer_viewer/PaintProfilerView.ts | commandLog":{"message":"Command Log"},"panels/layer_viewer/PaintProfilerView.ts | misc":{"message":"Misc"},"panels/layer_viewer/PaintProfilerView.ts | profiling":{"message":"Profiling…"},"panels/layer_viewer/PaintProfilerView.ts | profilingResults":{"message":"Profiling results"},"panels/layer_viewer/PaintProfilerView.ts | shapes":{"message":"Shapes"},"panels/layer_viewer/PaintProfilerView.ts | text":{"message":"Text"},"panels/layer_viewer/TransformController.ts | panModeX":{"message":"Pan mode (X)"},"panels/layer_viewer/TransformController.ts | resetTransform":{"message":"Reset transform (0)"},"panels/layer_viewer/TransformController.ts | rotateModeV":{"message":"Rotate mode (V)"},"panels/layers/layers-meta.ts | layers":{"message":"Layers"},"panels/layers/layers-meta.ts | showLayers":{"message":"Show Layers"},"panels/layers/LayersPanel.ts | details":{"message":"Details"},"panels/layers/LayersPanel.ts | profiler":{"message":"Profiler"},"panels/lighthouse/lighthouse-meta.ts | showLighthouse":{"message":"Show Lighthouse"},"panels/lighthouse/LighthouseController.ts | accessibility":{"message":"Accessibility"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulation":{"message":"Apply mobile emulation"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulationDuring":{"message":"Apply mobile emulation during auditing"},"panels/lighthouse/LighthouseController.ts | atLeastOneCategoryMustBeSelected":{"message":"At least one category must be selected."},"panels/lighthouse/LighthouseController.ts | bestPractices":{"message":"Best practices"},"panels/lighthouse/LighthouseController.ts | canOnlyAuditHttphttpsPages":{"message":"Can only audit pages on HTTP or HTTPS. Navigate to a different page."},"panels/lighthouse/LighthouseController.ts | clearStorage":{"message":"Clear storage"},"panels/lighthouse/LighthouseController.ts | desktop":{"message":"Desktop"},"panels/lighthouse/LighthouseController.ts | devtoolsThrottling":{"message":"DevTools throttling (advanced)"},"panels/lighthouse/LighthouseController.ts | doesThisPageFollowBestPractices":{"message":"Does this page follow best practices for modern web development"},"panels/lighthouse/LighthouseController.ts | doesThisPageMeetTheStandardOfA":{"message":"Does this page meet the standard of a Progressive Web App"},"panels/lighthouse/LighthouseController.ts | howLongDoesThisAppTakeToShow":{"message":"How long does this app take to show content and become usable"},"panels/lighthouse/LighthouseController.ts | indexeddb":{"message":"IndexedDB"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForAdSpeedAnd":{"message":"Is this page optimized for ad speed and quality"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForSearch":{"message":"Is this page optimized for search engine results ranking"},"panels/lighthouse/LighthouseController.ts | isThisPageUsableByPeopleWith":{"message":"Is this page usable by people with disabilities or impairments"},"panels/lighthouse/LighthouseController.ts | javaScriptDisabled":{"message":"JavaScript is disabled. You need to enable JavaScript to audit this page. Open the Command Menu and run the Enable JavaScript command to enable JavaScript."},"panels/lighthouse/LighthouseController.ts | legacyNavigation":{"message":"Legacy navigation"},"panels/lighthouse/LighthouseController.ts | lighthouseMode":{"message":"Lighthouse mode"},"panels/lighthouse/LighthouseController.ts | localStorage":{"message":"Local Storage"},"panels/lighthouse/LighthouseController.ts | mobile":{"message":"Mobile"},"panels/lighthouse/LighthouseController.ts | multipleTabsAreBeingControlledBy":{"message":"Multiple tabs are being controlled by the same service worker. Close your other tabs on the same origin to audit this page."},"panels/lighthouse/LighthouseController.ts | navigation":{"message":"Navigation (Default)"},"panels/lighthouse/LighthouseController.ts | navigationTooltip":{"message":"Navigation mode analyzes a page load, exactly like the original Lighthouse reports."},"panels/lighthouse/LighthouseController.ts | performance":{"message":"Performance"},"panels/lighthouse/LighthouseController.ts | progressiveWebApp":{"message":"Progressive Web App"},"panels/lighthouse/LighthouseController.ts | publisherAds":{"message":"Publisher Ads"},"panels/lighthouse/LighthouseController.ts | resetStorageLocalstorage":{"message":"Reset storage (cache, service workers, etc) before auditing. (Good for performance & PWA testing)"},"panels/lighthouse/LighthouseController.ts | runLighthouseInMode":{"message":"Run Lighthouse in navigation, timespan, or snapshot mode"},"panels/lighthouse/LighthouseController.ts | seo":{"message":"SEO"},"panels/lighthouse/LighthouseController.ts | simulateASlowerPageLoadBasedOn":{"message":"Simulated throttling simulates a slower page load based on data from an initial unthrottled load. DevTools throttling actually slows down the page."},"panels/lighthouse/LighthouseController.ts | simulatedThrottling":{"message":"Simulated throttling (default)"},"panels/lighthouse/LighthouseController.ts | snapshot":{"message":"Snapshot"},"panels/lighthouse/LighthouseController.ts | snapshotTooltip":{"message":"Snapshot mode analyzes the page in a particular state, typically after user interactions."},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingLoadingPlural":{"message":"There may be stored data affecting loading performance in these locations: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular":{"message":"There may be stored data affecting loading performance in this location: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."},"panels/lighthouse/LighthouseController.ts | throttlingMethod":{"message":"Throttling method"},"panels/lighthouse/LighthouseController.ts | timespan":{"message":"Timespan"},"panels/lighthouse/LighthouseController.ts | timespanTooltip":{"message":"Timespan mode analyzes an arbitrary period of time, typically containing user interactions."},"panels/lighthouse/LighthouseController.ts | useLegacyNavigation":{"message":"Analyze the page using classic Lighthouse when in navigation mode."},"panels/lighthouse/LighthouseController.ts | webSql":{"message":"Web SQL"},"panels/lighthouse/LighthousePanel.ts | cancelling":{"message":"Cancelling"},"panels/lighthouse/LighthousePanel.ts | clearAll":{"message":"Clear all"},"panels/lighthouse/LighthousePanel.ts | dropLighthouseJsonHere":{"message":"Drop Lighthouse JSON here"},"panels/lighthouse/LighthousePanel.ts | lighthouseSettings":{"message":"Lighthouse settings"},"panels/lighthouse/LighthousePanel.ts | performAnAudit":{"message":"Perform an audit…"},"panels/lighthouse/LighthousePanel.ts | printing":{"message":"Printing"},"panels/lighthouse/LighthousePanel.ts | thePrintPopupWindowIsOpenPlease":{"message":"The print popup window is open. Please close it to continue."},"panels/lighthouse/LighthouseReportSelector.ts | newReport":{"message":"(new report)"},"panels/lighthouse/LighthouseReportSelector.ts | reports":{"message":"Reports"},"panels/lighthouse/LighthouseStartView.ts | analyzeNavigation":{"message":"Analyze page load"},"panels/lighthouse/LighthouseStartView.ts | analyzeSnapshot":{"message":"Analyze page state"},"panels/lighthouse/LighthouseStartView.ts | categories":{"message":"Categories"},"panels/lighthouse/LighthouseStartView.ts | device":{"message":"Device"},"panels/lighthouse/LighthouseStartView.ts | generateLighthouseReport":{"message":"Generate a Lighthouse report"},"panels/lighthouse/LighthouseStartView.ts | learnMore":{"message":"Learn more"},"panels/lighthouse/LighthouseStartView.ts | mode":{"message":"Mode"},"panels/lighthouse/LighthouseStartView.ts | plugins":{"message":"Plugins"},"panels/lighthouse/LighthouseStartView.ts | startTimespan":{"message":"Start timespan"},"panels/lighthouse/LighthouseStatusView.ts | ahSorryWeRanIntoAnError":{"message":"Ah, sorry! We ran into an error."},"panels/lighthouse/LighthouseStatusView.ts | almostThereLighthouseIsNow":{"message":"Almost there! Lighthouse is now generating your report."},"panels/lighthouse/LighthouseStatusView.ts | asPageLoadTimeIncreasesFromOne":{"message":"As page load time increases from one second to seven seconds, the probability of a mobile site visitor bouncing increases 113%. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | asTheNumberOfElementsOnAPage":{"message":"As the number of elements on a page increases from 400 to 6,000, the probability of conversion drops 95%. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | auditingS":{"message":"Auditing {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | auditingYourWebPage":{"message":"Auditing your web page"},"panels/lighthouse/LighthouseStatusView.ts | byReducingTheResponseSizeOfJson":{"message":"By reducing the response size of JSON needed for displaying comments, Instagram saw increased impressions [Source: WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | cancel":{"message":"Cancel"},"panels/lighthouse/LighthouseStatusView.ts | cancelling":{"message":"Cancelling…"},"panels/lighthouse/LighthouseStatusView.ts | fastFactMessageWithPlaceholder":{"message":"💡 {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | ifASiteTakesSecondToBecome":{"message":"If a site takes >1 second to become interactive, users lose attention, and their perception of completing the page task is broken [Source: Google Developers Blog]"},"panels/lighthouse/LighthouseStatusView.ts | ifThisIssueIsReproduciblePlease":{"message":"If this issue is reproducible, please report it at the Lighthouse GitHub repo."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsGatheringInformation":{"message":"Lighthouse is gathering information about the page to compute your score."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingThePage":{"message":"Lighthouse is loading the page."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPage":{"message":"Lighthouse is loading your page"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWith":{"message":"Lighthouse is loading your page with throttling to measure performance on a mobile device on 3G."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithMobile":{"message":"Lighthouse is loading your page with mobile emulation."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithThrottling":{"message":"Lighthouse is loading your page with throttling to measure performance on a slow desktop on 3G."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsWarmingUp":{"message":"Lighthouse is warming up…"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseOnlySimulatesMobile":{"message":"Lighthouse only simulates mobile performance; to measure performance on a real device, try WebPageTest.org [Source: Lighthouse team]"},"panels/lighthouse/LighthouseStatusView.ts | loading":{"message":"Loading…"},"panels/lighthouse/LighthouseStatusView.ts | mbTakesAMinimumOfSecondsTo":{"message":"1MB takes a minimum of 5 seconds to download on a typical 3G connection [Source: WebPageTest and DevTools 3G definition]."},"panels/lighthouse/LighthouseStatusView.ts | OfGlobalMobileUsersInWereOnGOrG":{"message":"75% of global mobile users in 2016 were on 2G or 3G [Source: GSMA Mobile]"},"panels/lighthouse/LighthouseStatusView.ts | OfMobilePagesTakeNearlySeconds":{"message":"70% of mobile pages take nearly 7 seconds for the visual content above the fold to display on the screen. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | rebuildingPinterestPagesFor":{"message":"Rebuilding Pinterest pages for performance increased conversion rates by 15% [Source: WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | SecondsIsTheAverageTimeAMobile":{"message":"19 seconds is the average time a mobile web page takes to load on a 3G connection [Source: Google DoubleClick blog]"},"panels/lighthouse/LighthouseStatusView.ts | theAverageUserDeviceCostsLess":{"message":"The average user device costs less than 200 USD. [Source: International Data Corporation]"},"panels/lighthouse/LighthouseStatusView.ts | tryToNavigateToTheUrlInAFresh":{"message":"Try to navigate to the URL in a fresh Chrome profile without any other tabs or extensions open and try again."},"panels/lighthouse/LighthouseStatusView.ts | walmartSawAIncreaseInRevenueFor":{"message":"Walmart saw a 1% increase in revenue for every 100ms improvement in page load [Source: WPO Stats]"},"panels/lighthouse/LighthouseTimespanView.ts | cancel":{"message":"Cancel"},"panels/lighthouse/LighthouseTimespanView.ts | endTimespan":{"message":"End timespan"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarted":{"message":"Timespan started, interact with the page"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarting":{"message":"Timespan starting…"},"panels/media/EventDisplayTable.ts | eventDisplay":{"message":"Event display"},"panels/media/EventDisplayTable.ts | eventName":{"message":"Event name"},"panels/media/EventDisplayTable.ts | timestamp":{"message":"Timestamp"},"panels/media/EventDisplayTable.ts | value":{"message":"Value"},"panels/media/EventTimelineView.ts | bufferingStatus":{"message":"Buffering Status"},"panels/media/EventTimelineView.ts | playbackStatus":{"message":"Playback Status"},"panels/media/media-meta.ts | media":{"message":"Media"},"panels/media/media-meta.ts | showMedia":{"message":"Show Media"},"panels/media/media-meta.ts | video":{"message":"video"},"panels/media/PlayerDetailView.ts | events":{"message":"Events"},"panels/media/PlayerDetailView.ts | messages":{"message":"Messages"},"panels/media/PlayerDetailView.ts | playerEvents":{"message":"Player events"},"panels/media/PlayerDetailView.ts | playerMessages":{"message":"Player messages"},"panels/media/PlayerDetailView.ts | playerProperties":{"message":"Player properties"},"panels/media/PlayerDetailView.ts | playerTimeline":{"message":"Player timeline"},"panels/media/PlayerDetailView.ts | properties":{"message":"Properties"},"panels/media/PlayerDetailView.ts | timeline":{"message":"Timeline"},"panels/media/PlayerListView.ts | hideAllOthers":{"message":"Hide all others"},"panels/media/PlayerListView.ts | hidePlayer":{"message":"Hide player"},"panels/media/PlayerListView.ts | players":{"message":"Players"},"panels/media/PlayerListView.ts | savePlayerInfo":{"message":"Save player info"},"panels/media/PlayerMessagesView.ts | all":{"message":"All"},"panels/media/PlayerMessagesView.ts | custom":{"message":"Custom"},"panels/media/PlayerMessagesView.ts | debug":{"message":"Debug"},"panels/media/PlayerMessagesView.ts | default":{"message":"Default"},"panels/media/PlayerMessagesView.ts | error":{"message":"Error"},"panels/media/PlayerMessagesView.ts | errorCauseLabel":{"message":"Caused by:"},"panels/media/PlayerMessagesView.ts | errorCodeLabel":{"message":"Error Code:"},"panels/media/PlayerMessagesView.ts | errorDataLabel":{"message":"Data:"},"panels/media/PlayerMessagesView.ts | errorGroupLabel":{"message":"Error Group:"},"panels/media/PlayerMessagesView.ts | errorStackLabel":{"message":"Stacktrace:"},"panels/media/PlayerMessagesView.ts | filterLogMessages":{"message":"Filter log messages"},"panels/media/PlayerMessagesView.ts | info":{"message":"Info"},"panels/media/PlayerMessagesView.ts | logLevel":{"message":"Log level:"},"panels/media/PlayerMessagesView.ts | warning":{"message":"Warning"},"panels/media/PlayerPropertiesView.ts | audio":{"message":"Audio"},"panels/media/PlayerPropertiesView.ts | bitrate":{"message":"Bitrate"},"panels/media/PlayerPropertiesView.ts | decoder":{"message":"Decoder"},"panels/media/PlayerPropertiesView.ts | decoderName":{"message":"Decoder name"},"panels/media/PlayerPropertiesView.ts | decryptingDemuxer":{"message":"Decrypting demuxer"},"panels/media/PlayerPropertiesView.ts | duration":{"message":"Duration"},"panels/media/PlayerPropertiesView.ts | encoderName":{"message":"Encoder name"},"panels/media/PlayerPropertiesView.ts | fileSize":{"message":"File size"},"panels/media/PlayerPropertiesView.ts | frameRate":{"message":"Frame rate"},"panels/media/PlayerPropertiesView.ts | hardwareDecoder":{"message":"Hardware decoder"},"panels/media/PlayerPropertiesView.ts | hardwareEncoder":{"message":"Hardware encoder"},"panels/media/PlayerPropertiesView.ts | noDecoder":{"message":"No decoder"},"panels/media/PlayerPropertiesView.ts | noEncoder":{"message":"No encoder"},"panels/media/PlayerPropertiesView.ts | noTextTracks":{"message":"No text tracks"},"panels/media/PlayerPropertiesView.ts | playbackFrameTitle":{"message":"Playback frame title"},"panels/media/PlayerPropertiesView.ts | playbackFrameUrl":{"message":"Playback frame URL"},"panels/media/PlayerPropertiesView.ts | properties":{"message":"Properties"},"panels/media/PlayerPropertiesView.ts | rangeHeaderSupport":{"message":"Range header support"},"panels/media/PlayerPropertiesView.ts | rendererName":{"message":"Renderer name"},"panels/media/PlayerPropertiesView.ts | resolution":{"message":"Resolution"},"panels/media/PlayerPropertiesView.ts | singleoriginPlayback":{"message":"Single-origin playback"},"panels/media/PlayerPropertiesView.ts | startTime":{"message":"Start time"},"panels/media/PlayerPropertiesView.ts | streaming":{"message":"Streaming"},"panels/media/PlayerPropertiesView.ts | textTrack":{"message":"Text track"},"panels/media/PlayerPropertiesView.ts | track":{"message":"Track"},"panels/media/PlayerPropertiesView.ts | video":{"message":"Video"},"panels/media/PlayerPropertiesView.ts | videoFreezingScore":{"message":"Video freezing score"},"panels/media/PlayerPropertiesView.ts | videoPlaybackRoughness":{"message":"Video playback roughness"},"panels/mobile_throttling/mobile_throttling-meta.ts | device":{"message":"device"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableFastGThrottling":{"message":"Enable fast 3G throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableSlowGThrottling":{"message":"Enable slow 3G throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOffline":{"message":"Go offline"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOnline":{"message":"Go online"},"panels/mobile_throttling/mobile_throttling-meta.ts | showThrottling":{"message":"Show Throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttling":{"message":"Throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttlingTag":{"message":"throttling"},"panels/mobile_throttling/MobileThrottlingSelector.ts | advanced":{"message":"Advanced"},"panels/mobile_throttling/MobileThrottlingSelector.ts | disabled":{"message":"Disabled"},"panels/mobile_throttling/MobileThrottlingSelector.ts | presets":{"message":"Presets"},"panels/mobile_throttling/NetworkPanelIndicator.ts | acceptedEncodingOverrideSet":{"message":"The set of accepted Content-Encoding headers has been modified by DevTools. See the Network Conditions panel."},"panels/mobile_throttling/NetworkPanelIndicator.ts | networkThrottlingIsEnabled":{"message":"Network throttling is enabled"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeBlocked":{"message":"Requests may be blocked"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeRewrittenByLocal":{"message":"Requests may be rewritten by local overrides"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | custom":{"message":"Custom"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | disabled":{"message":"Disabled"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | presets":{"message":"Presets"},"panels/mobile_throttling/ThrottlingManager.ts | add":{"message":"Add…"},"panels/mobile_throttling/ThrottlingManager.ts | addS":{"message":"Add {PH1}"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottling":{"message":"CPU throttling"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottlingIsEnabled":{"message":"CPU throttling is enabled"},"panels/mobile_throttling/ThrottlingManager.ts | dSlowdown":{"message":"{PH1}× slowdown"},"panels/mobile_throttling/ThrottlingManager.ts | excessConcurrency":{"message":"Exceeding the default value may degrade system performance."},"panels/mobile_throttling/ThrottlingManager.ts | forceDisconnectedFromNetwork":{"message":"Force disconnected from network"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrency":{"message":"Hardware concurrency"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyIsEnabled":{"message":"Hardware concurrency override is enabled"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyValue":{"message":"Value of navigator.hardwareConcurrency"},"panels/mobile_throttling/ThrottlingManager.ts | noThrottling":{"message":"No throttling"},"panels/mobile_throttling/ThrottlingManager.ts | offline":{"message":"Offline"},"panels/mobile_throttling/ThrottlingManager.ts | resetConcurrency":{"message":"Reset to the default value"},"panels/mobile_throttling/ThrottlingManager.ts | sS":{"message":"{PH1}: {PH2}"},"panels/mobile_throttling/ThrottlingManager.ts | throttling":{"message":"Throttling"},"panels/mobile_throttling/ThrottlingPresets.ts | checkNetworkAndPerformancePanels":{"message":"Check Network and Performance panels"},"panels/mobile_throttling/ThrottlingPresets.ts | custom":{"message":"Custom"},"panels/mobile_throttling/ThrottlingPresets.ts | fastGXCpuSlowdown":{"message":"Fast 3G & 4x CPU slowdown"},"panels/mobile_throttling/ThrottlingPresets.ts | lowendMobile":{"message":"Low-end mobile"},"panels/mobile_throttling/ThrottlingPresets.ts | midtierMobile":{"message":"Mid-tier mobile"},"panels/mobile_throttling/ThrottlingPresets.ts | noInternetConnectivity":{"message":"No internet connectivity"},"panels/mobile_throttling/ThrottlingPresets.ts | noThrottling":{"message":"No throttling"},"panels/mobile_throttling/ThrottlingPresets.ts | slowGXCpuSlowdown":{"message":"Slow 3G & 6x CPU slowdown"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | addCustomProfile":{"message":"Add custom profile..."},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dms":{"message":"{PH1} ms"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | download":{"message":"Download"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dskbits":{"message":"{PH1} kbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | fsmbits":{"message":"{PH1} Mbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latency":{"message":"Latency"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latencyMustBeAnIntegerBetweenSms":{"message":"Latency must be an integer between {PH1} ms to {PH2} ms inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | networkThrottlingProfiles":{"message":"Network Throttling Profiles"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | optional":{"message":"optional"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileName":{"message":"Profile Name"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileNameCharactersLengthMust":{"message":"Profile Name characters length must be between 1 to {PH1} inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | sMustBeANumberBetweenSkbsToSkbs":{"message":"{PH1} must be a number between {PH2} kbit/s to {PH3} kbit/s inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | upload":{"message":"Upload"},"panels/network/BinaryResourceView.ts | binaryViewType":{"message":"Binary view type"},"panels/network/BinaryResourceView.ts | copiedAsBase":{"message":"Copied as Base64"},"panels/network/BinaryResourceView.ts | copiedAsHex":{"message":"Copied as Hex"},"panels/network/BinaryResourceView.ts | copiedAsUtf":{"message":"Copied as UTF-8"},"panels/network/BinaryResourceView.ts | copyAsBase":{"message":"Copy as Base64"},"panels/network/BinaryResourceView.ts | copyAsHex":{"message":"Copy as Hex"},"panels/network/BinaryResourceView.ts | copyAsUtf":{"message":"Copy as UTF-8"},"panels/network/BinaryResourceView.ts | copyToClipboard":{"message":"Copy to clipboard"},"panels/network/BinaryResourceView.ts | hexViewer":{"message":"Hex Viewer"},"panels/network/BlockedURLsPane.ts | addNetworkRequestBlockingPattern":{"message":"Add network request blocking pattern"},"panels/network/BlockedURLsPane.ts | addPattern":{"message":"Add pattern"},"panels/network/BlockedURLsPane.ts | dBlocked":{"message":"{PH1} blocked"},"panels/network/BlockedURLsPane.ts | enableNetworkRequestBlocking":{"message":"Enable network request blocking"},"panels/network/BlockedURLsPane.ts | itemDeleted":{"message":"Item successfully deleted"},"panels/network/BlockedURLsPane.ts | networkRequestsAreNotBlockedS":{"message":"Network requests are not blocked. {PH1}"},"panels/network/BlockedURLsPane.ts | patternAlreadyExists":{"message":"Pattern already exists."},"panels/network/BlockedURLsPane.ts | patternInputCannotBeEmpty":{"message":"Pattern input cannot be empty."},"panels/network/BlockedURLsPane.ts | removeAllPatterns":{"message":"Remove all patterns"},"panels/network/BlockedURLsPane.ts | textPatternToBlockMatching":{"message":"Text pattern to block matching requests; use * for wildcard"},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariation":{"message":"Active client experiment variation IDs."},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariationIds":{"message":"Active client experiment variation IDs that trigger server-side behavior."},"panels/network/components/HeaderSectionRow.ts | decoded":{"message":"Decoded:"},"panels/network/components/HeaderSectionRow.ts | editHeader":{"message":"Override header"},"panels/network/components/HeaderSectionRow.ts | headerNamesOnlyLetters":{"message":"Header names should contain only letters, digits, hyphens or underscores"},"panels/network/components/HeaderSectionRow.ts | learnMore":{"message":"Learn more"},"panels/network/components/HeaderSectionRow.ts | learnMoreInTheIssuesTab":{"message":"Learn more in the issues tab"},"panels/network/components/HeaderSectionRow.ts | reloadPrompt":{"message":"Refresh the page/request for these changes to take effect"},"panels/network/components/HeaderSectionRow.ts | removeOverride":{"message":"Remove this header override"},"panels/network/components/RequestHeaderSection.ts | learnMore":{"message":"Learn more"},"panels/network/components/RequestHeaderSection.ts | onlyProvisionalHeadersAre":{"message":"Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers."},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShown":{"message":"Provisional headers are shown."},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShownDisableCache":{"message":"Provisional headers are shown. Disable cache to see full headers."},"panels/network/components/RequestHeadersView.ts | fromDiskCache":{"message":"(from disk cache)"},"panels/network/components/RequestHeadersView.ts | fromMemoryCache":{"message":"(from memory cache)"},"panels/network/components/RequestHeadersView.ts | fromPrefetchCache":{"message":"(from prefetch cache)"},"panels/network/components/RequestHeadersView.ts | fromServiceWorker":{"message":"(from service worker)"},"panels/network/components/RequestHeadersView.ts | fromSignedexchange":{"message":"(from signed-exchange)"},"panels/network/components/RequestHeadersView.ts | fromWebBundle":{"message":"(from Web Bundle)"},"panels/network/components/RequestHeadersView.ts | general":{"message":"General"},"panels/network/components/RequestHeadersView.ts | headerOverrides":{"message":"Header overrides"},"panels/network/components/RequestHeadersView.ts | raw":{"message":"Raw"},"panels/network/components/RequestHeadersView.ts | referrerPolicy":{"message":"Referrer Policy"},"panels/network/components/RequestHeadersView.ts | remoteAddress":{"message":"Remote Address"},"panels/network/components/RequestHeadersView.ts | requestHeaders":{"message":"Request Headers"},"panels/network/components/RequestHeadersView.ts | requestMethod":{"message":"Request Method"},"panels/network/components/RequestHeadersView.ts | requestUrl":{"message":"Request URL"},"panels/network/components/RequestHeadersView.ts | responseHeaders":{"message":"Response Headers"},"panels/network/components/RequestHeadersView.ts | revealHeaderOverrides":{"message":"Reveal header override definitions"},"panels/network/components/RequestHeadersView.ts | showMore":{"message":"Show more"},"panels/network/components/RequestHeadersView.ts | statusCode":{"message":"Status Code"},"panels/network/components/RequestTrustTokensView.ts | aClientprovidedArgumentWas":{"message":"A client-provided argument was malformed or otherwise invalid."},"panels/network/components/RequestTrustTokensView.ts | eitherNoInputsForThisOperation":{"message":"Either no inputs for this operation are available or the output exceeds the operations quota."},"panels/network/components/RequestTrustTokensView.ts | failure":{"message":"Failure"},"panels/network/components/RequestTrustTokensView.ts | issuer":{"message":"Issuer"},"panels/network/components/RequestTrustTokensView.ts | issuers":{"message":"Issuers"},"panels/network/components/RequestTrustTokensView.ts | numberOfIssuedTokens":{"message":"Number of issued tokens"},"panels/network/components/RequestTrustTokensView.ts | parameters":{"message":"Parameters"},"panels/network/components/RequestTrustTokensView.ts | refreshPolicy":{"message":"Refresh policy"},"panels/network/components/RequestTrustTokensView.ts | result":{"message":"Result"},"panels/network/components/RequestTrustTokensView.ts | status":{"message":"Status"},"panels/network/components/RequestTrustTokensView.ts | success":{"message":"Success"},"panels/network/components/RequestTrustTokensView.ts | theKeysForThisPSTIssuerAreUnavailable":{"message":"The keys for this PST issuer are unavailable. The issuer may need to be registered via the Chrome registration process."},"panels/network/components/RequestTrustTokensView.ts | theOperationFailedForAnUnknown":{"message":"The operation failed for an unknown reason."},"panels/network/components/RequestTrustTokensView.ts | theOperationsResultWasServedFrom":{"message":"The operations result was served from cache."},"panels/network/components/RequestTrustTokensView.ts | theOperationWasFulfilledLocally":{"message":"The operation was fulfilled locally, no request was sent."},"panels/network/components/RequestTrustTokensView.ts | theServersResponseWasMalformedOr":{"message":"The servers response was malformed or otherwise invalid."},"panels/network/components/RequestTrustTokensView.ts | topLevelOrigin":{"message":"Top level origin"},"panels/network/components/RequestTrustTokensView.ts | type":{"message":"Type"},"panels/network/components/ResponseHeaderSection.ts | addHeader":{"message":"Add header"},"panels/network/components/ResponseHeaderSection.ts | chooseThisOptionIfTheResourceAnd":{"message":"Choose this option if the resource and the document are served from the same site."},"panels/network/components/ResponseHeaderSection.ts | onlyChooseThisOptionIfAn":{"message":"Only choose this option if an arbitrary website including this resource does not impose a security risk."},"panels/network/components/ResponseHeaderSection.ts | thisDocumentWasBlockedFrom":{"message":"This document was blocked from loading in an iframe with a sandbox attribute because this document specified a cross-origin opener policy."},"panels/network/components/ResponseHeaderSection.ts | toEmbedThisFrameInYourDocument":{"message":"To embed this frame in your document, the response needs to enable the cross-origin embedder policy by specifying the following response header:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferent":{"message":"To use this resource from a different origin, the server needs to specify a cross-origin resource policy in the response headers:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentOrigin":{"message":"To use this resource from a different origin, the server may relax the cross-origin resource policy response header:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentSite":{"message":"To use this resource from a different site, the server may relax the cross-origin resource policy response header:"},"panels/network/components/WebBundleInfoView.ts | bundledResource":{"message":"Bundled resource"},"panels/network/EventSourceMessagesView.ts | copyMessage":{"message":"Copy message"},"panels/network/EventSourceMessagesView.ts | data":{"message":"Data"},"panels/network/EventSourceMessagesView.ts | eventSource":{"message":"Event Source"},"panels/network/EventSourceMessagesView.ts | id":{"message":"Id"},"panels/network/EventSourceMessagesView.ts | time":{"message":"Time"},"panels/network/EventSourceMessagesView.ts | type":{"message":"Type"},"panels/network/network-meta.ts | clear":{"message":"Clear network log"},"panels/network/network-meta.ts | colorCode":{"message":"color code"},"panels/network/network-meta.ts | colorCodeByResourceType":{"message":"Color code by resource type"},"panels/network/network-meta.ts | colorcodeResourceTypes":{"message":"Color-code resource types"},"panels/network/network-meta.ts | diskCache":{"message":"disk cache"},"panels/network/network-meta.ts | dontGroupNetworkLogItemsByFrame":{"message":"Don't group network log items by frame"},"panels/network/network-meta.ts | frame":{"message":"frame"},"panels/network/network-meta.ts | group":{"message":"group"},"panels/network/network-meta.ts | groupNetworkLogByFrame":{"message":"Group network log by frame"},"panels/network/network-meta.ts | groupNetworkLogItemsByFrame":{"message":"Group network log items by frame"},"panels/network/network-meta.ts | hideRequestDetails":{"message":"Hide request details"},"panels/network/network-meta.ts | network":{"message":"Network"},"panels/network/network-meta.ts | netWork":{"message":"network"},"panels/network/network-meta.ts | networkConditions":{"message":"Network conditions"},"panels/network/network-meta.ts | networkRequestBlocking":{"message":"Network request blocking"},"panels/network/network-meta.ts | networkThrottling":{"message":"network throttling"},"panels/network/network-meta.ts | recordNetworkLog":{"message":"Record network log"},"panels/network/network-meta.ts | resourceType":{"message":"resource type"},"panels/network/network-meta.ts | search":{"message":"Search"},"panels/network/network-meta.ts | showNetwork":{"message":"Show Network"},"panels/network/network-meta.ts | showNetworkConditions":{"message":"Show Network conditions"},"panels/network/network-meta.ts | showNetworkRequestBlocking":{"message":"Show Network request blocking"},"panels/network/network-meta.ts | showSearch":{"message":"Show Search"},"panels/network/network-meta.ts | stopRecordingNetworkLog":{"message":"Stop recording network log"},"panels/network/network-meta.ts | useDefaultColors":{"message":"Use default colors"},"panels/network/NetworkConfigView.ts | acceptedEncoding":{"message":"Accepted Content-Encodings"},"panels/network/NetworkConfigView.ts | caching":{"message":"Caching"},"panels/network/NetworkConfigView.ts | clientHintsStatusText":{"message":"User agent updated."},"panels/network/NetworkConfigView.ts | custom":{"message":"Custom..."},"panels/network/NetworkConfigView.ts | customUserAgentFieldIsRequired":{"message":"Custom user agent field is required"},"panels/network/NetworkConfigView.ts | disableCache":{"message":"Disable cache"},"panels/network/NetworkConfigView.ts | enterACustomUserAgent":{"message":"Enter a custom user agent"},"panels/network/NetworkConfigView.ts | networkConditionsPanelShown":{"message":"Network conditions shown"},"panels/network/NetworkConfigView.ts | networkThrottling":{"message":"Network throttling"},"panels/network/NetworkConfigView.ts | selectAutomatically":{"message":"Use browser default"},"panels/network/NetworkConfigView.ts | userAgent":{"message":"User agent"},"panels/network/NetworkDataGridNode.ts | alternativeJobWonRace":{"message":"Chrome used a HTTP/3 connection induced by an 'Alt-Svc' header because it won a race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | alternativeJobWonWithoutRace":{"message":"Chrome used a HTTP/3 connection induced by an 'Alt-Svc' header without racing against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | blockeds":{"message":"(blocked:{PH1})"},"panels/network/NetworkDataGridNode.ts | blockedTooltip":{"message":"This request was blocked due to misconfigured response headers, click to view the headers"},"panels/network/NetworkDataGridNode.ts | broken":{"message":"Chrome did not try to establish a HTTP/3 connection because it was marked as broken."},"panels/network/NetworkDataGridNode.ts | canceled":{"message":"(canceled)"},"panels/network/NetworkDataGridNode.ts | corsError":{"message":"CORS error"},"panels/network/NetworkDataGridNode.ts | crossoriginResourceSharingErrorS":{"message":"Cross-Origin Resource Sharing error: {PH1}"},"panels/network/NetworkDataGridNode.ts | csp":{"message":"csp"},"panels/network/NetworkDataGridNode.ts | data":{"message":"(data)"},"panels/network/NetworkDataGridNode.ts | devtools":{"message":"devtools"},"panels/network/NetworkDataGridNode.ts | diskCache":{"message":"(disk cache)"},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonRace":{"message":"Chrome used a HTTP/3 connection due to the DNS record indicating HTTP/3 support, which won a race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonWithoutRace":{"message":"Chrome used a HTTP/3 connection due to the DNS record indicating HTTP/3 support. There was no race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | failed":{"message":"(failed)"},"panels/network/NetworkDataGridNode.ts | finished":{"message":"Finished"},"panels/network/NetworkDataGridNode.ts | hasOverriddenHeaders":{"message":"Request has overridden headers"},"panels/network/NetworkDataGridNode.ts | level":{"message":"level 1"},"panels/network/NetworkDataGridNode.ts | mainJobWonRace":{"message":"Chrome used this protocol because it won a race against establishing a HTTP/3 connection."},"panels/network/NetworkDataGridNode.ts | mappingMissing":{"message":"Chrome did not use an alternative HTTP version because no alternative protocol information was available when the request was issued, but an 'Alt-Svc' header was present in the response."},"panels/network/NetworkDataGridNode.ts | memoryCache":{"message":"(memory cache)"},"panels/network/NetworkDataGridNode.ts | origin":{"message":"origin"},"panels/network/NetworkDataGridNode.ts | other":{"message":"other"},"panels/network/NetworkDataGridNode.ts | otherC":{"message":"Other"},"panels/network/NetworkDataGridNode.ts | parser":{"message":"Parser"},"panels/network/NetworkDataGridNode.ts | pending":{"message":"Pending"},"panels/network/NetworkDataGridNode.ts | pendingq":{"message":"(pending)"},"panels/network/NetworkDataGridNode.ts | prefetchCache":{"message":"(prefetch cache)"},"panels/network/NetworkDataGridNode.ts | preflight":{"message":"Preflight"},"panels/network/NetworkDataGridNode.ts | preload":{"message":"Preload"},"panels/network/NetworkDataGridNode.ts | push":{"message":"Push / "},"panels/network/NetworkDataGridNode.ts | redirect":{"message":"Redirect"},"panels/network/NetworkDataGridNode.ts | script":{"message":"Script"},"panels/network/NetworkDataGridNode.ts | selectPreflightRequest":{"message":"Select preflight request"},"panels/network/NetworkDataGridNode.ts | selectTheRequestThatTriggered":{"message":"Select the request that triggered this preflight"},"panels/network/NetworkDataGridNode.ts | servedFromDiskCacheResourceSizeS":{"message":"Served from disk cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromMemoryCacheResource":{"message":"Served from memory cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromPrefetchCacheResource":{"message":"Served from prefetch cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromServiceworkerResource":{"message":"Served from ServiceWorker, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromSignedHttpExchange":{"message":"Served from Signed HTTP Exchange, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromWebBundle":{"message":"Served from Web Bundle, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | serviceworker":{"message":"(ServiceWorker)"},"panels/network/NetworkDataGridNode.ts | signedexchange":{"message":"signed-exchange"},"panels/network/NetworkDataGridNode.ts | sPreflight":{"message":"{PH1} + Preflight"},"panels/network/NetworkDataGridNode.ts | timeSubtitleTooltipText":{"message":"Latency (response received time - start time)"},"panels/network/NetworkDataGridNode.ts | unknown":{"message":"(unknown)"},"panels/network/NetworkDataGridNode.ts | unknownExplanation":{"message":"The request status cannot be shown here because the page that issued it unloaded while the request was in flight. You can use chrome://net-export to capture a network log and see all request details."},"panels/network/NetworkDataGridNode.ts | webBundle":{"message":"(Web Bundle)"},"panels/network/NetworkDataGridNode.ts | webBundleError":{"message":"Web Bundle error"},"panels/network/NetworkDataGridNode.ts | webBundleInnerRequest":{"message":"Served from Web Bundle"},"panels/network/NetworkItemView.ts | cookies":{"message":"Cookies"},"panels/network/NetworkItemView.ts | eventstream":{"message":"EventStream"},"panels/network/NetworkItemView.ts | headers":{"message":"Headers"},"panels/network/NetworkItemView.ts | initiator":{"message":"Initiator"},"panels/network/NetworkItemView.ts | messages":{"message":"Messages"},"panels/network/NetworkItemView.ts | payload":{"message":"Payload"},"panels/network/NetworkItemView.ts | preview":{"message":"Preview"},"panels/network/NetworkItemView.ts | rawResponseData":{"message":"Raw response data"},"panels/network/NetworkItemView.ts | requestAndResponseCookies":{"message":"Request and response cookies"},"panels/network/NetworkItemView.ts | requestAndResponseTimeline":{"message":"Request and response timeline"},"panels/network/NetworkItemView.ts | requestInitiatorCallStack":{"message":"Request initiator call stack"},"panels/network/NetworkItemView.ts | response":{"message":"Response"},"panels/network/NetworkItemView.ts | responsePreview":{"message":"Response preview"},"panels/network/NetworkItemView.ts | signedexchangeError":{"message":"SignedExchange error"},"panels/network/NetworkItemView.ts | timing":{"message":"Timing"},"panels/network/NetworkItemView.ts | trustTokenOperationDetails":{"message":"Private State Token operation details"},"panels/network/NetworkItemView.ts | trustTokens":{"message":"Private State Tokens"},"panels/network/NetworkItemView.ts | websocketMessages":{"message":"WebSocket messages"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowser":{"message":"Are you sure you want to clear browser cache?"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowserCookies":{"message":"Are you sure you want to clear browser cookies?"},"panels/network/NetworkLogView.ts | blockedRequests":{"message":"Blocked Requests"},"panels/network/NetworkLogView.ts | blockRequestDomain":{"message":"Block request domain"},"panels/network/NetworkLogView.ts | blockRequestUrl":{"message":"Block request URL"},"panels/network/NetworkLogView.ts | clearBrowserCache":{"message":"Clear browser cache"},"panels/network/NetworkLogView.ts | clearBrowserCookies":{"message":"Clear browser cookies"},"panels/network/NetworkLogView.ts | copy":{"message":"Copy"},"panels/network/NetworkLogView.ts | copyAllAsCurl":{"message":"Copy all as cURL"},"panels/network/NetworkLogView.ts | copyAllAsCurlBash":{"message":"Copy all as cURL (bash)"},"panels/network/NetworkLogView.ts | copyAllAsCurlCmd":{"message":"Copy all as cURL (cmd)"},"panels/network/NetworkLogView.ts | copyAllAsFetch":{"message":"Copy all as fetch"},"panels/network/NetworkLogView.ts | copyAllAsHar":{"message":"Copy all as HAR"},"panels/network/NetworkLogView.ts | copyAllAsNodejsFetch":{"message":"Copy all as Node.js fetch"},"panels/network/NetworkLogView.ts | copyAllAsPowershell":{"message":"Copy all as PowerShell"},"panels/network/NetworkLogView.ts | copyAsCurl":{"message":"Copy as cURL"},"panels/network/NetworkLogView.ts | copyAsCurlBash":{"message":"Copy as cURL (bash)"},"panels/network/NetworkLogView.ts | copyAsCurlCmd":{"message":"Copy as cURL (cmd)"},"panels/network/NetworkLogView.ts | copyAsFetch":{"message":"Copy as fetch"},"panels/network/NetworkLogView.ts | copyAsNodejsFetch":{"message":"Copy as Node.js fetch"},"panels/network/NetworkLogView.ts | copyAsPowershell":{"message":"Copy as PowerShell"},"panels/network/NetworkLogView.ts | copyRequestHeaders":{"message":"Copy request headers"},"panels/network/NetworkLogView.ts | copyResponse":{"message":"Copy response"},"panels/network/NetworkLogView.ts | copyResponseHeaders":{"message":"Copy response headers"},"panels/network/NetworkLogView.ts | copyStacktrace":{"message":"Copy stack trace"},"panels/network/NetworkLogView.ts | domcontentloadedS":{"message":"DOMContentLoaded: {PH1}"},"panels/network/NetworkLogView.ts | dropHarFilesHere":{"message":"Drop HAR files here"},"panels/network/NetworkLogView.ts | finishS":{"message":"Finish: {PH1}"},"panels/network/NetworkLogView.ts | hasBlockedCookies":{"message":"Has blocked cookies"},"panels/network/NetworkLogView.ts | hideDataUrls":{"message":"Hide data URLs"},"panels/network/NetworkLogView.ts | hidesDataAndBlobUrls":{"message":"Hides data: and blob: URLs"},"panels/network/NetworkLogView.ts | invertFilter":{"message":"Invert"},"panels/network/NetworkLogView.ts | invertsFilter":{"message":"Inverts the search filter"},"panels/network/NetworkLogView.ts | learnMore":{"message":"Learn more"},"panels/network/NetworkLogView.ts | loadS":{"message":"Load: {PH1}"},"panels/network/NetworkLogView.ts | networkDataAvailable":{"message":"Network Data Available"},"panels/network/NetworkLogView.ts | onlyShowBlockedRequests":{"message":"Only show blocked requests"},"panels/network/NetworkLogView.ts | onlyShowRequestsWithBlocked":{"message":"Only show requests with blocked response cookies"},"panels/network/NetworkLogView.ts | onlyShowThirdPartyRequests":{"message":"Shows only requests with origin different from page origin"},"panels/network/NetworkLogView.ts | overrideHeaders":{"message":"Override headers"},"panels/network/NetworkLogView.ts | performARequestOrHitSToRecordThe":{"message":"Perform a request or hit {PH1} to record the reload."},"panels/network/NetworkLogView.ts | recordingNetworkActivity":{"message":"Recording network activity…"},"panels/network/NetworkLogView.ts | recordToDisplayNetworkActivity":{"message":"Record network log ({PH1}) to display network activity."},"panels/network/NetworkLogView.ts | replayXhr":{"message":"Replay XHR"},"panels/network/NetworkLogView.ts | resourceTypesToInclude":{"message":"Resource types to include"},"panels/network/NetworkLogView.ts | saveAllAsHarWithContent":{"message":"Save all as HAR with content"},"panels/network/NetworkLogView.ts | sBResourcesLoadedByThePage":{"message":"{PH1} B resources loaded by the page"},"panels/network/NetworkLogView.ts | sBSBResourcesLoadedByThePage":{"message":"{PH1} B / {PH2} B resources loaded by the page"},"panels/network/NetworkLogView.ts | sBSBTransferredOverNetwork":{"message":"{PH1} B / {PH2} B transferred over network"},"panels/network/NetworkLogView.ts | sBTransferredOverNetwork":{"message":"{PH1} B transferred over network"},"panels/network/NetworkLogView.ts | sRequests":{"message":"{PH1} requests"},"panels/network/NetworkLogView.ts | sResources":{"message":"{PH1} resources"},"panels/network/NetworkLogView.ts | sSRequests":{"message":"{PH1} / {PH2} requests"},"panels/network/NetworkLogView.ts | sSResources":{"message":"{PH1} / {PH2} resources"},"panels/network/NetworkLogView.ts | sSTransferred":{"message":"{PH1} / {PH2} transferred"},"panels/network/NetworkLogView.ts | sTransferred":{"message":"{PH1} transferred"},"panels/network/NetworkLogView.ts | thirdParty":{"message":"3rd-party requests"},"panels/network/NetworkLogView.ts | unblockS":{"message":"Unblock {PH1}"},"panels/network/NetworkLogViewColumns.ts | connectionId":{"message":"Connection ID"},"panels/network/NetworkLogViewColumns.ts | content":{"message":"Content"},"panels/network/NetworkLogViewColumns.ts | cookies":{"message":"Cookies"},"panels/network/NetworkLogViewColumns.ts | domain":{"message":"Domain"},"panels/network/NetworkLogViewColumns.ts | endTime":{"message":"End Time"},"panels/network/NetworkLogViewColumns.ts | initiator":{"message":"Initiator"},"panels/network/NetworkLogViewColumns.ts | initiatorAddressSpace":{"message":"Initiator Address Space"},"panels/network/NetworkLogViewColumns.ts | latency":{"message":"Latency"},"panels/network/NetworkLogViewColumns.ts | manageHeaderColumns":{"message":"Manage Header Columns…"},"panels/network/NetworkLogViewColumns.ts | method":{"message":"Method"},"panels/network/NetworkLogViewColumns.ts | name":{"message":"Name"},"panels/network/NetworkLogViewColumns.ts | networkLog":{"message":"Network Log"},"panels/network/NetworkLogViewColumns.ts | path":{"message":"Path"},"panels/network/NetworkLogViewColumns.ts | priority":{"message":"Priority"},"panels/network/NetworkLogViewColumns.ts | protocol":{"message":"Protocol"},"panels/network/NetworkLogViewColumns.ts | remoteAddress":{"message":"Remote Address"},"panels/network/NetworkLogViewColumns.ts | remoteAddressSpace":{"message":"Remote Address Space"},"panels/network/NetworkLogViewColumns.ts | responseHeaders":{"message":"Response Headers"},"panels/network/NetworkLogViewColumns.ts | responseTime":{"message":"Response Time"},"panels/network/NetworkLogViewColumns.ts | scheme":{"message":"Scheme"},"panels/network/NetworkLogViewColumns.ts | setCookies":{"message":"Set Cookies"},"panels/network/NetworkLogViewColumns.ts | size":{"message":"Size"},"panels/network/NetworkLogViewColumns.ts | startTime":{"message":"Start Time"},"panels/network/NetworkLogViewColumns.ts | status":{"message":"Status"},"panels/network/NetworkLogViewColumns.ts | text":{"message":"Text"},"panels/network/NetworkLogViewColumns.ts | time":{"message":"Time"},"panels/network/NetworkLogViewColumns.ts | totalDuration":{"message":"Total Duration"},"panels/network/NetworkLogViewColumns.ts | type":{"message":"Type"},"panels/network/NetworkLogViewColumns.ts | url":{"message":"Url"},"panels/network/NetworkLogViewColumns.ts | waterfall":{"message":"Waterfall"},"panels/network/NetworkManageCustomHeadersView.ts | addCustomHeader":{"message":"Add custom header…"},"panels/network/NetworkManageCustomHeadersView.ts | headerName":{"message":"Header Name"},"panels/network/NetworkManageCustomHeadersView.ts | manageHeaderColumns":{"message":"Manage Header Columns"},"panels/network/NetworkManageCustomHeadersView.ts | noCustomHeaders":{"message":"No custom headers"},"panels/network/NetworkPanel.ts | captureScreenshots":{"message":"Capture screenshots"},"panels/network/NetworkPanel.ts | captureScreenshotsWhenLoadingA":{"message":"Capture screenshots when loading a page"},"panels/network/NetworkPanel.ts | close":{"message":"Close"},"panels/network/NetworkPanel.ts | disableCache":{"message":"Disable cache"},"panels/network/NetworkPanel.ts | disableCacheWhileDevtoolsIsOpen":{"message":"Disable cache (while DevTools is open)"},"panels/network/NetworkPanel.ts | doNotClearLogOnPageReload":{"message":"Do not clear log on page reload / navigation"},"panels/network/NetworkPanel.ts | exportHar":{"message":"Export HAR..."},"panels/network/NetworkPanel.ts | fetchingFrames":{"message":"Fetching frames..."},"panels/network/NetworkPanel.ts | groupByFrame":{"message":"Group by frame"},"panels/network/NetworkPanel.ts | groupRequestsByTopLevelRequest":{"message":"Group requests by top level request frame"},"panels/network/NetworkPanel.ts | hitSToReloadAndCaptureFilmstrip":{"message":"Hit {PH1} to reload and capture filmstrip."},"panels/network/NetworkPanel.ts | importHarFile":{"message":"Import HAR file..."},"panels/network/NetworkPanel.ts | moreNetworkConditions":{"message":"More network conditions…"},"panels/network/NetworkPanel.ts | networkSettings":{"message":"Network settings"},"panels/network/NetworkPanel.ts | preserveLog":{"message":"Preserve log"},"panels/network/NetworkPanel.ts | recordingFrames":{"message":"Recording frames..."},"panels/network/NetworkPanel.ts | revealInNetworkPanel":{"message":"Reveal in Network panel"},"panels/network/NetworkPanel.ts | search":{"message":"Search"},"panels/network/NetworkPanel.ts | showMoreInformationInRequestRows":{"message":"Show more information in request rows"},"panels/network/NetworkPanel.ts | showOverview":{"message":"Show overview"},"panels/network/NetworkPanel.ts | showOverviewOfNetworkRequests":{"message":"Show overview of network requests"},"panels/network/NetworkPanel.ts | throttling":{"message":"Throttling"},"panels/network/NetworkPanel.ts | useLargeRequestRows":{"message":"Use large request rows"},"panels/network/NetworkSearchScope.ts | url":{"message":"URL"},"panels/network/NetworkTimeCalculator.ts | sDownload":{"message":"{PH1} download"},"panels/network/NetworkTimeCalculator.ts | sFromCache":{"message":"{PH1} (from cache)"},"panels/network/NetworkTimeCalculator.ts | sFromServiceworker":{"message":"{PH1} (from ServiceWorker)"},"panels/network/NetworkTimeCalculator.ts | sLatency":{"message":"{PH1} latency"},"panels/network/NetworkTimeCalculator.ts | sLatencySDownloadSTotal":{"message":"{PH1} latency, {PH2} download ({PH3} total)"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromThe":{"message":"Cookies that were received from the server in the 'set-cookie' header of the response"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromTheServer":{"message":"Cookies that were received from the server in the 'set-cookie' header of the response but were malformed"},"panels/network/RequestCookiesView.ts | cookiesThatWereSentToTheServerIn":{"message":"Cookies that were sent to the server in the 'cookie' header of the request"},"panels/network/RequestCookiesView.ts | learnMore":{"message":"Learn more"},"panels/network/RequestCookiesView.ts | malformedResponseCookies":{"message":"Malformed Response Cookies"},"panels/network/RequestCookiesView.ts | noRequestCookiesWereSent":{"message":"No request cookies were sent."},"panels/network/RequestCookiesView.ts | requestCookies":{"message":"Request Cookies"},"panels/network/RequestCookiesView.ts | responseCookies":{"message":"Response Cookies"},"panels/network/RequestCookiesView.ts | showFilteredOutRequestCookies":{"message":"show filtered out request cookies"},"panels/network/RequestCookiesView.ts | siteHasCookieInOtherPartition":{"message":"This site has cookies in another partition, that were not sent with this request. {PH1}"},"panels/network/RequestCookiesView.ts | thisRequestHasNoCookies":{"message":"This request has no cookies."},"panels/network/RequestHeadersView.ts | activeClientExperimentVariation":{"message":"Active client experiment variation IDs."},"panels/network/RequestHeadersView.ts | activeClientExperimentVariationIds":{"message":"Active client experiment variation IDs that trigger server-side behavior."},"panels/network/RequestHeadersView.ts | chooseThisOptionIfTheResourceAnd":{"message":"Choose this option if the resource and the document are served from the same site."},"panels/network/RequestHeadersView.ts | copyValue":{"message":"Copy value"},"panels/network/RequestHeadersView.ts | decoded":{"message":"Decoded:"},"panels/network/RequestHeadersView.ts | fromDiskCache":{"message":"(from disk cache)"},"panels/network/RequestHeadersView.ts | fromMemoryCache":{"message":"(from memory cache)"},"panels/network/RequestHeadersView.ts | fromPrefetchCache":{"message":"(from prefetch cache)"},"panels/network/RequestHeadersView.ts | fromServiceWorker":{"message":"(from service worker)"},"panels/network/RequestHeadersView.ts | fromSignedexchange":{"message":"(from signed-exchange)"},"panels/network/RequestHeadersView.ts | fromWebBundle":{"message":"(from Web Bundle)"},"panels/network/RequestHeadersView.ts | general":{"message":"General"},"panels/network/RequestHeadersView.ts | headerOverrides":{"message":"Header overrides"},"panels/network/RequestHeadersView.ts | learnMore":{"message":"Learn more"},"panels/network/RequestHeadersView.ts | learnMoreInTheIssuesTab":{"message":"Learn more in the issues tab"},"panels/network/RequestHeadersView.ts | onlyChooseThisOptionIfAn":{"message":"Only choose this option if an arbitrary website including this resource does not impose a security risk."},"panels/network/RequestHeadersView.ts | onlyProvisionalHeadersAre":{"message":"Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers."},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShown":{"message":"Provisional headers are shown"},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShownS":{"message":"Provisional headers are shown. Disable cache to see full headers."},"panels/network/RequestHeadersView.ts | referrerPolicy":{"message":"Referrer Policy"},"panels/network/RequestHeadersView.ts | remoteAddress":{"message":"Remote Address"},"panels/network/RequestHeadersView.ts | requestHeaders":{"message":"Request Headers"},"panels/network/RequestHeadersView.ts | requestMethod":{"message":"Request Method"},"panels/network/RequestHeadersView.ts | requestUrl":{"message":"Request URL"},"panels/network/RequestHeadersView.ts | responseHeaders":{"message":"Response Headers"},"panels/network/RequestHeadersView.ts | showMore":{"message":"Show more"},"panels/network/RequestHeadersView.ts | statusCode":{"message":"Status Code"},"panels/network/RequestHeadersView.ts | thisDocumentWasBlockedFrom":{"message":"This document was blocked from loading in an iframe with a sandbox attribute because this document specified a cross-origin opener policy."},"panels/network/RequestHeadersView.ts | toEmbedThisFrameInYourDocument":{"message":"To embed this frame in your document, the response needs to enable the cross-origin embedder policy by specifying the following response header:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferent":{"message":"To use this resource from a different origin, the server needs to specify a cross-origin resource policy in the response headers:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentOrigin":{"message":"To use this resource from a different origin, the server may relax the cross-origin resource policy response header:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentSite":{"message":"To use this resource from a different site, the server may relax the cross-origin resource policy response header:"},"panels/network/RequestHeadersView.ts | viewParsed":{"message":"View parsed"},"panels/network/RequestHeadersView.ts | viewSource":{"message":"View source"},"panels/network/RequestInitiatorView.ts | requestCallStack":{"message":"Request call stack"},"panels/network/RequestInitiatorView.ts | requestInitiatorChain":{"message":"Request initiator chain"},"panels/network/RequestInitiatorView.ts | thisRequestHasNoInitiatorData":{"message":"This request has no initiator data."},"panels/network/RequestPayloadView.ts | copyValue":{"message":"Copy value"},"panels/network/RequestPayloadView.ts | empty":{"message":"(empty)"},"panels/network/RequestPayloadView.ts | formData":{"message":"Form Data"},"panels/network/RequestPayloadView.ts | queryStringParameters":{"message":"Query String Parameters"},"panels/network/RequestPayloadView.ts | requestPayload":{"message":"Request Payload"},"panels/network/RequestPayloadView.ts | showMore":{"message":"Show more"},"panels/network/RequestPayloadView.ts | unableToDecodeValue":{"message":"(unable to decode value)"},"panels/network/RequestPayloadView.ts | viewDecoded":{"message":"View decoded"},"panels/network/RequestPayloadView.ts | viewDecodedL":{"message":"view decoded"},"panels/network/RequestPayloadView.ts | viewParsed":{"message":"View parsed"},"panels/network/RequestPayloadView.ts | viewParsedL":{"message":"view parsed"},"panels/network/RequestPayloadView.ts | viewSource":{"message":"View source"},"panels/network/RequestPayloadView.ts | viewSourceL":{"message":"view source"},"panels/network/RequestPayloadView.ts | viewUrlEncoded":{"message":"View URL-encoded"},"panels/network/RequestPayloadView.ts | viewUrlEncodedL":{"message":"view URL-encoded"},"panels/network/RequestPreviewView.ts | failedToLoadResponseData":{"message":"Failed to load response data"},"panels/network/RequestPreviewView.ts | previewNotAvailable":{"message":"Preview not available"},"panels/network/RequestResponseView.ts | failedToLoadResponseData":{"message":"Failed to load response data"},"panels/network/RequestResponseView.ts | thisRequestHasNoResponseData":{"message":"This request has no response data available."},"panels/network/RequestTimingView.ts | cacheStorageCacheNameS":{"message":"Cache storage cache name: {PH1}"},"panels/network/RequestTimingView.ts | cacheStorageCacheNameUnknown":{"message":"Cache storage cache name: Unknown"},"panels/network/RequestTimingView.ts | cautionRequestIsNotFinishedYet":{"message":"CAUTION: request is not finished yet!"},"panels/network/RequestTimingView.ts | connectionStart":{"message":"Connection Start"},"panels/network/RequestTimingView.ts | contentDownload":{"message":"Content Download"},"panels/network/RequestTimingView.ts | dnsLookup":{"message":"DNS Lookup"},"panels/network/RequestTimingView.ts | duration":{"message":"Duration"},"panels/network/RequestTimingView.ts | durationC":{"message":"DURATION"},"panels/network/RequestTimingView.ts | duringDevelopmentYouCanUseSToAdd":{"message":"During development, you can use {PH1} to add insights into the server-side timing of this request."},"panels/network/RequestTimingView.ts | explanation":{"message":"Explanation"},"panels/network/RequestTimingView.ts | fallbackCode":{"message":"Fallback code"},"panels/network/RequestTimingView.ts | fromHttpCache":{"message":"From HTTP cache"},"panels/network/RequestTimingView.ts | initialConnection":{"message":"Initial connection"},"panels/network/RequestTimingView.ts | label":{"message":"Label"},"panels/network/RequestTimingView.ts | networkFetch":{"message":"Network fetch"},"panels/network/RequestTimingView.ts | originalRequest":{"message":"Original Request"},"panels/network/RequestTimingView.ts | proxyNegotiation":{"message":"Proxy negotiation"},"panels/network/RequestTimingView.ts | queuedAtS":{"message":"Queued at {PH1}"},"panels/network/RequestTimingView.ts | queueing":{"message":"Queueing"},"panels/network/RequestTimingView.ts | readingPush":{"message":"Reading Push"},"panels/network/RequestTimingView.ts | receivingPush":{"message":"Receiving Push"},"panels/network/RequestTimingView.ts | requestresponse":{"message":"Request/Response"},"panels/network/RequestTimingView.ts | requestSent":{"message":"Request sent"},"panels/network/RequestTimingView.ts | requestToServiceworker":{"message":"Request to ServiceWorker"},"panels/network/RequestTimingView.ts | resourceScheduling":{"message":"Resource Scheduling"},"panels/network/RequestTimingView.ts | respondwith":{"message":"respondWith"},"panels/network/RequestTimingView.ts | responseReceived":{"message":"Response Received"},"panels/network/RequestTimingView.ts | retrievalTimeS":{"message":"Retrieval Time: {PH1}"},"panels/network/RequestTimingView.ts | serverPush":{"message":"Server Push"},"panels/network/RequestTimingView.ts | serverTiming":{"message":"Server Timing"},"panels/network/RequestTimingView.ts | serviceworkerCacheStorage":{"message":"ServiceWorker cache storage"},"panels/network/RequestTimingView.ts | sourceOfResponseS":{"message":"Source of response: {PH1}"},"panels/network/RequestTimingView.ts | ssl":{"message":"SSL"},"panels/network/RequestTimingView.ts | stalled":{"message":"Stalled"},"panels/network/RequestTimingView.ts | startedAtS":{"message":"Started at {PH1}"},"panels/network/RequestTimingView.ts | startup":{"message":"Startup"},"panels/network/RequestTimingView.ts | theServerTimingApi":{"message":"the Server Timing API"},"panels/network/RequestTimingView.ts | time":{"message":"TIME"},"panels/network/RequestTimingView.ts | total":{"message":"Total"},"panels/network/RequestTimingView.ts | unknown":{"message":"Unknown"},"panels/network/RequestTimingView.ts | waitingTtfb":{"message":"Waiting for server response"},"panels/network/RequestTimingView.ts | waterfall":{"message":"Waterfall"},"panels/network/ResourceWebSocketFrameView.ts | all":{"message":"All"},"panels/network/ResourceWebSocketFrameView.ts | binaryMessage":{"message":"Binary Message"},"panels/network/ResourceWebSocketFrameView.ts | clearAll":{"message":"Clear All"},"panels/network/ResourceWebSocketFrameView.ts | clearAllL":{"message":"Clear all"},"panels/network/ResourceWebSocketFrameView.ts | connectionCloseMessage":{"message":"Connection Close Message"},"panels/network/ResourceWebSocketFrameView.ts | continuationFrame":{"message":"Continuation Frame"},"panels/network/ResourceWebSocketFrameView.ts | copyMessage":{"message":"Copy message"},"panels/network/ResourceWebSocketFrameView.ts | copyMessageD":{"message":"Copy message..."},"panels/network/ResourceWebSocketFrameView.ts | data":{"message":"Data"},"panels/network/ResourceWebSocketFrameView.ts | enterRegex":{"message":"Enter regex, for example: (web)?socket"},"panels/network/ResourceWebSocketFrameView.ts | filter":{"message":"Filter"},"panels/network/ResourceWebSocketFrameView.ts | length":{"message":"Length"},"panels/network/ResourceWebSocketFrameView.ts | na":{"message":"N/A"},"panels/network/ResourceWebSocketFrameView.ts | pingMessage":{"message":"Ping Message"},"panels/network/ResourceWebSocketFrameView.ts | pongMessage":{"message":"Pong Message"},"panels/network/ResourceWebSocketFrameView.ts | receive":{"message":"Receive"},"panels/network/ResourceWebSocketFrameView.ts | selectMessageToBrowseItsContent":{"message":"Select message to browse its content."},"panels/network/ResourceWebSocketFrameView.ts | send":{"message":"Send"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeS":{"message":"{PH1} (Opcode {PH2})"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeSMask":{"message":"{PH1} (Opcode {PH2}, mask)"},"panels/network/ResourceWebSocketFrameView.ts | textMessage":{"message":"Text Message"},"panels/network/ResourceWebSocketFrameView.ts | time":{"message":"Time"},"panels/network/ResourceWebSocketFrameView.ts | webSocketFrame":{"message":"Web Socket Frame"},"panels/network/SignedExchangeInfoView.ts | certificate":{"message":"Certificate"},"panels/network/SignedExchangeInfoView.ts | certificateSha":{"message":"Certificate SHA256"},"panels/network/SignedExchangeInfoView.ts | certificateUrl":{"message":"Certificate URL"},"panels/network/SignedExchangeInfoView.ts | date":{"message":"Date"},"panels/network/SignedExchangeInfoView.ts | errors":{"message":"Errors"},"panels/network/SignedExchangeInfoView.ts | expires":{"message":"Expires"},"panels/network/SignedExchangeInfoView.ts | headerIntegrityHash":{"message":"Header integrity hash"},"panels/network/SignedExchangeInfoView.ts | integrity":{"message":"Integrity"},"panels/network/SignedExchangeInfoView.ts | issuer":{"message":"Issuer"},"panels/network/SignedExchangeInfoView.ts | label":{"message":"Label"},"panels/network/SignedExchangeInfoView.ts | learnmore":{"message":"Learn more"},"panels/network/SignedExchangeInfoView.ts | requestUrl":{"message":"Request URL"},"panels/network/SignedExchangeInfoView.ts | responseCode":{"message":"Response code"},"panels/network/SignedExchangeInfoView.ts | responseHeaders":{"message":"Response headers"},"panels/network/SignedExchangeInfoView.ts | signature":{"message":"Signature"},"panels/network/SignedExchangeInfoView.ts | signedHttpExchange":{"message":"Signed HTTP exchange"},"panels/network/SignedExchangeInfoView.ts | subject":{"message":"Subject"},"panels/network/SignedExchangeInfoView.ts | validFrom":{"message":"Valid from"},"panels/network/SignedExchangeInfoView.ts | validityUrl":{"message":"Validity URL"},"panels/network/SignedExchangeInfoView.ts | validUntil":{"message":"Valid until"},"panels/network/SignedExchangeInfoView.ts | viewCertificate":{"message":"View certificate"},"panels/performance_monitor/performance_monitor-meta.ts | activity":{"message":"activity"},"panels/performance_monitor/performance_monitor-meta.ts | metrics":{"message":"metrics"},"panels/performance_monitor/performance_monitor-meta.ts | monitor":{"message":"monitor"},"panels/performance_monitor/performance_monitor-meta.ts | performance":{"message":"performance"},"panels/performance_monitor/performance_monitor-meta.ts | performanceMonitor":{"message":"Performance monitor"},"panels/performance_monitor/performance_monitor-meta.ts | showPerformanceMonitor":{"message":"Show Performance monitor"},"panels/performance_monitor/performance_monitor-meta.ts | systemMonitor":{"message":"system monitor"},"panels/performance_monitor/PerformanceMonitor.ts | cpuUsage":{"message":"CPU usage"},"panels/performance_monitor/PerformanceMonitor.ts | documentFrames":{"message":"Document Frames"},"panels/performance_monitor/PerformanceMonitor.ts | documents":{"message":"Documents"},"panels/performance_monitor/PerformanceMonitor.ts | domNodes":{"message":"DOM Nodes"},"panels/performance_monitor/PerformanceMonitor.ts | graphsDisplayingARealtimeViewOf":{"message":"Graphs displaying a real-time view of performance metrics"},"panels/performance_monitor/PerformanceMonitor.ts | jsEventListeners":{"message":"JS event listeners"},"panels/performance_monitor/PerformanceMonitor.ts | jsHeapSize":{"message":"JS heap size"},"panels/performance_monitor/PerformanceMonitor.ts | layoutsSec":{"message":"Layouts / sec"},"panels/performance_monitor/PerformanceMonitor.ts | paused":{"message":"Paused"},"panels/performance_monitor/PerformanceMonitor.ts | styleRecalcsSec":{"message":"Style recalcs / sec"},"panels/profiler/CPUProfileView.ts | aggregatedSelfTime":{"message":"Aggregated self time"},"panels/profiler/CPUProfileView.ts | aggregatedTotalTime":{"message":"Aggregated total time"},"panels/profiler/CPUProfileView.ts | cpuProfiles":{"message":"CPU PROFILES"},"panels/profiler/CPUProfileView.ts | cpuProfilesShow":{"message":"CPU profiles show where the execution time is spent in your page's JavaScript functions."},"panels/profiler/CPUProfileView.ts | fms":{"message":"{PH1} ms"},"panels/profiler/CPUProfileView.ts | formatPercent":{"message":"{PH1} %"},"panels/profiler/CPUProfileView.ts | name":{"message":"Name"},"panels/profiler/CPUProfileView.ts | notOptimized":{"message":"Not optimized"},"panels/profiler/CPUProfileView.ts | recording":{"message":"Recording…"},"panels/profiler/CPUProfileView.ts | recordJavascriptCpuProfile":{"message":"Record JavaScript CPU Profile"},"panels/profiler/CPUProfileView.ts | selfTime":{"message":"Self Time"},"panels/profiler/CPUProfileView.ts | startCpuProfiling":{"message":"Start CPU profiling"},"panels/profiler/CPUProfileView.ts | stopCpuProfiling":{"message":"Stop CPU profiling"},"panels/profiler/CPUProfileView.ts | totalTime":{"message":"Total Time"},"panels/profiler/CPUProfileView.ts | url":{"message":"URL"},"panels/profiler/HeapProfilerPanel.ts | revealInSummaryView":{"message":"Reveal in Summary view"},"panels/profiler/HeapProfileView.ts | allocationSampling":{"message":"Allocation sampling"},"panels/profiler/HeapProfileView.ts | formatPercent":{"message":"{PH1} %"},"panels/profiler/HeapProfileView.ts | heapProfilerIsRecording":{"message":"Heap profiler is recording"},"panels/profiler/HeapProfileView.ts | itProvidesGoodApproximation":{"message":"It provides good approximation of allocations broken down by JavaScript execution stack."},"panels/profiler/HeapProfileView.ts | name":{"message":"Name"},"panels/profiler/HeapProfileView.ts | profileD":{"message":"Profile {PH1}"},"panels/profiler/HeapProfileView.ts | recording":{"message":"Recording…"},"panels/profiler/HeapProfileView.ts | recordMemoryAllocations":{"message":"Record memory allocations using sampling method."},"panels/profiler/HeapProfileView.ts | samplingProfiles":{"message":"SAMPLING PROFILES"},"panels/profiler/HeapProfileView.ts | sBytes":{"message":"{PH1} bytes"},"panels/profiler/HeapProfileView.ts | selectedSizeS":{"message":"Selected size: {PH1}"},"panels/profiler/HeapProfileView.ts | selfSize":{"message":"Self size"},"panels/profiler/HeapProfileView.ts | selfSizeBytes":{"message":"Self Size (bytes)"},"panels/profiler/HeapProfileView.ts | skb":{"message":"{PH1} kB"},"panels/profiler/HeapProfileView.ts | startHeapProfiling":{"message":"Start heap profiling"},"panels/profiler/HeapProfileView.ts | stopHeapProfiling":{"message":"Stop heap profiling"},"panels/profiler/HeapProfileView.ts | stopping":{"message":"Stopping…"},"panels/profiler/HeapProfileView.ts | thisProfileTypeHasMinimal":{"message":"This profile type has minimal performance overhead and can be used for long running operations."},"panels/profiler/HeapProfileView.ts | totalSize":{"message":"Total size"},"panels/profiler/HeapProfileView.ts | totalSizeBytes":{"message":"Total Size (bytes)"},"panels/profiler/HeapProfileView.ts | url":{"message":"URL"},"panels/profiler/HeapSnapshotDataGrids.ts | allocation":{"message":"Allocation"},"panels/profiler/HeapSnapshotDataGrids.ts | allocSize":{"message":"Alloc. Size"},"panels/profiler/HeapSnapshotDataGrids.ts | constructorString":{"message":"Constructor"},"panels/profiler/HeapSnapshotDataGrids.ts | count":{"message":"Count"},"panels/profiler/HeapSnapshotDataGrids.ts | Deleted":{"message":"# Deleted"},"panels/profiler/HeapSnapshotDataGrids.ts | Delta":{"message":"# Delta"},"panels/profiler/HeapSnapshotDataGrids.ts | distance":{"message":"Distance"},"panels/profiler/HeapSnapshotDataGrids.ts | distanceFromWindowObject":{"message":"Distance from window object"},"panels/profiler/HeapSnapshotDataGrids.ts | freedSize":{"message":"Freed Size"},"panels/profiler/HeapSnapshotDataGrids.ts | function":{"message":"Function"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotConstructors":{"message":"Heap Snapshot Constructors"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotDiff":{"message":"Heap Snapshot Diff"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotRetainment":{"message":"Heap Snapshot Retainment"},"panels/profiler/HeapSnapshotDataGrids.ts | liveCount":{"message":"Live Count"},"panels/profiler/HeapSnapshotDataGrids.ts | liveSize":{"message":"Live Size"},"panels/profiler/HeapSnapshotDataGrids.ts | New":{"message":"# New"},"panels/profiler/HeapSnapshotDataGrids.ts | object":{"message":"Object"},"panels/profiler/HeapSnapshotDataGrids.ts | retainedSize":{"message":"Retained Size"},"panels/profiler/HeapSnapshotDataGrids.ts | shallowSize":{"message":"Shallow Size"},"panels/profiler/HeapSnapshotDataGrids.ts | size":{"message":"Size"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeDelta":{"message":"Size Delta"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectItselfInBytes":{"message":"Size of the object itself in bytes"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectPlusTheGraphIt":{"message":"Size of the object plus the graph it retains in bytes"},"panels/profiler/HeapSnapshotGridNodes.ts | detachedFromDomTree":{"message":"Detached from DOM tree"},"panels/profiler/HeapSnapshotGridNodes.ts | genericStringsTwoPlaceholders":{"message":"{PH1}, {PH2}"},"panels/profiler/HeapSnapshotGridNodes.ts | inElement":{"message":"in"},"panels/profiler/HeapSnapshotGridNodes.ts | internalArray":{"message":"(internal array)[]"},"panels/profiler/HeapSnapshotGridNodes.ts | previewIsNotAvailable":{"message":"Preview is not available"},"panels/profiler/HeapSnapshotGridNodes.ts | revealInSummaryView":{"message":"Reveal in Summary view"},"panels/profiler/HeapSnapshotGridNodes.ts | revealObjectSWithIdSInSummary":{"message":"Reveal object ''{PH1}'' with id @{PH2} in Summary view"},"panels/profiler/HeapSnapshotGridNodes.ts | storeAsGlobalVariable":{"message":"Store as global variable"},"panels/profiler/HeapSnapshotGridNodes.ts | summary":{"message":"Summary"},"panels/profiler/HeapSnapshotGridNodes.ts | userObjectReachableFromWindow":{"message":"User object reachable from window"},"panels/profiler/HeapSnapshotProxy.ts | anErrorOccurredWhenACallToMethod":{"message":"An error occurred when a call to method ''{PH1}'' was requested"},"panels/profiler/HeapSnapshotView.ts | allObjects":{"message":"All objects"},"panels/profiler/HeapSnapshotView.ts | allocation":{"message":"Allocation"},"panels/profiler/HeapSnapshotView.ts | allocationInstrumentationOn":{"message":"Allocation instrumentation on timeline"},"panels/profiler/HeapSnapshotView.ts | allocationStack":{"message":"Allocation stack"},"panels/profiler/HeapSnapshotView.ts | allocationTimelines":{"message":"ALLOCATION TIMELINES"},"panels/profiler/HeapSnapshotView.ts | AllocationTimelinesShowInstrumented":{"message":"Allocation timelines show instrumented JavaScript memory allocations over time. Once profile is recorded you can select a time interval to see objects that were allocated within it and still alive by the end of recording. Use this profile type to isolate memory leaks."},"panels/profiler/HeapSnapshotView.ts | baseSnapshot":{"message":"Base snapshot"},"panels/profiler/HeapSnapshotView.ts | captureNumericValue":{"message":"Include numerical values in capture"},"panels/profiler/HeapSnapshotView.ts | classFilter":{"message":"Class filter"},"panels/profiler/HeapSnapshotView.ts | code":{"message":"Code"},"panels/profiler/HeapSnapshotView.ts | comparison":{"message":"Comparison"},"panels/profiler/HeapSnapshotView.ts | containment":{"message":"Containment"},"panels/profiler/HeapSnapshotView.ts | exposeInternals":{"message":"Expose internals (includes additional implementation-specific details)"},"panels/profiler/HeapSnapshotView.ts | filter":{"message":"Filter"},"panels/profiler/HeapSnapshotView.ts | find":{"message":"Find"},"panels/profiler/HeapSnapshotView.ts | heapMemoryUsage":{"message":"Heap memory usage"},"panels/profiler/HeapSnapshotView.ts | heapSnapshot":{"message":"Heap snapshot"},"panels/profiler/HeapSnapshotView.ts | heapSnapshotProfilesShowMemory":{"message":"Heap snapshot profiles show memory distribution among your page's JavaScript objects and related DOM nodes."},"panels/profiler/HeapSnapshotView.ts | heapSnapshots":{"message":"HEAP SNAPSHOTS"},"panels/profiler/HeapSnapshotView.ts | jsArrays":{"message":"JS arrays"},"panels/profiler/HeapSnapshotView.ts | liveObjects":{"message":"Live objects"},"panels/profiler/HeapSnapshotView.ts | loading":{"message":"Loading…"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBeforeS":{"message":"Objects allocated before {PH1}"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBetweenSAndS":{"message":"Objects allocated between {PH1} and {PH2}"},"panels/profiler/HeapSnapshotView.ts | percentagePlaceholder":{"message":"{PH1}%"},"panels/profiler/HeapSnapshotView.ts | perspective":{"message":"Perspective"},"panels/profiler/HeapSnapshotView.ts | recordAllocationStacksExtra":{"message":"Record stack traces of allocations (extra performance overhead)"},"panels/profiler/HeapSnapshotView.ts | recording":{"message":"Recording…"},"panels/profiler/HeapSnapshotView.ts | retainers":{"message":"Retainers"},"panels/profiler/HeapSnapshotView.ts | savingD":{"message":"Saving… {PH1}%"},"panels/profiler/HeapSnapshotView.ts | selectedSizeS":{"message":"Selected size: {PH1}"},"panels/profiler/HeapSnapshotView.ts | sKb":{"message":"{PH1} kB"},"panels/profiler/HeapSnapshotView.ts | snapshotD":{"message":"Snapshot {PH1}"},"panels/profiler/HeapSnapshotView.ts | snapshotting":{"message":"Snapshotting…"},"panels/profiler/HeapSnapshotView.ts | stackWasNotRecordedForThisObject":{"message":"Stack was not recorded for this object because it had been allocated before this profile recording started."},"panels/profiler/HeapSnapshotView.ts | startRecordingHeapProfile":{"message":"Start recording heap profile"},"panels/profiler/HeapSnapshotView.ts | statistics":{"message":"Statistics"},"panels/profiler/HeapSnapshotView.ts | stopRecordingHeapProfile":{"message":"Stop recording heap profile"},"panels/profiler/HeapSnapshotView.ts | strings":{"message":"Strings"},"panels/profiler/HeapSnapshotView.ts | summary":{"message":"Summary"},"panels/profiler/HeapSnapshotView.ts | systemObjects":{"message":"System objects"},"panels/profiler/HeapSnapshotView.ts | takeHeapSnapshot":{"message":"Take heap snapshot"},"panels/profiler/HeapSnapshotView.ts | typedArrays":{"message":"Typed arrays"},"panels/profiler/IsolateSelector.ts | changeRate":{"message":"{PH1}/s"},"panels/profiler/IsolateSelector.ts | decreasingBySPerSecond":{"message":"decreasing by {PH1} per second"},"panels/profiler/IsolateSelector.ts | empty":{"message":"(empty)"},"panels/profiler/IsolateSelector.ts | heapSizeChangeTrendOverTheLastS":{"message":"Heap size change trend over the last {PH1} minutes."},"panels/profiler/IsolateSelector.ts | heapSizeInUseByLiveJsObjects":{"message":"Heap size in use by live JS objects."},"panels/profiler/IsolateSelector.ts | increasingBySPerSecond":{"message":"increasing by {PH1} per second"},"panels/profiler/IsolateSelector.ts | javascriptVmInstances":{"message":"JavaScript VM instances"},"panels/profiler/IsolateSelector.ts | totalJsHeapSize":{"message":"Total JS heap size"},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeAcrossAllVm":{"message":"Total page JS heap size across all VM instances."},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeChangeTrend":{"message":"Total page JS heap size change trend over the last {PH1} minutes."},"panels/profiler/LiveHeapProfileView.ts | allocatedJsHeapSizeCurrentlyIn":{"message":"Allocated JS heap size currently in use"},"panels/profiler/LiveHeapProfileView.ts | anonymousScriptS":{"message":"(Anonymous Script {PH1})"},"panels/profiler/LiveHeapProfileView.ts | heapProfile":{"message":"Heap Profile"},"panels/profiler/LiveHeapProfileView.ts | jsHeap":{"message":"JS Heap"},"panels/profiler/LiveHeapProfileView.ts | kb":{"message":"kB"},"panels/profiler/LiveHeapProfileView.ts | numberOfVmsSharingTheSameScript":{"message":"Number of VMs sharing the same script source"},"panels/profiler/LiveHeapProfileView.ts | scriptUrl":{"message":"Script URL"},"panels/profiler/LiveHeapProfileView.ts | urlOfTheScriptSource":{"message":"URL of the script source"},"panels/profiler/LiveHeapProfileView.ts | vms":{"message":"VMs"},"panels/profiler/ModuleUIStrings.ts | buildingAllocationStatistics":{"message":"Building allocation statistics…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatedNodes":{"message":"Building dominated nodes…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatorTree":{"message":"Building dominator tree…"},"panels/profiler/ModuleUIStrings.ts | buildingEdgeIndexes":{"message":"Building edge indexes…"},"panels/profiler/ModuleUIStrings.ts | buildingLocations":{"message":"Building locations…"},"panels/profiler/ModuleUIStrings.ts | buildingPostorderIndex":{"message":"Building postorder index…"},"panels/profiler/ModuleUIStrings.ts | buildingRetainers":{"message":"Building retainers…"},"panels/profiler/ModuleUIStrings.ts | calculatingDistances":{"message":"Calculating distances…"},"panels/profiler/ModuleUIStrings.ts | calculatingNodeFlags":{"message":"Calculating node flags…"},"panels/profiler/ModuleUIStrings.ts | calculatingRetainedSizes":{"message":"Calculating retained sizes…"},"panels/profiler/ModuleUIStrings.ts | calculatingSamples":{"message":"Calculating samples…"},"panels/profiler/ModuleUIStrings.ts | calculatingStatistics":{"message":"Calculating statistics…"},"panels/profiler/ModuleUIStrings.ts | done":{"message":"Done"},"panels/profiler/ModuleUIStrings.ts | finishedProcessing":{"message":"Finished processing."},"panels/profiler/ModuleUIStrings.ts | loadingAllocationTracesD":{"message":"Loading allocation traces… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingEdgesD":{"message":"Loading edges… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingLocations":{"message":"Loading locations…"},"panels/profiler/ModuleUIStrings.ts | loadingNodesD":{"message":"Loading nodes… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingSamples":{"message":"Loading samples…"},"panels/profiler/ModuleUIStrings.ts | loadingSnapshotInfo":{"message":"Loading snapshot info…"},"panels/profiler/ModuleUIStrings.ts | loadingStrings":{"message":"Loading strings…"},"panels/profiler/ModuleUIStrings.ts | parsingStrings":{"message":"Parsing strings…"},"panels/profiler/ModuleUIStrings.ts | processingSnapshot":{"message":"Processing snapshot…"},"panels/profiler/ModuleUIStrings.ts | propagatingDomState":{"message":"Propagating DOM state…"},"panels/profiler/ProfileDataGrid.ts | genericTextTwoPlaceholders":{"message":"{PH1}, {PH2}"},"panels/profiler/ProfileDataGrid.ts | notOptimizedS":{"message":"Not optimized: {PH1}"},"panels/profiler/ProfileLauncherView.ts | load":{"message":"Load"},"panels/profiler/ProfileLauncherView.ts | selectJavascriptVmInstance":{"message":"Select JavaScript VM instance"},"panels/profiler/ProfileLauncherView.ts | selectProfilingType":{"message":"Select profiling type"},"panels/profiler/ProfileLauncherView.ts | start":{"message":"Start"},"panels/profiler/ProfileLauncherView.ts | stop":{"message":"Stop"},"panels/profiler/ProfileLauncherView.ts | takeSnapshot":{"message":"Take snapshot"},"panels/profiler/profiler-meta.ts | liveHeapProfile":{"message":"Live Heap Profile"},"panels/profiler/profiler-meta.ts | memory":{"message":"Memory"},"panels/profiler/profiler-meta.ts | showLiveHeapProfile":{"message":"Show Live Heap Profile"},"panels/profiler/profiler-meta.ts | showMemory":{"message":"Show Memory"},"panels/profiler/profiler-meta.ts | showNativeFunctions":{"message":"Show native functions in JS Profile"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocations":{"message":"Start recording heap allocations"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocationsAndReload":{"message":"Start recording heap allocations and reload the page"},"panels/profiler/profiler-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/profiler/profiler-meta.ts | stopRecordingHeapAllocations":{"message":"Stop recording heap allocations"},"panels/profiler/ProfileSidebarTreeElement.ts | delete":{"message":"Delete"},"panels/profiler/ProfileSidebarTreeElement.ts | load":{"message":"Load…"},"panels/profiler/ProfileSidebarTreeElement.ts | save":{"message":"Save"},"panels/profiler/ProfileSidebarTreeElement.ts | saveWithEllipsis":{"message":"Save…"},"panels/profiler/ProfilesPanel.ts | cantLoadFileSupportedFile":{"message":"Can’t load file. Supported file extensions: ''{PH1}''."},"panels/profiler/ProfilesPanel.ts | cantLoadProfileWhileAnother":{"message":"Can’t load profile while another profile is being recorded."},"panels/profiler/ProfilesPanel.ts | clearAllProfiles":{"message":"Clear all profiles"},"panels/profiler/ProfilesPanel.ts | deprecationWarnMsg":{"message":"This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles."},"panels/profiler/ProfilesPanel.ts | enableThisPanelTemporarily":{"message":"Enable this panel temporarily"},"panels/profiler/ProfilesPanel.ts | feedback":{"message":"Feedback"},"panels/profiler/ProfilesPanel.ts | goToPerformancePanel":{"message":"Go to Performance Panel"},"panels/profiler/ProfilesPanel.ts | learnMore":{"message":"Learn more"},"panels/profiler/ProfilesPanel.ts | load":{"message":"Load…"},"panels/profiler/ProfilesPanel.ts | profileLoadingFailedS":{"message":"Profile loading failed: {PH1}."},"panels/profiler/ProfilesPanel.ts | profiles":{"message":"Profiles"},"panels/profiler/ProfilesPanel.ts | runD":{"message":"Run {PH1}"},"panels/profiler/ProfileView.ts | chart":{"message":"Chart"},"panels/profiler/ProfileView.ts | excludeSelectedFunction":{"message":"Exclude selected function"},"panels/profiler/ProfileView.ts | failedToReadFile":{"message":"Failed to read file"},"panels/profiler/ProfileView.ts | fileSReadErrorS":{"message":"File ''{PH1}'' read error: {PH2}"},"panels/profiler/ProfileView.ts | findByCostMsNameOrFile":{"message":"Find by cost (>50ms), name or file"},"panels/profiler/ProfileView.ts | focusSelectedFunction":{"message":"Focus selected function"},"panels/profiler/ProfileView.ts | function":{"message":"Function"},"panels/profiler/ProfileView.ts | heavyBottomUp":{"message":"Heavy (Bottom Up)"},"panels/profiler/ProfileView.ts | loaded":{"message":"Loaded"},"panels/profiler/ProfileView.ts | loading":{"message":"Loading…"},"panels/profiler/ProfileView.ts | loadingD":{"message":"Loading… {PH1}%"},"panels/profiler/ProfileView.ts | parsing":{"message":"Parsing…"},"panels/profiler/ProfileView.ts | profile":{"message":"Profile"},"panels/profiler/ProfileView.ts | profileD":{"message":"Profile {PH1}"},"panels/profiler/ProfileView.ts | profiler":{"message":"Profiler"},"panels/profiler/ProfileView.ts | profileViewMode":{"message":"Profile view mode"},"panels/profiler/ProfileView.ts | restoreAllFunctions":{"message":"Restore all functions"},"panels/profiler/ProfileView.ts | treeTopDown":{"message":"Tree (Top Down)"},"panels/protocol_monitor/protocol_monitor-meta.ts | protocolMonitor":{"message":"Protocol monitor"},"panels/protocol_monitor/protocol_monitor-meta.ts | showProtocolMonitor":{"message":"Show Protocol monitor"},"panels/protocol_monitor/ProtocolMonitor.ts | CDPCommandEditorHidden":{"message":"CDP command editor hidden"},"panels/protocol_monitor/ProtocolMonitor.ts | CDPCommandEditorShown":{"message":"CDP command editor shown"},"panels/protocol_monitor/ProtocolMonitor.ts | clearAll":{"message":"Clear all"},"panels/protocol_monitor/ProtocolMonitor.ts | documentation":{"message":"Documentation"},"panels/protocol_monitor/ProtocolMonitor.ts | elapsedTime":{"message":"Elapsed time"},"panels/protocol_monitor/ProtocolMonitor.ts | filter":{"message":"Filter"},"panels/protocol_monitor/ProtocolMonitor.ts | hideCDPCommandEditor":{"message":"Hide CDP command editor"},"panels/protocol_monitor/ProtocolMonitor.ts | method":{"message":"Method"},"panels/protocol_monitor/ProtocolMonitor.ts | noMessageSelected":{"message":"No message selected"},"panels/protocol_monitor/ProtocolMonitor.ts | record":{"message":"Record"},"panels/protocol_monitor/ProtocolMonitor.ts | request":{"message":"Request"},"panels/protocol_monitor/ProtocolMonitor.ts | response":{"message":"Response"},"panels/protocol_monitor/ProtocolMonitor.ts | save":{"message":"Save"},"panels/protocol_monitor/ProtocolMonitor.ts | selectTarget":{"message":"Select a target"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommand":{"message":"Send a raw CDP command"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommandExplanation":{"message":"Format: 'Domain.commandName' for a command without parameters, or '{\"command\":\"Domain.commandName\", \"parameters\": {...}}' as a JSON object for a command with parameters. 'cmd'/'method' and 'args'/'params'/'arguments' are also supported as alternative keys for the JSON object."},"panels/protocol_monitor/ProtocolMonitor.ts | session":{"message":"Session"},"panels/protocol_monitor/ProtocolMonitor.ts | showCDPCommandEditor":{"message":"Show CDP command editor"},"panels/protocol_monitor/ProtocolMonitor.ts | sMs":{"message":"{PH1} ms"},"panels/protocol_monitor/ProtocolMonitor.ts | target":{"message":"Target"},"panels/protocol_monitor/ProtocolMonitor.ts | timestamp":{"message":"Timestamp"},"panels/protocol_monitor/ProtocolMonitor.ts | type":{"message":"Type"},"panels/recorder/components/CreateRecordingView.ts | cancelRecording":{"message":"Cancel recording"},"panels/recorder/components/CreateRecordingView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/CreateRecordingView.ts | includeNecessarySelectors":{"message":"You must choose CSS, Pierce, or XPath as one of your options. Only these selectors are guaranteed to be recorded since ARIA and text selectors may not be unique."},"panels/recorder/components/CreateRecordingView.ts | recordingName":{"message":"Recording name"},"panels/recorder/components/CreateRecordingView.ts | recordingNameIsRequired":{"message":"Recording name is required"},"panels/recorder/components/CreateRecordingView.ts | selectorAttribute":{"message":"Selector attribute"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeARIA":{"message":"ARIA"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeCSS":{"message":"CSS"},"panels/recorder/components/CreateRecordingView.ts | selectorTypePierce":{"message":"Pierce"},"panels/recorder/components/CreateRecordingView.ts | selectorTypes":{"message":"Selector types to record"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeText":{"message":"Text"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeXPath":{"message":"XPath"},"panels/recorder/components/CreateRecordingView.ts | startRecording":{"message":"Start recording"},"panels/recorder/components/ExtensionView.ts | closeView":{"message":"Close"},"panels/recorder/components/ExtensionView.ts | extension":{"message":"Content provided by a browser extension"},"panels/recorder/components/RecordingListView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/RecordingListView.ts | deleteRecording":{"message":"Delete recording"},"panels/recorder/components/RecordingListView.ts | openRecording":{"message":"Open recording"},"panels/recorder/components/RecordingListView.ts | playRecording":{"message":"Play recording"},"panels/recorder/components/RecordingListView.ts | savedRecordings":{"message":"Saved recordings"},"panels/recorder/components/RecordingView.ts | addAssertion":{"message":"Add assertion"},"panels/recorder/components/RecordingView.ts | cancelReplay":{"message":"Cancel replay"},"panels/recorder/components/RecordingView.ts | default":{"message":"Default"},"panels/recorder/components/RecordingView.ts | desktop":{"message":"Desktop"},"panels/recorder/components/RecordingView.ts | download":{"message":"Download: {value}"},"panels/recorder/components/RecordingView.ts | editReplaySettings":{"message":"Edit replay settings"},"panels/recorder/components/RecordingView.ts | editTitle":{"message":"Edit title"},"panels/recorder/components/RecordingView.ts | endRecording":{"message":"End recording"},"panels/recorder/components/RecordingView.ts | environment":{"message":"Environment"},"panels/recorder/components/RecordingView.ts | hideCode":{"message":"Hide code"},"panels/recorder/components/RecordingView.ts | latency":{"message":"Latency: {value} ms"},"panels/recorder/components/RecordingView.ts | mobile":{"message":"Mobile"},"panels/recorder/components/RecordingView.ts | network":{"message":"Network"},"panels/recorder/components/RecordingView.ts | performancePanel":{"message":"Performance panel"},"panels/recorder/components/RecordingView.ts | recording":{"message":"Recording…"},"panels/recorder/components/RecordingView.ts | recordingIsBeingStopped":{"message":"Stopping recording…"},"panels/recorder/components/RecordingView.ts | replaySettings":{"message":"Replay settings"},"panels/recorder/components/RecordingView.ts | requiredTitleError":{"message":"Title is required"},"panels/recorder/components/RecordingView.ts | screenshotForSection":{"message":"Screenshot for this section"},"panels/recorder/components/RecordingView.ts | showCode":{"message":"Show code"},"panels/recorder/components/RecordingView.ts | timeout":{"message":"Timeout: {value} ms"},"panels/recorder/components/RecordingView.ts | timeoutExplanation":{"message":"The timeout setting (in milliseconds) applies to every action when replaying the recording. For example, if a DOM element identified by a CSS selector does not appear on the page within the specified timeout, the replay fails with an error."},"panels/recorder/components/RecordingView.ts | timeoutLabel":{"message":"Timeout"},"panels/recorder/components/RecordingView.ts | upload":{"message":"Upload: {value}"},"panels/recorder/components/ReplayButton.ts | extensionGroup":{"message":"Extensions"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowButtonLabel":{"message":"Extremely slow replay"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowItemLabel":{"message":"Extremely slow"},"panels/recorder/components/ReplayButton.ts | ReplayNormalButtonLabel":{"message":"Replay"},"panels/recorder/components/ReplayButton.ts | ReplayNormalItemLabel":{"message":"Normal (Default)"},"panels/recorder/components/ReplayButton.ts | ReplaySlowButtonLabel":{"message":"Slow replay"},"panels/recorder/components/ReplayButton.ts | ReplaySlowItemLabel":{"message":"Slow"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowButtonLabel":{"message":"Very slow replay"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowItemLabel":{"message":"Very slow"},"panels/recorder/components/ReplayButton.ts | speedGroup":{"message":"Speed"},"panels/recorder/components/StartView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/StartView.ts | header":{"message":"Measure performance across an entire user journey"},"panels/recorder/components/StartView.ts | quickStart":{"message":"Quick start: learn the new Recorder panel in DevTools"},"panels/recorder/components/StartView.ts | step1":{"message":"Record a common user journey on your website or app"},"panels/recorder/components/StartView.ts | step2":{"message":"Replay the recording to check if the flow is working"},"panels/recorder/components/StartView.ts | step3":{"message":"Generate a detailed performance trace or export a Puppeteer script for testing"},"panels/recorder/components/StepEditor.ts | addAttribute":{"message":"Add {attributeName}"},"panels/recorder/components/StepEditor.ts | addFrameIndex":{"message":"Add frame index within the frame tree"},"panels/recorder/components/StepEditor.ts | addSelector":{"message":"Add a selector"},"panels/recorder/components/StepEditor.ts | addSelectorPart":{"message":"Add a selector part"},"panels/recorder/components/StepEditor.ts | deleteRow":{"message":"Delete row"},"panels/recorder/components/StepEditor.ts | notSaved":{"message":"Not saved: {error}"},"panels/recorder/components/StepEditor.ts | removeFrameIndex":{"message":"Remove frame index"},"panels/recorder/components/StepEditor.ts | removeSelector":{"message":"Remove a selector"},"panels/recorder/components/StepEditor.ts | removeSelectorPart":{"message":"Remove a selector part"},"panels/recorder/components/StepEditor.ts | selectorPicker":{"message":"Select an element in the page to update selectors"},"panels/recorder/components/StepEditor.ts | unknownActionType":{"message":"Unknown action type."},"panels/recorder/components/StepView.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/recorder/components/StepView.ts | addStepAfter":{"message":"Add step after"},"panels/recorder/components/StepView.ts | addStepBefore":{"message":"Add step before"},"panels/recorder/components/StepView.ts | breakpoints":{"message":"Breakpoints"},"panels/recorder/components/StepView.ts | changeStepTitle":{"message":"Change"},"panels/recorder/components/StepView.ts | clickStepTitle":{"message":"Click"},"panels/recorder/components/StepView.ts | closeStepTitle":{"message":"Close"},"panels/recorder/components/StepView.ts | copyAs":{"message":"Copy as"},"panels/recorder/components/StepView.ts | customStepTitle":{"message":"Custom step"},"panels/recorder/components/StepView.ts | doubleClickStepTitle":{"message":"Double click"},"panels/recorder/components/StepView.ts | elementRoleButton":{"message":"Button"},"panels/recorder/components/StepView.ts | elementRoleFallback":{"message":"Element"},"panels/recorder/components/StepView.ts | elementRoleInput":{"message":"Input"},"panels/recorder/components/StepView.ts | emulateNetworkConditionsStepTitle":{"message":"Emulate network conditions"},"panels/recorder/components/StepView.ts | hoverStepTitle":{"message":"Hover"},"panels/recorder/components/StepView.ts | keyDownStepTitle":{"message":"Key down"},"panels/recorder/components/StepView.ts | keyUpStepTitle":{"message":"Key up"},"panels/recorder/components/StepView.ts | navigateStepTitle":{"message":"Navigate"},"panels/recorder/components/StepView.ts | openStepActions":{"message":"Open step actions"},"panels/recorder/components/StepView.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/recorder/components/StepView.ts | removeStep":{"message":"Remove step"},"panels/recorder/components/StepView.ts | scrollStepTitle":{"message":"Scroll"},"panels/recorder/components/StepView.ts | setViewportClickTitle":{"message":"Set viewport"},"panels/recorder/components/StepView.ts | stepManagement":{"message":"Manage steps"},"panels/recorder/components/StepView.ts | waitForElementStepTitle":{"message":"Wait for element"},"panels/recorder/components/StepView.ts | waitForExpressionStepTitle":{"message":"Wait for expression"},"panels/recorder/models/RecorderSettings.ts | defaultRecordingName":{"message":"Recording {DATE} at {TIME}"},"panels/recorder/recorder-meta.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/recorder-meta.ts | recorder":{"message":"Recorder"},"panels/recorder/recorder-meta.ts | replayRecording":{"message":"Replay recording"},"panels/recorder/recorder-meta.ts | showRecorder":{"message":"Show Recorder"},"panels/recorder/recorder-meta.ts | startStopRecording":{"message":"Start/Stop recording"},"panels/recorder/recorder-meta.ts | toggleCode":{"message":"Toggle code view"},"panels/recorder/RecorderController.ts | continueReplay":{"message":"Continue"},"panels/recorder/RecorderController.ts | copyShortcut":{"message":"Copy recording or selected step"},"panels/recorder/RecorderController.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/RecorderController.ts | deleteRecording":{"message":"Delete recording"},"panels/recorder/RecorderController.ts | export":{"message":"Export"},"panels/recorder/RecorderController.ts | exportRecording":{"message":"Export"},"panels/recorder/RecorderController.ts | exportViaExtensions":{"message":"Export via extensions"},"panels/recorder/RecorderController.ts | getExtensions":{"message":"Get extensions…"},"panels/recorder/RecorderController.ts | importRecording":{"message":"Import recording"},"panels/recorder/RecorderController.ts | replayRecording":{"message":"Replay recording"},"panels/recorder/RecorderController.ts | sendFeedback":{"message":"Send feedback"},"panels/recorder/RecorderController.ts | startStopRecording":{"message":"Start/Stop recording"},"panels/recorder/RecorderController.ts | stepOverReplay":{"message":"Execute one step"},"panels/recorder/RecorderController.ts | toggleCode":{"message":"Toggle code view"},"panels/rn_welcome/rn_welcome-meta.ts | rnWelcome":{"message":"⚛️ Welcome"},"panels/rn_welcome/rn_welcome-meta.ts | showRnWelcome":{"message":"Show React Native Welcome panel"},"panels/rn_welcome/RNWelcome.ts | debuggerBrandName":{"message":"React Native JS Inspector"},"panels/rn_welcome/RNWelcome.ts | docsLabel":{"message":"Debugging docs"},"panels/rn_welcome/RNWelcome.ts | techPreviewLabel":{"message":"Technology Preview"},"panels/rn_welcome/RNWelcome.ts | welcomeMessage":{"message":"Welcome to debugging in React Native"},"panels/rn_welcome/RNWelcome.ts | whatsNewLabel":{"message":"What's new"},"panels/screencast/ScreencastApp.ts | toggleScreencast":{"message":"Toggle screencast"},"panels/screencast/ScreencastView.ts | addressBar":{"message":"Address bar"},"panels/screencast/ScreencastView.ts | back":{"message":"back"},"panels/screencast/ScreencastView.ts | forward":{"message":"forward"},"panels/screencast/ScreencastView.ts | profilingInProgress":{"message":"Profiling in progress"},"panels/screencast/ScreencastView.ts | reload":{"message":"reload"},"panels/screencast/ScreencastView.ts | screencastViewOfDebugTarget":{"message":"Screencast view of debug target"},"panels/screencast/ScreencastView.ts | theTabIsInactive":{"message":"The tab is inactive"},"panels/search/SearchResultsPane.ts | lineS":{"message":"Line {PH1}"},"panels/search/SearchResultsPane.ts | matchesCountS":{"message":"Matches Count {PH1}"},"panels/search/SearchResultsPane.ts | showDMore":{"message":"Show {PH1} more"},"panels/search/SearchView.ts | clear":{"message":"Clear"},"panels/search/SearchView.ts | foundDMatchingLinesInDFiles":{"message":"Found {PH1} matching lines in {PH2} files."},"panels/search/SearchView.ts | foundDMatchingLinesInFile":{"message":"Found {PH1} matching lines in 1 file."},"panels/search/SearchView.ts | foundMatchingLineInFile":{"message":"Found 1 matching line in 1 file."},"panels/search/SearchView.ts | indexing":{"message":"Indexing…"},"panels/search/SearchView.ts | indexingInterrupted":{"message":"Indexing interrupted."},"panels/search/SearchView.ts | matchCase":{"message":"Match Case"},"panels/search/SearchView.ts | noMatchesFound":{"message":"No matches found."},"panels/search/SearchView.ts | refresh":{"message":"Refresh"},"panels/search/SearchView.ts | search":{"message":"Search"},"panels/search/SearchView.ts | searchFinished":{"message":"Search finished."},"panels/search/SearchView.ts | searching":{"message":"Searching…"},"panels/search/SearchView.ts | searchInterrupted":{"message":"Search interrupted."},"panels/search/SearchView.ts | searchQuery":{"message":"Search Query"},"panels/search/SearchView.ts | useRegularExpression":{"message":"Use Regular Expression"},"panels/security/security-meta.ts | security":{"message":"Security"},"panels/security/security-meta.ts | showSecurity":{"message":"Show Security"},"panels/security/SecurityModel.ts | cipherWithMAC":{"message":"{PH1} with {PH2}"},"panels/security/SecurityModel.ts | keyExchangeWithGroup":{"message":"{PH1} with {PH2}"},"panels/security/SecurityModel.ts | theSecurityOfThisPageIsUnknown":{"message":"The security of this page is unknown."},"panels/security/SecurityModel.ts | thisPageIsNotSecure":{"message":"This page is not secure."},"panels/security/SecurityModel.ts | thisPageIsNotSecureBrokenHttps":{"message":"This page is not secure (broken HTTPS)."},"panels/security/SecurityModel.ts | thisPageIsSecureValidHttps":{"message":"This page is secure (valid HTTPS)."},"panels/security/SecurityPanel.ts | activeContentWithCertificate":{"message":"active content with certificate errors"},"panels/security/SecurityPanel.ts | activeMixedContent":{"message":"active mixed content"},"panels/security/SecurityPanel.ts | allResourcesOnThisPageAreServed":{"message":"All resources on this page are served securely."},"panels/security/SecurityPanel.ts | allServedSecurely":{"message":"all served securely"},"panels/security/SecurityPanel.ts | blockedMixedContent":{"message":"Blocked mixed content"},"panels/security/SecurityPanel.ts | certificate":{"message":"Certificate"},"panels/security/SecurityPanel.ts | certificateExpiresSoon":{"message":"Certificate expires soon"},"panels/security/SecurityPanel.ts | certificateTransparency":{"message":"Certificate Transparency"},"panels/security/SecurityPanel.ts | chromeHasDeterminedThatThisSiteS":{"message":"Chrome has determined that this site could be fake or fraudulent."},"panels/security/SecurityPanel.ts | cipher":{"message":"Cipher"},"panels/security/SecurityPanel.ts | connection":{"message":"Connection"},"panels/security/SecurityPanel.ts | contentWithCertificateErrors":{"message":"content with certificate errors"},"panels/security/SecurityPanel.ts | enabled":{"message":"enabled"},"panels/security/SecurityPanel.ts | encryptedClientHello":{"message":"Encrypted ClientHello"},"panels/security/SecurityPanel.ts | flaggedByGoogleSafeBrowsing":{"message":"Flagged by Google Safe Browsing"},"panels/security/SecurityPanel.ts | hashAlgorithm":{"message":"Hash algorithm"},"panels/security/SecurityPanel.ts | hideFullDetails":{"message":"Hide full details"},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownIn":{"message":"If you believe this is shown in error please visit https://g.co/chrome/lookalike-warnings."},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownInErrorSafety":{"message":"If you believe this is shown in error please visit https://g.co/chrome/lookalike-warnings."},"panels/security/SecurityPanel.ts | info":{"message":"Info"},"panels/security/SecurityPanel.ts | insecureSha":{"message":"insecure (SHA-1)"},"panels/security/SecurityPanel.ts | issuedAt":{"message":"Issued at"},"panels/security/SecurityPanel.ts | issuer":{"message":"Issuer"},"panels/security/SecurityPanel.ts | keyExchange":{"message":"Key exchange"},"panels/security/SecurityPanel.ts | logId":{"message":"Log ID"},"panels/security/SecurityPanel.ts | logName":{"message":"Log name"},"panels/security/SecurityPanel.ts | mainOrigin":{"message":"Main origin"},"panels/security/SecurityPanel.ts | mainOriginNonsecure":{"message":"Main origin (non-secure)"},"panels/security/SecurityPanel.ts | mainOriginSecure":{"message":"Main origin (secure)"},"panels/security/SecurityPanel.ts | missing":{"message":"missing"},"panels/security/SecurityPanel.ts | mixedContent":{"message":"mixed content"},"panels/security/SecurityPanel.ts | na":{"message":"(n/a)"},"panels/security/SecurityPanel.ts | nonsecureForm":{"message":"non-secure form"},"panels/security/SecurityPanel.ts | nonsecureOrigins":{"message":"Non-secure origins"},"panels/security/SecurityPanel.ts | noSecurityDetailsAreAvailableFor":{"message":"No security details are available for this origin."},"panels/security/SecurityPanel.ts | noSecurityInformation":{"message":"No security information"},"panels/security/SecurityPanel.ts | notSecure":{"message":"Not secure"},"panels/security/SecurityPanel.ts | notSecureBroken":{"message":"Not secure (broken)"},"panels/security/SecurityPanel.ts | obsoleteConnectionSettings":{"message":"obsolete connection settings"},"panels/security/SecurityPanel.ts | openFullCertificateDetails":{"message":"Open full certificate details"},"panels/security/SecurityPanel.ts | origin":{"message":"Origin"},"panels/security/SecurityPanel.ts | overview":{"message":"Overview"},"panels/security/SecurityPanel.ts | possibleSpoofingUrl":{"message":"Possible spoofing URL"},"panels/security/SecurityPanel.ts | protocol":{"message":"Protocol"},"panels/security/SecurityPanel.ts | publickeypinningBypassed":{"message":"Public-Key-Pinning bypassed"},"panels/security/SecurityPanel.ts | publickeypinningWasBypassedByA":{"message":"Public-Key-Pinning was bypassed by a local root certificate."},"panels/security/SecurityPanel.ts | reloadThePageToRecordRequestsFor":{"message":"Reload the page to record requests for HTTP resources."},"panels/security/SecurityPanel.ts | reloadToViewDetails":{"message":"Reload to view details"},"panels/security/SecurityPanel.ts | resources":{"message":"Resources"},"panels/security/SecurityPanel.ts | rsaKeyExchangeIsObsoleteEnableAn":{"message":"RSA key exchange is obsolete. Enable an ECDHE-based cipher suite."},"panels/security/SecurityPanel.ts | sct":{"message":"SCT"},"panels/security/SecurityPanel.ts | secure":{"message":"Secure"},"panels/security/SecurityPanel.ts | secureConnectionSettings":{"message":"secure connection settings"},"panels/security/SecurityPanel.ts | secureOrigins":{"message":"Secure origins"},"panels/security/SecurityPanel.ts | securityOverview":{"message":"Security overview"},"panels/security/SecurityPanel.ts | serverSignature":{"message":"Server signature"},"panels/security/SecurityPanel.ts | showFullDetails":{"message":"Show full details"},"panels/security/SecurityPanel.ts | showLess":{"message":"Show less"},"panels/security/SecurityPanel.ts | showMoreSTotal":{"message":"Show more ({PH1} total)"},"panels/security/SecurityPanel.ts | signatureAlgorithm":{"message":"Signature algorithm"},"panels/security/SecurityPanel.ts | signatureData":{"message":"Signature data"},"panels/security/SecurityPanel.ts | sIsObsoleteEnableAnAesgcmbased":{"message":"{PH1} is obsolete. Enable an AES-GCM-based cipher suite."},"panels/security/SecurityPanel.ts | sIsObsoleteEnableTlsOrLater":{"message":"{PH1} is obsolete. Enable TLS 1.2 or later."},"panels/security/SecurityPanel.ts | source":{"message":"Source"},"panels/security/SecurityPanel.ts | subject":{"message":"Subject"},"panels/security/SecurityPanel.ts | subjectAlternativeNameMissing":{"message":"Subject Alternative Name missing"},"panels/security/SecurityPanel.ts | theCertificateChainForThisSite":{"message":"The certificate chain for this site contains a certificate signed using SHA-1."},"panels/security/SecurityPanel.ts | theCertificateForThisSiteDoesNot":{"message":"The certificate for this site does not contain a Subject Alternative Name extension containing a domain name or IP address."},"panels/security/SecurityPanel.ts | theCertificateForThisSiteExpires":{"message":"The certificate for this site expires in less than 48 hours and needs to be renewed."},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIs":{"message":"The connection to this site is encrypted and authenticated using {PH1}, {PH2}, and {PH3}."},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIsUsingA":{"message":"The connection to this site is using a valid, trusted server certificate issued by {PH1}."},"panels/security/SecurityPanel.ts | theSecurityDetailsAboveAreFrom":{"message":"The security details above are from the first inspected response."},"panels/security/SecurityPanel.ts | theServerSignatureUsesShaWhichIs":{"message":"The server signature uses SHA-1, which is obsolete. Enable a SHA-2 signature algorithm instead. (Note this is different from the signature in the certificate.)"},"panels/security/SecurityPanel.ts | thisIsAnErrorPage":{"message":"This is an error page."},"panels/security/SecurityPanel.ts | thisOriginIsANonhttpsSecure":{"message":"This origin is a non-HTTPS secure origin."},"panels/security/SecurityPanel.ts | thisPageHasANonhttpsSecureOrigin":{"message":"This page has a non-HTTPS secure origin."},"panels/security/SecurityPanel.ts | thisPageIncludesAFormWithA":{"message":"This page includes a form with a non-secure \"action\" attribute."},"panels/security/SecurityPanel.ts | thisPageIncludesHttpResources":{"message":"This page includes HTTP resources."},"panels/security/SecurityPanel.ts | thisPageIncludesResourcesThat":{"message":"This page includes resources that were loaded with certificate errors."},"panels/security/SecurityPanel.ts | thisPageIsDangerousFlaggedBy":{"message":"This page is dangerous (flagged by Google Safe Browsing)."},"panels/security/SecurityPanel.ts | thisPageIsInsecureUnencrypted":{"message":"This page is insecure (unencrypted HTTP)."},"panels/security/SecurityPanel.ts | thisPageIsSuspicious":{"message":"This page is suspicious"},"panels/security/SecurityPanel.ts | thisPageIsSuspiciousFlaggedBy":{"message":"This page is suspicious (flagged by Chrome)."},"panels/security/SecurityPanel.ts | thisRequestCompliesWithChromes":{"message":"This request complies with Chrome's Certificate Transparency policy."},"panels/security/SecurityPanel.ts | thisRequestDoesNotComplyWith":{"message":"This request does not comply with Chrome's Certificate Transparency policy."},"panels/security/SecurityPanel.ts | thisResponseWasLoadedFromCache":{"message":"This response was loaded from cache. Some security details might be missing."},"panels/security/SecurityPanel.ts | thisSiteIsMissingAValidTrusted":{"message":"This site is missing a valid, trusted certificate ({PH1})."},"panels/security/SecurityPanel.ts | thisSitesHostnameLooksSimilarToP":{"message":"This site's hostname looks similar to {PH1}. Attackers sometimes mimic sites by making small, hard-to-see changes to the domain name."},"panels/security/SecurityPanel.ts | toCheckThisPagesStatusVisit":{"message":"To check this page's status, visit g.co/safebrowsingstatus."},"panels/security/SecurityPanel.ts | unknownCanceled":{"message":"Unknown / canceled"},"panels/security/SecurityPanel.ts | unknownField":{"message":"unknown"},"panels/security/SecurityPanel.ts | validAndTrusted":{"message":"valid and trusted"},"panels/security/SecurityPanel.ts | validationStatus":{"message":"Validation status"},"panels/security/SecurityPanel.ts | validFrom":{"message":"Valid from"},"panels/security/SecurityPanel.ts | validUntil":{"message":"Valid until"},"panels/security/SecurityPanel.ts | viewCertificate":{"message":"View certificate"},"panels/security/SecurityPanel.ts | viewDRequestsInNetworkPanel":{"message":"{n, plural, =1 {View # request in Network Panel} other {View # requests in Network Panel}}"},"panels/security/SecurityPanel.ts | viewRequestsInNetworkPanel":{"message":"View requests in Network Panel"},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedContent":{"message":"You have recently allowed content loaded with certificate errors (such as scripts or iframes) to run on this site."},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedNonsecure":{"message":"You have recently allowed non-secure content (such as scripts or iframes) to run on this site."},"panels/security/SecurityPanel.ts | yourConnectionToThisOriginIsNot":{"message":"Your connection to this origin is not secure."},"panels/security/SecurityPanel.ts | yourPageRequestedNonsecure":{"message":"Your page requested non-secure resources that were blocked."},"panels/sensors/LocationsSettingsTab.ts | addLocation":{"message":"Add location..."},"panels/sensors/LocationsSettingsTab.ts | customLocations":{"message":"Custom locations"},"panels/sensors/LocationsSettingsTab.ts | lat":{"message":"Lat"},"panels/sensors/LocationsSettingsTab.ts | latitude":{"message":"Latitude"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeANumber":{"message":"Latitude must be a number"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeGreaterThanOrEqual":{"message":"Latitude must be greater than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeLessThanOrEqualToS":{"message":"Latitude must be less than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | locale":{"message":"Locale"},"panels/sensors/LocationsSettingsTab.ts | localeMustContainAlphabetic":{"message":"Locale must contain alphabetic characters"},"panels/sensors/LocationsSettingsTab.ts | locationName":{"message":"Location name"},"panels/sensors/LocationsSettingsTab.ts | locationNameCannotBeEmpty":{"message":"Location name cannot be empty"},"panels/sensors/LocationsSettingsTab.ts | locationNameMustBeLessThanS":{"message":"Location name must be less than {PH1} characters"},"panels/sensors/LocationsSettingsTab.ts | long":{"message":"Long"},"panels/sensors/LocationsSettingsTab.ts | longitude":{"message":"Longitude"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeANumber":{"message":"Longitude must be a number"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeGreaterThanOr":{"message":"Longitude must be greater than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeLessThanOrEqualTo":{"message":"Longitude must be less than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | timezoneId":{"message":"Timezone ID"},"panels/sensors/LocationsSettingsTab.ts | timezoneIdMustContainAlphabetic":{"message":"Timezone ID must contain alphabetic characters"},"panels/sensors/sensors-meta.ts | accelerometer":{"message":"accelerometer"},"panels/sensors/sensors-meta.ts | devicebased":{"message":"Device-based"},"panels/sensors/sensors-meta.ts | deviceOrientation":{"message":"device orientation"},"panels/sensors/sensors-meta.ts | emulateIdleDetectorState":{"message":"Emulate Idle Detector state"},"panels/sensors/sensors-meta.ts | forceEnabled":{"message":"Force enabled"},"panels/sensors/sensors-meta.ts | geolocation":{"message":"geolocation"},"panels/sensors/sensors-meta.ts | locale":{"message":"locale"},"panels/sensors/sensors-meta.ts | locales":{"message":"locales"},"panels/sensors/sensors-meta.ts | locations":{"message":"Locations"},"panels/sensors/sensors-meta.ts | noIdleEmulation":{"message":"No idle emulation"},"panels/sensors/sensors-meta.ts | sensors":{"message":"Sensors"},"panels/sensors/sensors-meta.ts | showLocations":{"message":"Show Locations"},"panels/sensors/sensors-meta.ts | showSensors":{"message":"Show Sensors"},"panels/sensors/sensors-meta.ts | timezones":{"message":"timezones"},"panels/sensors/sensors-meta.ts | touch":{"message":"Touch"},"panels/sensors/sensors-meta.ts | userActiveScreenLocked":{"message":"User active, screen locked"},"panels/sensors/sensors-meta.ts | userActiveScreenUnlocked":{"message":"User active, screen unlocked"},"panels/sensors/sensors-meta.ts | userIdleScreenLocked":{"message":"User idle, screen locked"},"panels/sensors/sensors-meta.ts | userIdleScreenUnlocked":{"message":"User idle, screen unlocked"},"panels/sensors/SensorsView.ts | adjustWithMousewheelOrUpdownKeys":{"message":"Adjust with mousewheel or up/down keys. {PH1}: ±10, Shift: ±1, Alt: ±0.01"},"panels/sensors/SensorsView.ts | alpha":{"message":"α (alpha)"},"panels/sensors/SensorsView.ts | beta":{"message":"β (beta)"},"panels/sensors/SensorsView.ts | customOrientation":{"message":"Custom orientation"},"panels/sensors/SensorsView.ts | deviceOrientationSetToAlphaSBeta":{"message":"Device orientation set to alpha: {PH1}, beta: {PH2}, gamma: {PH3}"},"panels/sensors/SensorsView.ts | displayDown":{"message":"Display down"},"panels/sensors/SensorsView.ts | displayUp":{"message":"Display up"},"panels/sensors/SensorsView.ts | enableOrientationToRotate":{"message":"Enable orientation to rotate"},"panels/sensors/SensorsView.ts | error":{"message":"Error"},"panels/sensors/SensorsView.ts | forcesSelectedIdleStateEmulation":{"message":"Forces selected idle state emulation"},"panels/sensors/SensorsView.ts | forcesTouchInsteadOfClick":{"message":"Forces touch instead of click"},"panels/sensors/SensorsView.ts | gamma":{"message":"γ (gamma)"},"panels/sensors/SensorsView.ts | landscapeLeft":{"message":"Landscape left"},"panels/sensors/SensorsView.ts | landscapeRight":{"message":"Landscape right"},"panels/sensors/SensorsView.ts | latitude":{"message":"Latitude"},"panels/sensors/SensorsView.ts | locale":{"message":"Locale"},"panels/sensors/SensorsView.ts | location":{"message":"Location"},"panels/sensors/SensorsView.ts | locationUnavailable":{"message":"Location unavailable"},"panels/sensors/SensorsView.ts | longitude":{"message":"Longitude"},"panels/sensors/SensorsView.ts | manage":{"message":"Manage"},"panels/sensors/SensorsView.ts | manageTheListOfLocations":{"message":"Manage the list of locations"},"panels/sensors/SensorsView.ts | noOverride":{"message":"No override"},"panels/sensors/SensorsView.ts | off":{"message":"Off"},"panels/sensors/SensorsView.ts | orientation":{"message":"Orientation"},"panels/sensors/SensorsView.ts | other":{"message":"Other…"},"panels/sensors/SensorsView.ts | overrides":{"message":"Overrides"},"panels/sensors/SensorsView.ts | portrait":{"message":"Portrait"},"panels/sensors/SensorsView.ts | portraitUpsideDown":{"message":"Portrait upside down"},"panels/sensors/SensorsView.ts | presets":{"message":"Presets"},"panels/sensors/SensorsView.ts | reset":{"message":"Reset"},"panels/sensors/SensorsView.ts | resetDeviceOrientation":{"message":"Reset device orientation"},"panels/sensors/SensorsView.ts | shiftdragHorizontallyToRotate":{"message":"Shift+drag horizontally to rotate around the y-axis"},"panels/sensors/SensorsView.ts | timezoneId":{"message":"Timezone ID"},"panels/settings/components/SyncSection.ts | preferencesSyncDisabled":{"message":"To turn this setting on, you must first enable settings sync in Chrome."},"panels/settings/components/SyncSection.ts | settings":{"message":"Go to Settings"},"panels/settings/components/SyncSection.ts | signedIn":{"message":"Signed into Chrome as:"},"panels/settings/components/SyncSection.ts | syncDisabled":{"message":"To turn this setting on, you must enable Chrome sync."},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addBrand":{"message":"Add Brand"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addedBrand":{"message":"Added brand row"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecture":{"message":"Architecture (Sec-CH-UA-Arch)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecturePlaceholder":{"message":"Architecture (e.g. x86)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandFullVersionListDelete":{"message":"Delete brand from full version list"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandName":{"message":"Brand"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandNameAriaLabel":{"message":"Brand {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandProperties":{"message":"User agent properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandUserAgentDelete":{"message":"Delete brand from user agent section"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionAriaLabel":{"message":"Version {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionPlaceholder":{"message":"Version (e.g. 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deletedBrand":{"message":"Deleted brand row"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceModel":{"message":"Device model (Sec-CH-UA-Model)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceProperties":{"message":"Device properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersion":{"message":"Full browser version (Sec-CH-UA-Full-Browser-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersionPlaceholder":{"message":"Full browser version (e.g. 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullVersionList":{"message":"Full version list (Sec-CH-UA-Full-Version-List)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | learnMore":{"message":"Learn more"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | mobileCheckboxLabel":{"message":"Mobile"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | notRepresentable":{"message":"Not representable as structured headers string."},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformLabel":{"message":"Platform (Sec-CH-UA-Platform / Sec-CH-UA-Platform-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformPlaceholder":{"message":"Platform (e.g. Android)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformProperties":{"message":"Platform properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformVersion":{"message":"Platform version"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | significantBrandVersionPlaceholder":{"message":"Significant version (e.g. 87)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | title":{"message":"User agent client hints"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | update":{"message":"Update"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | useragent":{"message":"User agent (Sec-CH-UA)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | userAgentClientHintsInfo":{"message":"User agent client hints are an alternative to the user agent string that identify the browser and the device in a more structured way with better privacy accounting."},"panels/settings/emulation/DevicesSettingsTab.ts | addCustomDevice":{"message":"Add custom device..."},"panels/settings/emulation/DevicesSettingsTab.ts | device":{"message":"Device"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceAddedOrUpdated":{"message":"Device {PH1} successfully added/updated."},"panels/settings/emulation/DevicesSettingsTab.ts | deviceName":{"message":"Device Name"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameCannotBeEmpty":{"message":"Device name cannot be empty."},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameMustBeLessThanS":{"message":"Device name must be less than {PH1} characters."},"panels/settings/emulation/DevicesSettingsTab.ts | devicePixelRatio":{"message":"Device pixel ratio"},"panels/settings/emulation/DevicesSettingsTab.ts | emulatedDevices":{"message":"Emulated Devices"},"panels/settings/emulation/DevicesSettingsTab.ts | height":{"message":"Height"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentString":{"message":"User agent string"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentType":{"message":"User agent type"},"panels/settings/emulation/DevicesSettingsTab.ts | width":{"message":"Width"},"panels/settings/emulation/emulation-meta.ts | devices":{"message":"Devices"},"panels/settings/emulation/emulation-meta.ts | showDevices":{"message":"Show Devices"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addFilenamePattern":{"message":"Add filename pattern"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addPattern":{"message":"Add pattern..."},"panels/settings/FrameworkIgnoreListSettingsTab.ts | automaticallyIgnoreListKnownThirdPartyScripts":{"message":"Known third-party scripts from source maps"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | customExclusionRules":{"message":"Custom exclusion rules:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | debuggerWillSkipThroughThe":{"message":"Debugger will skip through the scripts and will not stop on exceptions thrown by them."},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListing":{"message":"Enable Ignore Listing"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListingTooltip":{"message":"Uncheck to disable all ignore listing"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | frameworkIgnoreList":{"message":"Framework Ignore List"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | generalExclusionRules":{"message":"General exclusion rules:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreListContentScripts":{"message":"Content scripts injected by extensions"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreScriptsWhoseNamesMatchS":{"message":"Ignore scripts whose names match ''{PH1}''"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | learnMore":{"message":"Learn more"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | pattern":{"message":"Add Pattern"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternAlreadyExists":{"message":"Pattern already exists"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternCannotBeEmpty":{"message":"Pattern cannot be empty"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternMustBeAValidRegular":{"message":"Pattern must be a valid regular expression"},"panels/settings/KeybindsSettingsTab.ts | addAShortcut":{"message":"Add a shortcut"},"panels/settings/KeybindsSettingsTab.ts | confirmChanges":{"message":"Confirm changes"},"panels/settings/KeybindsSettingsTab.ts | discardChanges":{"message":"Discard changes"},"panels/settings/KeybindsSettingsTab.ts | editShortcut":{"message":"Edit shortcut"},"panels/settings/KeybindsSettingsTab.ts | FullListOfDevtoolsKeyboard":{"message":"Full list of DevTools keyboard shortcuts and gestures"},"panels/settings/KeybindsSettingsTab.ts | keyboardShortcutsList":{"message":"Keyboard shortcuts list"},"panels/settings/KeybindsSettingsTab.ts | matchShortcutsFromPreset":{"message":"Match shortcuts from preset"},"panels/settings/KeybindsSettingsTab.ts | noShortcutForAction":{"message":"No shortcut for action"},"panels/settings/KeybindsSettingsTab.ts | removeShortcut":{"message":"Remove shortcut"},"panels/settings/KeybindsSettingsTab.ts | ResetShortcutsForAction":{"message":"Reset shortcuts for action"},"panels/settings/KeybindsSettingsTab.ts | RestoreDefaultShortcuts":{"message":"Restore default shortcuts"},"panels/settings/KeybindsSettingsTab.ts | shortcutModified":{"message":"Shortcut modified"},"panels/settings/KeybindsSettingsTab.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/KeybindsSettingsTab.ts | shortcutsCannotContainOnly":{"message":"Shortcuts cannot contain only modifier keys."},"panels/settings/KeybindsSettingsTab.ts | thisShortcutIsInUseByS":{"message":"This shortcut is in use by {PH1}: {PH2}."},"panels/settings/settings-meta.ts | documentation":{"message":"Documentation"},"panels/settings/settings-meta.ts | experiments":{"message":"Experiments"},"panels/settings/settings-meta.ts | ignoreList":{"message":"Ignore List"},"panels/settings/settings-meta.ts | preferences":{"message":"Preferences"},"panels/settings/settings-meta.ts | settings":{"message":"Settings"},"panels/settings/settings-meta.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/settings-meta.ts | showExperiments":{"message":"Show Experiments"},"panels/settings/settings-meta.ts | showIgnoreList":{"message":"Show Ignore List"},"panels/settings/settings-meta.ts | showPreferences":{"message":"Show Preferences"},"panels/settings/settings-meta.ts | showShortcuts":{"message":"Show Shortcuts"},"panels/settings/SettingsScreen.ts | experiments":{"message":"Experiments"},"panels/settings/SettingsScreen.ts | filterExperimentsLabel":{"message":"Filter"},"panels/settings/SettingsScreen.ts | learnMore":{"message":"Learn more"},"panels/settings/SettingsScreen.ts | noResults":{"message":"No experiments match the filter"},"panels/settings/SettingsScreen.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"panels/settings/SettingsScreen.ts | preferences":{"message":"Preferences"},"panels/settings/SettingsScreen.ts | restoreDefaultsAndReload":{"message":"Restore defaults and reload"},"panels/settings/SettingsScreen.ts | sendFeedback":{"message":"Send feedback"},"panels/settings/SettingsScreen.ts | settings":{"message":"Settings"},"panels/settings/SettingsScreen.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/SettingsScreen.ts | theseExperimentsAreParticularly":{"message":"These experiments are particularly unstable. Enable at your own risk."},"panels/settings/SettingsScreen.ts | theseExperimentsCouldBeUnstable":{"message":"These experiments could be unstable or unreliable and may require you to restart DevTools."},"panels/settings/SettingsScreen.ts | warning":{"message":"WARNING:"},"panels/snippets/ScriptSnippetFileSystem.ts | linkedTo":{"message":"Linked to {PH1}"},"panels/snippets/ScriptSnippetFileSystem.ts | scriptSnippet":{"message":"Script snippet #{PH1}"},"panels/snippets/SnippetsQuickOpen.ts | noSnippetsFound":{"message":"No snippets found."},"panels/snippets/SnippetsQuickOpen.ts | run":{"message":"Run"},"panels/snippets/SnippetsQuickOpen.ts | snippet":{"message":"Snippet"},"panels/sources/AddSourceMapURLDialog.ts | add":{"message":"Add"},"panels/sources/AddSourceMapURLDialog.ts | debugInfoUrl":{"message":"DWARF symbols URL: "},"panels/sources/AddSourceMapURLDialog.ts | sourceMapUrl":{"message":"Source map URL: "},"panels/sources/BreakpointEditDialog.ts | breakpoint":{"message":"Breakpoint"},"panels/sources/BreakpointEditDialog.ts | breakpointType":{"message":"Breakpoint type"},"panels/sources/BreakpointEditDialog.ts | closeDialog":{"message":"Close edit dialog and save changes"},"panels/sources/BreakpointEditDialog.ts | conditionalBreakpoint":{"message":"Conditional breakpoint"},"panels/sources/BreakpointEditDialog.ts | expressionToCheckBeforePausingEg":{"message":"Expression to check before pausing, e.g. x > 5"},"panels/sources/BreakpointEditDialog.ts | learnMoreOnBreakpointTypes":{"message":"Learn more: Breakpoint Types"},"panels/sources/BreakpointEditDialog.ts | logAMessageToConsoleDoNotBreak":{"message":"Log a message to Console, do not break"},"panels/sources/BreakpointEditDialog.ts | logMessageEgXIsX":{"message":"Log message, e.g. 'x is', x"},"panels/sources/BreakpointEditDialog.ts | logpoint":{"message":"Logpoint"},"panels/sources/BreakpointEditDialog.ts | pauseOnlyWhenTheConditionIsTrue":{"message":"Pause only when the condition is true"},"panels/sources/CallStackSidebarPane.ts | callFrameWarnings":{"message":"Some call frames have warnings"},"panels/sources/CallStackSidebarPane.ts | callStack":{"message":"Call Stack"},"panels/sources/CallStackSidebarPane.ts | copyStackTrace":{"message":"Copy stack trace"},"panels/sources/CallStackSidebarPane.ts | debugFileNotFound":{"message":"Failed to load debug file \"{PH1}\"."},"panels/sources/CallStackSidebarPane.ts | notPaused":{"message":"Not paused"},"panels/sources/CallStackSidebarPane.ts | onIgnoreList":{"message":"on ignore list"},"panels/sources/CallStackSidebarPane.ts | restartFrame":{"message":"Restart frame"},"panels/sources/CallStackSidebarPane.ts | showIgnorelistedFrames":{"message":"Show ignore-listed frames"},"panels/sources/CallStackSidebarPane.ts | showMore":{"message":"Show more"},"panels/sources/components/BreakpointsView.ts | breakpointHit":{"message":"{PH1} breakpoint hit"},"panels/sources/components/BreakpointsView.ts | checked":{"message":"checked"},"panels/sources/components/BreakpointsView.ts | conditionCode":{"message":"Condition: {PH1}"},"panels/sources/components/BreakpointsView.ts | disableAllBreakpointsInFile":{"message":"Disable all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | editCondition":{"message":"Edit condition"},"panels/sources/components/BreakpointsView.ts | editLogpoint":{"message":"Edit logpoint"},"panels/sources/components/BreakpointsView.ts | enableAllBreakpointsInFile":{"message":"Enable all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | indeterminate":{"message":"mixed"},"panels/sources/components/BreakpointsView.ts | logpointCode":{"message":"Logpoint: {PH1}"},"panels/sources/components/BreakpointsView.ts | pauseOnCaughtExceptions":{"message":"Pause on caught exceptions"},"panels/sources/components/BreakpointsView.ts | pauseOnUncaughtExceptions":{"message":"Pause on uncaught exceptions"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpoints":{"message":"Remove all breakpoints"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpointsInFile":{"message":"Remove all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/sources/components/BreakpointsView.ts | removeOtherBreakpoints":{"message":"Remove other breakpoints"},"panels/sources/components/BreakpointsView.ts | revealLocation":{"message":"Reveal location"},"panels/sources/components/BreakpointsView.ts | unchecked":{"message":"unchecked"},"panels/sources/components/HeadersView.ts | addHeader":{"message":"Add a header"},"panels/sources/components/HeadersView.ts | addOverrideRule":{"message":"Add override rule"},"panels/sources/components/HeadersView.ts | errorWhenParsing":{"message":"Error when parsing ''{PH1}''."},"panels/sources/components/HeadersView.ts | learnMore":{"message":"Learn more"},"panels/sources/components/HeadersView.ts | parsingErrorExplainer":{"message":"This is most likely due to a syntax error in ''{PH1}''. Try opening this file in an external editor to fix the error or delete the file and re-create the override."},"panels/sources/components/HeadersView.ts | removeBlock":{"message":"Remove this 'ApplyTo'-section"},"panels/sources/components/HeadersView.ts | removeHeader":{"message":"Remove this header"},"panels/sources/CoveragePlugin.ts | clickToShowCoveragePanel":{"message":"Click to show Coverage Panel"},"panels/sources/CoveragePlugin.ts | coverageNa":{"message":"Coverage: n/a"},"panels/sources/CoveragePlugin.ts | coverageS":{"message":"Coverage: {PH1}"},"panels/sources/CoveragePlugin.ts | showDetails":{"message":"Show Details"},"panels/sources/CSSPlugin.ts | openColorPicker":{"message":"Open color picker."},"panels/sources/CSSPlugin.ts | openCubicBezierEditor":{"message":"Open cubic bezier editor."},"panels/sources/DebuggerPausedMessage.ts | attributeModifications":{"message":"attribute modifications"},"panels/sources/DebuggerPausedMessage.ts | childSAdded":{"message":"Child {PH1} added"},"panels/sources/DebuggerPausedMessage.ts | debuggerPaused":{"message":"Debugger paused"},"panels/sources/DebuggerPausedMessage.ts | descendantSAdded":{"message":"Descendant {PH1} added"},"panels/sources/DebuggerPausedMessage.ts | descendantSRemoved":{"message":"Descendant {PH1} removed"},"panels/sources/DebuggerPausedMessage.ts | nodeRemoval":{"message":"node removal"},"panels/sources/DebuggerPausedMessage.ts | pausedBeforePotentialOutofmemory":{"message":"Paused before potential out-of-memory crash"},"panels/sources/DebuggerPausedMessage.ts | pausedOnAssertion":{"message":"Paused on assertion"},"panels/sources/DebuggerPausedMessage.ts | pausedOnBreakpoint":{"message":"Paused on breakpoint"},"panels/sources/DebuggerPausedMessage.ts | pausedOnCspViolation":{"message":"Paused on CSP violation"},"panels/sources/DebuggerPausedMessage.ts | pausedOnDebuggedFunction":{"message":"Paused on debugged function"},"panels/sources/DebuggerPausedMessage.ts | pausedOnEventListener":{"message":"Paused on event listener"},"panels/sources/DebuggerPausedMessage.ts | pausedOnException":{"message":"Paused on exception"},"panels/sources/DebuggerPausedMessage.ts | pausedOnPromiseRejection":{"message":"Paused on promise rejection"},"panels/sources/DebuggerPausedMessage.ts | pausedOnS":{"message":"Paused on {PH1}"},"panels/sources/DebuggerPausedMessage.ts | pausedOnXhrOrFetch":{"message":"Paused on XHR or fetch"},"panels/sources/DebuggerPausedMessage.ts | subtreeModifications":{"message":"subtree modifications"},"panels/sources/DebuggerPausedMessage.ts | trustedTypePolicyViolation":{"message":"Trusted Type Policy Violation"},"panels/sources/DebuggerPausedMessage.ts | trustedTypeSinkViolation":{"message":"Trusted Type Sink Violation"},"panels/sources/DebuggerPlugin.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/sources/DebuggerPlugin.ts | addConditionalBreakpoint":{"message":"Add conditional breakpoint…"},"panels/sources/DebuggerPlugin.ts | addLogpoint":{"message":"Add logpoint…"},"panels/sources/DebuggerPlugin.ts | addSourceMap":{"message":"Add source map…"},"panels/sources/DebuggerPlugin.ts | addWasmDebugInfo":{"message":"Add DWARF debug info…"},"panels/sources/DebuggerPlugin.ts | associatedFilesAreAvailable":{"message":"Associated files are available via file tree or {PH1}."},"panels/sources/DebuggerPlugin.ts | associatedFilesShouldBeAdded":{"message":"Associated files should be added to the file tree. You can debug these resolved source files as regular JavaScript files."},"panels/sources/DebuggerPlugin.ts | configure":{"message":"Configure"},"panels/sources/DebuggerPlugin.ts | debugFileNotFound":{"message":"Failed to load debug file \"{PH1}\"."},"panels/sources/DebuggerPlugin.ts | debugInfoNotFound":{"message":"Failed to load any debug info for {PH1}."},"panels/sources/DebuggerPlugin.ts | disableBreakpoint":{"message":"{n, plural, =1 {Disable breakpoint} other {Disable all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | editBreakpoint":{"message":"Edit breakpoint…"},"panels/sources/DebuggerPlugin.ts | enableBreakpoint":{"message":"{n, plural, =1 {Enable breakpoint} other {Enable all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | neverPauseHere":{"message":"Never pause here"},"panels/sources/DebuggerPlugin.ts | removeBreakpoint":{"message":"{n, plural, =1 {Remove breakpoint} other {Remove all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"panels/sources/DebuggerPlugin.ts | sourceMapDetected":{"message":"Source map detected."},"panels/sources/DebuggerPlugin.ts | sourceMapFoundButIgnoredForFile":{"message":"Source map found, but ignored for file on ignore list."},"panels/sources/DebuggerPlugin.ts | theDebuggerWillSkipStepping":{"message":"The debugger will skip stepping through this script, and will not stop on exceptions."},"panels/sources/DebuggerPlugin.ts | thisScriptIsOnTheDebuggersIgnore":{"message":"This script is on the debugger's ignore list"},"panels/sources/FilteredUISourceCodeListProvider.ts | noFilesFound":{"message":"No files found"},"panels/sources/FilteredUISourceCodeListProvider.ts | sIgnoreListed":{"message":"{PH1} (ignore listed)"},"panels/sources/GoToLineQuickOpen.ts | currentLineSTypeALineNumber":{"message":"Current line: {PH1}. Type a line number between 1 and {PH2} to navigate to."},"panels/sources/GoToLineQuickOpen.ts | currentPositionXsTypeAnOffset":{"message":"Current position: 0x{PH1}. Type an offset between 0x{PH2} and 0x{PH3} to navigate to."},"panels/sources/GoToLineQuickOpen.ts | goToLineS":{"message":"Go to line {PH1}."},"panels/sources/GoToLineQuickOpen.ts | goToLineSAndColumnS":{"message":"Go to line {PH1} and column {PH2}."},"panels/sources/GoToLineQuickOpen.ts | goToOffsetXs":{"message":"Go to offset 0x{PH1}."},"panels/sources/GoToLineQuickOpen.ts | noFileSelected":{"message":"No file selected."},"panels/sources/GoToLineQuickOpen.ts | noResultsFound":{"message":"No results found"},"panels/sources/GoToLineQuickOpen.ts | typeANumberToGoToThatLine":{"message":"Type a number to go to that line."},"panels/sources/InplaceFormatterEditorAction.ts | format":{"message":"Format"},"panels/sources/InplaceFormatterEditorAction.ts | formatS":{"message":"Format {PH1}"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteAll":{"message":"Are you sure you want to delete all overrides contained in this folder?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteThis":{"message":"Are you sure you want to delete this file?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToExcludeThis":{"message":"Are you sure you want to exclude this folder?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToRemoveThis":{"message":"Are you sure you want to remove this folder?"},"panels/sources/NavigatorView.ts | authored":{"message":"Authored"},"panels/sources/NavigatorView.ts | authoredTooltip":{"message":"Contains original sources"},"panels/sources/NavigatorView.ts | delete":{"message":"Delete"},"panels/sources/NavigatorView.ts | deleteAllOverrides":{"message":"Delete all overrides"},"panels/sources/NavigatorView.ts | deployed":{"message":"Deployed"},"panels/sources/NavigatorView.ts | deployedTooltip":{"message":"Contains final sources the browser sees"},"panels/sources/NavigatorView.ts | excludeFolder":{"message":"Exclude folder"},"panels/sources/NavigatorView.ts | makeACopy":{"message":"Make a copy…"},"panels/sources/NavigatorView.ts | newFile":{"message":"New file"},"panels/sources/NavigatorView.ts | noDomain":{"message":"(no domain)"},"panels/sources/NavigatorView.ts | openFolder":{"message":"Open folder"},"panels/sources/NavigatorView.ts | removeFolderFromWorkspace":{"message":"Remove folder from workspace"},"panels/sources/NavigatorView.ts | rename":{"message":"Rename…"},"panels/sources/NavigatorView.ts | searchInAllFiles":{"message":"Search in all files"},"panels/sources/NavigatorView.ts | searchInFolder":{"message":"Search in folder"},"panels/sources/NavigatorView.ts | sFromSourceMap":{"message":"{PH1} (from source map)"},"panels/sources/NavigatorView.ts | sIgnoreListed":{"message":"{PH1} (ignore listed)"},"panels/sources/OutlineQuickOpen.ts | noFileSelected":{"message":"No file selected."},"panels/sources/OutlineQuickOpen.ts | noResultsFound":{"message":"No results found"},"panels/sources/OutlineQuickOpen.ts | openAJavascriptOrCssFileToSee":{"message":"Open a JavaScript or CSS file to see symbols"},"panels/sources/ProfilePlugin.ts | kb":{"message":"kB"},"panels/sources/ProfilePlugin.ts | mb":{"message":"MB"},"panels/sources/ProfilePlugin.ts | ms":{"message":"ms"},"panels/sources/ResourceOriginPlugin.ts | fromS":{"message":"(From {PH1})"},"panels/sources/ResourceOriginPlugin.ts | sourceMappedFromS":{"message":"(Source mapped from {PH1})"},"panels/sources/ScopeChainSidebarPane.ts | closure":{"message":"Closure"},"panels/sources/ScopeChainSidebarPane.ts | closureS":{"message":"Closure ({PH1})"},"panels/sources/ScopeChainSidebarPane.ts | exception":{"message":"Exception"},"panels/sources/ScopeChainSidebarPane.ts | loading":{"message":"Loading..."},"panels/sources/ScopeChainSidebarPane.ts | notPaused":{"message":"Not paused"},"panels/sources/ScopeChainSidebarPane.ts | noVariables":{"message":"No variables"},"panels/sources/ScopeChainSidebarPane.ts | returnValue":{"message":"Return value"},"panels/sources/ScopeChainSidebarPane.ts | revealInMemoryInspectorPanel":{"message":"Reveal in Memory Inspector panel"},"panels/sources/SnippetsPlugin.ts | ctrlenter":{"message":"Ctrl+Enter"},"panels/sources/SnippetsPlugin.ts | enter":{"message":"⌘+Enter"},"panels/sources/sources-meta.ts | activateBreakpoints":{"message":"Activate breakpoints"},"panels/sources/sources-meta.ts | addFolderToWorkspace":{"message":"Add folder to workspace"},"panels/sources/sources-meta.ts | addSelectedTextToWatches":{"message":"Add selected text to watches"},"panels/sources/sources-meta.ts | all":{"message":"All"},"panels/sources/sources-meta.ts | allowScrollingPastEndOfFile":{"message":"Allow scrolling past end of file"},"panels/sources/sources-meta.ts | autocompletion":{"message":"Autocompletion"},"panels/sources/sources-meta.ts | automaticallyRevealFilesIn":{"message":"Automatically reveal files in sidebar"},"panels/sources/sources-meta.ts | bracketMatching":{"message":"Bracket matching"},"panels/sources/sources-meta.ts | breakpoints":{"message":"Breakpoints"},"panels/sources/sources-meta.ts | closeAll":{"message":"Close All"},"panels/sources/sources-meta.ts | closeTheActiveTab":{"message":"Close the active tab"},"panels/sources/sources-meta.ts | codeFolding":{"message":"Code folding"},"panels/sources/sources-meta.ts | createNewSnippet":{"message":"Create new snippet"},"panels/sources/sources-meta.ts | deactivateBreakpoints":{"message":"Deactivate breakpoints"},"panels/sources/sources-meta.ts | decrementCssUnitBy":{"message":"Decrement CSS unit by {PH1}"},"panels/sources/sources-meta.ts | detectIndentation":{"message":"Detect indentation"},"panels/sources/sources-meta.ts | disableAutocompletion":{"message":"Disable autocompletion"},"panels/sources/sources-meta.ts | disableAutoFocusOnDebuggerPaused":{"message":"Do not focus Sources panel when triggering a breakpoint"},"panels/sources/sources-meta.ts | disableBracketMatching":{"message":"Disable bracket matching"},"panels/sources/sources-meta.ts | disableCodeFolding":{"message":"Disable code folding"},"panels/sources/sources-meta.ts | disableCssSourceMaps":{"message":"Disable CSS source maps"},"panels/sources/sources-meta.ts | disableJavascriptSourceMaps":{"message":"Disable JavaScript source maps"},"panels/sources/sources-meta.ts | disableTabMovesFocus":{"message":"Disable tab moves focus"},"panels/sources/sources-meta.ts | disableWasmAutoStepping":{"message":"Disable wasm auto-stepping"},"panels/sources/sources-meta.ts | disallowScrollingPastEndOfFile":{"message":"Disallow scrolling past end of file"},"panels/sources/sources-meta.ts | displayVariableValuesInlineWhile":{"message":"Display variable values inline while debugging"},"panels/sources/sources-meta.ts | doNotAutomaticallyRevealFilesIn":{"message":"Do not automatically reveal files in sidebar"},"panels/sources/sources-meta.ts | doNotDetectIndentation":{"message":"Do not detect indentation"},"panels/sources/sources-meta.ts | doNotDisplayVariableValuesInline":{"message":"Do not display variable values inline while debugging"},"panels/sources/sources-meta.ts | doNotSearchInAnonymousAndContent":{"message":"Do not search in anonymous and content scripts"},"panels/sources/sources-meta.ts | doNotShowWhitespaceCharacters":{"message":"Do not show whitespace characters"},"panels/sources/sources-meta.ts | enableAutocompletion":{"message":"Enable autocompletion"},"panels/sources/sources-meta.ts | enableAutoFocusOnDebuggerPaused":{"message":"Focus Sources panel when triggering a breakpoint"},"panels/sources/sources-meta.ts | enableBracketMatching":{"message":"Enable bracket matching"},"panels/sources/sources-meta.ts | enableCodeFolding":{"message":"Enable code folding"},"panels/sources/sources-meta.ts | enableCssSourceMaps":{"message":"Enable CSS source maps"},"panels/sources/sources-meta.ts | enableJavascriptSourceMaps":{"message":"Enable JavaScript source maps"},"panels/sources/sources-meta.ts | enableTabMovesFocus":{"message":"Enable tab moves focus"},"panels/sources/sources-meta.ts | enableWasmAutoStepping":{"message":"Enable wasm auto-stepping"},"panels/sources/sources-meta.ts | evaluateSelectedTextInConsole":{"message":"Evaluate selected text in console"},"panels/sources/sources-meta.ts | file":{"message":"File"},"panels/sources/sources-meta.ts | filesystem":{"message":"Filesystem"},"panels/sources/sources-meta.ts | goTo":{"message":"Go to"},"panels/sources/sources-meta.ts | goToAFunctionDeclarationruleSet":{"message":"Go to a function declaration/rule set"},"panels/sources/sources-meta.ts | goToLine":{"message":"Go to line"},"panels/sources/sources-meta.ts | incrementCssUnitBy":{"message":"Increment CSS unit by {PH1}"},"panels/sources/sources-meta.ts | jumpToNextEditingLocation":{"message":"Jump to next editing location"},"panels/sources/sources-meta.ts | jumpToPreviousEditingLocation":{"message":"Jump to previous editing location"},"panels/sources/sources-meta.ts | line":{"message":"Line"},"panels/sources/sources-meta.ts | nextCallFrame":{"message":"Next call frame"},"panels/sources/sources-meta.ts | nextEditorTab":{"message":"Next editor"},"panels/sources/sources-meta.ts | none":{"message":"None"},"panels/sources/sources-meta.ts | open":{"message":"Open"},"panels/sources/sources-meta.ts | pauseScriptExecution":{"message":"Pause script execution"},"panels/sources/sources-meta.ts | previousCallFrame":{"message":"Previous call frame"},"panels/sources/sources-meta.ts | previousEditorTab":{"message":"Previous editor"},"panels/sources/sources-meta.ts | quickSource":{"message":"Quick source"},"panels/sources/sources-meta.ts | rename":{"message":"Rename"},"panels/sources/sources-meta.ts | resumeScriptExecution":{"message":"Resume script execution"},"panels/sources/sources-meta.ts | runSnippet":{"message":"Run snippet"},"panels/sources/sources-meta.ts | save":{"message":"Save"},"panels/sources/sources-meta.ts | saveAll":{"message":"Save all"},"panels/sources/sources-meta.ts | scope":{"message":"Scope"},"panels/sources/sources-meta.ts | search":{"message":"Search"},"panels/sources/sources-meta.ts | searchInAnonymousAndContent":{"message":"Search in anonymous and content scripts"},"panels/sources/sources-meta.ts | showAllWhitespaceCharacters":{"message":"Show all whitespace characters"},"panels/sources/sources-meta.ts | showBreakpoints":{"message":"Show Breakpoints"},"panels/sources/sources-meta.ts | showFilesystem":{"message":"Show Filesystem"},"panels/sources/sources-meta.ts | showQuickSource":{"message":"Show Quick source"},"panels/sources/sources-meta.ts | showScope":{"message":"Show Scope"},"panels/sources/sources-meta.ts | showSearch":{"message":"Show Search"},"panels/sources/sources-meta.ts | showSnippets":{"message":"Show Snippets"},"panels/sources/sources-meta.ts | showSources":{"message":"Show Sources"},"panels/sources/sources-meta.ts | showThreads":{"message":"Show Threads"},"panels/sources/sources-meta.ts | showTrailingWhitespaceCharacters":{"message":"Show trailing whitespace characters"},"panels/sources/sources-meta.ts | showWatch":{"message":"Show Watch"},"panels/sources/sources-meta.ts | showWhitespaceCharacters":{"message":"Show whitespace characters:"},"panels/sources/sources-meta.ts | snippets":{"message":"Snippets"},"panels/sources/sources-meta.ts | sources":{"message":"Sources"},"panels/sources/sources-meta.ts | step":{"message":"Step"},"panels/sources/sources-meta.ts | stepIntoNextFunctionCall":{"message":"Step into next function call"},"panels/sources/sources-meta.ts | stepOutOfCurrentFunction":{"message":"Step out of current function"},"panels/sources/sources-meta.ts | stepOverNextFunctionCall":{"message":"Step over next function call"},"panels/sources/sources-meta.ts | switchFile":{"message":"Switch file"},"panels/sources/sources-meta.ts | symbol":{"message":"Symbol"},"panels/sources/sources-meta.ts | threads":{"message":"Threads"},"panels/sources/sources-meta.ts | toggleBreakpoint":{"message":"Toggle breakpoint"},"panels/sources/sources-meta.ts | toggleBreakpointEnabled":{"message":"Toggle breakpoint enabled"},"panels/sources/sources-meta.ts | toggleBreakpointInputWindow":{"message":"Toggle breakpoint input window"},"panels/sources/sources-meta.ts | toggleDebuggerSidebar":{"message":"Toggle debugger sidebar"},"panels/sources/sources-meta.ts | toggleNavigatorSidebar":{"message":"Toggle navigator sidebar"},"panels/sources/sources-meta.ts | trailing":{"message":"Trailing"},"panels/sources/sources-meta.ts | wasmAutoStepping":{"message":"When debugging wasm with debug information, do not pause on wasm bytecode if possible"},"panels/sources/sources-meta.ts | watch":{"message":"Watch"},"panels/sources/SourcesNavigator.ts | clearConfiguration":{"message":"Clear configuration"},"panels/sources/SourcesNavigator.ts | contentScriptsServedByExtensions":{"message":"Content scripts served by extensions appear here"},"panels/sources/SourcesNavigator.ts | createAndSaveCodeSnippetsFor":{"message":"Create and save code snippets for later reuse"},"panels/sources/SourcesNavigator.ts | createNewSnippet":{"message":"Create new snippet"},"panels/sources/SourcesNavigator.ts | learnMore":{"message":"Learn more"},"panels/sources/SourcesNavigator.ts | learnMoreAboutWorkspaces":{"message":"Learn more about Workspaces"},"panels/sources/SourcesNavigator.ts | newSnippet":{"message":"New snippet"},"panels/sources/SourcesNavigator.ts | overridePageAssetsWithFilesFromA":{"message":"Override page assets with files from a local folder"},"panels/sources/SourcesNavigator.ts | remove":{"message":"Remove"},"panels/sources/SourcesNavigator.ts | rename":{"message":"Rename…"},"panels/sources/SourcesNavigator.ts | run":{"message":"Run"},"panels/sources/SourcesNavigator.ts | saveAs":{"message":"Save as..."},"panels/sources/SourcesNavigator.ts | selectFolderForOverrides":{"message":"Select folder for overrides"},"panels/sources/SourcesNavigator.ts | syncChangesInDevtoolsWithThe":{"message":"Sync changes in DevTools with the local filesystem"},"panels/sources/SourcesPanel.ts | continueToHere":{"message":"Continue to here"},"panels/sources/SourcesPanel.ts | copyS":{"message":"Copy {PH1}"},"panels/sources/SourcesPanel.ts | copyStringAsJSLiteral":{"message":"Copy string as JavaScript literal"},"panels/sources/SourcesPanel.ts | copyStringAsJSONLiteral":{"message":"Copy string as JSON literal"},"panels/sources/SourcesPanel.ts | copyStringContents":{"message":"Copy string contents"},"panels/sources/SourcesPanel.ts | debuggerHidden":{"message":"Debugger sidebar hidden"},"panels/sources/SourcesPanel.ts | debuggerShown":{"message":"Debugger sidebar shown"},"panels/sources/SourcesPanel.ts | dropWorkspaceFolderHere":{"message":"Drop workspace folder here"},"panels/sources/SourcesPanel.ts | groupByAuthored":{"message":"Group by Authored/Deployed"},"panels/sources/SourcesPanel.ts | groupByFolder":{"message":"Group by folder"},"panels/sources/SourcesPanel.ts | hideDebugger":{"message":"Hide debugger"},"panels/sources/SourcesPanel.ts | hideIgnoreListed":{"message":"Hide ignore-listed sources"},"panels/sources/SourcesPanel.ts | hideNavigator":{"message":"Hide navigator"},"panels/sources/SourcesPanel.ts | moreOptions":{"message":"More options"},"panels/sources/SourcesPanel.ts | navigatorHidden":{"message":"Navigator sidebar hidden"},"panels/sources/SourcesPanel.ts | navigatorShown":{"message":"Navigator sidebar shown"},"panels/sources/SourcesPanel.ts | openInSourcesPanel":{"message":"Open in Sources panel"},"panels/sources/SourcesPanel.ts | pauseOnCaughtExceptions":{"message":"Pause on caught exceptions"},"panels/sources/SourcesPanel.ts | resumeWithAllPausesBlockedForMs":{"message":"Resume with all pauses blocked for 500 ms"},"panels/sources/SourcesPanel.ts | revealInSidebar":{"message":"Reveal in sidebar"},"panels/sources/SourcesPanel.ts | showDebugger":{"message":"Show debugger"},"panels/sources/SourcesPanel.ts | showFunctionDefinition":{"message":"Show function definition"},"panels/sources/SourcesPanel.ts | showNavigator":{"message":"Show navigator"},"panels/sources/SourcesPanel.ts | storeSAsGlobalVariable":{"message":"Store {PH1} as global variable"},"panels/sources/SourcesPanel.ts | terminateCurrentJavascriptCall":{"message":"Terminate current JavaScript call"},"panels/sources/SourcesView.ts | dropInAFolderToAddToWorkspace":{"message":"Drop in a folder to add to workspace"},"panels/sources/SourcesView.ts | openFile":{"message":"Open file"},"panels/sources/SourcesView.ts | runCommand":{"message":"Run command"},"panels/sources/SourcesView.ts | sourceViewActions":{"message":"Source View Actions"},"panels/sources/TabbedEditorContainer.ts | areYouSureYouWantToCloseUnsaved":{"message":"Are you sure you want to close unsaved file: {PH1}?"},"panels/sources/TabbedEditorContainer.ts | changesToThisFileWereNotSavedTo":{"message":"Changes to this file were not saved to file system."},"panels/sources/TabbedEditorContainer.ts | unableToLoadThisContent":{"message":"Unable to load this content."},"panels/sources/ThreadsSidebarPane.ts | paused":{"message":"paused"},"panels/sources/WatchExpressionsSidebarPane.ts | addPropertyPathToWatch":{"message":"Add property path to watch"},"panels/sources/WatchExpressionsSidebarPane.ts | addWatchExpression":{"message":"Add watch expression"},"panels/sources/WatchExpressionsSidebarPane.ts | copyValue":{"message":"Copy value"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteAllWatchExpressions":{"message":"Delete all watch expressions"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteWatchExpression":{"message":"Delete watch expression"},"panels/sources/WatchExpressionsSidebarPane.ts | notAvailable":{"message":""},"panels/sources/WatchExpressionsSidebarPane.ts | noWatchExpressions":{"message":"No watch expressions"},"panels/sources/WatchExpressionsSidebarPane.ts | refreshWatchExpressions":{"message":"Refresh watch expressions"},"panels/timeline/AppenderUtils.ts | sSelfS":{"message":"{PH1} (self {PH2})"},"panels/timeline/CountersGraph.ts | documents":{"message":"Documents"},"panels/timeline/CountersGraph.ts | gpuMemory":{"message":"GPU Memory"},"panels/timeline/CountersGraph.ts | jsHeap":{"message":"JS Heap"},"panels/timeline/CountersGraph.ts | listeners":{"message":"Listeners"},"panels/timeline/CountersGraph.ts | nodes":{"message":"Nodes"},"panels/timeline/CountersGraph.ts | ss":{"message":"[{PH1} – {PH2}]"},"panels/timeline/EventsTimelineTreeView.ts | all":{"message":"All"},"panels/timeline/EventsTimelineTreeView.ts | Dms":{"message":"{PH1} ms"},"panels/timeline/EventsTimelineTreeView.ts | durationFilter":{"message":"Duration filter"},"panels/timeline/EventsTimelineTreeView.ts | filterEventLog":{"message":"Filter event log"},"panels/timeline/EventsTimelineTreeView.ts | startTime":{"message":"Start Time"},"panels/timeline/GPUTrackAppender.ts | gpu":{"message":"GPU"},"panels/timeline/InteractionsTrackAppender.ts | interactions":{"message":"Interactions"},"panels/timeline/LayoutShiftsTrackAppender.ts | layoutShifts":{"message":"Layout Shifts"},"panels/timeline/timeline-meta.ts | hideChromeFrameInLayersView":{"message":"Hide chrome frame in Layers view"},"panels/timeline/timeline-meta.ts | javascriptProfiler":{"message":"JavaScript Profiler"},"panels/timeline/timeline-meta.ts | loadProfile":{"message":"Load profile…"},"panels/timeline/timeline-meta.ts | nextFrame":{"message":"Next frame"},"panels/timeline/timeline-meta.ts | nextRecording":{"message":"Next recording"},"panels/timeline/timeline-meta.ts | performance":{"message":"Performance"},"panels/timeline/timeline-meta.ts | previousFrame":{"message":"Previous frame"},"panels/timeline/timeline-meta.ts | previousRecording":{"message":"Previous recording"},"panels/timeline/timeline-meta.ts | record":{"message":"Record"},"panels/timeline/timeline-meta.ts | saveProfile":{"message":"Save profile…"},"panels/timeline/timeline-meta.ts | showJavascriptProfiler":{"message":"Show JavaScript Profiler"},"panels/timeline/timeline-meta.ts | showPerformance":{"message":"Show Performance"},"panels/timeline/timeline-meta.ts | showRecentTimelineSessions":{"message":"Show recent timeline sessions"},"panels/timeline/timeline-meta.ts | startProfilingAndReloadPage":{"message":"Start profiling and reload page"},"panels/timeline/timeline-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/timeline/timeline-meta.ts | stop":{"message":"Stop"},"panels/timeline/TimelineController.ts | cpuProfileForATargetIsNot":{"message":"CPU profile for a target is not available."},"panels/timeline/TimelineController.ts | tracingNotSupported":{"message":"Performance trace recording not supported for this type of target"},"panels/timeline/TimelineDetailsView.ts | bottomup":{"message":"Bottom-Up"},"panels/timeline/TimelineDetailsView.ts | callTree":{"message":"Call Tree"},"panels/timeline/TimelineDetailsView.ts | estimated":{"message":"estimated"},"panels/timeline/TimelineDetailsView.ts | eventLog":{"message":"Event Log"},"panels/timeline/TimelineDetailsView.ts | layers":{"message":"Layers"},"panels/timeline/TimelineDetailsView.ts | learnMore":{"message":"Learn more"},"panels/timeline/TimelineDetailsView.ts | paintProfiler":{"message":"Paint Profiler"},"panels/timeline/TimelineDetailsView.ts | rangeSS":{"message":"Range: {PH1} – {PH2}"},"panels/timeline/TimelineDetailsView.ts | summary":{"message":"Summary"},"panels/timeline/TimelineDetailsView.ts | totalBlockingTimeSmss":{"message":"Total blocking time: {PH1}ms{PH2}"},"panels/timeline/TimelineEventOverview.ts | cpu":{"message":"CPU"},"panels/timeline/TimelineEventOverview.ts | heap":{"message":"HEAP"},"panels/timeline/TimelineEventOverview.ts | net":{"message":"NET"},"panels/timeline/TimelineEventOverview.ts | sSDash":{"message":"{PH1} – {PH2}"},"panels/timeline/TimelineFlameChartDataProvider.ts | animation":{"message":"Animation"},"panels/timeline/TimelineFlameChartDataProvider.ts | droppedFrame":{"message":"Dropped Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | frame":{"message":"Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | frames":{"message":"Frames"},"panels/timeline/TimelineFlameChartDataProvider.ts | frameS":{"message":"Frame — {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | idleFrame":{"message":"Idle Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | longFrame":{"message":"Long frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | main":{"message":"Main"},"panels/timeline/TimelineFlameChartDataProvider.ts | mainS":{"message":"Main — {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | onIgnoreList":{"message":"On ignore list"},"panels/timeline/TimelineFlameChartDataProvider.ts | partiallyPresentedFrame":{"message":"Partially Presented Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | raster":{"message":"Raster"},"panels/timeline/TimelineFlameChartDataProvider.ts | rasterizerThreadS":{"message":"Rasterizer Thread {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | sSelfS":{"message":"{PH1} (self {PH2})"},"panels/timeline/TimelineFlameChartDataProvider.ts | subframe":{"message":"Subframe"},"panels/timeline/TimelineFlameChartDataProvider.ts | thread":{"message":"Thread"},"panels/timeline/TimelineFlameChartNetworkDataProvider.ts | network":{"message":"Network"},"panels/timeline/TimelineFlameChartView.ts | sAtS":{"message":"{PH1} at {PH2}"},"panels/timeline/TimelineHistoryManager.ts | currentSessionSS":{"message":"Current Session: {PH1}. {PH2}"},"panels/timeline/TimelineHistoryManager.ts | moments":{"message":"moments"},"panels/timeline/TimelineHistoryManager.ts | noRecordings":{"message":"(no recordings)"},"panels/timeline/TimelineHistoryManager.ts | sAgo":{"message":"({PH1} ago)"},"panels/timeline/TimelineHistoryManager.ts | sD":{"message":"{PH1} #{PH2}"},"panels/timeline/TimelineHistoryManager.ts | selectTimelineSession":{"message":"Select Timeline Session"},"panels/timeline/TimelineHistoryManager.ts | sH":{"message":"{PH1} h"},"panels/timeline/TimelineHistoryManager.ts | sM":{"message":"{PH1} m"},"panels/timeline/TimelineLoader.ts | legacyTimelineFormatIsNot":{"message":"Legacy Timeline format is not supported."},"panels/timeline/TimelineLoader.ts | malformedCpuProfileFormat":{"message":"Malformed CPU profile format"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataS":{"message":"Malformed timeline data: {PH1}"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataUnknownJson":{"message":"Malformed timeline data: Unknown JSON format"},"panels/timeline/TimelineLoader.ts | malformedTimelineInputWrongJson":{"message":"Malformed timeline input, wrong JSON brackets balance"},"panels/timeline/TimelinePanel.ts | afterRecordingSelectAnAreaOf":{"message":"After recording, select an area of interest in the overview by dragging. Then, zoom and pan the timeline with the mousewheel or {PH1} keys. {PH2}"},"panels/timeline/TimelinePanel.ts | bufferUsage":{"message":"Buffer usage"},"panels/timeline/TimelinePanel.ts | capturesAdvancedPaint":{"message":"Captures advanced paint instrumentation, introduces significant performance overhead"},"panels/timeline/TimelinePanel.ts | captureScreenshots":{"message":"Capture screenshots"},"panels/timeline/TimelinePanel.ts | captureSettings":{"message":"Capture settings"},"panels/timeline/TimelinePanel.ts | clear":{"message":"Clear"},"panels/timeline/TimelinePanel.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start a new recording."},"panels/timeline/TimelinePanel.ts | clickTheReloadButtonSOrHitSTo":{"message":"Click the reload button {PH1} or hit {PH2} to record the page load."},"panels/timeline/TimelinePanel.ts | close":{"message":"Close"},"panels/timeline/TimelinePanel.ts | couldNotStart":{"message":"Could not start recording, please try again later"},"panels/timeline/TimelinePanel.ts | cpu":{"message":"CPU:"},"panels/timeline/TimelinePanel.ts | CpuThrottlingIsEnabled":{"message":"- CPU throttling is enabled"},"panels/timeline/TimelinePanel.ts | description":{"message":"Description"},"panels/timeline/TimelinePanel.ts | disableJavascriptSamples":{"message":"Disable JavaScript samples"},"panels/timeline/TimelinePanel.ts | disablesJavascriptSampling":{"message":"Disables JavaScript sampling, reduces overhead when running against mobile devices"},"panels/timeline/TimelinePanel.ts | dropTimelineFileOrUrlHere":{"message":"Drop timeline file or URL here"},"panels/timeline/TimelinePanel.ts | enableAdvancedPaint":{"message":"Enable advanced paint instrumentation (slow)"},"panels/timeline/TimelinePanel.ts | failedToSaveTimelineSS":{"message":"Failed to save timeline: {PH1} ({PH2})"},"panels/timeline/TimelinePanel.ts | HardwareConcurrencyIsEnabled":{"message":"- Hardware concurrency override is enabled"},"panels/timeline/TimelinePanel.ts | initializingProfiler":{"message":"Initializing profiler…"},"panels/timeline/TimelinePanel.ts | JavascriptSamplingIsDisabled":{"message":"- JavaScript sampling is disabled"},"panels/timeline/TimelinePanel.ts | learnmore":{"message":"Learn more"},"panels/timeline/TimelinePanel.ts | loadingProfile":{"message":"Loading profile…"},"panels/timeline/TimelinePanel.ts | loadProfile":{"message":"Load profile…"},"panels/timeline/TimelinePanel.ts | memory":{"message":"Memory"},"panels/timeline/TimelinePanel.ts | network":{"message":"Network:"},"panels/timeline/TimelinePanel.ts | networkConditions":{"message":"Network conditions"},"panels/timeline/TimelinePanel.ts | NetworkThrottlingIsEnabled":{"message":"- Network throttling is enabled"},"panels/timeline/TimelinePanel.ts | processingProfile":{"message":"Processing profile…"},"panels/timeline/TimelinePanel.ts | profiling":{"message":"Profiling…"},"panels/timeline/TimelinePanel.ts | received":{"message":"Received"},"panels/timeline/TimelinePanel.ts | recordingFailed":{"message":"Recording failed"},"panels/timeline/TimelinePanel.ts | saveProfile":{"message":"Save profile…"},"panels/timeline/TimelinePanel.ts | screenshots":{"message":"Screenshots"},"panels/timeline/TimelinePanel.ts | showMemoryTimeline":{"message":"Show memory timeline"},"panels/timeline/TimelinePanel.ts | SignificantOverheadDueToPaint":{"message":"- Significant overhead due to paint instrumentation"},"panels/timeline/TimelinePanel.ts | ssec":{"message":"{PH1} sec"},"panels/timeline/TimelinePanel.ts | status":{"message":"Status"},"panels/timeline/TimelinePanel.ts | stop":{"message":"Stop"},"panels/timeline/TimelinePanel.ts | stoppingTimeline":{"message":"Stopping timeline…"},"panels/timeline/TimelinePanel.ts | time":{"message":"Time"},"panels/timeline/TimelinePanel.ts | wasd":{"message":"WASD"},"panels/timeline/TimelineTreeView.ts | activity":{"message":"Activity"},"panels/timeline/TimelineTreeView.ts | chromeExtensionsOverhead":{"message":"[Chrome extensions overhead]"},"panels/timeline/TimelineTreeView.ts | filter":{"message":"Filter"},"panels/timeline/TimelineTreeView.ts | filterBottomup":{"message":"Filter bottom-up"},"panels/timeline/TimelineTreeView.ts | filterCallTree":{"message":"Filter call tree"},"panels/timeline/TimelineTreeView.ts | fms":{"message":"{PH1} ms"},"panels/timeline/TimelineTreeView.ts | groupBy":{"message":"Group by"},"panels/timeline/TimelineTreeView.ts | groupByActivity":{"message":"Group by Activity"},"panels/timeline/TimelineTreeView.ts | groupByCategory":{"message":"Group by Category"},"panels/timeline/TimelineTreeView.ts | groupByDomain":{"message":"Group by Domain"},"panels/timeline/TimelineTreeView.ts | groupByFrame":{"message":"Group by Frame"},"panels/timeline/TimelineTreeView.ts | groupBySubdomain":{"message":"Group by Subdomain"},"panels/timeline/TimelineTreeView.ts | groupByUrl":{"message":"Group by URL"},"panels/timeline/TimelineTreeView.ts | heaviestStack":{"message":"Heaviest stack"},"panels/timeline/TimelineTreeView.ts | heaviestStackHidden":{"message":"Heaviest stack sidebar hidden"},"panels/timeline/TimelineTreeView.ts | heaviestStackShown":{"message":"Heaviest stack sidebar shown"},"panels/timeline/TimelineTreeView.ts | hideHeaviestStack":{"message":"Hide Heaviest stack"},"panels/timeline/TimelineTreeView.ts | javascript":{"message":"JavaScript"},"panels/timeline/TimelineTreeView.ts | noGrouping":{"message":"No Grouping"},"panels/timeline/TimelineTreeView.ts | notOptimizedS":{"message":"Not optimized: {PH1}"},"panels/timeline/TimelineTreeView.ts | page":{"message":"Page"},"panels/timeline/TimelineTreeView.ts | percentPlaceholder":{"message":"{PH1} %"},"panels/timeline/TimelineTreeView.ts | performance":{"message":"Performance"},"panels/timeline/TimelineTreeView.ts | selectItemForDetails":{"message":"Select item for details."},"panels/timeline/TimelineTreeView.ts | selfTime":{"message":"Self Time"},"panels/timeline/TimelineTreeView.ts | showHeaviestStack":{"message":"Show Heaviest stack"},"panels/timeline/TimelineTreeView.ts | timelineStack":{"message":"Timeline Stack"},"panels/timeline/TimelineTreeView.ts | totalTime":{"message":"Total Time"},"panels/timeline/TimelineTreeView.ts | unattributed":{"message":"[unattributed]"},"panels/timeline/TimelineTreeView.ts | vRuntime":{"message":"[V8 Runtime]"},"panels/timeline/TimelineUIUtils.ts | aggregatedTime":{"message":"Aggregated Time"},"panels/timeline/TimelineUIUtils.ts | allottedTime":{"message":"Allotted Time"},"panels/timeline/TimelineUIUtils.ts | animation":{"message":"Animation"},"panels/timeline/TimelineUIUtils.ts | animationFrameFired":{"message":"Animation Frame Fired"},"panels/timeline/TimelineUIUtils.ts | animationFrameRequested":{"message":"Animation Frame Requested"},"panels/timeline/TimelineUIUtils.ts | async":{"message":"Async"},"panels/timeline/TimelineUIUtils.ts | asyncTask":{"message":"Async Task"},"panels/timeline/TimelineUIUtils.ts | cachedWasmModule":{"message":"Cached Wasm Module"},"panels/timeline/TimelineUIUtils.ts | cacheModule":{"message":"Cache Module Code"},"panels/timeline/TimelineUIUtils.ts | cacheScript":{"message":"Cache Script Code"},"panels/timeline/TimelineUIUtils.ts | callbackFunction":{"message":"Callback Function"},"panels/timeline/TimelineUIUtils.ts | callbackId":{"message":"Callback ID"},"panels/timeline/TimelineUIUtils.ts | callStacks":{"message":"Call Stacks"},"panels/timeline/TimelineUIUtils.ts | cancelAnimationFrame":{"message":"Cancel Animation Frame"},"panels/timeline/TimelineUIUtils.ts | cancelIdleCallback":{"message":"Cancel Idle Callback"},"panels/timeline/TimelineUIUtils.ts | changedAttributeToSs":{"message":"(changed attribute to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedClassToSs":{"message":"(changed class to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedIdToSs":{"message":"(changed id to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedPesudoToSs":{"message":"(changed pseudo to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedSs":{"message":"(changed \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | collected":{"message":"Collected"},"panels/timeline/TimelineUIUtils.ts | commit":{"message":"Commit"},"panels/timeline/TimelineUIUtils.ts | compilationCacheSize":{"message":"Compilation cache size"},"panels/timeline/TimelineUIUtils.ts | compilationCacheStatus":{"message":"Compilation cache status"},"panels/timeline/TimelineUIUtils.ts | compile":{"message":"Compile"},"panels/timeline/TimelineUIUtils.ts | compileCode":{"message":"Compile Code"},"panels/timeline/TimelineUIUtils.ts | compiledWasmModule":{"message":"Compiled Wasm Module"},"panels/timeline/TimelineUIUtils.ts | compileModule":{"message":"Compile Module"},"panels/timeline/TimelineUIUtils.ts | compileScript":{"message":"Compile Script"},"panels/timeline/TimelineUIUtils.ts | compositeLayers":{"message":"Composite Layers"},"panels/timeline/TimelineUIUtils.ts | computeIntersections":{"message":"Compute Intersections"},"panels/timeline/TimelineUIUtils.ts | consoleTime":{"message":"Console Time"},"panels/timeline/TimelineUIUtils.ts | consumedCacheSize":{"message":"Consumed Cache Size"},"panels/timeline/TimelineUIUtils.ts | cpuTime":{"message":"CPU time"},"panels/timeline/TimelineUIUtils.ts | createWebsocket":{"message":"Create WebSocket"},"panels/timeline/TimelineUIUtils.ts | cumulativeLayoutShifts":{"message":"Cumulative Layout Shifts"},"panels/timeline/TimelineUIUtils.ts | cumulativeScore":{"message":"Cumulative Score"},"panels/timeline/TimelineUIUtils.ts | currentClusterId":{"message":"Current Cluster ID"},"panels/timeline/TimelineUIUtils.ts | currentClusterScore":{"message":"Current Cluster Score"},"panels/timeline/TimelineUIUtils.ts | decodedBody":{"message":"Decoded Body"},"panels/timeline/TimelineUIUtils.ts | decrypt":{"message":"Decrypt"},"panels/timeline/TimelineUIUtils.ts | decryptReply":{"message":"Decrypt Reply"},"panels/timeline/TimelineUIUtils.ts | deserializeCodeCache":{"message":"Deserialize Code Cache"},"panels/timeline/TimelineUIUtils.ts | destroyWebsocket":{"message":"Destroy WebSocket"},"panels/timeline/TimelineUIUtils.ts | details":{"message":"Details"},"panels/timeline/TimelineUIUtils.ts | digest":{"message":"Digest"},"panels/timeline/TimelineUIUtils.ts | digestReply":{"message":"Digest Reply"},"panels/timeline/TimelineUIUtils.ts | dimensions":{"message":"Dimensions"},"panels/timeline/TimelineUIUtils.ts | domcontentloadedEvent":{"message":"DOMContentLoaded Event"},"panels/timeline/TimelineUIUtils.ts | domGc":{"message":"DOM GC"},"panels/timeline/TimelineUIUtils.ts | drawFrame":{"message":"Draw Frame"},"panels/timeline/TimelineUIUtils.ts | duration":{"message":"Duration"},"panels/timeline/TimelineUIUtils.ts | eagerCompile":{"message":"Compiling all functions eagerly"},"panels/timeline/TimelineUIUtils.ts | elementsAffected":{"message":"Elements Affected"},"panels/timeline/TimelineUIUtils.ts | embedderCallback":{"message":"Embedder Callback"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholder":{"message":"{PH1}"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholderColon":{"message":": {PH1}"},"panels/timeline/TimelineUIUtils.ts | encodedData":{"message":"Encoded Data"},"panels/timeline/TimelineUIUtils.ts | encrypt":{"message":"Encrypt"},"panels/timeline/TimelineUIUtils.ts | encryptReply":{"message":"Encrypt Reply"},"panels/timeline/TimelineUIUtils.ts | evaluateModule":{"message":"Evaluate Module"},"panels/timeline/TimelineUIUtils.ts | evaluateScript":{"message":"Evaluate Script"},"panels/timeline/TimelineUIUtils.ts | event":{"message":"Event"},"panels/timeline/TimelineUIUtils.ts | eventTiming":{"message":"Event Timing"},"panels/timeline/TimelineUIUtils.ts | evolvedClsLink":{"message":"evolved"},"panels/timeline/TimelineUIUtils.ts | experience":{"message":"Experience"},"panels/timeline/TimelineUIUtils.ts | failedToLoadScriptFromCache":{"message":"failed to load script from cache"},"panels/timeline/TimelineUIUtils.ts | finishLoading":{"message":"Finish Loading"},"panels/timeline/TimelineUIUtils.ts | fireIdleCallback":{"message":"Fire Idle Callback"},"panels/timeline/TimelineUIUtils.ts | firstContentfulPaint":{"message":"First Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | firstInvalidated":{"message":"First Invalidated"},"panels/timeline/TimelineUIUtils.ts | firstLayoutInvalidation":{"message":"First Layout Invalidation"},"panels/timeline/TimelineUIUtils.ts | firstPaint":{"message":"First Paint"},"panels/timeline/TimelineUIUtils.ts | forcedReflow":{"message":"Forced reflow"},"panels/timeline/TimelineUIUtils.ts | frame":{"message":"Frame"},"panels/timeline/TimelineUIUtils.ts | frameStart":{"message":"Frame Start"},"panels/timeline/TimelineUIUtils.ts | frameStartedLoading":{"message":"Frame Started Loading"},"panels/timeline/TimelineUIUtils.ts | frameStartMainThread":{"message":"Frame Start (main thread)"},"panels/timeline/TimelineUIUtils.ts | FromCache":{"message":" (from cache)"},"panels/timeline/TimelineUIUtils.ts | FromMemoryCache":{"message":" (from memory cache)"},"panels/timeline/TimelineUIUtils.ts | FromPush":{"message":" (from push)"},"panels/timeline/TimelineUIUtils.ts | FromServiceWorker":{"message":" (from service worker)"},"panels/timeline/TimelineUIUtils.ts | function":{"message":"Function"},"panels/timeline/TimelineUIUtils.ts | functionCall":{"message":"Function Call"},"panels/timeline/TimelineUIUtils.ts | gcEvent":{"message":"GC Event"},"panels/timeline/TimelineUIUtils.ts | gpu":{"message":"GPU"},"panels/timeline/TimelineUIUtils.ts | hadRecentInput":{"message":"Had recent input"},"panels/timeline/TimelineUIUtils.ts | handlerTookS":{"message":"Handler took {PH1}"},"panels/timeline/TimelineUIUtils.ts | hitTest":{"message":"Hit Test"},"panels/timeline/TimelineUIUtils.ts | idle":{"message":"Idle"},"panels/timeline/TimelineUIUtils.ts | idleCallbackExecutionExtended":{"message":"Idle callback execution extended beyond deadline by {PH1}"},"panels/timeline/TimelineUIUtils.ts | idleCallbackRequested":{"message":"Idle Callback Requested"},"panels/timeline/TimelineUIUtils.ts | imageDecode":{"message":"Image Decode"},"panels/timeline/TimelineUIUtils.ts | imageResize":{"message":"Image Resize"},"panels/timeline/TimelineUIUtils.ts | imageUrl":{"message":"Image URL"},"panels/timeline/TimelineUIUtils.ts | initiator":{"message":"Initiator"},"panels/timeline/TimelineUIUtils.ts | installTimer":{"message":"Install Timer"},"panels/timeline/TimelineUIUtils.ts | interactionID":{"message":"ID"},"panels/timeline/TimelineUIUtils.ts | invalidateLayout":{"message":"Invalidate Layout"},"panels/timeline/TimelineUIUtils.ts | invalidations":{"message":"Invalidations"},"panels/timeline/TimelineUIUtils.ts | invokedByTimeout":{"message":"Invoked by Timeout"},"panels/timeline/TimelineUIUtils.ts | jank":{"message":"jank"},"panels/timeline/TimelineUIUtils.ts | jsFrame":{"message":"JS Frame"},"panels/timeline/TimelineUIUtils.ts | jsIdleFrame":{"message":"JS Idle Frame"},"panels/timeline/TimelineUIUtils.ts | jsRoot":{"message":"JS Root"},"panels/timeline/TimelineUIUtils.ts | jsSystemFrame":{"message":"JS System Frame"},"panels/timeline/TimelineUIUtils.ts | largestContentfulPaint":{"message":"Largest Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | layerize":{"message":"Layerize"},"panels/timeline/TimelineUIUtils.ts | layerRoot":{"message":"Layer Root"},"panels/timeline/TimelineUIUtils.ts | layerTree":{"message":"Layer tree"},"panels/timeline/TimelineUIUtils.ts | layout":{"message":"Layout"},"panels/timeline/TimelineUIUtils.ts | layoutForced":{"message":"Layout Forced"},"panels/timeline/TimelineUIUtils.ts | layoutInvalidations":{"message":"Layout Invalidations"},"panels/timeline/TimelineUIUtils.ts | layoutRoot":{"message":"Layout root"},"panels/timeline/TimelineUIUtils.ts | layoutShift":{"message":"Layout Shift"},"panels/timeline/TimelineUIUtils.ts | learnMore":{"message":"Learn more"},"panels/timeline/TimelineUIUtils.ts | loadFromCache":{"message":"load from cache"},"panels/timeline/TimelineUIUtils.ts | loading":{"message":"Loading"},"panels/timeline/TimelineUIUtils.ts | location":{"message":"Location"},"panels/timeline/TimelineUIUtils.ts | longInteractionINP":{"message":"Long interaction"},"panels/timeline/TimelineUIUtils.ts | longTask":{"message":"Long task"},"panels/timeline/TimelineUIUtils.ts | majorGc":{"message":"Major GC"},"panels/timeline/TimelineUIUtils.ts | message":{"message":"Message"},"panels/timeline/TimelineUIUtils.ts | mimeType":{"message":"Mime Type"},"panels/timeline/TimelineUIUtils.ts | mimeTypeCaps":{"message":"MIME Type"},"panels/timeline/TimelineUIUtils.ts | minorGc":{"message":"Minor GC"},"panels/timeline/TimelineUIUtils.ts | module":{"message":"Module"},"panels/timeline/TimelineUIUtils.ts | movedFrom":{"message":"Moved from"},"panels/timeline/TimelineUIUtils.ts | movedTo":{"message":"Moved to"},"panels/timeline/TimelineUIUtils.ts | networkRequest":{"message":"Network request"},"panels/timeline/TimelineUIUtils.ts | networkTransfer":{"message":"network transfer"},"panels/timeline/TimelineUIUtils.ts | no":{"message":"No"},"panels/timeline/TimelineUIUtils.ts | node":{"message":"Node:"},"panels/timeline/TimelineUIUtils.ts | nodes":{"message":"Nodes:"},"panels/timeline/TimelineUIUtils.ts | nodesThatNeedLayout":{"message":"Nodes That Need Layout"},"panels/timeline/TimelineUIUtils.ts | notOptimized":{"message":"Not optimized"},"panels/timeline/TimelineUIUtils.ts | onloadEvent":{"message":"Onload Event"},"panels/timeline/TimelineUIUtils.ts | optimizeCode":{"message":"Optimize Code"},"panels/timeline/TimelineUIUtils.ts | other":{"message":"Other"},"panels/timeline/TimelineUIUtils.ts | otherInvalidations":{"message":"Other Invalidations"},"panels/timeline/TimelineUIUtils.ts | ownerElement":{"message":"Owner Element"},"panels/timeline/TimelineUIUtils.ts | paint":{"message":"Paint"},"panels/timeline/TimelineUIUtils.ts | paintImage":{"message":"Paint Image"},"panels/timeline/TimelineUIUtils.ts | painting":{"message":"Painting"},"panels/timeline/TimelineUIUtils.ts | paintProfiler":{"message":"Paint Profiler"},"panels/timeline/TimelineUIUtils.ts | paintSetup":{"message":"Paint Setup"},"panels/timeline/TimelineUIUtils.ts | parse":{"message":"Parse"},"panels/timeline/TimelineUIUtils.ts | parseAndCompile":{"message":"Parse and Compile"},"panels/timeline/TimelineUIUtils.ts | parseHtml":{"message":"Parse HTML"},"panels/timeline/TimelineUIUtils.ts | parseStylesheet":{"message":"Parse Stylesheet"},"panels/timeline/TimelineUIUtils.ts | pendingFor":{"message":"Pending for"},"panels/timeline/TimelineUIUtils.ts | prePaint":{"message":"Pre-Paint"},"panels/timeline/TimelineUIUtils.ts | preview":{"message":"Preview"},"panels/timeline/TimelineUIUtils.ts | priority":{"message":"Priority"},"panels/timeline/TimelineUIUtils.ts | producedCacheSize":{"message":"Produced Cache Size"},"panels/timeline/TimelineUIUtils.ts | profilingOverhead":{"message":"Profiling Overhead"},"panels/timeline/TimelineUIUtils.ts | range":{"message":"Range"},"panels/timeline/TimelineUIUtils.ts | rasterizePaint":{"message":"Rasterize Paint"},"panels/timeline/TimelineUIUtils.ts | recalculateStyle":{"message":"Recalculate Style"},"panels/timeline/TimelineUIUtils.ts | recalculationForced":{"message":"Recalculation Forced"},"panels/timeline/TimelineUIUtils.ts | receiveData":{"message":"Receive Data"},"panels/timeline/TimelineUIUtils.ts | receiveResponse":{"message":"Receive Response"},"panels/timeline/TimelineUIUtils.ts | receiveWebsocketHandshake":{"message":"Receive WebSocket Handshake"},"panels/timeline/TimelineUIUtils.ts | recurringHandlerTookS":{"message":"Recurring handler took {PH1}"},"panels/timeline/TimelineUIUtils.ts | relatedNode":{"message":"Related Node"},"panels/timeline/TimelineUIUtils.ts | removeTimer":{"message":"Remove Timer"},"panels/timeline/TimelineUIUtils.ts | rendering":{"message":"Rendering"},"panels/timeline/TimelineUIUtils.ts | repeats":{"message":"Repeats"},"panels/timeline/TimelineUIUtils.ts | requestAnimationFrame":{"message":"Request Animation Frame"},"panels/timeline/TimelineUIUtils.ts | requestIdleCallback":{"message":"Request Idle Callback"},"panels/timeline/TimelineUIUtils.ts | requestMainThreadFrame":{"message":"Request Main Thread Frame"},"panels/timeline/TimelineUIUtils.ts | requestMethod":{"message":"Request Method"},"panels/timeline/TimelineUIUtils.ts | resource":{"message":"Resource"},"panels/timeline/TimelineUIUtils.ts | reveal":{"message":"Reveal"},"panels/timeline/TimelineUIUtils.ts | runMicrotasks":{"message":"Run Microtasks"},"panels/timeline/TimelineUIUtils.ts | sAndS":{"message":"{PH1} and {PH2}"},"panels/timeline/TimelineUIUtils.ts | sAndSOther":{"message":"{PH1}, {PH2}, and 1 other"},"panels/timeline/TimelineUIUtils.ts | sAtS":{"message":"{PH1} at {PH2}"},"panels/timeline/TimelineUIUtils.ts | sAtSParentheses":{"message":"{PH1} (at {PH2})"},"panels/timeline/TimelineUIUtils.ts | sBytes":{"message":"{n, plural, =1 {# Byte} other {# Bytes}}"},"panels/timeline/TimelineUIUtils.ts | scheduleStyleRecalculation":{"message":"Schedule Style Recalculation"},"panels/timeline/TimelineUIUtils.ts | sChildren":{"message":"{PH1} (children)"},"panels/timeline/TimelineUIUtils.ts | sCLSInformation":{"message":"{PH1} can result in poor user experiences. It has recently {PH2}."},"panels/timeline/TimelineUIUtils.ts | sCollected":{"message":"{PH1} collected"},"panels/timeline/TimelineUIUtils.ts | score":{"message":"Score"},"panels/timeline/TimelineUIUtils.ts | script":{"message":"Script"},"panels/timeline/TimelineUIUtils.ts | scripting":{"message":"Scripting"},"panels/timeline/TimelineUIUtils.ts | scriptLoadedFromCache":{"message":"script loaded from cache"},"panels/timeline/TimelineUIUtils.ts | scriptNotEligible":{"message":"script not eligible"},"panels/timeline/TimelineUIUtils.ts | scroll":{"message":"Scroll"},"panels/timeline/TimelineUIUtils.ts | selfTime":{"message":"Self Time"},"panels/timeline/TimelineUIUtils.ts | sendRequest":{"message":"Send Request"},"panels/timeline/TimelineUIUtils.ts | sendWebsocketHandshake":{"message":"Send WebSocket Handshake"},"panels/timeline/TimelineUIUtils.ts | sForS":{"message":"{PH1} for {PH2}"},"panels/timeline/TimelineUIUtils.ts | show":{"message":"Show"},"panels/timeline/TimelineUIUtils.ts | sign":{"message":"Sign"},"panels/timeline/TimelineUIUtils.ts | signReply":{"message":"Sign Reply"},"panels/timeline/TimelineUIUtils.ts | sIsALikelyPerformanceBottleneck":{"message":"{PH1} is a likely performance bottleneck."},"panels/timeline/TimelineUIUtils.ts | sIsLikelyPoorPageResponsiveness":{"message":"{PH1} is indicating poor page responsiveness."},"panels/timeline/TimelineUIUtils.ts | size":{"message":"Size"},"panels/timeline/TimelineUIUtils.ts | sLongFrameTimesAreAnIndicationOf":{"message":"{PH1}. Long frame times are an indication of {PH2}"},"panels/timeline/TimelineUIUtils.ts | sOfS":{"message":"{PH1} of {PH2}"},"panels/timeline/TimelineUIUtils.ts | sS":{"message":"{PH1}: {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSAndSOthers":{"message":"{PH1}, {PH2}, and {PH3} others"},"panels/timeline/TimelineUIUtils.ts | sSCurlyBrackets":{"message":"({PH1}, {PH2})"},"panels/timeline/TimelineUIUtils.ts | sSDimensions":{"message":"{PH1} × {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSDot":{"message":"{PH1}. {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSelf":{"message":"{PH1} (self)"},"panels/timeline/TimelineUIUtils.ts | sSs":{"message":"{PH1} [{PH2}…{PH3}]"},"panels/timeline/TimelineUIUtils.ts | sSSquareBrackets":{"message":"{PH1} [{PH2}…]"},"panels/timeline/TimelineUIUtils.ts | SSSResourceLoading":{"message":" ({PH1} {PH2} + {PH3} resource loading)"},"panels/timeline/TimelineUIUtils.ts | stackTrace":{"message":"Stack Trace"},"panels/timeline/TimelineUIUtils.ts | stackTraceColon":{"message":"Stack trace:"},"panels/timeline/TimelineUIUtils.ts | state":{"message":"State"},"panels/timeline/TimelineUIUtils.ts | statusCode":{"message":"Status Code"},"panels/timeline/TimelineUIUtils.ts | sTookS":{"message":"{PH1} took {PH2}."},"panels/timeline/TimelineUIUtils.ts | streamed":{"message":"Streamed"},"panels/timeline/TimelineUIUtils.ts | streamingCompileTask":{"message":"Streaming Compile Task"},"panels/timeline/TimelineUIUtils.ts | streamingWasmResponse":{"message":"Streaming Wasm Response"},"panels/timeline/TimelineUIUtils.ts | styleInvalidations":{"message":"Style Invalidations"},"panels/timeline/TimelineUIUtils.ts | stylesheetUrl":{"message":"Stylesheet URL"},"panels/timeline/TimelineUIUtils.ts | system":{"message":"System"},"panels/timeline/TimelineUIUtils.ts | task":{"message":"Task"},"panels/timeline/TimelineUIUtils.ts | timeout":{"message":"Timeout"},"panels/timeline/TimelineUIUtils.ts | timerFired":{"message":"Timer Fired"},"panels/timeline/TimelineUIUtils.ts | timerId":{"message":"Timer ID"},"panels/timeline/TimelineUIUtils.ts | timerInstalled":{"message":"Timer Installed"},"panels/timeline/TimelineUIUtils.ts | timeSpentInRendering":{"message":"Time spent in rendering"},"panels/timeline/TimelineUIUtils.ts | timestamp":{"message":"Timestamp"},"panels/timeline/TimelineUIUtils.ts | totalTime":{"message":"Total Time"},"panels/timeline/TimelineUIUtils.ts | type":{"message":"Type"},"panels/timeline/TimelineUIUtils.ts | unknown":{"message":"unknown"},"panels/timeline/TimelineUIUtils.ts | unknownCause":{"message":"Unknown cause"},"panels/timeline/TimelineUIUtils.ts | UnknownNode":{"message":"[ unknown node ]"},"panels/timeline/TimelineUIUtils.ts | updateLayer":{"message":"Update Layer"},"panels/timeline/TimelineUIUtils.ts | updateLayerTree":{"message":"Update Layer Tree"},"panels/timeline/TimelineUIUtils.ts | url":{"message":"Url"},"panels/timeline/TimelineUIUtils.ts | userTiming":{"message":"User Timing"},"panels/timeline/TimelineUIUtils.ts | verify":{"message":"Verify"},"panels/timeline/TimelineUIUtils.ts | verifyReply":{"message":"Verify Reply"},"panels/timeline/TimelineUIUtils.ts | waitingForNetwork":{"message":"Waiting for Network"},"panels/timeline/TimelineUIUtils.ts | warning":{"message":"Warning"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheHit":{"message":"Wasm Module Cache Hit"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheInvalid":{"message":"Wasm Module Cache Invalid"},"panels/timeline/TimelineUIUtils.ts | websocketProtocol":{"message":"WebSocket Protocol"},"panels/timeline/TimelineUIUtils.ts | willSendRequest":{"message":"Will Send Request"},"panels/timeline/TimelineUIUtils.ts | xhrLoad":{"message":"XHR Load"},"panels/timeline/TimelineUIUtils.ts | xhrReadyStateChange":{"message":"XHR Ready State Change"},"panels/timeline/TimelineUIUtils.ts | yes":{"message":"Yes"},"panels/timeline/TimingsTrackAppender.ts | timings":{"message":"Timings"},"panels/timeline/UIDevtoolsUtils.ts | drawFrame":{"message":"Draw Frame"},"panels/timeline/UIDevtoolsUtils.ts | drawing":{"message":"Drawing"},"panels/timeline/UIDevtoolsUtils.ts | frameStart":{"message":"Frame Start"},"panels/timeline/UIDevtoolsUtils.ts | idle":{"message":"Idle"},"panels/timeline/UIDevtoolsUtils.ts | layout":{"message":"Layout"},"panels/timeline/UIDevtoolsUtils.ts | painting":{"message":"Painting"},"panels/timeline/UIDevtoolsUtils.ts | rasterizing":{"message":"Rasterizing"},"panels/timeline/UIDevtoolsUtils.ts | system":{"message":"System"},"panels/web_audio/AudioContextContentBuilder.ts | callbackBufferSize":{"message":"Callback Buffer Size"},"panels/web_audio/AudioContextContentBuilder.ts | callbackInterval":{"message":"Callback Interval"},"panels/web_audio/AudioContextContentBuilder.ts | currentTime":{"message":"Current Time"},"panels/web_audio/AudioContextContentBuilder.ts | maxOutputChannels":{"message":"Max Output Channels"},"panels/web_audio/AudioContextContentBuilder.ts | renderCapacity":{"message":"Render Capacity"},"panels/web_audio/AudioContextContentBuilder.ts | sampleRate":{"message":"Sample Rate"},"panels/web_audio/AudioContextContentBuilder.ts | state":{"message":"State"},"panels/web_audio/AudioContextSelector.ts | audioContextS":{"message":"Audio context: {PH1}"},"panels/web_audio/AudioContextSelector.ts | noRecordings":{"message":"(no recordings)"},"panels/web_audio/web_audio-meta.ts | audio":{"message":"audio"},"panels/web_audio/web_audio-meta.ts | showWebaudio":{"message":"Show WebAudio"},"panels/web_audio/web_audio-meta.ts | webaudio":{"message":"WebAudio"},"panels/web_audio/WebAudioView.ts | openAPageThatUsesWebAudioApiTo":{"message":"Open a page that uses Web Audio API to start monitoring."},"panels/webauthn/webauthn-meta.ts | showWebauthn":{"message":"Show WebAuthn"},"panels/webauthn/webauthn-meta.ts | webauthn":{"message":"WebAuthn"},"panels/webauthn/WebauthnPane.ts | actions":{"message":"Actions"},"panels/webauthn/WebauthnPane.ts | active":{"message":"Active"},"panels/webauthn/WebauthnPane.ts | add":{"message":"Add"},"panels/webauthn/WebauthnPane.ts | addAuthenticator":{"message":"Add authenticator"},"panels/webauthn/WebauthnPane.ts | authenticatorS":{"message":"Authenticator {PH1}"},"panels/webauthn/WebauthnPane.ts | credentials":{"message":"Credentials"},"panels/webauthn/WebauthnPane.ts | editName":{"message":"Edit name"},"panels/webauthn/WebauthnPane.ts | enableVirtualAuthenticator":{"message":"Enable virtual authenticator environment"},"panels/webauthn/WebauthnPane.ts | export":{"message":"Export"},"panels/webauthn/WebauthnPane.ts | id":{"message":"ID"},"panels/webauthn/WebauthnPane.ts | isResident":{"message":"Is Resident"},"panels/webauthn/WebauthnPane.ts | learnMore":{"message":"Learn more"},"panels/webauthn/WebauthnPane.ts | newAuthenticator":{"message":"New authenticator"},"panels/webauthn/WebauthnPane.ts | no":{"message":"No"},"panels/webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour":{"message":"No credentials. Try calling {PH1} from your website."},"panels/webauthn/WebauthnPane.ts | privateKeypem":{"message":"Private key.pem"},"panels/webauthn/WebauthnPane.ts | protocol":{"message":"Protocol"},"panels/webauthn/WebauthnPane.ts | remove":{"message":"Remove"},"panels/webauthn/WebauthnPane.ts | rpId":{"message":"RP ID"},"panels/webauthn/WebauthnPane.ts | saveName":{"message":"Save name"},"panels/webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator":{"message":"Set {PH1} as the active authenticator"},"panels/webauthn/WebauthnPane.ts | signCount":{"message":"Signature Count"},"panels/webauthn/WebauthnPane.ts | supportsLargeBlob":{"message":"Supports large blob"},"panels/webauthn/WebauthnPane.ts | supportsResidentKeys":{"message":"Supports resident keys"},"panels/webauthn/WebauthnPane.ts | supportsUserVerification":{"message":"Supports user verification"},"panels/webauthn/WebauthnPane.ts | transport":{"message":"Transport"},"panels/webauthn/WebauthnPane.ts | userHandle":{"message":"User Handle"},"panels/webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant":{"message":"Use WebAuthn for phishing-resistant authentication"},"panels/webauthn/WebauthnPane.ts | uuid":{"message":"UUID"},"panels/webauthn/WebauthnPane.ts | yes":{"message":"Yes"},"ui/components/data_grid/DataGrid.ts | enterToSort":{"message":"Column sort state: {PH1}. Press enter to apply sorting filter"},"ui/components/data_grid/DataGrid.ts | headerOptions":{"message":"Header Options"},"ui/components/data_grid/DataGrid.ts | resetColumns":{"message":"Reset Columns"},"ui/components/data_grid/DataGrid.ts | sortAsc":{"message":"ascending"},"ui/components/data_grid/DataGrid.ts | sortBy":{"message":"Sort By"},"ui/components/data_grid/DataGrid.ts | sortDesc":{"message":"descending"},"ui/components/data_grid/DataGrid.ts | sortNone":{"message":"none"},"ui/components/data_grid/DataGridController.ts | sortInAscendingOrder":{"message":"{PH1} sorted in ascending order"},"ui/components/data_grid/DataGridController.ts | sortInDescendingOrder":{"message":"{PH1} sorted in descending order"},"ui/components/data_grid/DataGridController.ts | sortingCanceled":{"message":"{PH1} sorting canceled"},"ui/components/dialogs/ShortcutDialog.ts | close":{"message":"Close"},"ui/components/dialogs/ShortcutDialog.ts | dialogTitle":{"message":"Keyboard shortcuts"},"ui/components/dialogs/ShortcutDialog.ts | showShortcutTitle":{"message":"Show shortcuts"},"ui/components/diff_view/DiffView.ts | additions":{"message":"Addition:"},"ui/components/diff_view/DiffView.ts | changesDiffViewer":{"message":"Changes diff viewer"},"ui/components/diff_view/DiffView.ts | deletions":{"message":"Deletion:"},"ui/components/diff_view/DiffView.ts | SkippingDMatchingLines":{"message":"( … Skipping {PH1} matching lines … )"},"ui/components/issue_counter/IssueCounter.ts | breakingChanges":{"message":"{issueCount, plural, =1 {# breaking change} other {# breaking changes}}"},"ui/components/issue_counter/IssueCounter.ts | pageErrors":{"message":"{issueCount, plural, =1 {# page error} other {# page errors}}"},"ui/components/issue_counter/IssueCounter.ts | possibleImprovements":{"message":"{issueCount, plural, =1 {# possible improvement} other {# possible improvements}}"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssue":{"message":"Click to show issue in the issues tab"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssueWithTitle":{"message":"Click to open the issue tab and show issue: {title}"},"ui/components/issue_counter/IssueLinkIcon.ts | issueUnavailable":{"message":"Issue unavailable at this time"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | memoryInspector":{"message":"Memory Inspector"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector":{"message":"Show Memory Inspector"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight":{"message":"Stop highlighting this memory"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress":{"message":"Jump to this memory"},"ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd":{"message":"Address has to be a number between {PH1} and {PH2}"},"ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts | couldNotOpenLinearMemory":{"message":"Could not open linear memory inspector: failed locating buffer."},"ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts | noOpenInspections":{"message":"No open inspections"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | enterAddress":{"message":"Enter address"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goBackInAddressHistory":{"message":"Go back in address history"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goForwardInAddressHistory":{"message":"Go forward in address history"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | nextPage":{"message":"Next page"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | previousPage":{"message":"Previous page"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | refresh":{"message":"Refresh"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | changeEndianness":{"message":"Change Endianness"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | toggleValueTypeSettings":{"message":"Toggle value type settings"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | addressOutOfRange":{"message":"Address out of memory range"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | changeValueTypeMode":{"message":"Change mode"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | jumpToPointer":{"message":"Jump to address"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | signedValue":{"message":"Signed value"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | unsignedValue":{"message":"Unsigned value"},"ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.ts | notApplicable":{"message":"N/A"},"ui/components/linear_memory_inspector/ValueInterpreterSettings.ts | otherGroup":{"message":"Other"},"ui/components/panel_feedback/FeedbackButton.ts | feedback":{"message":"Feedback"},"ui/components/panel_feedback/PanelFeedback.ts | previewFeature":{"message":"Preview feature"},"ui/components/panel_feedback/PanelFeedback.ts | previewText":{"message":"Our team is actively working on this feature and we would love to know what you think."},"ui/components/panel_feedback/PanelFeedback.ts | previewTextFeedbackLink":{"message":"Send us your feedback."},"ui/components/panel_feedback/PanelFeedback.ts | videoAndDocumentation":{"message":"Video and documentation"},"ui/components/panel_feedback/PreviewToggle.ts | learnMoreLink":{"message":"Learn More"},"ui/components/panel_feedback/PreviewToggle.ts | previewTextFeedbackLink":{"message":"Send us your feedback."},"ui/components/panel_feedback/PreviewToggle.ts | shortFeedbackLink":{"message":"Send feedback"},"ui/components/request_link_icon/RequestLinkIcon.ts | clickToShowRequestInTheNetwork":{"message":"Click to open the network panel and show request for URL: {url}"},"ui/components/request_link_icon/RequestLinkIcon.ts | requestUnavailableInTheNetwork":{"message":"Request unavailable in the network panel, try reloading the inspected page"},"ui/components/request_link_icon/RequestLinkIcon.ts | shortenedURL":{"message":"Shortened URL"},"ui/components/survey_link/SurveyLink.ts | anErrorOccurredWithTheSurvey":{"message":"An error occurred with the survey"},"ui/components/survey_link/SurveyLink.ts | openingSurvey":{"message":"Opening survey …"},"ui/components/survey_link/SurveyLink.ts | thankYouForYourFeedback":{"message":"Thank you for your feedback"},"ui/components/text_editor/config.ts | codeEditor":{"message":"Code editor"},"ui/components/text_editor/config.ts | sSuggestionSOfS":{"message":"{PH1}, suggestion {PH2} of {PH3}"},"ui/legacy/ActionRegistration.ts | background_services":{"message":"Background Services"},"ui/legacy/ActionRegistration.ts | console":{"message":"Console"},"ui/legacy/ActionRegistration.ts | debugger":{"message":"Debugger"},"ui/legacy/ActionRegistration.ts | drawer":{"message":"Drawer"},"ui/legacy/ActionRegistration.ts | elements":{"message":"Elements"},"ui/legacy/ActionRegistration.ts | global":{"message":"Global"},"ui/legacy/ActionRegistration.ts | help":{"message":"Help"},"ui/legacy/ActionRegistration.ts | javascript_profiler":{"message":"JavaScript Profiler"},"ui/legacy/ActionRegistration.ts | layers":{"message":"Layers"},"ui/legacy/ActionRegistration.ts | memory":{"message":"Memory"},"ui/legacy/ActionRegistration.ts | mobile":{"message":"Mobile"},"ui/legacy/ActionRegistration.ts | navigation":{"message":"Navigation"},"ui/legacy/ActionRegistration.ts | network":{"message":"Network"},"ui/legacy/ActionRegistration.ts | performance":{"message":"Performance"},"ui/legacy/ActionRegistration.ts | rendering":{"message":"Rendering"},"ui/legacy/ActionRegistration.ts | resources":{"message":"Resources"},"ui/legacy/ActionRegistration.ts | screenshot":{"message":"Screenshot"},"ui/legacy/ActionRegistration.ts | settings":{"message":"Settings"},"ui/legacy/ActionRegistration.ts | sources":{"message":"Sources"},"ui/legacy/components/color_picker/ContrastDetails.ts | aa":{"message":"AA"},"ui/legacy/components/color_picker/ContrastDetails.ts | aaa":{"message":"AAA"},"ui/legacy/components/color_picker/ContrastDetails.ts | apca":{"message":"APCA"},"ui/legacy/components/color_picker/ContrastDetails.ts | contrastRatio":{"message":"Contrast ratio"},"ui/legacy/components/color_picker/ContrastDetails.ts | noContrastInformationAvailable":{"message":"No contrast information available"},"ui/legacy/components/color_picker/ContrastDetails.ts | pickBackgroundColor":{"message":"Pick background color"},"ui/legacy/components/color_picker/ContrastDetails.ts | placeholderWithColon":{"message":": {PH1}"},"ui/legacy/components/color_picker/ContrastDetails.ts | showLess":{"message":"Show less"},"ui/legacy/components/color_picker/ContrastDetails.ts | showMore":{"message":"Show more"},"ui/legacy/components/color_picker/ContrastDetails.ts | toggleBackgroundColorPicker":{"message":"Toggle background color picker"},"ui/legacy/components/color_picker/ContrastDetails.ts | useSuggestedColorStoFixLow":{"message":"Use suggested color {PH1}to fix low contrast"},"ui/legacy/components/color_picker/FormatPickerContextMenu.ts | colorClippedTooltipText":{"message":"This color was clipped to match the format's gamut. The actual result was {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | addToPalette":{"message":"Add to palette"},"ui/legacy/components/color_picker/Spectrum.ts | changeAlpha":{"message":"Change alpha"},"ui/legacy/components/color_picker/Spectrum.ts | changeColorFormat":{"message":"Change color format"},"ui/legacy/components/color_picker/Spectrum.ts | changeHue":{"message":"Change hue"},"ui/legacy/components/color_picker/Spectrum.ts | clearPalette":{"message":"Clear palette"},"ui/legacy/components/color_picker/Spectrum.ts | colorPalettes":{"message":"Color Palettes"},"ui/legacy/components/color_picker/Spectrum.ts | colorS":{"message":"Color {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | copyColorToClipboard":{"message":"Copy color to clipboard"},"ui/legacy/components/color_picker/Spectrum.ts | hex":{"message":"HEX"},"ui/legacy/components/color_picker/Spectrum.ts | longclickOrLongpressSpaceToShow":{"message":"Long-click or long-press space to show alternate shades of {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | pressArrowKeysMessage":{"message":"Press arrow keys with or without modifiers to move swatch position. Arrow key with Shift key moves position largely, with Ctrl key it is less and with Alt key it is even less"},"ui/legacy/components/color_picker/Spectrum.ts | previewPalettes":{"message":"Preview palettes"},"ui/legacy/components/color_picker/Spectrum.ts | removeAllToTheRight":{"message":"Remove all to the right"},"ui/legacy/components/color_picker/Spectrum.ts | removeColor":{"message":"Remove color"},"ui/legacy/components/color_picker/Spectrum.ts | returnToColorPicker":{"message":"Return to color picker"},"ui/legacy/components/color_picker/Spectrum.ts | sInS":{"message":"{PH1} in {PH2}"},"ui/legacy/components/color_picker/Spectrum.ts | toggleColorPicker":{"message":"Eye dropper [{PH1}]"},"ui/legacy/components/cookie_table/CookiesTable.ts | cookies":{"message":"Cookies"},"ui/legacy/components/cookie_table/CookiesTable.ts | editableCookies":{"message":"Editable Cookies"},"ui/legacy/components/cookie_table/CookiesTable.ts | na":{"message":"N/A"},"ui/legacy/components/cookie_table/CookiesTable.ts | name":{"message":"Name"},"ui/legacy/components/cookie_table/CookiesTable.ts | opaquePartitionKey":{"message":"(opaque)"},"ui/legacy/components/cookie_table/CookiesTable.ts | session":{"message":"Session"},"ui/legacy/components/cookie_table/CookiesTable.ts | showIssueAssociatedWithThis":{"message":"Show issue associated with this cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | showRequestsWithThisCookie":{"message":"Show Requests With This Cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | size":{"message":"Size"},"ui/legacy/components/cookie_table/CookiesTable.ts | sourcePortTooltip":{"message":"Shows the source port (range 1-65535) the cookie was set on. If the port is unknown, this shows -1."},"ui/legacy/components/cookie_table/CookiesTable.ts | sourceSchemeTooltip":{"message":"Shows the source scheme (Secure, NonSecure) the cookie was set on. If the scheme is unknown, this shows Unset."},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfter":{"message":"after {date}"},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfterTooltip":{"message":"The expiration timestamp is {seconds}, which corresponds to a date after {date}"},"ui/legacy/components/cookie_table/CookiesTable.ts | value":{"message":"Value"},"ui/legacy/components/data_grid/DataGrid.ts | addNew":{"message":"Add new"},"ui/legacy/components/data_grid/DataGrid.ts | checked":{"message":"checked"},"ui/legacy/components/data_grid/DataGrid.ts | collapsed":{"message":"collapsed"},"ui/legacy/components/data_grid/DataGrid.ts | delete":{"message":"Delete"},"ui/legacy/components/data_grid/DataGrid.ts | editS":{"message":"Edit \"{PH1}\""},"ui/legacy/components/data_grid/DataGrid.ts | emptyRowCreated":{"message":"An empty table row has been created. You may double click or use context menu to edit."},"ui/legacy/components/data_grid/DataGrid.ts | expanded":{"message":"expanded"},"ui/legacy/components/data_grid/DataGrid.ts | headerOptions":{"message":"Header Options"},"ui/legacy/components/data_grid/DataGrid.ts | levelS":{"message":"level {PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | refresh":{"message":"Refresh"},"ui/legacy/components/data_grid/DataGrid.ts | resetColumns":{"message":"Reset Columns"},"ui/legacy/components/data_grid/DataGrid.ts | rowsS":{"message":"Rows: {PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | sortByString":{"message":"Sort By"},"ui/legacy/components/data_grid/DataGrid.ts | sRowS":{"message":"{PH1} Row {PH2}"},"ui/legacy/components/data_grid/DataGrid.ts | sSUseTheUpAndDownArrowKeysTo":{"message":"{PH1} {PH2}, use the up and down arrow keys to navigate and interact with the rows of the table; Use browse mode to read cell by cell."},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showAllD":{"message":"Show all {PH1}"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDAfter":{"message":"Show {PH1} after"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDBefore":{"message":"Show {PH1} before"},"ui/legacy/components/data_grid/ViewportDataGrid.ts | collapsed":{"message":"collapsed"},"ui/legacy/components/inline_editor/ColorSwatch.ts | shiftclickToChangeColorFormat":{"message":"Shift-click to change color format"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | blur":{"message":"Blur"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | spread":{"message":"Spread"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | type":{"message":"Type"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | xOffset":{"message":"X offset"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | yOffset":{"message":"Y offset"},"ui/legacy/components/inline_editor/FontEditor.ts | cssProperties":{"message":"CSS Properties"},"ui/legacy/components/inline_editor/FontEditor.ts | deleteS":{"message":"Delete {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fallbackS":{"message":"Fallback {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fontFamily":{"message":"Font Family"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSelectorDeletedAtIndexS":{"message":"Font Selector deleted at index: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSize":{"message":"Font Size"},"ui/legacy/components/inline_editor/FontEditor.ts | fontWeight":{"message":"Font Weight"},"ui/legacy/components/inline_editor/FontEditor.ts | lineHeight":{"message":"Line Height"},"ui/legacy/components/inline_editor/FontEditor.ts | PleaseEnterAValidValueForSText":{"message":"* Please enter a valid value for {PH1} text input"},"ui/legacy/components/inline_editor/FontEditor.ts | selectorInputMode":{"message":"Selector Input Mode"},"ui/legacy/components/inline_editor/FontEditor.ts | sKeyValueSelector":{"message":"{PH1} Key Value Selector"},"ui/legacy/components/inline_editor/FontEditor.ts | sliderInputMode":{"message":"Slider Input Mode"},"ui/legacy/components/inline_editor/FontEditor.ts | spacing":{"message":"Spacing"},"ui/legacy/components/inline_editor/FontEditor.ts | sSliderInput":{"message":"{PH1} Slider Input"},"ui/legacy/components/inline_editor/FontEditor.ts | sTextInput":{"message":"{PH1} Text Input"},"ui/legacy/components/inline_editor/FontEditor.ts | sToggleInputType":{"message":"{PH1} toggle input type"},"ui/legacy/components/inline_editor/FontEditor.ts | sUnitInput":{"message":"{PH1} Unit Input"},"ui/legacy/components/inline_editor/FontEditor.ts | thereIsNoValueToDeleteAtIndexS":{"message":"There is no value to delete at index: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | thisPropertyIsSetToContainUnits":{"message":"This property is set to contain units but does not have a defined corresponding unitsArray: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | units":{"message":"Units"},"ui/legacy/components/inline_editor/LinkSwatch.ts | sIsNotDefined":{"message":"{PH1} is not defined"},"ui/legacy/components/object_ui/CustomPreviewComponent.ts | showAsJavascriptObject":{"message":"Show as JavaScript object"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | collapseChildren":{"message":"Collapse children"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copy":{"message":"Copy"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyPropertyPath":{"message":"Copy property path"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyValue":{"message":"Copy value"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | dots":{"message":"(...)"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | exceptionS":{"message":"[Exception: {PH1}]"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | expandRecursively":{"message":"Expand recursively"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | invokePropertyGetter":{"message":"Invoke property getter"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | longTextWasTruncatedS":{"message":"long text was truncated ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | noProperties":{"message":"No properties"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | revealInMemoryInpector":{"message":"Reveal in Memory Inspector panel"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showAllD":{"message":"Show all {PH1}"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showMoreS":{"message":"Show more ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | stringIsTooLargeToEdit":{"message":""},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | unknown":{"message":"unknown"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueNotAccessibleToTheDebugger":{"message":"Value is not accessible to the debugger"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueUnavailable":{"message":""},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | empty":{"message":"empty"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | emptyD":{"message":"empty × {PH1}"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | thePropertyIsComputedWithAGetter":{"message":"The property is computed with a getter"},"ui/legacy/components/perf_ui/FilmStripView.ts | doubleclickToZoomImageClickTo":{"message":"Doubleclick to zoom image. Click to view preceding requests."},"ui/legacy/components/perf_ui/FilmStripView.ts | nextFrame":{"message":"Next frame"},"ui/legacy/components/perf_ui/FilmStripView.ts | previousFrame":{"message":"Previous frame"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshot":{"message":"Screenshot"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshotForSSelectToView":{"message":"Screenshot for {PH1} - select to view preceding requests."},"ui/legacy/components/perf_ui/FlameChart.ts | flameChart":{"message":"Flame Chart"},"ui/legacy/components/perf_ui/FlameChart.ts | sCollapsed":{"message":"{PH1} collapsed"},"ui/legacy/components/perf_ui/FlameChart.ts | sExpanded":{"message":"{PH1} expanded"},"ui/legacy/components/perf_ui/FlameChart.ts | sHovered":{"message":"{PH1} hovered"},"ui/legacy/components/perf_ui/FlameChart.ts | sSelected":{"message":"{PH1} selected"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | high":{"message":"High"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | highest":{"message":"Highest"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | low":{"message":"Low"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | lowest":{"message":"Lowest"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | medium":{"message":"Medium"},"ui/legacy/components/perf_ui/OverviewGrid.ts | leftResizer":{"message":"Left Resizer"},"ui/legacy/components/perf_ui/OverviewGrid.ts | overviewGridWindow":{"message":"Overview grid window"},"ui/legacy/components/perf_ui/OverviewGrid.ts | rightResizer":{"message":"Right Resizer"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | collectGarbage":{"message":"Collect garbage"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | flamechartMouseWheelAction":{"message":"Flamechart mouse wheel action:"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | hideLiveMemoryAllocation":{"message":"Hide live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | liveMemoryAllocationAnnotations":{"message":"Live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | scroll":{"message":"Scroll"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | showLiveMemoryAllocation":{"message":"Show live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | zoom":{"message":"Zoom"},"ui/legacy/components/perf_ui/PieChart.ts | total":{"message":"Total"},"ui/legacy/components/quick_open/CommandMenu.ts | command":{"message":"Command"},"ui/legacy/components/quick_open/CommandMenu.ts | deprecated":{"message":"— deprecated"},"ui/legacy/components/quick_open/CommandMenu.ts | noCommandsFound":{"message":"No commands found"},"ui/legacy/components/quick_open/CommandMenu.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"ui/legacy/components/quick_open/CommandMenu.ts | run":{"message":"Run"},"ui/legacy/components/quick_open/FilteredListWidget.ts | noResultsFound":{"message":"No results found"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpen":{"message":"Quick open"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpenPrompt":{"message":"Quick open prompt"},"ui/legacy/components/quick_open/quick_open-meta.ts | openFile":{"message":"Open file"},"ui/legacy/components/quick_open/quick_open-meta.ts | runCommand":{"message":"Run command"},"ui/legacy/components/quick_open/QuickOpen.ts | typeToSeeAvailableCommands":{"message":"Type ? to see available commands"},"ui/legacy/components/source_frame/FontView.ts | font":{"message":"Font"},"ui/legacy/components/source_frame/FontView.ts | previewOfFontFromS":{"message":"Preview of font from {PH1}"},"ui/legacy/components/source_frame/ImageView.ts | copyImageAsDataUri":{"message":"Copy image as data URI"},"ui/legacy/components/source_frame/ImageView.ts | copyImageUrl":{"message":"Copy image URL"},"ui/legacy/components/source_frame/ImageView.ts | dD":{"message":"{PH1} × {PH2}"},"ui/legacy/components/source_frame/ImageView.ts | download":{"message":"download"},"ui/legacy/components/source_frame/ImageView.ts | dropImageFileHere":{"message":"Drop image file here"},"ui/legacy/components/source_frame/ImageView.ts | image":{"message":"Image"},"ui/legacy/components/source_frame/ImageView.ts | imageFromS":{"message":"Image from {PH1}"},"ui/legacy/components/source_frame/ImageView.ts | openImageInNewTab":{"message":"Open image in new tab"},"ui/legacy/components/source_frame/ImageView.ts | saveImageAs":{"message":"Save image as..."},"ui/legacy/components/source_frame/JSONView.ts | find":{"message":"Find"},"ui/legacy/components/source_frame/PreviewFactory.ts | nothingToPreview":{"message":"Nothing to preview"},"ui/legacy/components/source_frame/ResourceSourceFrame.ts | find":{"message":"Find"},"ui/legacy/components/source_frame/source_frame-meta.ts | defaultIndentation":{"message":"Default indentation:"},"ui/legacy/components/source_frame/source_frame-meta.ts | eSpaces":{"message":"8 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | fSpaces":{"message":"4 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToESpaces":{"message":"Set indentation to 8 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToFSpaces":{"message":"Set indentation to 4 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToSpaces":{"message":"Set indentation to 2 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToTabCharacter":{"message":"Set indentation to tab character"},"ui/legacy/components/source_frame/source_frame-meta.ts | Spaces":{"message":"2 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | tabCharacter":{"message":"Tab character"},"ui/legacy/components/source_frame/SourceFrame.ts | bytecodePositionXs":{"message":"Bytecode position 0x{PH1}"},"ui/legacy/components/source_frame/SourceFrame.ts | dCharactersSelected":{"message":"{PH1} characters selected"},"ui/legacy/components/source_frame/SourceFrame.ts | dLinesDCharactersSelected":{"message":"{PH1} lines, {PH2} characters selected"},"ui/legacy/components/source_frame/SourceFrame.ts | dSelectionRegions":{"message":"{PH1} selection regions"},"ui/legacy/components/source_frame/SourceFrame.ts | lineSColumnS":{"message":"Line {PH1}, Column {PH2}"},"ui/legacy/components/source_frame/SourceFrame.ts | loading":{"message":"Loading…"},"ui/legacy/components/source_frame/SourceFrame.ts | prettyPrint":{"message":"Pretty print"},"ui/legacy/components/source_frame/SourceFrame.ts | source":{"message":"Source"},"ui/legacy/components/source_frame/XMLView.ts | find":{"message":"Find"},"ui/legacy/components/utils/ImagePreview.ts | currentSource":{"message":"Current source:"},"ui/legacy/components/utils/ImagePreview.ts | fileSize":{"message":"File size:"},"ui/legacy/components/utils/ImagePreview.ts | imageFromS":{"message":"Image from {PH1}"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicAspectRatio":{"message":"Intrinsic aspect ratio:"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicSize":{"message":"Intrinsic size:"},"ui/legacy/components/utils/ImagePreview.ts | renderedAspectRatio":{"message":"Rendered aspect ratio:"},"ui/legacy/components/utils/ImagePreview.ts | renderedSize":{"message":"Rendered size:"},"ui/legacy/components/utils/ImagePreview.ts | unknownSource":{"message":"unknown source"},"ui/legacy/components/utils/JSPresentationUtils.ts | addToIgnore":{"message":"Add script to ignore list"},"ui/legacy/components/utils/JSPresentationUtils.ts | removeFromIgnore":{"message":"Remove from ignore list"},"ui/legacy/components/utils/JSPresentationUtils.ts | showLess":{"message":"Show less"},"ui/legacy/components/utils/JSPresentationUtils.ts | showSMoreFrames":{"message":"{n, plural, =1 {Show # more frame} other {Show # more frames}}"},"ui/legacy/components/utils/JSPresentationUtils.ts | unknownSource":{"message":"unknown"},"ui/legacy/components/utils/Linkifier.ts | auto":{"message":"auto"},"ui/legacy/components/utils/Linkifier.ts | linkHandling":{"message":"Link handling:"},"ui/legacy/components/utils/Linkifier.ts | openUsingS":{"message":"Open using {PH1}"},"ui/legacy/components/utils/Linkifier.ts | reveal":{"message":"Reveal"},"ui/legacy/components/utils/Linkifier.ts | revealInS":{"message":"Reveal in {PH1}"},"ui/legacy/components/utils/Linkifier.ts | unknown":{"message":"(unknown)"},"ui/legacy/components/utils/TargetDetachedDialog.ts | websocketDisconnected":{"message":"WebSocket disconnected"},"ui/legacy/DockController.ts | close":{"message":"Close"},"ui/legacy/DockController.ts | devToolsDockedTo":{"message":"DevTools is docked to {PH1}"},"ui/legacy/DockController.ts | devtoolsUndocked":{"message":"DevTools is undocked"},"ui/legacy/DockController.ts | dockToBottom":{"message":"Dock to bottom"},"ui/legacy/DockController.ts | dockToLeft":{"message":"Dock to left"},"ui/legacy/DockController.ts | dockToRight":{"message":"Dock to right"},"ui/legacy/DockController.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"ui/legacy/EmptyWidget.ts | learnMore":{"message":"Learn more"},"ui/legacy/FilterBar.ts | allStrings":{"message":"All"},"ui/legacy/FilterBar.ts | clearFilter":{"message":"Clear input"},"ui/legacy/FilterBar.ts | egSmalldUrlacomb":{"message":"e.g. /small[d]+/ url:a.com/b"},"ui/legacy/FilterBar.ts | filter":{"message":"Filter"},"ui/legacy/FilterBar.ts | sclickToSelectMultipleTypes":{"message":"{PH1}Click to select multiple types"},"ui/legacy/Infobar.ts | close":{"message":"Close"},"ui/legacy/Infobar.ts | dontShowAgain":{"message":"Don't show again"},"ui/legacy/Infobar.ts | learnMore":{"message":"Learn more"},"ui/legacy/InspectorView.ts | closeDrawer":{"message":"Close drawer"},"ui/legacy/InspectorView.ts | devToolsLanguageMissmatch":{"message":"DevTools is now available in {PH1}!"},"ui/legacy/InspectorView.ts | drawer":{"message":"Tool drawer"},"ui/legacy/InspectorView.ts | drawerHidden":{"message":"Drawer hidden"},"ui/legacy/InspectorView.ts | drawerShown":{"message":"Drawer shown"},"ui/legacy/InspectorView.ts | mainToolbar":{"message":"Main toolbar"},"ui/legacy/InspectorView.ts | moreTools":{"message":"More Tools"},"ui/legacy/InspectorView.ts | moveToBottom":{"message":"Move to bottom"},"ui/legacy/InspectorView.ts | moveToTop":{"message":"Move to top"},"ui/legacy/InspectorView.ts | panels":{"message":"Panels"},"ui/legacy/InspectorView.ts | reloadDevtools":{"message":"Reload DevTools"},"ui/legacy/InspectorView.ts | selectFolder":{"message":"Select folder"},"ui/legacy/InspectorView.ts | selectOverrideFolder":{"message":"Select a folder to store override files in."},"ui/legacy/InspectorView.ts | setToBrowserLanguage":{"message":"Always match Chrome's language"},"ui/legacy/InspectorView.ts | setToSpecificLanguage":{"message":"Switch DevTools to {PH1}"},"ui/legacy/ListWidget.ts | addString":{"message":"Add"},"ui/legacy/ListWidget.ts | cancelString":{"message":"Cancel"},"ui/legacy/ListWidget.ts | editString":{"message":"Edit"},"ui/legacy/ListWidget.ts | removeString":{"message":"Remove"},"ui/legacy/ListWidget.ts | saveString":{"message":"Save"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | debuggingConnectionWasClosed":{"message":"Debugging connection was closed. Reason: "},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectDevtools":{"message":"Reconnect DevTools"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectWhenReadyByReopening":{"message":"Reconnect when ready by reopening DevTools."},"ui/legacy/SearchableView.ts | cancel":{"message":"Cancel"},"ui/legacy/SearchableView.ts | dMatches":{"message":"{PH1} matches"},"ui/legacy/SearchableView.ts | dOfD":{"message":"{PH1} of {PH2}"},"ui/legacy/SearchableView.ts | findString":{"message":"Find"},"ui/legacy/SearchableView.ts | matchCase":{"message":"Match Case"},"ui/legacy/SearchableView.ts | matchString":{"message":"1 match"},"ui/legacy/SearchableView.ts | replace":{"message":"Replace"},"ui/legacy/SearchableView.ts | replaceAll":{"message":"Replace all"},"ui/legacy/SearchableView.ts | searchNext":{"message":"Search next"},"ui/legacy/SearchableView.ts | searchPrevious":{"message":"Search previous"},"ui/legacy/SearchableView.ts | useRegularExpression":{"message":"Use Regular Expression"},"ui/legacy/SettingsUI.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"ui/legacy/SettingsUI.ts | srequiresReload":{"message":"*Requires reload"},"ui/legacy/SoftContextMenu.ts | checked":{"message":"checked"},"ui/legacy/SoftContextMenu.ts | sS":{"message":"{PH1}, {PH2}"},"ui/legacy/SoftContextMenu.ts | sSS":{"message":"{PH1}, {PH2}, {PH3}"},"ui/legacy/SoftContextMenu.ts | unchecked":{"message":"unchecked"},"ui/legacy/SoftDropDown.ts | noItemSelected":{"message":"(no item selected)"},"ui/legacy/SuggestBox.ts | sSuggestionSOfS":{"message":"{PH1}, suggestion {PH2} of {PH3}"},"ui/legacy/SuggestBox.ts | sSuggestionSSelected":{"message":"{PH1}, suggestion selected"},"ui/legacy/TabbedPane.ts | close":{"message":"Close"},"ui/legacy/TabbedPane.ts | closeAll":{"message":"Close all"},"ui/legacy/TabbedPane.ts | closeOthers":{"message":"Close others"},"ui/legacy/TabbedPane.ts | closeS":{"message":"Close {PH1}"},"ui/legacy/TabbedPane.ts | closeTabsToTheRight":{"message":"Close tabs to the right"},"ui/legacy/TabbedPane.ts | moreTabs":{"message":"More tabs"},"ui/legacy/TabbedPane.ts | previewFeature":{"message":"Preview feature"},"ui/legacy/TargetCrashedScreen.ts | devtoolsWasDisconnectedFromThe":{"message":"DevTools was disconnected from the page."},"ui/legacy/TargetCrashedScreen.ts | oncePageIsReloadedDevtoolsWill":{"message":"Once page is reloaded, DevTools will automatically reconnect."},"ui/legacy/Toolbar.ts | clearInput":{"message":"Clear input"},"ui/legacy/Toolbar.ts | notPressed":{"message":"not pressed"},"ui/legacy/Toolbar.ts | pressed":{"message":"pressed"},"ui/legacy/UIUtils.ts | anonymous":{"message":"(anonymous)"},"ui/legacy/UIUtils.ts | anotherProfilerIsAlreadyActive":{"message":"Another profiler is already active"},"ui/legacy/UIUtils.ts | asyncCall":{"message":"Async Call"},"ui/legacy/UIUtils.ts | cancel":{"message":"Cancel"},"ui/legacy/UIUtils.ts | close":{"message":"Close"},"ui/legacy/UIUtils.ts | copyFileName":{"message":"Copy file name"},"ui/legacy/UIUtils.ts | copyLinkAddress":{"message":"Copy link address"},"ui/legacy/UIUtils.ts | ok":{"message":"OK"},"ui/legacy/UIUtils.ts | openInNewTab":{"message":"Open in new tab"},"ui/legacy/UIUtils.ts | promiseRejectedAsync":{"message":"Promise rejected (async)"},"ui/legacy/UIUtils.ts | promiseResolvedAsync":{"message":"Promise resolved (async)"},"ui/legacy/UIUtils.ts | sAsync":{"message":"{PH1} (async)"},"ui/legacy/ViewManager.ts | sPanel":{"message":"{PH1} panel"},"ui/legacy/ViewRegistration.ts | drawer":{"message":"Drawer"},"ui/legacy/ViewRegistration.ts | drawer_sidebar":{"message":"Drawer sidebar"},"ui/legacy/ViewRegistration.ts | elements":{"message":"Elements"},"ui/legacy/ViewRegistration.ts | network":{"message":"Network"},"ui/legacy/ViewRegistration.ts | panel":{"message":"Panel"},"ui/legacy/ViewRegistration.ts | settings":{"message":"Settings"},"ui/legacy/ViewRegistration.ts | sources":{"message":"Sources"}} \ No newline at end of file diff --git a/packages/debugger-frontend/dist/third-party/front_end/device_mode_emulation_frame.html b/packages/debugger-frontend/dist/third-party/front_end/device_mode_emulation_frame.html index d596abe3bf0e..b601a1db893f 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/device_mode_emulation_frame.html +++ b/packages/debugger-frontend/dist/third-party/front_end/device_mode_emulation_frame.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + diff --git a/packages/debugger-frontend/dist/third-party/front_end/devtools_app.html b/packages/debugger-frontend/dist/third-party/front_end/devtools_app.html index f23e08cf3955..d7ba2348c558 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/devtools_app.html +++ b/packages/debugger-frontend/dist/third-party/front_end/devtools_app.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + diff --git a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/js_app/js_app.js b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/js_app/js_app.js index 1184c3ffd60a..3dbc4de78c67 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/js_app/js_app.js +++ b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/js_app/js_app.js @@ -1 +1 @@ -import"../shell/shell.js";import*as t from"../../core/common/common.js";import*as e from"../../core/i18n/i18n.js";import*as i from"../../ui/legacy/legacy.js";import*as n from"../../core/root/root.js";import*as o from"../../core/host/host.js";import*as r from"../../core/sdk/sdk.js";import*as a from"../../ui/legacy/components/utils/utils.js";import*as l from"../main/main.js";const s={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},c=e.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",s),g=e.i18n.getLazilyComputedLocalizedString.bind(void 0,c);let m;async function d(){return m||(m=await import("../../panels/mobile_throttling/mobile_throttling.js")),m}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:g(s.throttling),commandPrompt:g(s.showThrottling),order:35,loadView:async()=>(await d()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.goOffline),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.enableSlowGThrottling),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.enableFastGThrottling),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.goOnline),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:t.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},w=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),f=e.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let h,A;async function T(){return A||(A=await import("../../panels/profiler/profiler.js")),A}async function y(){return h||(h=await import("../../panels/timeline/timeline.js")),h}function P(t){return void 0===h?[]:t(h)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:f(p.profiler),commandPrompt:f(p.showProfiler),order:65,persistence:"closeable",experiment:n.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance()}),i.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:f(p.performance),commandPrompt:f(p.showPerformance),order:66,hasToolbar:!1,isPreviewFeature:!0,loadView:async()=>(await y()).TimelinePanel.TimelinePanel.instance({forceNew:null,isNode:!0})}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:f(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===A?[]:(t=>[t.ProfilesPanel.JSProfilerPanel])(A),loadActionDelegate:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:f(p.showRecentTimelineSessions),contextTypes:()=>P((t=>[t.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>P((t=>[t.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:f(p.record)},{value:!1,title:f(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>P((t=>[t.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:f(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const u={main:"Main"},R=e.i18n.registerUIStrings("entrypoints/js_app/js_app.ts",u),S=e.i18n.getLocalizedString.bind(void 0,R);let E;class C{static instance(t={forceNew:null}){const{forceNew:e}=t;return E&&!e||(E=new C),E}async run(){o.userMetrics.actionTaken(o.UserMetrics.Action.ConnectToNodeJSDirectly),r.Connections.initMainConnection((async()=>{r.TargetManager.TargetManager.instance().createTarget("main",S(u.main),r.Target.Type.Node,null).runtimeAgent().invoke_runIfWaitingForDebugger()}),a.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}t.Runnable.registerEarlyInitializationRunnable(C.instance),new l.MainImpl.MainImpl;export{C as JsMainImpl}; +import"../shell/shell.js";import*as t from"../../core/common/common.js";import*as e from"../../core/i18n/i18n.js";import*as i from"../../ui/legacy/legacy.js";import*as n from"../../core/root/root.js";import*as o from"../../core/host/host.js";import*as r from"../../core/sdk/sdk.js";import*as a from"../../ui/legacy/components/utils/utils.js";import*as s from"../main/main.js";const l={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},c=e.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",l),g=e.i18n.getLazilyComputedLocalizedString.bind(void 0,c);let d;async function m(){return d||(d=await import("../../panels/mobile_throttling/mobile_throttling.js")),d}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:g(l.throttling),commandPrompt:g(l.showThrottling),order:35,loadView:async()=>(await m()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.goOffline),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.enableSlowGThrottling),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.enableFastGThrottling),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.goOnline),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:t.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},f=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),h=e.i18n.getLazilyComputedLocalizedString.bind(void 0,f);let w,A;async function T(){return A||(A=await import("../../panels/profiler/profiler.js")),A}async function y(){return w||(w=await import("../../panels/timeline/timeline.js")),w}function R(t){return void 0===w?[]:t(w)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:h(p.profiler),commandPrompt:h(p.showProfiler),order:65,persistence:"permanent",experiment:n.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:h(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===A?[]:(t=>[t.ProfilesPanel.JSProfilerPanel])(A),loadActionDelegate:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:h(p.showRecentTimelineSessions),contextTypes:()=>R((t=>[t.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>R((t=>[t.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:h(p.record)},{value:!1,title:h(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>R((t=>[t.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:h(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const u={main:"Main"},P=e.i18n.registerUIStrings("entrypoints/js_app/js_app.ts",u),S=e.i18n.getLocalizedString.bind(void 0,P);let E;class C{static instance(t={forceNew:null}){const{forceNew:e}=t;return E&&!e||(E=new C),E}async run(){o.userMetrics.actionTaken(o.UserMetrics.Action.ConnectToNodeJSDirectly),r.Connections.initMainConnection((async()=>{r.TargetManager.TargetManager.instance().createTarget("main",S(u.main),r.Target.Type.Node,null).runtimeAgent().invoke_runIfWaitingForDebugger()}),a.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}t.Runnable.registerEarlyInitializationRunnable(C.instance),new s.MainImpl.MainImpl;export{C as JsMainImpl}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/main/main.js b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/main/main.js index f3217f8ae94f..f2ee82b8723b 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/main/main.js +++ b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/main/main.js @@ -1 +1 @@ -import*as e from"../../core/sdk/sdk.js";import*as t from"../../core/common/common.js";import*as n from"../../core/host/host.js";import*as o from"../../core/i18n/i18n.js";import*as r from"../../core/platform/platform.js";import*as s from"../../core/protocol_client/protocol_client.js";import*as i from"../../core/root/root.js";import*as a from"../../models/bindings/bindings.js";import*as l from"../../models/breakpoints/breakpoints.js";import*as c from"../../models/extensions/extensions.js";import*as d from"../../models/issues_manager/issues_manager.js";import*as m from"../../models/logs/logs.js";import*as g from"../../models/persistence/persistence.js";import*as p from"../../models/workspace/workspace.js";import*as u from"../../panels/snippets/snippets.js";import*as h from"../../panels/timeline/timeline.js";import*as f from"../../ui/components/icon_button/icon_button.js";import*as w from"../../ui/legacy/components/perf_ui/perf_ui.js";import*as S from"../../ui/legacy/components/utils/utils.js";import*as x from"../../ui/legacy/legacy.js";import*as v from"../../ui/legacy/theme_support/theme_support.js";class E{#e;#t;#n;#o;constructor(t,n){n.addFlavorChangeListener(e.RuntimeModel.ExecutionContext,this.#r,this),n.addFlavorChangeListener(e.Target.Target,this.#s,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextCreated,this.#i,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextDestroyed,this.#a,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextOrderChanged,this.#l,this),this.#e=t,this.#t=n,t.observeModels(e.RuntimeModel.RuntimeModel,this)}modelAdded(t){queueMicrotask(function(){this.#t.flavor(e.Target.Target)||this.#t.setFlavor(e.Target.Target,t.target())}.bind(this))}modelRemoved(t){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);n&&n.runtimeModel===t&&this.#c();const o=this.#e.models(e.RuntimeModel.RuntimeModel);this.#t.flavor(e.Target.Target)===t.target()&&o.length&&this.#t.setFlavor(e.Target.Target,o[0].target())}#r({data:t}){t&&(this.#t.setFlavor(e.Target.Target,t.target()),this.#o||(this.#n=this.#d(t)))}#d(e){return e.isDefault?e.target().name()+":"+e.frameId:""}#s({data:t}){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);if(!t||n&&n.target()===t)return;const o=t.model(e.RuntimeModel.RuntimeModel),r=o?o.executionContexts():[];if(!r.length)return;let s=null;for(let e=0;e{this.#f=e})),this.#w()}static time(e){n.InspectorFrontendHost.isUnderTest()||console.time(e)}static timeEnd(e){n.InspectorFrontendHost.isUnderTest()||console.timeEnd(e)}async#w(){console.timeStamp("Main._loaded"),i.Runtime.Runtime.setPlatform(n.Platform.platform());const e=await new Promise((e=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreferences(e)}));console.timeStamp("Main._gotPreferences"),this.#S(),this.createSettings(e),await this.requestAndRegisterLocaleData(),n.userMetrics.syncSetting(t.Settings.Settings.instance().moduleSetting("sync_preferences").get()),this.#x()}#S(){self.Common=self.Common||{},self.UI=self.UI||{},self.UI.panels=self.UI.panels||{},self.SDK=self.SDK||{},self.Bindings=self.Bindings||{},self.Persistence=self.Persistence||{},self.Workspace=self.Workspace||{},self.Extensions=self.Extensions||{},self.Host=self.Host||{},self.Host.userMetrics=self.Host.userMetrics||n.userMetrics,self.Host.UserMetrics=self.Host.UserMetrics||n.UserMetrics,self.ProtocolClient=self.ProtocolClient||{},self.ProtocolClient.test=self.ProtocolClient.test||s.InspectorBackend.test}async requestAndRegisterLocaleData(){const e=t.Settings.Settings.instance().moduleSetting("language").get(),r=o.DevToolsLocale.DevToolsLocale.instance({create:!0,data:{navigatorLanguage:navigator.language,settingLanguage:e,lookupClosestDevToolsLocale:o.i18n.lookupClosestSupportedDevToolsLocale}});n.userMetrics.language(r.locale),"en-US"!==r.locale&&await o.i18n.fetchAndRegisterLocaleData("en-US");try{await o.i18n.fetchAndRegisterLocaleData(r.locale)}catch(e){console.warn(`Unable to fetch & register locale data for '${r.locale}', falling back to 'en-US'. Cause: `,e),r.forceFallbackLocale()}}createSettings(e){this.#v();let o,r="";if(n.Platform.isCustomDevtoolsFrontend()?r="__custom__":i.Runtime.Runtime.queryParam("can_dock")||!Boolean(i.Runtime.Runtime.queryParam("debugFrontend"))||n.InspectorFrontendHost.isUnderTest()||(r="__bundled__"),!n.InspectorFrontendHost.isUnderTest()&&window.localStorage){const e={...t.Settings.NOOP_STORAGE,clear:()=>window.localStorage.clear()};o=new t.Settings.SettingsStorage(window.localStorage,e,r)}else o=new t.Settings.SettingsStorage({},t.Settings.NOOP_STORAGE,r);const s={register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!1}),set:n.InspectorFrontendHost.InspectorFrontendHostInstance.setPreference,get:e=>new Promise((t=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreference(e,t)})),remove:n.InspectorFrontendHost.InspectorFrontendHostInstance.removePreference,clear:n.InspectorFrontendHost.InspectorFrontendHostInstance.clearPreferences},a={...s,register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!0})},l=new t.Settings.SettingsStorage(e,a,r),c=new t.Settings.SettingsStorage(e,s,r);t.Settings.Settings.instance({forceNew:!0,syncedStorage:l,globalStorage:c,localStorage:o}),self.Common.settings=t.Settings.Settings.instance(),n.InspectorFrontendHost.isUnderTest()||(new t.Settings.VersionController).updateVersion()}#v(){i.Runtime.experiments.register("applyCustomStylesheet","Allow extensions to load custom stylesheets"),i.Runtime.experiments.register("captureNodeCreationStacks","Capture node creation stacks"),i.Runtime.experiments.register("sourcesPrettyPrint","Automatically pretty print minified sources"),i.Runtime.experiments.register("ignoreListJSFramesOnTimeline","Ignore List for JavaScript frames on Timeline",!0),i.Runtime.experiments.register("liveHeapProfile","Live heap profile",!0),i.Runtime.experiments.register("protocolMonitor","Protocol Monitor",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#protocol-monitor"),i.Runtime.experiments.register("developerResourcesView","Show developer resources view"),i.Runtime.experiments.register("cspViolationsView","Show CSP Violations view",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#csp"),i.Runtime.experiments.register("samplingHeapProfilerTimeline","Sampling heap profiler timeline",!0),i.Runtime.experiments.register("showOptionToExposeInternalsInHeapSnapshot","Show option to expose internals in heap snapshots"),i.Runtime.experiments.register("sourceOrderViewer","Source order viewer",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#source-order"),i.Runtime.experiments.register("webauthnPane","WebAuthn Pane"),i.Runtime.experiments.register("keyboardShortcutEditor","Enable keyboard shortcut editor",!1,"https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts"),i.Runtime.experiments.register("bfcacheDisplayTree","Show back/forward cache blocking reasons in the frame tree structure view"),i.Runtime.experiments.register("timelineEventInitiators","Timeline: event initiators"),i.Runtime.experiments.register("timelineInvalidationTracking","Timeline: invalidation tracking",!0),i.Runtime.experiments.register("timelineShowAllEvents","Timeline: show all events",!0),i.Runtime.experiments.register("timelineV8RuntimeCallStats","Timeline: V8 Runtime Call Stats on Timeline",!0),i.Runtime.experiments.register("timelineAsConsoleProfileResultPanel","View console.profile() results in the Performance panel for Node.js",!0),i.Runtime.experiments.register("jsProfilerTemporarilyEnable","Enable JavaScript Profiler temporarily",!1,"https://developer.chrome.com/blog/js-profiler-deprecation/","https://bugs.chromium.org/p/chromium/issues/detail?id=1354548"),i.Runtime.experiments.register("wasmDWARFDebugging","WebAssembly Debugging: Enable DWARF support",void 0,"https://developer.chrome.com/blog/wasm-debugging-2020/"),i.Runtime.experiments.register("evaluateExpressionsWithSourceMaps","Resolve variable names in expressions using source maps",void 0),i.Runtime.experiments.register("instrumentationBreakpoints","Enable instrumentation breakpoints",!0),i.Runtime.experiments.register("setAllBreakpointsEagerly","Set all breakpoints eagerly at startup",!0),i.Runtime.experiments.register("dualScreenSupport","Emulation: Support dual screen mode",void 0,"https://developer.chrome.com/blog/new-in-devtools-89#dual-screen"),i.Runtime.experiments.setEnabled("dualScreenSupport",!0),i.Runtime.experiments.register("APCA","Enable new Advanced Perceptual Contrast Algorithm (APCA) replacing previous contrast ratio and AA/AAA guidelines",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#apca"),i.Runtime.experiments.register("fullAccessibilityTree","Enable full accessibility tree view in the Elements panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#accesibility-tree","https://g.co/devtools/a11y-tree-feedback"),i.Runtime.experiments.register("fontEditor","Enable new Font Editor tool within the Styles Pane.",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#font"),i.Runtime.experiments.register("contrastIssues","Enable automatic contrast issue reporting via the Issues panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#low-contrast"),i.Runtime.experiments.register("experimentalCookieFeatures","Enable experimental cookie features"),i.Runtime.experiments.register("cssTypeComponentLength","Enable CSS authoring tool in the Styles pane",void 0,"https://developer.chrome.com/blog/new-in-devtools-96/#length","https://g.co/devtools/length-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRECISE_CHANGES,"Display more precise changes in the Changes tab"),i.Runtime.experiments.register(i.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES,"Sync CSS changes in the Styles pane"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,"Highlights a violating node or attribute in the Elements panel DOM tree"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HEADER_OVERRIDES,"Local overrides for response headers"),i.Runtime.experiments.register(i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER,"Enable color picking outside the browser window"),i.Runtime.experiments.register(i.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,"Group sources into Authored and Deployed trees",void 0,"https://goo.gle/authored-deployed","https://goo.gle/authored-deployed-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.JUST_MY_CODE,"Hide ignore-listed code in sources tree view"),i.Runtime.experiments.register(i.Runtime.ExperimentName.IMPORTANT_DOM_PROPERTIES,"Highlight important DOM properties in the Object Properties viewer"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRELOADING_STATUS_PANEL,"Enable Preloading Status Panel in Application panel",!0),i.Runtime.experiments.register(i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,"Disable the deprecated `Color format` setting (requires reloading DevTools)",!1),i.Runtime.experiments.register(i.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR,"Enable background page selector (e.g. for prerendering debugging)",!1),i.Runtime.experiments.enableExperimentsByDefault(["sourceOrderViewer","cssTypeComponentLength",i.Runtime.ExperimentName.PRECISE_CHANGES,..."EyeDropper"in window?[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]:[],"keyboardShortcutEditor","sourcesPrettyPrint",i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,i.Runtime.ExperimentName.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL,i.Runtime.ExperimentName.WASM_DWARF_DEBUGGING,i.Runtime.ExperimentName.HEADER_OVERRIDES]),i.Runtime.experiments.setNonConfigurableExperiments([..."EyeDropper"in window?[]:[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]]),i.Runtime.experiments.cleanUpStaleExperiments();const e=i.Runtime.Runtime.queryParam("enabledExperiments");if(e&&i.Runtime.experiments.setServerEnabledExperiments(e.split(";")),i.Runtime.experiments.enableExperimentsTransiently(["bfcacheDisplayTree","webauthnPane","developerResourcesView"]),n.InspectorFrontendHost.isUnderTest()){const e=i.Runtime.Runtime.queryParam("test");e&&e.includes("live-line-level-heap-profile.js")&&i.Runtime.experiments.enableForTest("liveHeapProfile")}for(const e of i.Runtime.experiments.enabledExperiments())n.userMetrics.experimentEnabledAtLaunch(e.name)}async#x(){R.time("Main._createAppUI"),self.UI.viewManager=x.ViewManager.ViewManager.instance(),self.Persistence.isolatedFileSystemManager=g.IsolatedFileSystemManager.IsolatedFileSystemManager.instance();const o=t.Settings.Settings.instance().createSetting("uiTheme","systemPreferred");x.UIUtils.initializeUIUtils(document),v.ThemeSupport.hasInstance()||v.ThemeSupport.instance({forceNew:!0,setting:o}),v.ThemeSupport.instance().applyTheme(document);const r=()=>{v.ThemeSupport.instance().applyTheme(document)},s=window.matchMedia("(prefers-color-scheme: dark)"),h=window.matchMedia("(forced-colors: active)");s.addEventListener("change",r),h.addEventListener("change",r),o.addChangeListener(r),x.UIUtils.installComponentRootStyles(document.body),this.#E(document);const f=Boolean(i.Runtime.Runtime.queryParam("can_dock"));self.UI.zoomManager=x.ZoomManager.ZoomManager.instance({forceNew:!0,win:window,frontendHost:n.InspectorFrontendHost.InspectorFrontendHostInstance}),self.UI.inspectorView=x.InspectorView.InspectorView.instance(),x.ContextMenu.ContextMenu.initialize(),x.ContextMenu.ContextMenu.installHandler(document),m.NetworkLog.NetworkLog.instance(),e.FrameManager.FrameManager.instance(),m.LogManager.LogManager.instance(),d.IssuesManager.IssuesManager.instance({forceNew:!0,ensureFirst:!0,showThirdPartyIssuesSetting:d.Issue.getShowThirdPartyIssuesSetting(),hideIssueSetting:d.IssuesManager.getHideIssueByCodeSetting()}),d.ContrastCheckTrigger.ContrastCheckTrigger.instance(),self.UI.dockController=x.DockController.DockController.instance({forceNew:!0,canDock:f}),self.SDK.multitargetNetworkManager=e.NetworkManager.MultitargetNetworkManager.instance({forceNew:!0}),self.SDK.domDebuggerManager=e.DOMDebuggerModel.DOMDebuggerManager.instance({forceNew:!0}),e.TargetManager.TargetManager.instance().addEventListener(e.TargetManager.Events.SuspendStateChanged,this.#I.bind(this)),self.Workspace.fileManager=p.FileManager.FileManager.instance({forceNew:!0}),self.Workspace.workspace=p.Workspace.WorkspaceImpl.instance(),self.Bindings.networkProjectManager=a.NetworkProject.NetworkProjectManager.instance();const w=new a.ResourceMapping.ResourceMapping(e.TargetManager.TargetManager.instance(),p.Workspace.WorkspaceImpl.instance());self.Bindings.resourceMapping=w,new a.PresentationConsoleMessageHelper.PresentationConsoleMessageManager,self.Bindings.cssWorkspaceBinding=a.CSSWorkspaceBinding.CSSWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),self.Bindings.debuggerWorkspaceBinding=a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),e.TargetManager.TargetManager.instance().setScopeTarget(e.TargetManager.TargetManager.instance().primaryPageTarget()),x.Context.Context.instance().addFlavorChangeListener(e.Target.Target,(({data:t})=>{const n=t?.outermostTarget();e.TargetManager.TargetManager.instance().setScopeTarget(n)})),self.Bindings.breakpointManager=l.BreakpointManager.BreakpointManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),targetManager:e.TargetManager.TargetManager.instance(),debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),self.Extensions.extensionServer=c.ExtensionServer.ExtensionServer.instance({forceNew:!0}),new g.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding(g.IsolatedFileSystemManager.IsolatedFileSystemManager.instance(),p.Workspace.WorkspaceImpl.instance()),g.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addPlatformFileSystem("snippet://",new u.ScriptSnippetFileSystem.SnippetFileSystem),self.Persistence.persistence=g.Persistence.PersistenceImpl.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),breakpointManager:l.BreakpointManager.BreakpointManager.instance()}),self.Persistence.networkPersistenceManager=g.NetworkPersistenceManager.NetworkPersistenceManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance()}),self.Host.Platform=n.Platform,new E(e.TargetManager.TargetManager.instance(),x.Context.Context.instance()),self.Bindings.ignoreListManager=a.IgnoreListManager.IgnoreListManager.instance({forceNew:!0,debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),new _;const S=x.ActionRegistry.ActionRegistry.instance({forceNew:!0});self.UI.actionRegistry=S,self.UI.shortcutRegistry=x.ShortcutRegistry.ShortcutRegistry.instance({forceNew:!0,actionRegistry:S}),this.#b(),R.timeEnd("Main._createAppUI");const I=t.AppProvider.getRegisteredAppProviders()[0];if(!I)throw new Error("Unable to boot DevTools, as the appprovider is missing");await this.#M(await I.loadAppProvider())}async#M(e){R.time("Main._showAppUI");const t=e.createApp();x.DockController.DockController.instance().initialize(),t.presentUI(document);const o=x.ActionRegistry.ActionRegistry.instance().action("elements.toggle-element-search");o&&n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.EnterInspectElementMode,(()=>{o.execute()}),this),n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.RevealSourceLine,this.#T,this),await x.InspectorView.InspectorView.instance().createToolbars(),n.InspectorFrontendHost.InspectorFrontendHostInstance.loadCompleted();const r=i.Runtime.Runtime.queryParam("loadTimelineFromURL");null!==r&&h.TimelinePanel.LoadTimelineHandler.instance().handleQueryParam(r),x.ARIAUtils.alertElementInstance(),x.DockController.DockController.instance().announceDockLocation(),window.setTimeout(this.#R.bind(this),0),R.timeEnd("Main._showAppUI")}async#R(){R.time("Main._initializeTarget");for(const e of t.Runnable.earlyInitializationRunnables())await e().run();n.InspectorFrontendHost.InspectorFrontendHostInstance.readyForTest(),this.#f(),window.setTimeout(this.#C.bind(this),100),R.timeEnd("Main._initializeTarget")}#C(){R.time("Main._lateInitialization"),c.ExtensionServer.ExtensionServer.instance().initializeExtensions();const e=t.Runnable.lateInitializationRunnables().map((async e=>(await e()).run()));if(i.Runtime.experiments.isEnabled("liveHeapProfile")){const n="memoryLiveHeapProfile";if(t.Settings.Settings.instance().moduleSetting(n).get())e.push(w.LiveHeapProfile.LiveHeapProfile.instance().run());else{const e=async o=>{o.data&&(t.Settings.Settings.instance().moduleSetting(n).removeChangeListener(e),w.LiveHeapProfile.LiveHeapProfile.instance().run())};t.Settings.Settings.instance().moduleSetting(n).addChangeListener(e)}}this.#u=Promise.all(e).then((()=>{})),R.timeEnd("Main._lateInitialization")}lateInitDonePromiseForTest(){return this.#u}readyForTest(){return this.#h}#b(){t.Console.Console.instance().addEventListener(t.Console.Events.MessageAdded,(function({data:e}){e.show&&t.Console.Console.instance().show()}))}#T(e){const{url:n,lineNumber:o,columnNumber:r}=e.data,s=p.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(n);s?t.Revealer.reveal(s.uiLocation(o,r)):p.Workspace.WorkspaceImpl.instance().addEventListener(p.Workspace.Events.UISourceCodeAdded,(function e(s){const i=s.data;i.url()===n&&(t.Revealer.reveal(i.uiLocation(o,r)),p.Workspace.WorkspaceImpl.instance().removeEventListener(p.Workspace.Events.UISourceCodeAdded,e))}))}#k(e){e.handled||x.ShortcutRegistry.ShortcutRegistry.instance().handleShortcut(e)}#D(e){const t=new CustomEvent("clipboard-"+e.type,{bubbles:!0});t.original=e;const n=e.target&&e.target.ownerDocument,o=n?r.DOMUtilities.deepActiveElement(n):null;o&&o.dispatchEvent(t),t.handled&&e.preventDefault()}#P(e){(e.handled||e.target.classList.contains("popup-glasspane"))&&e.preventDefault()}#E(e){e.addEventListener("keydown",this.#k.bind(this),!1),e.addEventListener("beforecopy",this.#D.bind(this),!0),e.addEventListener("copy",this.#D.bind(this),!1),e.addEventListener("cut",this.#D.bind(this),!1),e.addEventListener("paste",this.#D.bind(this),!1),e.addEventListener("contextmenu",this.#P.bind(this),!0)}#I(){const t=e.TargetManager.TargetManager.instance().allTargetsSuspended();x.InspectorView.InspectorView.instance().onSuspendStateChanged(t)}static instanceForTest=null}let C,k,D,P,y;globalThis.Main=globalThis.Main||{},globalThis.Main.Main=R;class L{static instance(e={forceNew:null}){const{forceNew:t}=e;return C&&!t||(C=new L),C}handleAction(e,t){if(n.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode())return!1;switch(t){case"main.zoom-in":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomIn(),!0;case"main.zoom-out":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomOut(),!0;case"main.zoom-reset":return n.InspectorFrontendHost.InspectorFrontendHostInstance.resetZoom(),!0}return!1}}class F{static instance(e={forceNew:null}){const{forceNew:t}=e;return k&&!t||(k=new F),k}handleAction(e,t){let n=x.SearchableView.SearchableView.fromElement(r.DOMUtilities.deepActiveElement(document));if(!n){const e=x.InspectorView.InspectorView.instance().currentPanelDeprecated();if(e&&e.searchableView&&(n=e.searchableView()),!n)return!1}switch(t){case"main.search-in-panel.find":return n.handleFindShortcut();case"main.search-in-panel.cancel":return n.handleCancelSearchShortcut();case"main.search-in-panel.find-next":return n.handleFindNextShortcut();case"main.search-in-panel.find-previous":return n.handleFindPreviousShortcut()}return!1}}class A{#y;constructor(){this.#y=new x.Toolbar.ToolbarMenuButton(this.#L.bind(this),!0),this.#y.element.classList.add("main-menu"),this.#y.setTitle(T(b.customizeAndControlDevtools))}static instance(e={forceNew:null}){const{forceNew:t}=e;return D&&!t||(D=new A),D}item(){return this.#y}#L(t){if(x.DockController.DockController.instance().canDock()){const e=document.createElement("div");e.classList.add("flex-centered"),e.classList.add("flex-auto"),e.classList.add("location-menu"),e.tabIndex=-1,x.ARIAUtils.setLabel(e,b.dockSide+b.dockSideNaviation);const n=e.createChild("span","dockside-title");n.textContent=T(b.dockSide);const o=x.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction("main.toggle-dock");x.Tooltip.Tooltip.install(n,T(b.placementOfDevtoolsRelativeToThe,{PH1:o[0].title()})),e.appendChild(n);const i=new x.Toolbar.Toolbar("",e);i.makeBlueOnHover();const a=new x.Toolbar.ToolbarToggle(T(b.undockIntoSeparateWindow),"dock-window"),l=new x.Toolbar.ToolbarToggle(T(b.dockToBottom),"dock-bottom"),c=new x.Toolbar.ToolbarToggle(T(b.dockToRight),"dock-right"),d=new x.Toolbar.ToolbarToggle(T(b.dockToLeft),"dock-left");a.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),l.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),c.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),d.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),a.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"undocked")),l.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"bottom")),c.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"right")),d.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"left")),a.setToggled("undocked"===x.DockController.DockController.instance().dockSide()),l.setToggled("bottom"===x.DockController.DockController.instance().dockSide()),c.setToggled("right"===x.DockController.DockController.instance().dockSide()),d.setToggled("left"===x.DockController.DockController.instance().dockSide()),i.appendToolbarItem(a),i.appendToolbarItem(d),i.appendToolbarItem(l),i.appendToolbarItem(c),e.addEventListener("keydown",(t=>{let n=0;if("ArrowLeft"===t.key)n=-1;else{if("ArrowRight"!==t.key){if("ArrowDown"===t.key){return void e.closest(".soft-context-menu")?.dispatchEvent(new KeyboardEvent("keydown",{key:"ArrowDown"}))}return}n=1}const o=[a,d,l,c];let s=o.findIndex((e=>e.element.hasFocus()));s=r.NumberUtilities.clamp(s+n,0,o.length-1),o[s].element.focus(),t.consume(!0)})),t.headerSection().appendCustomItem(e)}const o=this.#y.element;function s(e){x.DockController.DockController.instance().once("AfterDockSideChanged").then((()=>{o.focus()})),x.DockController.DockController.instance().setDockSide(e),t.discard()}if("undocked"===x.DockController.DockController.instance().dockSide()){const n=e.TargetManager.TargetManager.instance().primaryPageTarget();n&&n.type()===e.Target.Type.Frame&&t.defaultSection().appendAction("inspector_main.focus-debuggee",T(b.focusDebuggee))}t.defaultSection().appendAction("main.toggle-drawer",x.InspectorView.InspectorView.instance().drawerVisible()?T(b.hideConsoleDrawer):T(b.showConsoleDrawer)),t.appendItemsAtLocation("mainMenu");const i=t.defaultSection().appendSubMenuItem(T(b.moreTools)),a=x.ViewManager.getRegisteredViewExtensions();a.sort(((e,t)=>{const n=e.title(),o=t.title();return n.localeCompare(o)}));for(const e of a){const t=e.location(),o=e.persistence(),r=e.title(),s=e.viewId();if("issues-pane"!==s){if("closeable"===o&&("drawer-view"===t||"panel"===t))if(e.isPreviewFeature()){const e=new f.Icon.Icon;e.data={iconName:"experiment",color:"var(--icon-default)",width:"16px",height:"16px"},i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}),!1,e)}else i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}))}else i.defaultSection().appendItem(r,(()=>{n.userMetrics.issuesPanelOpenedFrom(n.UserMetrics.IssueOpener.HamburgerMenu),x.ViewManager.ViewManager.instance().showView("issues-pane",!0)}))}t.footerSection().appendSubMenuItem(T(b.help)).appendItemsAtLocation("mainMenuHelp")}}class N{#F;constructor(){this.#F=x.Toolbar.Toolbar.createActionButtonForId("settings.show",{showLabel:!1,userActionCode:void 0})}static instance(e={forceNew:null}){const{forceNew:t}=e;return P&&!t||(P=new N),P}item(){return this.#F}}class _{constructor(){e.TargetManager.TargetManager.instance().addModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this)}#A(n){e.TargetManager.TargetManager.instance().removeModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this);const o=n.data,r=o.debuggerPausedDetails();x.Context.Context.instance().setFlavor(e.Target.Target,o.target()),t.Revealer.reveal(r)}}class H{static instance(e={forceNew:null}){const{forceNew:t}=e;return y&&!t||(y=new H),y}handleAction(e,t){return"main.debug-reload"===t&&(S.Reload.reload(),!0)}}var O=Object.freeze({__proto__:null,MainImpl:R,ZoomActionDelegate:L,SearchActionDelegate:F,MainMenuItem:A,SettingsButtonProvider:N,PauseListener:_,sendOverProtocol:function(e,t){return new Promise(((n,o)=>{const r=s.InspectorBackend.test.sendRawMessage;if(!r)return o("Unable to send message to test client");r(e,t,((e,...t)=>e?o(e):n(t)))}))},ReloadActionDelegate:H});class U{presentUI(e){const t=new x.RootView.RootView;x.InspectorView.InspectorView.instance().show(t.element),t.attachToDocument(e),t.focus()}}let B;class V{static instance(e={forceNew:null}){const{forceNew:t}=e;return B&&!t||(B=new V),B}createApp(){return new U}}var W=Object.freeze({__proto__:null,SimpleApp:U,SimpleAppProvider:V});export{I as ExecutionContextSelector,O as MainImpl,W as SimpleApp}; +import*as e from"../../core/sdk/sdk.js";import*as t from"../../core/common/common.js";import*as n from"../../core/host/host.js";import*as o from"../../core/i18n/i18n.js";import*as r from"../../core/platform/platform.js";import*as s from"../../core/protocol_client/protocol_client.js";import*as i from"../../core/root/root.js";import*as a from"../../models/bindings/bindings.js";import*as l from"../../models/breakpoints/breakpoints.js";import*as c from"../../models/extensions/extensions.js";import*as d from"../../models/issues_manager/issues_manager.js";import*as g from"../../models/logs/logs.js";import*as m from"../../models/persistence/persistence.js";import*as p from"../../models/workspace/workspace.js";import*as u from"../../panels/snippets/snippets.js";import*as h from"../../panels/timeline/timeline.js";import*as f from"../../ui/components/icon_button/icon_button.js";import*as w from"../../ui/legacy/components/perf_ui/perf_ui.js";import*as S from"../../ui/legacy/components/utils/utils.js";import*as x from"../../ui/legacy/legacy.js";import*as v from"../../ui/legacy/theme_support/theme_support.js";class E{#e;#t;#n;#o;constructor(t,n){n.addFlavorChangeListener(e.RuntimeModel.ExecutionContext,this.#r,this),n.addFlavorChangeListener(e.Target.Target,this.#s,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextCreated,this.#i,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextDestroyed,this.#a,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextOrderChanged,this.#l,this),this.#e=t,this.#t=n,t.observeModels(e.RuntimeModel.RuntimeModel,this)}modelAdded(t){queueMicrotask(function(){this.#t.flavor(e.Target.Target)||this.#t.setFlavor(e.Target.Target,t.target())}.bind(this))}modelRemoved(t){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);n&&n.runtimeModel===t&&this.#c();const o=this.#e.models(e.RuntimeModel.RuntimeModel);this.#t.flavor(e.Target.Target)===t.target()&&o.length&&this.#t.setFlavor(e.Target.Target,o[0].target())}#r({data:t}){t&&(this.#t.setFlavor(e.Target.Target,t.target()),this.#o||(this.#n=this.#d(t)))}#d(e){return e.isDefault?e.target().name()+":"+e.frameId:""}#s({data:t}){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);if(!t||n&&n.target()===t)return;const o=t.model(e.RuntimeModel.RuntimeModel),r=o?o.executionContexts():[];if(!r.length)return;let s=null;for(let e=0;e{this.#f=e})),this.#w()}static time(e){n.InspectorFrontendHost.isUnderTest()||console.time(e)}static timeEnd(e){n.InspectorFrontendHost.isUnderTest()||console.timeEnd(e)}async#w(){console.timeStamp("Main._loaded"),i.Runtime.Runtime.setPlatform(n.Platform.platform());const e=await new Promise((e=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreferences(e)}));console.timeStamp("Main._gotPreferences"),this.#S(),this.createSettings(e),await this.requestAndRegisterLocaleData(),n.userMetrics.syncSetting(t.Settings.Settings.instance().moduleSetting("sync_preferences").get()),this.#x()}#S(){self.Common=self.Common||{},self.UI=self.UI||{},self.UI.panels=self.UI.panels||{},self.SDK=self.SDK||{},self.Bindings=self.Bindings||{},self.Persistence=self.Persistence||{},self.Workspace=self.Workspace||{},self.Extensions=self.Extensions||{},self.Host=self.Host||{},self.Host.userMetrics=self.Host.userMetrics||n.userMetrics,self.Host.UserMetrics=self.Host.UserMetrics||n.UserMetrics,self.ProtocolClient=self.ProtocolClient||{},self.ProtocolClient.test=self.ProtocolClient.test||s.InspectorBackend.test}async requestAndRegisterLocaleData(){const e=t.Settings.Settings.instance().moduleSetting("language").get(),r=o.DevToolsLocale.DevToolsLocale.instance({create:!0,data:{navigatorLanguage:navigator.language,settingLanguage:e,lookupClosestDevToolsLocale:o.i18n.lookupClosestSupportedDevToolsLocale}});n.userMetrics.language(r.locale),"en-US"!==r.locale&&await o.i18n.fetchAndRegisterLocaleData("en-US");try{await o.i18n.fetchAndRegisterLocaleData(r.locale)}catch(e){console.warn(`Unable to fetch & register locale data for '${r.locale}', falling back to 'en-US'. Cause: `,e),r.forceFallbackLocale()}}createSettings(e){this.#v();let o,r="";if(n.Platform.isCustomDevtoolsFrontend()?r="__custom__":i.Runtime.Runtime.queryParam("can_dock")||!Boolean(i.Runtime.Runtime.queryParam("debugFrontend"))||n.InspectorFrontendHost.isUnderTest()||(r="__bundled__"),!n.InspectorFrontendHost.isUnderTest()&&window.localStorage){const e={...t.Settings.NOOP_STORAGE,clear:()=>window.localStorage.clear()};o=new t.Settings.SettingsStorage(window.localStorage,e,r)}else o=new t.Settings.SettingsStorage({},t.Settings.NOOP_STORAGE,r);const s={register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!1}),set:n.InspectorFrontendHost.InspectorFrontendHostInstance.setPreference,get:e=>new Promise((t=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreference(e,t)})),remove:n.InspectorFrontendHost.InspectorFrontendHostInstance.removePreference,clear:n.InspectorFrontendHost.InspectorFrontendHostInstance.clearPreferences},a={...s,register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!0})},l=new t.Settings.SettingsStorage(e,a,r),c=new t.Settings.SettingsStorage(e,s,r);t.Settings.Settings.instance({forceNew:!0,syncedStorage:l,globalStorage:c,localStorage:o}),self.Common.settings=t.Settings.Settings.instance(),n.InspectorFrontendHost.isUnderTest()||(new t.Settings.VersionController).updateVersion()}#v(){i.Runtime.experiments.register("applyCustomStylesheet","Allow extensions to load custom stylesheets"),i.Runtime.experiments.register("captureNodeCreationStacks","Capture node creation stacks"),i.Runtime.experiments.register("sourcesPrettyPrint","Automatically pretty print minified sources"),i.Runtime.experiments.register("ignoreListJSFramesOnTimeline","Ignore List for JavaScript frames on Timeline",!0),i.Runtime.experiments.register("liveHeapProfile","Live heap profile",!0),i.Runtime.experiments.register("protocolMonitor","Protocol Monitor",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#protocol-monitor"),i.Runtime.experiments.register("developerResourcesView","Show developer resources view"),i.Runtime.experiments.register("cspViolationsView","Show CSP Violations view",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#csp"),i.Runtime.experiments.register("samplingHeapProfilerTimeline","Sampling heap profiler timeline",!0),i.Runtime.experiments.register("showOptionToExposeInternalsInHeapSnapshot","Show option to expose internals in heap snapshots"),i.Runtime.experiments.register("sourceOrderViewer","Source order viewer",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#source-order"),i.Runtime.experiments.register("webauthnPane","WebAuthn Pane"),i.Runtime.experiments.register("keyboardShortcutEditor","Enable keyboard shortcut editor",!1,"https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts"),i.Runtime.experiments.register("bfcacheDisplayTree","Show back/forward cache blocking reasons in the frame tree structure view"),i.Runtime.experiments.register("timelineEventInitiators","Timeline: event initiators"),i.Runtime.experiments.register("timelineInvalidationTracking","Timeline: invalidation tracking",!0),i.Runtime.experiments.register("timelineShowAllEvents","Timeline: show all events",!0),i.Runtime.experiments.register("timelineV8RuntimeCallStats","Timeline: V8 Runtime Call Stats on Timeline",!0),i.Runtime.experiments.register("timelineAsConsoleProfileResultPanel","View console.profile() results in the Performance panel for Node.js",!0),i.Runtime.experiments.register("wasmDWARFDebugging","WebAssembly Debugging: Enable DWARF support",void 0,"https://developer.chrome.com/blog/wasm-debugging-2020/"),i.Runtime.experiments.register("evaluateExpressionsWithSourceMaps","Resolve variable names in expressions using source maps",void 0),i.Runtime.experiments.register("instrumentationBreakpoints","Enable instrumentation breakpoints",!0),i.Runtime.experiments.register("setAllBreakpointsEagerly","Set all breakpoints eagerly at startup",!0),i.Runtime.experiments.register("dualScreenSupport","Emulation: Support dual screen mode",void 0,"https://developer.chrome.com/blog/new-in-devtools-89#dual-screen"),i.Runtime.experiments.setEnabled("dualScreenSupport",!0),i.Runtime.experiments.register("APCA","Enable new Advanced Perceptual Contrast Algorithm (APCA) replacing previous contrast ratio and AA/AAA guidelines",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#apca"),i.Runtime.experiments.register("fullAccessibilityTree","Enable full accessibility tree view in the Elements panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#accesibility-tree","https://g.co/devtools/a11y-tree-feedback"),i.Runtime.experiments.register("fontEditor","Enable new Font Editor tool within the Styles Pane.",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#font"),i.Runtime.experiments.register("contrastIssues","Enable automatic contrast issue reporting via the Issues panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#low-contrast"),i.Runtime.experiments.register("experimentalCookieFeatures","Enable experimental cookie features"),i.Runtime.experiments.register("cssTypeComponentLength","Enable CSS authoring tool in the Styles pane",void 0,"https://developer.chrome.com/blog/new-in-devtools-96/#length","https://g.co/devtools/length-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRECISE_CHANGES,"Display more precise changes in the Changes tab"),i.Runtime.experiments.register(i.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES,"Sync CSS changes in the Styles pane"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,"Highlights a violating node or attribute in the Elements panel DOM tree"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HEADER_OVERRIDES,"Local overrides for response headers"),i.Runtime.experiments.register(i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER,"Enable color picking outside the browser window"),i.Runtime.experiments.register(i.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,"Group sources into Authored and Deployed trees",void 0,"https://goo.gle/authored-deployed","https://goo.gle/authored-deployed-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.JUST_MY_CODE,"Hide ignore-listed code in sources tree view"),i.Runtime.experiments.register(i.Runtime.ExperimentName.IMPORTANT_DOM_PROPERTIES,"Highlight important DOM properties in the Object Properties viewer"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRELOADING_STATUS_PANEL,"Enable Preloading Status Panel in Application panel",!0),i.Runtime.experiments.register(i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,"Disable the deprecated `Color format` setting (requires reloading DevTools)",!1),i.Runtime.experiments.register(i.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR,"Enable background page selector (e.g. for prerendering debugging)",!1),i.Runtime.experiments.enableExperimentsByDefault(["sourceOrderViewer","cssTypeComponentLength",i.Runtime.ExperimentName.PRECISE_CHANGES,..."EyeDropper"in window?[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]:[],"keyboardShortcutEditor","sourcesPrettyPrint",i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,i.Runtime.ExperimentName.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL,i.Runtime.ExperimentName.WASM_DWARF_DEBUGGING,i.Runtime.ExperimentName.HEADER_OVERRIDES]),i.Runtime.experiments.setNonConfigurableExperiments([..."EyeDropper"in window?[]:[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]]),i.Runtime.experiments.cleanUpStaleExperiments();const e=i.Runtime.Runtime.queryParam("enabledExperiments");if(e&&i.Runtime.experiments.setServerEnabledExperiments(e.split(";")),i.Runtime.experiments.enableExperimentsTransiently(["bfcacheDisplayTree","webauthnPane","developerResourcesView"]),n.InspectorFrontendHost.isUnderTest()){const e=i.Runtime.Runtime.queryParam("test");e&&e.includes("live-line-level-heap-profile.js")&&i.Runtime.experiments.enableForTest("liveHeapProfile")}for(const e of i.Runtime.experiments.enabledExperiments())n.userMetrics.experimentEnabledAtLaunch(e.name)}async#x(){R.time("Main._createAppUI"),self.UI.viewManager=x.ViewManager.ViewManager.instance(),self.Persistence.isolatedFileSystemManager=m.IsolatedFileSystemManager.IsolatedFileSystemManager.instance();const o=t.Settings.Settings.instance().createSetting("uiTheme","systemPreferred");x.UIUtils.initializeUIUtils(document),v.ThemeSupport.hasInstance()||v.ThemeSupport.instance({forceNew:!0,setting:o}),v.ThemeSupport.instance().applyTheme(document);const r=()=>{v.ThemeSupport.instance().applyTheme(document)},s=window.matchMedia("(prefers-color-scheme: dark)"),h=window.matchMedia("(forced-colors: active)");s.addEventListener("change",r),h.addEventListener("change",r),o.addChangeListener(r),x.UIUtils.installComponentRootStyles(document.body),this.#E(document);const f=Boolean(i.Runtime.Runtime.queryParam("can_dock"));self.UI.zoomManager=x.ZoomManager.ZoomManager.instance({forceNew:!0,win:window,frontendHost:n.InspectorFrontendHost.InspectorFrontendHostInstance}),self.UI.inspectorView=x.InspectorView.InspectorView.instance(),x.ContextMenu.ContextMenu.initialize(),x.ContextMenu.ContextMenu.installHandler(document),g.NetworkLog.NetworkLog.instance(),e.FrameManager.FrameManager.instance(),g.LogManager.LogManager.instance(),d.IssuesManager.IssuesManager.instance({forceNew:!0,ensureFirst:!0,showThirdPartyIssuesSetting:d.Issue.getShowThirdPartyIssuesSetting(),hideIssueSetting:d.IssuesManager.getHideIssueByCodeSetting()}),d.ContrastCheckTrigger.ContrastCheckTrigger.instance(),self.UI.dockController=x.DockController.DockController.instance({forceNew:!0,canDock:f}),self.SDK.multitargetNetworkManager=e.NetworkManager.MultitargetNetworkManager.instance({forceNew:!0}),self.SDK.domDebuggerManager=e.DOMDebuggerModel.DOMDebuggerManager.instance({forceNew:!0}),e.TargetManager.TargetManager.instance().addEventListener(e.TargetManager.Events.SuspendStateChanged,this.#I.bind(this)),self.Workspace.fileManager=p.FileManager.FileManager.instance({forceNew:!0}),self.Workspace.workspace=p.Workspace.WorkspaceImpl.instance(),self.Bindings.networkProjectManager=a.NetworkProject.NetworkProjectManager.instance();const w=new a.ResourceMapping.ResourceMapping(e.TargetManager.TargetManager.instance(),p.Workspace.WorkspaceImpl.instance());self.Bindings.resourceMapping=w,new a.PresentationConsoleMessageHelper.PresentationConsoleMessageManager,self.Bindings.cssWorkspaceBinding=a.CSSWorkspaceBinding.CSSWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),self.Bindings.debuggerWorkspaceBinding=a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),e.TargetManager.TargetManager.instance().setScopeTarget(e.TargetManager.TargetManager.instance().primaryPageTarget()),x.Context.Context.instance().addFlavorChangeListener(e.Target.Target,(({data:t})=>{const n=t?.outermostTarget();e.TargetManager.TargetManager.instance().setScopeTarget(n)})),self.Bindings.breakpointManager=l.BreakpointManager.BreakpointManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),targetManager:e.TargetManager.TargetManager.instance(),debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),self.Extensions.extensionServer=c.ExtensionServer.ExtensionServer.instance({forceNew:!0}),new m.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding(m.IsolatedFileSystemManager.IsolatedFileSystemManager.instance(),p.Workspace.WorkspaceImpl.instance()),m.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addPlatformFileSystem("snippet://",new u.ScriptSnippetFileSystem.SnippetFileSystem),self.Persistence.persistence=m.Persistence.PersistenceImpl.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),breakpointManager:l.BreakpointManager.BreakpointManager.instance()}),self.Persistence.networkPersistenceManager=m.NetworkPersistenceManager.NetworkPersistenceManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance()}),self.Host.Platform=n.Platform,new E(e.TargetManager.TargetManager.instance(),x.Context.Context.instance()),self.Bindings.ignoreListManager=a.IgnoreListManager.IgnoreListManager.instance({forceNew:!0,debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),new _;const S=x.ActionRegistry.ActionRegistry.instance({forceNew:!0});self.UI.actionRegistry=S,self.UI.shortcutRegistry=x.ShortcutRegistry.ShortcutRegistry.instance({forceNew:!0,actionRegistry:S}),this.#M(),R.timeEnd("Main._createAppUI");const I=t.AppProvider.getRegisteredAppProviders()[0];if(!I)throw new Error("Unable to boot DevTools, as the appprovider is missing");await this.#T(await I.loadAppProvider())}async#T(e){R.time("Main._showAppUI");const t=e.createApp();x.DockController.DockController.instance().initialize(),t.presentUI(document);const o=x.ActionRegistry.ActionRegistry.instance().action("elements.toggle-element-search");o&&n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.EnterInspectElementMode,(()=>{o.execute()}),this),n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.RevealSourceLine,this.#b,this),await x.InspectorView.InspectorView.instance().createToolbars(),n.InspectorFrontendHost.InspectorFrontendHostInstance.loadCompleted();const r=i.Runtime.Runtime.queryParam("loadTimelineFromURL");null!==r&&h.TimelinePanel.LoadTimelineHandler.instance().handleQueryParam(r),x.ARIAUtils.alertElementInstance(),x.DockController.DockController.instance().announceDockLocation(),window.setTimeout(this.#R.bind(this),0),R.timeEnd("Main._showAppUI")}async#R(){R.time("Main._initializeTarget");for(const e of t.Runnable.earlyInitializationRunnables())await e().run();n.InspectorFrontendHost.InspectorFrontendHostInstance.readyForTest(),this.#f(),window.setTimeout(this.#C.bind(this),100),R.timeEnd("Main._initializeTarget")}#C(){R.time("Main._lateInitialization"),c.ExtensionServer.ExtensionServer.instance().initializeExtensions();const e=t.Runnable.lateInitializationRunnables().map((async e=>(await e()).run()));if(i.Runtime.experiments.isEnabled("liveHeapProfile")){const n="memoryLiveHeapProfile";if(t.Settings.Settings.instance().moduleSetting(n).get())e.push(w.LiveHeapProfile.LiveHeapProfile.instance().run());else{const e=async o=>{o.data&&(t.Settings.Settings.instance().moduleSetting(n).removeChangeListener(e),w.LiveHeapProfile.LiveHeapProfile.instance().run())};t.Settings.Settings.instance().moduleSetting(n).addChangeListener(e)}}this.#u=Promise.all(e).then((()=>{})),R.timeEnd("Main._lateInitialization")}lateInitDonePromiseForTest(){return this.#u}readyForTest(){return this.#h}#M(){t.Console.Console.instance().addEventListener(t.Console.Events.MessageAdded,(function({data:e}){e.show&&t.Console.Console.instance().show()}))}#b(e){const{url:n,lineNumber:o,columnNumber:r}=e.data,s=p.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(n);s?t.Revealer.reveal(s.uiLocation(o,r)):p.Workspace.WorkspaceImpl.instance().addEventListener(p.Workspace.Events.UISourceCodeAdded,(function e(s){const i=s.data;i.url()===n&&(t.Revealer.reveal(i.uiLocation(o,r)),p.Workspace.WorkspaceImpl.instance().removeEventListener(p.Workspace.Events.UISourceCodeAdded,e))}))}#k(e){e.handled||x.ShortcutRegistry.ShortcutRegistry.instance().handleShortcut(e)}#D(e){const t=new CustomEvent("clipboard-"+e.type,{bubbles:!0});t.original=e;const n=e.target&&e.target.ownerDocument,o=n?r.DOMUtilities.deepActiveElement(n):null;o&&o.dispatchEvent(t),t.handled&&e.preventDefault()}#P(e){(e.handled||e.target.classList.contains("popup-glasspane"))&&e.preventDefault()}#E(e){e.addEventListener("keydown",this.#k.bind(this),!1),e.addEventListener("beforecopy",this.#D.bind(this),!0),e.addEventListener("copy",this.#D.bind(this),!1),e.addEventListener("cut",this.#D.bind(this),!1),e.addEventListener("paste",this.#D.bind(this),!1),e.addEventListener("contextmenu",this.#P.bind(this),!0)}#I(){const t=e.TargetManager.TargetManager.instance().allTargetsSuspended();x.InspectorView.InspectorView.instance().onSuspendStateChanged(t)}static instanceForTest=null}let C,k,D,P,y;globalThis.Main=globalThis.Main||{},globalThis.Main.Main=R;class L{static instance(e={forceNew:null}){const{forceNew:t}=e;return C&&!t||(C=new L),C}handleAction(e,t){if(n.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode())return!1;switch(t){case"main.zoom-in":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomIn(),!0;case"main.zoom-out":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomOut(),!0;case"main.zoom-reset":return n.InspectorFrontendHost.InspectorFrontendHostInstance.resetZoom(),!0}return!1}}class F{static instance(e={forceNew:null}){const{forceNew:t}=e;return k&&!t||(k=new F),k}handleAction(e,t){let n=x.SearchableView.SearchableView.fromElement(r.DOMUtilities.deepActiveElement(document));if(!n){const e=x.InspectorView.InspectorView.instance().currentPanelDeprecated();if(e&&e.searchableView&&(n=e.searchableView()),!n)return!1}switch(t){case"main.search-in-panel.find":return n.handleFindShortcut();case"main.search-in-panel.cancel":return n.handleCancelSearchShortcut();case"main.search-in-panel.find-next":return n.handleFindNextShortcut();case"main.search-in-panel.find-previous":return n.handleFindPreviousShortcut()}return!1}}class A{#y;constructor(){this.#y=new x.Toolbar.ToolbarMenuButton(this.#L.bind(this),!0),this.#y.element.classList.add("main-menu"),this.#y.setTitle(b(M.customizeAndControlDevtools))}static instance(e={forceNew:null}){const{forceNew:t}=e;return D&&!t||(D=new A),D}item(){return this.#y}#L(t){if(x.DockController.DockController.instance().canDock()){const e=document.createElement("div");e.classList.add("flex-centered"),e.classList.add("flex-auto"),e.classList.add("location-menu"),e.tabIndex=-1,x.ARIAUtils.setLabel(e,M.dockSide+M.dockSideNaviation);const n=e.createChild("span","dockside-title");n.textContent=b(M.dockSide);const o=x.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction("main.toggle-dock");x.Tooltip.Tooltip.install(n,b(M.placementOfDevtoolsRelativeToThe,{PH1:o[0].title()})),e.appendChild(n);const i=new x.Toolbar.Toolbar("",e);i.makeBlueOnHover();const a=new x.Toolbar.ToolbarToggle(b(M.undockIntoSeparateWindow),"dock-window"),l=new x.Toolbar.ToolbarToggle(b(M.dockToBottom),"dock-bottom"),c=new x.Toolbar.ToolbarToggle(b(M.dockToRight),"dock-right"),d=new x.Toolbar.ToolbarToggle(b(M.dockToLeft),"dock-left");a.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),l.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),c.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),d.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),a.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"undocked")),l.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"bottom")),c.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"right")),d.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"left")),a.setToggled("undocked"===x.DockController.DockController.instance().dockSide()),l.setToggled("bottom"===x.DockController.DockController.instance().dockSide()),c.setToggled("right"===x.DockController.DockController.instance().dockSide()),d.setToggled("left"===x.DockController.DockController.instance().dockSide()),i.appendToolbarItem(a),i.appendToolbarItem(d),i.appendToolbarItem(l),i.appendToolbarItem(c),e.addEventListener("keydown",(t=>{let n=0;if("ArrowLeft"===t.key)n=-1;else{if("ArrowRight"!==t.key){if("ArrowDown"===t.key){return void e.closest(".soft-context-menu")?.dispatchEvent(new KeyboardEvent("keydown",{key:"ArrowDown"}))}return}n=1}const o=[a,d,l,c];let s=o.findIndex((e=>e.element.hasFocus()));s=r.NumberUtilities.clamp(s+n,0,o.length-1),o[s].element.focus(),t.consume(!0)})),t.headerSection().appendCustomItem(e)}const o=this.#y.element;function s(e){x.DockController.DockController.instance().once("AfterDockSideChanged").then((()=>{o.focus()})),x.DockController.DockController.instance().setDockSide(e),t.discard()}if("undocked"===x.DockController.DockController.instance().dockSide()){const n=e.TargetManager.TargetManager.instance().primaryPageTarget();n&&n.type()===e.Target.Type.Frame&&t.defaultSection().appendAction("inspector_main.focus-debuggee",b(M.focusDebuggee))}t.defaultSection().appendAction("main.toggle-drawer",x.InspectorView.InspectorView.instance().drawerVisible()?b(M.hideConsoleDrawer):b(M.showConsoleDrawer)),t.appendItemsAtLocation("mainMenu");const i=t.defaultSection().appendSubMenuItem(b(M.moreTools)),a=x.ViewManager.getRegisteredViewExtensions();a.sort(((e,t)=>{const n=e.title(),o=t.title();return n.localeCompare(o)}));for(const e of a){const t=e.location(),o=e.persistence(),r=e.title(),s=e.viewId();if("issues-pane"!==s){if("closeable"===o&&("drawer-view"===t||"panel"===t))if(e.isPreviewFeature()){const e=new f.Icon.Icon;e.data={iconName:"experiment",color:"var(--icon-default)",width:"16px",height:"16px"},i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}),!1,e)}else i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}))}else i.defaultSection().appendItem(r,(()=>{n.userMetrics.issuesPanelOpenedFrom(n.UserMetrics.IssueOpener.HamburgerMenu),x.ViewManager.ViewManager.instance().showView("issues-pane",!0)}))}t.footerSection().appendSubMenuItem(b(M.help)).appendItemsAtLocation("mainMenuHelp")}}class N{#F;constructor(){this.#F=x.Toolbar.Toolbar.createActionButtonForId("settings.show",{showLabel:!1,userActionCode:void 0})}static instance(e={forceNew:null}){const{forceNew:t}=e;return P&&!t||(P=new N),P}item(){return this.#F}}class _{constructor(){e.TargetManager.TargetManager.instance().addModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this)}#A(n){e.TargetManager.TargetManager.instance().removeModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this);const o=n.data,r=o.debuggerPausedDetails();x.Context.Context.instance().setFlavor(e.Target.Target,o.target()),t.Revealer.reveal(r)}}class H{static instance(e={forceNew:null}){const{forceNew:t}=e;return y&&!t||(y=new H),y}handleAction(e,t){return"main.debug-reload"===t&&(S.Reload.reload(),!0)}}var O=Object.freeze({__proto__:null,MainImpl:R,ZoomActionDelegate:L,SearchActionDelegate:F,MainMenuItem:A,SettingsButtonProvider:N,PauseListener:_,sendOverProtocol:function(e,t){return new Promise(((n,o)=>{const r=s.InspectorBackend.test.sendRawMessage;if(!r)return o("Unable to send message to test client");r(e,t,((e,...t)=>e?o(e):n(t)))}))},ReloadActionDelegate:H});class U{presentUI(e){const t=new x.RootView.RootView;x.InspectorView.InspectorView.instance().show(t.element),t.attachToDocument(e),t.focus()}}let B;class V{static instance(e={forceNew:null}){const{forceNew:t}=e;return B&&!t||(B=new V),B}createApp(){return new U}}var W=Object.freeze({__proto__:null,SimpleApp:U,SimpleAppProvider:V});export{I as ExecutionContextSelector,O as MainImpl,W as SimpleApp}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/node_app/node_app.js b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/node_app/node_app.js index e010aa3ec552..6e78a03e4ceb 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/node_app/node_app.js +++ b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/node_app/node_app.js @@ -1 +1 @@ -import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../ui/legacy/legacy.js";import*as o from"../../core/root/root.js";import*as i from"../main/main.js";import*as s from"../../core/host/host.js";import*as r from"../../ui/legacy/components/utils/utils.js";import*as a from"../../core/sdk/sdk.js";const c={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},l=t.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",c),d=t.i18n.getLazilyComputedLocalizedString.bind(void 0,l);let g;async function h(){return g||(g=await import("../../panels/mobile_throttling/mobile_throttling.js")),g}n.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:d(c.throttling),commandPrompt:d(c.showThrottling),order:35,loadView:async()=>(await h()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.goOffline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.enableSlowGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.enableFastGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.goOnline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},w=t.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),m=t.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let f,v;async function y(){return v||(v=await import("../../panels/profiler/profiler.js")),v}async function u(){return f||(f=await import("../../panels/timeline/timeline.js")),f}function C(e){return void 0===f?[]:e(f)}n.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:m(p.profiler),commandPrompt:m(p.showProfiler),order:65,persistence:"closeable",experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance()}),n.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:m(p.performance),commandPrompt:m(p.showPerformance),order:66,hasToolbar:!1,isPreviewFeature:!0,loadView:async()=>(await u()).TimelinePanel.TimelinePanel.instance({forceNew:null,isNode:!0})}),n.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:n.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:m(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===v?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(v),loadActionDelegate:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.showRecentTimelineSessions),contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:n.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:m(p.record)},{value:!1,title:m(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const T={main:"Main",nodejsS:"Node.js: {PH1}"},x=t.i18n.registerUIStrings("entrypoints/node_app/NodeMain.ts",T),k=t.i18n.getLocalizedString.bind(void 0,x);let A;class I{static instance(e={forceNew:null}){const{forceNew:t}=e;return A&&!t||(A=new I),A}async run(){s.userMetrics.actionTaken(s.UserMetrics.Action.ConnectToNodeJSFromFrontend),a.Connections.initMainConnection((async()=>{a.TargetManager.TargetManager.instance().createTarget("main",k(T.main),a.Target.Type.Browser,null).setInspectedURL("Node.js")}),r.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}class D extends a.SDKModel.SDKModel{#e;#t;#n;#o;#i;constructor(e){super(e),this.#e=e.targetManager(),this.#t=e,this.#n=e.targetAgent(),this.#o=new Map,this.#i=new Map,e.registerTargetDispatcher(this),this.#n.invoke_setDiscoverTargets({discover:!0}),s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0)}#s({data:e}){const t=[];for(const n of e.networkDiscoveryConfig){const e=n.split(":"),o=parseInt(e[1],10);e[0]&&o&&t.push({host:e[0],port:o})}this.#n.invoke_setRemoteLocations({locations:t})}dispose(){s.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this);for(const e of this.#o.keys())this.detachedFromTarget({sessionId:e})}targetCreated({targetInfo:e}){"node"!==e.type||e.attached||this.#n.invoke_attachToTarget({targetId:e.targetId,flatten:!1})}targetInfoChanged(e){}targetDestroyed(e){}attachedToTarget({sessionId:e,targetInfo:t}){const n=k(T.nodejsS,{PH1:t.url}),o=new S(this.#n,e);this.#i.set(e,o);const i=this.#e.createTarget(t.targetId,n,a.Target.Type.Node,this.#t,void 0,void 0,o);this.#o.set(e,i),i.runtimeAgent().invoke_runIfWaitingForDebugger()}detachedFromTarget({sessionId:e}){const t=this.#o.get(e);t&&t.dispose("target terminated"),this.#o.delete(e),this.#i.delete(e)}receivedMessageFromTarget({sessionId:e,message:t}){const n=this.#i.get(e),o=n?n.onMessage:null;o&&o.call(null,t)}targetCrashed(e){}}class S{#n;#r;onMessage;#a;constructor(e,t){this.#n=e,this.#r=t,this.onMessage=null,this.#a=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#a=e}sendRawMessage(e){this.#n.invoke_sendMessageToTarget({message:e,sessionId:this.#r})}async disconnect(){this.#a&&this.#a.call(null,"force disconnect"),this.#a=null,this.onMessage=null,await this.#n.invoke_detachFromTarget({sessionId:this.#r})}}a.SDKModel.SDKModel.register(D,{capabilities:a.Target.Capability.Target,autostart:!0});const E=new CSSStyleSheet;E.replaceSync(".add-network-target-button{margin:10px 25px;align-self:center}.network-discovery-list{flex:none;max-width:600px;max-height:202px;margin:20px 0 5px}.network-discovery-list-empty{flex:auto;height:30px;display:flex;align-items:center;justify-content:center}.network-discovery-list-item{padding:3px 5px;height:30px;display:flex;align-items:center;position:relative;flex:auto 1 1}.network-discovery-value{flex:3 1 0}.list-item .network-discovery-value{white-space:nowrap;text-overflow:ellipsis;user-select:none;color:var(--color-text-primary);overflow:hidden}.network-discovery-edit-row{flex:none;display:flex;flex-direction:row;margin:6px 5px;align-items:center}.network-discovery-edit-row input{width:100%;text-align:inherit}.network-discovery-footer{margin:0;overflow:hidden;max-width:500px;padding:3px}.network-discovery-footer > *{white-space:pre-wrap}.node-panel{align-items:center;justify-content:flex-start;overflow-y:auto}.network-discovery-view{min-width:400px;text-align:left}:host-context(.node-frontend) .network-discovery-list-empty{height:40px}:host-context(.node-frontend) .network-discovery-list-item{padding:3px 15px;height:40px}.node-panel-center{max-width:600px;padding-top:50px;text-align:center}.node-panel-logo{width:400px;margin-bottom:50px}:host-context(.node-frontend) .network-discovery-edit-row input{height:30px;padding-left:5px}:host-context(.node-frontend) .network-discovery-edit-row{margin:6px 9px}\n/*# sourceURL=nodeConnectionsPanel.css */\n");const P={nodejsDebuggingGuide:"Node.js debugging guide",specifyNetworkEndpointAnd:"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more.",noConnectionsSpecified:"No connections specified",addConnection:"Add connection",networkAddressEgLocalhost:"Network address (e.g. localhost:9229)"},R=t.i18n.registerUIStrings("entrypoints/node_app/NodeConnectionsPanel.ts",P),b=t.i18n.getLocalizedString.bind(void 0,R);let M;class N extends n.Panel.Panel{#c;#l;constructor(){super("node-connection"),this.contentElement.classList.add("node-panel");const e=this.contentElement.createChild("div","node-panel-center");e.createChild("img","node-panel-logo").src="https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),this.contentElement.tabIndex=0,this.setDefaultFocusedElement(this.contentElement),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0),this.#l=new F((e=>{this.#c.networkDiscoveryConfig=e,s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesDiscoveryConfig(this.#c)})),this.#l.show(e)}static instance(e={forceNew:null}){const{forceNew:t}=e;return M&&!t||(M=new N),M}#s({data:e}){this.#c=e,this.#l.discoveryConfigChanged(this.#c.networkDiscoveryConfig)}wasShown(){super.wasShown(),this.registerCSSFiles([E])}}class F extends n.Widget.VBox{#d;#g;#h;#p;constructor(e){super(),this.#d=e,this.element.classList.add("network-discovery-view");const o=this.element.createChild("div","network-discovery-footer"),i=n.XLink.XLink.create("https://nodejs.org/en/docs/inspector/",b(P.nodejsDebuggingGuide));o.appendChild(t.i18n.getFormatLocalizedString(R,P.specifyNetworkEndpointAnd,{PH1:i})),this.#g=new n.ListWidget.ListWidget(this),this.#g.element.classList.add("network-discovery-list");const s=document.createElement("div");s.classList.add("network-discovery-list-empty"),s.textContent=b(P.noConnectionsSpecified),this.#g.setEmptyPlaceholder(s),this.#g.show(this.element),this.#h=null;const r=n.UIUtils.createTextButton(b(P.addConnection),this.#w.bind(this),"add-network-target-button",!0);this.element.appendChild(r),this.#p=[],this.element.classList.add("node-frontend")}#m(){const e=this.#p.map((e=>e.address));this.#d.call(null,e)}#w(){this.#g.addNewItem(this.#p.length,{address:"",port:""})}discoveryConfigChanged(e){this.#p=[],this.#g.clear();for(const t of e){const e={address:t,port:""};this.#p.push(e),this.#g.appendItem(e,!0)}}renderItem(e,t){const n=document.createElement("div");return n.classList.add("network-discovery-list-item"),n.createChild("div","network-discovery-value network-discovery-address").textContent=e.address,n}removeItemRequested(e,t){this.#p.splice(t,1),this.#g.removeItem(t),this.#m()}commitEdit(e,t,n){e.address=t.control("address").value.trim(),n&&this.#p.push(e),this.#m()}beginEdit(e){const t=this.#f();return t.control("address").value=e.address,t}#f(){if(this.#h)return this.#h;const e=new n.ListWidget.Editor;this.#h=e;const t=e.contentElement().createChild("div","network-discovery-edit-row"),o=e.createInput("address","text",b(P.networkAddressEgLocalhost),(function(e,t,n){const o=n.value.trim().match(/^([a-zA-Z0-9\.\-_]+):(\d+)$/);if(!o)return{valid:!1,errorMessage:void 0};return{valid:parseInt(o[2],10)<=65535,errorMessage:void 0}}));return t.createChild("div","network-discovery-value network-discovery-address").appendChild(o),e}wasShown(){super.wasShown(),this.#g.registerCSSFiles([E])}}const L={connection:"Connection",node:"node",showConnection:"Show Connection",networkTitle:"Node",showNode:"Show Node"},j=t.i18n.registerUIStrings("entrypoints/node_app/node_app.ts",L),H=t.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let V;n.ViewManager.registerViewExtension({location:"panel",id:"node-connection",title:H(L.connection),commandPrompt:H(L.showConnection),order:0,loadView:async()=>N.instance(),tags:[H(L.node)]}),n.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:H(L.networkTitle),commandPrompt:H(L.showNode),order:2,persistence:"permanent",loadView:async()=>(await async function(){return V||(V=await import("../../panels/sources/sources.js")),V}()).SourcesNavigator.NetworkNavigatorView.instance()}),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),e.Runnable.registerEarlyInitializationRunnable(I.instance),new i.MainImpl.MainImpl; +import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../ui/legacy/legacy.js";import*as o from"../../core/root/root.js";import*as i from"../main/main.js";import*as s from"../../core/host/host.js";import*as r from"../../ui/legacy/components/utils/utils.js";import*as a from"../../core/sdk/sdk.js";const c={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},d=t.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",c),l=t.i18n.getLazilyComputedLocalizedString.bind(void 0,d);let g;async function h(){return g||(g=await import("../../panels/mobile_throttling/mobile_throttling.js")),g}n.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:l(c.throttling),commandPrompt:l(c.showThrottling),order:35,loadView:async()=>(await h()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.goOffline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.enableSlowGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.enableFastGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.goOnline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},w=t.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),m=t.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let f,v;async function y(){return v||(v=await import("../../panels/profiler/profiler.js")),v}async function u(){return f||(f=await import("../../panels/timeline/timeline.js")),f}function C(e){return void 0===f?[]:e(f)}n.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:m(p.profiler),commandPrompt:m(p.showProfiler),order:65,persistence:"permanent",experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance()}),n.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:n.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:m(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===v?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(v),loadActionDelegate:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.showRecentTimelineSessions),contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:n.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:m(p.record)},{value:!1,title:m(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const T={main:"Main",nodejsS:"Node.js: {PH1}"},k=t.i18n.registerUIStrings("entrypoints/node_app/NodeMain.ts",T),x=t.i18n.getLocalizedString.bind(void 0,k);let A;class I{static instance(e={forceNew:null}){const{forceNew:t}=e;return A&&!t||(A=new I),A}async run(){s.userMetrics.actionTaken(s.UserMetrics.Action.ConnectToNodeJSFromFrontend),a.Connections.initMainConnection((async()=>{a.TargetManager.TargetManager.instance().createTarget("main",x(T.main),a.Target.Type.Browser,null).setInspectedURL("Node.js")}),r.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}class D extends a.SDKModel.SDKModel{#e;#t;#n;#o;#i;constructor(e){super(e),this.#e=e.targetManager(),this.#t=e,this.#n=e.targetAgent(),this.#o=new Map,this.#i=new Map,e.registerTargetDispatcher(this),this.#n.invoke_setDiscoverTargets({discover:!0}),s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0)}#s({data:e}){const t=[];for(const n of e.networkDiscoveryConfig){const e=n.split(":"),o=parseInt(e[1],10);e[0]&&o&&t.push({host:e[0],port:o})}this.#n.invoke_setRemoteLocations({locations:t})}dispose(){s.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this);for(const e of this.#o.keys())this.detachedFromTarget({sessionId:e})}targetCreated({targetInfo:e}){"node"!==e.type||e.attached||this.#n.invoke_attachToTarget({targetId:e.targetId,flatten:!1})}targetInfoChanged(e){}targetDestroyed(e){}attachedToTarget({sessionId:e,targetInfo:t}){const n=x(T.nodejsS,{PH1:t.url}),o=new S(this.#n,e);this.#i.set(e,o);const i=this.#e.createTarget(t.targetId,n,a.Target.Type.Node,this.#t,void 0,void 0,o);this.#o.set(e,i),i.runtimeAgent().invoke_runIfWaitingForDebugger()}detachedFromTarget({sessionId:e}){const t=this.#o.get(e);t&&t.dispose("target terminated"),this.#o.delete(e),this.#i.delete(e)}receivedMessageFromTarget({sessionId:e,message:t}){const n=this.#i.get(e),o=n?n.onMessage:null;o&&o.call(null,t)}targetCrashed(e){}}class S{#n;#r;onMessage;#a;constructor(e,t){this.#n=e,this.#r=t,this.onMessage=null,this.#a=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#a=e}sendRawMessage(e){this.#n.invoke_sendMessageToTarget({message:e,sessionId:this.#r})}async disconnect(){this.#a&&this.#a.call(null,"force disconnect"),this.#a=null,this.onMessage=null,await this.#n.invoke_detachFromTarget({sessionId:this.#r})}}a.SDKModel.SDKModel.register(D,{capabilities:a.Target.Capability.Target,autostart:!0});const E=new CSSStyleSheet;E.replaceSync(".add-network-target-button{margin:10px 25px;align-self:center}.network-discovery-list{flex:none;max-width:600px;max-height:202px;margin:20px 0 5px}.network-discovery-list-empty{flex:auto;height:30px;display:flex;align-items:center;justify-content:center}.network-discovery-list-item{padding:3px 5px;height:30px;display:flex;align-items:center;position:relative;flex:auto 1 1}.network-discovery-value{flex:3 1 0}.list-item .network-discovery-value{white-space:nowrap;text-overflow:ellipsis;user-select:none;color:var(--color-text-primary);overflow:hidden}.network-discovery-edit-row{flex:none;display:flex;flex-direction:row;margin:6px 5px;align-items:center}.network-discovery-edit-row input{width:100%;text-align:inherit}.network-discovery-footer{margin:0;overflow:hidden;max-width:500px;padding:3px}.network-discovery-footer > *{white-space:pre-wrap}.node-panel{align-items:center;justify-content:flex-start;overflow-y:auto}.network-discovery-view{min-width:400px;text-align:left}:host-context(.node-frontend) .network-discovery-list-empty{height:40px}:host-context(.node-frontend) .network-discovery-list-item{padding:3px 15px;height:40px}.node-panel-center{max-width:600px;padding-top:50px;text-align:center}.node-panel-logo{width:400px;margin-bottom:50px}:host-context(.node-frontend) .network-discovery-edit-row input{height:30px;padding-left:5px}:host-context(.node-frontend) .network-discovery-edit-row{margin:6px 9px}\n/*# sourceURL=nodeConnectionsPanel.css */\n");const P={nodejsDebuggingGuide:"Node.js debugging guide",specifyNetworkEndpointAnd:"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more.",noConnectionsSpecified:"No connections specified",addConnection:"Add connection",networkAddressEgLocalhost:"Network address (e.g. localhost:9229)"},R=t.i18n.registerUIStrings("entrypoints/node_app/NodeConnectionsPanel.ts",P),b=t.i18n.getLocalizedString.bind(void 0,R);let M;class N extends n.Panel.Panel{#c;#d;constructor(){super("node-connection"),this.contentElement.classList.add("node-panel");const e=this.contentElement.createChild("div","node-panel-center");e.createChild("img","node-panel-logo").src="https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),this.contentElement.tabIndex=0,this.setDefaultFocusedElement(this.contentElement),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0),this.#d=new F((e=>{this.#c.networkDiscoveryConfig=e,s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesDiscoveryConfig(this.#c)})),this.#d.show(e)}static instance(e={forceNew:null}){const{forceNew:t}=e;return M&&!t||(M=new N),M}#s({data:e}){this.#c=e,this.#d.discoveryConfigChanged(this.#c.networkDiscoveryConfig)}wasShown(){super.wasShown(),this.registerCSSFiles([E])}}class F extends n.Widget.VBox{#l;#g;#h;#p;constructor(e){super(),this.#l=e,this.element.classList.add("network-discovery-view");const o=this.element.createChild("div","network-discovery-footer"),i=n.XLink.XLink.create("https://nodejs.org/en/docs/inspector/",b(P.nodejsDebuggingGuide));o.appendChild(t.i18n.getFormatLocalizedString(R,P.specifyNetworkEndpointAnd,{PH1:i})),this.#g=new n.ListWidget.ListWidget(this),this.#g.element.classList.add("network-discovery-list");const s=document.createElement("div");s.classList.add("network-discovery-list-empty"),s.textContent=b(P.noConnectionsSpecified),this.#g.setEmptyPlaceholder(s),this.#g.show(this.element),this.#h=null;const r=n.UIUtils.createTextButton(b(P.addConnection),this.#w.bind(this),"add-network-target-button",!0);this.element.appendChild(r),this.#p=[],this.element.classList.add("node-frontend")}#m(){const e=this.#p.map((e=>e.address));this.#l.call(null,e)}#w(){this.#g.addNewItem(this.#p.length,{address:"",port:""})}discoveryConfigChanged(e){this.#p=[],this.#g.clear();for(const t of e){const e={address:t,port:""};this.#p.push(e),this.#g.appendItem(e,!0)}}renderItem(e,t){const n=document.createElement("div");return n.classList.add("network-discovery-list-item"),n.createChild("div","network-discovery-value network-discovery-address").textContent=e.address,n}removeItemRequested(e,t){this.#p.splice(t,1),this.#g.removeItem(t),this.#m()}commitEdit(e,t,n){e.address=t.control("address").value.trim(),n&&this.#p.push(e),this.#m()}beginEdit(e){const t=this.#f();return t.control("address").value=e.address,t}#f(){if(this.#h)return this.#h;const e=new n.ListWidget.Editor;this.#h=e;const t=e.contentElement().createChild("div","network-discovery-edit-row"),o=e.createInput("address","text",b(P.networkAddressEgLocalhost),(function(e,t,n){const o=n.value.trim().match(/^([a-zA-Z0-9\.\-_]+):(\d+)$/);if(!o)return{valid:!1,errorMessage:void 0};return{valid:parseInt(o[2],10)<=65535,errorMessage:void 0}}));return t.createChild("div","network-discovery-value network-discovery-address").appendChild(o),e}wasShown(){super.wasShown(),this.#g.registerCSSFiles([E])}}const L={connection:"Connection",node:"node",showConnection:"Show Connection",networkTitle:"Node",showNode:"Show Node"},j=t.i18n.registerUIStrings("entrypoints/node_app/node_app.ts",L),H=t.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let _;n.ViewManager.registerViewExtension({location:"panel",id:"node-connection",title:H(L.connection),commandPrompt:H(L.showConnection),order:0,loadView:async()=>N.instance(),tags:[H(L.node)]}),n.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:H(L.networkTitle),commandPrompt:H(L.showNode),order:2,persistence:"permanent",loadView:async()=>(await async function(){return _||(_=await import("../../panels/sources/sources.js")),_}()).SourcesNavigator.NetworkNavigatorView.instance()}),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),e.Runnable.registerEarlyInitializationRunnable(I.instance),new i.MainImpl.MainImpl; diff --git a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js index 7628e054f809..85fc7c66c401 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js +++ b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js @@ -1 +1 @@ -import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";import*as o from"../../core/i18n/i18n.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../main/main.js";const r={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},s=o.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",r),l=o.i18n.getLazilyComputedLocalizedString.bind(void 0,s);let c;async function g(){return c||(c=await import("../../panels/emulation/emulation.js")),c}i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureFullSizeScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showMediaQueries)},{value:!1,title:l(r.hideMediaQueries)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showRulers)},{value:!1,title:l(r.hideRulers)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showDeviceFrame)},{value:!1,title:l(r.hideDeviceFrame)}],tags:[l(r.device)]}),i.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:t.Runtime.ConditionName.CAN_DOCK,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await g()).AdvancedApp.AdvancedAppProvider.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,order:0}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const d={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},m=o.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",d),u=o.i18n.getLazilyComputedLocalizedString.bind(void 0,m);let p;async function S(){return p||(p=await import("../../panels/sensors/sensors.js")),p}i.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:u(d.showSensors),title:u(d.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await S()).SensorsView.SensorsView.instance(),tags:[u(d.geolocation),u(d.timezones),u(d.locale),u(d.locales),u(d.accelerometer),u(d.deviceOrientation)]}),i.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:u(d.showLocations),title:u(d.locations),order:40,loadView:async()=>(await S()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:e.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),e.Settings.registerSettingExtension({title:u(d.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.devicebased),text:u(d.devicebased)},{value:"force",title:u(d.forceEnabled),text:u(d.forceEnabled)}]}),e.Settings.registerSettingExtension({title:u(d.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.noIdleEmulation),text:u(d.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:u(d.userActiveScreenUnlocked),text:u(d.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:u(d.userActiveScreenLocked),text:u(d.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:u(d.userIdleScreenUnlocked),text:u(d.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:u(d.userIdleScreenLocked),text:u(d.userIdleScreenLocked)}]});const A={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},w=o.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",A),y=o.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let h;i.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:y(A.developerResources),commandPrompt:y(A.showDeveloperResources),order:100,persistence:"closeable",experiment:t.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return h||(h=await import("../../panels/developer_resources/developer_resources.js")),h}()).DeveloperResourcesView.DeveloperResourcesView)});const R={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},E=o.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",R),T=o.i18n.getLazilyComputedLocalizedString.bind(void 0,E);let f;async function v(){return f||(f=await import("../inspector_main/inspector_main.js")),f}i.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:T(R.rendering),commandPrompt:T(R.showRendering),persistence:"closeable",order:50,loadView:async()=>(await v()).RenderingOptions.RenderingOptionsView.instance(),tags:[T(R.paint),T(R.layout),T(R.fps),T(R.cssMediaType),T(R.cssMediaFeature),T(R.visionDeficiency),T(R.colorVisionDeficiency)]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await v()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:T(R.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await v()).InspectorMain.ReloadActionDelegate.instance(),title:T(R.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),i.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:i.ActionRegistration.ActionCategory.RENDERING,title:T(R.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await v()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:T(R.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:T(R.blockAds)},{value:!1,title:T(R.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:T(R.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:T(R.autoOpenDevTools)},{value:!1,title:T(R.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:T(R.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await v()).InspectorMain.NodeIndicator.instance(),order:2,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await v()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:t.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const I={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},C=o.i18n.registerUIStrings("panels/issues/issues-meta.ts",I),P=o.i18n.getLazilyComputedLocalizedString.bind(void 0,C);let x;async function N(){return x||(x=await import("../../panels/issues/issues.js")),x}i.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:P(I.issues),commandPrompt:P(I.showIssues),order:100,persistence:"closeable",loadView:async()=>(await N()).IssuesPane.IssuesPane.instance()}),i.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:P(I.cspViolations),commandPrompt:P(I.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await N()).CSPViolationsView.CSPViolationsView.instance(),experiment:t.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),e.Revealer.registerRevealer({contextTypes:()=>[n.Issue.Issue],destination:e.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await N()).IssueRevealer.IssueRevealer.instance()});const D={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},M=o.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",D),b=o.i18n.getLazilyComputedLocalizedString.bind(void 0,M);let O;async function L(){return O||(O=await import("../../panels/mobile_throttling/mobile_throttling.js")),O}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:b(D.throttling),commandPrompt:b(D.showThrottling),order:35,loadView:async()=>(await L()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.goOffline),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.enableSlowGThrottling),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.enableFastGThrottling),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.goOnline),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const V={performance:"Performance",showPerformance:"Show Performance",javascriptProfiler:"JavaScript Profiler",showJavascriptProfiler:"Show JavaScript Profiler",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view",startStopRecording:"Start/stop recording"},_=o.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",V),k=o.i18n.getLazilyComputedLocalizedString.bind(void 0,_);let U,F;async function z(){return U||(U=await import("../../panels/timeline/timeline.js")),U}async function B(){return F||(F=await import("../../panels/profiler/profiler.js")),F}function j(e){return void 0===U?[]:e(U)}i.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:k(V.performance),commandPrompt:k(V.showPerformance),order:50,loadView:async()=>(await z()).TimelinePanel.TimelinePanel.instance()}),i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:k(V.javascriptProfiler),commandPrompt:k(V.showJavascriptProfiler),persistence:"closeable",order:65,experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await B()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:k(V.record)},{value:!1,title:k(V.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.startProfilingAndReloadPage),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.previousFrame),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.nextFrame),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.showRecentTimelineSessions),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.previousRecording),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.nextRecording),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:k(V.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===F?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(F),loadActionDelegate:async()=>(await B()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.PERFORMANCE,storageType:e.Settings.SettingStorageType.Synced,title:k(V.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>j((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await z()).CLSLinkifier.Linkifier.instance()}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const W={rnWelcome:"⚛️ Welcome",showRnWelcome:"Show React Native Welcome panel"},G=o.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",W),H=o.i18n.getLazilyComputedLocalizedString.bind(void 0,G);let K;i.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:H(W.rnWelcome),commandPrompt:H(W.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return K||(K=await import("../../panels/rn_welcome/rn_welcome.js")),K}()).RNWelcome.RNWelcomeImpl.instance(),experiment:t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI}),t.Runtime.experiments.register(t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,"Show React Native-specific UI",!1),t.Runtime.experiments.enableExperimentsByDefault([t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI]),self.runtime=t.Runtime.Runtime.instance({forceNew:!0}),new a.MainImpl.MainImpl; +import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";import*as o from"../../core/i18n/i18n.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../main/main.js";const r={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},s=o.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",r),l=o.i18n.getLazilyComputedLocalizedString.bind(void 0,s);let c;async function g(){return c||(c=await import("../../panels/emulation/emulation.js")),c}i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureFullSizeScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showMediaQueries)},{value:!1,title:l(r.hideMediaQueries)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showRulers)},{value:!1,title:l(r.hideRulers)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showDeviceFrame)},{value:!1,title:l(r.hideDeviceFrame)}],tags:[l(r.device)]}),i.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:t.Runtime.ConditionName.CAN_DOCK,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await g()).AdvancedApp.AdvancedAppProvider.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,order:0}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const d={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},m=o.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",d),u=o.i18n.getLazilyComputedLocalizedString.bind(void 0,m);let p;async function S(){return p||(p=await import("../../panels/sensors/sensors.js")),p}i.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:u(d.showSensors),title:u(d.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await S()).SensorsView.SensorsView.instance(),tags:[u(d.geolocation),u(d.timezones),u(d.locale),u(d.locales),u(d.accelerometer),u(d.deviceOrientation)]}),i.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:u(d.showLocations),title:u(d.locations),order:40,loadView:async()=>(await S()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:e.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),e.Settings.registerSettingExtension({title:u(d.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.devicebased),text:u(d.devicebased)},{value:"force",title:u(d.forceEnabled),text:u(d.forceEnabled)}]}),e.Settings.registerSettingExtension({title:u(d.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.noIdleEmulation),text:u(d.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:u(d.userActiveScreenUnlocked),text:u(d.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:u(d.userActiveScreenLocked),text:u(d.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:u(d.userIdleScreenUnlocked),text:u(d.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:u(d.userIdleScreenLocked),text:u(d.userIdleScreenLocked)}]});const w={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},A=o.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",w),h=o.i18n.getLazilyComputedLocalizedString.bind(void 0,A);let y;i.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:h(w.developerResources),commandPrompt:h(w.showDeveloperResources),order:100,persistence:"closeable",experiment:t.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return y||(y=await import("../../panels/developer_resources/developer_resources.js")),y}()).DeveloperResourcesView.DeveloperResourcesView)});const R={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},E=o.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",R),v=o.i18n.getLazilyComputedLocalizedString.bind(void 0,E);let T;async function f(){return T||(T=await import("../inspector_main/inspector_main.js")),T}i.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:v(R.rendering),commandPrompt:v(R.showRendering),persistence:"closeable",order:50,loadView:async()=>(await f()).RenderingOptions.RenderingOptionsView.instance(),tags:[v(R.paint),v(R.layout),v(R.fps),v(R.cssMediaType),v(R.cssMediaFeature),v(R.visionDeficiency),v(R.colorVisionDeficiency)]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await f()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:v(R.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await f()).InspectorMain.ReloadActionDelegate.instance(),title:v(R.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),i.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:i.ActionRegistration.ActionCategory.RENDERING,title:v(R.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await f()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:v(R.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:v(R.blockAds)},{value:!1,title:v(R.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:v(R.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:v(R.autoOpenDevTools)},{value:!1,title:v(R.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:v(R.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await f()).InspectorMain.NodeIndicator.instance(),order:2,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await f()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:t.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const I={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},C=o.i18n.registerUIStrings("panels/issues/issues-meta.ts",I),N=o.i18n.getLazilyComputedLocalizedString.bind(void 0,C);let P;async function x(){return P||(P=await import("../../panels/issues/issues.js")),P}i.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:N(I.issues),commandPrompt:N(I.showIssues),order:100,persistence:"closeable",loadView:async()=>(await x()).IssuesPane.IssuesPane.instance()}),i.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:N(I.cspViolations),commandPrompt:N(I.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await x()).CSPViolationsView.CSPViolationsView.instance(),experiment:t.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),e.Revealer.registerRevealer({contextTypes:()=>[n.Issue.Issue],destination:e.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await x()).IssueRevealer.IssueRevealer.instance()});const D={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},b=o.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",D),O=o.i18n.getLazilyComputedLocalizedString.bind(void 0,b);let M;async function V(){return M||(M=await import("../../panels/mobile_throttling/mobile_throttling.js")),M}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:O(D.throttling),commandPrompt:O(D.showThrottling),order:35,loadView:async()=>(await V()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOffline),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableSlowGThrottling),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableFastGThrottling),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOnline),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const _={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},L=o.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",_),k=o.i18n.getLazilyComputedLocalizedString.bind(void 0,L);let U,z;async function F(){return z||(z=await import("../../panels/profiler/profiler.js")),z}async function B(){return U||(U=await import("../../panels/timeline/timeline.js")),U}function W(e){return void 0===U?[]:e(U)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:k(_.profiler),commandPrompt:k(_.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await F()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:k(_.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===z?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(z),loadActionDelegate:async()=>(await F()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(_.showRecentTimelineSessions),contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:k(_.record)},{value:!1,title:k(_.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(_.startProfilingAndReloadPage),loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const j={rnWelcome:"⚛️ Welcome",showRnWelcome:"Show React Native Welcome panel"},G=o.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",j),K=o.i18n.getLazilyComputedLocalizedString.bind(void 0,G);let H;i.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:K(j.rnWelcome),commandPrompt:K(j.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return H||(H=await import("../../panels/rn_welcome/rn_welcome.js")),H}()).RNWelcome.RNWelcomeImpl.instance(),experiment:t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI}),t.Runtime.experiments.register(t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,"Enable JavaScript Profiler (legacy)",!1),t.Runtime.experiments.register(t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,"Show React Native-specific UI",!1),t.Runtime.experiments.enableExperimentsByDefault([t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI]),self.runtime=t.Runtime.Runtime.instance({forceNew:!0}),new a.MainImpl.MainImpl; diff --git a/packages/debugger-frontend/dist/third-party/front_end/inspector.html b/packages/debugger-frontend/dist/third-party/front_end/inspector.html index e0ffaada6db8..3484b3280d95 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/inspector.html +++ b/packages/debugger-frontend/dist/third-party/front_end/inspector.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + diff --git a/packages/debugger-frontend/dist/third-party/front_end/js_app.html b/packages/debugger-frontend/dist/third-party/front_end/js_app.html index 75ebccc0da68..b55821f5acc5 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/js_app.html +++ b/packages/debugger-frontend/dist/third-party/front_end/js_app.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + diff --git a/packages/debugger-frontend/dist/third-party/front_end/ndb_app.html b/packages/debugger-frontend/dist/third-party/front_end/ndb_app.html index 4044bdca9c23..d7cad3a743df 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/ndb_app.html +++ b/packages/debugger-frontend/dist/third-party/front_end/ndb_app.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + diff --git a/packages/debugger-frontend/dist/third-party/front_end/node_app.html b/packages/debugger-frontend/dist/third-party/front_end/node_app.html index 41aa1cfb4b9a..70b82d8edcc5 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/node_app.html +++ b/packages/debugger-frontend/dist/third-party/front_end/node_app.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + diff --git a/packages/debugger-frontend/dist/third-party/front_end/panels/js_profiler/js_profiler-meta.js b/packages/debugger-frontend/dist/third-party/front_end/panels/js_profiler/js_profiler-meta.js index 84a0a6b2ddc1..8be612235ef8 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/panels/js_profiler/js_profiler-meta.js +++ b/packages/debugger-frontend/dist/third-party/front_end/panels/js_profiler/js_profiler-meta.js @@ -1 +1 @@ -import*as e from"../../core/i18n/i18n.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";const o={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},n=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",o),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let a,l;async function s(){return l||(l=await import("../profiler/profiler.js")),l}async function c(){return a||(a=await import("../timeline/timeline.js")),a}function g(e){return void 0===a?[]:e(a)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:r(o.profiler),commandPrompt:r(o.showProfiler),order:65,persistence:"closeable",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance()}),i.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:r(o.performance),commandPrompt:r(o.showPerformance),order:66,hasToolbar:!1,isPreviewFeature:!0,loadView:async()=>(await c()).TimelinePanel.TimelinePanel.instance({forceNew:null,isNode:!0})}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:r(o.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes(){return e=e=>[e.ProfilesPanel.JSProfilerPanel],void 0===l?[]:e(l);var e},loadActionDelegate:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.showRecentTimelineSessions),contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:r(o.record)},{value:!1,title:r(o.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.startProfilingAndReloadPage),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}); +import*as e from"../../core/i18n/i18n.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";const o={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},n=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",o),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let a,l;async function s(){return l||(l=await import("../profiler/profiler.js")),l}async function c(){return a||(a=await import("../timeline/timeline.js")),a}function g(e){return void 0===a?[]:e(a)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:r(o.profiler),commandPrompt:r(o.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:r(o.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes(){return e=e=>[e.ProfilesPanel.JSProfilerPanel],void 0===l?[]:e(l);var e},loadActionDelegate:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.showRecentTimelineSessions),contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:r(o.record)},{value:!1,title:r(o.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.startProfilingAndReloadPage),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}); diff --git a/packages/debugger-frontend/dist/third-party/front_end/panels/profiler/profiler.js b/packages/debugger-frontend/dist/third-party/front_end/panels/profiler/profiler.js index dd3456378ec6..07ff97d1b0a8 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/panels/profiler/profiler.js +++ b/packages/debugger-frontend/dist/third-party/front_end/panels/profiler/profiler.js @@ -4,4 +4,4 @@ import*as e from"../../core/platform/platform.js";import*as t from"../../core/i1 ${t} @${this.snapshotNodeId} - `,r=i.$("container");this.prefixObjectCell(r),this.reachableFromWindow&&r.appendChild(s.Fragment.html`🗖`),this.detachedDOMTreeNode&&r.appendChild(s.Fragment.html``),this.appendSourceLocation(r);const o=i.element();return this.depth&&o.style.setProperty("padding-left",this.depth*this.dataGrid.indentWidth+"px"),o}prefixObjectCell(e){}async appendSourceLocation(e){const t=s.Fragment.html``;e.appendChild(t);const i=await this.dataGridInternal.dataDisplayDelegate().linkifyObject(this.snapshotNodeIndex);i?(t.appendChild(i),this.linkElement=i):t.remove()}async queryObjectContent(e,t){return await this.tryQueryObjectContent(e,t)||e.runtimeModel().createRemoteObjectFromPrimitiveValue(qe(Je.previewIsNotAvailable))}async tryQueryObjectContent(e,t){return"string"===this.type?e.runtimeModel().createRemoteObjectFromPrimitiveValue(this.nameInternal):await e.objectForSnapshotObjectId(String(this.snapshotNodeId),t)}async updateHasChildren(){const e=await this.provider().isEmpty();this.setHasChildren(!e)}shortenWindowURL(t,i){const r=t.indexOf("/"),s=i?t.indexOf("@"):t.length;if(-1===r||-1===s)return t;const o=t.substring(r+1,s).trimLeft();let n=e.StringUtilities.trimURL(o);return n.length>40&&(n=e.StringUtilities.trimMiddle(n,40)),t.substr(0,r+2)+n+t.substr(s)}populateContextMenu(e,t,i){if(e.revealSection().appendItem(qe(Je.revealInSummaryView),(()=>{t.showObject(String(this.snapshotNodeId),qe(Je.summary))})),this.referenceName)for(const i of this.referenceName.matchAll(/\((?[^@)]*) @(?\d+)\)/g)){const{objectName:r,snapshotNodeId:s}=i.groups;e.revealSection().appendItem(qe(Je.revealObjectSWithIdSInSummary,{PH1:r,PH2:s}),(()=>{t.showObject(s,qe(Je.summary))}))}i&&e.revealSection().appendItem(qe(Je.storeAsGlobalVariable),(async()=>{const e=await this.tryQueryObjectContent(i,"");if(e){const t=i.target().model(l.ConsoleModel.ConsoleModel);await(t?.saveToTempVariable(s.Context.Context.instance().flavor(l.RuntimeModel.ExecutionContext),e))}else o.Console.Console.instance().error(qe(Je.previewIsNotAvailable))}))}}class Ze extends Ye{referenceName;referenceType;edgeIndex;snapshot;parentObjectNode;cycledWithAncestorGridNode;constructor(e,t,i,r){super(e,i.node),this.referenceName=i.name,this.referenceType=i.type,this.edgeIndex=i.edgeIndex,this.snapshot=t,this.parentObjectNode=r,this.cycledWithAncestorGridNode=this.findAncestorWithSameSnapshotNodeId(),this.cycledWithAncestorGridNode||this.updateHasChildren();const s=this.data;s.count="",s.addedCount="",s.removedCount="",s.countDelta="",s.addedSize="",s.removedSize="",s.sizeDelta=""}retainersDataSource(){return void 0===this.snapshotNodeIndex?null:{snapshot:this.snapshot,snapshotNodeIndex:this.snapshotNodeIndex}}createProvider(){if(void 0===this.snapshotNodeIndex)throw new Error("Cannot create a provider on a root node");return this.snapshot.createEdgesProvider(this.snapshotNodeIndex)}findAncestorWithSameSnapshotNodeId(){let e=this.parentObjectNode;for(;e;){if(e.snapshotNodeId===this.snapshotNodeId)return e;e=e.parentObjectNode}return null}createChildNode(e){return new Ze(this.dataGridInternal,this.snapshot,e,this)}getHash(){return this.edgeIndex}comparator(){const e=this.dataGridInternal.isSortOrderAscending();switch(this.dataGridInternal.sortColumnId()){case"object":return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",e,"retainedSize",!1);case"count":default:return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",!0,"retainedSize",!1);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"!edgeName",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",e,"!edgeName",!0);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",e,"name",!0)}}prefixObjectCell(e){let t=this.referenceName||"(empty)",i="name";switch(this.referenceType){case"context":i="object-value-number";break;case"internal":case"hidden":case"weak":i="object-value-null";break;case"element":t=`[${t}]`}this.cycledWithAncestorGridNode&&e.classList.add("cycled-ancessor-node"),e.prepend(s.Fragment.html`${t} ${this.edgeNodeSeparator()}`)}edgeNodeSeparator(){return"::"}}class Xe extends Ze{constructor(e,t,i,r){super(e,t,i,r)}createProvider(){if(void 0===this.snapshotNodeIndex)throw new Error("Cannot create providers on root nodes");return this.snapshot.createRetainingEdgesProvider(this.snapshotNodeIndex)}createChildNode(e){return new Xe(this.dataGridInternal,this.snapshot,e,this)}edgeNodeSeparator(){return qe(Je.inElement)}expand(){this.expandRetainersChain(20)}expandRetainersChain(e){if(!this.populated)return this.once(Ke.Events.PopulateComplete).then((()=>this.expandRetainersChain(e))),void this.populate();if(super.expand(),--e>0&&this.children.length>0){const t=this.children[0];if((t.distance||0)>1)return void t.expandRetainersChain(e)}this.dataGridInternal.dispatchEventToListeners(pt.ExpandRetainersComplete)}}class et extends Ye{baseSnapshotOrSnapshot;isDeletedNode;constructor(t,i,r,s){super(t,r),this.baseSnapshotOrSnapshot=i,this.isDeletedNode=s,this.updateHasChildren();const o=this.data;o.count="",o.countDelta="",o.sizeDelta="",this.isDeletedNode?(o.addedCount="",o.addedSize="",o.removedCount="•",o.removedSize=e.NumberUtilities.withThousandsSeparator(this.shallowSize||0)):(o.addedCount="•",o.addedSize=e.NumberUtilities.withThousandsSeparator(this.shallowSize||0),o.removedCount="",o.removedSize="")}retainersDataSource(){return void 0===this.snapshotNodeIndex?null:{snapshot:this.baseSnapshotOrSnapshot,snapshotNodeIndex:this.snapshotNodeIndex}}createProvider(){if(void 0===this.snapshotNodeIndex)throw new Error("Cannot create providers on root nodes");return this.baseSnapshotOrSnapshot.createEdgesProvider(this.snapshotNodeIndex)}createChildNode(e){return new Ze(this.dataGridInternal,this.baseSnapshotOrSnapshot,e,null)}getHash(){if(void 0===this.snapshotNodeId)throw new Error("Cannot hash root nodes");return this.snapshotNodeId}comparator(){const e=this.dataGridInternal.isSortOrderAscending();switch(this.dataGridInternal.sortColumnId()){case"object":return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",e,"retainedSize",!1);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",e,"retainedSize",!1);case"count":default:return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",!0,"retainedSize",!1);case"addedSize":case"removedSize":case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"!edgeName",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",e,"!edgeName",!0)}}}class tt extends Ke{nameInternal;nodeFilter;distance;count;shallowSize;retainedSize;constructor(t,i,r,s){super(t,r.count>0),this.nameInternal=i,this.nodeFilter=s,this.distance=r.distance,this.count=r.count,this.shallowSize=r.self,this.retainedSize=r.maxRet;const o=t.snapshot,n=this.retainedSize/o.totalSize*100,a=this.shallowSize/o.totalSize*100;this.data={object:i,count:e.NumberUtilities.withThousandsSeparator(this.count),distance:this.toUIDistance(this.distance),shallowSize:e.NumberUtilities.withThousandsSeparator(this.shallowSize),retainedSize:e.NumberUtilities.withThousandsSeparator(this.retainedSize),"shallowSize-percent":this.toPercentString(a),"retainedSize-percent":this.toPercentString(n)}}get name(){return this.nameInternal}createProvider(){return this.dataGridInternal.snapshot.createNodesProviderForClass(this.nameInternal,this.nodeFilter)}async populateNodeBySnapshotObjectId(e){this.dataGridInternal.resetNameFilter(),await this.expandWithoutPopulate();const t=await this.provider().nodePosition(e);if(-1===t)return this.collapse(),[];await this.populateChildren(t,null);const i=this.childForPosition(t);return i?[this,i]:[]}filteredOut(e){return-1===this.nameInternal.toLowerCase().indexOf(e)}createCell(e){const t="object"===e?super.createCell(e):this.createValueCell(e);return"object"===e&&this.count>1&&t.appendChild(s.Fragment.html`×${this.count}`),t}createChildNode(e){return new et(this.dataGridInternal,this.dataGridInternal.snapshot,e,!1)}comparator(){const e=this.dataGridInternal.isSortOrderAscending(),t=this.dataGridInternal.sortColumnId();switch(t){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",e,"id",!0);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",e,"retainedSize",!1);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"id",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",e,"id",!0);default:throw new Error(`Invalid sort column id ${t}`)}}}class it{addedNodesProvider;deletedNodesProvider;addedCount;removedCount;constructor(e,t,i,r){this.addedNodesProvider=e,this.deletedNodesProvider=t,this.addedCount=i,this.removedCount=r}dispose(){this.addedNodesProvider.dispose(),this.deletedNodesProvider.dispose()}nodePosition(e){throw new Error("Unreachable")}isEmpty(){return Promise.resolve(!1)}async serializeItemsRange(e,t){let i,r;if(e=t)return i.totalLength=this.addedCount+this.removedCount,i;r=i,i=await this.deletedNodesProvider.serializeItemsRange(0,t-i.endPosition)}else r=new p.HeapSnapshotModel.ItemsRange(0,0,0,[]),i=await this.deletedNodesProvider.serializeItemsRange(e-this.addedCount,t-this.addedCount);r.items.length||(r.startPosition=this.addedCount+i.startPosition);for(const e of i.items)e.isAddedNotRemoved=!1;return r.items.push(...i.items),r.endPosition=this.addedCount+i.endPosition,r.totalLength=this.addedCount+this.removedCount,r}async sortAndRewind(e){await this.addedNodesProvider.sortAndRewind(e),await this.deletedNodesProvider.sortAndRewind(e)}}class rt extends Ke{nameInternal;addedCount;removedCount;countDelta;addedSize;removedSize;sizeDelta;deletedIndexes;constructor(t,i,r){super(t,!0),this.nameInternal=i,this.addedCount=r.addedCount,this.removedCount=r.removedCount,this.countDelta=r.countDelta,this.addedSize=r.addedSize,this.removedSize=r.removedSize,this.sizeDelta=r.sizeDelta,this.deletedIndexes=r.deletedIndexes,this.data={object:i,addedCount:e.NumberUtilities.withThousandsSeparator(this.addedCount),removedCount:e.NumberUtilities.withThousandsSeparator(this.removedCount),countDelta:this.signForDelta(this.countDelta)+e.NumberUtilities.withThousandsSeparator(Math.abs(this.countDelta)),addedSize:e.NumberUtilities.withThousandsSeparator(this.addedSize),removedSize:e.NumberUtilities.withThousandsSeparator(this.removedSize),sizeDelta:this.signForDelta(this.sizeDelta)+e.NumberUtilities.withThousandsSeparator(Math.abs(this.sizeDelta))}}get name(){return this.nameInternal}createProvider(){const e=this.dataGridInternal;if(null===e.snapshot||void 0===e.baseSnapshot||void 0===e.baseSnapshot.uid)throw new Error("Data sources have not been set correctly");const t=e.snapshot.createAddedNodesProvider(e.baseSnapshot.uid,this.nameInternal),i=e.baseSnapshot.createDeletedNodesProvider(this.deletedIndexes);if(!t||!i)throw new Error("Failed to create node providers");return new it(t,i,this.addedCount,this.removedCount)}createCell(e){const t=super.createCell(e);return"object"!==e&&t.classList.add("numeric-column"),t}createChildNode(e){const t=this.dataGridInternal;if(e.isAddedNotRemoved){if(null===t.snapshot)throw new Error("Data sources have not been set correctly");return new et(this.dataGridInternal,t.snapshot,e,!1)}if(void 0===t.baseSnapshot)throw new Error("Data sources have not been set correctly");return new et(this.dataGridInternal,t.baseSnapshot,e,!0)}comparator(){const e=this.dataGridInternal.isSortOrderAscending(),t=this.dataGridInternal.sortColumnId();switch(t){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",e,"id",!0);case"addedCount":case"removedCount":case"countDelta":return new p.HeapSnapshotModel.ComparatorConfig("name",!0,"id",!0);case"addedSize":case"removedSize":case"sizeDelta":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"id",!0);default:throw new Error(`Invalid sort column ${t}`)}}filteredOut(e){return-1===this.nameInternal.toLowerCase().indexOf(e)}signForDelta(e){return 0===e?"":e>0?"+":"−"}}class st extends Ke{populated;allocationNode;constructor(t,i){super(t,i.hasChildren),this.populated=!1,this.allocationNode=i,this.data={liveCount:e.NumberUtilities.withThousandsSeparator(i.liveCount),count:e.NumberUtilities.withThousandsSeparator(i.count),liveSize:e.NumberUtilities.withThousandsSeparator(i.liveSize),size:e.NumberUtilities.withThousandsSeparator(i.size),name:i.name}}populate(){this.populated||this.doPopulate()}async doPopulate(){this.populated=!0;const e=await this.dataGridInternal.snapshot.allocationNodeCallers(this.allocationNode.id),t=e.nodesWithSingleCaller;let i=this;const r=this.dataGridInternal;for(const e of t){const t=new st(r,e);r.appendNode(i,t),i=t,i.populated=!0,this.expanded&&i.expand()}const s=e.branchingCallers;s.sort(this.dataGridInternal.createComparator());for(const e of s)r.appendNode(i,new st(r,e));r.updateVisibleNodes(!0)}expand(){super.expand(),1===this.children.length&&this.children[0].expand()}createCell(e){if("name"!==e)return this.createValueCell(e);const t=super.createCell(e),i=this.allocationNode,r=this.dataGridInternal.heapProfilerModel();if(i.scriptId){const e=this.dataGridInternal.linkifier.linkifyScriptLocation(r?r.target():null,String(i.scriptId),i.scriptName,i.line-1,{columnNumber:i.column-1,inlineFrameIndex:0,className:"profile-node-file"});e.style.maxWidth="75%",t.insertBefore(e,t.firstChild)}return t}allocationNodeId(){return this.allocationNode.id}}var ot=Object.freeze({__proto__:null,get HeapSnapshotGridNode(){return Ke},HeapSnapshotGenericObjectNode:Ye,HeapSnapshotObjectNode:Ze,HeapSnapshotRetainingObjectNode:Xe,HeapSnapshotInstanceNode:et,HeapSnapshotConstructorNode:tt,HeapSnapshotDiffNodesProvider:it,HeapSnapshotDiffNode:rt,AllocationGridNode:st});const nt={distanceFromWindowObject:"Distance from window object",sizeOfTheObjectItselfInBytes:"Size of the object itself in bytes",sizeOfTheObjectPlusTheGraphIt:"Size of the object plus the graph it retains in bytes",object:"Object",distance:"Distance",shallowSize:"Shallow Size",retainedSize:"Retained Size",heapSnapshotRetainment:"Heap Snapshot Retainment",constructorString:"Constructor",heapSnapshotConstructors:"Heap Snapshot Constructors",New:"# New",Deleted:"# Deleted",Delta:"# Delta",allocSize:"Alloc. Size",freedSize:"Freed Size",sizeDelta:"Size Delta",heapSnapshotDiff:"Heap Snapshot Diff",liveCount:"Live Count",count:"Count",liveSize:"Live Size",size:"Size",function:"Function",allocation:"Allocation"},at=t.i18n.registerUIStrings("panels/profiler/HeapSnapshotDataGrids.ts",nt),lt=t.i18n.getLocalizedString.bind(void 0,at),dt=new WeakMap;class ht extends r.DataGrid.DataGridImpl{}class ct extends(o.ObjectWrapper.eventMixin(ht)){snapshot;selectedNode;heapProfilerModelInternal;dataDisplayDelegateInternal;recursiveSortingDepth;populatedAndSorted;nameFilter;nodeFilterInternal;lastSortColumnId;lastSortAscending;constructor(e,t,i){super(i),this.snapshot=null,this.selectedNode=null,this.heapProfilerModelInternal=e,this.dataDisplayDelegateInternal=t;const s=[["distance",lt(nt.distanceFromWindowObject)],["shallowSize",lt(nt.sizeOfTheObjectItselfInBytes)],["retainedSize",lt(nt.sizeOfTheObjectPlusTheGraphIt)]];for(const e of s){const t=this.headerTableHeader(e[0]);t&&t.setAttribute("title",e[1])}this.recursiveSortingDepth=0,this.populatedAndSorted=!1,this.nameFilter=null,this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter,this.addEventListener(pt.SortingComplete,this.sortingComplete,this),this.addEventListener(r.DataGrid.Events.SortingChanged,this.sortingChanged,this),this.setRowContextMenuCallback(this.populateContextMenu.bind(this))}async setDataSource(e,t){}isFilteredOut(e){const t=this.nameFilter?this.nameFilter.value().toLowerCase():"";return!!(t&&(e instanceof rt||e instanceof tt)&&e.filteredOut(t))}heapProfilerModel(){return this.heapProfilerModelInternal}dataDisplayDelegate(){return this.dataDisplayDelegateInternal}nodeFilter(){return this.nodeFilterInternal}setNameFilter(e){this.nameFilter=e}defaultPopulateCount(){return 100}disposeAllNodes(){const e=this.topLevelNodes();for(let t=0,i=e.length;ts?1:0;return i.ascending1||(o=-o),0!==o||(r=e[i.fieldName2],s=t[i.fieldName2],o=rs?1:0,i.ascending2||(o=-o)),o}))}performSorting(e){this.recursiveSortingEnter();const t=this.allChildren(this.rootNode());this.rootNode().removeChildren(),t.sort(e);for(let e=0,i=t.length;e=this.topPaddingHeight&&r>=this.bottomPaddingHeight)return;i-=500,s+=1e3;const o=this.selectedNode;this.rootNode().removeChildren(),this.topPaddingHeight=0,this.bottomPaddingHeight=0,this.addVisibleNodes(this.rootNode(),i,i+s),this.setVerticalPadding(this.topPaddingHeight,this.bottomPaddingHeight),o&&(o.parent?o.select(!0):this.selectedNode=o)}addVisibleNodes(e,t,i){if(!e.expanded)return 0;const r=this.allChildren(e);let s=0,o=0;for(;ot)break;s=i}let n=s;for(;o=r&&t{console.assert(!this.scrollToResolveCallback),this.scrollToResolveCallback=e.bind(null,i),this.scrollContainer.window().requestAnimationFrame((()=>{this.scrollToResolveCallback&&(this.scrollToResolveCallback(),this.scrollToResolveCallback=null)}))}))}calculateOffset(e){let t=this.rootNode(),i=0;if(0===e.length)return 0;for(let r=0;r=t}onResize(){super.onResize(),this.updateVisibleNodes(!1)}onScroll(e){this.updateVisibleNodes(!1),this.scrollToResolveCallback&&(this.scrollToResolveCallback(),this.scrollToResolveCallback=null)}}class ft extends ct{constructor(e,t,i,s){super(e,t,{displayName:i,columns:s=s||[{id:"object",title:lt(nt.object),disclosure:!0,sortable:!0},{id:"distance",title:lt(nt.distance),width:"70px",sortable:!0,fixedWidth:!0},{id:"shallowSize",title:lt(nt.shallowSize),width:"110px",sortable:!0,fixedWidth:!0},{id:"retainedSize",title:lt(nt.retainedSize),width:"110px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Descending}]})}async setDataSource(e,t){this.snapshot=e;const i=new p.HeapSnapshotModel.Node(-1,"root",0,t||e.rootNodeIndex,0,0,"");this.setRootNode(this.createRootNode(e,i)),this.rootNode().sort()}createRootNode(e,t){const i=new p.HeapSnapshotModel.Edge("",t,"",-1);return new Ze(this,e,i,null)}sortingChanged(){const e=this.rootNode();e.hasChildren()&&e.sort()}}class gt extends ft{constructor(e,t){const i=[{id:"object",title:lt(nt.object),disclosure:!0,sortable:!0},{id:"distance",title:lt(nt.distance),width:"70px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Ascending},{id:"shallowSize",title:lt(nt.shallowSize),width:"110px",sortable:!0,fixedWidth:!0},{id:"retainedSize",title:lt(nt.retainedSize),width:"110px",sortable:!0,fixedWidth:!0}];super(e,t,lt(nt.heapSnapshotRetainment),i)}createRootNode(e,t){const i=new p.HeapSnapshotModel.Edge("",t,"",-1);return new Xe(this,e,i,null)}sortFields(e,t){switch(e){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",t,"count",!1);case"count":return new p.HeapSnapshotModel.ComparatorConfig("count",t,"name",!0);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("shallowSize",t,"name",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",t,"name",!0);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",t,"name",!0);default:throw new Error(`Unknown column ${e}`)}}reset(){this.rootNode().removeChildren(),this.resetSortingCache()}async setDataSource(e,t){await super.setDataSource(e,t),this.rootNode().expand()}}!function(e){e.ExpandRetainersComplete="ExpandRetainersComplete"}(ut||(ut={}));class vt extends mt{profileIndex;objectIdToSelect;nextRequestedFilter;lastFilter;filterInProgress;constructor(e,t){const i=[{id:"object",title:lt(nt.constructorString),disclosure:!0,sortable:!0},{id:"distance",title:lt(nt.distance),width:"70px",sortable:!0,fixedWidth:!0},{id:"shallowSize",title:lt(nt.shallowSize),width:"110px",sortable:!0,fixedWidth:!0},{id:"retainedSize",title:lt(nt.retainedSize),width:"110px",sort:r.DataGrid.Order.Descending,sortable:!0,fixedWidth:!0}];super(e,t,{displayName:lt(nt.heapSnapshotConstructors).toString(),columns:i}),this.profileIndex=-1,this.objectIdToSelect=null,this.nextRequestedFilter=null}sortFields(e,t){switch(e){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",t,"retainedSize",!1);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",t,"retainedSize",!1);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("shallowSize",t,"name",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",t,"name",!0);default:throw new Error(`Unknown column ${e}`)}}async revealObjectByHeapSnapshotId(e){if(!this.snapshot)return this.objectIdToSelect=e,null;const t=await this.snapshot.nodeClassName(parseInt(e,10));if(!t)return null;const i=this.topLevelNodes().find((e=>e.name===t));if(!i)return null;const r=await i.populateNodeBySnapshotObjectId(parseInt(e,10));return r.length?this.revealTreeNode(r):null}clear(){this.nextRequestedFilter=null,this.lastFilter=null,this.removeTopLevelNodes()}async setDataSource(e,t){this.snapshot=e,-1===this.profileIndex&&this.populateChildren(),this.objectIdToSelect&&(this.revealObjectByHeapSnapshotId(this.objectIdToSelect),this.objectIdToSelect=null)}setSelectionRange(e,t){this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter(e,t),this.populateChildren(this.nodeFilterInternal)}setAllocationNodeId(e){this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter,this.nodeFilterInternal.allocationNodeId=e,this.populateChildren(this.nodeFilterInternal)}aggregatesReceived(e,t){this.filterInProgress=null,this.nextRequestedFilter&&this.snapshot&&(this.snapshot.aggregatesWithFilter(this.nextRequestedFilter).then(this.aggregatesReceived.bind(this,this.nextRequestedFilter)),this.filterInProgress=this.nextRequestedFilter,this.nextRequestedFilter=null),this.removeTopLevelNodes(),this.resetSortingCache();for(const i in t)this.appendNode(this.rootNode(),new tt(this,i,t[i],e));this.sortingChanged(),this.lastFilter=e}async populateChildren(e){const t=e||new p.HeapSnapshotModel.NodeFilter;if(this.filterInProgress)this.nextRequestedFilter=this.filterInProgress.equals(t)?null:t;else if((!this.lastFilter||!this.lastFilter.equals(t))&&(this.filterInProgress=t,this.snapshot)){const e=await this.snapshot.aggregatesWithFilter(t);this.aggregatesReceived(t,e)}}filterSelectIndexChanged(e,t){if(this.profileIndex=t,this.nodeFilterInternal=void 0,-1!==t){const i=t>0?e[t-1].maxJSObjectId:0,r=e[t].maxJSObjectId;this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter(i,r)}this.populateChildren(this.nodeFilterInternal)}}class wt extends mt{baseSnapshot;constructor(e,t){const i=[{id:"object",title:lt(nt.constructorString),disclosure:!0,sortable:!0},{id:"addedCount",title:lt(nt.New),width:"75px",sortable:!0,fixedWidth:!0},{id:"removedCount",title:lt(nt.Deleted),width:"75px",sortable:!0,fixedWidth:!0},{id:"countDelta",title:lt(nt.Delta),width:"65px",sortable:!0,fixedWidth:!0},{id:"addedSize",title:lt(nt.allocSize),width:"75px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Descending},{id:"removedSize",title:lt(nt.freedSize),width:"75px",sortable:!0,fixedWidth:!0},{id:"sizeDelta",title:lt(nt.sizeDelta),width:"75px",sortable:!0,fixedWidth:!0}];super(e,t,{displayName:lt(nt.heapSnapshotDiff).toString(),columns:i})}defaultPopulateCount(){return 50}sortFields(e,t){switch(e){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",t,"count",!1);case"addedCount":return new p.HeapSnapshotModel.ComparatorConfig("addedCount",t,"name",!0);case"removedCount":return new p.HeapSnapshotModel.ComparatorConfig("removedCount",t,"name",!0);case"countDelta":return new p.HeapSnapshotModel.ComparatorConfig("countDelta",t,"name",!0);case"addedSize":return new p.HeapSnapshotModel.ComparatorConfig("addedSize",t,"name",!0);case"removedSize":return new p.HeapSnapshotModel.ComparatorConfig("removedSize",t,"name",!0);case"sizeDelta":return new p.HeapSnapshotModel.ComparatorConfig("sizeDelta",t,"name",!0);default:throw new Error(`Unknown column ${e}`)}}async setDataSource(e,t){this.snapshot=e}setBaseDataSource(e){this.baseSnapshot=e,this.removeTopLevelNodes(),this.resetSortingCache(),this.baseSnapshot!==this.snapshot?this.populateChildren():this.dispatchEventToListeners(pt.SortingComplete)}async populateChildren(){if(null===this.snapshot||void 0===this.baseSnapshot||void 0===this.baseSnapshot.uid)throw new Error("Data sources have not been set correctly");const e=await this.baseSnapshot.aggregatesForDiff(),t=await this.snapshot.calculateSnapshotDiff(this.baseSnapshot.uid,e);for(const e in t){const i=t[e];this.appendNode(this.rootNode(),new rt(this,e,i))}this.sortingChanged()}}class St extends mt{linkifierInternal;topNodes;constructor(e,t){const i=[{id:"liveCount",title:lt(nt.liveCount),width:"75px",sortable:!0,fixedWidth:!0},{id:"count",title:lt(nt.count),width:"65px",sortable:!0,fixedWidth:!0},{id:"liveSize",title:lt(nt.liveSize),width:"75px",sortable:!0,fixedWidth:!0},{id:"size",title:lt(nt.size),width:"75px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Descending},{id:"name",title:lt(nt.function),disclosure:!0,sortable:!0}];super(e,t,{displayName:lt(nt.allocation).toString(),columns:i}),this.linkifierInternal=new d.Linkifier.Linkifier}get linkifier(){return this.linkifierInternal}dispose(){this.linkifierInternal.reset()}async setDataSource(e,t){this.snapshot=e,this.topNodes=await this.snapshot.allocationTracesTops(),this.populateChildren()}populateChildren(){this.removeTopLevelNodes();const e=this.rootNode(),t=this.topNodes||[];for(const i of t)this.appendNode(e,new st(this,i));this.updateVisibleNodes(!0)}sortingChanged(){void 0!==this.topNodes&&(this.topNodes.sort(this.createComparator()),this.rootNode().removeChildren(),this.populateChildren())}createComparator(){const e=this.sortColumnId(),t=this.sortOrder()===r.DataGrid.Order.Ascending?1:-1;return function(i,r){return i[e]>r[e]?t:i[e]{e(t?new r(this,n):null)})),this.postMessage({callId:s,disposition:"factory",objectId:t,methodName:i,methodArguments:o,newObjectId:n}),null):(this.postMessage({callId:s,disposition:"factory",objectId:t,methodName:i,methodArguments:o,newObjectId:n}),new r(this,n))}callMethod(e,t,i){const r=this.nextCallId++,s=Array.prototype.slice.call(arguments,3);e&&this.callbacks.set(r,e),this.postMessage({callId:r,disposition:"method",objectId:t,methodName:i,methodArguments:s})}startCheckingForLongRunningCalls(){this.interval||(this.checkLongRunningCalls(),this.interval=window.setInterval(this.checkLongRunningCalls.bind(this),300))}checkLongRunningCalls(){for(const e of this.previousCallbacks)this.callbacks.has(e)||this.previousCallbacks.delete(e);const e=Boolean(this.previousCallbacks.size);this.dispatchEventToListeners("Wait",e);for(const e of this.callbacks.keys())this.previousCallbacks.add(e)}messageReceived(e){const t=e.data;if(t.eventName)return void(this.eventHandler&&this.eventHandler(t.eventName,t.data));if(t.error)return t.errorMethodName&&o.Console.Console.instance().error(Tt(Ct.anErrorOccurredWhenACallToMethod,{PH1:t.errorMethodName})),o.Console.Console.instance().error(t.errorCallStack),void this.callbacks.delete(t.callId);const i=this.callbacks.get(t.callId);i&&(this.callbacks.delete(t.callId),i(t.result))}postMessage(e){this.worker.postMessage(e)}}class yt{worker;objectId;constructor(e,t){this.worker=e,this.objectId=t}callWorker(e,t){t.splice(1,0,this.objectId);const i=this.worker[e];if(!i)throw new Error(`Could not find worker with name ${e}.`);return i.apply(this.worker,t)}dispose(){this.worker.disposeObject(this.objectId)}disposeWorker(){this.worker.dispose()}callFactoryMethod(e,t,i,...r){return this.callWorker("callFactoryMethod",Array.prototype.slice.call(arguments,0))}callMethodPromise(e,...t){const i=Array.prototype.slice.call(arguments);return new Promise((e=>this.callWorker("callMethod",[e,...i])))}}class It extends yt{profileUid;snapshotReceivedCallback;constructor(e,t,i,r){super(e,t),this.profileUid=i,this.snapshotReceivedCallback=r}async write(e){await this.callMethodPromise("write",e)}async close(){await this.callMethodPromise("close");const e=await new Promise((e=>this.callFactoryMethod(e,"buildSnapshot",Rt)));this.dispose(),e.setProfileUid(this.profileUid),await e.updateStaticData(),this.snapshotReceivedCallback(e)}}class Rt extends yt{staticData;profileUid;constructor(e,t){super(e,t),this.staticData=null}search(e,t){return this.callMethodPromise("search",e,t)}aggregatesWithFilter(e){return this.callMethodPromise("aggregatesWithFilter",e)}aggregatesForDiff(){return this.callMethodPromise("aggregatesForDiff")}calculateSnapshotDiff(e,t){return this.callMethodPromise("calculateSnapshotDiff",e,t)}nodeClassName(e){return this.callMethodPromise("nodeClassName",e)}createEdgesProvider(e){return this.callFactoryMethod(null,"createEdgesProvider",Et,e)}createRetainingEdgesProvider(e){return this.callFactoryMethod(null,"createRetainingEdgesProvider",Et,e)}createAddedNodesProvider(e,t){return this.callFactoryMethod(null,"createAddedNodesProvider",Et,e,t)}createDeletedNodesProvider(e){return this.callFactoryMethod(null,"createDeletedNodesProvider",Et,e)}createNodesProvider(e){return this.callFactoryMethod(null,"createNodesProvider",Et,e)}createNodesProviderForClass(e,t){return this.callFactoryMethod(null,"createNodesProviderForClass",Et,e,t)}allocationTracesTops(){return this.callMethodPromise("allocationTracesTops")}allocationNodeCallers(e){return this.callMethodPromise("allocationNodeCallers",e)}allocationStack(e){return this.callMethodPromise("allocationStack",e)}dispose(){throw new Error("Should never be called")}get nodeCount(){return this.staticData?this.staticData.nodeCount:0}get rootNodeIndex(){return this.staticData?this.staticData.rootNodeIndex:0}async updateStaticData(){this.staticData=await this.callMethodPromise("updateStaticData")}getStatistics(){return this.callMethodPromise("getStatistics")}getLocation(e){return this.callMethodPromise("getLocation",e)}getSamples(){return this.callMethodPromise("getSamples")}get totalSize(){return this.staticData?this.staticData.totalSize:0}get uid(){return this.profileUid}setProfileUid(e){this.profileUid=e}maxJSObjectId(){return this.staticData?this.staticData.maxJSObjectId:0}}class Et extends yt{constructor(e,t){super(e,t)}nodePosition(e){return this.callMethodPromise("nodePosition",e)}isEmpty(){return this.callMethodPromise("isEmpty")}serializeItemsRange(e,t){return this.callMethodPromise("serializeItemsRange",e,t)}async sortAndRewind(e){await this.callMethodPromise("sortAndRewind",e)}}var Nt=Object.freeze({__proto__:null,HeapSnapshotWorkerProxy:xt,HeapSnapshotProxyObject:yt,HeapSnapshotLoaderProxy:It,HeapSnapshotProxy:Rt,HeapSnapshotProviderProxy:Et});const kt={find:"Find",containment:"Containment",retainers:"Retainers",allocationStack:"Allocation stack",perspective:"Perspective",baseSnapshot:"Base snapshot",filter:"Filter",classFilter:"Class filter",code:"Code",strings:"Strings",jsArrays:"JS arrays",typedArrays:"Typed arrays",systemObjects:"System objects",selectedSizeS:"Selected size: {PH1}",allObjects:"All objects",objectsAllocatedBeforeS:"Objects allocated before {PH1}",objectsAllocatedBetweenSAndS:"Objects allocated between {PH1} and {PH2}",summary:"Summary",comparison:"Comparison",allocation:"Allocation",liveObjects:"Live objects",statistics:"Statistics",heapSnapshot:"Heap snapshot",takeHeapSnapshot:"Take heap snapshot",heapSnapshots:"HEAP SNAPSHOTS",heapSnapshotProfilesShowMemory:"Heap snapshot profiles show memory distribution among your page's JavaScript objects and related DOM nodes.",exposeInternals:"Expose internals (includes additional implementation-specific details)",captureNumericValue:"Include numerical values in capture",snapshotting:"Snapshotting…",snapshotD:"Snapshot {PH1}",percentagePlaceholder:"{PH1}%",allocationInstrumentationOn:"Allocation instrumentation on timeline",stopRecordingHeapProfile:"Stop recording heap profile",startRecordingHeapProfile:"Start recording heap profile",recordAllocationStacksExtra:"Record stack traces of allocations (extra performance overhead)",recording:"Recording…",allocationTimelines:"ALLOCATION TIMELINES",AllocationTimelinesShowInstrumented:"Allocation timelines show instrumented JavaScript memory allocations over time. Once profile is recorded you can select a time interval to see objects that were allocated within it and still alive by the end of recording. Use this profile type to isolate memory leaks.",loading:"Loading…",savingD:"Saving… {PH1}%",sKb:"{PH1} kB",heapMemoryUsage:"Heap memory usage",stackWasNotRecordedForThisObject:"Stack was not recorded for this object because it had been allocated before this profile recording started."},Dt=t.i18n.registerUIStrings("panels/profiler/HeapSnapshotView.ts",kt),Mt=t.i18n.getLocalizedString.bind(void 0,Dt),Ft=t.i18n.registerUIStrings("panels/profiler/ModuleUIStrings.ts",{buildingEdgeIndexes:"Building edge indexes…",buildingRetainers:"Building retainers…",propagatingDomState:"Propagating DOM state…",calculatingNodeFlags:"Calculating node flags…",calculatingDistances:"Calculating distances…",buildingPostorderIndex:"Building postorder index…",buildingDominatorTree:"Building dominator tree…",calculatingRetainedSizes:"Calculating retained sizes…",buildingDominatedNodes:"Building dominated nodes…",calculatingStatistics:"Calculating statistics…",calculatingSamples:"Calculating samples…",buildingLocations:"Building locations…",finishedProcessing:"Finished processing.",buildingAllocationStatistics:"Building allocation statistics…",done:"Done",processingSnapshot:"Processing snapshot…",parsingStrings:"Parsing strings…",loadingSnapshotInfo:"Loading snapshot info…",loadingNodesD:"Loading nodes… {PH1}%",loadingEdgesD:"Loading edges… {PH1}%",loadingAllocationTracesD:"Loading allocation traces… {PH1}%",loadingSamples:"Loading samples…",loadingLocations:"Loading locations…",loadingStrings:"Loading strings…"}),Ht=t.i18n.getLocalizedString.bind(void 0,Ft);class Lt extends s.View.SimpleView{searchResults;profile;linkifier;parentDataDisplayDelegate;searchableViewInternal;splitWidget;containmentDataGrid;containmentWidget;statisticsView;constructorsDataGrid;constructorsWidget;diffDataGrid;diffWidget;allocationDataGrid;allocationWidget;allocationStackView;tabbedPane;retainmentDataGrid;retainmentWidget;objectDetailsView;perspectives;comparisonPerspective;perspectiveSelect;baseSelect;filterSelect;classNameFilter;selectedSizeText;popoverHelper;currentPerspectiveIndex;currentPerspective;dataGrid;searchThrottler;baseProfile;trackingOverviewGrid;currentSearchResultIndex=-1;currentQuery;constructor(e,t){super(Mt(kt.heapSnapshot)),this.searchResults=[],this.element.classList.add("heap-snapshot-view"),this.profile=t,this.linkifier=new d.Linkifier.Linkifier;const i=t.profileType();i.addEventListener("SnapshotReceived",this.onReceiveSnapshot,this),i.addEventListener(D.RemoveProfileHeader,this.onProfileHeaderRemoved,this);const n=i.id===At.TypeId;n&&this.createOverview();const a=Kt.trackingHeapSnapshotProfileType.recordAllocationStacksSetting().get();this.parentDataDisplayDelegate=e,this.searchableViewInternal=new s.SearchableView.SearchableView(this,null),this.searchableViewInternal.setPlaceholder(Mt(kt.find),Mt(kt.find)),this.searchableViewInternal.show(this.element),this.splitWidget=new s.SplitWidget.SplitWidget(!1,!0,"heapSnapshotSplitViewState",200,200),this.splitWidget.show(this.searchableViewInternal.element);const l=t.heapProfilerModel();let h;if(this.containmentDataGrid=new ft(l,this,Mt(kt.containment)),this.containmentDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.selectionChanged,this),this.containmentWidget=this.containmentDataGrid.asWidget(),this.containmentWidget.setMinimumSize(50,25),this.statisticsView=new _t,this.constructorsDataGrid=new vt(l,this),this.constructorsDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.selectionChanged,this),this.constructorsWidget=this.constructorsDataGrid.asWidget(),this.constructorsWidget.setMinimumSize(50,25),this.diffDataGrid=new wt(l,this),this.diffDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.selectionChanged,this),this.diffWidget=this.diffDataGrid.asWidget(),this.diffWidget.setMinimumSize(50,25),this.allocationDataGrid=null,n&&a&&(this.allocationDataGrid=new St(l,this),this.allocationDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.onSelectAllocationNode,this),this.allocationWidget=this.allocationDataGrid.asWidget(),this.allocationWidget.setMinimumSize(50,25),this.allocationStackView=new Jt(l),this.allocationStackView.setMinimumSize(50,25),this.tabbedPane=new s.TabbedPane.TabbedPane),this.retainmentDataGrid=new gt(l,this),this.retainmentWidget=this.retainmentDataGrid.asWidget(),this.retainmentWidget.setMinimumSize(50,21),this.retainmentWidget.element.classList.add("retaining-paths-view"),this.allocationStackView)this.tabbedPane=new s.TabbedPane.TabbedPane,this.tabbedPane.appendTab("retainers",Mt(kt.retainers),this.retainmentWidget),this.tabbedPane.appendTab("allocation-stack",Mt(kt.allocationStack),this.allocationStackView),h=this.tabbedPane.headerElement(),this.objectDetailsView=this.tabbedPane;else{const e=document.createElement("div");e.classList.add("heap-snapshot-view-resizer");const t=e.createChild("div","title");e.createChild("div","verticalResizerIcon");t.createChild("span").textContent=Mt(kt.retainers),h=e,this.objectDetailsView=new s.Widget.VBox,this.objectDetailsView.element.appendChild(e),this.retainmentWidget.show(this.objectDetailsView.element)}this.splitWidget.hideDefaultResizer(),this.splitWidget.installResizer(h),this.retainmentDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.inspectedObjectChanged,this),this.retainmentDataGrid.reset(),this.perspectives=[],this.comparisonPerspective=new zt,this.perspectives.push(new Ot),t.profileType()!==Kt.trackingHeapSnapshotProfileType&&this.perspectives.push(this.comparisonPerspective),this.perspectives.push(new Bt),this.allocationWidget&&this.perspectives.push(new Gt),this.perspectives.push(new Vt),this.perspectiveSelect=new s.Toolbar.ToolbarComboBox(this.onSelectedPerspectiveChanged.bind(this),Mt(kt.perspective)),this.updatePerspectiveOptions(),this.baseSelect=new s.Toolbar.ToolbarComboBox(this.changeBase.bind(this),Mt(kt.baseSnapshot)),this.baseSelect.setVisible(!1),this.updateBaseOptions(),this.filterSelect=new s.Toolbar.ToolbarComboBox(this.changeFilter.bind(this),Mt(kt.filter)),this.filterSelect.setVisible(!1),this.updateFilterOptions(),this.classNameFilter=new s.Toolbar.ToolbarInput(Mt(kt.classFilter)),this.classNameFilter.setVisible(!1),this.constructorsDataGrid.setNameFilter(this.classNameFilter),this.diffDataGrid.setNameFilter(this.classNameFilter),this.selectedSizeText=new s.Toolbar.ToolbarText,this.popoverHelper=new s.PopoverHelper.PopoverHelper(this.element,this.getPopoverRequest.bind(this)),this.popoverHelper.setDisableOnClick(!0),this.popoverHelper.setHasPadding(!0),this.element.addEventListener("scroll",this.popoverHelper.hidePopover.bind(this.popoverHelper),!0),this.currentPerspectiveIndex=0,this.currentPerspective=this.perspectives[0],this.currentPerspective.activate(this),this.dataGrid=this.currentPerspective.masterGrid(this),this.populate(),this.searchThrottler=new o.Throttler.Throttler(0);for(const e of this.profiles())e.addEventListener(k.ProfileTitleChanged,this.updateControls,this)}createOverview(){const e=this.profile.profileType();this.trackingOverviewGrid=new Re,this.trackingOverviewGrid.addEventListener("IdsRangeChanged",this.onIdsRangeChanged.bind(this)),this.profile.fromFile()||e.profileBeingRecorded()!==this.profile||(e.addEventListener("HeapStatsUpdate",this.onHeapStatsUpdate,this),e.addEventListener("TrackingStopped",this.onStopTracking,this),this.trackingOverviewGrid.start())}onStopTracking(){const e=this.profile.profileType();e.removeEventListener("HeapStatsUpdate",this.onHeapStatsUpdate,this),e.removeEventListener("TrackingStopped",this.onStopTracking,this),this.trackingOverviewGrid&&this.trackingOverviewGrid.stop()}onHeapStatsUpdate({data:e}){this.trackingOverviewGrid&&this.trackingOverviewGrid.setSamples(e)}searchableView(){return this.searchableViewInternal}showProfile(e){return this.parentDataDisplayDelegate.showProfile(e)}showObject(e,t){Number(e)<=this.profile.maxJSObjectId?this.selectLiveObject(t,e):this.parentDataDisplayDelegate.showObject(e,t)}async linkifyObject(e){const t=this.profile.heapProfilerModel();if(!t)return null;const i=await this.profile.getLocation(e);if(!i)return null;const r=t.runtimeModel().debuggerModel().createRawLocationByScriptId(String(i.scriptId),i.lineNumber,i.columnNumber);if(!r)return null;const s=r.script(),o=s&&s.sourceURL;return o&&this.linkifier?this.linkifier.linkifyRawLocation(r,o):null}async populate(){const e=await this.profile.loadPromise;if(this.retrieveStatistics(e),this.dataGrid&&this.dataGrid.setDataSource(e,0),this.profile.profileType().id===At.TypeId&&this.profile.fromFile()){const t=await e.getSamples();if(t){console.assert(Boolean(t.timestamps.length));const e=new Ne;e.sizes=t.sizes,e.ids=t.lastAssignedIds,e.timestamps=t.timestamps,e.max=t.sizes,e.totalTime=Math.max(t.timestamps[t.timestamps.length-1]||0,1e4),this.trackingOverviewGrid&&this.trackingOverviewGrid.setSamples(e)}}const t=this.profiles().indexOf(this.profile);this.baseSelect.setSelectedIndex(Math.max(0,t-1)),this.trackingOverviewGrid&&this.trackingOverviewGrid.updateGrid()}async retrieveStatistics(e){const t=await e.getStatistics(),i=[{value:t.code,color:"#f77",title:Mt(kt.code)},{value:t.strings,color:"#5e5",title:Mt(kt.strings)},{value:t.jsArrays,color:"#7af",title:Mt(kt.jsArrays)},{value:t.native,color:"#fc5",title:Mt(kt.typedArrays)},{value:t.system,color:"#98f",title:Mt(kt.systemObjects)}];return this.statisticsView.setTotalAndRecords(t.total,i),t}onIdsRangeChanged(t){const{minId:i,maxId:r}=t.data;this.selectedSizeText.setText(Mt(kt.selectedSizeS,{PH1:e.NumberUtilities.bytesToString(t.data.size)})),this.constructorsDataGrid.snapshot&&this.constructorsDataGrid.setSelectionRange(i,r)}async toolbarItems(){const e=[this.perspectiveSelect,this.classNameFilter];return this.profile.profileType()!==Kt.trackingHeapSnapshotProfileType&&e.push(this.baseSelect,this.filterSelect),e.push(this.selectedSizeText),e}willHide(){this.currentSearchResultIndex=-1,this.popoverHelper.hidePopover()}supportsCaseSensitiveSearch(){return!0}supportsRegexSearch(){return!1}onSearchCanceled(){this.currentSearchResultIndex=-1,this.searchResults=[]}selectRevealedNode(e){e&&e.select()}performSearch(e,t,i){const r=new p.HeapSnapshotModel.SearchConfig(e.query.trim(),e.caseSensitive,e.isRegex,t,i||!1);this.searchThrottler.schedule(this.performSearchInternal.bind(this,r))}async performSearchInternal(e){if(this.onSearchCanceled(),!this.currentPerspective.supportsSearch())return;this.currentQuery=e;const t=e.query.trim();if(!t)return;if("@"===t.charAt(0)){const e=parseInt(t.substring(1),10);if(isNaN(e))return;if(!this.dataGrid)return;const i=await this.dataGrid.revealObjectByHeapSnapshotId(String(e));return void this.selectRevealedNode(i)}if(!this.profile.snapshotProxy||!this.dataGrid)return;const i=this.dataGrid.nodeFilter();this.searchResults=i?await this.profile.snapshotProxy.search(this.currentQuery,i):[],this.searchableViewInternal.updateSearchMatchesCount(this.searchResults.length),this.searchResults.length&&(this.currentSearchResultIndex=e.jumpBackward?this.searchResults.length-1:0),await this.jumpToSearchResult(this.currentSearchResultIndex)}jumpToNextSearchResult(){this.searchResults.length&&(this.currentSearchResultIndex=(this.currentSearchResultIndex+1)%this.searchResults.length,this.searchThrottler.schedule(this.jumpToSearchResult.bind(this,this.currentSearchResultIndex)))}jumpToPreviousSearchResult(){this.searchResults.length&&(this.currentSearchResultIndex=(this.currentSearchResultIndex+this.searchResults.length-1)%this.searchResults.length,this.searchThrottler.schedule(this.jumpToSearchResult.bind(this,this.currentSearchResultIndex)))}async jumpToSearchResult(e){if(this.searchableViewInternal.updateCurrentMatchIndex(e),-1===e)return;if(!this.dataGrid)return;const t=await this.dataGrid.revealObjectByHeapSnapshotId(String(this.searchResults[e]));this.selectRevealedNode(t)}refreshVisibleData(){if(!this.dataGrid)return;let e=this.dataGrid.rootNode().children[0];for(;e;)e.refresh(),e=e.traverseNextNode(!1,null,!0)}changeBase(){if(this.baseProfile===this.profiles()[this.baseSelect.selectedIndex()])return;this.baseProfile=this.profiles()[this.baseSelect.selectedIndex()];const e=this.dataGrid;e.snapshot&&this.baseProfile.loadPromise.then(e.setBaseDataSource.bind(e)),this.currentQuery&&this.searchResults&&this.performSearch(this.currentQuery,!1)}changeFilter(){const e=this.filterSelect.selectedIndex()-1;this.dataGrid&&(this.dataGrid.filterSelectIndexChanged(this.profiles(),e),this.currentQuery&&this.searchResults&&this.performSearch(this.currentQuery,!1))}profiles(){return this.profile.profileType().getProfiles()}selectionChanged(e){const t=e.data;this.setSelectedNodeForDetailsView(t),this.inspectedObjectChanged(e)}onSelectAllocationNode(e){const t=e.data;this.constructorsDataGrid.setAllocationNodeId(t.allocationNodeId()),this.setSelectedNodeForDetailsView(null)}inspectedObjectChanged(e){const t=e.data,i=this.profile.heapProfilerModel();i&&t instanceof Ye&&i.addInspectedHeapObject(String(t.snapshotNodeId))}setSelectedNodeForDetailsView(e){const t=e&&e.retainersDataSource();t?(this.retainmentDataGrid.setDataSource(t.snapshot,t.snapshotNodeIndex),this.allocationStackView&&this.allocationStackView.setAllocatedObject(t.snapshot,t.snapshotNodeIndex)):(this.allocationStackView&&this.allocationStackView.clear(),this.retainmentDataGrid.reset())}async changePerspectiveAndWait(e){const t=this.perspectives.findIndex((t=>t.title()===e));if(-1===t||this.currentPerspectiveIndex===t)return;const i=this.perspectives[t].masterGrid(this);if(!i)return;const r=i.once(pt.ContentShown),s=this.perspectiveSelect.options().find((e=>e.value===String(t)));this.perspectiveSelect.select(s),this.changePerspective(t),await r}async updateDataSourceAndView(){const e=this.dataGrid;if(!e||e.snapshot)return;const t=await this.profile.loadPromise;if(this.dataGrid!==e)return;if(e.snapshot!==t&&e.setDataSource(t,0),e!==this.diffDataGrid)return;this.baseProfile||(this.baseProfile=this.profiles()[this.baseSelect.selectedIndex()]);const i=await this.baseProfile.loadPromise;this.diffDataGrid.baseSnapshot!==i&&this.diffDataGrid.setBaseDataSource(i)}onSelectedPerspectiveChanged(e){this.changePerspective(Number(e.target.selectedOptions[0].value))}changePerspective(e){if(e===this.currentPerspectiveIndex)return;this.currentPerspectiveIndex=e,this.currentPerspective.deactivate(this);const t=this.perspectives[e];this.currentPerspective=t,this.dataGrid=t.masterGrid(this),t.activate(this),this.refreshVisibleData(),this.dataGrid&&this.dataGrid.updateWidths(),this.updateDataSourceAndView(),this.currentQuery&&this.searchResults&&this.performSearch(this.currentQuery,!1)}async selectLiveObject(e,t){if(await this.changePerspectiveAndWait(e),!this.dataGrid)return;const i=await this.dataGrid.revealObjectByHeapSnapshotId(t);i?i.select():o.Console.Console.instance().error("Cannot find corresponding heap snapshot node")}getPopoverRequest(e){const t=s.UIUtils.enclosingNodeOrSelfWithNodeName(e.target,"span"),i=s.UIUtils.enclosingNodeOrSelfWithNodeName(e.target,"tr");if(!i)return null;if(!this.dataGrid)return null;const r=this.dataGrid.dataGridNodeFromNode(i)||this.containmentDataGrid.dataGridNodeFromNode(i)||this.constructorsDataGrid.dataGridNodeFromNode(i)||this.diffDataGrid.dataGridNodeFromNode(i)||this.allocationDataGrid&&this.allocationDataGrid.dataGridNodeFromNode(i)||this.retainmentDataGrid.dataGridNodeFromNode(i),o=this.profile.heapProfilerModel();if(!r||!t||!o)return null;let n;return{box:t.boxInWindow(),show:async e=>{if(!o)return!1;const t=await r.queryObjectContent(o,"popover");return!!t&&(n=await u.ObjectPopoverHelper.ObjectPopoverHelper.buildObjectPopover(t,e),!!n||(o.runtimeModel().releaseObjectGroup("popover"),!1))},hide:()=>{o.runtimeModel().releaseObjectGroup("popover"),n&&n.dispose()}}}updatePerspectiveOptions(){const e=this.profiles().length>1;this.perspectiveSelect.removeOptions(),this.perspectives.forEach(((t,i)=>{(e||t!==this.comparisonPerspective)&&this.perspectiveSelect.createOption(t.title(),String(i))}))}updateBaseOptions(){const e=this.profiles(),t=this.baseSelect.selectedIndex();this.baseSelect.removeOptions();for(const t of e)this.baseSelect.createOption(t.title);t>-1&&this.baseSelect.setSelectedIndex(t)}updateFilterOptions(){const e=this.profiles(),t=this.filterSelect.selectedIndex();this.filterSelect.removeOptions(),this.filterSelect.createOption(Mt(kt.allObjects));for(let t=0;t-1&&this.filterSelect.setSelectedIndex(t)}updateControls(){this.updatePerspectiveOptions(),this.updateBaseOptions(),this.updateFilterOptions()}onReceiveSnapshot(e){this.updateControls();e.data.addEventListener(k.ProfileTitleChanged,this.updateControls,this)}onProfileHeaderRemoved(e){const t=e.data;t.removeEventListener(k.ProfileTitleChanged,this.updateControls,this),this.profile===t?(this.detach(),this.profile.profileType().removeEventListener("SnapshotReceived",this.onReceiveSnapshot,this),this.profile.profileType().removeEventListener(D.RemoveProfileHeader,this.onProfileHeaderRemoved,this),this.dispose()):this.updateControls()}dispose(){this.linkifier.dispose(),this.popoverHelper.dispose(),this.allocationStackView&&(this.allocationStackView.clear(),this.allocationDataGrid&&this.allocationDataGrid.dispose()),this.onStopTracking(),this.trackingOverviewGrid&&this.trackingOverviewGrid.removeEventListener("IdsRangeChanged",this.onIdsRangeChanged.bind(this))}}class jt{titleInternal;constructor(e){this.titleInternal=e}activate(e){}deactivate(e){e.baseSelect.setVisible(!1),e.filterSelect.setVisible(!1),e.classNameFilter.setVisible(!1),e.trackingOverviewGrid&&e.trackingOverviewGrid.detach(),e.allocationWidget&&e.allocationWidget.detach(),e.statisticsView&&e.statisticsView.detach(),e.splitWidget.detach(),e.splitWidget.detachChildWidgets()}masterGrid(e){return null}title(){return this.titleInternal}supportsSearch(){return!1}}class Ot extends jt{constructor(){super(Mt(kt.summary))}activate(e){e.splitWidget.setMainWidget(e.constructorsWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView),e.splitWidget.show(e.searchableViewInternal.element),e.filterSelect.setVisible(!0),e.classNameFilter.setVisible(!0),e.trackingOverviewGrid&&(e.trackingOverviewGrid.show(e.searchableViewInternal.element,e.splitWidget.element),e.trackingOverviewGrid.update(),e.trackingOverviewGrid.updateGrid())}masterGrid(e){return e.constructorsDataGrid}supportsSearch(){return!0}}class zt extends jt{constructor(){super(Mt(kt.comparison))}activate(e){e.splitWidget.setMainWidget(e.diffWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView),e.splitWidget.show(e.searchableViewInternal.element),e.baseSelect.setVisible(!0),e.classNameFilter.setVisible(!0)}masterGrid(e){return e.diffDataGrid}supportsSearch(){return!0}}class Bt extends jt{constructor(){super(Mt(kt.containment))}activate(e){e.splitWidget.setMainWidget(e.containmentWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView),e.splitWidget.show(e.searchableViewInternal.element)}masterGrid(e){return e.containmentDataGrid}}class Gt extends jt{allocationSplitWidget;constructor(){super(Mt(kt.allocation)),this.allocationSplitWidget=new s.SplitWidget.SplitWidget(!1,!0,"heapSnapshotAllocationSplitViewState",200,200),this.allocationSplitWidget.setSidebarWidget(new s.Widget.VBox)}activate(e){e.allocationWidget&&this.allocationSplitWidget.setMainWidget(e.allocationWidget),e.splitWidget.setMainWidget(e.constructorsWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView);const t=new s.Widget.VBox,i=document.createElement("div");i.classList.add("heap-snapshot-view-resizer");const r=i.createChild("div","title").createChild("span");if(i.createChild("div","verticalResizerIcon"),r.textContent=Mt(kt.liveObjects),this.allocationSplitWidget.hideDefaultResizer(),this.allocationSplitWidget.installResizer(i),t.element.appendChild(i),e.splitWidget.show(t.element),this.allocationSplitWidget.setSidebarWidget(t),this.allocationSplitWidget.show(e.searchableViewInternal.element),e.constructorsDataGrid.clear(),e.allocationDataGrid){const t=e.allocationDataGrid.selectedNode;t&&e.constructorsDataGrid.setAllocationNodeId(t.allocationNodeId())}}deactivate(e){this.allocationSplitWidget.detach(),super.deactivate(e)}masterGrid(e){return e.allocationDataGrid}}class Vt extends jt{constructor(){super(Mt(kt.statistics))}activate(e){e.statisticsView.show(e.searchableViewInternal.element)}masterGrid(e){return null}}class Ut extends(o.ObjectWrapper.eventMixin(L)){exposeInternals;captureNumericValue;customContentInternal;constructor(e,t){super(e||Ut.TypeId,t||Mt(kt.heapSnapshot)),l.TargetManager.TargetManager.instance().observeModels(l.HeapProfilerModel.HeapProfilerModel,this),l.TargetManager.TargetManager.instance().addModelListener(l.HeapProfilerModel.HeapProfilerModel,l.HeapProfilerModel.Events.ResetProfiles,this.resetProfiles,this),l.TargetManager.TargetManager.instance().addModelListener(l.HeapProfilerModel.HeapProfilerModel,l.HeapProfilerModel.Events.AddHeapSnapshotChunk,this.addHeapSnapshotChunk,this),l.TargetManager.TargetManager.instance().addModelListener(l.HeapProfilerModel.HeapProfilerModel,l.HeapProfilerModel.Events.ReportHeapSnapshotProgress,this.reportHeapSnapshotProgress,this),this.exposeInternals=o.Settings.Settings.instance().createSetting("exposeInternals",!1),this.captureNumericValue=o.Settings.Settings.instance().createSetting("captureNumericValue",!1),this.customContentInternal=null}modelAdded(e){e.enable()}modelRemoved(e){}getProfiles(){return super.getProfiles()}fileExtension(){return".heapsnapshot"}get buttonTooltip(){return Mt(kt.takeHeapSnapshot)}isInstantProfile(){return!0}buttonClicked(){return this.takeHeapSnapshot(),a.userMetrics.actionTaken(a.UserMetrics.Action.ProfilesHeapProfileTaken),!1}get treeItemTitle(){return Mt(kt.heapSnapshots)}get description(){return Mt(kt.heapSnapshotProfilesShowMemory)}customContent(){const e=document.createElement("div"),t=c.Runtime.experiments.isEnabled("showOptionToExposeInternalsInHeapSnapshot"),i=!t;if(t){const t=s.SettingsUI.createSettingCheckbox(Mt(kt.exposeInternals),this.exposeInternals,i);e.appendChild(t)}const r=s.SettingsUI.createSettingCheckbox(Mt(kt.captureNumericValue),this.captureNumericValue,i);return e.appendChild(r),this.customContentInternal=e,e}setCustomContentEnabled(e){this.customContentInternal&&this.customContentInternal.querySelectorAll("[is=dt-checkbox]").forEach((t=>{t.checkboxElement.disabled=!e}))}createProfileLoadedFromFile(e){return new Wt(null,this,e)}async takeHeapSnapshot(){if(this.profileBeingRecorded())return;const e=s.Context.Context.instance().flavor(l.HeapProfilerModel.HeapProfilerModel);if(!e)return;let t=new Wt(e,this);this.setProfileBeingRecorded(t),this.addProfile(t),t.updateStatus(Mt(kt.snapshotting)),await e.takeHeapSnapshot({reportProgress:!0,captureNumericValue:this.captureNumericValue.get(),exposeInternals:this.exposeInternals.get()}),t=this.profileBeingRecorded(),t&&(t.title=Mt(kt.snapshotD,{PH1:t.uid}),t.finishLoad(),this.setProfileBeingRecorded(null),this.dispatchEventToListeners(D.ProfileComplete,t))}addHeapSnapshotChunk(e){const t=this.profileBeingRecorded();t&&t.transferChunk(e.data)}reportHeapSnapshotProgress(e){const t=this.profileBeingRecorded();if(!t)return;const{done:i,total:r,finished:s}=e.data;t.updateStatus(Mt(kt.percentagePlaceholder,{PH1:(i/r*100).toFixed(0)}),!0),s&&t.prepareToLoad()}resetProfiles(e){const t=e.data;for(const e of this.getProfiles())e.heapProfilerModel()===t&&this.removeProfile(e)}snapshotReceived(e){this.profileBeingRecorded()===e&&this.setProfileBeingRecorded(null),this.dispatchEventToListeners("SnapshotReceived",e)}static TypeId="HEAP";static SnapshotReceived="SnapshotReceived"}class At extends(o.ObjectWrapper.eventMixin(Ut)){recordAllocationStacksSettingInternal;customContentInternal;recording;profileSamples;constructor(){super(At.TypeId,Mt(kt.allocationInstrumentationOn)),this.recordAllocationStacksSettingInternal=o.Settings.Settings.instance().createSetting("recordAllocationStacks",!1),this.customContentInternal=null,this.recording=!1}modelAdded(e){super.modelAdded(e),e.addEventListener(l.HeapProfilerModel.Events.HeapStatsUpdate,this.heapStatsUpdate,this),e.addEventListener(l.HeapProfilerModel.Events.LastSeenObjectId,this.lastSeenObjectId,this)}modelRemoved(e){super.modelRemoved(e),e.removeEventListener(l.HeapProfilerModel.Events.HeapStatsUpdate,this.heapStatsUpdate,this),e.removeEventListener(l.HeapProfilerModel.Events.LastSeenObjectId,this.lastSeenObjectId,this)}heapStatsUpdate(e){if(!this.profileSamples)return;const t=e.data;let i;for(let e=0;e{this.fulfillLoad=e})),this.totalNumberOfChunks=0,this.bufferedWriter=null,this.onTempFileReady=null}heapProfilerModel(){return this.heapProfilerModelInternal}async getLocation(e){return this.snapshotProxy?this.snapshotProxy.getLocation(e):null}createSidebarTreeElement(e){return new A(e,this,"heap-snapshot-sidebar-tree-item")}createView(e){return new Lt(e,this)}prepareToLoad(){console.assert(!this.receiver,"Already loading"),this.setupWorker(),this.updateStatus(Mt(kt.loading),!0)}finishLoad(){!this.wasDisposed&&this.receiver&&this.receiver.close(),this.bufferedWriter&&this.didWriteToTempFile(this.bufferedWriter)}didWriteToTempFile(e){this.wasDisposed?e&&e.remove():(this.tempFile=e,e||(this.failedToCreateTempFile=!0),this.onTempFileReady&&(this.onTempFileReady(),this.onTempFileReady=null))}setupWorker(){console.assert(!this.workerProxy,"HeapSnapshotWorkerProxy already exists"),this.workerProxy=new xt(this.handleWorkerEvent.bind(this)),this.workerProxy.addEventListener("Wait",(e=>{this.updateStatus(null,e.data)}),this),this.receiver=this.workerProxy.createLoader(this.uid,this.snapshotReceived.bind(this))}handleWorkerEvent(e,i){if(p.HeapSnapshotModel.HeapSnapshotProgressEvent.BrokenSnapshot===e){const e=i;return void o.Console.Console.instance().error(e)}if(p.HeapSnapshotModel.HeapSnapshotProgressEvent.Update!==e)return;const r=i,s=t.i18n.deserializeUIString(r);this.updateStatus(Ht(s.string,s.values))}dispose(){this.workerProxy&&this.workerProxy.dispose(),this.removeTempFile(),this.wasDisposed=!0}didCompleteSnapshotTransfer(){this.snapshotProxy&&this.updateStatus(e.NumberUtilities.bytesToString(this.snapshotProxy.totalSize),!1)}transferChunk(e){this.bufferedWriter||(this.bufferedWriter=new h.TempFile.TempFile),this.bufferedWriter.write([e]),++this.totalNumberOfChunks,this.receiver&&this.receiver.write(e)}snapshotReceived(e){this.wasDisposed||(this.receiver=null,this.snapshotProxy=e,this.maxJSObjectId=e.maxJSObjectId(),this.didCompleteSnapshotTransfer(),this.workerProxy&&this.workerProxy.startCheckingForLongRunningCalls(),this.notifySnapshotReceived())}notifySnapshotReceived(){this.snapshotProxy&&this.fulfillLoad&&this.fulfillLoad(this.snapshotProxy),this.profileType().snapshotReceived(this),this.canSaveToFile()&&this.dispatchEventToListeners(k.ProfileReceived)}canSaveToFile(){return!this.fromFile()&&Boolean(this.snapshotProxy)}saveToFile(){const t=new h.FileUtils.FileOutputStream;this.fileName=this.fileName||"Heap-"+e.DateUtilities.toISO8601Compact(new Date)+this.profileType().fileExtension();const i=async e=>{if(e){if(this.failedToCreateTempFile)return o.Console.Console.instance().error("Failed to open temp file with heap snapshot"),void t.close();if(this.tempFile){const e=await this.tempFile.copyToOutputStream(t,this.onChunkTransferred.bind(this));return e&&o.Console.Console.instance().error("Failed to read heap snapshot from temp file: "+e.message),void this.didCompleteSnapshotTransfer()}this.onTempFileReady=()=>{i(e)},this.updateSaveProgress(0,1)}};t.open(this.fileName).then(i.bind(this))}onChunkTransferred(e){this.updateSaveProgress(e.loadedSize(),e.fileSize())}updateSaveProgress(e,t){const i=(100*(t&&e/t)).toFixed(0);this.updateStatus(Mt(kt.savingD,{PH1:i}))}async loadFromFile(e){this.updateStatus(Mt(kt.loading),!0),this.setupWorker();const t=new h.FileUtils.ChunkedFileReader(e,1e7),i=await t.read(this.receiver);if(!i){const e=t.error();e&&this.updateStatus(e.message)}return i?null:t.error()}profileType(){return super.profileType()}}class _t extends s.Widget.VBox{pieChart;constructor(){super(),this.element.classList.add("heap-snapshot-statistics-view"),this.pieChart=new n.PieChart.PieChart,this.setTotalAndRecords(0,[]),this.pieChart.classList.add("heap-snapshot-stats-pie-chart"),this.element.appendChild(this.pieChart)}static valueFormatter(t){return Mt(kt.sKb,{PH1:e.NumberUtilities.withThousandsSeparator(Math.round(t/1e3))})}setTotalAndRecords(e,t){this.pieChart.data={chartName:Mt(kt.heapMemoryUsage),size:150,formatter:_t.valueFormatter,showLegend:!0,total:e,slices:t}}}class Jt extends s.Widget.Widget{heapProfilerModel;linkifier;frameElements;constructor(e){super(),this.heapProfilerModel=e,this.linkifier=new d.Linkifier.Linkifier,this.frameElements=[]}onContextMenu(e,t){const i=new s.ContextMenu.ContextMenu(t);i.containsTarget(e)||i.appendApplicableItems(e),i.show(),t.consume(!0)}onStackViewKeydown(e){const t=e.target;if(!t)return;if("Enter"===e.key){const i=$t.get(t);if(!i)return;const r=d.Linkifier.Linkifier.linkInfo(i);if(!r)return;return void(d.Linkifier.Linkifier.invokeFirstAction(r)&&e.consume(!0))}let i;const r=e;if("ArrowUp"===r.key)i=!1;else{if("ArrowDown"!==r.key)return;i=!0}const s=this.frameElements.indexOf(t);if(-1===s)return;const o=i?s+1:s-1;if(o<0||o>=this.frameElements.length)return;const n=this.frameElements[o];n.tabIndex=0,t.tabIndex=-1,n.focus(),e.consume(!0)}async setAllocatedObject(e,t){this.clear();const i=await e.allocationStack(t);if(!i){const e=this.element.createChild("div","no-heap-allocation-stack");return void s.UIUtils.createTextChild(e,Mt(kt.stackWasNotRecordedForThisObject))}const r=this.element.createChild("div","heap-allocation-stack");r.addEventListener("keydown",this.onStackViewKeydown.bind(this),!1);for(const e of i){const t=r.createChild("div","stack-frame");this.frameElements.push(t),t.tabIndex=-1;if(t.createChild("div").textContent=s.UIUtils.beautifyFunctionName(e.functionName),!e.scriptId)continue;const i=this.heapProfilerModel?this.heapProfilerModel.target():null,o={columnNumber:e.column-1,inlineFrameIndex:0},n=this.linkifier.linkifyScriptLocation(i,String(e.scriptId),e.scriptName,e.line-1,o);t.appendChild(n),$t.set(t,n),t.addEventListener("contextmenu",this.onContextMenu.bind(this,n))}this.frameElements[0].tabIndex=0}clear(){this.element.removeChildren(),this.frameElements=[],this.linkifier.reset()}}const $t=new WeakMap;var qt=Object.freeze({__proto__:null,HeapSnapshotView:Lt,Perspective:jt,SummaryPerspective:Ot,ComparisonPerspective:zt,ContainmentPerspective:Bt,AllocationPerspective:Gt,StatisticsPerspective:Vt,HeapSnapshotProfileType:Ut,TrackingHeapSnapshotProfileType:At,HeapProfileHeader:Wt,HeapSnapshotStatisticsView:_t,HeapAllocationStackView:Jt});class Qt{cpuProfileType;heapSnapshotProfileType;samplingHeapProfileType;trackingHeapSnapshotProfileType;constructor(){this.cpuProfileType=new oe,this.heapSnapshotProfileType=new Ut,this.samplingHeapProfileType=new Be,this.trackingHeapSnapshotProfileType=new At}}const Kt=new Qt;var Yt=Object.freeze({__proto__:null,ProfileTypeRegistry:Qt,instance:Kt});const Zt={clearAllProfiles:"Clear all profiles",cantLoadFileSupportedFile:"Can’t load file. Supported file extensions: ''{PH1}''.",cantLoadProfileWhileAnother:"Can’t load profile while another profile is being recorded.",profileLoadingFailedS:"Profile loading failed: {PH1}.",load:"Load…",runD:"Run {PH1}",profiles:"Profiles",deprecationWarnMsg:"This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles.",learnMore:"Learn more",feedback:"Feedback",goToPerformancePanel:"Go to Performance Panel",enableThisPanelTemporarily:"Enable this panel temporarily"},Xt=t.i18n.registerUIStrings("panels/profiler/ProfilesPanel.ts",Zt),ei=t.i18n.getLocalizedString.bind(void 0,Xt);class ti extends s.Panel.PanelWithSidebar{profileTypes;profilesItemTreeElement;sidebarTree;profileViews;toolbarElement;toggleRecordAction;toggleRecordButton;clearResultsButton;profileViewToolbar;profileGroups;launcherView;visibleView;profileToView;typeIdToSidebarSection;fileSelectorElement;selectedProfileType;constructor(e,t,i){super(e),this.profileTypes=t;const r=new s.Widget.VBox;this.splitWidget().setMainWidget(r),this.profilesItemTreeElement=new oi(this),this.sidebarTree=new s.TreeOutline.TreeOutlineInShadow,this.sidebarTree.element.classList.add("profiles-sidebar-tree-box"),this.panelSidebarElement().appendChild(this.sidebarTree.element),this.sidebarTree.appendChild(this.profilesItemTreeElement),this.sidebarTree.element.addEventListener("keydown",this.onKeyDown.bind(this),!1),this.profileViews=document.createElement("div"),this.profileViews.id="profile-views",this.profileViews.classList.add("vbox"),r.element.appendChild(this.profileViews),this.toolbarElement=document.createElement("div"),this.toolbarElement.classList.add("profiles-toolbar"),r.element.insertBefore(this.toolbarElement,r.element.firstChild),this.panelSidebarElement().classList.add("profiles-tree-sidebar");const o=document.createElement("div");o.classList.add("profiles-toolbar"),this.panelSidebarElement().insertBefore(o,this.panelSidebarElement().firstChild);const n=new s.Toolbar.Toolbar("",o);this.toggleRecordAction=s.ActionRegistry.ActionRegistry.instance().action(i),this.toggleRecordButton=s.Toolbar.Toolbar.createActionButton(this.toggleRecordAction),n.appendToolbarItem(this.toggleRecordButton),this.clearResultsButton=new s.Toolbar.ToolbarButton(ei(Zt.clearAllProfiles),"clear"),this.clearResultsButton.addEventListener(s.Toolbar.ToolbarButton.Events.Click,this.reset,this),n.appendToolbarItem(this.clearResultsButton),n.appendSeparator(),n.appendToolbarItem(s.Toolbar.Toolbar.createActionButtonForId("components.collect-garbage")),this.profileViewToolbar=new s.Toolbar.Toolbar("",this.toolbarElement),this.profileViewToolbar.makeWrappable(!0),this.profileGroups={},this.launcherView=new xe(this),this.launcherView.addEventListener(ye.ProfileTypeSelected,this.onProfileTypeSelected,this),this.profileToView=[],this.typeIdToSidebarSection={};const a=this.profileTypes;for(let e=0;eBoolean(t.fileExtension())&&e.endsWith(t.fileExtension()||"")))||null}async loadFromFile(e){this.createFileSelectorElement();const t=this.findProfileTypeByExtension(e.name);if(!t){const e=new Set(this.profileTypes.map((e=>e.fileExtension())).filter((e=>e)));return void o.Console.Console.instance().error(ei(Zt.cantLoadFileSupportedFile,{PH1:Array.from(e).join("', '")}))}if(Boolean(t.profileBeingRecorded()))return void o.Console.Console.instance().error(ei(Zt.cantLoadProfileWhileAnother));const i=await t.loadFromFile(e);i&&"message"in i&&s.UIUtils.MessageDialog.show(ei(Zt.profileLoadingFailedS,{PH1:i.message}))}toggleRecord(){if(!this.toggleRecordAction.enabled())return!0;const t=e.DOMUtilities.deepActiveElement(this.element.ownerDocument),i=this.selectedProfileType;if(!i)return!0;const r=i.buttonClicked();return this.updateToggleRecordAction(r),r?(this.launcherView.profileStarted(),i.hasTemporaryView()&&this.showProfile(i.profileBeingRecorded())):this.launcherView.profileFinished(),t&&t.focus(),!0}onSuspendStateChanged(){this.updateToggleRecordAction(this.toggleRecordAction.toggled())}updateToggleRecordAction(e){const t=Boolean(s.Context.Context.instance().flavor(l.CPUProfilerModel.CPUProfilerModel)||s.Context.Context.instance().flavor(l.HeapProfilerModel.HeapProfilerModel)),i=e||!l.TargetManager.TargetManager.instance().allTargetsSuspended()&&t;this.toggleRecordAction.setEnabled(i),this.toggleRecordAction.setToggled(e),i?this.toggleRecordButton.setTitle(this.selectedProfileType?this.selectedProfileType.buttonTooltip:""):this.toggleRecordButton.setTitle(s.UIUtils.anotherProfilerActiveLabel()),this.selectedProfileType&&this.launcherView.updateProfileType(this.selectedProfileType,i)}profileBeingRecordedRemoved(){this.updateToggleRecordAction(!1),this.launcherView.profileFinished()}onProfileTypeSelected(e){this.selectedProfileType=e.data,this.updateProfileTypeSpecificUI()}updateProfileTypeSpecificUI(){this.updateToggleRecordAction(this.toggleRecordAction.toggled())}reset(){this.profileTypes.forEach((e=>e.reset())),delete this.visibleView,this.profileGroups={},this.updateToggleRecordAction(!1),this.launcherView.profileFinished(),this.sidebarTree.element.classList.remove("some-expandable"),this.launcherView.detach(),this.profileViews.removeChildren(),this.profileViewToolbar.removeToolbarItems(),this.clearResultsButton.element.classList.remove("hidden"),this.profilesItemTreeElement.select(),this.showLauncherView()}showLauncherView(){this.closeVisibleView(),this.profileViewToolbar.removeToolbarItems(),this.launcherView.show(this.profileViews),this.visibleView=this.launcherView,this.toolbarElement.classList.add("hidden")}registerProfileType(e){this.launcherView.addProfileType(e);const t=new ii(this,e);this.typeIdToSidebarSection[e.id]=t,this.sidebarTree.appendChild(t),t.childrenListElement.addEventListener("contextmenu",this.handleContextMenuEvent.bind(this),!1),e.addEventListener(D.ViewUpdated,this.updateProfileTypeSpecificUI,this),e.addEventListener(D.AddProfileHeader,(function(e){this.addProfileHeader(e.data)}),this),e.addEventListener(D.RemoveProfileHeader,(function(e){this.removeProfileHeader(e.data)}),this),e.addEventListener(D.ProfileComplete,(function(e){this.showProfile(e.data)}),this);const i=e.getProfiles();for(let e=0;e{e.map((e=>this.profileViewToolbar.appendToolbarItem(e)))})),t}showObject(e,t){}async linkifyObject(e){return null}viewForProfile(e){const t=this.indexOfViewForProfile(e);if(-1!==t)return this.profileToView[t].view;const i=e.createView(this);return i.element.classList.add("profile-view"),this.profileToView.push({profile:e,view:i}),i}indexOfViewForProfile(e){return this.profileToView.findIndex((t=>t.profile===e))}closeVisibleView(){this.visibleView&&this.visibleView.detach(),delete this.visibleView}focus(){this.sidebarTree.focus()}wasShown(){super.wasShown(),this.registerCSSFiles([he,pe,ce]),this.sidebarTree.registerCSSFiles([ue])}}class ii extends s.TreeOutline.TreeElement{dataDisplayDelegate;profileTreeElements;profileGroups;constructor(e,t){super(t.treeItemTitle,!0),this.selectable=!1,this.dataDisplayDelegate=e,this.profileTreeElements=[],this.profileGroups={},this.expand(),this.hidden=!0,this.setCollapsible(!1)}addProfileHeader(e){this.hidden=!1;const t=e.profileType();let i=this;const r=e.createSidebarTreeElement(this.dataDisplayDelegate);if(this.profileTreeElements.push(r),!e.fromFile()&&t.profileBeingRecorded()!==e){const t=e.title;let s=this.profileGroups[t];s||(s=new ri,this.profileGroups[t]=s),s.profileSidebarTreeElements.push(r);const o=s.profileSidebarTreeElements.length;if(2===o){s.sidebarTreeElement=new si(this.dataDisplayDelegate,e.title);const t=s.profileSidebarTreeElements[0],i=this.children().indexOf(t);this.insertChild(s.sidebarTreeElement,i);const r=t.selected;this.removeChild(t),s.sidebarTreeElement.appendChild(t),r&&t.revealAndSelect(),t.setSmall(!0),t.setMainTitle(ei(Zt.runD,{PH1:1})),this.treeOutline&&this.treeOutline.element.classList.add("some-expandable")}o>=2&&(i=s.sidebarTreeElement,r.setSmall(!0),r.setMainTitle(ei(Zt.runD,{PH1:o})))}i&&i.appendChild(r)}removeProfileHeader(e){const t=this.sidebarElementIndex(e);if(-1===t)return!1;const i=this.profileTreeElements[t];this.profileTreeElements.splice(t,1);let r=this;const s=this.profileGroups[e.title];if(s){const t=s.profileSidebarTreeElements;if(t.splice(t.indexOf(i),1),1===t.length){const i=r.children().indexOf(s.sidebarTreeElement);s.sidebarTreeElement&&s.sidebarTreeElement.removeChild(t[0]),this.insertChild(t[0],i),t[0].setSmall(!1),t[0].setMainTitle(e.title),s.sidebarTreeElement&&this.removeChild(s.sidebarTreeElement)}0!==t.length&&(r=s.sidebarTreeElement)}return r&&r.removeChild(i),i.dispose(),!this.childCount()&&(this.hidden=!0,!0)}sidebarElementForProfile(e){const t=this.sidebarElementIndex(e);return-1===t?null:this.profileTreeElements[t]}sidebarElementIndex(e){const t=this.profileTreeElements;for(let i=0;i0;if(e){const e=this.lastChild();e instanceof A&&this.dataDisplayDelegate.showProfile(e.profile)}return e}onattach(){this.listItemElement.classList.add("profile-group-sidebar-tree-item"),this.listItemElement.createChild("div","icon"),this.listItemElement.createChild("div","titles no-subtitle").createChild("span","title-container").createChild("span","title").textContent=this.profileTitle}}class oi extends s.TreeOutline.TreeElement{panel;constructor(e){super("",!1),this.selectable=!0,this.panel=e}onselect(){return this.panel.showLauncherView(),!0}onattach(){this.listItemElement.classList.add("profile-launcher-view-tree-item"),this.listItemElement.createChild("div","icon"),this.listItemElement.createChild("div","titles no-subtitle").createChild("span","title-container").createChild("span","title").textContent=ei(Zt.profiles)}}let ni;class ai extends ti{constructor(){super("js_profiler",[Kt.cpuProfileType],"profiler.js-toggle-recording"),this.splitWidget().mainWidget()?.setMinimumSize(350,0),c.Runtime.experiments.isEnabled("jsProfilerTemporarilyEnable")?this.#t():this.#i()}static instance(e={forceNew:null}){const{forceNew:t}=e;return ni&&!t||(ni=new ai),ni}#t(){function e(){a.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab("https://github.com/ChromeDevTools/rfcs/discussions/2")}const t=new s.Infobar.Infobar(s.Infobar.Type.Warning,ei(Zt.deprecationWarnMsg),[{text:ei(Zt.learnMore),highlight:!1,delegate:e,dismiss:!1},{text:ei(Zt.feedback),highlight:!1,delegate:e,dismiss:!1},{text:ei(Zt.goToPerformancePanel),highlight:!0,delegate:async function(){await s.InspectorView.InspectorView.instance().showPanel("timeline")},dismiss:!1}],void 0);t.setParentView(this),this.splitWidget().mainWidget()?.element.prepend(t.element)}#i(){const e=this.splitWidget().mainWidget();if(e?.detachChildWidgets(),e){const t=new s.Widget.VBox;t.contentElement.classList.add("empty-landing-page","fill");const i=t.contentElement.createChild("div");i.createChild("p").textContent="This panel is deprecated and will be removed in the next version. Use the Performance panel to record JavaScript CPU profiles.",i.createChild("p").textContent="You can temporarily enable this panel with Settings > Experiments > Enable JavaScript Profiler.",i.appendChild(s.UIUtils.createTextButton(ei(Zt.goToPerformancePanel),(async function(){await s.InspectorView.InspectorView.instance().showPanel("timeline")}),"infobar-button primary-button")),i.appendChild(s.UIUtils.createTextButton(ei(Zt.learnMore),(function(){a.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab("https://developer.chrome.com/blog/js-profiler-deprecation/")}))),i.appendChild(s.UIUtils.createTextButton(ei(Zt.feedback),(function(){a.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab("https://bugs.chromium.org/p/chromium/issues/detail?id=1354548")}))),i.appendChild(s.UIUtils.createTextButton(ei(Zt.enableThisPanelTemporarily),(async function(){await s.ViewManager.ViewManager.instance().showView("experiments");(await s.ViewManager.ViewManager.instance().view("experiments").widget()).setFilter("Enable JavaScript Profiler temporarily")}))),t.show(e.element)}}wasShown(){super.wasShown(),s.Context.Context.instance().setFlavor(ai,this)}willHide(){s.Context.Context.instance().setFlavor(ai,null)}handleAction(e,t){const i=s.Context.Context.instance().flavor(ai);if(!(i instanceof ai))throw new Error("non-null JSProfilerPanel expected!");return i.toggleRecord(),!0}}var li=Object.freeze({__proto__:null,ProfilesPanel:ti,ProfileTypeSidebarSection:ii,ProfileGroup:ri,ProfileGroupSidebarTreeElement:si,ProfilesSidebarTreeElement:oi,JSProfilerPanel:ai});const di={revealInSummaryView:"Reveal in Summary view"},hi=t.i18n.registerUIStrings("panels/profiler/HeapProfilerPanel.ts",di),ci=t.i18n.getLocalizedString.bind(void 0,hi);let pi;class ui extends ti{constructor(){const e=Kt;super("heap_profiler",[e.heapSnapshotProfileType,e.trackingHeapSnapshotProfileType,e.samplingHeapProfileType],"profiler.heap-toggle-recording")}static instance(){return pi||(pi=new ui),pi}appendApplicableItems(e,t,i){if(!(i instanceof l.RemoteObject.RemoteObject))return;if(!this.isShowing())return;const r=i;if(!r.objectId)return;const s=r.objectId;if(!Kt.heapSnapshotProfileType.getProfiles().length)return;const o=r.runtimeModel().heapProfilerModel();o&&t.revealSection().appendItem(ci(di.revealInSummaryView),function(e){o.snapshotObjectIdForObjectId(s).then((t=>{this.isShowing()&&t&&this.showObject(t,e)}))}.bind(this,"Summary"))}handleAction(e,t){const i=s.Context.Context.instance().flavor(ui);return console.assert(Boolean(i)&&i instanceof ui),i&&i.toggleRecord(),!0}wasShown(){super.wasShown(),s.Context.Context.instance().setFlavor(ui,this),a.userMetrics.panelLoaded("heap_profiler","DevTools.Launch.HeapProfiler")}willHide(){s.Context.Context.instance().setFlavor(ui,null)}showObject(e,t){const i=Kt.heapSnapshotProfileType.getProfiles();for(let r=0;r=parseInt(e,10)){this.showProfile(s);this.viewForProfile(s).selectLiveObject(t,e);break}}}}var mi=Object.freeze({__proto__:null,HeapProfilerPanel:ui});const fi=new CSSStyleSheet;fi.replaceSync(".data-grid{border:none}.data-grid td .size-units{margin-left:4px;font-size:75%}.data-grid tr:not(.selected) td .size-units{color:var(--color-text-secondary)}.toolbar{border-bottom:1px solid var(--color-details-hairline)}\n/*# sourceURL=liveHeapProfile.css */\n");const gi={jsHeap:"JS Heap",allocatedJsHeapSizeCurrentlyIn:"Allocated JS heap size currently in use",vms:"VMs",numberOfVmsSharingTheSameScript:"Number of VMs sharing the same script source",scriptUrl:"Script URL",urlOfTheScriptSource:"URL of the script source",heapProfile:"Heap Profile",anonymousScriptS:"(Anonymous Script {PH1})",kb:"kB"},vi=t.i18n.registerUIStrings("panels/profiler/LiveHeapProfileView.ts",gi),wi=t.i18n.getLocalizedString.bind(void 0,vi);let Si,bi;class Ci extends s.Widget.VBox{gridNodeByUrl;setting;toggleRecordAction;toggleRecordButton;startWithReloadButton;dataGrid;currentPollId;constructor(){super(!0),this.gridNodeByUrl=new Map,this.setting=o.Settings.Settings.instance().moduleSetting("memoryLiveHeapProfile");const e=new s.Toolbar.Toolbar("live-heap-profile-toolbar",this.contentElement);this.toggleRecordAction=s.ActionRegistry.ActionRegistry.instance().action("live-heap-profile.toggle-recording"),this.toggleRecordButton=s.Toolbar.Toolbar.createActionButton(this.toggleRecordAction),this.toggleRecordButton.setToggled(this.setting.get()),e.appendToolbarItem(this.toggleRecordButton);const t=l.TargetManager.TargetManager.instance().primaryPageTarget();if(t&&t.model(l.ResourceTreeModel.ResourceTreeModel)){const t=s.ActionRegistry.ActionRegistry.instance().action("live-heap-profile.start-with-reload");this.startWithReloadButton=s.Toolbar.Toolbar.createActionButton(t),e.appendToolbarItem(this.startWithReloadButton)}this.dataGrid=this.createDataGrid(),this.dataGrid.asWidget().show(this.contentElement),this.currentPollId=0}static instance(){return Si||(Si=new Ci),Si}createDataGrid(){const e={id:"",title:o.UIString.LocalizedEmptyString,width:void 0,fixedWidth:!0,sortable:!0,align:r.DataGrid.Align.Right,sort:r.DataGrid.Order.Descending,titleDOMFragment:void 0,editable:void 0,nonSelectable:void 0,longText:void 0,disclosure:void 0,weight:void 0,allowInSortByEvenWhenHidden:void 0,dataType:void 0,defaultWeight:void 0},t=[{...e,id:"size",title:wi(gi.jsHeap),width:"72px",fixedWidth:!0,sortable:!0,align:r.DataGrid.Align.Right,sort:r.DataGrid.Order.Descending,tooltip:wi(gi.allocatedJsHeapSizeCurrentlyIn)},{...e,id:"isolates",title:wi(gi.vms),width:"40px",fixedWidth:!0,align:r.DataGrid.Align.Right,tooltip:wi(gi.numberOfVmsSharingTheSameScript)},{...e,id:"url",title:wi(gi.scriptUrl),fixedWidth:!1,sortable:!0,tooltip:wi(gi.urlOfTheScriptSource)}],i=new r.SortableDataGrid.SortableDataGrid({displayName:wi(gi.heapProfile),columns:t,editCallback:void 0,deleteCallback:void 0,refreshCallback:void 0});i.setResizeMethod(r.DataGrid.ResizeMethod.Last),i.element.classList.add("flex-auto"),i.element.addEventListener("keydown",this.onKeyDown.bind(this),!1),i.addEventListener(r.DataGrid.Events.OpenedNode,this.revealSourceForSelectedNode,this),i.addEventListener(r.DataGrid.Events.SortingChanged,this.sortingChanged,this);for(const e of t){const t=i.headerTableHeader(e.id);t&&t.setAttribute("title",e.tooltip)}return i}wasShown(){super.wasShown(),this.poll(),this.registerCSSFiles([fi]),this.setting.addChangeListener(this.settingChanged,this)}willHide(){++this.currentPollId,this.setting.removeChangeListener(this.settingChanged,this)}settingChanged(e){this.toggleRecordButton.setToggled(e.data)}async poll(){const e=this.currentPollId;do{const t=Array.from(l.IsolateManager.IsolateManager.instance().isolates()),i=await Promise.all(t.map((e=>{const t=e.heapProfilerModel();return t?t.getSamplingProfile():null})));if(this.currentPollId!==e)return;this.update(t,i),await new Promise((e=>window.setTimeout(e,3e3)))}while(this.currentPollId===e)}update(e,t){const i=new Map;t.forEach(((t,i)=>{t&&o(e[i],"",t.head)}));const r=this.dataGrid.rootNode(),s=new Set;for(const e of i){const t=e[0],i=e[1].size,o=e[1].isolates.size;if(!t){console.info(`Node with empty URL: ${i} bytes`);continue}let n=this.gridNodeByUrl.get(t);n?n.updateNode(i,o):(n=new Pi(t,i,o),this.gridNodeByUrl.set(t,n),r.appendChild(n)),s.add(n)}for(const e of r.children.slice()){s.has(e)||e.remove();const t=e;this.gridNodeByUrl.delete(t.url)}function o(e,t,r){const s=r.callFrame.url||t||function(e){const t=e.callFrame.functionName;return t.startsWith("(")&&"(root)"!==t?t:""}(r)||function(e){return Number(e.callFrame.scriptId)?wi(gi.anonymousScriptS,{PH1:e.callFrame.scriptId}):""}(r);if(r.children.forEach(o.bind(null,e,s)),!r.selfSize)return;let n=i.get(s);n||(n={size:0,isolates:new Set},i.set(s,n)),n.size+=r.selfSize,n.isolates.add(e)}this.sortingChanged()}onKeyDown(e){"Enter"===e.key&&(e.consume(!0),this.revealSourceForSelectedNode())}revealSourceForSelectedNode(){const e=this.dataGrid.selectedNode;if(!e||!e.url)return;const t=m.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e.url);t&&o.Revealer.reveal(t)}sortingChanged(){const e=this.dataGrid.sortColumnId();if(!e)return;const t="url"===e?function(e,t){return t.url.localeCompare(e.url)}:function(e,t){return t.size-e.size};this.dataGrid.sortNodes(t,this.dataGrid.isSortOrderAscending())}toggleRecording(){!this.setting.get()?this.startRecording(!1):this.stopRecording()}startRecording(e){if(this.setting.set(!0),!e)return;const t=l.TargetManager.TargetManager.instance().primaryPageTarget();if(!t)return;const i=t.model(l.ResourceTreeModel.ResourceTreeModel);i&&i.reloadPage()}async stopRecording(){this.setting.set(!1)}}class Pi extends r.SortableDataGrid.SortableDataGridNode{url;size;isolateCount;constructor(e,t,i){super(),this.url=e,this.size=t,this.isolateCount=i}updateNode(e,t){this.size===e&&this.isolateCount===t||(this.size=e,this.isolateCount=t,this.refresh())}createCell(t){const i=this.createTD(t);switch(t){case"url":i.textContent=this.url;break;case"size":i.textContent=e.NumberUtilities.withThousandsSeparator(Math.round(this.size/1e3)),i.createChild("span","size-units").textContent=wi(gi.kb);break;case"isolates":i.textContent=`${this.isolateCount}`}return i}}class Ti{static instance(e={forceNew:null}){const{forceNew:t}=e;return bi&&!t||(bi=new Ti),bi}handleAction(e,t){return(async()=>{const e="live_heap_profile";await s.ViewManager.ViewManager.instance().showView(e);const i=s.ViewManager.ViewManager.instance().view(e);if(i){const e=await i.widget();this.innerHandleAction(e,t)}})(),!0}innerHandleAction(e,t){switch(t){case"live-heap-profile.toggle-recording":e.toggleRecording();break;case"live-heap-profile.start-with-reload":e.startRecording(!0);break;default:console.assert(!1,`Unknown action: ${t}`)}}}var xi=Object.freeze({__proto__:null,LiveHeapProfileView:Ci,GridNode:Pi,ActionDelegate:Ti});export{T as BottomUpProfileDataGrid,M as CPUProfileFlameChart,de as CPUProfileView,x as ChildrenProvider,_e as HeapProfileView,mi as HeapProfilerPanel,bt as HeapSnapshotDataGrids,ot as HeapSnapshotGridNodes,Nt as HeapSnapshotProxy,qt as HeapSnapshotView,De as HeapTimelineOverview,Se as IsolateSelector,xi as LiveHeapProfileView,b as ProfileDataGrid,j as ProfileHeader,Ie as ProfileLauncherView,W as ProfileSidebarTreeElement,Yt as ProfileTypeRegistry,ee as ProfileView,li as ProfilesPanel,$ as TopDownProfileDataGrid}; + `,r=i.$("container");this.prefixObjectCell(r),this.reachableFromWindow&&r.appendChild(s.Fragment.html`🗖`),this.detachedDOMTreeNode&&r.appendChild(s.Fragment.html``),this.appendSourceLocation(r);const o=i.element();return this.depth&&o.style.setProperty("padding-left",this.depth*this.dataGrid.indentWidth+"px"),o}prefixObjectCell(e){}async appendSourceLocation(e){const t=s.Fragment.html``;e.appendChild(t);const i=await this.dataGridInternal.dataDisplayDelegate().linkifyObject(this.snapshotNodeIndex);i?(t.appendChild(i),this.linkElement=i):t.remove()}async queryObjectContent(e,t){return await this.tryQueryObjectContent(e,t)||e.runtimeModel().createRemoteObjectFromPrimitiveValue(qe(Je.previewIsNotAvailable))}async tryQueryObjectContent(e,t){return"string"===this.type?e.runtimeModel().createRemoteObjectFromPrimitiveValue(this.nameInternal):await e.objectForSnapshotObjectId(String(this.snapshotNodeId),t)}async updateHasChildren(){const e=await this.provider().isEmpty();this.setHasChildren(!e)}shortenWindowURL(t,i){const r=t.indexOf("/"),s=i?t.indexOf("@"):t.length;if(-1===r||-1===s)return t;const o=t.substring(r+1,s).trimLeft();let n=e.StringUtilities.trimURL(o);return n.length>40&&(n=e.StringUtilities.trimMiddle(n,40)),t.substr(0,r+2)+n+t.substr(s)}populateContextMenu(e,t,i){if(e.revealSection().appendItem(qe(Je.revealInSummaryView),(()=>{t.showObject(String(this.snapshotNodeId),qe(Je.summary))})),this.referenceName)for(const i of this.referenceName.matchAll(/\((?[^@)]*) @(?\d+)\)/g)){const{objectName:r,snapshotNodeId:s}=i.groups;e.revealSection().appendItem(qe(Je.revealObjectSWithIdSInSummary,{PH1:r,PH2:s}),(()=>{t.showObject(s,qe(Je.summary))}))}i&&e.revealSection().appendItem(qe(Je.storeAsGlobalVariable),(async()=>{const e=await this.tryQueryObjectContent(i,"");if(e){const t=i.target().model(l.ConsoleModel.ConsoleModel);await(t?.saveToTempVariable(s.Context.Context.instance().flavor(l.RuntimeModel.ExecutionContext),e))}else o.Console.Console.instance().error(qe(Je.previewIsNotAvailable))}))}}class Ze extends Ye{referenceName;referenceType;edgeIndex;snapshot;parentObjectNode;cycledWithAncestorGridNode;constructor(e,t,i,r){super(e,i.node),this.referenceName=i.name,this.referenceType=i.type,this.edgeIndex=i.edgeIndex,this.snapshot=t,this.parentObjectNode=r,this.cycledWithAncestorGridNode=this.findAncestorWithSameSnapshotNodeId(),this.cycledWithAncestorGridNode||this.updateHasChildren();const s=this.data;s.count="",s.addedCount="",s.removedCount="",s.countDelta="",s.addedSize="",s.removedSize="",s.sizeDelta=""}retainersDataSource(){return void 0===this.snapshotNodeIndex?null:{snapshot:this.snapshot,snapshotNodeIndex:this.snapshotNodeIndex}}createProvider(){if(void 0===this.snapshotNodeIndex)throw new Error("Cannot create a provider on a root node");return this.snapshot.createEdgesProvider(this.snapshotNodeIndex)}findAncestorWithSameSnapshotNodeId(){let e=this.parentObjectNode;for(;e;){if(e.snapshotNodeId===this.snapshotNodeId)return e;e=e.parentObjectNode}return null}createChildNode(e){return new Ze(this.dataGridInternal,this.snapshot,e,this)}getHash(){return this.edgeIndex}comparator(){const e=this.dataGridInternal.isSortOrderAscending();switch(this.dataGridInternal.sortColumnId()){case"object":return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",e,"retainedSize",!1);case"count":default:return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",!0,"retainedSize",!1);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"!edgeName",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",e,"!edgeName",!0);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",e,"name",!0)}}prefixObjectCell(e){let t=this.referenceName||"(empty)",i="name";switch(this.referenceType){case"context":i="object-value-number";break;case"internal":case"hidden":case"weak":i="object-value-null";break;case"element":t=`[${t}]`}this.cycledWithAncestorGridNode&&e.classList.add("cycled-ancessor-node"),e.prepend(s.Fragment.html`${t} ${this.edgeNodeSeparator()}`)}edgeNodeSeparator(){return"::"}}class Xe extends Ze{constructor(e,t,i,r){super(e,t,i,r)}createProvider(){if(void 0===this.snapshotNodeIndex)throw new Error("Cannot create providers on root nodes");return this.snapshot.createRetainingEdgesProvider(this.snapshotNodeIndex)}createChildNode(e){return new Xe(this.dataGridInternal,this.snapshot,e,this)}edgeNodeSeparator(){return qe(Je.inElement)}expand(){this.expandRetainersChain(20)}expandRetainersChain(e){if(!this.populated)return this.once(Ke.Events.PopulateComplete).then((()=>this.expandRetainersChain(e))),void this.populate();if(super.expand(),--e>0&&this.children.length>0){const t=this.children[0];if((t.distance||0)>1)return void t.expandRetainersChain(e)}this.dataGridInternal.dispatchEventToListeners(pt.ExpandRetainersComplete)}}class et extends Ye{baseSnapshotOrSnapshot;isDeletedNode;constructor(t,i,r,s){super(t,r),this.baseSnapshotOrSnapshot=i,this.isDeletedNode=s,this.updateHasChildren();const o=this.data;o.count="",o.countDelta="",o.sizeDelta="",this.isDeletedNode?(o.addedCount="",o.addedSize="",o.removedCount="•",o.removedSize=e.NumberUtilities.withThousandsSeparator(this.shallowSize||0)):(o.addedCount="•",o.addedSize=e.NumberUtilities.withThousandsSeparator(this.shallowSize||0),o.removedCount="",o.removedSize="")}retainersDataSource(){return void 0===this.snapshotNodeIndex?null:{snapshot:this.baseSnapshotOrSnapshot,snapshotNodeIndex:this.snapshotNodeIndex}}createProvider(){if(void 0===this.snapshotNodeIndex)throw new Error("Cannot create providers on root nodes");return this.baseSnapshotOrSnapshot.createEdgesProvider(this.snapshotNodeIndex)}createChildNode(e){return new Ze(this.dataGridInternal,this.baseSnapshotOrSnapshot,e,null)}getHash(){if(void 0===this.snapshotNodeId)throw new Error("Cannot hash root nodes");return this.snapshotNodeId}comparator(){const e=this.dataGridInternal.isSortOrderAscending();switch(this.dataGridInternal.sortColumnId()){case"object":return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",e,"retainedSize",!1);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",e,"retainedSize",!1);case"count":default:return new p.HeapSnapshotModel.ComparatorConfig("!edgeName",!0,"retainedSize",!1);case"addedSize":case"removedSize":case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"!edgeName",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",e,"!edgeName",!0)}}}class tt extends Ke{nameInternal;nodeFilter;distance;count;shallowSize;retainedSize;constructor(t,i,r,s){super(t,r.count>0),this.nameInternal=i,this.nodeFilter=s,this.distance=r.distance,this.count=r.count,this.shallowSize=r.self,this.retainedSize=r.maxRet;const o=t.snapshot,n=this.retainedSize/o.totalSize*100,a=this.shallowSize/o.totalSize*100;this.data={object:i,count:e.NumberUtilities.withThousandsSeparator(this.count),distance:this.toUIDistance(this.distance),shallowSize:e.NumberUtilities.withThousandsSeparator(this.shallowSize),retainedSize:e.NumberUtilities.withThousandsSeparator(this.retainedSize),"shallowSize-percent":this.toPercentString(a),"retainedSize-percent":this.toPercentString(n)}}get name(){return this.nameInternal}createProvider(){return this.dataGridInternal.snapshot.createNodesProviderForClass(this.nameInternal,this.nodeFilter)}async populateNodeBySnapshotObjectId(e){this.dataGridInternal.resetNameFilter(),await this.expandWithoutPopulate();const t=await this.provider().nodePosition(e);if(-1===t)return this.collapse(),[];await this.populateChildren(t,null);const i=this.childForPosition(t);return i?[this,i]:[]}filteredOut(e){return-1===this.nameInternal.toLowerCase().indexOf(e)}createCell(e){const t="object"===e?super.createCell(e):this.createValueCell(e);return"object"===e&&this.count>1&&t.appendChild(s.Fragment.html`×${this.count}`),t}createChildNode(e){return new et(this.dataGridInternal,this.dataGridInternal.snapshot,e,!1)}comparator(){const e=this.dataGridInternal.isSortOrderAscending(),t=this.dataGridInternal.sortColumnId();switch(t){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",e,"id",!0);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",e,"retainedSize",!1);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"id",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",e,"id",!0);default:throw new Error(`Invalid sort column id ${t}`)}}}class it{addedNodesProvider;deletedNodesProvider;addedCount;removedCount;constructor(e,t,i,r){this.addedNodesProvider=e,this.deletedNodesProvider=t,this.addedCount=i,this.removedCount=r}dispose(){this.addedNodesProvider.dispose(),this.deletedNodesProvider.dispose()}nodePosition(e){throw new Error("Unreachable")}isEmpty(){return Promise.resolve(!1)}async serializeItemsRange(e,t){let i,r;if(e=t)return i.totalLength=this.addedCount+this.removedCount,i;r=i,i=await this.deletedNodesProvider.serializeItemsRange(0,t-i.endPosition)}else r=new p.HeapSnapshotModel.ItemsRange(0,0,0,[]),i=await this.deletedNodesProvider.serializeItemsRange(e-this.addedCount,t-this.addedCount);r.items.length||(r.startPosition=this.addedCount+i.startPosition);for(const e of i.items)e.isAddedNotRemoved=!1;return r.items.push(...i.items),r.endPosition=this.addedCount+i.endPosition,r.totalLength=this.addedCount+this.removedCount,r}async sortAndRewind(e){await this.addedNodesProvider.sortAndRewind(e),await this.deletedNodesProvider.sortAndRewind(e)}}class rt extends Ke{nameInternal;addedCount;removedCount;countDelta;addedSize;removedSize;sizeDelta;deletedIndexes;constructor(t,i,r){super(t,!0),this.nameInternal=i,this.addedCount=r.addedCount,this.removedCount=r.removedCount,this.countDelta=r.countDelta,this.addedSize=r.addedSize,this.removedSize=r.removedSize,this.sizeDelta=r.sizeDelta,this.deletedIndexes=r.deletedIndexes,this.data={object:i,addedCount:e.NumberUtilities.withThousandsSeparator(this.addedCount),removedCount:e.NumberUtilities.withThousandsSeparator(this.removedCount),countDelta:this.signForDelta(this.countDelta)+e.NumberUtilities.withThousandsSeparator(Math.abs(this.countDelta)),addedSize:e.NumberUtilities.withThousandsSeparator(this.addedSize),removedSize:e.NumberUtilities.withThousandsSeparator(this.removedSize),sizeDelta:this.signForDelta(this.sizeDelta)+e.NumberUtilities.withThousandsSeparator(Math.abs(this.sizeDelta))}}get name(){return this.nameInternal}createProvider(){const e=this.dataGridInternal;if(null===e.snapshot||void 0===e.baseSnapshot||void 0===e.baseSnapshot.uid)throw new Error("Data sources have not been set correctly");const t=e.snapshot.createAddedNodesProvider(e.baseSnapshot.uid,this.nameInternal),i=e.baseSnapshot.createDeletedNodesProvider(this.deletedIndexes);if(!t||!i)throw new Error("Failed to create node providers");return new it(t,i,this.addedCount,this.removedCount)}createCell(e){const t=super.createCell(e);return"object"!==e&&t.classList.add("numeric-column"),t}createChildNode(e){const t=this.dataGridInternal;if(e.isAddedNotRemoved){if(null===t.snapshot)throw new Error("Data sources have not been set correctly");return new et(this.dataGridInternal,t.snapshot,e,!1)}if(void 0===t.baseSnapshot)throw new Error("Data sources have not been set correctly");return new et(this.dataGridInternal,t.baseSnapshot,e,!0)}comparator(){const e=this.dataGridInternal.isSortOrderAscending(),t=this.dataGridInternal.sortColumnId();switch(t){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",e,"id",!0);case"addedCount":case"removedCount":case"countDelta":return new p.HeapSnapshotModel.ComparatorConfig("name",!0,"id",!0);case"addedSize":case"removedSize":case"sizeDelta":return new p.HeapSnapshotModel.ComparatorConfig("selfSize",e,"id",!0);default:throw new Error(`Invalid sort column ${t}`)}}filteredOut(e){return-1===this.nameInternal.toLowerCase().indexOf(e)}signForDelta(e){return 0===e?"":e>0?"+":"−"}}class st extends Ke{populated;allocationNode;constructor(t,i){super(t,i.hasChildren),this.populated=!1,this.allocationNode=i,this.data={liveCount:e.NumberUtilities.withThousandsSeparator(i.liveCount),count:e.NumberUtilities.withThousandsSeparator(i.count),liveSize:e.NumberUtilities.withThousandsSeparator(i.liveSize),size:e.NumberUtilities.withThousandsSeparator(i.size),name:i.name}}populate(){this.populated||this.doPopulate()}async doPopulate(){this.populated=!0;const e=await this.dataGridInternal.snapshot.allocationNodeCallers(this.allocationNode.id),t=e.nodesWithSingleCaller;let i=this;const r=this.dataGridInternal;for(const e of t){const t=new st(r,e);r.appendNode(i,t),i=t,i.populated=!0,this.expanded&&i.expand()}const s=e.branchingCallers;s.sort(this.dataGridInternal.createComparator());for(const e of s)r.appendNode(i,new st(r,e));r.updateVisibleNodes(!0)}expand(){super.expand(),1===this.children.length&&this.children[0].expand()}createCell(e){if("name"!==e)return this.createValueCell(e);const t=super.createCell(e),i=this.allocationNode,r=this.dataGridInternal.heapProfilerModel();if(i.scriptId){const e=this.dataGridInternal.linkifier.linkifyScriptLocation(r?r.target():null,String(i.scriptId),i.scriptName,i.line-1,{columnNumber:i.column-1,inlineFrameIndex:0,className:"profile-node-file"});e.style.maxWidth="75%",t.insertBefore(e,t.firstChild)}return t}allocationNodeId(){return this.allocationNode.id}}var ot=Object.freeze({__proto__:null,get HeapSnapshotGridNode(){return Ke},HeapSnapshotGenericObjectNode:Ye,HeapSnapshotObjectNode:Ze,HeapSnapshotRetainingObjectNode:Xe,HeapSnapshotInstanceNode:et,HeapSnapshotConstructorNode:tt,HeapSnapshotDiffNodesProvider:it,HeapSnapshotDiffNode:rt,AllocationGridNode:st});const nt={distanceFromWindowObject:"Distance from window object",sizeOfTheObjectItselfInBytes:"Size of the object itself in bytes",sizeOfTheObjectPlusTheGraphIt:"Size of the object plus the graph it retains in bytes",object:"Object",distance:"Distance",shallowSize:"Shallow Size",retainedSize:"Retained Size",heapSnapshotRetainment:"Heap Snapshot Retainment",constructorString:"Constructor",heapSnapshotConstructors:"Heap Snapshot Constructors",New:"# New",Deleted:"# Deleted",Delta:"# Delta",allocSize:"Alloc. Size",freedSize:"Freed Size",sizeDelta:"Size Delta",heapSnapshotDiff:"Heap Snapshot Diff",liveCount:"Live Count",count:"Count",liveSize:"Live Size",size:"Size",function:"Function",allocation:"Allocation"},at=t.i18n.registerUIStrings("panels/profiler/HeapSnapshotDataGrids.ts",nt),lt=t.i18n.getLocalizedString.bind(void 0,at),dt=new WeakMap;class ht extends r.DataGrid.DataGridImpl{}class ct extends(o.ObjectWrapper.eventMixin(ht)){snapshot;selectedNode;heapProfilerModelInternal;dataDisplayDelegateInternal;recursiveSortingDepth;populatedAndSorted;nameFilter;nodeFilterInternal;lastSortColumnId;lastSortAscending;constructor(e,t,i){super(i),this.snapshot=null,this.selectedNode=null,this.heapProfilerModelInternal=e,this.dataDisplayDelegateInternal=t;const s=[["distance",lt(nt.distanceFromWindowObject)],["shallowSize",lt(nt.sizeOfTheObjectItselfInBytes)],["retainedSize",lt(nt.sizeOfTheObjectPlusTheGraphIt)]];for(const e of s){const t=this.headerTableHeader(e[0]);t&&t.setAttribute("title",e[1])}this.recursiveSortingDepth=0,this.populatedAndSorted=!1,this.nameFilter=null,this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter,this.addEventListener(pt.SortingComplete,this.sortingComplete,this),this.addEventListener(r.DataGrid.Events.SortingChanged,this.sortingChanged,this),this.setRowContextMenuCallback(this.populateContextMenu.bind(this))}async setDataSource(e,t){}isFilteredOut(e){const t=this.nameFilter?this.nameFilter.value().toLowerCase():"";return!!(t&&(e instanceof rt||e instanceof tt)&&e.filteredOut(t))}heapProfilerModel(){return this.heapProfilerModelInternal}dataDisplayDelegate(){return this.dataDisplayDelegateInternal}nodeFilter(){return this.nodeFilterInternal}setNameFilter(e){this.nameFilter=e}defaultPopulateCount(){return 100}disposeAllNodes(){const e=this.topLevelNodes();for(let t=0,i=e.length;ts?1:0;return i.ascending1||(o=-o),0!==o||(r=e[i.fieldName2],s=t[i.fieldName2],o=rs?1:0,i.ascending2||(o=-o)),o}))}performSorting(e){this.recursiveSortingEnter();const t=this.allChildren(this.rootNode());this.rootNode().removeChildren(),t.sort(e);for(let e=0,i=t.length;e=this.topPaddingHeight&&r>=this.bottomPaddingHeight)return;i-=500,s+=1e3;const o=this.selectedNode;this.rootNode().removeChildren(),this.topPaddingHeight=0,this.bottomPaddingHeight=0,this.addVisibleNodes(this.rootNode(),i,i+s),this.setVerticalPadding(this.topPaddingHeight,this.bottomPaddingHeight),o&&(o.parent?o.select(!0):this.selectedNode=o)}addVisibleNodes(e,t,i){if(!e.expanded)return 0;const r=this.allChildren(e);let s=0,o=0;for(;ot)break;s=i}let n=s;for(;o=r&&t{console.assert(!this.scrollToResolveCallback),this.scrollToResolveCallback=e.bind(null,i),this.scrollContainer.window().requestAnimationFrame((()=>{this.scrollToResolveCallback&&(this.scrollToResolveCallback(),this.scrollToResolveCallback=null)}))}))}calculateOffset(e){let t=this.rootNode(),i=0;if(0===e.length)return 0;for(let r=0;r=t}onResize(){super.onResize(),this.updateVisibleNodes(!1)}onScroll(e){this.updateVisibleNodes(!1),this.scrollToResolveCallback&&(this.scrollToResolveCallback(),this.scrollToResolveCallback=null)}}class ft extends ct{constructor(e,t,i,s){super(e,t,{displayName:i,columns:s=s||[{id:"object",title:lt(nt.object),disclosure:!0,sortable:!0},{id:"distance",title:lt(nt.distance),width:"70px",sortable:!0,fixedWidth:!0},{id:"shallowSize",title:lt(nt.shallowSize),width:"110px",sortable:!0,fixedWidth:!0},{id:"retainedSize",title:lt(nt.retainedSize),width:"110px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Descending}]})}async setDataSource(e,t){this.snapshot=e;const i=new p.HeapSnapshotModel.Node(-1,"root",0,t||e.rootNodeIndex,0,0,"");this.setRootNode(this.createRootNode(e,i)),this.rootNode().sort()}createRootNode(e,t){const i=new p.HeapSnapshotModel.Edge("",t,"",-1);return new Ze(this,e,i,null)}sortingChanged(){const e=this.rootNode();e.hasChildren()&&e.sort()}}class gt extends ft{constructor(e,t){const i=[{id:"object",title:lt(nt.object),disclosure:!0,sortable:!0},{id:"distance",title:lt(nt.distance),width:"70px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Ascending},{id:"shallowSize",title:lt(nt.shallowSize),width:"110px",sortable:!0,fixedWidth:!0},{id:"retainedSize",title:lt(nt.retainedSize),width:"110px",sortable:!0,fixedWidth:!0}];super(e,t,lt(nt.heapSnapshotRetainment),i)}createRootNode(e,t){const i=new p.HeapSnapshotModel.Edge("",t,"",-1);return new Xe(this,e,i,null)}sortFields(e,t){switch(e){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",t,"count",!1);case"count":return new p.HeapSnapshotModel.ComparatorConfig("count",t,"name",!0);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("shallowSize",t,"name",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",t,"name",!0);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",t,"name",!0);default:throw new Error(`Unknown column ${e}`)}}reset(){this.rootNode().removeChildren(),this.resetSortingCache()}async setDataSource(e,t){await super.setDataSource(e,t),this.rootNode().expand()}}!function(e){e.ExpandRetainersComplete="ExpandRetainersComplete"}(ut||(ut={}));class vt extends mt{profileIndex;objectIdToSelect;nextRequestedFilter;lastFilter;filterInProgress;constructor(e,t){const i=[{id:"object",title:lt(nt.constructorString),disclosure:!0,sortable:!0},{id:"distance",title:lt(nt.distance),width:"70px",sortable:!0,fixedWidth:!0},{id:"shallowSize",title:lt(nt.shallowSize),width:"110px",sortable:!0,fixedWidth:!0},{id:"retainedSize",title:lt(nt.retainedSize),width:"110px",sort:r.DataGrid.Order.Descending,sortable:!0,fixedWidth:!0}];super(e,t,{displayName:lt(nt.heapSnapshotConstructors).toString(),columns:i}),this.profileIndex=-1,this.objectIdToSelect=null,this.nextRequestedFilter=null}sortFields(e,t){switch(e){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",t,"retainedSize",!1);case"distance":return new p.HeapSnapshotModel.ComparatorConfig("distance",t,"retainedSize",!1);case"shallowSize":return new p.HeapSnapshotModel.ComparatorConfig("shallowSize",t,"name",!0);case"retainedSize":return new p.HeapSnapshotModel.ComparatorConfig("retainedSize",t,"name",!0);default:throw new Error(`Unknown column ${e}`)}}async revealObjectByHeapSnapshotId(e){if(!this.snapshot)return this.objectIdToSelect=e,null;const t=await this.snapshot.nodeClassName(parseInt(e,10));if(!t)return null;const i=this.topLevelNodes().find((e=>e.name===t));if(!i)return null;const r=await i.populateNodeBySnapshotObjectId(parseInt(e,10));return r.length?this.revealTreeNode(r):null}clear(){this.nextRequestedFilter=null,this.lastFilter=null,this.removeTopLevelNodes()}async setDataSource(e,t){this.snapshot=e,-1===this.profileIndex&&this.populateChildren(),this.objectIdToSelect&&(this.revealObjectByHeapSnapshotId(this.objectIdToSelect),this.objectIdToSelect=null)}setSelectionRange(e,t){this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter(e,t),this.populateChildren(this.nodeFilterInternal)}setAllocationNodeId(e){this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter,this.nodeFilterInternal.allocationNodeId=e,this.populateChildren(this.nodeFilterInternal)}aggregatesReceived(e,t){this.filterInProgress=null,this.nextRequestedFilter&&this.snapshot&&(this.snapshot.aggregatesWithFilter(this.nextRequestedFilter).then(this.aggregatesReceived.bind(this,this.nextRequestedFilter)),this.filterInProgress=this.nextRequestedFilter,this.nextRequestedFilter=null),this.removeTopLevelNodes(),this.resetSortingCache();for(const i in t)this.appendNode(this.rootNode(),new tt(this,i,t[i],e));this.sortingChanged(),this.lastFilter=e}async populateChildren(e){const t=e||new p.HeapSnapshotModel.NodeFilter;if(this.filterInProgress)this.nextRequestedFilter=this.filterInProgress.equals(t)?null:t;else if((!this.lastFilter||!this.lastFilter.equals(t))&&(this.filterInProgress=t,this.snapshot)){const e=await this.snapshot.aggregatesWithFilter(t);this.aggregatesReceived(t,e)}}filterSelectIndexChanged(e,t){if(this.profileIndex=t,this.nodeFilterInternal=void 0,-1!==t){const i=t>0?e[t-1].maxJSObjectId:0,r=e[t].maxJSObjectId;this.nodeFilterInternal=new p.HeapSnapshotModel.NodeFilter(i,r)}this.populateChildren(this.nodeFilterInternal)}}class wt extends mt{baseSnapshot;constructor(e,t){const i=[{id:"object",title:lt(nt.constructorString),disclosure:!0,sortable:!0},{id:"addedCount",title:lt(nt.New),width:"75px",sortable:!0,fixedWidth:!0},{id:"removedCount",title:lt(nt.Deleted),width:"75px",sortable:!0,fixedWidth:!0},{id:"countDelta",title:lt(nt.Delta),width:"65px",sortable:!0,fixedWidth:!0},{id:"addedSize",title:lt(nt.allocSize),width:"75px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Descending},{id:"removedSize",title:lt(nt.freedSize),width:"75px",sortable:!0,fixedWidth:!0},{id:"sizeDelta",title:lt(nt.sizeDelta),width:"75px",sortable:!0,fixedWidth:!0}];super(e,t,{displayName:lt(nt.heapSnapshotDiff).toString(),columns:i})}defaultPopulateCount(){return 50}sortFields(e,t){switch(e){case"object":return new p.HeapSnapshotModel.ComparatorConfig("name",t,"count",!1);case"addedCount":return new p.HeapSnapshotModel.ComparatorConfig("addedCount",t,"name",!0);case"removedCount":return new p.HeapSnapshotModel.ComparatorConfig("removedCount",t,"name",!0);case"countDelta":return new p.HeapSnapshotModel.ComparatorConfig("countDelta",t,"name",!0);case"addedSize":return new p.HeapSnapshotModel.ComparatorConfig("addedSize",t,"name",!0);case"removedSize":return new p.HeapSnapshotModel.ComparatorConfig("removedSize",t,"name",!0);case"sizeDelta":return new p.HeapSnapshotModel.ComparatorConfig("sizeDelta",t,"name",!0);default:throw new Error(`Unknown column ${e}`)}}async setDataSource(e,t){this.snapshot=e}setBaseDataSource(e){this.baseSnapshot=e,this.removeTopLevelNodes(),this.resetSortingCache(),this.baseSnapshot!==this.snapshot?this.populateChildren():this.dispatchEventToListeners(pt.SortingComplete)}async populateChildren(){if(null===this.snapshot||void 0===this.baseSnapshot||void 0===this.baseSnapshot.uid)throw new Error("Data sources have not been set correctly");const e=await this.baseSnapshot.aggregatesForDiff(),t=await this.snapshot.calculateSnapshotDiff(this.baseSnapshot.uid,e);for(const e in t){const i=t[e];this.appendNode(this.rootNode(),new rt(this,e,i))}this.sortingChanged()}}class St extends mt{linkifierInternal;topNodes;constructor(e,t){const i=[{id:"liveCount",title:lt(nt.liveCount),width:"75px",sortable:!0,fixedWidth:!0},{id:"count",title:lt(nt.count),width:"65px",sortable:!0,fixedWidth:!0},{id:"liveSize",title:lt(nt.liveSize),width:"75px",sortable:!0,fixedWidth:!0},{id:"size",title:lt(nt.size),width:"75px",sortable:!0,fixedWidth:!0,sort:r.DataGrid.Order.Descending},{id:"name",title:lt(nt.function),disclosure:!0,sortable:!0}];super(e,t,{displayName:lt(nt.allocation).toString(),columns:i}),this.linkifierInternal=new d.Linkifier.Linkifier}get linkifier(){return this.linkifierInternal}dispose(){this.linkifierInternal.reset()}async setDataSource(e,t){this.snapshot=e,this.topNodes=await this.snapshot.allocationTracesTops(),this.populateChildren()}populateChildren(){this.removeTopLevelNodes();const e=this.rootNode(),t=this.topNodes||[];for(const i of t)this.appendNode(e,new st(this,i));this.updateVisibleNodes(!0)}sortingChanged(){void 0!==this.topNodes&&(this.topNodes.sort(this.createComparator()),this.rootNode().removeChildren(),this.populateChildren())}createComparator(){const e=this.sortColumnId(),t=this.sortOrder()===r.DataGrid.Order.Ascending?1:-1;return function(i,r){return i[e]>r[e]?t:i[e]{e(t?new r(this,n):null)})),this.postMessage({callId:s,disposition:"factory",objectId:t,methodName:i,methodArguments:o,newObjectId:n}),null):(this.postMessage({callId:s,disposition:"factory",objectId:t,methodName:i,methodArguments:o,newObjectId:n}),new r(this,n))}callMethod(e,t,i){const r=this.nextCallId++,s=Array.prototype.slice.call(arguments,3);e&&this.callbacks.set(r,e),this.postMessage({callId:r,disposition:"method",objectId:t,methodName:i,methodArguments:s})}startCheckingForLongRunningCalls(){this.interval||(this.checkLongRunningCalls(),this.interval=window.setInterval(this.checkLongRunningCalls.bind(this),300))}checkLongRunningCalls(){for(const e of this.previousCallbacks)this.callbacks.has(e)||this.previousCallbacks.delete(e);const e=Boolean(this.previousCallbacks.size);this.dispatchEventToListeners("Wait",e);for(const e of this.callbacks.keys())this.previousCallbacks.add(e)}messageReceived(e){const t=e.data;if(t.eventName)return void(this.eventHandler&&this.eventHandler(t.eventName,t.data));if(t.error)return t.errorMethodName&&o.Console.Console.instance().error(Tt(Ct.anErrorOccurredWhenACallToMethod,{PH1:t.errorMethodName})),o.Console.Console.instance().error(t.errorCallStack),void this.callbacks.delete(t.callId);const i=this.callbacks.get(t.callId);i&&(this.callbacks.delete(t.callId),i(t.result))}postMessage(e){this.worker.postMessage(e)}}class yt{worker;objectId;constructor(e,t){this.worker=e,this.objectId=t}callWorker(e,t){t.splice(1,0,this.objectId);const i=this.worker[e];if(!i)throw new Error(`Could not find worker with name ${e}.`);return i.apply(this.worker,t)}dispose(){this.worker.disposeObject(this.objectId)}disposeWorker(){this.worker.dispose()}callFactoryMethod(e,t,i,...r){return this.callWorker("callFactoryMethod",Array.prototype.slice.call(arguments,0))}callMethodPromise(e,...t){const i=Array.prototype.slice.call(arguments);return new Promise((e=>this.callWorker("callMethod",[e,...i])))}}class It extends yt{profileUid;snapshotReceivedCallback;constructor(e,t,i,r){super(e,t),this.profileUid=i,this.snapshotReceivedCallback=r}async write(e){await this.callMethodPromise("write",e)}async close(){await this.callMethodPromise("close");const e=await new Promise((e=>this.callFactoryMethod(e,"buildSnapshot",Rt)));this.dispose(),e.setProfileUid(this.profileUid),await e.updateStaticData(),this.snapshotReceivedCallback(e)}}class Rt extends yt{staticData;profileUid;constructor(e,t){super(e,t),this.staticData=null}search(e,t){return this.callMethodPromise("search",e,t)}aggregatesWithFilter(e){return this.callMethodPromise("aggregatesWithFilter",e)}aggregatesForDiff(){return this.callMethodPromise("aggregatesForDiff")}calculateSnapshotDiff(e,t){return this.callMethodPromise("calculateSnapshotDiff",e,t)}nodeClassName(e){return this.callMethodPromise("nodeClassName",e)}createEdgesProvider(e){return this.callFactoryMethod(null,"createEdgesProvider",Et,e)}createRetainingEdgesProvider(e){return this.callFactoryMethod(null,"createRetainingEdgesProvider",Et,e)}createAddedNodesProvider(e,t){return this.callFactoryMethod(null,"createAddedNodesProvider",Et,e,t)}createDeletedNodesProvider(e){return this.callFactoryMethod(null,"createDeletedNodesProvider",Et,e)}createNodesProvider(e){return this.callFactoryMethod(null,"createNodesProvider",Et,e)}createNodesProviderForClass(e,t){return this.callFactoryMethod(null,"createNodesProviderForClass",Et,e,t)}allocationTracesTops(){return this.callMethodPromise("allocationTracesTops")}allocationNodeCallers(e){return this.callMethodPromise("allocationNodeCallers",e)}allocationStack(e){return this.callMethodPromise("allocationStack",e)}dispose(){throw new Error("Should never be called")}get nodeCount(){return this.staticData?this.staticData.nodeCount:0}get rootNodeIndex(){return this.staticData?this.staticData.rootNodeIndex:0}async updateStaticData(){this.staticData=await this.callMethodPromise("updateStaticData")}getStatistics(){return this.callMethodPromise("getStatistics")}getLocation(e){return this.callMethodPromise("getLocation",e)}getSamples(){return this.callMethodPromise("getSamples")}get totalSize(){return this.staticData?this.staticData.totalSize:0}get uid(){return this.profileUid}setProfileUid(e){this.profileUid=e}maxJSObjectId(){return this.staticData?this.staticData.maxJSObjectId:0}}class Et extends yt{constructor(e,t){super(e,t)}nodePosition(e){return this.callMethodPromise("nodePosition",e)}isEmpty(){return this.callMethodPromise("isEmpty")}serializeItemsRange(e,t){return this.callMethodPromise("serializeItemsRange",e,t)}async sortAndRewind(e){await this.callMethodPromise("sortAndRewind",e)}}var Nt=Object.freeze({__proto__:null,HeapSnapshotWorkerProxy:xt,HeapSnapshotProxyObject:yt,HeapSnapshotLoaderProxy:It,HeapSnapshotProxy:Rt,HeapSnapshotProviderProxy:Et});const kt={find:"Find",containment:"Containment",retainers:"Retainers",allocationStack:"Allocation stack",perspective:"Perspective",baseSnapshot:"Base snapshot",filter:"Filter",classFilter:"Class filter",code:"Code",strings:"Strings",jsArrays:"JS arrays",typedArrays:"Typed arrays",systemObjects:"System objects",selectedSizeS:"Selected size: {PH1}",allObjects:"All objects",objectsAllocatedBeforeS:"Objects allocated before {PH1}",objectsAllocatedBetweenSAndS:"Objects allocated between {PH1} and {PH2}",summary:"Summary",comparison:"Comparison",allocation:"Allocation",liveObjects:"Live objects",statistics:"Statistics",heapSnapshot:"Heap snapshot",takeHeapSnapshot:"Take heap snapshot",heapSnapshots:"HEAP SNAPSHOTS",heapSnapshotProfilesShowMemory:"Heap snapshot profiles show memory distribution among your page's JavaScript objects and related DOM nodes.",exposeInternals:"Expose internals (includes additional implementation-specific details)",captureNumericValue:"Include numerical values in capture",snapshotting:"Snapshotting…",snapshotD:"Snapshot {PH1}",percentagePlaceholder:"{PH1}%",allocationInstrumentationOn:"Allocation instrumentation on timeline",stopRecordingHeapProfile:"Stop recording heap profile",startRecordingHeapProfile:"Start recording heap profile",recordAllocationStacksExtra:"Record stack traces of allocations (extra performance overhead)",recording:"Recording…",allocationTimelines:"ALLOCATION TIMELINES",AllocationTimelinesShowInstrumented:"Allocation timelines show instrumented JavaScript memory allocations over time. Once profile is recorded you can select a time interval to see objects that were allocated within it and still alive by the end of recording. Use this profile type to isolate memory leaks.",loading:"Loading…",savingD:"Saving… {PH1}%",sKb:"{PH1} kB",heapMemoryUsage:"Heap memory usage",stackWasNotRecordedForThisObject:"Stack was not recorded for this object because it had been allocated before this profile recording started."},Dt=t.i18n.registerUIStrings("panels/profiler/HeapSnapshotView.ts",kt),Mt=t.i18n.getLocalizedString.bind(void 0,Dt),Ft=t.i18n.registerUIStrings("panels/profiler/ModuleUIStrings.ts",{buildingEdgeIndexes:"Building edge indexes…",buildingRetainers:"Building retainers…",propagatingDomState:"Propagating DOM state…",calculatingNodeFlags:"Calculating node flags…",calculatingDistances:"Calculating distances…",buildingPostorderIndex:"Building postorder index…",buildingDominatorTree:"Building dominator tree…",calculatingRetainedSizes:"Calculating retained sizes…",buildingDominatedNodes:"Building dominated nodes…",calculatingStatistics:"Calculating statistics…",calculatingSamples:"Calculating samples…",buildingLocations:"Building locations…",finishedProcessing:"Finished processing.",buildingAllocationStatistics:"Building allocation statistics…",done:"Done",processingSnapshot:"Processing snapshot…",parsingStrings:"Parsing strings…",loadingSnapshotInfo:"Loading snapshot info…",loadingNodesD:"Loading nodes… {PH1}%",loadingEdgesD:"Loading edges… {PH1}%",loadingAllocationTracesD:"Loading allocation traces… {PH1}%",loadingSamples:"Loading samples…",loadingLocations:"Loading locations…",loadingStrings:"Loading strings…"}),Ht=t.i18n.getLocalizedString.bind(void 0,Ft);class Lt extends s.View.SimpleView{searchResults;profile;linkifier;parentDataDisplayDelegate;searchableViewInternal;splitWidget;containmentDataGrid;containmentWidget;statisticsView;constructorsDataGrid;constructorsWidget;diffDataGrid;diffWidget;allocationDataGrid;allocationWidget;allocationStackView;tabbedPane;retainmentDataGrid;retainmentWidget;objectDetailsView;perspectives;comparisonPerspective;perspectiveSelect;baseSelect;filterSelect;classNameFilter;selectedSizeText;popoverHelper;currentPerspectiveIndex;currentPerspective;dataGrid;searchThrottler;baseProfile;trackingOverviewGrid;currentSearchResultIndex=-1;currentQuery;constructor(e,t){super(Mt(kt.heapSnapshot)),this.searchResults=[],this.element.classList.add("heap-snapshot-view"),this.profile=t,this.linkifier=new d.Linkifier.Linkifier;const i=t.profileType();i.addEventListener("SnapshotReceived",this.onReceiveSnapshot,this),i.addEventListener(D.RemoveProfileHeader,this.onProfileHeaderRemoved,this);const n=i.id===At.TypeId;n&&this.createOverview();const a=Kt.trackingHeapSnapshotProfileType.recordAllocationStacksSetting().get();this.parentDataDisplayDelegate=e,this.searchableViewInternal=new s.SearchableView.SearchableView(this,null),this.searchableViewInternal.setPlaceholder(Mt(kt.find),Mt(kt.find)),this.searchableViewInternal.show(this.element),this.splitWidget=new s.SplitWidget.SplitWidget(!1,!0,"heapSnapshotSplitViewState",200,200),this.splitWidget.show(this.searchableViewInternal.element);const l=t.heapProfilerModel();let h;if(this.containmentDataGrid=new ft(l,this,Mt(kt.containment)),this.containmentDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.selectionChanged,this),this.containmentWidget=this.containmentDataGrid.asWidget(),this.containmentWidget.setMinimumSize(50,25),this.statisticsView=new _t,this.constructorsDataGrid=new vt(l,this),this.constructorsDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.selectionChanged,this),this.constructorsWidget=this.constructorsDataGrid.asWidget(),this.constructorsWidget.setMinimumSize(50,25),this.diffDataGrid=new wt(l,this),this.diffDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.selectionChanged,this),this.diffWidget=this.diffDataGrid.asWidget(),this.diffWidget.setMinimumSize(50,25),this.allocationDataGrid=null,n&&a&&(this.allocationDataGrid=new St(l,this),this.allocationDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.onSelectAllocationNode,this),this.allocationWidget=this.allocationDataGrid.asWidget(),this.allocationWidget.setMinimumSize(50,25),this.allocationStackView=new Jt(l),this.allocationStackView.setMinimumSize(50,25),this.tabbedPane=new s.TabbedPane.TabbedPane),this.retainmentDataGrid=new gt(l,this),this.retainmentWidget=this.retainmentDataGrid.asWidget(),this.retainmentWidget.setMinimumSize(50,21),this.retainmentWidget.element.classList.add("retaining-paths-view"),this.allocationStackView)this.tabbedPane=new s.TabbedPane.TabbedPane,this.tabbedPane.appendTab("retainers",Mt(kt.retainers),this.retainmentWidget),this.tabbedPane.appendTab("allocation-stack",Mt(kt.allocationStack),this.allocationStackView),h=this.tabbedPane.headerElement(),this.objectDetailsView=this.tabbedPane;else{const e=document.createElement("div");e.classList.add("heap-snapshot-view-resizer");const t=e.createChild("div","title");e.createChild("div","verticalResizerIcon");t.createChild("span").textContent=Mt(kt.retainers),h=e,this.objectDetailsView=new s.Widget.VBox,this.objectDetailsView.element.appendChild(e),this.retainmentWidget.show(this.objectDetailsView.element)}this.splitWidget.hideDefaultResizer(),this.splitWidget.installResizer(h),this.retainmentDataGrid.addEventListener(r.DataGrid.Events.SelectedNode,this.inspectedObjectChanged,this),this.retainmentDataGrid.reset(),this.perspectives=[],this.comparisonPerspective=new zt,this.perspectives.push(new Ot),t.profileType()!==Kt.trackingHeapSnapshotProfileType&&this.perspectives.push(this.comparisonPerspective),this.perspectives.push(new Bt),this.allocationWidget&&this.perspectives.push(new Gt),this.perspectives.push(new Vt),this.perspectiveSelect=new s.Toolbar.ToolbarComboBox(this.onSelectedPerspectiveChanged.bind(this),Mt(kt.perspective)),this.updatePerspectiveOptions(),this.baseSelect=new s.Toolbar.ToolbarComboBox(this.changeBase.bind(this),Mt(kt.baseSnapshot)),this.baseSelect.setVisible(!1),this.updateBaseOptions(),this.filterSelect=new s.Toolbar.ToolbarComboBox(this.changeFilter.bind(this),Mt(kt.filter)),this.filterSelect.setVisible(!1),this.updateFilterOptions(),this.classNameFilter=new s.Toolbar.ToolbarInput(Mt(kt.classFilter)),this.classNameFilter.setVisible(!1),this.constructorsDataGrid.setNameFilter(this.classNameFilter),this.diffDataGrid.setNameFilter(this.classNameFilter),this.selectedSizeText=new s.Toolbar.ToolbarText,this.popoverHelper=new s.PopoverHelper.PopoverHelper(this.element,this.getPopoverRequest.bind(this)),this.popoverHelper.setDisableOnClick(!0),this.popoverHelper.setHasPadding(!0),this.element.addEventListener("scroll",this.popoverHelper.hidePopover.bind(this.popoverHelper),!0),this.currentPerspectiveIndex=0,this.currentPerspective=this.perspectives[0],this.currentPerspective.activate(this),this.dataGrid=this.currentPerspective.masterGrid(this),this.populate(),this.searchThrottler=new o.Throttler.Throttler(0);for(const e of this.profiles())e.addEventListener(k.ProfileTitleChanged,this.updateControls,this)}createOverview(){const e=this.profile.profileType();this.trackingOverviewGrid=new Re,this.trackingOverviewGrid.addEventListener("IdsRangeChanged",this.onIdsRangeChanged.bind(this)),this.profile.fromFile()||e.profileBeingRecorded()!==this.profile||(e.addEventListener("HeapStatsUpdate",this.onHeapStatsUpdate,this),e.addEventListener("TrackingStopped",this.onStopTracking,this),this.trackingOverviewGrid.start())}onStopTracking(){const e=this.profile.profileType();e.removeEventListener("HeapStatsUpdate",this.onHeapStatsUpdate,this),e.removeEventListener("TrackingStopped",this.onStopTracking,this),this.trackingOverviewGrid&&this.trackingOverviewGrid.stop()}onHeapStatsUpdate({data:e}){this.trackingOverviewGrid&&this.trackingOverviewGrid.setSamples(e)}searchableView(){return this.searchableViewInternal}showProfile(e){return this.parentDataDisplayDelegate.showProfile(e)}showObject(e,t){Number(e)<=this.profile.maxJSObjectId?this.selectLiveObject(t,e):this.parentDataDisplayDelegate.showObject(e,t)}async linkifyObject(e){const t=this.profile.heapProfilerModel();if(!t)return null;const i=await this.profile.getLocation(e);if(!i)return null;const r=t.runtimeModel().debuggerModel().createRawLocationByScriptId(String(i.scriptId),i.lineNumber,i.columnNumber);if(!r)return null;const s=r.script(),o=s&&s.sourceURL;return o&&this.linkifier?this.linkifier.linkifyRawLocation(r,o):null}async populate(){const e=await this.profile.loadPromise;if(this.retrieveStatistics(e),this.dataGrid&&this.dataGrid.setDataSource(e,0),this.profile.profileType().id===At.TypeId&&this.profile.fromFile()){const t=await e.getSamples();if(t){console.assert(Boolean(t.timestamps.length));const e=new Ne;e.sizes=t.sizes,e.ids=t.lastAssignedIds,e.timestamps=t.timestamps,e.max=t.sizes,e.totalTime=Math.max(t.timestamps[t.timestamps.length-1]||0,1e4),this.trackingOverviewGrid&&this.trackingOverviewGrid.setSamples(e)}}const t=this.profiles().indexOf(this.profile);this.baseSelect.setSelectedIndex(Math.max(0,t-1)),this.trackingOverviewGrid&&this.trackingOverviewGrid.updateGrid()}async retrieveStatistics(e){const t=await e.getStatistics(),i=[{value:t.code,color:"#f77",title:Mt(kt.code)},{value:t.strings,color:"#5e5",title:Mt(kt.strings)},{value:t.jsArrays,color:"#7af",title:Mt(kt.jsArrays)},{value:t.native,color:"#fc5",title:Mt(kt.typedArrays)},{value:t.system,color:"#98f",title:Mt(kt.systemObjects)}];return this.statisticsView.setTotalAndRecords(t.total,i),t}onIdsRangeChanged(t){const{minId:i,maxId:r}=t.data;this.selectedSizeText.setText(Mt(kt.selectedSizeS,{PH1:e.NumberUtilities.bytesToString(t.data.size)})),this.constructorsDataGrid.snapshot&&this.constructorsDataGrid.setSelectionRange(i,r)}async toolbarItems(){const e=[this.perspectiveSelect,this.classNameFilter];return this.profile.profileType()!==Kt.trackingHeapSnapshotProfileType&&e.push(this.baseSelect,this.filterSelect),e.push(this.selectedSizeText),e}willHide(){this.currentSearchResultIndex=-1,this.popoverHelper.hidePopover()}supportsCaseSensitiveSearch(){return!0}supportsRegexSearch(){return!1}onSearchCanceled(){this.currentSearchResultIndex=-1,this.searchResults=[]}selectRevealedNode(e){e&&e.select()}performSearch(e,t,i){const r=new p.HeapSnapshotModel.SearchConfig(e.query.trim(),e.caseSensitive,e.isRegex,t,i||!1);this.searchThrottler.schedule(this.performSearchInternal.bind(this,r))}async performSearchInternal(e){if(this.onSearchCanceled(),!this.currentPerspective.supportsSearch())return;this.currentQuery=e;const t=e.query.trim();if(!t)return;if("@"===t.charAt(0)){const e=parseInt(t.substring(1),10);if(isNaN(e))return;if(!this.dataGrid)return;const i=await this.dataGrid.revealObjectByHeapSnapshotId(String(e));return void this.selectRevealedNode(i)}if(!this.profile.snapshotProxy||!this.dataGrid)return;const i=this.dataGrid.nodeFilter();this.searchResults=i?await this.profile.snapshotProxy.search(this.currentQuery,i):[],this.searchableViewInternal.updateSearchMatchesCount(this.searchResults.length),this.searchResults.length&&(this.currentSearchResultIndex=e.jumpBackward?this.searchResults.length-1:0),await this.jumpToSearchResult(this.currentSearchResultIndex)}jumpToNextSearchResult(){this.searchResults.length&&(this.currentSearchResultIndex=(this.currentSearchResultIndex+1)%this.searchResults.length,this.searchThrottler.schedule(this.jumpToSearchResult.bind(this,this.currentSearchResultIndex)))}jumpToPreviousSearchResult(){this.searchResults.length&&(this.currentSearchResultIndex=(this.currentSearchResultIndex+this.searchResults.length-1)%this.searchResults.length,this.searchThrottler.schedule(this.jumpToSearchResult.bind(this,this.currentSearchResultIndex)))}async jumpToSearchResult(e){if(this.searchableViewInternal.updateCurrentMatchIndex(e),-1===e)return;if(!this.dataGrid)return;const t=await this.dataGrid.revealObjectByHeapSnapshotId(String(this.searchResults[e]));this.selectRevealedNode(t)}refreshVisibleData(){if(!this.dataGrid)return;let e=this.dataGrid.rootNode().children[0];for(;e;)e.refresh(),e=e.traverseNextNode(!1,null,!0)}changeBase(){if(this.baseProfile===this.profiles()[this.baseSelect.selectedIndex()])return;this.baseProfile=this.profiles()[this.baseSelect.selectedIndex()];const e=this.dataGrid;e.snapshot&&this.baseProfile.loadPromise.then(e.setBaseDataSource.bind(e)),this.currentQuery&&this.searchResults&&this.performSearch(this.currentQuery,!1)}changeFilter(){const e=this.filterSelect.selectedIndex()-1;this.dataGrid&&(this.dataGrid.filterSelectIndexChanged(this.profiles(),e),this.currentQuery&&this.searchResults&&this.performSearch(this.currentQuery,!1))}profiles(){return this.profile.profileType().getProfiles()}selectionChanged(e){const t=e.data;this.setSelectedNodeForDetailsView(t),this.inspectedObjectChanged(e)}onSelectAllocationNode(e){const t=e.data;this.constructorsDataGrid.setAllocationNodeId(t.allocationNodeId()),this.setSelectedNodeForDetailsView(null)}inspectedObjectChanged(e){const t=e.data,i=this.profile.heapProfilerModel();i&&t instanceof Ye&&i.addInspectedHeapObject(String(t.snapshotNodeId))}setSelectedNodeForDetailsView(e){const t=e&&e.retainersDataSource();t?(this.retainmentDataGrid.setDataSource(t.snapshot,t.snapshotNodeIndex),this.allocationStackView&&this.allocationStackView.setAllocatedObject(t.snapshot,t.snapshotNodeIndex)):(this.allocationStackView&&this.allocationStackView.clear(),this.retainmentDataGrid.reset())}async changePerspectiveAndWait(e){const t=this.perspectives.findIndex((t=>t.title()===e));if(-1===t||this.currentPerspectiveIndex===t)return;const i=this.perspectives[t].masterGrid(this);if(!i)return;const r=i.once(pt.ContentShown),s=this.perspectiveSelect.options().find((e=>e.value===String(t)));this.perspectiveSelect.select(s),this.changePerspective(t),await r}async updateDataSourceAndView(){const e=this.dataGrid;if(!e||e.snapshot)return;const t=await this.profile.loadPromise;if(this.dataGrid!==e)return;if(e.snapshot!==t&&e.setDataSource(t,0),e!==this.diffDataGrid)return;this.baseProfile||(this.baseProfile=this.profiles()[this.baseSelect.selectedIndex()]);const i=await this.baseProfile.loadPromise;this.diffDataGrid.baseSnapshot!==i&&this.diffDataGrid.setBaseDataSource(i)}onSelectedPerspectiveChanged(e){this.changePerspective(Number(e.target.selectedOptions[0].value))}changePerspective(e){if(e===this.currentPerspectiveIndex)return;this.currentPerspectiveIndex=e,this.currentPerspective.deactivate(this);const t=this.perspectives[e];this.currentPerspective=t,this.dataGrid=t.masterGrid(this),t.activate(this),this.refreshVisibleData(),this.dataGrid&&this.dataGrid.updateWidths(),this.updateDataSourceAndView(),this.currentQuery&&this.searchResults&&this.performSearch(this.currentQuery,!1)}async selectLiveObject(e,t){if(await this.changePerspectiveAndWait(e),!this.dataGrid)return;const i=await this.dataGrid.revealObjectByHeapSnapshotId(t);i?i.select():o.Console.Console.instance().error("Cannot find corresponding heap snapshot node")}getPopoverRequest(e){const t=s.UIUtils.enclosingNodeOrSelfWithNodeName(e.target,"span"),i=s.UIUtils.enclosingNodeOrSelfWithNodeName(e.target,"tr");if(!i)return null;if(!this.dataGrid)return null;const r=this.dataGrid.dataGridNodeFromNode(i)||this.containmentDataGrid.dataGridNodeFromNode(i)||this.constructorsDataGrid.dataGridNodeFromNode(i)||this.diffDataGrid.dataGridNodeFromNode(i)||this.allocationDataGrid&&this.allocationDataGrid.dataGridNodeFromNode(i)||this.retainmentDataGrid.dataGridNodeFromNode(i),o=this.profile.heapProfilerModel();if(!r||!t||!o)return null;let n;return{box:t.boxInWindow(),show:async e=>{if(!o)return!1;const t=await r.queryObjectContent(o,"popover");return!!t&&(n=await u.ObjectPopoverHelper.ObjectPopoverHelper.buildObjectPopover(t,e),!!n||(o.runtimeModel().releaseObjectGroup("popover"),!1))},hide:()=>{o.runtimeModel().releaseObjectGroup("popover"),n&&n.dispose()}}}updatePerspectiveOptions(){const e=this.profiles().length>1;this.perspectiveSelect.removeOptions(),this.perspectives.forEach(((t,i)=>{(e||t!==this.comparisonPerspective)&&this.perspectiveSelect.createOption(t.title(),String(i))}))}updateBaseOptions(){const e=this.profiles(),t=this.baseSelect.selectedIndex();this.baseSelect.removeOptions();for(const t of e)this.baseSelect.createOption(t.title);t>-1&&this.baseSelect.setSelectedIndex(t)}updateFilterOptions(){const e=this.profiles(),t=this.filterSelect.selectedIndex();this.filterSelect.removeOptions(),this.filterSelect.createOption(Mt(kt.allObjects));for(let t=0;t-1&&this.filterSelect.setSelectedIndex(t)}updateControls(){this.updatePerspectiveOptions(),this.updateBaseOptions(),this.updateFilterOptions()}onReceiveSnapshot(e){this.updateControls();e.data.addEventListener(k.ProfileTitleChanged,this.updateControls,this)}onProfileHeaderRemoved(e){const t=e.data;t.removeEventListener(k.ProfileTitleChanged,this.updateControls,this),this.profile===t?(this.detach(),this.profile.profileType().removeEventListener("SnapshotReceived",this.onReceiveSnapshot,this),this.profile.profileType().removeEventListener(D.RemoveProfileHeader,this.onProfileHeaderRemoved,this),this.dispose()):this.updateControls()}dispose(){this.linkifier.dispose(),this.popoverHelper.dispose(),this.allocationStackView&&(this.allocationStackView.clear(),this.allocationDataGrid&&this.allocationDataGrid.dispose()),this.onStopTracking(),this.trackingOverviewGrid&&this.trackingOverviewGrid.removeEventListener("IdsRangeChanged",this.onIdsRangeChanged.bind(this))}}class jt{titleInternal;constructor(e){this.titleInternal=e}activate(e){}deactivate(e){e.baseSelect.setVisible(!1),e.filterSelect.setVisible(!1),e.classNameFilter.setVisible(!1),e.trackingOverviewGrid&&e.trackingOverviewGrid.detach(),e.allocationWidget&&e.allocationWidget.detach(),e.statisticsView&&e.statisticsView.detach(),e.splitWidget.detach(),e.splitWidget.detachChildWidgets()}masterGrid(e){return null}title(){return this.titleInternal}supportsSearch(){return!1}}class Ot extends jt{constructor(){super(Mt(kt.summary))}activate(e){e.splitWidget.setMainWidget(e.constructorsWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView),e.splitWidget.show(e.searchableViewInternal.element),e.filterSelect.setVisible(!0),e.classNameFilter.setVisible(!0),e.trackingOverviewGrid&&(e.trackingOverviewGrid.show(e.searchableViewInternal.element,e.splitWidget.element),e.trackingOverviewGrid.update(),e.trackingOverviewGrid.updateGrid())}masterGrid(e){return e.constructorsDataGrid}supportsSearch(){return!0}}class zt extends jt{constructor(){super(Mt(kt.comparison))}activate(e){e.splitWidget.setMainWidget(e.diffWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView),e.splitWidget.show(e.searchableViewInternal.element),e.baseSelect.setVisible(!0),e.classNameFilter.setVisible(!0)}masterGrid(e){return e.diffDataGrid}supportsSearch(){return!0}}class Bt extends jt{constructor(){super(Mt(kt.containment))}activate(e){e.splitWidget.setMainWidget(e.containmentWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView),e.splitWidget.show(e.searchableViewInternal.element)}masterGrid(e){return e.containmentDataGrid}}class Gt extends jt{allocationSplitWidget;constructor(){super(Mt(kt.allocation)),this.allocationSplitWidget=new s.SplitWidget.SplitWidget(!1,!0,"heapSnapshotAllocationSplitViewState",200,200),this.allocationSplitWidget.setSidebarWidget(new s.Widget.VBox)}activate(e){e.allocationWidget&&this.allocationSplitWidget.setMainWidget(e.allocationWidget),e.splitWidget.setMainWidget(e.constructorsWidget),e.splitWidget.setSidebarWidget(e.objectDetailsView);const t=new s.Widget.VBox,i=document.createElement("div");i.classList.add("heap-snapshot-view-resizer");const r=i.createChild("div","title").createChild("span");if(i.createChild("div","verticalResizerIcon"),r.textContent=Mt(kt.liveObjects),this.allocationSplitWidget.hideDefaultResizer(),this.allocationSplitWidget.installResizer(i),t.element.appendChild(i),e.splitWidget.show(t.element),this.allocationSplitWidget.setSidebarWidget(t),this.allocationSplitWidget.show(e.searchableViewInternal.element),e.constructorsDataGrid.clear(),e.allocationDataGrid){const t=e.allocationDataGrid.selectedNode;t&&e.constructorsDataGrid.setAllocationNodeId(t.allocationNodeId())}}deactivate(e){this.allocationSplitWidget.detach(),super.deactivate(e)}masterGrid(e){return e.allocationDataGrid}}class Vt extends jt{constructor(){super(Mt(kt.statistics))}activate(e){e.statisticsView.show(e.searchableViewInternal.element)}masterGrid(e){return null}}class Ut extends(o.ObjectWrapper.eventMixin(L)){exposeInternals;captureNumericValue;customContentInternal;constructor(e,t){super(e||Ut.TypeId,t||Mt(kt.heapSnapshot)),l.TargetManager.TargetManager.instance().observeModels(l.HeapProfilerModel.HeapProfilerModel,this),l.TargetManager.TargetManager.instance().addModelListener(l.HeapProfilerModel.HeapProfilerModel,l.HeapProfilerModel.Events.ResetProfiles,this.resetProfiles,this),l.TargetManager.TargetManager.instance().addModelListener(l.HeapProfilerModel.HeapProfilerModel,l.HeapProfilerModel.Events.AddHeapSnapshotChunk,this.addHeapSnapshotChunk,this),l.TargetManager.TargetManager.instance().addModelListener(l.HeapProfilerModel.HeapProfilerModel,l.HeapProfilerModel.Events.ReportHeapSnapshotProgress,this.reportHeapSnapshotProgress,this),this.exposeInternals=o.Settings.Settings.instance().createSetting("exposeInternals",!1),this.captureNumericValue=o.Settings.Settings.instance().createSetting("captureNumericValue",!1),this.customContentInternal=null}modelAdded(e){e.enable()}modelRemoved(e){}getProfiles(){return super.getProfiles()}fileExtension(){return".heapsnapshot"}get buttonTooltip(){return Mt(kt.takeHeapSnapshot)}isInstantProfile(){return!0}buttonClicked(){return this.takeHeapSnapshot(),a.userMetrics.actionTaken(a.UserMetrics.Action.ProfilesHeapProfileTaken),!1}get treeItemTitle(){return Mt(kt.heapSnapshots)}get description(){return Mt(kt.heapSnapshotProfilesShowMemory)}customContent(){const e=document.createElement("div"),t=c.Runtime.experiments.isEnabled("showOptionToExposeInternalsInHeapSnapshot"),i=!t;if(t){const t=s.SettingsUI.createSettingCheckbox(Mt(kt.exposeInternals),this.exposeInternals,i);e.appendChild(t)}const r=s.SettingsUI.createSettingCheckbox(Mt(kt.captureNumericValue),this.captureNumericValue,i);return e.appendChild(r),this.customContentInternal=e,e}setCustomContentEnabled(e){this.customContentInternal&&this.customContentInternal.querySelectorAll("[is=dt-checkbox]").forEach((t=>{t.checkboxElement.disabled=!e}))}createProfileLoadedFromFile(e){return new Wt(null,this,e)}async takeHeapSnapshot(){if(this.profileBeingRecorded())return;const e=s.Context.Context.instance().flavor(l.HeapProfilerModel.HeapProfilerModel);if(!e)return;let t=new Wt(e,this);this.setProfileBeingRecorded(t),this.addProfile(t),t.updateStatus(Mt(kt.snapshotting)),await e.takeHeapSnapshot({reportProgress:!0,captureNumericValue:this.captureNumericValue.get(),exposeInternals:this.exposeInternals.get()}),t=this.profileBeingRecorded(),t&&(t.title=Mt(kt.snapshotD,{PH1:t.uid}),t.finishLoad(),this.setProfileBeingRecorded(null),this.dispatchEventToListeners(D.ProfileComplete,t))}addHeapSnapshotChunk(e){const t=this.profileBeingRecorded();t&&t.transferChunk(e.data)}reportHeapSnapshotProgress(e){const t=this.profileBeingRecorded();if(!t)return;const{done:i,total:r,finished:s}=e.data;t.updateStatus(Mt(kt.percentagePlaceholder,{PH1:(i/r*100).toFixed(0)}),!0),s&&t.prepareToLoad()}resetProfiles(e){const t=e.data;for(const e of this.getProfiles())e.heapProfilerModel()===t&&this.removeProfile(e)}snapshotReceived(e){this.profileBeingRecorded()===e&&this.setProfileBeingRecorded(null),this.dispatchEventToListeners("SnapshotReceived",e)}static TypeId="HEAP";static SnapshotReceived="SnapshotReceived"}class At extends(o.ObjectWrapper.eventMixin(Ut)){recordAllocationStacksSettingInternal;customContentInternal;recording;profileSamples;constructor(){super(At.TypeId,Mt(kt.allocationInstrumentationOn)),this.recordAllocationStacksSettingInternal=o.Settings.Settings.instance().createSetting("recordAllocationStacks",!1),this.customContentInternal=null,this.recording=!1}modelAdded(e){super.modelAdded(e),e.addEventListener(l.HeapProfilerModel.Events.HeapStatsUpdate,this.heapStatsUpdate,this),e.addEventListener(l.HeapProfilerModel.Events.LastSeenObjectId,this.lastSeenObjectId,this)}modelRemoved(e){super.modelRemoved(e),e.removeEventListener(l.HeapProfilerModel.Events.HeapStatsUpdate,this.heapStatsUpdate,this),e.removeEventListener(l.HeapProfilerModel.Events.LastSeenObjectId,this.lastSeenObjectId,this)}heapStatsUpdate(e){if(!this.profileSamples)return;const t=e.data;let i;for(let e=0;e{this.fulfillLoad=e})),this.totalNumberOfChunks=0,this.bufferedWriter=null,this.onTempFileReady=null}heapProfilerModel(){return this.heapProfilerModelInternal}async getLocation(e){return this.snapshotProxy?this.snapshotProxy.getLocation(e):null}createSidebarTreeElement(e){return new A(e,this,"heap-snapshot-sidebar-tree-item")}createView(e){return new Lt(e,this)}prepareToLoad(){console.assert(!this.receiver,"Already loading"),this.setupWorker(),this.updateStatus(Mt(kt.loading),!0)}finishLoad(){!this.wasDisposed&&this.receiver&&this.receiver.close(),this.bufferedWriter&&this.didWriteToTempFile(this.bufferedWriter)}didWriteToTempFile(e){this.wasDisposed?e&&e.remove():(this.tempFile=e,e||(this.failedToCreateTempFile=!0),this.onTempFileReady&&(this.onTempFileReady(),this.onTempFileReady=null))}setupWorker(){console.assert(!this.workerProxy,"HeapSnapshotWorkerProxy already exists"),this.workerProxy=new xt(this.handleWorkerEvent.bind(this)),this.workerProxy.addEventListener("Wait",(e=>{this.updateStatus(null,e.data)}),this),this.receiver=this.workerProxy.createLoader(this.uid,this.snapshotReceived.bind(this))}handleWorkerEvent(e,i){if(p.HeapSnapshotModel.HeapSnapshotProgressEvent.BrokenSnapshot===e){const e=i;return void o.Console.Console.instance().error(e)}if(p.HeapSnapshotModel.HeapSnapshotProgressEvent.Update!==e)return;const r=i,s=t.i18n.deserializeUIString(r);this.updateStatus(Ht(s.string,s.values))}dispose(){this.workerProxy&&this.workerProxy.dispose(),this.removeTempFile(),this.wasDisposed=!0}didCompleteSnapshotTransfer(){this.snapshotProxy&&this.updateStatus(e.NumberUtilities.bytesToString(this.snapshotProxy.totalSize),!1)}transferChunk(e){this.bufferedWriter||(this.bufferedWriter=new h.TempFile.TempFile),this.bufferedWriter.write([e]),++this.totalNumberOfChunks,this.receiver&&this.receiver.write(e)}snapshotReceived(e){this.wasDisposed||(this.receiver=null,this.snapshotProxy=e,this.maxJSObjectId=e.maxJSObjectId(),this.didCompleteSnapshotTransfer(),this.workerProxy&&this.workerProxy.startCheckingForLongRunningCalls(),this.notifySnapshotReceived())}notifySnapshotReceived(){this.snapshotProxy&&this.fulfillLoad&&this.fulfillLoad(this.snapshotProxy),this.profileType().snapshotReceived(this),this.canSaveToFile()&&this.dispatchEventToListeners(k.ProfileReceived)}canSaveToFile(){return!this.fromFile()&&Boolean(this.snapshotProxy)}saveToFile(){const t=new h.FileUtils.FileOutputStream;this.fileName=this.fileName||"Heap-"+e.DateUtilities.toISO8601Compact(new Date)+this.profileType().fileExtension();const i=async e=>{if(e){if(this.failedToCreateTempFile)return o.Console.Console.instance().error("Failed to open temp file with heap snapshot"),void t.close();if(this.tempFile){const e=await this.tempFile.copyToOutputStream(t,this.onChunkTransferred.bind(this));return e&&o.Console.Console.instance().error("Failed to read heap snapshot from temp file: "+e.message),void this.didCompleteSnapshotTransfer()}this.onTempFileReady=()=>{i(e)},this.updateSaveProgress(0,1)}};t.open(this.fileName).then(i.bind(this))}onChunkTransferred(e){this.updateSaveProgress(e.loadedSize(),e.fileSize())}updateSaveProgress(e,t){const i=(100*(t&&e/t)).toFixed(0);this.updateStatus(Mt(kt.savingD,{PH1:i}))}async loadFromFile(e){this.updateStatus(Mt(kt.loading),!0),this.setupWorker();const t=new h.FileUtils.ChunkedFileReader(e,1e7),i=await t.read(this.receiver);if(!i){const e=t.error();e&&this.updateStatus(e.message)}return i?null:t.error()}profileType(){return super.profileType()}}class _t extends s.Widget.VBox{pieChart;constructor(){super(),this.element.classList.add("heap-snapshot-statistics-view"),this.pieChart=new n.PieChart.PieChart,this.setTotalAndRecords(0,[]),this.pieChart.classList.add("heap-snapshot-stats-pie-chart"),this.element.appendChild(this.pieChart)}static valueFormatter(t){return Mt(kt.sKb,{PH1:e.NumberUtilities.withThousandsSeparator(Math.round(t/1e3))})}setTotalAndRecords(e,t){this.pieChart.data={chartName:Mt(kt.heapMemoryUsage),size:150,formatter:_t.valueFormatter,showLegend:!0,total:e,slices:t}}}class Jt extends s.Widget.Widget{heapProfilerModel;linkifier;frameElements;constructor(e){super(),this.heapProfilerModel=e,this.linkifier=new d.Linkifier.Linkifier,this.frameElements=[]}onContextMenu(e,t){const i=new s.ContextMenu.ContextMenu(t);i.containsTarget(e)||i.appendApplicableItems(e),i.show(),t.consume(!0)}onStackViewKeydown(e){const t=e.target;if(!t)return;if("Enter"===e.key){const i=$t.get(t);if(!i)return;const r=d.Linkifier.Linkifier.linkInfo(i);if(!r)return;return void(d.Linkifier.Linkifier.invokeFirstAction(r)&&e.consume(!0))}let i;const r=e;if("ArrowUp"===r.key)i=!1;else{if("ArrowDown"!==r.key)return;i=!0}const s=this.frameElements.indexOf(t);if(-1===s)return;const o=i?s+1:s-1;if(o<0||o>=this.frameElements.length)return;const n=this.frameElements[o];n.tabIndex=0,t.tabIndex=-1,n.focus(),e.consume(!0)}async setAllocatedObject(e,t){this.clear();const i=await e.allocationStack(t);if(!i){const e=this.element.createChild("div","no-heap-allocation-stack");return void s.UIUtils.createTextChild(e,Mt(kt.stackWasNotRecordedForThisObject))}const r=this.element.createChild("div","heap-allocation-stack");r.addEventListener("keydown",this.onStackViewKeydown.bind(this),!1);for(const e of i){const t=r.createChild("div","stack-frame");this.frameElements.push(t),t.tabIndex=-1;if(t.createChild("div").textContent=s.UIUtils.beautifyFunctionName(e.functionName),!e.scriptId)continue;const i=this.heapProfilerModel?this.heapProfilerModel.target():null,o={columnNumber:e.column-1,inlineFrameIndex:0},n=this.linkifier.linkifyScriptLocation(i,String(e.scriptId),e.scriptName,e.line-1,o);t.appendChild(n),$t.set(t,n),t.addEventListener("contextmenu",this.onContextMenu.bind(this,n))}this.frameElements[0].tabIndex=0}clear(){this.element.removeChildren(),this.frameElements=[],this.linkifier.reset()}}const $t=new WeakMap;var qt=Object.freeze({__proto__:null,HeapSnapshotView:Lt,Perspective:jt,SummaryPerspective:Ot,ComparisonPerspective:zt,ContainmentPerspective:Bt,AllocationPerspective:Gt,StatisticsPerspective:Vt,HeapSnapshotProfileType:Ut,TrackingHeapSnapshotProfileType:At,HeapProfileHeader:Wt,HeapSnapshotStatisticsView:_t,HeapAllocationStackView:Jt});class Qt{cpuProfileType;heapSnapshotProfileType;samplingHeapProfileType;trackingHeapSnapshotProfileType;constructor(){this.cpuProfileType=new oe,this.heapSnapshotProfileType=new Ut,this.samplingHeapProfileType=new Be,this.trackingHeapSnapshotProfileType=new At}}const Kt=new Qt;var Yt=Object.freeze({__proto__:null,ProfileTypeRegistry:Qt,instance:Kt});const Zt={clearAllProfiles:"Clear all profiles",cantLoadFileSupportedFile:"Can’t load file. Supported file extensions: ''{PH1}''.",cantLoadProfileWhileAnother:"Can’t load profile while another profile is being recorded.",profileLoadingFailedS:"Profile loading failed: {PH1}.",load:"Load…",runD:"Run {PH1}",profiles:"Profiles",deprecationWarnMsg:"This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles.",learnMore:"Learn more",feedback:"Feedback",goToPerformancePanel:"Go to Performance Panel",enableThisPanelTemporarily:"Enable this panel temporarily"},Xt=t.i18n.registerUIStrings("panels/profiler/ProfilesPanel.ts",Zt),ei=t.i18n.getLocalizedString.bind(void 0,Xt);class ti extends s.Panel.PanelWithSidebar{profileTypes;profilesItemTreeElement;sidebarTree;profileViews;toolbarElement;toggleRecordAction;toggleRecordButton;clearResultsButton;profileViewToolbar;profileGroups;launcherView;visibleView;profileToView;typeIdToSidebarSection;fileSelectorElement;selectedProfileType;constructor(e,t,i){super(e),this.profileTypes=t;const r=new s.Widget.VBox;this.splitWidget().setMainWidget(r),this.profilesItemTreeElement=new oi(this),this.sidebarTree=new s.TreeOutline.TreeOutlineInShadow,this.sidebarTree.element.classList.add("profiles-sidebar-tree-box"),this.panelSidebarElement().appendChild(this.sidebarTree.element),this.sidebarTree.appendChild(this.profilesItemTreeElement),this.sidebarTree.element.addEventListener("keydown",this.onKeyDown.bind(this),!1),this.profileViews=document.createElement("div"),this.profileViews.id="profile-views",this.profileViews.classList.add("vbox"),r.element.appendChild(this.profileViews),this.toolbarElement=document.createElement("div"),this.toolbarElement.classList.add("profiles-toolbar"),r.element.insertBefore(this.toolbarElement,r.element.firstChild),this.panelSidebarElement().classList.add("profiles-tree-sidebar");const o=document.createElement("div");o.classList.add("profiles-toolbar"),this.panelSidebarElement().insertBefore(o,this.panelSidebarElement().firstChild);const n=new s.Toolbar.Toolbar("",o);this.toggleRecordAction=s.ActionRegistry.ActionRegistry.instance().action(i),this.toggleRecordButton=s.Toolbar.Toolbar.createActionButton(this.toggleRecordAction),n.appendToolbarItem(this.toggleRecordButton),this.clearResultsButton=new s.Toolbar.ToolbarButton(ei(Zt.clearAllProfiles),"clear"),this.clearResultsButton.addEventListener(s.Toolbar.ToolbarButton.Events.Click,this.reset,this),n.appendToolbarItem(this.clearResultsButton),n.appendSeparator(),n.appendToolbarItem(s.Toolbar.Toolbar.createActionButtonForId("components.collect-garbage")),this.profileViewToolbar=new s.Toolbar.Toolbar("",this.toolbarElement),this.profileViewToolbar.makeWrappable(!0),this.profileGroups={},this.launcherView=new xe(this),this.launcherView.addEventListener(ye.ProfileTypeSelected,this.onProfileTypeSelected,this),this.profileToView=[],this.typeIdToSidebarSection={};const a=this.profileTypes;for(let e=0;eBoolean(t.fileExtension())&&e.endsWith(t.fileExtension()||"")))||null}async loadFromFile(e){this.createFileSelectorElement();const t=this.findProfileTypeByExtension(e.name);if(!t){const e=new Set(this.profileTypes.map((e=>e.fileExtension())).filter((e=>e)));return void o.Console.Console.instance().error(ei(Zt.cantLoadFileSupportedFile,{PH1:Array.from(e).join("', '")}))}if(Boolean(t.profileBeingRecorded()))return void o.Console.Console.instance().error(ei(Zt.cantLoadProfileWhileAnother));const i=await t.loadFromFile(e);i&&"message"in i&&s.UIUtils.MessageDialog.show(ei(Zt.profileLoadingFailedS,{PH1:i.message}))}toggleRecord(){if(!this.toggleRecordAction.enabled())return!0;const t=e.DOMUtilities.deepActiveElement(this.element.ownerDocument),i=this.selectedProfileType;if(!i)return!0;const r=i.buttonClicked();return this.updateToggleRecordAction(r),r?(this.launcherView.profileStarted(),i.hasTemporaryView()&&this.showProfile(i.profileBeingRecorded())):this.launcherView.profileFinished(),t&&t.focus(),!0}onSuspendStateChanged(){this.updateToggleRecordAction(this.toggleRecordAction.toggled())}updateToggleRecordAction(e){const t=Boolean(s.Context.Context.instance().flavor(l.CPUProfilerModel.CPUProfilerModel)||s.Context.Context.instance().flavor(l.HeapProfilerModel.HeapProfilerModel)),i=e||!l.TargetManager.TargetManager.instance().allTargetsSuspended()&&t;this.toggleRecordAction.setEnabled(i),this.toggleRecordAction.setToggled(e),i?this.toggleRecordButton.setTitle(this.selectedProfileType?this.selectedProfileType.buttonTooltip:""):this.toggleRecordButton.setTitle(s.UIUtils.anotherProfilerActiveLabel()),this.selectedProfileType&&this.launcherView.updateProfileType(this.selectedProfileType,i)}profileBeingRecordedRemoved(){this.updateToggleRecordAction(!1),this.launcherView.profileFinished()}onProfileTypeSelected(e){this.selectedProfileType=e.data,this.updateProfileTypeSpecificUI()}updateProfileTypeSpecificUI(){this.updateToggleRecordAction(this.toggleRecordAction.toggled())}reset(){this.profileTypes.forEach((e=>e.reset())),delete this.visibleView,this.profileGroups={},this.updateToggleRecordAction(!1),this.launcherView.profileFinished(),this.sidebarTree.element.classList.remove("some-expandable"),this.launcherView.detach(),this.profileViews.removeChildren(),this.profileViewToolbar.removeToolbarItems(),this.clearResultsButton.element.classList.remove("hidden"),this.profilesItemTreeElement.select(),this.showLauncherView()}showLauncherView(){this.closeVisibleView(),this.profileViewToolbar.removeToolbarItems(),this.launcherView.show(this.profileViews),this.visibleView=this.launcherView,this.toolbarElement.classList.add("hidden")}registerProfileType(e){this.launcherView.addProfileType(e);const t=new ii(this,e);this.typeIdToSidebarSection[e.id]=t,this.sidebarTree.appendChild(t),t.childrenListElement.addEventListener("contextmenu",this.handleContextMenuEvent.bind(this),!1),e.addEventListener(D.ViewUpdated,this.updateProfileTypeSpecificUI,this),e.addEventListener(D.AddProfileHeader,(function(e){this.addProfileHeader(e.data)}),this),e.addEventListener(D.RemoveProfileHeader,(function(e){this.removeProfileHeader(e.data)}),this),e.addEventListener(D.ProfileComplete,(function(e){this.showProfile(e.data)}),this);const i=e.getProfiles();for(let e=0;e{e.map((e=>this.profileViewToolbar.appendToolbarItem(e)))})),t}showObject(e,t){}async linkifyObject(e){return null}viewForProfile(e){const t=this.indexOfViewForProfile(e);if(-1!==t)return this.profileToView[t].view;const i=e.createView(this);return i.element.classList.add("profile-view"),this.profileToView.push({profile:e,view:i}),i}indexOfViewForProfile(e){return this.profileToView.findIndex((t=>t.profile===e))}closeVisibleView(){this.visibleView&&this.visibleView.detach(),delete this.visibleView}focus(){this.sidebarTree.focus()}wasShown(){super.wasShown(),this.registerCSSFiles([he,pe,ce]),this.sidebarTree.registerCSSFiles([ue])}}class ii extends s.TreeOutline.TreeElement{dataDisplayDelegate;profileTreeElements;profileGroups;constructor(e,t){super(t.treeItemTitle,!0),this.selectable=!1,this.dataDisplayDelegate=e,this.profileTreeElements=[],this.profileGroups={},this.expand(),this.hidden=!0,this.setCollapsible(!1)}addProfileHeader(e){this.hidden=!1;const t=e.profileType();let i=this;const r=e.createSidebarTreeElement(this.dataDisplayDelegate);if(this.profileTreeElements.push(r),!e.fromFile()&&t.profileBeingRecorded()!==e){const t=e.title;let s=this.profileGroups[t];s||(s=new ri,this.profileGroups[t]=s),s.profileSidebarTreeElements.push(r);const o=s.profileSidebarTreeElements.length;if(2===o){s.sidebarTreeElement=new si(this.dataDisplayDelegate,e.title);const t=s.profileSidebarTreeElements[0],i=this.children().indexOf(t);this.insertChild(s.sidebarTreeElement,i);const r=t.selected;this.removeChild(t),s.sidebarTreeElement.appendChild(t),r&&t.revealAndSelect(),t.setSmall(!0),t.setMainTitle(ei(Zt.runD,{PH1:1})),this.treeOutline&&this.treeOutline.element.classList.add("some-expandable")}o>=2&&(i=s.sidebarTreeElement,r.setSmall(!0),r.setMainTitle(ei(Zt.runD,{PH1:o})))}i&&i.appendChild(r)}removeProfileHeader(e){const t=this.sidebarElementIndex(e);if(-1===t)return!1;const i=this.profileTreeElements[t];this.profileTreeElements.splice(t,1);let r=this;const s=this.profileGroups[e.title];if(s){const t=s.profileSidebarTreeElements;if(t.splice(t.indexOf(i),1),1===t.length){const i=r.children().indexOf(s.sidebarTreeElement);s.sidebarTreeElement&&s.sidebarTreeElement.removeChild(t[0]),this.insertChild(t[0],i),t[0].setSmall(!1),t[0].setMainTitle(e.title),s.sidebarTreeElement&&this.removeChild(s.sidebarTreeElement)}0!==t.length&&(r=s.sidebarTreeElement)}return r&&r.removeChild(i),i.dispose(),!this.childCount()&&(this.hidden=!0,!0)}sidebarElementForProfile(e){const t=this.sidebarElementIndex(e);return-1===t?null:this.profileTreeElements[t]}sidebarElementIndex(e){const t=this.profileTreeElements;for(let i=0;i0;if(e){const e=this.lastChild();e instanceof A&&this.dataDisplayDelegate.showProfile(e.profile)}return e}onattach(){this.listItemElement.classList.add("profile-group-sidebar-tree-item"),this.listItemElement.createChild("div","icon"),this.listItemElement.createChild("div","titles no-subtitle").createChild("span","title-container").createChild("span","title").textContent=this.profileTitle}}class oi extends s.TreeOutline.TreeElement{panel;constructor(e){super("",!1),this.selectable=!0,this.panel=e}onselect(){return this.panel.showLauncherView(),!0}onattach(){this.listItemElement.classList.add("profile-launcher-view-tree-item"),this.listItemElement.createChild("div","icon"),this.listItemElement.createChild("div","titles no-subtitle").createChild("span","title-container").createChild("span","title").textContent=ei(Zt.profiles)}}let ni;class ai extends ti{constructor(){super("js_profiler",[Kt.cpuProfileType],"profiler.js-toggle-recording"),this.splitWidget().mainWidget()?.setMinimumSize(350,0),c.Runtime.experiments.isEnabled(c.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI)||(c.Runtime.experiments.isEnabled("jsProfilerTemporarilyEnable")?this.#t():this.#i())}static instance(e={forceNew:null}){const{forceNew:t}=e;return ni&&!t||(ni=new ai),ni}#t(){function e(){a.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab("https://github.com/ChromeDevTools/rfcs/discussions/2")}const t=new s.Infobar.Infobar(s.Infobar.Type.Warning,ei(Zt.deprecationWarnMsg),[{text:ei(Zt.learnMore),highlight:!1,delegate:e,dismiss:!1},{text:ei(Zt.feedback),highlight:!1,delegate:e,dismiss:!1},{text:ei(Zt.goToPerformancePanel),highlight:!0,delegate:async function(){await s.InspectorView.InspectorView.instance().showPanel("timeline")},dismiss:!1}],void 0);t.setParentView(this),this.splitWidget().mainWidget()?.element.prepend(t.element)}#i(){const e=this.splitWidget().mainWidget();if(e?.detachChildWidgets(),e){const t=new s.Widget.VBox;t.contentElement.classList.add("empty-landing-page","fill");const i=t.contentElement.createChild("div");i.createChild("p").textContent="This panel is deprecated and will be removed in the next version. Use the Performance panel to record JavaScript CPU profiles.",i.createChild("p").textContent="You can temporarily enable this panel with Settings > Experiments > Enable JavaScript Profiler.",i.appendChild(s.UIUtils.createTextButton(ei(Zt.goToPerformancePanel),(async function(){await s.InspectorView.InspectorView.instance().showPanel("timeline")}),"infobar-button primary-button")),i.appendChild(s.UIUtils.createTextButton(ei(Zt.learnMore),(function(){a.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab("https://developer.chrome.com/blog/js-profiler-deprecation/")}))),i.appendChild(s.UIUtils.createTextButton(ei(Zt.feedback),(function(){a.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab("https://bugs.chromium.org/p/chromium/issues/detail?id=1354548")}))),i.appendChild(s.UIUtils.createTextButton(ei(Zt.enableThisPanelTemporarily),(async function(){await s.ViewManager.ViewManager.instance().showView("experiments");(await s.ViewManager.ViewManager.instance().view("experiments").widget()).setFilter("Enable JavaScript Profiler temporarily")}))),t.show(e.element)}}wasShown(){super.wasShown(),s.Context.Context.instance().setFlavor(ai,this)}willHide(){s.Context.Context.instance().setFlavor(ai,null)}handleAction(e,t){const i=s.Context.Context.instance().flavor(ai);if(!(i instanceof ai))throw new Error("non-null JSProfilerPanel expected!");return i.toggleRecord(),!0}}var li=Object.freeze({__proto__:null,ProfilesPanel:ti,ProfileTypeSidebarSection:ii,ProfileGroup:ri,ProfileGroupSidebarTreeElement:si,ProfilesSidebarTreeElement:oi,JSProfilerPanel:ai});const di={revealInSummaryView:"Reveal in Summary view"},hi=t.i18n.registerUIStrings("panels/profiler/HeapProfilerPanel.ts",di),ci=t.i18n.getLocalizedString.bind(void 0,hi);let pi;class ui extends ti{constructor(){const e=Kt;super("heap_profiler",[e.heapSnapshotProfileType,e.trackingHeapSnapshotProfileType,e.samplingHeapProfileType],"profiler.heap-toggle-recording")}static instance(){return pi||(pi=new ui),pi}appendApplicableItems(e,t,i){if(!(i instanceof l.RemoteObject.RemoteObject))return;if(!this.isShowing())return;const r=i;if(!r.objectId)return;const s=r.objectId;if(!Kt.heapSnapshotProfileType.getProfiles().length)return;const o=r.runtimeModel().heapProfilerModel();o&&t.revealSection().appendItem(ci(di.revealInSummaryView),function(e){o.snapshotObjectIdForObjectId(s).then((t=>{this.isShowing()&&t&&this.showObject(t,e)}))}.bind(this,"Summary"))}handleAction(e,t){const i=s.Context.Context.instance().flavor(ui);return console.assert(Boolean(i)&&i instanceof ui),i&&i.toggleRecord(),!0}wasShown(){super.wasShown(),s.Context.Context.instance().setFlavor(ui,this),a.userMetrics.panelLoaded("heap_profiler","DevTools.Launch.HeapProfiler")}willHide(){s.Context.Context.instance().setFlavor(ui,null)}showObject(e,t){const i=Kt.heapSnapshotProfileType.getProfiles();for(let r=0;r=parseInt(e,10)){this.showProfile(s);this.viewForProfile(s).selectLiveObject(t,e);break}}}}var mi=Object.freeze({__proto__:null,HeapProfilerPanel:ui});const fi=new CSSStyleSheet;fi.replaceSync(".data-grid{border:none}.data-grid td .size-units{margin-left:4px;font-size:75%}.data-grid tr:not(.selected) td .size-units{color:var(--color-text-secondary)}.toolbar{border-bottom:1px solid var(--color-details-hairline)}\n/*# sourceURL=liveHeapProfile.css */\n");const gi={jsHeap:"JS Heap",allocatedJsHeapSizeCurrentlyIn:"Allocated JS heap size currently in use",vms:"VMs",numberOfVmsSharingTheSameScript:"Number of VMs sharing the same script source",scriptUrl:"Script URL",urlOfTheScriptSource:"URL of the script source",heapProfile:"Heap Profile",anonymousScriptS:"(Anonymous Script {PH1})",kb:"kB"},vi=t.i18n.registerUIStrings("panels/profiler/LiveHeapProfileView.ts",gi),wi=t.i18n.getLocalizedString.bind(void 0,vi);let Si,bi;class Ci extends s.Widget.VBox{gridNodeByUrl;setting;toggleRecordAction;toggleRecordButton;startWithReloadButton;dataGrid;currentPollId;constructor(){super(!0),this.gridNodeByUrl=new Map,this.setting=o.Settings.Settings.instance().moduleSetting("memoryLiveHeapProfile");const e=new s.Toolbar.Toolbar("live-heap-profile-toolbar",this.contentElement);this.toggleRecordAction=s.ActionRegistry.ActionRegistry.instance().action("live-heap-profile.toggle-recording"),this.toggleRecordButton=s.Toolbar.Toolbar.createActionButton(this.toggleRecordAction),this.toggleRecordButton.setToggled(this.setting.get()),e.appendToolbarItem(this.toggleRecordButton);const t=l.TargetManager.TargetManager.instance().primaryPageTarget();if(t&&t.model(l.ResourceTreeModel.ResourceTreeModel)){const t=s.ActionRegistry.ActionRegistry.instance().action("live-heap-profile.start-with-reload");this.startWithReloadButton=s.Toolbar.Toolbar.createActionButton(t),e.appendToolbarItem(this.startWithReloadButton)}this.dataGrid=this.createDataGrid(),this.dataGrid.asWidget().show(this.contentElement),this.currentPollId=0}static instance(){return Si||(Si=new Ci),Si}createDataGrid(){const e={id:"",title:o.UIString.LocalizedEmptyString,width:void 0,fixedWidth:!0,sortable:!0,align:r.DataGrid.Align.Right,sort:r.DataGrid.Order.Descending,titleDOMFragment:void 0,editable:void 0,nonSelectable:void 0,longText:void 0,disclosure:void 0,weight:void 0,allowInSortByEvenWhenHidden:void 0,dataType:void 0,defaultWeight:void 0},t=[{...e,id:"size",title:wi(gi.jsHeap),width:"72px",fixedWidth:!0,sortable:!0,align:r.DataGrid.Align.Right,sort:r.DataGrid.Order.Descending,tooltip:wi(gi.allocatedJsHeapSizeCurrentlyIn)},{...e,id:"isolates",title:wi(gi.vms),width:"40px",fixedWidth:!0,align:r.DataGrid.Align.Right,tooltip:wi(gi.numberOfVmsSharingTheSameScript)},{...e,id:"url",title:wi(gi.scriptUrl),fixedWidth:!1,sortable:!0,tooltip:wi(gi.urlOfTheScriptSource)}],i=new r.SortableDataGrid.SortableDataGrid({displayName:wi(gi.heapProfile),columns:t,editCallback:void 0,deleteCallback:void 0,refreshCallback:void 0});i.setResizeMethod(r.DataGrid.ResizeMethod.Last),i.element.classList.add("flex-auto"),i.element.addEventListener("keydown",this.onKeyDown.bind(this),!1),i.addEventListener(r.DataGrid.Events.OpenedNode,this.revealSourceForSelectedNode,this),i.addEventListener(r.DataGrid.Events.SortingChanged,this.sortingChanged,this);for(const e of t){const t=i.headerTableHeader(e.id);t&&t.setAttribute("title",e.tooltip)}return i}wasShown(){super.wasShown(),this.poll(),this.registerCSSFiles([fi]),this.setting.addChangeListener(this.settingChanged,this)}willHide(){++this.currentPollId,this.setting.removeChangeListener(this.settingChanged,this)}settingChanged(e){this.toggleRecordButton.setToggled(e.data)}async poll(){const e=this.currentPollId;do{const t=Array.from(l.IsolateManager.IsolateManager.instance().isolates()),i=await Promise.all(t.map((e=>{const t=e.heapProfilerModel();return t?t.getSamplingProfile():null})));if(this.currentPollId!==e)return;this.update(t,i),await new Promise((e=>window.setTimeout(e,3e3)))}while(this.currentPollId===e)}update(e,t){const i=new Map;t.forEach(((t,i)=>{t&&o(e[i],"",t.head)}));const r=this.dataGrid.rootNode(),s=new Set;for(const e of i){const t=e[0],i=e[1].size,o=e[1].isolates.size;if(!t){console.info(`Node with empty URL: ${i} bytes`);continue}let n=this.gridNodeByUrl.get(t);n?n.updateNode(i,o):(n=new Pi(t,i,o),this.gridNodeByUrl.set(t,n),r.appendChild(n)),s.add(n)}for(const e of r.children.slice()){s.has(e)||e.remove();const t=e;this.gridNodeByUrl.delete(t.url)}function o(e,t,r){const s=r.callFrame.url||t||function(e){const t=e.callFrame.functionName;return t.startsWith("(")&&"(root)"!==t?t:""}(r)||function(e){return Number(e.callFrame.scriptId)?wi(gi.anonymousScriptS,{PH1:e.callFrame.scriptId}):""}(r);if(r.children.forEach(o.bind(null,e,s)),!r.selfSize)return;let n=i.get(s);n||(n={size:0,isolates:new Set},i.set(s,n)),n.size+=r.selfSize,n.isolates.add(e)}this.sortingChanged()}onKeyDown(e){"Enter"===e.key&&(e.consume(!0),this.revealSourceForSelectedNode())}revealSourceForSelectedNode(){const e=this.dataGrid.selectedNode;if(!e||!e.url)return;const t=m.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e.url);t&&o.Revealer.reveal(t)}sortingChanged(){const e=this.dataGrid.sortColumnId();if(!e)return;const t="url"===e?function(e,t){return t.url.localeCompare(e.url)}:function(e,t){return t.size-e.size};this.dataGrid.sortNodes(t,this.dataGrid.isSortOrderAscending())}toggleRecording(){!this.setting.get()?this.startRecording(!1):this.stopRecording()}startRecording(e){if(this.setting.set(!0),!e)return;const t=l.TargetManager.TargetManager.instance().primaryPageTarget();if(!t)return;const i=t.model(l.ResourceTreeModel.ResourceTreeModel);i&&i.reloadPage()}async stopRecording(){this.setting.set(!1)}}class Pi extends r.SortableDataGrid.SortableDataGridNode{url;size;isolateCount;constructor(e,t,i){super(),this.url=e,this.size=t,this.isolateCount=i}updateNode(e,t){this.size===e&&this.isolateCount===t||(this.size=e,this.isolateCount=t,this.refresh())}createCell(t){const i=this.createTD(t);switch(t){case"url":i.textContent=this.url;break;case"size":i.textContent=e.NumberUtilities.withThousandsSeparator(Math.round(this.size/1e3)),i.createChild("span","size-units").textContent=wi(gi.kb);break;case"isolates":i.textContent=`${this.isolateCount}`}return i}}class Ti{static instance(e={forceNew:null}){const{forceNew:t}=e;return bi&&!t||(bi=new Ti),bi}handleAction(e,t){return(async()=>{const e="live_heap_profile";await s.ViewManager.ViewManager.instance().showView(e);const i=s.ViewManager.ViewManager.instance().view(e);if(i){const e=await i.widget();this.innerHandleAction(e,t)}})(),!0}innerHandleAction(e,t){switch(t){case"live-heap-profile.toggle-recording":e.toggleRecording();break;case"live-heap-profile.start-with-reload":e.startRecording(!0);break;default:console.assert(!1,`Unknown action: ${t}`)}}}var xi=Object.freeze({__proto__:null,LiveHeapProfileView:Ci,GridNode:Pi,ActionDelegate:Ti});export{T as BottomUpProfileDataGrid,M as CPUProfileFlameChart,de as CPUProfileView,x as ChildrenProvider,_e as HeapProfileView,mi as HeapProfilerPanel,bt as HeapSnapshotDataGrids,ot as HeapSnapshotGridNodes,Nt as HeapSnapshotProxy,qt as HeapSnapshotView,De as HeapTimelineOverview,Se as IsolateSelector,xi as LiveHeapProfileView,b as ProfileDataGrid,j as ProfileHeader,Ie as ProfileLauncherView,W as ProfileSidebarTreeElement,Yt as ProfileTypeRegistry,ee as ProfileView,li as ProfilesPanel,$ as TopDownProfileDataGrid}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js b/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js index 7f74fa4d8da6..1507012ddf5b 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js +++ b/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js @@ -1 +1 @@ -import*as e from"../../ui/legacy/legacy.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../ui/lit-html/lit-html.js";const i=new CSSStyleSheet;i.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:16px;text-align:center;background-color:var(--color-background-elevation-0)}.rn-welcome-header{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;color:var(--color-text-primary)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}\n/*# sourceURL=rnWelcome.css */\n');const o={debuggerBrandName:"React Native JS Inspector",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new"},{render:r,html:l}=n,s=t.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",o),c=t.i18n.getLocalizedString.bind(void 0,s);let a;class d extends e.Widget.VBox{static instance(e={forceNew:null}){const{forceNew:t}=e;return a&&!t||(a=new d),a}constructor(){super(!0,!0)}wasShown(){super.wasShown(),this.registerCSSFiles([i]),this.render(),e.InspectorView.InspectorView.instance().showDrawer(!0)}render(){const e=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();r(l`
${c(o.debuggerBrandName)}
${c(o.welcomeMessage)}
`,this.contentElement,{host:this})}}var g=Object.freeze({__proto__:null,RNWelcomeImpl:d});export{g as RNWelcome}; +import*as e from"../../ui/legacy/legacy.js";import*as r from"../../core/i18n/i18n.js";import*as t from"../../ui/lit-html/lit-html.js";const o=new CSSStyleSheet;o.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:16px;text-align:center;background-color:var(--color-background-elevation-0)}.rn-welcome-header{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;color:var(--color-text-primary)}.rn-welcome-title-accessory{margin-left:12px;padding:4px 8px;border-radius:4px;background-color:var(--color-purple-bright);font-size:12px;color:var(--color-on-primary)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}\n/*# sourceURL=rnWelcome.css */\n');const n={debuggerBrandName:"React Native JS Inspector",techPreviewLabel:"Technology Preview",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new"},{render:i,html:l}=t,s=r.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",n),c=r.i18n.getLocalizedString.bind(void 0,s);let a;class d extends e.Widget.VBox{static instance(e={forceNew:null}){const{forceNew:r}=e;return a&&!r||(a=new d),a}constructor(){super(!0,!0)}wasShown(){super.wasShown(),this.registerCSSFiles([o]),this.render(),e.InspectorView.InspectorView.instance().showDrawer(!0)}render(){const e=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();i(l`
${c(n.debuggerBrandName)}
${c(n.techPreviewLabel)}
${c(n.welcomeMessage)}
`,this.contentElement,{host:this})}}var m=Object.freeze({__proto__:null,RNWelcomeImpl:d});export{m as RNWelcome}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/rn_inspector.html b/packages/debugger-frontend/dist/third-party/front_end/rn_inspector.html index d06c98426a7d..8240cf910ef7 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/rn_inspector.html +++ b/packages/debugger-frontend/dist/third-party/front_end/rn_inspector.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + diff --git a/packages/debugger-frontend/dist/third-party/front_end/worker_app.html b/packages/debugger-frontend/dist/third-party/front_end/worker_app.html index c76371f81a3f..060998a61b47 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/worker_app.html +++ b/packages/debugger-frontend/dist/third-party/front_end/worker_app.html @@ -6,7 +6,7 @@ -DevTools +DevTools (React Native) + From e6b24a314691846fb30233a56d07fe102a3a5fb1 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 2 Oct 2023 13:10:32 -0700 Subject: [PATCH 016/190] Mark initHybrid as @JvmStatic (#39755) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39755 The goal of this diff is to fix: ``` JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static or non-static method "Lcom/facebook/react/jscexecutor/JSCExecutor;.initHybrid(Lcom/facebook/react/bridge/ReadableNativeMap;)Lcom/facebook/jni/HybridData;" ``` changelog: [internal] internal Reviewed By: luluwu2032 Differential Revision: D49831595 fbshipit-source-id: 9ce22cdccdd02af74edb27be2df72a469d3166c9 --- .../src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt index 8dc018deca0d..9816ba833d57 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt @@ -31,6 +31,6 @@ class JSCExecutor internal constructor(jscConfig: ReadableNativeMap) : SoLoader.loadLibrary("jscexecutor") } - private external fun initHybrid(jscConfig: ReadableNativeMap): HybridData? + @JvmStatic private external fun initHybrid(jscConfig: ReadableNativeMap): HybridData? } } From 3793a6480842d8893ad6367eeec29f61eea1571a Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Mon, 2 Oct 2023 16:50:25 -0400 Subject: [PATCH 017/190] Bump package versions #publish-packages-to-npm --- packages/debugger-frontend/package.json | 2 +- packages/dev-middleware/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index 49544ddfd7b9..652794653053 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/debugger-frontend", - "version": "0.73.1", + "version": "0.73.2", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index dc56263e6895..6f236923be65 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "^0.73.1", + "@react-native/debugger-frontend": "^0.73.2", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^1.0.0", "connect": "^3.6.5", From aa58c4c4b7d4b0ebce2520ab25fab425f5aa37ff Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Mon, 2 Oct 2023 16:56:12 -0400 Subject: [PATCH 018/190] Bump package versions (dependant packages) #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 4 ++-- packages/dev-middleware/package.json | 2 +- packages/react-native/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 925d77c08b4c..d0b1edffffd7 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.4", + "version": "0.73.5", "description": "Core CLI commands for React Native", "keywords": [ "react-native", @@ -22,7 +22,7 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "^0.73.2", + "@react-native/dev-middleware": "^0.73.3", "@react-native-community/cli-server-api": "12.0.0-alpha.17", "@react-native-community/cli-tools": "12.0.0-alpha.17", "@react-native/metro-babel-transformer": "^0.73.12", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 6f236923be65..4ff8c27a259c 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.73.2", + "version": "0.73.3", "description": "Dev server middleware for React Native", "keywords": [ "react-native", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index d095dabedf4d..0b91160b103b 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,7 +97,7 @@ "@react-native-community/cli-platform-android": "12.0.0-alpha.17", "@react-native-community/cli-platform-ios": "12.0.0-alpha.17", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.4", + "@react-native/community-cli-plugin": "^0.73.5", "@react-native/codegen": "^0.73.1", "@react-native/gradle-plugin": "^0.73.1", "@react-native/js-polyfills": "^0.73.1", From 6b9cf50b3044c0604594a0599347ba6b636f5431 Mon Sep 17 00:00:00 2001 From: Distiller Date: Mon, 2 Oct 2023 21:39:05 +0000 Subject: [PATCH 019/190] [0.73.0-rc.0] Bump version numbers --- .../Libraries/Core/ReactNativeVersion.js | 6 +- packages/react-native/React/Base/RCTVersion.m | 6 +- .../ReactAndroid/gradle.properties | 2 +- .../systeminfo/ReactNativeVersion.java | 6 +- .../ReactCommon/cxxreact/ReactNativeVersion.h | 6 +- packages/react-native/package.json | 4 +- packages/react-native/template/package.json | 2 +- packages/rn-tester/Podfile.lock | 1000 ++++++++--------- 8 files changed, 457 insertions(+), 575 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 1d82274f85cb..9b22cf2dd06e 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -10,8 +10,8 @@ */ exports.version = { - major: 1000, - minor: 0, + major: 0, + minor: 73, patch: 0, - prerelease: null, + prerelease: 'rc.0', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index 1794ca2e5213..ee1761c3e06f 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -21,10 +21,10 @@ static dispatch_once_t onceToken; dispatch_once(&onceToken, ^(void){ __rnVersion = @{ - RCTVersionMajor: @(1000), - RCTVersionMinor: @(0), + RCTVersionMajor: @(0), + RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: [NSNull null], + RCTVersionPrerelease: @"rc.0", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 924f82a0637d..7c8609f15d3b 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1000.0.0 +VERSION_NAME=0.73.0-rc.0 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index ea97bff8de80..5c7e0847bbbe 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -15,8 +15,8 @@ public class ReactNativeVersion { public static final Map VERSION = MapBuilder.of( - "major", 1000, - "minor", 0, + "major", 0, + "minor", 73, "patch", 0, - "prerelease", null); + "prerelease", "rc.0"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 5d89f4efaae2..d3af879148d1 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -15,10 +15,10 @@ namespace facebook::react { constexpr struct { - int32_t Major = 1000; - int32_t Minor = 0; + int32_t Major = 0; + int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = ""; + std::string_view Prerelease = "rc.0"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 0b91160b103b..fa5de843b32e 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "1000.0.0", + "version": "0.73.0-rc.0", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index e4fe7ccdc801..6c329d42c4f4 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "1000.0.0" + "react-native": "0.73.0-rc.0" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 5a18cf126afc..04099ff8ef26 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1,85 +1,27 @@ PODS: - boost (1.83.0) - - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (1000.0.0) - - FBReactNativeSpec (1000.0.0): + - FBLazyVector (0.73.0-rc.0) + - FBReactNativeSpec (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Core (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - Flipper (0.201.0): - - Flipper-Folly (~> 2.6) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - FlipperKit (0.201.0): - - FlipperKit/Core (= 0.201.0) - - FlipperKit/Core (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.201.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.201.0) - - FlipperKit/FKPortForwarding (0.201.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.201.0) - - FlipperKit/FlipperKitLayoutHelpers (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Core (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (1000.0.0): - - hermes-engine/Hermes (= 1000.0.0) - - hermes-engine/inspector (= 1000.0.0) - - hermes-engine/inspector_chrome (= 1000.0.0) - - hermes-engine/Public (= 1000.0.0) - - hermes-engine/Hermes (1000.0.0) - - hermes-engine/inspector (1000.0.0) - - hermes-engine/inspector_chrome (1000.0.0) - - hermes-engine/Public (1000.0.0) + - hermes-engine (0.73.0-rc.0): + - hermes-engine/Hermes (= 0.73.0-rc.0) + - hermes-engine/inspector (= 0.73.0-rc.0) + - hermes-engine/inspector_chrome (= 0.73.0-rc.0) + - hermes-engine/Public (= 0.73.0-rc.0) + - hermes-engine/Hermes (0.73.0-rc.0) + - hermes-engine/inspector (0.73.0-rc.0) + - hermes-engine/inspector_chrome (0.73.0-rc.0) + - hermes-engine/Public (0.73.0-rc.0) - libevent (2.1.12) - OCMock (3.9.1) - - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): - boost - DoubleConversion @@ -102,26 +44,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (1000.0.0) - - RCTTypeSafety (1000.0.0): - - FBLazyVector (= 1000.0.0) - - RCTRequired (= 1000.0.0) - - React-Core (= 1000.0.0) - - React (1000.0.0): - - React-Core (= 1000.0.0) - - React-Core/DevSupport (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-RCTActionSheet (= 1000.0.0) - - React-RCTAnimation (= 1000.0.0) - - React-RCTBlob (= 1000.0.0) - - React-RCTImage (= 1000.0.0) - - React-RCTLinking (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - React-RCTSettings (= 1000.0.0) - - React-RCTText (= 1000.0.0) - - React-RCTVibration (= 1000.0.0) - - React-callinvoker (1000.0.0) - - React-Codegen (1000.0.0): + - RCTRequired (0.73.0-rc.0) + - RCTTypeSafety (0.73.0-rc.0): + - FBLazyVector (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.0) + - React-Core (= 0.73.0-rc.0) + - React (0.73.0-rc.0): + - React-Core (= 0.73.0-rc.0) + - React-Core/DevSupport (= 0.73.0-rc.0) + - React-Core/RCTWebSocket (= 0.73.0-rc.0) + - React-RCTActionSheet (= 0.73.0-rc.0) + - React-RCTAnimation (= 0.73.0-rc.0) + - React-RCTBlob (= 0.73.0-rc.0) + - React-RCTImage (= 0.73.0-rc.0) + - React-RCTLinking (= 0.73.0-rc.0) + - React-RCTNetwork (= 0.73.0-rc.0) + - React-RCTSettings (= 0.73.0-rc.0) + - React-RCTText (= 0.73.0-rc.0) + - React-RCTVibration (= 0.73.0-rc.0) + - React-callinvoker (0.73.0-rc.0) + - React-Codegen (0.73.0-rc.0): - DoubleConversion - FBReactNativeSpec - glog @@ -141,11 +83,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (1000.0.0): + - React-Core (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) + - React-Core/Default (= 0.73.0-rc.0) - React-cxxreact - React-hermes - React-jsi @@ -155,7 +97,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/CoreModulesHeaders (1000.0.0): + - React-Core/CoreModulesHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -169,7 +111,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/Default (1000.0.0): + - React-Core/Default (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -182,23 +124,23 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/DevSupport (1000.0.0): + - React-Core/DevSupport (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) + - React-Core/Default (= 0.73.0-rc.0) + - React-Core/RCTWebSocket (= 0.73.0-rc.0) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 1000.0.0) + - React-jsinspector (= 0.73.0-rc.0) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTActionSheetHeaders (1000.0.0): + - React-Core/RCTActionSheetHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -212,7 +154,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTAnimationHeaders (1000.0.0): + - React-Core/RCTAnimationHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -226,7 +168,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTBlobHeaders (1000.0.0): + - React-Core/RCTBlobHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -240,7 +182,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTImageHeaders (1000.0.0): + - React-Core/RCTImageHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -254,7 +196,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTLinkingHeaders (1000.0.0): + - React-Core/RCTLinkingHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -268,7 +210,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTNetworkHeaders (1000.0.0): + - React-Core/RCTNetworkHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -282,7 +224,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTPushNotificationHeaders (1000.0.0): + - React-Core/RCTPushNotificationHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -296,7 +238,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTSettingsHeaders (1000.0.0): + - React-Core/RCTSettingsHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -310,7 +252,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTTextHeaders (1000.0.0): + - React-Core/RCTTextHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -324,7 +266,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTVibrationHeaders (1000.0.0): + - React-Core/RCTVibrationHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -338,11 +280,11 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTWebSocket (1000.0.0): + - React-Core/RCTWebSocket (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) + - React-Core/Default (= 0.73.0-rc.0) - React-cxxreact - React-hermes - React-jsi @@ -352,607 +294,588 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-CoreModules (1000.0.0): + - React-CoreModules (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/CoreModulesHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/CoreModulesHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) - React-RCTBlob - - React-RCTImage (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTImage (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - SocketRocket (= 0.6.0) - - React-cxxreact (1000.0.0): + - React-cxxreact (0.73.0-rc.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 1000.0.0) - - React-debug (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsinspector (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-runtimeexecutor (= 1000.0.0) - - React-debug (1000.0.0) - - React-Fabric (1000.0.0): + - React-callinvoker (= 0.73.0-rc.0) + - React-debug (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsinspector (= 0.73.0-rc.0) + - React-logger (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - React-runtimeexecutor (= 0.73.0-rc.0) + - React-debug (0.73.0-rc.0) + - React-Fabric (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 1000.0.0) - - React-Fabric/attributedstring (= 1000.0.0) - - React-Fabric/butter (= 1000.0.0) - - React-Fabric/componentregistry (= 1000.0.0) - - React-Fabric/componentregistrynative (= 1000.0.0) - - React-Fabric/components (= 1000.0.0) - - React-Fabric/core (= 1000.0.0) - - React-Fabric/imagemanager (= 1000.0.0) - - React-Fabric/leakchecker (= 1000.0.0) - - React-Fabric/mounting (= 1000.0.0) - - React-Fabric/scheduler (= 1000.0.0) - - React-Fabric/telemetry (= 1000.0.0) - - React-Fabric/templateprocessor (= 1000.0.0) - - React-Fabric/textlayoutmanager (= 1000.0.0) - - React-Fabric/uimanager (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-Fabric/animations (= 0.73.0-rc.0) + - React-Fabric/attributedstring (= 0.73.0-rc.0) + - React-Fabric/componentregistry (= 0.73.0-rc.0) + - React-Fabric/componentregistrynative (= 0.73.0-rc.0) + - React-Fabric/components (= 0.73.0-rc.0) + - React-Fabric/core (= 0.73.0-rc.0) + - React-Fabric/imagemanager (= 0.73.0-rc.0) + - React-Fabric/leakchecker (= 0.73.0-rc.0) + - React-Fabric/mounting (= 0.73.0-rc.0) + - React-Fabric/scheduler (= 0.73.0-rc.0) + - React-Fabric/telemetry (= 0.73.0-rc.0) + - React-Fabric/templateprocessor (= 0.73.0-rc.0) + - React-Fabric/textlayoutmanager (= 0.73.0-rc.0) + - React-Fabric/uimanager (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/animations (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/animations (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/attributedstring (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/attributedstring (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/butter (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/componentregistry (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/componentregistry (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/componentregistrynative (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/componentregistrynative (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-Fabric/components/inputaccessory (= 0.73.0-rc.0) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.0) + - React-Fabric/components/modal (= 0.73.0-rc.0) + - React-Fabric/components/rncore (= 0.73.0-rc.0) + - React-Fabric/components/root (= 0.73.0-rc.0) + - React-Fabric/components/safeareaview (= 0.73.0-rc.0) + - React-Fabric/components/scrollview (= 0.73.0-rc.0) + - React-Fabric/components/text (= 0.73.0-rc.0) + - React-Fabric/components/textinput (= 0.73.0-rc.0) + - React-Fabric/components/unimplementedview (= 0.73.0-rc.0) + - React-Fabric/components/view (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/inputaccessory (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 1000.0.0) - - React-Fabric/components/legacyviewmanagerinterop (= 1000.0.0) - - React-Fabric/components/modal (= 1000.0.0) - - React-Fabric/components/rncore (= 1000.0.0) - - React-Fabric/components/root (= 1000.0.0) - - React-Fabric/components/safeareaview (= 1000.0.0) - - React-Fabric/components/scrollview (= 1000.0.0) - - React-Fabric/components/text (= 1000.0.0) - - React-Fabric/components/textinput (= 1000.0.0) - - React-Fabric/components/unimplementedview (= 1000.0.0) - - React-Fabric/components/view (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/inputaccessory (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/legacyviewmanagerinterop (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/modal (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/modal (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/rncore (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/rncore (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/root (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/root (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/safeareaview (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/safeareaview (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/scrollview (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/scrollview (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/text (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/text (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/textinput (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/textinput (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/unimplementedview (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/unimplementedview (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/view (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/view (1000.0.0): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Core - - React-cxxreact - - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - Yoga - - React-Fabric/core (1000.0.0): + - React-Fabric/core (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/imagemanager (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/imagemanager (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/leakchecker (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/leakchecker (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/mounting (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/mounting (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/scheduler (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/scheduler (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/telemetry (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/telemetry (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/templateprocessor (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/templateprocessor (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/textlayoutmanager (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/textlayoutmanager (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - React-Fabric/uimanager - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/uimanager (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/uimanager (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-FabricImage (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-FabricImage (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Fabric - - React-graphics (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) - React-ImageManager - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - Yoga - - React-graphics (1000.0.0): + - React-graphics (0.73.0-rc.0): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) - - React-hermes (1000.0.0): + - React-Core/Default (= 0.73.0-rc.0) + - React-utils + - React-hermes (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 1000.0.0) + - React-cxxreact (= 0.73.0-rc.0) - React-jsi - - React-jsiexecutor (= 1000.0.0) - - React-jsinspector (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-ImageManager (1000.0.0): + - React-jsiexecutor (= 0.73.0-rc.0) + - React-jsinspector (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - React-ImageManager (0.73.0-rc.0): - glog - RCT-Folly/Fabric - React-Core/Default @@ -961,33 +884,33 @@ PODS: - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (1000.0.0): + - React-jserrorhandler (0.73.0-rc.0): - RCT-Folly/Fabric (= 2022.05.16.00) - - React-jsi (= 1000.0.0) + - React-jsi (= 0.73.0-rc.0) - React-Mapbuffer - - React-jsi (1000.0.0): + - React-jsi (0.73.0-rc.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (1000.0.0): + - React-jsiexecutor (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-jsinspector (1000.0.0) - - React-logger (1000.0.0): + - React-cxxreact (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - React-jsinspector (0.73.0-rc.0) + - React-logger (0.73.0-rc.0): - glog - - React-Mapbuffer (1000.0.0): + - React-Mapbuffer (0.73.0-rc.0): - glog - React-debug - - React-nativeconfig (1000.0.0) - - React-NativeModulesApple (1000.0.0): + - React-nativeconfig (0.73.0-rc.0) + - React-NativeModulesApple (0.73.0-rc.0): - glog - hermes-engine - React-callinvoker @@ -997,17 +920,17 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (1000.0.0) - - React-RCTActionSheet (1000.0.0): - - React-Core/RCTActionSheetHeaders (= 1000.0.0) - - React-RCTAnimation (1000.0.0): + - React-perflogger (0.73.0-rc.0) + - React-RCTActionSheet (0.73.0-rc.0): + - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.0) + - React-RCTAnimation (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTAnimationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTAppDelegate (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTAnimationHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTAppDelegate (0.73.0-rc.0): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1021,102 +944,103 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon/turbomodule/core - - React-RCTBlob (1000.0.0): + - React-RCTBlob (0.73.0-rc.0): - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 1000.0.0) - - React-Core/RCTBlobHeaders (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTFabric (1000.0.0): + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTBlobHeaders (= 0.73.0-rc.0) + - React-Core/RCTWebSocket (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-RCTNetwork (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTFabric (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core (= 1000.0.0) + - React-Core (= 0.73.0-rc.0) - React-debug - - React-Fabric (= 1000.0.0) + - React-Fabric (= 0.73.0-rc.0) - React-FabricImage - React-graphics - React-ImageManager - React-nativeconfig - - React-RCTImage (= 1000.0.0) + - React-RCTImage (= 0.73.0-rc.0) - React-RCTText - React-rendererdebug - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (1000.0.0): + - React-RCTImage (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTImageHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTLinking (1000.0.0): - - React-Codegen (= 1000.0.0) - - React-Core/RCTLinkingHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTNetwork (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTImageHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-RCTNetwork (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTLinking (0.73.0-rc.0): + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTLinkingHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTNetwork (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTNetworkHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTPushNotification (1000.0.0): - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTPushNotificationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTSettings (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTNetworkHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTPushNotification (0.73.0-rc.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTSettings (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTSettingsHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTTest (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTSettingsHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTTest (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 1000.0.0) - - React-CoreModules (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTText (1000.0.0): - - React-Core/RCTTextHeaders (= 1000.0.0) + - React-Core (= 0.73.0-rc.0) + - React-CoreModules (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTText (0.73.0-rc.0): + - React-Core/RCTTextHeaders (= 0.73.0-rc.0) - Yoga - - React-RCTVibration (1000.0.0): + - React-RCTVibration (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 1000.0.0) - - React-Core/RCTVibrationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-rendererdebug (1000.0.0): + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTVibrationHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-rendererdebug (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (1000.0.0) - - React-runtimeexecutor (1000.0.0): - - React-jsi (= 1000.0.0) - - React-runtimescheduler (1000.0.0): + - React-rncore (0.73.0-rc.0) + - React-runtimeexecutor (0.73.0-rc.0): + - React-jsi (= 0.73.0-rc.0) + - React-runtimescheduler (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-callinvoker - React-debug - React-jsi + - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (1000.0.0): + - React-utils (0.73.0-rc.0): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon-Samples (1000.0.0): + - ReactCommon-Samples (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1126,28 +1050,28 @@ PODS: - React-cxxreact - React-NativeModulesApple - ReactCommon/turbomodule/core - - ReactCommon/turbomodule/bridging (1000.0.0): + - ReactCommon/turbomodule/bridging (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/core (1000.0.0): + - React-callinvoker (= 0.73.0-rc.0) + - React-cxxreact (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-logger (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) + - React-callinvoker (= 0.73.0-rc.0) + - React-cxxreact (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-logger (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1160,31 +1084,10 @@ DEPENDENCIES: - DoubleConversion (from `../react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../react-native/React/FBReactNativeSpec`) - - Flipper (= 0.201.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - FlipperKit (= 0.201.0) - - FlipperKit/Core (= 0.201.0) - - FlipperKit/CppBridge (= 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0) - - FlipperKit/FBDefines (= 0.201.0) - - FlipperKit/FKPortForwarding (= 0.201.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0) - - FlipperKit/FlipperKitReactPlugin (= 0.201.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.201.0) - glog (from `../react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) - OCMock (~> 3.9.1) - - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../react-native/Libraries/RCTRequired`) @@ -1193,7 +1096,6 @@ DEPENDENCIES: - React-callinvoker (from `../react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../react-native/`) - - React-Core/DevSupport (from `../react-native/`) - React-Core/RCTWebSocket (from `../react-native/`) - React-CoreModules (from `../react-native/React/CoreModules`) - React-cxxreact (from `../react-native/ReactCommon/cxxreact`) @@ -1237,19 +1139,9 @@ DEPENDENCIES: SPEC REPOS: trunk: - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - FlipperKit - fmt - libevent - OCMock - - OpenSSL-Universal - SocketRocket EXTERNAL SOURCES: @@ -1265,7 +1157,7 @@ EXTERNAL SOURCES: :podspec: "../react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: '' + :tag: hermes-2023-09-26-RNv0.73.0-ee2922a50fb719bdb378025d95dbd32ad93cd679 RCT-Folly: :podspec: "../react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -1361,72 +1253,62 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: b233b98f08056318bc56f4deccea817b00edeac5 - FBReactNativeSpec: 9c14dc03023715c92c7d01a9c78e8475fe012718 - Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f + FBLazyVector: 5b5bb8db6bdeaec7080f7dc646d66d1369902283 + FBReactNativeSpec: 79c8793c90a8e9344ffee4e769c47a100538a3a1 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 2f192f79eb5fd8674ca08d663cfdb1a7f4ca2afc + hermes-engine: bb85be4531be6bc8aacedb305c1d5ad8ce4d5b3a libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - RCT-Folly: 870a45f398f8ee9ca60cd021b23ab144d56fd3ad - RCTRequired: 5091117ce5c99db5af024aa1ec15c6a4c4ad7f1c - RCTTypeSafety: 95672f6742bf7b5d16bd8700a65e7bffb63cd9f8 - React: 2806c7b904a5f8e1279bb1fcf829b6a43bc71e15 - React-callinvoker: 2d96a4479c0b440a4b24f7eb0ae73a95c0a7e5d9 - React-Codegen: 5ad0601f4a0960e6ad81412fdfb270aafba6e4e1 - React-Core: 2e70e151812a6ad68a95b676d05e13ee38466d96 - React-CoreModules: 69643fe30d8e8f214584cb5336e47307e458d9d9 - React-cxxreact: 420ec1c09edf4291fa3cfee30371572572ccb2e5 - React-debug: 42965d54926dad1d171d60bdb89e000efb4eb9b4 - React-Fabric: d3aecfadeb3077c2396cbd305895b025eed4123d - React-FabricImage: de13a9ca5eb2819ac729564e98a40a9af54452f5 - React-graphics: cfcaab89e7d1aa59bb97d99c25ef5f28d9ced5f1 - React-hermes: 11fcf1dd7dff109b40160e75eb4447af3ceae85d - React-ImageManager: ec2b27c090514ca96f78753767a3fb4682be78f3 - React-jserrorhandler: 87d904b84cedbf897a4ed59aceca5724f03cf9af - React-jsi: 990673de5500c55224e52e7235863b1511ad6375 - React-jsiexecutor: ae9ed28dbcf5273f4916fbabf4958ec891f47c0e - React-jsinspector: e845240c20daa428639125e0e5623a3237203ff7 - React-logger: 5bb7c5f3a5ef404c197941167c8cc7628e928f97 - React-Mapbuffer: e741b31b558f7679bc6b8a848fb3605f8d357998 - React-nativeconfig: 7b4ebf6e90de842fd0e6f5df6d9ad1f624955bde - React-NativeModulesApple: 6306a1e80f8f09e8689a43e9072e9be25dbcfcc6 - React-perflogger: 24428a1beeb9754b41ecec09f62cbd8ff15ddb46 - React-RCTActionSheet: fb44d26d484d53f7e5debf2346f9871336e5ac70 - React-RCTAnimation: b54290477ef258b6981a6822f5b52673cc08399a - React-RCTAppDelegate: 122a35fd62d94993c7370d25cc85c7e65315711e - React-RCTBlob: bff18b190ffe3a48b2d78dbb027c24067b6314c1 - React-RCTFabric: 42070e4bfab8370c081def852e5e31e047eae192 - React-RCTImage: 0329f6197bb95cf9f4e37f9270b278e4037abdc0 - React-RCTLinking: 79e3f58ad1b65dba4cb2c53c2b09eec75d858c20 - React-RCTNetwork: b603998f6a23cf652395ffe84d5dea67cd4c49de - React-RCTPushNotification: 317b76a7c6c576898580472a1394a3844328c95e - React-RCTSettings: 866e76786094fc7f5037719b767e9adffd8dda87 - React-RCTTest: bad53a62901f602dd919cb3c47d91a0c76ec7f38 - React-RCTText: 6b8c71ab09e7480ffaa5fd353f5b8646019a1cf3 - React-RCTVibration: cf14ac74b9f1d676d56111216d1a6e1b0df06d51 - React-rendererdebug: bcfb7fa48f8a0f62f87522a8f47e72787761884c - React-rncore: 28bd4658bf02ba5302822b8c6ddc0052f7566277 - React-runtimeexecutor: 963711d915734cd2a24fae6edec7f0572d19ecce - React-runtimescheduler: 6e7519d2003b5ab8aa8a79b60478fd13cd5f6681 - React-utils: b842f2d7fe9d81138a486512f44fe1565e2bb987 - ReactCommon: 9ab719868580941d77be0f90e4d310580868753d - ReactCommon-Samples: 9bdd25d3e637c98e314fa9f507292b4c4ddb3edd + RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 + RCTRequired: 05c71aa2ba855c360ef8b88554012f289e18821b + RCTTypeSafety: 3185c277e69cf46ed540ff9d470efad9e8c00d95 + React: 7ca8f490e53bad01021e92ea9b9b96f280ee1d82 + React-callinvoker: a2273abe294f5a65440240f00884008619e2465a + React-Codegen: 15c5930fb361234dadc73ff2a46fae353dd45964 + React-Core: d33b39797efaa082534939f60a4e9531b65378c7 + React-CoreModules: f6f5c543444979d36a7b8af5babd207ec1a62ceb + React-cxxreact: 0444149506556bcdbb541fcb5e3edb4865024821 + React-debug: d790065e18d75489ffa1523f7f93512ce9715358 + React-Fabric: dc8e6717cd75c65efecb26ddc94560a9130df66d + React-FabricImage: f2a238bddd07e084f882eb2b574d762cc52dacd4 + React-graphics: 007e2c309a14d05278d1cae91a22ab4c53da7d94 + React-hermes: a6e5b2f21077aaacbc629b0dc005a2964c50c35c + React-ImageManager: 83bb1b8536617d5242aa3553e26d7458884758d3 + React-jserrorhandler: c1a7b9a8dc95add6fd497833694d9de1aa30f6dd + React-jsi: 69256285478a4fa555a729b88e52994786dc0aec + React-jsiexecutor: fbb1ab2a9a3884ab46e676ffe12bcf34be5aacc2 + React-jsinspector: 36909c72313cba211392b65485d8687aa945559e + React-logger: df2b54baee256688db3ed022755cb7e64d307668 + React-Mapbuffer: f1f5c6a1ad5efd84301db60269ca005c15e721ba + React-nativeconfig: f2363be7b42cc1ceaecfbec197ebe03d6b065565 + React-NativeModulesApple: 2c4b623655d8d3e1b80049d17e67609be6b45da7 + React-perflogger: 6d75814b485251fe860b7005c1cd15909b08fb5b + React-RCTActionSheet: cec21c49ecaf2491d616bfce0e466ed4cffde004 + React-RCTAnimation: 1100c352dda6b32139155ff865c4fa35d35572ae + React-RCTAppDelegate: e64f6d2da65439744dd5b44afadb762e303489ac + React-RCTBlob: 2b4db8095acc1e2256db398bc38270e31baa3fac + React-RCTFabric: 53d20a2374f6a4f79cd123b90d047ca1f1672086 + React-RCTImage: 4d89a0550098bca35939b877ddffa2a647fddfa6 + React-RCTLinking: 1345853b44a87087e1b5cd10d7943d6b27d615c5 + React-RCTNetwork: 01dcff90aa8081fa9b20aab213d135676bfac114 + React-RCTPushNotification: 7ac2cf8e78e6b08d3a58597dabdc1ccab3672df6 + React-RCTSettings: e9d22f362ec4d982a841c0f0f1231d2c8e0fa28e + React-RCTTest: c0f05dc5eec117a9f4986fbfbfcb6f930840378e + React-RCTText: 12d49894a4f8e249f2d2883de8fc49978040a29f + React-RCTVibration: b93f6838ec1801963783baa360ef8c0f785b3e34 + React-rendererdebug: c0916409c18e30f71fd19aba53ec6875049b3e6e + React-rncore: f522b10bf7c9766b190ba87b1ae0407290caf3a5 + React-runtimeexecutor: 038a523b032ecf43263534b75e66bf84a8b52447 + React-runtimescheduler: bb7d5ea12a65d8dbd7c6ceea5251065d2f10ae89 + React-utils: a6810f61d773a36b51d2ca4212eee13427ef7235 + ReactCommon: 3b92ec47e238d0e229fb654d143bc553860347a3 + ReactCommon-Samples: 38f375baeeaab65d59081bc69e009f89184b2443 ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: 5c39c7ead1a63357070b8bef4a9a57b9a1cd1ccb + Yoga: dbb39231806ac48d6b95e95b47d3e2170b5f06c9 -PODFILE CHECKSUM: ae1f2365c7aaade1c3f51a182c545de8df389f81 +PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.12.1 +COCOAPODS: 1.13.0 From b6c0703ebb9c0432acf6b87e894d6a33949017cc Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 3 Oct 2023 11:56:51 -0400 Subject: [PATCH 020/190] Fix typings for ReactNativeVersion.js This is an eager cherry pick of #39784 for `0.73-stable`. --- .../react-native/Libraries/Core/ReactNativeVersionCheck.js | 3 +-- .../Libraries/Utilities/NativePlatformConstantsAndroid.js | 2 +- .../Libraries/Utilities/NativePlatformConstantsIOS.js | 2 +- packages/react-native/Libraries/Utilities/Platform.android.js | 2 +- packages/react-native/Libraries/Utilities/Platform.flow.js | 4 ++-- packages/react-native/Libraries/Utilities/Platform.ios.js | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js b/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js index 8b41988696d6..b3c437ac45d7 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js @@ -44,7 +44,6 @@ function _formatVersion( ): string { return ( `${version.major}.${version.minor}.${version.patch}` + - // eslint-disable-next-line eqeqeq - (version.prerelease != undefined ? `-${version.prerelease}` : '') + (version.prerelease != null ? `-${version.prerelease}` : '') ); } diff --git a/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js b/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js index 6eab28ff02f3..2d6e1faed90d 100644 --- a/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js +++ b/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js @@ -16,7 +16,7 @@ export type ReactNativeVersionAndroid = {| major: number, minor: number, patch: number, - prerelease: ?number, + prerelease: ?string, |}; export type PlatformConstantsAndroid = {| diff --git a/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js b/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js index 1a2cf4ad5069..e8769b1eb42f 100644 --- a/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js +++ b/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js @@ -19,7 +19,7 @@ export type PlatformConstantsIOS = {| major: number, minor: number, patch: number, - prerelease: ?number, + prerelease: ?string, |}, forceTouchAvailable: boolean, osVersion: string, diff --git a/packages/react-native/Libraries/Utilities/Platform.android.js b/packages/react-native/Libraries/Utilities/Platform.android.js index 95210a315a25..4a10f33ab0ec 100644 --- a/packages/react-native/Libraries/Utilities/Platform.android.js +++ b/packages/react-native/Libraries/Utilities/Platform.android.js @@ -31,7 +31,7 @@ const Platform: PlatformType = { major: number, minor: number, patch: number, - prerelease: ?number, + prerelease: ?string, |}, Version: number, Release: string, diff --git a/packages/react-native/Libraries/Utilities/Platform.flow.js b/packages/react-native/Libraries/Utilities/Platform.flow.js index d4bc8147249e..19f4a68f7bd4 100644 --- a/packages/react-native/Libraries/Utilities/Platform.flow.js +++ b/packages/react-native/Libraries/Utilities/Platform.flow.js @@ -32,7 +32,7 @@ type IOSPlatform = { major: number, minor: number, patch: number, - prerelease: ?number, + prerelease: ?string, |}, systemName: string, |}, @@ -60,7 +60,7 @@ type AndroidPlatform = { major: number, minor: number, patch: number, - prerelease: ?number, + prerelease: ?string, |}, Version: number, Release: string, diff --git a/packages/react-native/Libraries/Utilities/Platform.ios.js b/packages/react-native/Libraries/Utilities/Platform.ios.js index 53371634e7d9..7ea9cb4f244d 100644 --- a/packages/react-native/Libraries/Utilities/Platform.ios.js +++ b/packages/react-native/Libraries/Utilities/Platform.ios.js @@ -34,7 +34,7 @@ const Platform: PlatformType = { major: number, minor: number, patch: number, - prerelease: ?number, + prerelease: ?string, |}, systemName: string, |} { From 0c040314b5e6dbc225ff6bfbc75d8e292d71609b Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 3 Oct 2023 11:57:38 -0400 Subject: [PATCH 021/190] Revert "[0.73.0-rc.0] Bump version numbers" This reverts commit 6b9cf50b3044c0604594a0599347ba6b636f5431. --- .../Libraries/Core/ReactNativeVersion.js | 6 +- packages/react-native/React/Base/RCTVersion.m | 6 +- .../ReactAndroid/gradle.properties | 2 +- .../systeminfo/ReactNativeVersion.java | 6 +- .../ReactCommon/cxxreact/ReactNativeVersion.h | 6 +- packages/react-native/package.json | 4 +- packages/react-native/template/package.json | 2 +- packages/rn-tester/Podfile.lock | 1000 +++++++++-------- 8 files changed, 575 insertions(+), 457 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 9b22cf2dd06e..1d82274f85cb 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -10,8 +10,8 @@ */ exports.version = { - major: 0, - minor: 73, + major: 1000, + minor: 0, patch: 0, - prerelease: 'rc.0', + prerelease: null, }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index ee1761c3e06f..1794ca2e5213 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -21,10 +21,10 @@ static dispatch_once_t onceToken; dispatch_once(&onceToken, ^(void){ __rnVersion = @{ - RCTVersionMajor: @(0), - RCTVersionMinor: @(73), + RCTVersionMajor: @(1000), + RCTVersionMinor: @(0), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.0", + RCTVersionPrerelease: [NSNull null], }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 7c8609f15d3b..924f82a0637d 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.0 +VERSION_NAME=1000.0.0 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 5c7e0847bbbe..ea97bff8de80 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -15,8 +15,8 @@ public class ReactNativeVersion { public static final Map VERSION = MapBuilder.of( - "major", 0, - "minor", 73, + "major", 1000, + "minor", 0, "patch", 0, - "prerelease", "rc.0"); + "prerelease", null); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index d3af879148d1..5d89f4efaae2 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -15,10 +15,10 @@ namespace facebook::react { constexpr struct { - int32_t Major = 0; - int32_t Minor = 73; + int32_t Major = 1000; + int32_t Minor = 0; int32_t Patch = 0; - std::string_view Prerelease = "rc.0"; + std::string_view Prerelease = ""; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index fa5de843b32e..0b91160b103b 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.0", + "version": "1000.0.0", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} \ No newline at end of file +} diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 6c329d42c4f4..e4fe7ccdc801 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.0" + "react-native": "1000.0.0" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 04099ff8ef26..5a18cf126afc 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1,27 +1,85 @@ PODS: - boost (1.83.0) + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.0) - - FBReactNativeSpec (0.73.0-rc.0): + - FBLazyVector (1000.0.0) + - FBReactNativeSpec (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Core (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) + - React-Core (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - Flipper (0.201.0): + - Flipper-Folly (~> 2.6) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (3.2.0.1) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.10): + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) + - Flipper-Glog + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - Flipper-Glog (0.5.0.5) + - Flipper-PeerTalk (0.0.4) + - FlipperKit (0.201.0): + - FlipperKit/Core (= 0.201.0) + - FlipperKit/Core (0.201.0): + - Flipper (~> 0.201.0) + - FlipperKit/CppBridge + - FlipperKit/FBCxxFollyDynamicConvert + - FlipperKit/FBDefines + - FlipperKit/FKPortForwarding + - SocketRocket (~> 0.6.0) + - FlipperKit/CppBridge (0.201.0): + - Flipper (~> 0.201.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.201.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.201.0) + - FlipperKit/FKPortForwarding (0.201.0): + - CocoaAsyncSocket (~> 7.6) + - Flipper-PeerTalk (~> 0.0.4) + - FlipperKit/FlipperKitHighlightOverlay (0.201.0) + - FlipperKit/FlipperKitLayoutHelpers (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0) + - FlipperKit/FlipperKitNetworkPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/SKIOSNetworkPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.0): - - hermes-engine/Hermes (= 0.73.0-rc.0) - - hermes-engine/inspector (= 0.73.0-rc.0) - - hermes-engine/inspector_chrome (= 0.73.0-rc.0) - - hermes-engine/Public (= 0.73.0-rc.0) - - hermes-engine/Hermes (0.73.0-rc.0) - - hermes-engine/inspector (0.73.0-rc.0) - - hermes-engine/inspector_chrome (0.73.0-rc.0) - - hermes-engine/Public (0.73.0-rc.0) + - hermes-engine (1000.0.0): + - hermes-engine/Hermes (= 1000.0.0) + - hermes-engine/inspector (= 1000.0.0) + - hermes-engine/inspector_chrome (= 1000.0.0) + - hermes-engine/Public (= 1000.0.0) + - hermes-engine/Hermes (1000.0.0) + - hermes-engine/inspector (1000.0.0) + - hermes-engine/inspector_chrome (1000.0.0) + - hermes-engine/Public (1000.0.0) - libevent (2.1.12) - OCMock (3.9.1) + - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): - boost - DoubleConversion @@ -44,26 +102,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.0) - - RCTTypeSafety (0.73.0-rc.0): - - FBLazyVector (= 0.73.0-rc.0) - - RCTRequired (= 0.73.0-rc.0) - - React-Core (= 0.73.0-rc.0) - - React (0.73.0-rc.0): - - React-Core (= 0.73.0-rc.0) - - React-Core/DevSupport (= 0.73.0-rc.0) - - React-Core/RCTWebSocket (= 0.73.0-rc.0) - - React-RCTActionSheet (= 0.73.0-rc.0) - - React-RCTAnimation (= 0.73.0-rc.0) - - React-RCTBlob (= 0.73.0-rc.0) - - React-RCTImage (= 0.73.0-rc.0) - - React-RCTLinking (= 0.73.0-rc.0) - - React-RCTNetwork (= 0.73.0-rc.0) - - React-RCTSettings (= 0.73.0-rc.0) - - React-RCTText (= 0.73.0-rc.0) - - React-RCTVibration (= 0.73.0-rc.0) - - React-callinvoker (0.73.0-rc.0) - - React-Codegen (0.73.0-rc.0): + - RCTRequired (1000.0.0) + - RCTTypeSafety (1000.0.0): + - FBLazyVector (= 1000.0.0) + - RCTRequired (= 1000.0.0) + - React-Core (= 1000.0.0) + - React (1000.0.0): + - React-Core (= 1000.0.0) + - React-Core/DevSupport (= 1000.0.0) + - React-Core/RCTWebSocket (= 1000.0.0) + - React-RCTActionSheet (= 1000.0.0) + - React-RCTAnimation (= 1000.0.0) + - React-RCTBlob (= 1000.0.0) + - React-RCTImage (= 1000.0.0) + - React-RCTLinking (= 1000.0.0) + - React-RCTNetwork (= 1000.0.0) + - React-RCTSettings (= 1000.0.0) + - React-RCTText (= 1000.0.0) + - React-RCTVibration (= 1000.0.0) + - React-callinvoker (1000.0.0) + - React-Codegen (1000.0.0): - DoubleConversion - FBReactNativeSpec - glog @@ -83,11 +141,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.0): + - React-Core (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) + - React-Core/Default (= 1000.0.0) - React-cxxreact - React-hermes - React-jsi @@ -97,7 +155,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.0): + - React-Core/CoreModulesHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -111,7 +169,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/Default (0.73.0-rc.0): + - React-Core/Default (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -124,23 +182,23 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/DevSupport (0.73.0-rc.0): + - React-Core/DevSupport (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) - - React-Core/RCTWebSocket (= 0.73.0-rc.0) + - React-Core/Default (= 1000.0.0) + - React-Core/RCTWebSocket (= 1000.0.0) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.0) + - React-jsinspector (= 1000.0.0) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.0): + - React-Core/RCTActionSheetHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -154,7 +212,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.0): + - React-Core/RCTAnimationHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -168,7 +226,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.0): + - React-Core/RCTBlobHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -182,7 +240,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.0): + - React-Core/RCTImageHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -196,7 +254,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.0): + - React-Core/RCTLinkingHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -210,7 +268,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.0): + - React-Core/RCTNetworkHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -224,7 +282,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0-rc.0): + - React-Core/RCTPushNotificationHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -238,7 +296,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.0): + - React-Core/RCTSettingsHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -252,7 +310,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.0): + - React-Core/RCTTextHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -266,7 +324,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.0): + - React-Core/RCTVibrationHeaders (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -280,11 +338,11 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.0): + - React-Core/RCTWebSocket (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) + - React-Core/Default (= 1000.0.0) - React-cxxreact - React-hermes - React-jsi @@ -294,588 +352,607 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-CoreModules (0.73.0-rc.0): + - React-CoreModules (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/CoreModulesHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) + - RCTTypeSafety (= 1000.0.0) + - React-Codegen (= 1000.0.0) + - React-Core/CoreModulesHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTImage (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) - SocketRocket (= 0.6.0) - - React-cxxreact (0.73.0-rc.0): + - React-cxxreact (1000.0.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.0) - - React-debug (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsinspector (= 0.73.0-rc.0) - - React-logger (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - React-runtimeexecutor (= 0.73.0-rc.0) - - React-debug (0.73.0-rc.0) - - React-Fabric (0.73.0-rc.0): + - React-callinvoker (= 1000.0.0) + - React-debug (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsinspector (= 1000.0.0) + - React-logger (= 1000.0.0) + - React-perflogger (= 1000.0.0) + - React-runtimeexecutor (= 1000.0.0) + - React-debug (1000.0.0) + - React-Fabric (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.0) - - React-Fabric/attributedstring (= 0.73.0-rc.0) - - React-Fabric/componentregistry (= 0.73.0-rc.0) - - React-Fabric/componentregistrynative (= 0.73.0-rc.0) - - React-Fabric/components (= 0.73.0-rc.0) - - React-Fabric/core (= 0.73.0-rc.0) - - React-Fabric/imagemanager (= 0.73.0-rc.0) - - React-Fabric/leakchecker (= 0.73.0-rc.0) - - React-Fabric/mounting (= 0.73.0-rc.0) - - React-Fabric/scheduler (= 0.73.0-rc.0) - - React-Fabric/telemetry (= 0.73.0-rc.0) - - React-Fabric/templateprocessor (= 0.73.0-rc.0) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.0) - - React-Fabric/uimanager (= 0.73.0-rc.0) - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-Fabric/animations (= 1000.0.0) + - React-Fabric/attributedstring (= 1000.0.0) + - React-Fabric/butter (= 1000.0.0) + - React-Fabric/componentregistry (= 1000.0.0) + - React-Fabric/componentregistrynative (= 1000.0.0) + - React-Fabric/components (= 1000.0.0) + - React-Fabric/core (= 1000.0.0) + - React-Fabric/imagemanager (= 1000.0.0) + - React-Fabric/leakchecker (= 1000.0.0) + - React-Fabric/mounting (= 1000.0.0) + - React-Fabric/scheduler (= 1000.0.0) + - React-Fabric/telemetry (= 1000.0.0) + - React-Fabric/templateprocessor (= 1000.0.0) + - React-Fabric/textlayoutmanager (= 1000.0.0) + - React-Fabric/uimanager (= 1000.0.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/animations (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/animations (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/attributedstring (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/attributedstring (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/componentregistry (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/butter (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/componentregistrynative (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/componentregistry (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/componentregistrynative (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.0) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.0) - - React-Fabric/components/modal (= 0.73.0-rc.0) - - React-Fabric/components/rncore (= 0.73.0-rc.0) - - React-Fabric/components/root (= 0.73.0-rc.0) - - React-Fabric/components/safeareaview (= 0.73.0-rc.0) - - React-Fabric/components/scrollview (= 0.73.0-rc.0) - - React-Fabric/components/text (= 0.73.0-rc.0) - - React-Fabric/components/textinput (= 0.73.0-rc.0) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.0) - - React-Fabric/components/view (= 0.73.0-rc.0) - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/inputaccessory (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-Fabric/components/inputaccessory (= 1000.0.0) + - React-Fabric/components/legacyviewmanagerinterop (= 1000.0.0) + - React-Fabric/components/modal (= 1000.0.0) + - React-Fabric/components/rncore (= 1000.0.0) + - React-Fabric/components/root (= 1000.0.0) + - React-Fabric/components/safeareaview (= 1000.0.0) + - React-Fabric/components/scrollview (= 1000.0.0) + - React-Fabric/components/text (= 1000.0.0) + - React-Fabric/components/textinput (= 1000.0.0) + - React-Fabric/components/unimplementedview (= 1000.0.0) + - React-Fabric/components/view (= 1000.0.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/inputaccessory (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/modal (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/legacyviewmanagerinterop (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/rncore (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/modal (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/root (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/rncore (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/safeareaview (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/root (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/scrollview (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/safeareaview (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/text (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/scrollview (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/textinput (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/text (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/unimplementedview (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/textinput (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/view (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/unimplementedview (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/components/view (1000.0.0): + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2022.05.16.00) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) + - React-Core + - React-cxxreact + - React-debug + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core (= 1000.0.0) - Yoga - - React-Fabric/core (0.73.0-rc.0): + - React-Fabric/core (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/imagemanager (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/imagemanager (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/leakchecker (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/leakchecker (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/mounting (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/mounting (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/scheduler (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/scheduler (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/telemetry (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/telemetry (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/templateprocessor (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/templateprocessor (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/textlayoutmanager (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/textlayoutmanager (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - React-Fabric/uimanager - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/uimanager (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-Fabric/uimanager (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-FabricImage (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-FabricImage (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Fabric - - React-graphics (= 0.73.0-rc.0) + - React-graphics (= 1000.0.0) - React-ImageManager - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-jsi (= 1000.0.0) + - React-jsiexecutor (= 1000.0.0) - React-logger - React-rendererdebug - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 1000.0.0) - Yoga - - React-graphics (0.73.0-rc.0): + - React-graphics (1000.0.0): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) - - React-utils - - React-hermes (0.73.0-rc.0): + - React-Core/Default (= 1000.0.0) + - React-hermes (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.0) + - React-cxxreact (= 1000.0.0) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.0) - - React-jsinspector (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - React-ImageManager (0.73.0-rc.0): + - React-jsiexecutor (= 1000.0.0) + - React-jsinspector (= 1000.0.0) + - React-perflogger (= 1000.0.0) + - React-ImageManager (1000.0.0): - glog - RCT-Folly/Fabric - React-Core/Default @@ -884,33 +961,33 @@ PODS: - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.0): + - React-jserrorhandler (1000.0.0): - RCT-Folly/Fabric (= 2022.05.16.00) - - React-jsi (= 0.73.0-rc.0) + - React-jsi (= 1000.0.0) - React-Mapbuffer - - React-jsi (0.73.0-rc.0): + - React-jsi (1000.0.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.0): + - React-jsiexecutor (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - React-jsinspector (0.73.0-rc.0) - - React-logger (0.73.0-rc.0): + - React-cxxreact (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-perflogger (= 1000.0.0) + - React-jsinspector (1000.0.0) + - React-logger (1000.0.0): - glog - - React-Mapbuffer (0.73.0-rc.0): + - React-Mapbuffer (1000.0.0): - glog - React-debug - - React-nativeconfig (0.73.0-rc.0) - - React-NativeModulesApple (0.73.0-rc.0): + - React-nativeconfig (1000.0.0) + - React-NativeModulesApple (1000.0.0): - glog - hermes-engine - React-callinvoker @@ -920,17 +997,17 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.0) - - React-RCTActionSheet (0.73.0-rc.0): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.0) - - React-RCTAnimation (0.73.0-rc.0): + - React-perflogger (1000.0.0) + - React-RCTActionSheet (1000.0.0): + - React-Core/RCTActionSheetHeaders (= 1000.0.0) + - React-RCTAnimation (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTAnimationHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTAppDelegate (0.73.0-rc.0): + - RCTTypeSafety (= 1000.0.0) + - React-Codegen (= 1000.0.0) + - React-Core/RCTAnimationHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTAppDelegate (1000.0.0): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -944,103 +1021,102 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon/turbomodule/core - - React-RCTBlob (0.73.0-rc.0): + - React-RCTBlob (1000.0.0): - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTBlobHeaders (= 0.73.0-rc.0) - - React-Core/RCTWebSocket (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-RCTNetwork (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTFabric (0.73.0-rc.0): + - React-Codegen (= 1000.0.0) + - React-Core/RCTBlobHeaders (= 1000.0.0) + - React-Core/RCTWebSocket (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-RCTNetwork (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTFabric (1000.0.0): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.0) + - React-Core (= 1000.0.0) - React-debug - - React-Fabric (= 0.73.0-rc.0) + - React-Fabric (= 1000.0.0) - React-FabricImage - React-graphics - React-ImageManager - React-nativeconfig - - React-RCTImage (= 0.73.0-rc.0) + - React-RCTImage (= 1000.0.0) - React-RCTText - React-rendererdebug - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.0): + - React-RCTImage (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTImageHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-RCTNetwork (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTLinking (0.73.0-rc.0): - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTNetwork (0.73.0-rc.0): + - RCTTypeSafety (= 1000.0.0) + - React-Codegen (= 1000.0.0) + - React-Core/RCTImageHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-RCTNetwork (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTLinking (1000.0.0): + - React-Codegen (= 1000.0.0) + - React-Core/RCTLinkingHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTNetwork (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTNetworkHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTPushNotification (0.73.0-rc.0): - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTSettings (0.73.0-rc.0): + - RCTTypeSafety (= 1000.0.0) + - React-Codegen (= 1000.0.0) + - React-Core/RCTNetworkHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTPushNotification (1000.0.0): + - RCTTypeSafety (= 1000.0.0) + - React-Codegen (= 1000.0.0) + - React-Core/RCTPushNotificationHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTSettings (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTSettingsHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTTest (0.73.0-rc.0): + - RCTTypeSafety (= 1000.0.0) + - React-Codegen (= 1000.0.0) + - React-Core/RCTSettingsHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTTest (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.0) - - React-CoreModules (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTText (0.73.0-rc.0): - - React-Core/RCTTextHeaders (= 0.73.0-rc.0) + - React-Core (= 1000.0.0) + - React-CoreModules (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTText (1000.0.0): + - React-Core/RCTTextHeaders (= 1000.0.0) - Yoga - - React-RCTVibration (0.73.0-rc.0): + - React-RCTVibration (1000.0.0): - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTVibrationHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-rendererdebug (0.73.0-rc.0): + - React-Codegen (= 1000.0.0) + - React-Core/RCTVibrationHeaders (= 1000.0.0) + - React-jsi (= 1000.0.0) + - ReactCommon/turbomodule/core (= 1000.0.0) + - React-rendererdebug (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.0) - - React-runtimeexecutor (0.73.0-rc.0): - - React-jsi (= 0.73.0-rc.0) - - React-runtimescheduler (0.73.0-rc.0): + - React-rncore (1000.0.0) + - React-runtimeexecutor (1000.0.0): + - React-jsi (= 1000.0.0) + - React-runtimescheduler (1000.0.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-callinvoker - React-debug - React-jsi - - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.0): + - React-utils (1000.0.0): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon-Samples (0.73.0-rc.0): + - ReactCommon-Samples (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1050,28 +1126,28 @@ PODS: - React-cxxreact - React-NativeModulesApple - ReactCommon/turbomodule/core - - ReactCommon/turbomodule/bridging (0.73.0-rc.0): + - ReactCommon/turbomodule/bridging (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.0) - - React-cxxreact (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-logger (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (0.73.0-rc.0): + - React-callinvoker (= 1000.0.0) + - React-cxxreact (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-logger (= 1000.0.0) + - React-perflogger (= 1000.0.0) + - ReactCommon/turbomodule/core (1000.0.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.0) - - React-cxxreact (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-logger (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) + - React-callinvoker (= 1000.0.0) + - React-cxxreact (= 1000.0.0) + - React-jsi (= 1000.0.0) + - React-logger (= 1000.0.0) + - React-perflogger (= 1000.0.0) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1084,10 +1160,31 @@ DEPENDENCIES: - DoubleConversion (from `../react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../react-native/React/FBReactNativeSpec`) + - Flipper (= 0.201.0) + - Flipper-Boost-iOSX (= 1.76.0.1.11) + - Flipper-DoubleConversion (= 3.2.0.1) + - Flipper-Fmt (= 7.1.7) + - Flipper-Folly (= 2.6.10) + - Flipper-Glog (= 0.5.0.5) + - Flipper-PeerTalk (= 0.0.4) + - FlipperKit (= 0.201.0) + - FlipperKit/Core (= 0.201.0) + - FlipperKit/CppBridge (= 0.201.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0) + - FlipperKit/FBDefines (= 0.201.0) + - FlipperKit/FKPortForwarding (= 0.201.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0) + - FlipperKit/FlipperKitReactPlugin (= 0.201.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.201.0) - glog (from `../react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) - OCMock (~> 3.9.1) + - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../react-native/Libraries/RCTRequired`) @@ -1096,6 +1193,7 @@ DEPENDENCIES: - React-callinvoker (from `../react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../react-native/`) + - React-Core/DevSupport (from `../react-native/`) - React-Core/RCTWebSocket (from `../react-native/`) - React-CoreModules (from `../react-native/React/CoreModules`) - React-cxxreact (from `../react-native/ReactCommon/cxxreact`) @@ -1139,9 +1237,19 @@ DEPENDENCIES: SPEC REPOS: trunk: + - CocoaAsyncSocket + - Flipper + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt + - Flipper-Folly + - Flipper-Glog + - Flipper-PeerTalk + - FlipperKit - fmt - libevent - OCMock + - OpenSSL-Universal - SocketRocket EXTERNAL SOURCES: @@ -1157,7 +1265,7 @@ EXTERNAL SOURCES: :podspec: "../react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2023-09-26-RNv0.73.0-ee2922a50fb719bdb378025d95dbd32ad93cd679 + :tag: '' RCT-Folly: :podspec: "../react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -1253,62 +1361,72 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: 5b5bb8db6bdeaec7080f7dc646d66d1369902283 - FBReactNativeSpec: 79c8793c90a8e9344ffee4e769c47a100538a3a1 + FBLazyVector: b233b98f08056318bc56f4deccea817b00edeac5 + FBReactNativeSpec: 9c14dc03023715c92c7d01a9c78e8475fe012718 + Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: bb85be4531be6bc8aacedb305c1d5ad8ce4d5b3a + hermes-engine: 2f192f79eb5fd8674ca08d663cfdb1a7f4ca2afc libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 05c71aa2ba855c360ef8b88554012f289e18821b - RCTTypeSafety: 3185c277e69cf46ed540ff9d470efad9e8c00d95 - React: 7ca8f490e53bad01021e92ea9b9b96f280ee1d82 - React-callinvoker: a2273abe294f5a65440240f00884008619e2465a - React-Codegen: 15c5930fb361234dadc73ff2a46fae353dd45964 - React-Core: d33b39797efaa082534939f60a4e9531b65378c7 - React-CoreModules: f6f5c543444979d36a7b8af5babd207ec1a62ceb - React-cxxreact: 0444149506556bcdbb541fcb5e3edb4865024821 - React-debug: d790065e18d75489ffa1523f7f93512ce9715358 - React-Fabric: dc8e6717cd75c65efecb26ddc94560a9130df66d - React-FabricImage: f2a238bddd07e084f882eb2b574d762cc52dacd4 - React-graphics: 007e2c309a14d05278d1cae91a22ab4c53da7d94 - React-hermes: a6e5b2f21077aaacbc629b0dc005a2964c50c35c - React-ImageManager: 83bb1b8536617d5242aa3553e26d7458884758d3 - React-jserrorhandler: c1a7b9a8dc95add6fd497833694d9de1aa30f6dd - React-jsi: 69256285478a4fa555a729b88e52994786dc0aec - React-jsiexecutor: fbb1ab2a9a3884ab46e676ffe12bcf34be5aacc2 - React-jsinspector: 36909c72313cba211392b65485d8687aa945559e - React-logger: df2b54baee256688db3ed022755cb7e64d307668 - React-Mapbuffer: f1f5c6a1ad5efd84301db60269ca005c15e721ba - React-nativeconfig: f2363be7b42cc1ceaecfbec197ebe03d6b065565 - React-NativeModulesApple: 2c4b623655d8d3e1b80049d17e67609be6b45da7 - React-perflogger: 6d75814b485251fe860b7005c1cd15909b08fb5b - React-RCTActionSheet: cec21c49ecaf2491d616bfce0e466ed4cffde004 - React-RCTAnimation: 1100c352dda6b32139155ff865c4fa35d35572ae - React-RCTAppDelegate: e64f6d2da65439744dd5b44afadb762e303489ac - React-RCTBlob: 2b4db8095acc1e2256db398bc38270e31baa3fac - React-RCTFabric: 53d20a2374f6a4f79cd123b90d047ca1f1672086 - React-RCTImage: 4d89a0550098bca35939b877ddffa2a647fddfa6 - React-RCTLinking: 1345853b44a87087e1b5cd10d7943d6b27d615c5 - React-RCTNetwork: 01dcff90aa8081fa9b20aab213d135676bfac114 - React-RCTPushNotification: 7ac2cf8e78e6b08d3a58597dabdc1ccab3672df6 - React-RCTSettings: e9d22f362ec4d982a841c0f0f1231d2c8e0fa28e - React-RCTTest: c0f05dc5eec117a9f4986fbfbfcb6f930840378e - React-RCTText: 12d49894a4f8e249f2d2883de8fc49978040a29f - React-RCTVibration: b93f6838ec1801963783baa360ef8c0f785b3e34 - React-rendererdebug: c0916409c18e30f71fd19aba53ec6875049b3e6e - React-rncore: f522b10bf7c9766b190ba87b1ae0407290caf3a5 - React-runtimeexecutor: 038a523b032ecf43263534b75e66bf84a8b52447 - React-runtimescheduler: bb7d5ea12a65d8dbd7c6ceea5251065d2f10ae89 - React-utils: a6810f61d773a36b51d2ca4212eee13427ef7235 - ReactCommon: 3b92ec47e238d0e229fb654d143bc553860347a3 - ReactCommon-Samples: 38f375baeeaab65d59081bc69e009f89184b2443 + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c + RCT-Folly: 870a45f398f8ee9ca60cd021b23ab144d56fd3ad + RCTRequired: 5091117ce5c99db5af024aa1ec15c6a4c4ad7f1c + RCTTypeSafety: 95672f6742bf7b5d16bd8700a65e7bffb63cd9f8 + React: 2806c7b904a5f8e1279bb1fcf829b6a43bc71e15 + React-callinvoker: 2d96a4479c0b440a4b24f7eb0ae73a95c0a7e5d9 + React-Codegen: 5ad0601f4a0960e6ad81412fdfb270aafba6e4e1 + React-Core: 2e70e151812a6ad68a95b676d05e13ee38466d96 + React-CoreModules: 69643fe30d8e8f214584cb5336e47307e458d9d9 + React-cxxreact: 420ec1c09edf4291fa3cfee30371572572ccb2e5 + React-debug: 42965d54926dad1d171d60bdb89e000efb4eb9b4 + React-Fabric: d3aecfadeb3077c2396cbd305895b025eed4123d + React-FabricImage: de13a9ca5eb2819ac729564e98a40a9af54452f5 + React-graphics: cfcaab89e7d1aa59bb97d99c25ef5f28d9ced5f1 + React-hermes: 11fcf1dd7dff109b40160e75eb4447af3ceae85d + React-ImageManager: ec2b27c090514ca96f78753767a3fb4682be78f3 + React-jserrorhandler: 87d904b84cedbf897a4ed59aceca5724f03cf9af + React-jsi: 990673de5500c55224e52e7235863b1511ad6375 + React-jsiexecutor: ae9ed28dbcf5273f4916fbabf4958ec891f47c0e + React-jsinspector: e845240c20daa428639125e0e5623a3237203ff7 + React-logger: 5bb7c5f3a5ef404c197941167c8cc7628e928f97 + React-Mapbuffer: e741b31b558f7679bc6b8a848fb3605f8d357998 + React-nativeconfig: 7b4ebf6e90de842fd0e6f5df6d9ad1f624955bde + React-NativeModulesApple: 6306a1e80f8f09e8689a43e9072e9be25dbcfcc6 + React-perflogger: 24428a1beeb9754b41ecec09f62cbd8ff15ddb46 + React-RCTActionSheet: fb44d26d484d53f7e5debf2346f9871336e5ac70 + React-RCTAnimation: b54290477ef258b6981a6822f5b52673cc08399a + React-RCTAppDelegate: 122a35fd62d94993c7370d25cc85c7e65315711e + React-RCTBlob: bff18b190ffe3a48b2d78dbb027c24067b6314c1 + React-RCTFabric: 42070e4bfab8370c081def852e5e31e047eae192 + React-RCTImage: 0329f6197bb95cf9f4e37f9270b278e4037abdc0 + React-RCTLinking: 79e3f58ad1b65dba4cb2c53c2b09eec75d858c20 + React-RCTNetwork: b603998f6a23cf652395ffe84d5dea67cd4c49de + React-RCTPushNotification: 317b76a7c6c576898580472a1394a3844328c95e + React-RCTSettings: 866e76786094fc7f5037719b767e9adffd8dda87 + React-RCTTest: bad53a62901f602dd919cb3c47d91a0c76ec7f38 + React-RCTText: 6b8c71ab09e7480ffaa5fd353f5b8646019a1cf3 + React-RCTVibration: cf14ac74b9f1d676d56111216d1a6e1b0df06d51 + React-rendererdebug: bcfb7fa48f8a0f62f87522a8f47e72787761884c + React-rncore: 28bd4658bf02ba5302822b8c6ddc0052f7566277 + React-runtimeexecutor: 963711d915734cd2a24fae6edec7f0572d19ecce + React-runtimescheduler: 6e7519d2003b5ab8aa8a79b60478fd13cd5f6681 + React-utils: b842f2d7fe9d81138a486512f44fe1565e2bb987 + ReactCommon: 9ab719868580941d77be0f90e4d310580868753d + ReactCommon-Samples: 9bdd25d3e637c98e314fa9f507292b4c4ddb3edd ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: dbb39231806ac48d6b95e95b47d3e2170b5f06c9 + Yoga: 5c39c7ead1a63357070b8bef4a9a57b9a1cd1ccb -PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 +PODFILE CHECKSUM: ae1f2365c7aaade1c3f51a182c545de8df389f81 -COCOAPODS: 1.13.0 +COCOAPODS: 1.12.1 From 8263b9d237039a6afadaa9d410125dbe596a8f70 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 3 Oct 2023 16:58:36 +0100 Subject: [PATCH 022/190] [RN][CI] Make the Choose CI Job run also on tags (#39774) --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 91d3e642d440..2eb4a63b33d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -91,4 +91,7 @@ jobs: workflows: always-run: jobs: - - choose_ci_jobs + - choose_ci_jobs: + filters: + tags: + only: /.*/ From f133dd2efbb2ea0ea10241bb32005261a0405a49 Mon Sep 17 00:00:00 2001 From: Distiller Date: Tue, 3 Oct 2023 16:13:06 +0000 Subject: [PATCH 023/190] [0.73.0-rc.0] Bump version numbers --- .../Libraries/Core/ReactNativeVersion.js | 6 +- packages/react-native/React/Base/RCTVersion.m | 6 +- .../ReactAndroid/gradle.properties | 2 +- .../systeminfo/ReactNativeVersion.java | 6 +- .../ReactCommon/cxxreact/ReactNativeVersion.h | 6 +- packages/react-native/package.json | 4 +- packages/react-native/template/package.json | 2 +- packages/rn-tester/Podfile.lock | 1000 ++++++++--------- 8 files changed, 457 insertions(+), 575 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 1d82274f85cb..9b22cf2dd06e 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -10,8 +10,8 @@ */ exports.version = { - major: 1000, - minor: 0, + major: 0, + minor: 73, patch: 0, - prerelease: null, + prerelease: 'rc.0', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index 1794ca2e5213..ee1761c3e06f 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -21,10 +21,10 @@ static dispatch_once_t onceToken; dispatch_once(&onceToken, ^(void){ __rnVersion = @{ - RCTVersionMajor: @(1000), - RCTVersionMinor: @(0), + RCTVersionMajor: @(0), + RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: [NSNull null], + RCTVersionPrerelease: @"rc.0", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 924f82a0637d..7c8609f15d3b 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1000.0.0 +VERSION_NAME=0.73.0-rc.0 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index ea97bff8de80..5c7e0847bbbe 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -15,8 +15,8 @@ public class ReactNativeVersion { public static final Map VERSION = MapBuilder.of( - "major", 1000, - "minor", 0, + "major", 0, + "minor", 73, "patch", 0, - "prerelease", null); + "prerelease", "rc.0"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 5d89f4efaae2..d3af879148d1 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -15,10 +15,10 @@ namespace facebook::react { constexpr struct { - int32_t Major = 1000; - int32_t Minor = 0; + int32_t Major = 0; + int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = ""; + std::string_view Prerelease = "rc.0"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 0b91160b103b..fa5de843b32e 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "1000.0.0", + "version": "0.73.0-rc.0", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index e4fe7ccdc801..6c329d42c4f4 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "1000.0.0" + "react-native": "0.73.0-rc.0" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 5a18cf126afc..04099ff8ef26 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1,85 +1,27 @@ PODS: - boost (1.83.0) - - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (1000.0.0) - - FBReactNativeSpec (1000.0.0): + - FBLazyVector (0.73.0-rc.0) + - FBReactNativeSpec (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Core (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - Flipper (0.201.0): - - Flipper-Folly (~> 2.6) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - FlipperKit (0.201.0): - - FlipperKit/Core (= 0.201.0) - - FlipperKit/Core (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.201.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.201.0) - - FlipperKit/FKPortForwarding (0.201.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.201.0) - - FlipperKit/FlipperKitLayoutHelpers (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Core (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (1000.0.0): - - hermes-engine/Hermes (= 1000.0.0) - - hermes-engine/inspector (= 1000.0.0) - - hermes-engine/inspector_chrome (= 1000.0.0) - - hermes-engine/Public (= 1000.0.0) - - hermes-engine/Hermes (1000.0.0) - - hermes-engine/inspector (1000.0.0) - - hermes-engine/inspector_chrome (1000.0.0) - - hermes-engine/Public (1000.0.0) + - hermes-engine (0.73.0-rc.0): + - hermes-engine/Hermes (= 0.73.0-rc.0) + - hermes-engine/inspector (= 0.73.0-rc.0) + - hermes-engine/inspector_chrome (= 0.73.0-rc.0) + - hermes-engine/Public (= 0.73.0-rc.0) + - hermes-engine/Hermes (0.73.0-rc.0) + - hermes-engine/inspector (0.73.0-rc.0) + - hermes-engine/inspector_chrome (0.73.0-rc.0) + - hermes-engine/Public (0.73.0-rc.0) - libevent (2.1.12) - OCMock (3.9.1) - - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): - boost - DoubleConversion @@ -102,26 +44,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (1000.0.0) - - RCTTypeSafety (1000.0.0): - - FBLazyVector (= 1000.0.0) - - RCTRequired (= 1000.0.0) - - React-Core (= 1000.0.0) - - React (1000.0.0): - - React-Core (= 1000.0.0) - - React-Core/DevSupport (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-RCTActionSheet (= 1000.0.0) - - React-RCTAnimation (= 1000.0.0) - - React-RCTBlob (= 1000.0.0) - - React-RCTImage (= 1000.0.0) - - React-RCTLinking (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - React-RCTSettings (= 1000.0.0) - - React-RCTText (= 1000.0.0) - - React-RCTVibration (= 1000.0.0) - - React-callinvoker (1000.0.0) - - React-Codegen (1000.0.0): + - RCTRequired (0.73.0-rc.0) + - RCTTypeSafety (0.73.0-rc.0): + - FBLazyVector (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.0) + - React-Core (= 0.73.0-rc.0) + - React (0.73.0-rc.0): + - React-Core (= 0.73.0-rc.0) + - React-Core/DevSupport (= 0.73.0-rc.0) + - React-Core/RCTWebSocket (= 0.73.0-rc.0) + - React-RCTActionSheet (= 0.73.0-rc.0) + - React-RCTAnimation (= 0.73.0-rc.0) + - React-RCTBlob (= 0.73.0-rc.0) + - React-RCTImage (= 0.73.0-rc.0) + - React-RCTLinking (= 0.73.0-rc.0) + - React-RCTNetwork (= 0.73.0-rc.0) + - React-RCTSettings (= 0.73.0-rc.0) + - React-RCTText (= 0.73.0-rc.0) + - React-RCTVibration (= 0.73.0-rc.0) + - React-callinvoker (0.73.0-rc.0) + - React-Codegen (0.73.0-rc.0): - DoubleConversion - FBReactNativeSpec - glog @@ -141,11 +83,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (1000.0.0): + - React-Core (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) + - React-Core/Default (= 0.73.0-rc.0) - React-cxxreact - React-hermes - React-jsi @@ -155,7 +97,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/CoreModulesHeaders (1000.0.0): + - React-Core/CoreModulesHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -169,7 +111,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/Default (1000.0.0): + - React-Core/Default (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -182,23 +124,23 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/DevSupport (1000.0.0): + - React-Core/DevSupport (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) + - React-Core/Default (= 0.73.0-rc.0) + - React-Core/RCTWebSocket (= 0.73.0-rc.0) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 1000.0.0) + - React-jsinspector (= 0.73.0-rc.0) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTActionSheetHeaders (1000.0.0): + - React-Core/RCTActionSheetHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -212,7 +154,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTAnimationHeaders (1000.0.0): + - React-Core/RCTAnimationHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -226,7 +168,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTBlobHeaders (1000.0.0): + - React-Core/RCTBlobHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -240,7 +182,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTImageHeaders (1000.0.0): + - React-Core/RCTImageHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -254,7 +196,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTLinkingHeaders (1000.0.0): + - React-Core/RCTLinkingHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -268,7 +210,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTNetworkHeaders (1000.0.0): + - React-Core/RCTNetworkHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -282,7 +224,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTPushNotificationHeaders (1000.0.0): + - React-Core/RCTPushNotificationHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -296,7 +238,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTSettingsHeaders (1000.0.0): + - React-Core/RCTSettingsHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -310,7 +252,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTTextHeaders (1000.0.0): + - React-Core/RCTTextHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -324,7 +266,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTVibrationHeaders (1000.0.0): + - React-Core/RCTVibrationHeaders (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -338,11 +280,11 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTWebSocket (1000.0.0): + - React-Core/RCTWebSocket (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) + - React-Core/Default (= 0.73.0-rc.0) - React-cxxreact - React-hermes - React-jsi @@ -352,607 +294,588 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-CoreModules (1000.0.0): + - React-CoreModules (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/CoreModulesHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/CoreModulesHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) - React-RCTBlob - - React-RCTImage (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) + - React-RCTImage (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - SocketRocket (= 0.6.0) - - React-cxxreact (1000.0.0): + - React-cxxreact (0.73.0-rc.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 1000.0.0) - - React-debug (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsinspector (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-runtimeexecutor (= 1000.0.0) - - React-debug (1000.0.0) - - React-Fabric (1000.0.0): + - React-callinvoker (= 0.73.0-rc.0) + - React-debug (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsinspector (= 0.73.0-rc.0) + - React-logger (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - React-runtimeexecutor (= 0.73.0-rc.0) + - React-debug (0.73.0-rc.0) + - React-Fabric (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 1000.0.0) - - React-Fabric/attributedstring (= 1000.0.0) - - React-Fabric/butter (= 1000.0.0) - - React-Fabric/componentregistry (= 1000.0.0) - - React-Fabric/componentregistrynative (= 1000.0.0) - - React-Fabric/components (= 1000.0.0) - - React-Fabric/core (= 1000.0.0) - - React-Fabric/imagemanager (= 1000.0.0) - - React-Fabric/leakchecker (= 1000.0.0) - - React-Fabric/mounting (= 1000.0.0) - - React-Fabric/scheduler (= 1000.0.0) - - React-Fabric/telemetry (= 1000.0.0) - - React-Fabric/templateprocessor (= 1000.0.0) - - React-Fabric/textlayoutmanager (= 1000.0.0) - - React-Fabric/uimanager (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-Fabric/animations (= 0.73.0-rc.0) + - React-Fabric/attributedstring (= 0.73.0-rc.0) + - React-Fabric/componentregistry (= 0.73.0-rc.0) + - React-Fabric/componentregistrynative (= 0.73.0-rc.0) + - React-Fabric/components (= 0.73.0-rc.0) + - React-Fabric/core (= 0.73.0-rc.0) + - React-Fabric/imagemanager (= 0.73.0-rc.0) + - React-Fabric/leakchecker (= 0.73.0-rc.0) + - React-Fabric/mounting (= 0.73.0-rc.0) + - React-Fabric/scheduler (= 0.73.0-rc.0) + - React-Fabric/telemetry (= 0.73.0-rc.0) + - React-Fabric/templateprocessor (= 0.73.0-rc.0) + - React-Fabric/textlayoutmanager (= 0.73.0-rc.0) + - React-Fabric/uimanager (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/animations (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/animations (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/attributedstring (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/attributedstring (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/butter (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/componentregistry (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/componentregistry (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/componentregistrynative (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/componentregistrynative (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-Fabric/components/inputaccessory (= 0.73.0-rc.0) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.0) + - React-Fabric/components/modal (= 0.73.0-rc.0) + - React-Fabric/components/rncore (= 0.73.0-rc.0) + - React-Fabric/components/root (= 0.73.0-rc.0) + - React-Fabric/components/safeareaview (= 0.73.0-rc.0) + - React-Fabric/components/scrollview (= 0.73.0-rc.0) + - React-Fabric/components/text (= 0.73.0-rc.0) + - React-Fabric/components/textinput (= 0.73.0-rc.0) + - React-Fabric/components/unimplementedview (= 0.73.0-rc.0) + - React-Fabric/components/view (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/inputaccessory (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 1000.0.0) - - React-Fabric/components/legacyviewmanagerinterop (= 1000.0.0) - - React-Fabric/components/modal (= 1000.0.0) - - React-Fabric/components/rncore (= 1000.0.0) - - React-Fabric/components/root (= 1000.0.0) - - React-Fabric/components/safeareaview (= 1000.0.0) - - React-Fabric/components/scrollview (= 1000.0.0) - - React-Fabric/components/text (= 1000.0.0) - - React-Fabric/components/textinput (= 1000.0.0) - - React-Fabric/components/unimplementedview (= 1000.0.0) - - React-Fabric/components/view (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/inputaccessory (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/legacyviewmanagerinterop (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/modal (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/modal (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/rncore (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/rncore (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/root (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/root (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/safeareaview (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/safeareaview (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/scrollview (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/scrollview (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/text (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/text (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/textinput (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/textinput (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/unimplementedview (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/unimplementedview (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/components/view (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/view (1000.0.0): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Core - - React-cxxreact - - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - Yoga - - React-Fabric/core (1000.0.0): + - React-Fabric/core (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/imagemanager (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/imagemanager (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/leakchecker (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/leakchecker (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/mounting (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/mounting (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/scheduler (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/scheduler (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/telemetry (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/telemetry (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/templateprocessor (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/templateprocessor (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/textlayoutmanager (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/textlayoutmanager (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - React-Fabric/uimanager - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/uimanager (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-Fabric/uimanager (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Core - React-cxxreact - React-debug - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-FabricImage (1000.0.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-FabricImage (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) + - RCTRequired (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.0) - React-Fabric - - React-graphics (= 1000.0.0) + - React-graphics (= 0.73.0-rc.0) - React-ImageManager - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) + - React-jsi (= 0.73.0-rc.0) + - React-jsiexecutor (= 0.73.0-rc.0) - React-logger - React-rendererdebug - React-utils - - ReactCommon/turbomodule/core (= 1000.0.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - Yoga - - React-graphics (1000.0.0): + - React-graphics (0.73.0-rc.0): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 1000.0.0) - - React-hermes (1000.0.0): + - React-Core/Default (= 0.73.0-rc.0) + - React-utils + - React-hermes (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 1000.0.0) + - React-cxxreact (= 0.73.0-rc.0) - React-jsi - - React-jsiexecutor (= 1000.0.0) - - React-jsinspector (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-ImageManager (1000.0.0): + - React-jsiexecutor (= 0.73.0-rc.0) + - React-jsinspector (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - React-ImageManager (0.73.0-rc.0): - glog - RCT-Folly/Fabric - React-Core/Default @@ -961,33 +884,33 @@ PODS: - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (1000.0.0): + - React-jserrorhandler (0.73.0-rc.0): - RCT-Folly/Fabric (= 2022.05.16.00) - - React-jsi (= 1000.0.0) + - React-jsi (= 0.73.0-rc.0) - React-Mapbuffer - - React-jsi (1000.0.0): + - React-jsi (0.73.0-rc.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (1000.0.0): + - React-jsiexecutor (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-jsinspector (1000.0.0) - - React-logger (1000.0.0): + - React-cxxreact (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - React-jsinspector (0.73.0-rc.0) + - React-logger (0.73.0-rc.0): - glog - - React-Mapbuffer (1000.0.0): + - React-Mapbuffer (0.73.0-rc.0): - glog - React-debug - - React-nativeconfig (1000.0.0) - - React-NativeModulesApple (1000.0.0): + - React-nativeconfig (0.73.0-rc.0) + - React-NativeModulesApple (0.73.0-rc.0): - glog - hermes-engine - React-callinvoker @@ -997,17 +920,17 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (1000.0.0) - - React-RCTActionSheet (1000.0.0): - - React-Core/RCTActionSheetHeaders (= 1000.0.0) - - React-RCTAnimation (1000.0.0): + - React-perflogger (0.73.0-rc.0) + - React-RCTActionSheet (0.73.0-rc.0): + - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.0) + - React-RCTAnimation (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTAnimationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTAppDelegate (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTAnimationHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTAppDelegate (0.73.0-rc.0): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1021,102 +944,103 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon/turbomodule/core - - React-RCTBlob (1000.0.0): + - React-RCTBlob (0.73.0-rc.0): - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 1000.0.0) - - React-Core/RCTBlobHeaders (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTFabric (1000.0.0): + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTBlobHeaders (= 0.73.0-rc.0) + - React-Core/RCTWebSocket (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-RCTNetwork (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTFabric (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core (= 1000.0.0) + - React-Core (= 0.73.0-rc.0) - React-debug - - React-Fabric (= 1000.0.0) + - React-Fabric (= 0.73.0-rc.0) - React-FabricImage - React-graphics - React-ImageManager - React-nativeconfig - - React-RCTImage (= 1000.0.0) + - React-RCTImage (= 0.73.0-rc.0) - React-RCTText - React-rendererdebug - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (1000.0.0): + - React-RCTImage (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTImageHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTLinking (1000.0.0): - - React-Codegen (= 1000.0.0) - - React-Core/RCTLinkingHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTNetwork (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTImageHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-RCTNetwork (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTLinking (0.73.0-rc.0): + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTLinkingHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTNetwork (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTNetworkHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTPushNotification (1000.0.0): - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTPushNotificationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTSettings (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTNetworkHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTPushNotification (0.73.0-rc.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTSettings (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTSettingsHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTTest (1000.0.0): + - RCTTypeSafety (= 0.73.0-rc.0) + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTSettingsHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTTest (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 1000.0.0) - - React-CoreModules (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTText (1000.0.0): - - React-Core/RCTTextHeaders (= 1000.0.0) + - React-Core (= 0.73.0-rc.0) + - React-CoreModules (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTText (0.73.0-rc.0): + - React-Core/RCTTextHeaders (= 0.73.0-rc.0) - Yoga - - React-RCTVibration (1000.0.0): + - React-RCTVibration (0.73.0-rc.0): - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 1000.0.0) - - React-Core/RCTVibrationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-rendererdebug (1000.0.0): + - React-Codegen (= 0.73.0-rc.0) + - React-Core/RCTVibrationHeaders (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-rendererdebug (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (1000.0.0) - - React-runtimeexecutor (1000.0.0): - - React-jsi (= 1000.0.0) - - React-runtimescheduler (1000.0.0): + - React-rncore (0.73.0-rc.0) + - React-runtimeexecutor (0.73.0-rc.0): + - React-jsi (= 0.73.0-rc.0) + - React-runtimescheduler (0.73.0-rc.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-callinvoker - React-debug - React-jsi + - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (1000.0.0): + - React-utils (0.73.0-rc.0): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon-Samples (1000.0.0): + - ReactCommon-Samples (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1126,28 +1050,28 @@ PODS: - React-cxxreact - React-NativeModulesApple - ReactCommon/turbomodule/core - - ReactCommon/turbomodule/bridging (1000.0.0): + - ReactCommon/turbomodule/bridging (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/core (1000.0.0): + - React-callinvoker (= 0.73.0-rc.0) + - React-cxxreact (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-logger (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (0.73.0-rc.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) + - React-callinvoker (= 0.73.0-rc.0) + - React-cxxreact (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.0) + - React-logger (= 0.73.0-rc.0) + - React-perflogger (= 0.73.0-rc.0) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1160,31 +1084,10 @@ DEPENDENCIES: - DoubleConversion (from `../react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../react-native/React/FBReactNativeSpec`) - - Flipper (= 0.201.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - FlipperKit (= 0.201.0) - - FlipperKit/Core (= 0.201.0) - - FlipperKit/CppBridge (= 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0) - - FlipperKit/FBDefines (= 0.201.0) - - FlipperKit/FKPortForwarding (= 0.201.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0) - - FlipperKit/FlipperKitReactPlugin (= 0.201.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.201.0) - glog (from `../react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) - OCMock (~> 3.9.1) - - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../react-native/Libraries/RCTRequired`) @@ -1193,7 +1096,6 @@ DEPENDENCIES: - React-callinvoker (from `../react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../react-native/`) - - React-Core/DevSupport (from `../react-native/`) - React-Core/RCTWebSocket (from `../react-native/`) - React-CoreModules (from `../react-native/React/CoreModules`) - React-cxxreact (from `../react-native/ReactCommon/cxxreact`) @@ -1237,19 +1139,9 @@ DEPENDENCIES: SPEC REPOS: trunk: - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - FlipperKit - fmt - libevent - OCMock - - OpenSSL-Universal - SocketRocket EXTERNAL SOURCES: @@ -1265,7 +1157,7 @@ EXTERNAL SOURCES: :podspec: "../react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: '' + :tag: hermes-2023-09-26-RNv0.73.0-ee2922a50fb719bdb378025d95dbd32ad93cd679 RCT-Folly: :podspec: "../react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -1361,72 +1253,62 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: b233b98f08056318bc56f4deccea817b00edeac5 - FBReactNativeSpec: 9c14dc03023715c92c7d01a9c78e8475fe012718 - Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f + FBLazyVector: 5b5bb8db6bdeaec7080f7dc646d66d1369902283 + FBReactNativeSpec: 79c8793c90a8e9344ffee4e769c47a100538a3a1 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 2f192f79eb5fd8674ca08d663cfdb1a7f4ca2afc + hermes-engine: bb85be4531be6bc8aacedb305c1d5ad8ce4d5b3a libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - RCT-Folly: 870a45f398f8ee9ca60cd021b23ab144d56fd3ad - RCTRequired: 5091117ce5c99db5af024aa1ec15c6a4c4ad7f1c - RCTTypeSafety: 95672f6742bf7b5d16bd8700a65e7bffb63cd9f8 - React: 2806c7b904a5f8e1279bb1fcf829b6a43bc71e15 - React-callinvoker: 2d96a4479c0b440a4b24f7eb0ae73a95c0a7e5d9 - React-Codegen: 5ad0601f4a0960e6ad81412fdfb270aafba6e4e1 - React-Core: 2e70e151812a6ad68a95b676d05e13ee38466d96 - React-CoreModules: 69643fe30d8e8f214584cb5336e47307e458d9d9 - React-cxxreact: 420ec1c09edf4291fa3cfee30371572572ccb2e5 - React-debug: 42965d54926dad1d171d60bdb89e000efb4eb9b4 - React-Fabric: d3aecfadeb3077c2396cbd305895b025eed4123d - React-FabricImage: de13a9ca5eb2819ac729564e98a40a9af54452f5 - React-graphics: cfcaab89e7d1aa59bb97d99c25ef5f28d9ced5f1 - React-hermes: 11fcf1dd7dff109b40160e75eb4447af3ceae85d - React-ImageManager: ec2b27c090514ca96f78753767a3fb4682be78f3 - React-jserrorhandler: 87d904b84cedbf897a4ed59aceca5724f03cf9af - React-jsi: 990673de5500c55224e52e7235863b1511ad6375 - React-jsiexecutor: ae9ed28dbcf5273f4916fbabf4958ec891f47c0e - React-jsinspector: e845240c20daa428639125e0e5623a3237203ff7 - React-logger: 5bb7c5f3a5ef404c197941167c8cc7628e928f97 - React-Mapbuffer: e741b31b558f7679bc6b8a848fb3605f8d357998 - React-nativeconfig: 7b4ebf6e90de842fd0e6f5df6d9ad1f624955bde - React-NativeModulesApple: 6306a1e80f8f09e8689a43e9072e9be25dbcfcc6 - React-perflogger: 24428a1beeb9754b41ecec09f62cbd8ff15ddb46 - React-RCTActionSheet: fb44d26d484d53f7e5debf2346f9871336e5ac70 - React-RCTAnimation: b54290477ef258b6981a6822f5b52673cc08399a - React-RCTAppDelegate: 122a35fd62d94993c7370d25cc85c7e65315711e - React-RCTBlob: bff18b190ffe3a48b2d78dbb027c24067b6314c1 - React-RCTFabric: 42070e4bfab8370c081def852e5e31e047eae192 - React-RCTImage: 0329f6197bb95cf9f4e37f9270b278e4037abdc0 - React-RCTLinking: 79e3f58ad1b65dba4cb2c53c2b09eec75d858c20 - React-RCTNetwork: b603998f6a23cf652395ffe84d5dea67cd4c49de - React-RCTPushNotification: 317b76a7c6c576898580472a1394a3844328c95e - React-RCTSettings: 866e76786094fc7f5037719b767e9adffd8dda87 - React-RCTTest: bad53a62901f602dd919cb3c47d91a0c76ec7f38 - React-RCTText: 6b8c71ab09e7480ffaa5fd353f5b8646019a1cf3 - React-RCTVibration: cf14ac74b9f1d676d56111216d1a6e1b0df06d51 - React-rendererdebug: bcfb7fa48f8a0f62f87522a8f47e72787761884c - React-rncore: 28bd4658bf02ba5302822b8c6ddc0052f7566277 - React-runtimeexecutor: 963711d915734cd2a24fae6edec7f0572d19ecce - React-runtimescheduler: 6e7519d2003b5ab8aa8a79b60478fd13cd5f6681 - React-utils: b842f2d7fe9d81138a486512f44fe1565e2bb987 - ReactCommon: 9ab719868580941d77be0f90e4d310580868753d - ReactCommon-Samples: 9bdd25d3e637c98e314fa9f507292b4c4ddb3edd + RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 + RCTRequired: 05c71aa2ba855c360ef8b88554012f289e18821b + RCTTypeSafety: 3185c277e69cf46ed540ff9d470efad9e8c00d95 + React: 7ca8f490e53bad01021e92ea9b9b96f280ee1d82 + React-callinvoker: a2273abe294f5a65440240f00884008619e2465a + React-Codegen: 15c5930fb361234dadc73ff2a46fae353dd45964 + React-Core: d33b39797efaa082534939f60a4e9531b65378c7 + React-CoreModules: f6f5c543444979d36a7b8af5babd207ec1a62ceb + React-cxxreact: 0444149506556bcdbb541fcb5e3edb4865024821 + React-debug: d790065e18d75489ffa1523f7f93512ce9715358 + React-Fabric: dc8e6717cd75c65efecb26ddc94560a9130df66d + React-FabricImage: f2a238bddd07e084f882eb2b574d762cc52dacd4 + React-graphics: 007e2c309a14d05278d1cae91a22ab4c53da7d94 + React-hermes: a6e5b2f21077aaacbc629b0dc005a2964c50c35c + React-ImageManager: 83bb1b8536617d5242aa3553e26d7458884758d3 + React-jserrorhandler: c1a7b9a8dc95add6fd497833694d9de1aa30f6dd + React-jsi: 69256285478a4fa555a729b88e52994786dc0aec + React-jsiexecutor: fbb1ab2a9a3884ab46e676ffe12bcf34be5aacc2 + React-jsinspector: 36909c72313cba211392b65485d8687aa945559e + React-logger: df2b54baee256688db3ed022755cb7e64d307668 + React-Mapbuffer: f1f5c6a1ad5efd84301db60269ca005c15e721ba + React-nativeconfig: f2363be7b42cc1ceaecfbec197ebe03d6b065565 + React-NativeModulesApple: 2c4b623655d8d3e1b80049d17e67609be6b45da7 + React-perflogger: 6d75814b485251fe860b7005c1cd15909b08fb5b + React-RCTActionSheet: cec21c49ecaf2491d616bfce0e466ed4cffde004 + React-RCTAnimation: 1100c352dda6b32139155ff865c4fa35d35572ae + React-RCTAppDelegate: e64f6d2da65439744dd5b44afadb762e303489ac + React-RCTBlob: 2b4db8095acc1e2256db398bc38270e31baa3fac + React-RCTFabric: 53d20a2374f6a4f79cd123b90d047ca1f1672086 + React-RCTImage: 4d89a0550098bca35939b877ddffa2a647fddfa6 + React-RCTLinking: 1345853b44a87087e1b5cd10d7943d6b27d615c5 + React-RCTNetwork: 01dcff90aa8081fa9b20aab213d135676bfac114 + React-RCTPushNotification: 7ac2cf8e78e6b08d3a58597dabdc1ccab3672df6 + React-RCTSettings: e9d22f362ec4d982a841c0f0f1231d2c8e0fa28e + React-RCTTest: c0f05dc5eec117a9f4986fbfbfcb6f930840378e + React-RCTText: 12d49894a4f8e249f2d2883de8fc49978040a29f + React-RCTVibration: b93f6838ec1801963783baa360ef8c0f785b3e34 + React-rendererdebug: c0916409c18e30f71fd19aba53ec6875049b3e6e + React-rncore: f522b10bf7c9766b190ba87b1ae0407290caf3a5 + React-runtimeexecutor: 038a523b032ecf43263534b75e66bf84a8b52447 + React-runtimescheduler: bb7d5ea12a65d8dbd7c6ceea5251065d2f10ae89 + React-utils: a6810f61d773a36b51d2ca4212eee13427ef7235 + ReactCommon: 3b92ec47e238d0e229fb654d143bc553860347a3 + ReactCommon-Samples: 38f375baeeaab65d59081bc69e009f89184b2443 ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: 5c39c7ead1a63357070b8bef4a9a57b9a1cd1ccb + Yoga: dbb39231806ac48d6b95e95b47d3e2170b5f06c9 -PODFILE CHECKSUM: ae1f2365c7aaade1c3f51a182c545de8df389f81 +PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.12.1 +COCOAPODS: 1.13.0 From dd30cd30c9d6782f9512de49a4a6810c13c15014 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 3 Oct 2023 14:28:21 -0400 Subject: [PATCH 024/190] Revert "Fix typings for ReactNativeVersion.js" This reverts commit b6c0703ebb9c0432acf6b87e894d6a33949017cc. --- .../react-native/Libraries/Core/ReactNativeVersionCheck.js | 3 ++- .../Libraries/Utilities/NativePlatformConstantsAndroid.js | 2 +- .../Libraries/Utilities/NativePlatformConstantsIOS.js | 2 +- packages/react-native/Libraries/Utilities/Platform.android.js | 2 +- packages/react-native/Libraries/Utilities/Platform.flow.js | 4 ++-- packages/react-native/Libraries/Utilities/Platform.ios.js | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js b/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js index b3c437ac45d7..8b41988696d6 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js @@ -44,6 +44,7 @@ function _formatVersion( ): string { return ( `${version.major}.${version.minor}.${version.patch}` + - (version.prerelease != null ? `-${version.prerelease}` : '') + // eslint-disable-next-line eqeqeq + (version.prerelease != undefined ? `-${version.prerelease}` : '') ); } diff --git a/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js b/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js index 2d6e1faed90d..6eab28ff02f3 100644 --- a/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js +++ b/packages/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js @@ -16,7 +16,7 @@ export type ReactNativeVersionAndroid = {| major: number, minor: number, patch: number, - prerelease: ?string, + prerelease: ?number, |}; export type PlatformConstantsAndroid = {| diff --git a/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js b/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js index e8769b1eb42f..1a2cf4ad5069 100644 --- a/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js +++ b/packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js @@ -19,7 +19,7 @@ export type PlatformConstantsIOS = {| major: number, minor: number, patch: number, - prerelease: ?string, + prerelease: ?number, |}, forceTouchAvailable: boolean, osVersion: string, diff --git a/packages/react-native/Libraries/Utilities/Platform.android.js b/packages/react-native/Libraries/Utilities/Platform.android.js index 4a10f33ab0ec..95210a315a25 100644 --- a/packages/react-native/Libraries/Utilities/Platform.android.js +++ b/packages/react-native/Libraries/Utilities/Platform.android.js @@ -31,7 +31,7 @@ const Platform: PlatformType = { major: number, minor: number, patch: number, - prerelease: ?string, + prerelease: ?number, |}, Version: number, Release: string, diff --git a/packages/react-native/Libraries/Utilities/Platform.flow.js b/packages/react-native/Libraries/Utilities/Platform.flow.js index 19f4a68f7bd4..d4bc8147249e 100644 --- a/packages/react-native/Libraries/Utilities/Platform.flow.js +++ b/packages/react-native/Libraries/Utilities/Platform.flow.js @@ -32,7 +32,7 @@ type IOSPlatform = { major: number, minor: number, patch: number, - prerelease: ?string, + prerelease: ?number, |}, systemName: string, |}, @@ -60,7 +60,7 @@ type AndroidPlatform = { major: number, minor: number, patch: number, - prerelease: ?string, + prerelease: ?number, |}, Version: number, Release: string, diff --git a/packages/react-native/Libraries/Utilities/Platform.ios.js b/packages/react-native/Libraries/Utilities/Platform.ios.js index 7ea9cb4f244d..53371634e7d9 100644 --- a/packages/react-native/Libraries/Utilities/Platform.ios.js +++ b/packages/react-native/Libraries/Utilities/Platform.ios.js @@ -34,7 +34,7 @@ const Platform: PlatformType = { major: number, minor: number, patch: number, - prerelease: ?string, + prerelease: ?number, |}, systemName: string, |} { From 047f645079544ff76124b7d0fe5059e4cde14c06 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 3 Oct 2023 14:35:40 -0400 Subject: [PATCH 025/190] Fix typings for ReactNativeVersionCheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applies correct fix for `_formatVersion` misalignment — based on #36657. --- .../react-native/Libraries/Core/ReactNativeVersionCheck.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js b/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js index 8b41988696d6..a9e1bc4b1f66 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js @@ -40,7 +40,9 @@ exports.checkVersions = function checkVersions(): void { }; function _formatVersion( - version: (typeof Platform)['constants']['reactNativeVersion'], + version: + | (typeof Platform)['constants']['reactNativeVersion'] + | {major: number, minor: number, patch: number, prerelease: ?string}, ): string { return ( `${version.major}.${version.minor}.${version.patch}` + From e5bf39cf85f78ae380ab5d17c8881e385e567636 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 3 Oct 2023 15:04:22 -0400 Subject: [PATCH 026/190] Fix start command exit behaviour This is an eager cherry pick of #39788 for `0.73-stable`. --- .../src/commands/start/attachKeyHandlers.js | 17 ++++------------- .../src/commands/start/runServer.js | 1 - 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js index 7ac9a6cffbc7..d33505ccb8d3 100644 --- a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js +++ b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js @@ -15,7 +15,6 @@ import {logger} from '@react-native-community/cli-tools'; import chalk from 'chalk'; import execa from 'execa'; import fetch from 'node-fetch'; -import readline from 'readline'; import {KeyPressHandler} from '../../utils/KeyPressHandler'; const CTRL_C = '\u0003'; @@ -23,13 +22,11 @@ const CTRL_D = '\u0004'; export default function attachKeyHandlers({ cliConfig, - serverInstance, devServerUrl, messageSocket, }: { cliConfig: Config, devServerUrl: string, - serverInstance: http$Server | https$Server, messageSocket: $ReadOnly<{ broadcast: (type: string, params?: Record | null) => void, ... @@ -40,10 +37,6 @@ export default function attachKeyHandlers({ return; } - readline.emitKeypressEvents(process.stdin); - // $FlowIgnore[prop-missing] - process.stdin.setRawMode(true); - const execaOptions = { env: {FORCE_COLOR: chalk.supportsColor ? 'true' : 'false'}, }; @@ -88,16 +81,14 @@ export default function attachKeyHandlers({ case CTRL_C: case CTRL_D: logger.info('Stopping server'); - listener?.({pause: true}); - serverInstance.close(() => { - process.emit('SIGINT'); - process.exit(); - }); + keyPressHandler.stopInterceptingKeyStrokes(); + process.emit('SIGINT'); + process.exit(); } }; const keyPressHandler = new KeyPressHandler(onPress); - const listener = keyPressHandler.createInteractionListener(); + keyPressHandler.createInteractionListener(); keyPressHandler.startInterceptingKeyStrokes(); logger.log( diff --git a/packages/community-cli-plugin/src/commands/start/runServer.js b/packages/community-cli-plugin/src/commands/start/runServer.js index 587f755501c6..a7cc82a9b5c7 100644 --- a/packages/community-cli-plugin/src/commands/start/runServer.js +++ b/packages/community-cli-plugin/src/commands/start/runServer.js @@ -137,7 +137,6 @@ async function runServer( attachKeyHandlers({ cliConfig: ctx, devServerUrl, - serverInstance, messageSocket: messageSocketEndpoint, }); } From 50f242e4d71c63982e79812c0977600042f191ee Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 3 Oct 2023 15:11:23 -0400 Subject: [PATCH 027/190] Bump package versions #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 2 +- packages/react-native/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index d0b1edffffd7..af6e593fe720 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.5", + "version": "0.73.6", "description": "Core CLI commands for React Native", "keywords": [ "react-native", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index fa5de843b32e..5bdcaba46168 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,7 +97,7 @@ "@react-native-community/cli-platform-android": "12.0.0-alpha.17", "@react-native-community/cli-platform-ios": "12.0.0-alpha.17", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.5", + "@react-native/community-cli-plugin": "^0.73.6", "@react-native/codegen": "^0.73.1", "@react-native/gradle-plugin": "^0.73.1", "@react-native/js-polyfills": "^0.73.1", @@ -148,4 +148,4 @@ } ] } -} \ No newline at end of file +} From 725b1c9a7ea1a8132b60e3d5ba345798e1ea0114 Mon Sep 17 00:00:00 2001 From: Distiller Date: Tue, 3 Oct 2023 20:23:12 +0000 Subject: [PATCH 028/190] [0.73.0-rc.1] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- .../react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 9b22cf2dd06e..0921b1e49200 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.0', + prerelease: 'rc.1', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index ee1761c3e06f..f6203d377fb9 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.0", + RCTVersionPrerelease: @"rc.1", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 7c8609f15d3b..902b155fb971 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.0 +VERSION_NAME=0.73.0-rc.1 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 5c7e0847bbbe..952226f2a254 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.0"); + "prerelease", "rc.1"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index d3af879148d1..0c98e9a102b2 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.0"; + std::string_view Prerelease = "rc.1"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 5bdcaba46168..0d026d5139bf 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.0", + "version": "0.73.0-rc.1", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 6c329d42c4f4..1b170ea16441 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.0" + "react-native": "0.73.0-rc.1" }, "devDependencies": { "@babel/core": "^7.20.0", From 8eec3952689cc541e7e217914b38476ca0d7377a Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Wed, 4 Oct 2023 10:20:44 +0200 Subject: [PATCH 029/190] Revert "[0.73.0-rc.1] Bump version numbers" This reverts commit 725b1c9a7ea1a8132b60e3d5ba345798e1ea0114. --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- .../react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 0921b1e49200..9b22cf2dd06e 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.1', + prerelease: 'rc.0', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index f6203d377fb9..ee1761c3e06f 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.1", + RCTVersionPrerelease: @"rc.0", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 902b155fb971..7c8609f15d3b 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.1 +VERSION_NAME=0.73.0-rc.0 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 952226f2a254..5c7e0847bbbe 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.1"); + "prerelease", "rc.0"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 0c98e9a102b2..d3af879148d1 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.1"; + std::string_view Prerelease = "rc.0"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 0d026d5139bf..5bdcaba46168 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.1", + "version": "0.73.0-rc.0", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} \ No newline at end of file +} diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 1b170ea16441..6c329d42c4f4 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.1" + "react-native": "0.73.0-rc.0" }, "devDependencies": { "@babel/core": "^7.20.0", From 032706790a3865958330865916c1cb90ae738b5e Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 4 Oct 2023 09:22:14 +0100 Subject: [PATCH 030/190] Make jobs required for hermes to run on tagged builds (#39800) --- .circleci/configurations/workflows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/configurations/workflows.yml b/.circleci/configurations/workflows.yml index 4b346cb78fa4..be128b7d0af8 100644 --- a/.circleci/configurations/workflows.yml +++ b/.circleci/configurations/workflows.yml @@ -43,6 +43,7 @@ workflows: requires: - prepare_hermes_workspace - build_apple_slices_hermes: + filters: *only_release_tags requires: - build_hermesc_apple matrix: @@ -54,6 +55,7 @@ workflows: requires: - prepare_hermes_workspace - build_hermes_macos: + filters: *only_release_tags requires: - build_apple_slices_hermes matrix: From e8f41ce48b4a0f72aed4beca3d0db37a370d8215 Mon Sep 17 00:00:00 2001 From: Distiller Date: Wed, 4 Oct 2023 08:37:43 +0000 Subject: [PATCH 031/190] [0.73.0-rc.1] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- .../react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 9b22cf2dd06e..0921b1e49200 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.0', + prerelease: 'rc.1', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index ee1761c3e06f..f6203d377fb9 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.0", + RCTVersionPrerelease: @"rc.1", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 7c8609f15d3b..902b155fb971 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.0 +VERSION_NAME=0.73.0-rc.1 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 5c7e0847bbbe..952226f2a254 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.0"); + "prerelease", "rc.1"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index d3af879148d1..0c98e9a102b2 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.0"; + std::string_view Prerelease = "rc.1"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 5bdcaba46168..0d026d5139bf 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.0", + "version": "0.73.0-rc.1", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 6c329d42c4f4..1b170ea16441 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.0" + "react-native": "0.73.0-rc.1" }, "devDependencies": { "@babel/core": "^7.20.0", From 82a52a1939d6f3b68aec47bf241cf1951f340007 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 3 Oct 2023 13:24:09 -0700 Subject: [PATCH 032/190] Fix broken Loading/Refreshing indicator on Android Summary: The Loading.../Refreshing... indicator is currently broken on Android. The reason is related to D42599220 We used to have a Toast shown to users on Android as a fallback, but as the DevLoadingView is not always loaded as a module in the core package, this ends up in the banner never beign shown to the user (on RN Tester or template apps). Changelog: [Android] [Fixed] - Fix broken Loading/Refreshing indicator on Android Reviewed By: cipolleschi Differential Revision: D49876757 fbshipit-source-id: 400e002327ebca908e3e7a7f81c5066888ac4e9b --- .../main/java/com/facebook/react/shell/MainReactPackage.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java index 860fb362be4c..c6b95d08f556 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java @@ -26,6 +26,7 @@ import com.facebook.react.modules.blob.FileReaderModule; import com.facebook.react.modules.camera.ImageStoreManager; import com.facebook.react.modules.clipboard.ClipboardModule; +import com.facebook.react.modules.devloading.DevLoadingModule; import com.facebook.react.modules.devtoolssettings.DevToolsSettingsManagerModule; import com.facebook.react.modules.dialog.DialogModule; import com.facebook.react.modules.fresco.FrescoModule; @@ -73,6 +74,7 @@ AppearanceModule.class, AppStateModule.class, BlobModule.class, + DevLoadingModule.class, FileReaderModule.class, ClipboardModule.class, DialogModule.class, @@ -114,6 +116,8 @@ public MainReactPackage(MainPackageConfig config) { return new AppStateModule(context); case BlobModule.NAME: return new BlobModule(context); + case DevLoadingModule.NAME: + return new DevLoadingModule(context); case FileReaderModule.NAME: return new FileReaderModule(context); case ClipboardModule.NAME: @@ -260,6 +264,7 @@ public ReactModuleInfoProvider getReactModuleInfoProvider() { AppearanceModule.class, AppStateModule.class, BlobModule.class, + DevLoadingModule.class, FileReaderModule.class, ClipboardModule.class, DialogModule.class, From 7a4a0c4984bc6f13709312a65fb8bf5693d10b48 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 5 Oct 2023 06:29:49 -0700 Subject: [PATCH 033/190] Remove unneeded write to .version file (#39807) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39807 We used to need this file so that we could read the react native version when [creating Hermes artifacts](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R1507). Originally, that change was introduced [here](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47) Despite the fact that that approach was wrong, as we already have the right version in the package.json which is guaranteed to be present, a lot has changed since then and we don't need that file anymore. ## Changelog: [Internal] - Remove lines that write a .version file while releasing on npm Reviewed By: lunaleaps Differential Revision: D49909718 fbshipit-source-id: bd23d6d73001d0b58bf6b0321ed6d4ceb3523e7a --- scripts/publish-npm.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/publish-npm.js b/scripts/publish-npm.js index 7fb72bc557fb..1c78f5bd3b9c 100755 --- a/scripts/publish-npm.js +++ b/scripts/publish-npm.js @@ -81,10 +81,6 @@ function publishNpm(buildType) { generateAndroidArtifacts(version); - // Write version number to the build folder - const versionFile = path.join('build', '.version'); - fs.writeFileSync(versionFile, version); - if (buildType === 'dry-run') { echo('Skipping `npm publish` because --dry-run is set.'); return exit(0); From d247b61f78ff0c67862aacd5df04bee5c5e7a960 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Mon, 2 Oct 2023 11:10:33 -0700 Subject: [PATCH 034/190] Default to native view configs in bridged mode and to static view configs in bridgeless mode (#39704) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39704 Default to native view configs in bridged mode and to static view configs in bridgeless mode. Remove `setRuntimeConfigProvider` calls from RNTester and from the Template. Changelog: [Internal] Reviewed By: RSNara Differential Revision: D49687252 fbshipit-source-id: 140e1c510ba3fbc153978b59c8bb4b4e35bc7571 --- .../NativeComponent/NativeComponentRegistry.js | 14 ++++++++++---- packages/react-native/template/index.js | 9 --------- packages/rn-tester/js/RNTesterAppShared.js | 9 --------- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js b/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js index ace5eb38e605..46dab04b7723 100644 --- a/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js +++ b/packages/react-native/Libraries/NativeComponent/NativeComponentRegistry.js @@ -55,14 +55,20 @@ export function get( ): HostComponent { ReactNativeViewConfigRegistry.register(name, () => { const {native, strict, verify} = getRuntimeConfig?.(name) ?? { - native: true, + native: !global.RN$Bridgeless, strict: false, verify: false, }; - const viewConfig = native - ? getNativeComponentAttributes(name) - : createViewConfig(viewConfigProvider()); + let viewConfig; + if (native) { + viewConfig = getNativeComponentAttributes(name); + } else { + viewConfig = createViewConfig(viewConfigProvider()); + if (viewConfig == null) { + viewConfig = getNativeComponentAttributes(name); + } + } if (verify) { const nativeViewConfig = native diff --git a/packages/react-native/template/index.js b/packages/react-native/template/index.js index cd33b74bb3aa..a850d031de79 100644 --- a/packages/react-native/template/index.js +++ b/packages/react-native/template/index.js @@ -6,13 +6,4 @@ import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; -if (global.RN$Bridgeless) { - require('react-native/Libraries/NativeComponent/NativeComponentRegistry').setRuntimeConfigProvider( - name => { - // In bridgeless mode, never load native ViewConfig. - return {native: false, strict: false, verify: false}; - }, - ); -} - AppRegistry.registerComponent(appName, () => App); diff --git a/packages/rn-tester/js/RNTesterAppShared.js b/packages/rn-tester/js/RNTesterAppShared.js index 0949aafca08d..3cd8e9d9afad 100644 --- a/packages/rn-tester/js/RNTesterAppShared.js +++ b/packages/rn-tester/js/RNTesterAppShared.js @@ -29,15 +29,6 @@ import {BackHandler, StyleSheet, View, useColorScheme} from 'react-native'; // RNTester App currently uses in memory storage for storing navigation state -if (global.RN$Bridgeless) { - require('react-native/Libraries/NativeComponent/NativeComponentRegistry').setRuntimeConfigProvider( - name => { - // In bridgeless mode, never load native ViewConfig. - return {native: false, strict: false, verify: false}; - }, - ); -} - const RNTesterApp = (): React.Node => { const [state, dispatch] = React.useReducer( RNTesterNavigationReducer, From 7f72275567fde8a641e77534511ac2322d56dff4 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 5 Oct 2023 04:42:30 -0700 Subject: [PATCH 035/190] Fix Gemfile, setting Active support to < 7.1.0 (#39828) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39828 Active Suppert released a new Gem which is incompatible with Cocoapods 1.13.0, the latest release, as they removed a method used by cocoapods. This fix ensures that we install compatible versions of the Gem. ## Changelog: [iOS][Fixed] - Set the max version of Active support to 7.0.8 Reviewed By: hoxyq Differential Revision: D49949782 fbshipit-source-id: 278097502d3a416567cc8c0b90090fee4fb21503 --- Gemfile | 2 +- packages/react-native/template/Gemfile | 3 ++- packages/rn-tester/Gemfile | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index faa58ba5d928..1f6572542434 100644 --- a/Gemfile +++ b/Gemfile @@ -4,4 +4,4 @@ source 'https://rubygems.org' ruby ">= 2.6.10" gem 'cocoapods', '~> 1.12' -gem 'activesupport', '>= 6.1.7.3' +gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/packages/react-native/template/Gemfile b/packages/react-native/template/Gemfile index 1fa2c2e1abde..6a7d5c7a49c3 100644 --- a/packages/react-native/template/Gemfile +++ b/packages/react-native/template/Gemfile @@ -3,4 +3,5 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" -gem 'cocoapods', '~> 1.12' +gem 'cocoapods', '~> 1.13' +gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/packages/rn-tester/Gemfile b/packages/rn-tester/Gemfile index a66fd6c04cbc..4de6c10e5d6d 100644 --- a/packages/rn-tester/Gemfile +++ b/packages/rn-tester/Gemfile @@ -3,3 +3,4 @@ source 'https://rubygems.org' gem 'cocoapods', '~> 1.12' gem 'rexml' +gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' From ee6ff7a53e0f15a3768021fd4a74cb0c8f414bd2 Mon Sep 17 00:00:00 2001 From: Nishan Date: Thu, 5 Oct 2023 16:22:03 -0700 Subject: [PATCH 036/190] fix: view flips on RTL with new transform origin changes in Paper arch. (#39803) Summary: Fixes - https://github.com/facebook/react-native/pull/38626#issuecomment-1745528706. Explained the issue [here](https://github.com/facebook/react-native/pull/38626#issuecomment-1747212113). ## Changelog: [IOS] [FIXED] - View flips horizontally in paper arch on RTL Pull Request resolved: https://github.com/facebook/react-native/pull/39803 Test Plan: Run RNTester in Paper mode on iOS Reviewed By: NickGerleman Differential Revision: D49952227 Pulled By: lunaleaps fbshipit-source-id: 7240552e499765859dceea0a0406561cc3a3148f --- .../react-native/React/Views/UIView+React.m | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/packages/react-native/React/Views/UIView+React.m b/packages/react-native/React/Views/UIView+React.m index 5268b638536b..2ee2c500ddb7 100644 --- a/packages/react-native/React/Views/UIView+React.m +++ b/packages/react-native/React/Views/UIView+React.m @@ -204,7 +204,10 @@ - (void)reactSetFrame:(CGRect)frame self.center = position; self.bounds = bounds; - updateTransform(self); + id transformOrigin = objc_getAssociatedObject(self, @selector(reactTransformOrigin)); + if (transformOrigin) { + updateTransform(self); + } } #pragma mark - Transforms @@ -242,31 +245,35 @@ - (void)setReactTransformOrigin:(RCTTransformOrigin)reactTransformOrigin static void updateTransform(UIView *view) { - CGSize size = view.bounds.size; - RCTTransformOrigin transformOrigin = view.reactTransformOrigin; - - CGFloat anchorPointX = 0; - CGFloat anchorPointY = 0; - CGFloat anchorPointZ = 0; - - if (transformOrigin.x.unit == YGUnitPoint) { - anchorPointX = transformOrigin.x.value - size.width * 0.5; - } else if (transformOrigin.x.unit == YGUnitPercent) { - anchorPointX = (transformOrigin.x.value * 0.01 - 0.5) * size.width; - } + CATransform3D transform; + id rawTansformOrigin = objc_getAssociatedObject(view, @selector(reactTransformOrigin)); + if (rawTansformOrigin) { + CGSize size = view.bounds.size; + CGFloat anchorPointX = 0; + CGFloat anchorPointY = 0; + CGFloat anchorPointZ = 0; + RCTTransformOrigin transformOrigin; + [rawTansformOrigin getValue:&transformOrigin]; + if (transformOrigin.x.unit == YGUnitPoint) { + anchorPointX = transformOrigin.x.value - size.width * 0.5; + } else if (transformOrigin.x.unit == YGUnitPercent) { + anchorPointX = (transformOrigin.x.value * 0.01 - 0.5) * size.width; + } - if (transformOrigin.y.unit == YGUnitPoint) { - anchorPointY = transformOrigin.y.value - size.height * 0.5; - } else if (transformOrigin.y.unit == YGUnitPercent) { - anchorPointY = (transformOrigin.y.value * 0.01 - 0.5) * size.height; + if (transformOrigin.y.unit == YGUnitPoint) { + anchorPointY = transformOrigin.y.value - size.height * 0.5; + } else if (transformOrigin.y.unit == YGUnitPercent) { + anchorPointY = (transformOrigin.y.value * 0.01 - 0.5) * size.height; + } + anchorPointZ = transformOrigin.z; + transform = CATransform3DConcat( + view.reactTransform, CATransform3DMakeTranslation(anchorPointX, anchorPointY, anchorPointZ)); + transform = + CATransform3DConcat(CATransform3DMakeTranslation(-anchorPointX, -anchorPointY, -anchorPointZ), transform); + } else { + transform = view.reactTransform; } - anchorPointZ = transformOrigin.z; - - CATransform3D transform = CATransform3DMakeTranslation(anchorPointX, anchorPointY, anchorPointZ); - transform = CATransform3DConcat(view.reactTransform, transform); - transform = CATransform3DTranslate(transform, -anchorPointX, -anchorPointY, -anchorPointZ); - view.layer.transform = transform; // Enable edge antialiasing in rotation, skew, or perspective transforms view.layer.allowsEdgeAntialiasing = transform.m12 != 0.0f || transform.m21 != 0.0f || transform.m34 != 0.0f; From 3ba5e4f89c96a463babfb45d32cde0fa29c262b7 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Thu, 5 Oct 2023 21:35:01 -0700 Subject: [PATCH 037/190] [iOS] Deprecate RCTGetMultiplierForContentSizeCategory (#39785) --- packages/react-native/React/UIUtils/RCTUIUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/UIUtils/RCTUIUtils.h b/packages/react-native/React/UIUtils/RCTUIUtils.h index 8fd1850fb73a..addf12e406a3 100644 --- a/packages/react-native/React/UIUtils/RCTUIUtils.h +++ b/packages/react-native/React/UIUtils/RCTUIUtils.h @@ -25,7 +25,7 @@ extern __attribute__((visibility("default"))) RCTDimensions RCTGetDimensions(CGF // Get font size multiplier for font base size (Large) by content size category extern __attribute__((visibility("default"))) CGFloat RCTGetMultiplierForContentSizeCategory( - UIContentSizeCategory category); + UIContentSizeCategory category) __deprecated; #ifdef __cplusplus } From 8e5439f1a736bc23d366256316d80de267ce0179 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Mon, 2 Oct 2023 10:40:28 -0700 Subject: [PATCH 038/190] Set hermes for Android template project in testing Summary: Changelog: [Internal] - Set the hermes value as specified by the test-e2e-local script flag. Right now, the script incorrectly ignores the flag By default, the template project has `hermesEnabled=true` Reviewed By: cipolleschi Differential Revision: D49831355 fbshipit-source-id: 7fb8613fa86f2c6140b7d25b16aeb583e6e26c12 --- scripts/test-e2e-local.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/test-e2e-local.js b/scripts/test-e2e-local.js index 1806d650a0f5..63f76324b69a 100644 --- a/scripts/test-e2e-local.js +++ b/scripts/test-e2e-local.js @@ -252,6 +252,16 @@ async function testRNTestProject(circleCIArtifacts) { `echo "react.internal.mavenLocalRepo=${mavenLocalPath}" >> android/gradle.properties`, ); + // Update gradle properties to set Hermes as false + if (!argv.hermes) { + sed( + '-i', + 'hermesEnabled=true', + 'hermesEnabled=false', + 'android/gradle.properties', + ); + } + // doing the pod install here so that it's easier to play around RNTestProject cd('ios'); exec('bundle install'); From a52faa6fabb821b82e740dfef28292a6a52f88bf Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Fri, 6 Oct 2023 09:30:04 -0700 Subject: [PATCH 039/190] fix missing sed import --- scripts/test-e2e-local.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-e2e-local.js b/scripts/test-e2e-local.js index 63f76324b69a..3346c59e1441 100644 --- a/scripts/test-e2e-local.js +++ b/scripts/test-e2e-local.js @@ -16,7 +16,7 @@ * and to make it more accessible for other devs to play around with. */ -const {exec, pushd, popd, pwd, cd} = require('shelljs'); +const {exec, pushd, popd, pwd, cd, sed} = require('shelljs'); const updateTemplatePackage = require('./update-template-package'); const yargs = require('yargs'); const path = require('path'); From b4bc816fcd07cc518a288010a4893b0c81cd1d29 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Fri, 6 Oct 2023 10:22:03 -0700 Subject: [PATCH 040/190] Update pod for CI --- packages/rn-tester/Podfile.lock | 966 ++++++++++-------- .../RNTesterPods.xcodeproj/project.pbxproj | 4 + 2 files changed, 534 insertions(+), 436 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 04099ff8ef26..c169d814d563 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1,27 +1,79 @@ PODS: - boost (1.83.0) + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.0) - - FBReactNativeSpec (0.73.0-rc.0): + - FBLazyVector (0.73.0-rc.1) + - FBReactNativeSpec (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Core (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) + - React-Core (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - Flipper (0.201.0): + - Flipper-Folly (~> 2.6) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (3.2.0.1) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.10): + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) + - Flipper-Glog + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - Flipper-Glog (0.5.0.5) + - Flipper-PeerTalk (0.0.4) + - FlipperKit (0.201.0): + - FlipperKit/Core (= 0.201.0) + - FlipperKit/Core (0.201.0): + - Flipper (~> 0.201.0) + - FlipperKit/CppBridge + - FlipperKit/FBCxxFollyDynamicConvert + - FlipperKit/FBDefines + - FlipperKit/FKPortForwarding + - SocketRocket (~> 0.6.0) + - FlipperKit/CppBridge (0.201.0): + - Flipper (~> 0.201.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.201.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.201.0) + - FlipperKit/FKPortForwarding (0.201.0): + - CocoaAsyncSocket (~> 7.6) + - Flipper-PeerTalk (~> 0.0.4) + - FlipperKit/FlipperKitHighlightOverlay (0.201.0) + - FlipperKit/FlipperKitLayoutHelpers (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0) + - FlipperKit/FlipperKitNetworkPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/SKIOSNetworkPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.0): - - hermes-engine/Hermes (= 0.73.0-rc.0) - - hermes-engine/inspector (= 0.73.0-rc.0) - - hermes-engine/inspector_chrome (= 0.73.0-rc.0) - - hermes-engine/Public (= 0.73.0-rc.0) - - hermes-engine/Hermes (0.73.0-rc.0) - - hermes-engine/inspector (0.73.0-rc.0) - - hermes-engine/inspector_chrome (0.73.0-rc.0) - - hermes-engine/Public (0.73.0-rc.0) + - hermes-engine (0.73.0-rc.1): + - hermes-engine/Pre-built (= 0.73.0-rc.1) + - hermes-engine/Pre-built (0.73.0-rc.1) - libevent (2.1.12) - OCMock (3.9.1) + - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): - boost - DoubleConversion @@ -44,26 +96,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.0) - - RCTTypeSafety (0.73.0-rc.0): - - FBLazyVector (= 0.73.0-rc.0) - - RCTRequired (= 0.73.0-rc.0) - - React-Core (= 0.73.0-rc.0) - - React (0.73.0-rc.0): - - React-Core (= 0.73.0-rc.0) - - React-Core/DevSupport (= 0.73.0-rc.0) - - React-Core/RCTWebSocket (= 0.73.0-rc.0) - - React-RCTActionSheet (= 0.73.0-rc.0) - - React-RCTAnimation (= 0.73.0-rc.0) - - React-RCTBlob (= 0.73.0-rc.0) - - React-RCTImage (= 0.73.0-rc.0) - - React-RCTLinking (= 0.73.0-rc.0) - - React-RCTNetwork (= 0.73.0-rc.0) - - React-RCTSettings (= 0.73.0-rc.0) - - React-RCTText (= 0.73.0-rc.0) - - React-RCTVibration (= 0.73.0-rc.0) - - React-callinvoker (0.73.0-rc.0) - - React-Codegen (0.73.0-rc.0): + - RCTRequired (0.73.0-rc.1) + - RCTTypeSafety (0.73.0-rc.1): + - FBLazyVector (= 0.73.0-rc.1) + - RCTRequired (= 0.73.0-rc.1) + - React-Core (= 0.73.0-rc.1) + - React (0.73.0-rc.1): + - React-Core (= 0.73.0-rc.1) + - React-Core/DevSupport (= 0.73.0-rc.1) + - React-Core/RCTWebSocket (= 0.73.0-rc.1) + - React-RCTActionSheet (= 0.73.0-rc.1) + - React-RCTAnimation (= 0.73.0-rc.1) + - React-RCTBlob (= 0.73.0-rc.1) + - React-RCTImage (= 0.73.0-rc.1) + - React-RCTLinking (= 0.73.0-rc.1) + - React-RCTNetwork (= 0.73.0-rc.1) + - React-RCTSettings (= 0.73.0-rc.1) + - React-RCTText (= 0.73.0-rc.1) + - React-RCTVibration (= 0.73.0-rc.1) + - React-callinvoker (0.73.0-rc.1) + - React-Codegen (0.73.0-rc.1): - DoubleConversion - FBReactNativeSpec - glog @@ -83,11 +135,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.0): + - React-Core (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) + - React-Core/Default (= 0.73.0-rc.1) - React-cxxreact - React-hermes - React-jsi @@ -97,7 +149,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.0): + - React-Core/CoreModulesHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -111,7 +163,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/Default (0.73.0-rc.0): + - React-Core/Default (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -124,23 +176,23 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/DevSupport (0.73.0-rc.0): + - React-Core/DevSupport (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) - - React-Core/RCTWebSocket (= 0.73.0-rc.0) + - React-Core/Default (= 0.73.0-rc.1) + - React-Core/RCTWebSocket (= 0.73.0-rc.1) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.0) + - React-jsinspector (= 0.73.0-rc.1) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.0): + - React-Core/RCTActionSheetHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -154,7 +206,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.0): + - React-Core/RCTAnimationHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -168,7 +220,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.0): + - React-Core/RCTBlobHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -182,7 +234,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.0): + - React-Core/RCTImageHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -196,7 +248,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.0): + - React-Core/RCTLinkingHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -210,7 +262,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.0): + - React-Core/RCTNetworkHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -224,7 +276,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0-rc.0): + - React-Core/RCTPushNotificationHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -238,7 +290,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.0): + - React-Core/RCTSettingsHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -252,7 +304,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.0): + - React-Core/RCTTextHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -266,7 +318,7 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.0): + - React-Core/RCTVibrationHeaders (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -280,11 +332,11 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.0): + - React-Core/RCTWebSocket (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) + - React-Core/Default (= 0.73.0-rc.1) - React-cxxreact - React-hermes - React-jsi @@ -294,588 +346,588 @@ PODS: - React-utils - SocketRocket (= 0.6.0) - Yoga - - React-CoreModules (0.73.0-rc.0): + - React-CoreModules (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/CoreModulesHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) + - RCTTypeSafety (= 0.73.0-rc.1) + - React-Codegen (= 0.73.0-rc.1) + - React-Core/CoreModulesHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - React-RCTImage (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) - SocketRocket (= 0.6.0) - - React-cxxreact (0.73.0-rc.0): + - React-cxxreact (0.73.0-rc.1): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.0) - - React-debug (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsinspector (= 0.73.0-rc.0) - - React-logger (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - React-runtimeexecutor (= 0.73.0-rc.0) - - React-debug (0.73.0-rc.0) - - React-Fabric (0.73.0-rc.0): + - React-callinvoker (= 0.73.0-rc.1) + - React-debug (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsinspector (= 0.73.0-rc.1) + - React-logger (= 0.73.0-rc.1) + - React-perflogger (= 0.73.0-rc.1) + - React-runtimeexecutor (= 0.73.0-rc.1) + - React-debug (0.73.0-rc.1) + - React-Fabric (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.0) - - React-Fabric/attributedstring (= 0.73.0-rc.0) - - React-Fabric/componentregistry (= 0.73.0-rc.0) - - React-Fabric/componentregistrynative (= 0.73.0-rc.0) - - React-Fabric/components (= 0.73.0-rc.0) - - React-Fabric/core (= 0.73.0-rc.0) - - React-Fabric/imagemanager (= 0.73.0-rc.0) - - React-Fabric/leakchecker (= 0.73.0-rc.0) - - React-Fabric/mounting (= 0.73.0-rc.0) - - React-Fabric/scheduler (= 0.73.0-rc.0) - - React-Fabric/telemetry (= 0.73.0-rc.0) - - React-Fabric/templateprocessor (= 0.73.0-rc.0) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.0) - - React-Fabric/uimanager (= 0.73.0-rc.0) - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-Fabric/animations (= 0.73.0-rc.1) + - React-Fabric/attributedstring (= 0.73.0-rc.1) + - React-Fabric/componentregistry (= 0.73.0-rc.1) + - React-Fabric/componentregistrynative (= 0.73.0-rc.1) + - React-Fabric/components (= 0.73.0-rc.1) + - React-Fabric/core (= 0.73.0-rc.1) + - React-Fabric/imagemanager (= 0.73.0-rc.1) + - React-Fabric/leakchecker (= 0.73.0-rc.1) + - React-Fabric/mounting (= 0.73.0-rc.1) + - React-Fabric/scheduler (= 0.73.0-rc.1) + - React-Fabric/telemetry (= 0.73.0-rc.1) + - React-Fabric/templateprocessor (= 0.73.0-rc.1) + - React-Fabric/textlayoutmanager (= 0.73.0-rc.1) + - React-Fabric/uimanager (= 0.73.0-rc.1) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/animations (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/animations (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/attributedstring (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/attributedstring (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/componentregistry (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/componentregistry (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/componentregistrynative (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/componentregistrynative (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.0) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.0) - - React-Fabric/components/modal (= 0.73.0-rc.0) - - React-Fabric/components/rncore (= 0.73.0-rc.0) - - React-Fabric/components/root (= 0.73.0-rc.0) - - React-Fabric/components/safeareaview (= 0.73.0-rc.0) - - React-Fabric/components/scrollview (= 0.73.0-rc.0) - - React-Fabric/components/text (= 0.73.0-rc.0) - - React-Fabric/components/textinput (= 0.73.0-rc.0) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.0) - - React-Fabric/components/view (= 0.73.0-rc.0) - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-Fabric/components/inputaccessory (= 0.73.0-rc.1) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.1) + - React-Fabric/components/modal (= 0.73.0-rc.1) + - React-Fabric/components/rncore (= 0.73.0-rc.1) + - React-Fabric/components/root (= 0.73.0-rc.1) + - React-Fabric/components/safeareaview (= 0.73.0-rc.1) + - React-Fabric/components/scrollview (= 0.73.0-rc.1) + - React-Fabric/components/text (= 0.73.0-rc.1) + - React-Fabric/components/textinput (= 0.73.0-rc.1) + - React-Fabric/components/unimplementedview (= 0.73.0-rc.1) + - React-Fabric/components/view (= 0.73.0-rc.1) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/inputaccessory (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/inputaccessory (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/modal (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/modal (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/rncore (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/rncore (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/root (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/root (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/safeareaview (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/safeareaview (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/scrollview (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/scrollview (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/text (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/text (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/textinput (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/textinput (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/unimplementedview (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/unimplementedview (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/components/view (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/components/view (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) - Yoga - - React-Fabric/core (0.73.0-rc.0): + - React-Fabric/core (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/imagemanager (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/imagemanager (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/leakchecker (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/leakchecker (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/mounting (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/mounting (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/scheduler (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/scheduler (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/telemetry (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/telemetry (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/templateprocessor (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/templateprocessor (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/textlayoutmanager (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/textlayoutmanager (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - React-Fabric/uimanager - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-Fabric/uimanager (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-Fabric/uimanager (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-FabricImage (0.73.0-rc.0): + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-FabricImage (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.0) - - RCTTypeSafety (= 0.73.0-rc.0) + - RCTRequired (= 0.73.0-rc.1) + - RCTTypeSafety (= 0.73.0-rc.1) - React-Fabric - - React-graphics (= 0.73.0-rc.0) + - React-graphics (= 0.73.0-rc.1) - React-ImageManager - - React-jsi (= 0.73.0-rc.0) - - React-jsiexecutor (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.1) + - React-jsiexecutor (= 0.73.0-rc.1) - React-logger - React-rendererdebug - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) - Yoga - - React-graphics (0.73.0-rc.0): + - React-graphics (0.73.0-rc.1): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.0) + - React-Core/Default (= 0.73.0-rc.1) - React-utils - - React-hermes (0.73.0-rc.0): + - React-hermes (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.0) + - React-cxxreact (= 0.73.0-rc.1) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.0) - - React-jsinspector (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - React-ImageManager (0.73.0-rc.0): + - React-jsiexecutor (= 0.73.0-rc.1) + - React-jsinspector (= 0.73.0-rc.1) + - React-perflogger (= 0.73.0-rc.1) + - React-ImageManager (0.73.0-rc.1): - glog - RCT-Folly/Fabric - React-Core/Default @@ -884,33 +936,33 @@ PODS: - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.0): + - React-jserrorhandler (0.73.0-rc.1): - RCT-Folly/Fabric (= 2022.05.16.00) - - React-jsi (= 0.73.0-rc.0) + - React-jsi (= 0.73.0-rc.1) - React-Mapbuffer - - React-jsi (0.73.0-rc.0): + - React-jsi (0.73.0-rc.1): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.0): + - React-jsiexecutor (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - React-jsinspector (0.73.0-rc.0) - - React-logger (0.73.0-rc.0): + - React-cxxreact (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-perflogger (= 0.73.0-rc.1) + - React-jsinspector (0.73.0-rc.1) + - React-logger (0.73.0-rc.1): - glog - - React-Mapbuffer (0.73.0-rc.0): + - React-Mapbuffer (0.73.0-rc.1): - glog - React-debug - - React-nativeconfig (0.73.0-rc.0) - - React-NativeModulesApple (0.73.0-rc.0): + - React-nativeconfig (0.73.0-rc.1) + - React-NativeModulesApple (0.73.0-rc.1): - glog - hermes-engine - React-callinvoker @@ -920,17 +972,17 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.0) - - React-RCTActionSheet (0.73.0-rc.0): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.0) - - React-RCTAnimation (0.73.0-rc.0): + - React-perflogger (0.73.0-rc.1) + - React-RCTActionSheet (0.73.0-rc.1): + - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.1) + - React-RCTAnimation (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTAnimationHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTAppDelegate (0.73.0-rc.0): + - RCTTypeSafety (= 0.73.0-rc.1) + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTAnimationHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTAppDelegate (0.73.0-rc.1): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -944,89 +996,89 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon/turbomodule/core - - React-RCTBlob (0.73.0-rc.0): + - React-RCTBlob (0.73.0-rc.1): - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTBlobHeaders (= 0.73.0-rc.0) - - React-Core/RCTWebSocket (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-RCTNetwork (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTFabric (0.73.0-rc.0): + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTBlobHeaders (= 0.73.0-rc.1) + - React-Core/RCTWebSocket (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-RCTNetwork (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTFabric (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.0) + - React-Core (= 0.73.0-rc.1) - React-debug - - React-Fabric (= 0.73.0-rc.0) + - React-Fabric (= 0.73.0-rc.1) - React-FabricImage - React-graphics - React-ImageManager - React-nativeconfig - - React-RCTImage (= 0.73.0-rc.0) + - React-RCTImage (= 0.73.0-rc.1) - React-RCTText - React-rendererdebug - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.0): + - React-RCTImage (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTImageHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-RCTNetwork (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTLinking (0.73.0-rc.0): - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTNetwork (0.73.0-rc.0): + - RCTTypeSafety (= 0.73.0-rc.1) + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTImageHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-RCTNetwork (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTLinking (0.73.0-rc.1): + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTLinkingHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTNetwork (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTNetworkHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTPushNotification (0.73.0-rc.0): - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTSettings (0.73.0-rc.0): + - RCTTypeSafety (= 0.73.0-rc.1) + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTNetworkHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTPushNotification (0.73.0-rc.1): + - RCTTypeSafety (= 0.73.0-rc.1) + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTSettings (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.0) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTSettingsHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTTest (0.73.0-rc.0): + - RCTTypeSafety (= 0.73.0-rc.1) + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTSettingsHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTTest (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.0) - - React-CoreModules (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-RCTText (0.73.0-rc.0): - - React-Core/RCTTextHeaders (= 0.73.0-rc.0) + - React-Core (= 0.73.0-rc.1) + - React-CoreModules (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-RCTText (0.73.0-rc.1): + - React-Core/RCTTextHeaders (= 0.73.0-rc.1) - Yoga - - React-RCTVibration (0.73.0-rc.0): + - React-RCTVibration (0.73.0-rc.1): - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.0) - - React-Core/RCTVibrationHeaders (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (= 0.73.0-rc.0) - - React-rendererdebug (0.73.0-rc.0): + - React-Codegen (= 0.73.0-rc.1) + - React-Core/RCTVibrationHeaders (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (= 0.73.0-rc.1) + - React-rendererdebug (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.0) - - React-runtimeexecutor (0.73.0-rc.0): - - React-jsi (= 0.73.0-rc.0) - - React-runtimescheduler (0.73.0-rc.0): + - React-rncore (0.73.0-rc.1) + - React-runtimeexecutor (0.73.0-rc.1): + - React-jsi (= 0.73.0-rc.1) + - React-runtimescheduler (0.73.0-rc.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1036,11 +1088,11 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.0): + - React-utils (0.73.0-rc.1): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon-Samples (0.73.0-rc.0): + - ReactCommon-Samples (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1050,28 +1102,28 @@ PODS: - React-cxxreact - React-NativeModulesApple - ReactCommon/turbomodule/core - - ReactCommon/turbomodule/bridging (0.73.0-rc.0): + - ReactCommon/turbomodule/bridging (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.0) - - React-cxxreact (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-logger (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) - - ReactCommon/turbomodule/core (0.73.0-rc.0): + - React-callinvoker (= 0.73.0-rc.1) + - React-cxxreact (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-logger (= 0.73.0-rc.1) + - React-perflogger (= 0.73.0-rc.1) + - ReactCommon/turbomodule/core (0.73.0-rc.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.0) - - React-cxxreact (= 0.73.0-rc.0) - - React-jsi (= 0.73.0-rc.0) - - React-logger (= 0.73.0-rc.0) - - React-perflogger (= 0.73.0-rc.0) + - React-callinvoker (= 0.73.0-rc.1) + - React-cxxreact (= 0.73.0-rc.1) + - React-jsi (= 0.73.0-rc.1) + - React-logger (= 0.73.0-rc.1) + - React-perflogger (= 0.73.0-rc.1) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1084,10 +1136,31 @@ DEPENDENCIES: - DoubleConversion (from `../react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../react-native/React/FBReactNativeSpec`) + - Flipper (= 0.201.0) + - Flipper-Boost-iOSX (= 1.76.0.1.11) + - Flipper-DoubleConversion (= 3.2.0.1) + - Flipper-Fmt (= 7.1.7) + - Flipper-Folly (= 2.6.10) + - Flipper-Glog (= 0.5.0.5) + - Flipper-PeerTalk (= 0.0.4) + - FlipperKit (= 0.201.0) + - FlipperKit/Core (= 0.201.0) + - FlipperKit/CppBridge (= 0.201.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0) + - FlipperKit/FBDefines (= 0.201.0) + - FlipperKit/FKPortForwarding (= 0.201.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0) + - FlipperKit/FlipperKitReactPlugin (= 0.201.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.201.0) - glog (from `../react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) - OCMock (~> 3.9.1) + - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../react-native/Libraries/RCTRequired`) @@ -1096,6 +1169,7 @@ DEPENDENCIES: - React-callinvoker (from `../react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../react-native/`) + - React-Core/DevSupport (from `../react-native/`) - React-Core/RCTWebSocket (from `../react-native/`) - React-CoreModules (from `../react-native/React/CoreModules`) - React-cxxreact (from `../react-native/ReactCommon/cxxreact`) @@ -1139,9 +1213,19 @@ DEPENDENCIES: SPEC REPOS: trunk: + - CocoaAsyncSocket + - Flipper + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt + - Flipper-Folly + - Flipper-Glog + - Flipper-PeerTalk + - FlipperKit - fmt - libevent - OCMock + - OpenSSL-Universal - SocketRocket EXTERNAL SOURCES: @@ -1253,62 +1337,72 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: 5b5bb8db6bdeaec7080f7dc646d66d1369902283 - FBReactNativeSpec: 79c8793c90a8e9344ffee4e769c47a100538a3a1 + FBLazyVector: 9a9d75315cbe23be88db9231bd88babf7c389ee8 + FBReactNativeSpec: b3246bef010720045d6fce5949a88abfe1f07073 + Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: bb85be4531be6bc8aacedb305c1d5ad8ce4d5b3a + hermes-engine: b24ae28296a9986e5b3e9715522fb12f5ee64ff8 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 05c71aa2ba855c360ef8b88554012f289e18821b - RCTTypeSafety: 3185c277e69cf46ed540ff9d470efad9e8c00d95 - React: 7ca8f490e53bad01021e92ea9b9b96f280ee1d82 - React-callinvoker: a2273abe294f5a65440240f00884008619e2465a - React-Codegen: 15c5930fb361234dadc73ff2a46fae353dd45964 - React-Core: d33b39797efaa082534939f60a4e9531b65378c7 - React-CoreModules: f6f5c543444979d36a7b8af5babd207ec1a62ceb - React-cxxreact: 0444149506556bcdbb541fcb5e3edb4865024821 - React-debug: d790065e18d75489ffa1523f7f93512ce9715358 - React-Fabric: dc8e6717cd75c65efecb26ddc94560a9130df66d - React-FabricImage: f2a238bddd07e084f882eb2b574d762cc52dacd4 - React-graphics: 007e2c309a14d05278d1cae91a22ab4c53da7d94 - React-hermes: a6e5b2f21077aaacbc629b0dc005a2964c50c35c - React-ImageManager: 83bb1b8536617d5242aa3553e26d7458884758d3 - React-jserrorhandler: c1a7b9a8dc95add6fd497833694d9de1aa30f6dd - React-jsi: 69256285478a4fa555a729b88e52994786dc0aec - React-jsiexecutor: fbb1ab2a9a3884ab46e676ffe12bcf34be5aacc2 - React-jsinspector: 36909c72313cba211392b65485d8687aa945559e - React-logger: df2b54baee256688db3ed022755cb7e64d307668 - React-Mapbuffer: f1f5c6a1ad5efd84301db60269ca005c15e721ba - React-nativeconfig: f2363be7b42cc1ceaecfbec197ebe03d6b065565 - React-NativeModulesApple: 2c4b623655d8d3e1b80049d17e67609be6b45da7 - React-perflogger: 6d75814b485251fe860b7005c1cd15909b08fb5b - React-RCTActionSheet: cec21c49ecaf2491d616bfce0e466ed4cffde004 - React-RCTAnimation: 1100c352dda6b32139155ff865c4fa35d35572ae - React-RCTAppDelegate: e64f6d2da65439744dd5b44afadb762e303489ac - React-RCTBlob: 2b4db8095acc1e2256db398bc38270e31baa3fac - React-RCTFabric: 53d20a2374f6a4f79cd123b90d047ca1f1672086 - React-RCTImage: 4d89a0550098bca35939b877ddffa2a647fddfa6 - React-RCTLinking: 1345853b44a87087e1b5cd10d7943d6b27d615c5 - React-RCTNetwork: 01dcff90aa8081fa9b20aab213d135676bfac114 - React-RCTPushNotification: 7ac2cf8e78e6b08d3a58597dabdc1ccab3672df6 - React-RCTSettings: e9d22f362ec4d982a841c0f0f1231d2c8e0fa28e - React-RCTTest: c0f05dc5eec117a9f4986fbfbfcb6f930840378e - React-RCTText: 12d49894a4f8e249f2d2883de8fc49978040a29f - React-RCTVibration: b93f6838ec1801963783baa360ef8c0f785b3e34 - React-rendererdebug: c0916409c18e30f71fd19aba53ec6875049b3e6e - React-rncore: f522b10bf7c9766b190ba87b1ae0407290caf3a5 - React-runtimeexecutor: 038a523b032ecf43263534b75e66bf84a8b52447 - React-runtimescheduler: bb7d5ea12a65d8dbd7c6ceea5251065d2f10ae89 - React-utils: a6810f61d773a36b51d2ca4212eee13427ef7235 - ReactCommon: 3b92ec47e238d0e229fb654d143bc553860347a3 - ReactCommon-Samples: 38f375baeeaab65d59081bc69e009f89184b2443 + RCTRequired: ac2e0f6e0f1c711881e82e96a00fd29e15f241e2 + RCTTypeSafety: b602299ddcfcbadd1c7fbdc274c0c8ac784b9e36 + React: e426956adce10accf14e075a386f176d802a1c75 + React-callinvoker: 0a1a8e90d0461e6cbbfaf7c0912ede1da1d5e2a6 + React-Codegen: 1193c6013dcc36e560da6f69bbd5b37e192d2100 + React-Core: 523f1fecbc3927580a8e002094fda5d778f53fa7 + React-CoreModules: 76ebbbdee4e12a06c0a0ac69afc9d0801e757362 + React-cxxreact: 0ad37093704bbf08553f8fdcde40d0c5ed3496a6 + React-debug: 635224b4c0174bbf667eddbc0e360df884bb0505 + React-Fabric: ab44d543e1de5b13ff473d07009dd016a252d13d + React-FabricImage: e1da15f0615fad7dcfe15cf18abccedf53dff3cd + React-graphics: e5bd0450752e274c802c9b8e12fba79af8190748 + React-hermes: b6484c9bfa84331d329379af7640d4f79fe61e48 + React-ImageManager: 8d227188f90dd1c3a1048a80acecc804f6131aa3 + React-jserrorhandler: 7f159dae6b5bff4a0f5d825963d00664bb422460 + React-jsi: 76de6fa4ef5887183b9c1db79915a956436903ec + React-jsiexecutor: 885108f96c3cc1bb4dc288fc9b944eba2d302efe + React-jsinspector: 277c0e5373bebc456b96753d8e8ae9ebca7b5253 + React-logger: c5a4226446317bc3ffb6daca3e6e5e93b8474e50 + React-Mapbuffer: 523b3fde64bd653cede40cb16fa9d863c0a04338 + React-nativeconfig: b50b1ec033917eeea7508c804a7247b2fa2ef655 + React-NativeModulesApple: 901d317fa51ad2ebb1a2e58c3ff880f456277fdc + React-perflogger: dfd090c2798a32366a01744e3faee0ced4c1a8ba + React-RCTActionSheet: 1b642b27ec3457905d804f097a72ec94f312f576 + React-RCTAnimation: 83cd7f89e9a41f022bff7874dc29a4fe330f39b9 + React-RCTAppDelegate: 53fe17e28811ad52c807c2917734c42cfd1f78fe + React-RCTBlob: 351028dac97b4688e395f8c5f242d87beaf9445a + React-RCTFabric: afb8d45ec230c9e66bb9f67ea884add4ecc7fcc3 + React-RCTImage: c797f91aa86d697ff656f1940bdb4350ca944156 + React-RCTLinking: 82b3f5813ca717f2ee1edb09815d96e8d23f1cec + React-RCTNetwork: a19c3229953a23458d04dd0cd3f056ff36515f05 + React-RCTPushNotification: b503dbe20edb24f9e2bf7baf4bbad13a96f3226d + React-RCTSettings: eb837e43769e01eb299edce409a119ef5223a89f + React-RCTTest: 1930c0b7e508bcdc214a550a03978dd77adcac86 + React-RCTText: a90ba956f638a77878a5b9426a6a0857826b5a9a + React-RCTVibration: 0c9eb77aa5acdd53e16d16de7956b35bbf414c21 + React-rendererdebug: 3c86c10bcf78f0c8b0d06673bb863aea20b96eeb + React-rncore: 263a03535a87c8407dd45ccea7a1d975c44fb923 + React-runtimeexecutor: a3f7bc8b5d70fddd206f95b15fd49f9cac9da2d8 + React-runtimescheduler: c092559051cf033574f2621901208f2471a4b4fc + React-utils: 87419448d72da23dc1daa0b0dcce0e602ff7b8dd + ReactCommon: 84a2ac136c951dbf3451d9b9bfd0fde735a4c03f + ReactCommon-Samples: 305ef6cea3be0682c39f8e3c92a399b5095c429d ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: dbb39231806ac48d6b95e95b47d3e2170b5f06c9 + Yoga: a48b884adf810c10efed0eb2b4f8471bf3ed3fbe PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.13.0 +COCOAPODS: 1.12.1 diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj index ec0082dd9e3d..68261744016a 100644 --- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj +++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj @@ -943,6 +943,8 @@ OTHER_LDFLAGS = ( "-ObjC", "-lc++", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native"; SDKROOT = iphoneos; @@ -1027,6 +1029,8 @@ OTHER_LDFLAGS = ( "-ObjC", "-lc++", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native"; SDKROOT = iphoneos; From d5ff7e7e74d2b6780ffaf55e7591adc3150ef2ac Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Fri, 6 Oct 2023 10:22:38 -0700 Subject: [PATCH 041/190] Update .gitignore for sdks/downloads --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2481e622143e..4383ce51322a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ DerivedData *.xcuserstate project.xcworkspace **/.xcode.env.local -/poackages/react-native/sdks/downloads/ # Gradle /build/ @@ -135,6 +134,7 @@ package-lock.json # Additional SDKs /packages/react-native/sdks/download +/packages/react-native/sdks/downloads /packages/react-native/sdks/hermes /packages/react-native/sdks/hermesc /packages/react-native/sdks/hermes-engine/hermes-engine-from-local-source-dir.tar.gz From e22a8d1ac57f28295694cb2c774704e42b14cb44 Mon Sep 17 00:00:00 2001 From: Distiller Date: Tue, 10 Oct 2023 08:36:24 +0000 Subject: [PATCH 042/190] [0.73.0-rc.2] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 2 +- packages/react-native/template/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 0921b1e49200..2b7412b5d899 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.1', + prerelease: 'rc.2', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index f6203d377fb9..01670af27311 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.1", + RCTVersionPrerelease: @"rc.2", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 902b155fb971..88a44111231c 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.1 +VERSION_NAME=0.73.0-rc.2 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 952226f2a254..2b52a963a530 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.1"); + "prerelease", "rc.2"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 0c98e9a102b2..831226f3d016 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.1"; + std::string_view Prerelease = "rc.2"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 0d026d5139bf..07090fe4000f 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.1", + "version": "0.73.0-rc.2", "description": "A framework for building native apps using React", "license": "MIT", "repository": { diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 1b170ea16441..a745e8a9bc3b 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.1" + "react-native": "0.73.0-rc.2" }, "devDependencies": { "@babel/core": "^7.20.0", From 5310a50a66b9b73c1bbc94083f11f72c46dd0cdf Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 10 Oct 2023 09:37:41 -0700 Subject: [PATCH 043/190] Add --experimental-debugger-frontend flag, restore 0.72 flow as base (#40766) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40766 This changeset allows users to opt into the new debugger frontend experience by passing `--experimental-debugger` to `react-native start`. **We are defaulting this option to `true`** for now, but will continue to evaluate this feature before 0.73 ships. It restores Flipper (via `flipper://`) as the default handling for `/open-debugger` (matching 0.72 behaviour) when this flag is not enabled. Detailed changes: - Replaces `enableCustomDebuggerFrontend` experiment in `dev-middleware` with `enableNewDebugger`. The latter now hard-swaps between the Flipper and new launch flows. - Removes now-unused switching of `devtoolsFrontendUrl`. - Implements `deprecated_openFlipperMiddleware` (matching previous RN CLI implementation). - Disables "`j` to debug" key handler by default. - Marks "`j` to debug" and `/open-debugger` console logs as experimental. Changelog: [Changed][General] Gate new debugger frontend behind `--experimental-debugger` flag, restore Flipper as base launch flow Reviewed By: motiz88 Differential Revision: D50084590 fbshipit-source-id: 5234634f20110cb7933b1787bd2c86f645411fff --- flow-typed/npm/open_v7.x.x.js | 29 +++++++++ .../src/commands/start/attachKeyHandlers.js | 23 ++++--- .../src/commands/start/index.js | 10 ++++ .../src/commands/start/runServer.js | 4 +- packages/dev-middleware/package.json | 1 + .../dev-middleware/src/createDevMiddleware.js | 23 ++++--- .../deprecated_openFlipperMiddleware.js | 60 +++++++++++++++++++ .../src/middleware/openDebuggerMiddleware.js | 4 +- .../dev-middleware/src/types/Experiments.js | 7 ++- .../src/utils/getDevToolsFrontendUrl.js | 32 ++-------- yarn.lock | 10 +++- 11 files changed, 152 insertions(+), 51 deletions(-) create mode 100644 flow-typed/npm/open_v7.x.x.js create mode 100644 packages/dev-middleware/src/middleware/deprecated_openFlipperMiddleware.js diff --git a/flow-typed/npm/open_v7.x.x.js b/flow-typed/npm/open_v7.x.x.js new file mode 100644 index 000000000000..a60b26aa5b79 --- /dev/null +++ b/flow-typed/npm/open_v7.x.x.js @@ -0,0 +1,29 @@ +/** + * 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. + * + * @flow strict + * @format + * @oncall react_native + */ + +declare module 'open' { + import type {ChildProcess} from 'child_process'; + + declare export type Options = $ReadOnly<{ + wait?: boolean, + background?: boolean, + newInstance?: boolean, + allowNonzeroExitCode?: boolean, + ... + }>; + + declare type open = ( + target: string, + options?: Options, + ) => Promise; + + declare module.exports: open; +} diff --git a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js index d33505ccb8d3..548a9e8f44d8 100644 --- a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js +++ b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js @@ -24,6 +24,7 @@ export default function attachKeyHandlers({ cliConfig, devServerUrl, messageSocket, + experimentalDebuggerFrontend, }: { cliConfig: Config, devServerUrl: string, @@ -31,6 +32,7 @@ export default function attachKeyHandlers({ broadcast: (type: string, params?: Record | null) => void, ... }>, + experimentalDebuggerFrontend: boolean, }) { if (process.stdin.isTTY !== true) { logger.debug('Interactive mode is not supported in this environment'); @@ -76,6 +78,9 @@ export default function attachKeyHandlers({ ).stdout?.pipe(process.stdout); break; case 'j': + if (!experimentalDebuggerFrontend) { + return; + } await fetch(devServerUrl + '/open-debugger', {method: 'POST'}); break; case CTRL_C: @@ -92,12 +97,16 @@ export default function attachKeyHandlers({ keyPressHandler.startInterceptingKeyStrokes(); logger.log( - ` -${chalk.bold('i')} - run on iOS -${chalk.bold('a')} - run on Android -${chalk.bold('d')} - open Dev Menu -${chalk.bold('j')} - open debugger -${chalk.bold('r')} - reload app -`, + [ + '', + `${chalk.bold('i')} - run on iOS`, + `${chalk.bold('a')} - run on Android`, + `${chalk.bold('d')} - open Dev Menu`, + ...(experimentalDebuggerFrontend + ? [`${chalk.bold('j')} - open debugger (experimental)`] + : []), + `${chalk.bold('r')} - reload app`, + '', + ].join('\n'), ); } diff --git a/packages/community-cli-plugin/src/commands/start/index.js b/packages/community-cli-plugin/src/commands/start/index.js index 8bcf6e1ac4b0..2a259367e2d1 100644 --- a/packages/community-cli-plugin/src/commands/start/index.js +++ b/packages/community-cli-plugin/src/commands/start/index.js @@ -95,6 +95,16 @@ const startCommand: Command = { name: '--no-interactive', description: 'Disables interactive mode', }, + { + name: '--experimental-debugger [bool]', + description: + "[Experimental] Enable the new debugger experience and 'j' to " + + 'debug. This enables the new frontend experience only: connection ' + + 'reliability and some basic features are unstable in this release.', + parse: (val: ?string): boolean => + val !== undefined && val !== 'false' && val !== '0', + default: true, + }, ], }; diff --git a/packages/community-cli-plugin/src/commands/start/runServer.js b/packages/community-cli-plugin/src/commands/start/runServer.js index a7cc82a9b5c7..60477b313102 100644 --- a/packages/community-cli-plugin/src/commands/start/runServer.js +++ b/packages/community-cli-plugin/src/commands/start/runServer.js @@ -33,6 +33,7 @@ export type StartCommandArgs = { assetPlugins?: string[], cert?: string, customLogReporterPath?: string, + experimentalDebugger: boolean, host?: string, https?: boolean, maxWorkers?: number, @@ -118,7 +119,7 @@ async function runServer( logger, unstable_experiments: { // NOTE: Only affects the /open-debugger endpoint - enableCustomDebuggerFrontend: true, + enableNewDebugger: args.experimentalDebugger, }, }); @@ -138,6 +139,7 @@ async function runServer( cliConfig: ctx, devServerUrl, messageSocket: messageSocketEndpoint, + experimentalDebuggerFrontend: args.experimentalDebugger, }); } }, diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 4ff8c27a259c..87343d628587 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -29,6 +29,7 @@ "connect": "^3.6.5", "debug": "^2.2.0", "node-fetch": "^2.2.0", + "open": "^7.0.3", "serve-static": "^1.13.1", "temp-dir": "^2.0.0" }, diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js index 2e5cf12b1c28..7feeb8555e94 100644 --- a/packages/dev-middleware/src/createDevMiddleware.js +++ b/packages/dev-middleware/src/createDevMiddleware.js @@ -20,6 +20,7 @@ import connect from 'connect'; import path from 'path'; // $FlowFixMe[untyped-import] TODO: type serve-static import serveStaticMiddleware from 'serve-static'; +import deprecated_openFlipperMiddleware from './middleware/deprecated_openFlipperMiddleware'; import openDebuggerMiddleware from './middleware/openDebuggerMiddleware'; import InspectorProxy from './inspector-proxy/InspectorProxy'; import DefaultBrowserLauncher from './utils/DefaultBrowserLauncher'; @@ -86,14 +87,18 @@ export default function createDevMiddleware({ const middleware = connect() .use( '/open-debugger', - openDebuggerMiddleware({ - serverBaseUrl, - inspectorProxy, - browserLauncher: unstable_browserLauncher, - eventReporter: unstable_eventReporter, - experiments, - logger, - }), + experiments.enableNewDebugger + ? openDebuggerMiddleware({ + serverBaseUrl, + inspectorProxy, + browserLauncher: unstable_browserLauncher, + eventReporter: unstable_eventReporter, + experiments, + logger, + }) + : deprecated_openFlipperMiddleware({ + logger, + }), ) .use( '/debugger-frontend', @@ -111,7 +116,7 @@ export default function createDevMiddleware({ function getExperiments(config: ExperimentsConfig): Experiments { return { - enableCustomDebuggerFrontend: config.enableCustomDebuggerFrontend ?? false, + enableNewDebugger: config.enableNewDebugger ?? false, enableOpenDebuggerRedirect: config.enableOpenDebuggerRedirect ?? false, }; } diff --git a/packages/dev-middleware/src/middleware/deprecated_openFlipperMiddleware.js b/packages/dev-middleware/src/middleware/deprecated_openFlipperMiddleware.js new file mode 100644 index 000000000000..35a222ce7f02 --- /dev/null +++ b/packages/dev-middleware/src/middleware/deprecated_openFlipperMiddleware.js @@ -0,0 +1,60 @@ +/** + * 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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +import type {NextHandleFunction} from 'connect'; +import type {IncomingMessage, ServerResponse} from 'http'; +import type {Logger} from '../types/Logger'; + +import open from 'open'; + +const FLIPPER_SELF_CONNECT_URL = + 'flipper://null/Hermesdebuggerrn?device=React%20Native'; + +type Options = $ReadOnly<{ + logger?: Logger, +}>; + +/** + * Open the legacy Flipper debugger (Hermes). + * + * @deprecated This replicates the pre-0.73 workflow of opening Flipper via the + * `flipper://` URL scheme, failing if Flipper is not installed locally. This + * flow will be removed in a future version. + */ +export default function deprecated_openFlipperMiddleware({ + logger, +}: Options): NextHandleFunction { + return async ( + req: IncomingMessage, + res: ServerResponse, + next: (err?: Error) => void, + ) => { + if (req.method === 'POST') { + logger?.info('Launching JS debugger...'); + + try { + logger?.warn( + 'Attempting to debug JS in Flipper (deprecated). This requires ' + + 'Flipper to be installed on your system to handle the ' + + "'flipper://' URL scheme.", + ); + await open(FLIPPER_SELF_CONNECT_URL); + res.end(); + } catch (e) { + logger?.error( + 'Error launching Flipper: ' + e.message ?? 'Unknown error', + ); + res.writeHead(500); + res.end(); + } + } + }; +} diff --git a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js index 2e3e1f5594bf..14ee05051a60 100644 --- a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js +++ b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js @@ -72,7 +72,7 @@ export default function openDebuggerMiddleware({ if (typeof appId === 'string') { logger?.info( (launchType === 'launch' ? 'Launching' : 'Redirecting to') + - ' JS debugger...', + ' JS debugger (experimental)...', ); target = targets.find(_target => _target.description === appId); } else { @@ -108,7 +108,6 @@ export default function openDebuggerMiddleware({ getDevToolsFrontendUrl( target.webSocketDebuggerUrl, serverBaseUrl, - experiments, ), ), ); @@ -120,7 +119,6 @@ export default function openDebuggerMiddleware({ target.webSocketDebuggerUrl, // Use a relative URL. '', - experiments, ), }); res.end(); diff --git a/packages/dev-middleware/src/types/Experiments.js b/packages/dev-middleware/src/types/Experiments.js index 8e0db090f44f..9f15d94c8ef3 100644 --- a/packages/dev-middleware/src/types/Experiments.js +++ b/packages/dev-middleware/src/types/Experiments.js @@ -10,10 +10,11 @@ export type Experiments = $ReadOnly<{ /** - * Enables the use of the custom debugger frontend (@react-native/debugger-frontend) - * in the /open-debugger endpoint. + * Enables the new JS debugger launch flow and custom debugger frontend + * (@react-native/debugger-frontend). When disabled, /open-debugger will + * trigger the legacy Flipper connection flow. */ - enableCustomDebuggerFrontend: boolean, + enableNewDebugger: boolean, /** * Enables the handling of GET requests in the /open-debugger endpoint, diff --git a/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js b/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js index 4d95f18bf484..0178c4db2d3f 100644 --- a/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js +++ b/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js @@ -9,40 +9,18 @@ * @oncall react_native */ -import type {Experiments} from '../types/Experiments'; - -/** - * The Chrome DevTools frontend revision to use. This should be set to the - * latest version known to be compatible with Hermes. - * - * Revision should be the full identifier from: - * https://chromium.googlesource.com/chromium/src.git - */ -const DEVTOOLS_FRONTEND_REV = 'd9568d04d7dd79269c5a655d7ada69650c5a8336'; // Chrome 100.0.4896.75 - /** - * Construct the URL to Chrome DevTools connected to a given debugger target. + * Get the DevTools frontend URL to debug a given React Native CDP target. */ export default function getDevToolsFrontendUrl( webSocketDebuggerUrl: string, devServerUrl: string, - experiments: Experiments, ): string { const scheme = new URL(webSocketDebuggerUrl).protocol.slice(0, -1); - const webSocketUrlWithoutProtocol = webSocketDebuggerUrl.replace( - /^wss?:\/\//, - '', + const appUrl = `${devServerUrl}/debugger-frontend/rn_inspector.html`; + const webSocketUrlWithoutProtocol = encodeURIComponent( + webSocketDebuggerUrl.replace(/^wss?:\/\//, ''), ); - if (experiments.enableCustomDebuggerFrontend) { - const urlBase = `${devServerUrl}/debugger-frontend/rn_inspector.html`; - return `${urlBase}?${scheme}=${encodeURIComponent( - webSocketUrlWithoutProtocol, - )}&sources.hide_add_folder=true`; - } - - const urlBase = `https://chrome-devtools-frontend.appspot.com/serve_rev/@${DEVTOOLS_FRONTEND_REV}/devtools_app.html`; - return `${urlBase}?panel=console&${scheme}=${encodeURIComponent( - webSocketUrlWithoutProtocol, - )}`; + return `${appUrl}?${scheme}=${webSocketUrlWithoutProtocol}&sources.hide_add_folder=true`; } diff --git a/yarn.lock b/yarn.lock index d2e7544105ec..717ef048a9ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5873,7 +5873,7 @@ is-wsl@^1.1.0: resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -7507,6 +7507,14 @@ open@^6.2.0: dependencies: is-wsl "^1.1.0" +open@^7.0.3: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" From c05b3d385e77bd4ce7d97bf139820ee070123a6d Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 11 Oct 2023 11:37:38 +0100 Subject: [PATCH 044/190] [0.73] Make sure template is consuming the right buildToolsVersion (#39957) --- packages/react-native/template/android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/template/android/app/build.gradle b/packages/react-native/template/android/app/build.gradle index 94222a1e807a..86512f88a4a6 100644 --- a/packages/react-native/template/android/app/build.gradle +++ b/packages/react-native/template/android/app/build.gradle @@ -71,7 +71,7 @@ def jscFlavor = 'org.webkit:android-jsc:+' android { ndkVersion rootProject.ext.ndkVersion - + buildToolsVersion rootProject.ext.buildToolsVersion compileSdk rootProject.ext.compileSdkVersion namespace "com.helloworld" From 4a4fb12a47cdb7cffec4e6777c152169987077d6 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Mon, 9 Oct 2023 08:26:05 -0700 Subject: [PATCH 045/190] Store hermes stable artifacts inside Pods directory (#40733) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40733 Node package managers may purge or recreate `node_modules/react-native` when adding/removenf project dependencies. Storing hermes iOS artifacts inside `node_modules/react-native/sdks` is not reliable. This diff moves those artifacts to `Pods/hermes-engine-artifacts`. Should fix https://github.com/facebook/react-native/issues/39903 Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D50081559 fbshipit-source-id: a130898e12fb6275cadaef7617bf4b6a09e6487e --- .gitignore | 1 - .../sdks/hermes-engine/hermes-engine.podspec | 2 +- .../sdks/hermes-engine/hermes-utils.rb | 15 +++++++++------ .../utils/replace_hermes_version.js | 16 ++++++++-------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 4383ce51322a..85ddd447dda7 100644 --- a/.gitignore +++ b/.gitignore @@ -134,7 +134,6 @@ package-lock.json # Additional SDKs /packages/react-native/sdks/download -/packages/react-native/sdks/downloads /packages/react-native/sdks/hermes /packages/react-native/sdks/hermesc /packages/react-native/sdks/hermes-engine/hermes-engine-from-local-source-dir.tar.gz diff --git a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec index 8fd33af931a9..769d8ce0d60a 100644 --- a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec +++ b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec @@ -60,7 +60,7 @@ Pod::Spec.new do |spec| :execution_position => :before_compile, :script => <<-EOS . "$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh" - "$NODE_BINARY" "$REACT_NATIVE_PATH/sdks/hermes-engine/utils/replace_hermes_version.js" -c "$CONFIGURATION" -r "#{version}" -p "$REACT_NATIVE_PATH" + "$NODE_BINARY" "$REACT_NATIVE_PATH/sdks/hermes-engine/utils/replace_hermes_version.js" -c "$CONFIGURATION" -r "#{version}" -p "$PODS_ROOT" EOS } end diff --git a/packages/react-native/sdks/hermes-engine/hermes-utils.rb b/packages/react-native/sdks/hermes-engine/hermes-utils.rb index b3a28250b07a..8c2f4f6c665a 100644 --- a/packages/react-native/sdks/hermes-engine/hermes-utils.rb +++ b/packages/react-native/sdks/hermes-engine/hermes-utils.rb @@ -125,7 +125,7 @@ def podspec_source_build_from_local_source_dir(react_native_path) source_dir_path = ENV['REACT_NATIVE_OVERRIDE_HERMES_DIR'] if Dir.exist?(source_dir_path) hermes_log("Using source code from local path: #{source_dir_path}") - tarball_path = File.join(react_native_path, "sdks", "hermes-engine", "hermes-engine-from-local-source-dir.tar.gz") + tarball_path = File.join(artifacts_dir(), "hermes-engine-from-local-source-dir.tar.gz") exclude_paths = [ "__tests__", "./external/flowtest", @@ -192,6 +192,10 @@ def podspec_source_download_prebuilt_nightly_tarball(version) # HELPERS +def artifacts_dir() + return File.join(Pod::Config.instance.project_pods_root, "hermes-engine-artifacts") +end + def hermestag_file(react_native_path) return File.join(react_native_path, "sdks", ".hermesversion") end @@ -208,15 +212,14 @@ def download_stable_hermes(react_native_path, version, configuration) end def download_hermes_tarball(react_native_path, tarball_url, version, configuration) - destination_folder = "#{react_native_path}/sdks/downloads" destination_path = configuration == nil ? - "#{destination_folder}/hermes-ios-#{version}.tar.gz" : - "#{destination_folder}/hermes-ios-#{version}-#{configuration}.tar.gz" + "#{artifacts_dir()}/hermes-ios-#{version}.tar.gz" : + "#{artifacts_dir()}/hermes-ios-#{version}-#{configuration}.tar.gz" unless File.exist?(destination_path) # Download to a temporary file first so we don't cache incomplete downloads. - tmp_file = "#{destination_folder}/hermes-ios.download" - `mkdir -p "#{destination_folder}" && curl "#{tarball_url}" -Lo "#{tmp_file}" && mv "#{tmp_file}" "#{destination_path}"` + tmp_file = "#{artifacts_dir()}/hermes-ios.download" + `mkdir -p "#{artifacts_dir()}" && curl "#{tarball_url}" -Lo "#{tmp_file}" && mv "#{tmp_file}" "#{destination_path}"` end return destination_path end diff --git a/packages/react-native/sdks/hermes-engine/utils/replace_hermes_version.js b/packages/react-native/sdks/hermes-engine/utils/replace_hermes_version.js index ce1bb48f542b..116ae680d99d 100644 --- a/packages/react-native/sdks/hermes-engine/utils/replace_hermes_version.js +++ b/packages/react-native/sdks/hermes-engine/utils/replace_hermes_version.js @@ -52,8 +52,8 @@ function shouldReplaceHermesConfiguration(configuration) { return true; } -function replaceHermesConfiguration(configuration, version, reactNativePath) { - const tarballURLPath = `${reactNativePath}/sdks/downloads/hermes-ios-${version}-${configuration}.tar.gz`; +function replaceHermesConfiguration(configuration, version, podsRoot) { + const tarballURLPath = `${podsRoot}/hermes-engine-artifacts/hermes-ios-${version}-${configuration}.tar.gz`; const finalLocation = 'hermes-engine'; console.log('Preparing the final location'); @@ -68,7 +68,7 @@ function updateLastBuildConfiguration(configuration) { fs.writeFileSync(LAST_BUILD_FILENAME, configuration); } -function main(configuration, version, reactNativePath) { +function main(configuration, version, podsRoot) { validateBuildConfiguration(configuration); validateVersion(version); @@ -76,7 +76,7 @@ function main(configuration, version, reactNativePath) { return; } - replaceHermesConfiguration(configuration, version, reactNativePath); + replaceHermesConfiguration(configuration, version, podsRoot); updateLastBuildConfiguration(configuration); console.log('Done replacing hermes-engine'); } @@ -94,13 +94,13 @@ const argv = yargs 'The Version of React Native associated with the Hermes tarball.', }) .option('p', { - alias: 'reactNativePath', - description: 'The path to the React Native root folder', + alias: 'podsRoot', + description: 'The path to the Pods root folder', }) .usage('Usage: $0 -c Debug -r -p ').argv; const configuration = argv.configuration; const version = argv.reactNativeVersion; -const reactNativePath = argv.reactNativePath; +const podsRoot = argv.podsRoot; -main(configuration, version, reactNativePath); +main(configuration, version, podsRoot); From 21e2445d06427c6021fe52db0ee2cf27192a4968 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 3 Oct 2023 13:58:03 -0700 Subject: [PATCH 046/190] Top-down onLayout events (#39644) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39644 This makes Android Paper/Classic renderer fire `onLayout` events top down, like in Fabric/new Architecture. This gives a much more sane model for using layout events to calculate bottom/right-edge insets. I was under the impression that Paper in general was bottom-up, but it turns out that is only true for Android and Windows (iOS seems totally deterministic). This is a behavior change, but to my knowledge was never hit during the Fabric migration, and any JS code already written for both Android and iOS cannot make assumptions here anyways. Changelog: [General][Changed] - Make layout events top-down on Android classic renderer Reviewed By: mdvacca Differential Revision: D49627996 fbshipit-source-id: 29964b421dd420681d45348c7db16f211a6c087f --- .../react/uimanager/ReactShadowNode.java | 4 +- .../react/uimanager/ReactShadowNodeImpl.java | 31 ++++++++-- .../react/uimanager/UIImplementation.java | 56 +++++++++++-------- 3 files changed, 60 insertions(+), 31 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java index db10bf379e46..efaba33cdc3f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java @@ -123,9 +123,9 @@ public interface ReactShadowNode { */ void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue); - /** @return true if layout (position or dimensions) changed, false otherwise. */ + /* package */ boolean dispatchUpdatesWillChangeLayout(float absoluteX, float absoluteY); - /* package */ boolean dispatchUpdates( + /* package */ void dispatchUpdates( float absoluteX, float absoluteY, UIViewOperationQueue uiViewOperationQueue, diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java index f62e6085ae45..1bb6e9ee4c1b 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java @@ -337,9 +337,32 @@ public void onAfterUpdateTransaction() { @Override public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue) {} - /** @return true if layout (position or dimensions) changed, false otherwise. */ @Override - public boolean dispatchUpdates( + public boolean dispatchUpdatesWillChangeLayout(float absoluteX, float absoluteY) { + if (!hasNewLayout()) { + return false; + } + + float layoutX = getLayoutX(); + float layoutY = getLayoutY(); + int newAbsoluteLeft = Math.round(absoluteX + layoutX); + int newAbsoluteTop = Math.round(absoluteY + layoutY); + int newAbsoluteRight = Math.round(absoluteX + layoutX + getLayoutWidth()); + int newAbsoluteBottom = Math.round(absoluteY + layoutY + getLayoutHeight()); + + int newScreenX = Math.round(layoutX); + int newScreenY = Math.round(layoutY); + int newScreenWidth = newAbsoluteRight - newAbsoluteLeft; + int newScreenHeight = newAbsoluteBottom - newAbsoluteTop; + + return newScreenX != mScreenX + || newScreenY != mScreenY + || newScreenWidth != mScreenWidth + || newScreenHeight != mScreenHeight; + } + + @Override + public void dispatchUpdates( float absoluteX, float absoluteY, UIViewOperationQueue uiViewOperationQueue, @@ -386,10 +409,6 @@ public boolean dispatchUpdates( getScreenHeight()); } } - - return layoutHasChanged; - } else { - return false; } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java index f15004e38e91..894f32380bda 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java @@ -29,7 +29,9 @@ import com.facebook.systrace.SystraceMessage; import com.facebook.yoga.YogaConstants; import com.facebook.yoga.YogaDirection; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import java.util.Map; /** @@ -665,7 +667,20 @@ protected void updateViewHierarchy() { .arg("rootTag", cssRoot.getReactTag()) .flush(); try { - applyUpdatesRecursive(cssRoot, 0f, 0f); + List onLayoutNodes = new ArrayList<>(); + applyUpdatesRecursive(cssRoot, 0f, 0f, onLayoutNodes); + + for (ReactShadowNode node : onLayoutNodes) { + mEventDispatcher.dispatchEvent( + OnLayoutEvent.obtain( + -1, /* surfaceId not used in classic renderer */ + node.getReactTag(), + node.getScreenX(), + node.getScreenY(), + node.getScreenWidth(), + node.getScreenHeight())); + } + } finally { Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE); } @@ -951,39 +966,34 @@ protected void calculateRootLayout(ReactShadowNode cssRoot) { } } - protected void applyUpdatesRecursive(ReactShadowNode cssNode, float absoluteX, float absoluteY) { + protected void applyUpdatesRecursive( + ReactShadowNode cssNode, + float absoluteX, + float absoluteY, + List onLayoutNodes) { if (!cssNode.hasUpdates()) { return; } + if (cssNode.dispatchUpdatesWillChangeLayout(absoluteX, absoluteY) + && cssNode.shouldNotifyOnLayout() + && !mShadowNodeRegistry.isRootNode(cssNode.getReactTag())) { + onLayoutNodes.add(cssNode); + } + Iterable cssChildren = cssNode.calculateLayoutOnChildren(); if (cssChildren != null) { for (ReactShadowNode cssChild : cssChildren) { applyUpdatesRecursive( - cssChild, absoluteX + cssNode.getLayoutX(), absoluteY + cssNode.getLayoutY()); + cssChild, + absoluteX + cssNode.getLayoutX(), + absoluteY + cssNode.getLayoutY(), + onLayoutNodes); } } - int tag = cssNode.getReactTag(); - if (!mShadowNodeRegistry.isRootNode(tag)) { - boolean frameDidChange = - cssNode.dispatchUpdates( - absoluteX, absoluteY, mOperationsQueue, mNativeViewHierarchyOptimizer); - - // Notify JS about layout event if requested - // and if the position or dimensions actually changed - // (consistent with iOS). - if (frameDidChange && cssNode.shouldNotifyOnLayout()) { - mEventDispatcher.dispatchEvent( - OnLayoutEvent.obtain( - -1, /* surfaceId not used in classic renderer */ - tag, - cssNode.getScreenX(), - cssNode.getScreenY(), - cssNode.getScreenWidth(), - cssNode.getScreenHeight())); - } - } + cssNode.dispatchUpdates(absoluteX, absoluteY, mOperationsQueue, mNativeViewHierarchyOptimizer); + cssNode.markUpdateSeen(); mNativeViewHierarchyOptimizer.onViewUpdatesCompleted(cssNode); } From 31680559b4e8b882614b1c11837f90aa38639790 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 10 Oct 2023 11:43:14 -0700 Subject: [PATCH 047/190] Deterministic onLayout event ordering for iOS Paper (#40748) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40748 The ordering of `onLayout` events is non-deterministic on iOS Paper, due to nodes being added to an `NSHashTable` before iteration, instead of an ordered collection. We don't do any lookups on the collection, so I think this was chosen over `NSMutableArray` for the sake of `[NSHashTable weakObjectsHashTable]`, to avoid retain/release. Using a collection which does retain/release seems to cause a crash due to double release or similar, so those semantics seem intentional (though I'm not super familiar with the model here). We can replicate the memory semantics with ordering by using `NSPointerArray` (which is unfortunately not parameterized). This change does that, so we get consistently top-down layout events (matching Fabric, and Android Paper as of D49627996). This lets us use multiple layout events to calculate right/bottom edge insets deterministically. Changelog: [iOS][Changed] - Deterministic onLayout event ordering for iOS Paper Reviewed By: luluwu2032 Differential Revision: D50093411 fbshipit-source-id: f6a9d5c973b97aede879baa8b952cc1be2447f28 --- .../React/Base/Surface/RCTSurfaceRootShadowView.h | 2 +- .../React/Base/Surface/RCTSurfaceRootShadowView.m | 2 +- packages/react-native/React/Modules/RCTUIManager.m | 2 +- packages/react-native/React/Views/RCTLayout.h | 2 +- packages/react-native/React/Views/RCTRootShadowView.h | 2 +- packages/react-native/React/Views/RCTRootShadowView.m | 2 +- packages/react-native/React/Views/RCTShadowView.m | 2 +- packages/rn-tester/RNTesterUnitTests/RCTShadowViewTests.m | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.h b/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.h index 2898b16b385d..4e0ed8458d2c 100644 --- a/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.h +++ b/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.h @@ -27,6 +27,6 @@ */ @property (nonatomic, assign) YGDirection baseDirection; -- (void)layoutWithAffectedShadowViews:(NSHashTable *)affectedShadowViews; +- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews; @end diff --git a/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.m b/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.m index 37c551cb4bd3..95cf3390657f 100644 --- a/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.m +++ b/packages/react-native/React/Base/Surface/RCTSurfaceRootShadowView.m @@ -41,7 +41,7 @@ - (void)insertReactSubview:(RCTShadowView *)subview atIndex:(NSInteger)atIndex } } -- (void)layoutWithAffectedShadowViews:(NSHashTable *)affectedShadowViews +- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews { NSHashTable *other = [NSHashTable new]; diff --git a/packages/react-native/React/Modules/RCTUIManager.m b/packages/react-native/React/Modules/RCTUIManager.m index 7027921fda70..9fe11430c8b7 100644 --- a/packages/react-native/React/Modules/RCTUIManager.m +++ b/packages/react-native/React/Modules/RCTUIManager.m @@ -534,7 +534,7 @@ - (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView * { RCTAssertUIManagerQueue(); - NSHashTable *affectedShadowViews = [NSHashTable weakObjectsHashTable]; + NSPointerArray *affectedShadowViews = [NSPointerArray weakObjectsPointerArray]; [rootShadowView layoutWithAffectedShadowViews:affectedShadowViews]; if (!affectedShadowViews.count) { diff --git a/packages/react-native/React/Views/RCTLayout.h b/packages/react-native/React/Views/RCTLayout.h index 55340ad938d1..8016463e145c 100644 --- a/packages/react-native/React/Views/RCTLayout.h +++ b/packages/react-native/React/Views/RCTLayout.h @@ -31,7 +31,7 @@ typedef struct CG_BOXABLE RCTLayoutMetrics RCTLayoutMetrics; struct RCTLayoutContext { CGPoint absolutePosition; - __unsafe_unretained NSHashTable *_Nonnull affectedShadowViews; + __unsafe_unretained NSPointerArray *_Nonnull affectedShadowViews; __unsafe_unretained NSHashTable *_Nonnull other; }; typedef struct CG_BOXABLE RCTLayoutContext RCTLayoutContext; diff --git a/packages/react-native/React/Views/RCTRootShadowView.h b/packages/react-native/React/Views/RCTRootShadowView.h index a312d9abfede..aecfc4d0a6ec 100644 --- a/packages/react-native/React/Views/RCTRootShadowView.h +++ b/packages/react-native/React/Views/RCTRootShadowView.h @@ -29,6 +29,6 @@ */ @property (nonatomic, assign) YGDirection baseDirection; -- (void)layoutWithAffectedShadowViews:(NSHashTable *)affectedShadowViews; +- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews; @end diff --git a/packages/react-native/React/Views/RCTRootShadowView.m b/packages/react-native/React/Views/RCTRootShadowView.m index 9db376d7c49f..b80ab28ba853 100644 --- a/packages/react-native/React/Views/RCTRootShadowView.m +++ b/packages/react-native/React/Views/RCTRootShadowView.m @@ -23,7 +23,7 @@ - (instancetype)init return self; } -- (void)layoutWithAffectedShadowViews:(NSHashTable *)affectedShadowViews +- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews { NSHashTable *other = [NSHashTable new]; diff --git a/packages/react-native/React/Views/RCTShadowView.m b/packages/react-native/React/Views/RCTShadowView.m index e0084ea7f1d6..2ef25b1a200a 100644 --- a/packages/react-native/React/Views/RCTShadowView.m +++ b/packages/react-native/React/Views/RCTShadowView.m @@ -304,7 +304,7 @@ - (void)layoutWithMetrics:(RCTLayoutMetrics)layoutMetrics layoutContext:(RCTLayo { if (!RCTLayoutMetricsEqualToLayoutMetrics(self.layoutMetrics, layoutMetrics)) { self.layoutMetrics = layoutMetrics; - [layoutContext.affectedShadowViews addObject:self]; + [layoutContext.affectedShadowViews addPointer:((__bridge void *)self)]; } } diff --git a/packages/rn-tester/RNTesterUnitTests/RCTShadowViewTests.m b/packages/rn-tester/RNTesterUnitTests/RCTShadowViewTests.m index 0bf29c2d336f..f63a54b327a8 100644 --- a/packages/rn-tester/RNTesterUnitTests/RCTShadowViewTests.m +++ b/packages/rn-tester/RNTesterUnitTests/RCTShadowViewTests.m @@ -84,7 +84,7 @@ - (void)testApplyingLayoutRecursivelyToShadowView [self.parentView insertReactSubview:mainView atIndex:1]; [self.parentView insertReactSubview:footerView atIndex:2]; - [self.parentView layoutWithAffectedShadowViews:[NSHashTable weakObjectsHashTable]]; + [self.parentView layoutWithAffectedShadowViews:[NSPointerArray weakObjectsPointerArray]]; XCTAssertTrue( CGRectEqualToRect([self.parentView measureLayoutRelativeToAncestor:self.parentView], CGRectMake(0, 0, 440, 440))); @@ -187,7 +187,7 @@ - (void)_withShadowViewWithStyle:(void (^)(YGNodeRef node))configBlock RCTShadowView *view = [self _shadowViewWithConfig:configBlock]; [self.parentView insertReactSubview:view atIndex:0]; view.intrinsicContentSize = contentSize; - [self.parentView layoutWithAffectedShadowViews:[NSHashTable weakObjectsHashTable]]; + [self.parentView layoutWithAffectedShadowViews:[NSPointerArray weakObjectsPointerArray]]; CGRect actualRect = [view measureLayoutRelativeToAncestor:self.parentView]; XCTAssertTrue( CGRectEqualToRect(expectedRect, actualRect), From 59855fc41256f167c2ac5da9d4da57bf043f8a9d Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 10 Oct 2023 11:43:14 -0700 Subject: [PATCH 048/190] Remove code to support bottom-up layout events in horizontal RTL (#39646) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39646 We can dramatically simplify this code and remove quirks/hacks, now that we can assume layout events are always fired top down. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D49628669 fbshipit-source-id: 7de5bbc4597eba1c59aaa7672c70e76d2786c7ef --- .../Lists/ListMetricsAggregator.js | 100 ++---------- .../Lists/VirtualizedList.js | 35 +--- .../__tests__/ListMetricsAggregator-test.js | 149 ++++-------------- 3 files changed, 41 insertions(+), 243 deletions(-) diff --git a/packages/virtualized-lists/Lists/ListMetricsAggregator.js b/packages/virtualized-lists/Lists/ListMetricsAggregator.js index 23f7f8d327ca..01d6e5aff29c 100644 --- a/packages/virtualized-lists/Lists/ListMetricsAggregator.js +++ b/packages/virtualized-lists/Lists/ListMetricsAggregator.js @@ -14,8 +14,6 @@ import {keyExtractor as defaultKeyExtractor} from './VirtualizeUtils'; import invariant from 'invariant'; -type LayoutEventDirection = 'top-down' | 'bottom-up'; - export type CellMetrics = { /** * Index of the item in the list @@ -55,25 +53,12 @@ export type CellMetricProps = { ... }; -type UnresolvedCellMetrics = { - index: number, - layout: Layout, - isMounted: boolean, - - // The length of list content at the time of layout is needed to correctly - // resolve flow relative offset in RTL. We are lazily notified of this after - // the layout of the cell, unless the cell relayout does not cause a length - // change. To keep stability, we use content length at time of query, or - // unmount if never queried. - listContentLength?: ?number, -}; - /** * Provides an interface to query information about the metrics of a list and its cells. */ export default class ListMetricsAggregator { _averageCellLength = 0; - _cellMetrics: Map = new Map(); + _cellMetrics: Map = new Map(); _contentLength: ?number; _highestMeasuredCellIndex = 0; _measuredCellsLength = 0; @@ -83,10 +68,6 @@ export default class ListMetricsAggregator { rtl: false, }; - // Fabric and Paper may call onLayout in different orders. We can tell which - // direction layout events happen on the first layout. - _onLayoutDirection: LayoutEventDirection = 'top-down'; - /** * Notify the ListMetricsAggregator that a cell has been laid out. * @@ -103,39 +84,22 @@ export default class ListMetricsAggregator { orientation: ListOrientation, layout: Layout, }): boolean { - if (this._contentLength == null) { - this._onLayoutDirection = 'bottom-up'; - } - this._invalidateIfOrientationChanged(orientation); - // If layout is top-down, our most recently cached content length - // corresponds to this cell. Otherwise, we need to resolve when events fire - // up the tree to the new length. - const listContentLength = - this._onLayoutDirection === 'top-down' ? this._contentLength : null; - - const next: UnresolvedCellMetrics = { + const next: CellMetrics = { index: cellIndex, - layout: layout, + length: this._selectLength(layout), isMounted: true, - listContentLength, + offset: this.flowRelativeOffset(layout), }; const curr = this._cellMetrics.get(cellKey); - if ( - !curr || - this._selectOffset(next.layout) !== this._selectOffset(curr.layout) || - this._selectLength(next.layout) !== this._selectLength(curr.layout) || - (curr.listContentLength != null && - curr.listContentLength !== this._contentLength) - ) { + if (!curr || next.offset !== curr.offset || next.length !== curr.length) { if (curr) { - const dLength = - this._selectLength(next.layout) - this._selectLength(curr.layout); + const dLength = next.length - curr.length; this._measuredCellsLength += dLength; } else { - this._measuredCellsLength += this._selectLength(next.layout); + this._measuredCellsLength += next.length; this._measuredCellsCount += 1; } @@ -174,21 +138,7 @@ export default class ListMetricsAggregator { layout: $ReadOnly<{width: number, height: number}>, }): void { this._invalidateIfOrientationChanged(orientation); - const newLength = this._selectLength(layout); - - // Fill in any just-measured cells which did not have this length available. - // This logic assumes that cell relayout will always change list content - // size, which isn't strictly correct, but issues should be rare and only - // on Paper. - if (this._onLayoutDirection === 'bottom-up') { - for (const cellMetric of this._cellMetrics.values()) { - if (cellMetric.listContentLength == null) { - cellMetric.listContentLength = newLength; - } - } - } - - this._contentLength = newLength; + this._contentLength = this._selectLength(layout); } /** @@ -245,7 +195,7 @@ export default class ListMetricsAggregator { keyExtractor(getItem(data, index), index), ); if (frame && frame.index === index) { - return this._resolveCellMetrics(frame); + return frame; } if (getItemLayout) { @@ -286,26 +236,6 @@ export default class ListMetricsAggregator { return this._contentLength != null; } - /** - * Whether the ListMetricsAggregator is notified of cell metrics before - * ScrollView metrics (bottom-up) or ScrollView metrics before cell metrics - * (top-down). - * - * Must be queried after cell layout - */ - getLayoutEventDirection(): LayoutEventDirection { - return this._onLayoutDirection; - } - - /** - * Whether the ListMetricsAggregator must be aware of the current length of - * ScrollView content to be able to correctly resolve the (flow-relative) - * metrics of a cell. - */ - needsContentLengthForCellMetrics(): boolean { - return this._orientation.horizontal && this._orientation.rtl; - } - /** * Finds the flow-relative offset (e.g. starting from the left in LTR, but * right in RTL) from a layout box. @@ -352,7 +282,6 @@ export default class ListMetricsAggregator { if (orientation.horizontal !== this._orientation.horizontal) { this._averageCellLength = 0; - this._contentLength = null; this._highestMeasuredCellIndex = 0; this._measuredCellsLength = 0; this._measuredCellsCount = 0; @@ -371,15 +300,4 @@ export default class ListMetricsAggregator { _selectOffset({x, y}: $ReadOnly<{x: number, y: number, ...}>): number { return this._orientation.horizontal ? x : y; } - - _resolveCellMetrics(metrics: UnresolvedCellMetrics): CellMetrics { - const {index, layout, isMounted, listContentLength} = metrics; - - return { - index, - length: this._selectLength(layout), - isMounted, - offset: this.flowRelativeOffset(layout, listContentLength), - }; - } } diff --git a/packages/virtualized-lists/Lists/VirtualizedList.js b/packages/virtualized-lists/Lists/VirtualizedList.js index fed3f3f140b9..dcd9cbaaeb10 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.js +++ b/packages/virtualized-lists/Lists/VirtualizedList.js @@ -1302,39 +1302,13 @@ class VirtualizedList extends StateSafePureComponent { orientation: this._orientation(), }); - // In RTL layout we need parent content length to calculate the offset of a - // cell from the start of the list. In Paper, layout events are bottom up, - // so we do not know this yet, and must defer calculation until after - // `onContentSizeChange` is called. - const deferCellMetricCalculation = - this._listMetrics.getLayoutEventDirection() === 'bottom-up' && - this._listMetrics.needsContentLengthForCellMetrics(); - - // Note: In Paper RTL logical position may have changed when - // `layoutHasChanged` is false if a cell maintains same X/Y coordinates, - // but contentLength shifts. This will be corrected by - // `onContentSizeChange` triggering a cell update. if (layoutHasChanged) { - this._scheduleCellsToRenderUpdate({ - allowImmediateExecution: !deferCellMetricCalculation, - }); + this._scheduleCellsToRenderUpdate(); } this._triggerRemeasureForChildListsInCell(cellKey); - this._computeBlankness(); - - if (deferCellMetricCalculation) { - if (!this._pendingViewabilityUpdate) { - this._pendingViewabilityUpdate = true; - setTimeout(() => { - this._updateViewableItems(this.props, this.state.cellsAroundViewport); - this._pendingViewabilityUpdate = false; - }, 0); - } - } else { - this._updateViewableItems(this.props, this.state.cellsAroundViewport); - } + this._updateViewableItems(this.props, this.state.cellsAroundViewport); }; _onCellFocusCapture(cellKey: string) { @@ -1765,9 +1739,7 @@ class VirtualizedList extends StateSafePureComponent { } } - _scheduleCellsToRenderUpdate(opts?: {allowImmediateExecution?: boolean}) { - const allowImmediateExecution = opts?.allowImmediateExecution ?? true; - + _scheduleCellsToRenderUpdate() { // Only trigger high-priority updates if we've actually rendered cells, // and with that size estimate, accurately compute how many cells we should render. // Otherwise, it would just render as many cells as it can (of zero dimension), @@ -1776,7 +1748,6 @@ class VirtualizedList extends StateSafePureComponent { // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate // We shouldn't do another hipri cellToRenderUpdate if ( - allowImmediateExecution && this._shouldRenderWithPriority() && (this._listMetrics.getAverageCellLength() || this.props.getItemLayout) && !this._hiPriInProgress diff --git a/packages/virtualized-lists/Lists/__tests__/ListMetricsAggregator-test.js b/packages/virtualized-lists/Lists/__tests__/ListMetricsAggregator-test.js index 7426b4c1617b..da2bb5df90f6 100644 --- a/packages/virtualized-lists/Lists/__tests__/ListMetricsAggregator-test.js +++ b/packages/virtualized-lists/Lists/__tests__/ListMetricsAggregator-test.js @@ -437,6 +437,11 @@ describe('ListMetricsAggregator', () => { getItem: (i: number) => nullthrows(props.data)[i], }; + listMetrics.notifyListContentLayout({ + layout: {width: 100, height: 5}, + orientation, + }); + listMetrics.notifyCellLayout({ cellIndex: 0, cellKey: '0', @@ -461,11 +466,6 @@ describe('ListMetricsAggregator', () => { }, }); - listMetrics.notifyListContentLayout({ - layout: {width: 100, height: 5}, - orientation, - }); - expect(listMetrics.getCellMetrics(1, props)).toEqual({ index: 1, length: 20, @@ -489,6 +489,11 @@ describe('ListMetricsAggregator', () => { getItem: (i: number) => nullthrows(props.data)[i], }; + listMetrics.notifyListContentLayout({ + layout: {width: 100, height: 5}, + orientation, + }); + listMetrics.notifyCellLayout({ cellIndex: 0, cellKey: '0', @@ -513,11 +518,6 @@ describe('ListMetricsAggregator', () => { }, }); - listMetrics.notifyListContentLayout({ - layout: {width: 100, height: 5}, - orientation, - }); - expect(listMetrics.getCellMetrics(2, props)).toBeNull(); expect(listMetrics.getCellMetricsApprox(2, props)).toEqual({ index: 2, @@ -537,6 +537,11 @@ describe('ListMetricsAggregator', () => { getItemLayout: () => ({index: 2, length: 40, offset: 30}), }; + listMetrics.notifyListContentLayout({ + layout: {width: 100, height: 5}, + orientation, + }); + listMetrics.notifyCellLayout({ cellIndex: 0, cellKey: '0', @@ -561,11 +566,6 @@ describe('ListMetricsAggregator', () => { }, }); - listMetrics.notifyListContentLayout({ - layout: {width: 100, height: 5}, - orientation, - }); - expect(listMetrics.getCellMetrics(2, props)).toMatchObject({ index: 2, length: 40, @@ -713,98 +713,7 @@ describe('ListMetricsAggregator', () => { }); }); - it('resolves metrics of unmounted cell after list shift when using bottom-up layout propagation', () => { - const listMetrics = new ListMetricsAggregator(); - const orientation = {horizontal: true, rtl: true}; - const props: CellMetricProps = { - data: [1, 2, 3, 4, 5], - getItemCount: () => nullthrows(props.data).length, - getItem: (i: number) => nullthrows(props.data)[i], - }; - - listMetrics.notifyCellLayout({ - cellIndex: 0, - cellKey: '0', - orientation, - layout: { - height: 5, - width: 10, - x: 90, - y: 0, - }, - }); - - listMetrics.notifyCellLayout({ - cellIndex: 1, - cellKey: '1', - orientation, - layout: { - height: 5, - width: 20, - x: 70, - y: 0, - }, - }); - - listMetrics.notifyListContentLayout({ - layout: {width: 100, height: 5}, - orientation, - }); - - expect(listMetrics.getCellMetrics(1, props)).toEqual({ - index: 1, - length: 20, - offset: 10, - isMounted: true, - }); - - listMetrics.notifyCellLayout({ - cellIndex: 2, - cellKey: '2', - orientation, - layout: { - height: 5, - width: 20, - x: 50, - y: 0, - }, - }); - - listMetrics.notifyListContentLayout({ - layout: {width: 120, height: 5}, - orientation, - }); - - expect(listMetrics.getCellMetrics(1, props)).toEqual({ - index: 1, - length: 20, - offset: 10, - isMounted: true, - }); - - listMetrics.notifyCellUnmounted('1'); - - expect(listMetrics.getCellMetrics(1, props)).toEqual({ - index: 1, - length: 20, - offset: 10, - isMounted: false, - }); - - listMetrics.notifyListContentLayout({ - layout: {width: 100, height: 5}, - orientation, - }); - - expect(listMetrics.getCellMetrics(1, props)).toEqual({ - index: 1, - length: 20, - offset: 10, - isMounted: false, - }); - }); - - it('resolves metrics of unmounted cell after list shift when using top-down layout propagation', () => { + it('resolves metrics of unmounted cell after list shift', () => { const listMetrics = new ListMetricsAggregator(); const orientation = {horizontal: true, rtl: true}; const props: CellMetricProps = { @@ -1089,18 +998,18 @@ describe('ListMetricsAggregator', () => { getItem: (i: number) => nullthrows(props.data)[i], }; - listMetrics.notifyCellLayout({ - cellIndex: 0, - cellKey: '0', - orientation, - layout: { - height: 10, - width: 5, - x: 0, - y: 0, - }, - }); - - expect(() => listMetrics.getCellMetrics(0, props)).toThrow(); + expect(() => + listMetrics.notifyCellLayout({ + cellIndex: 0, + cellKey: '0', + orientation, + layout: { + height: 10, + width: 5, + x: 0, + y: 0, + }, + }), + ).toThrow(); }); }); From a09999911a2e28d7804af1a038e12f27d80f99a4 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 10 Oct 2023 11:43:14 -0700 Subject: [PATCH 049/190] Fix iOS Paper Scroll Event RTL check (#40751) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40751 In D48379915 I fixed inverted `contentOffset` in `onScroll` events on iOS. I thought I tested on Paper, but I think this was during a period where the Paper route in Catalyst was actually launching Fabric (oops). In Paper, at least under `forceRTL` and English, `[UIApplication sharedApplication].userInterfaceLayoutDirection` is not set to RTL. We instead have a per-view `reactLayoutDirection` we should be reading. This sort of thing isn't currently set on Fabric, which checks application-level RTL. This seems... not right with being able to set `direction` in a subtree context, but Android does the same thing, and that would take some greater changes. Changelog: [iOS][Fixed] - Fix iOS Paper Scroll Event RTL check Reviewed By: luluwu2032 Differential Revision: D50098310 fbshipit-source-id: e321fca7b2f7983e903e23237bc2d604c72f98a3 --- packages/react-native/React/Views/ScrollView/RCTScrollView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollView.m b/packages/react-native/React/Views/ScrollView/RCTScrollView.m index 1b506c877ebd..9e8b02708de9 100644 --- a/packages/react-native/React/Views/ScrollView/RCTScrollView.m +++ b/packages/react-native/React/Views/ScrollView/RCTScrollView.m @@ -1058,7 +1058,7 @@ - (void)sendScrollEventWithName:(NSString *)eventName } CGPoint offset = scrollView.contentOffset; - if ([UIApplication sharedApplication].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) { + if ([self reactLayoutDirection] == UIUserInterfaceLayoutDirectionRightToLeft) { offset.x = scrollView.contentSize.width - scrollView.frame.size.width - offset.x; } From 9f6575b6d40489c3d599db76e037a594021bff15 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 12 Oct 2023 05:26:11 -0700 Subject: [PATCH 050/190] Disable --experimental-debugger by default (#40795) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40795 Changelog: [Internal] Reviewed By: hoxyq Differential Revision: D50178494 fbshipit-source-id: b833b6accadd2902d97a45e030cd48d1b62ac438 --- packages/community-cli-plugin/src/commands/start/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/community-cli-plugin/src/commands/start/index.js b/packages/community-cli-plugin/src/commands/start/index.js index 2a259367e2d1..88028746183b 100644 --- a/packages/community-cli-plugin/src/commands/start/index.js +++ b/packages/community-cli-plugin/src/commands/start/index.js @@ -96,14 +96,11 @@ const startCommand: Command = { description: 'Disables interactive mode', }, { - name: '--experimental-debugger [bool]', + name: '--experimental-debugger', description: "[Experimental] Enable the new debugger experience and 'j' to " + 'debug. This enables the new frontend experience only: connection ' + 'reliability and some basic features are unstable in this release.', - parse: (val: ?string): boolean => - val !== undefined && val !== 'false' && val !== '0', - default: true, }, ], }; From 8d2f41dbbfd7ec08b9cdfb7f6fbe1e40e9aa5468 Mon Sep 17 00:00:00 2001 From: Blake Friedman Date: Thu, 12 Oct 2023 10:09:55 -0700 Subject: [PATCH 051/190] make runtime reference thread safe on tickleJs call Summary: The reference to runtime assumes the queue will ensure references to runtime are valid when invoked. This isn't the case if you create a breakpoint, Hermes hit that breakpoint and your refresh the app. This consistently will crash the app. The fix is to not assument this, similar to ReactCommon/react/runtime/hermes/HermesInstance.cpp Reviewed By: javache Differential Revision: D50225678 fbshipit-source-id: b45cae1f5f687bc8c699fd74b187376a547012c5 --- .../hermes/executor/HermesExecutorFactory.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp b/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp index 8ae8766f5e3e..58b56e83f0cc 100644 --- a/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +++ b/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp @@ -43,13 +43,16 @@ class HermesExecutorRuntimeAdapter } void tickleJs() override { - // The queue will ensure that runtime_ is still valid when this - // gets invoked. - thread_->runOnQueue([&runtime = runtime_]() { - auto func = - runtime->global().getPropertyAsFunction(*runtime, "__tickleJs"); - func.call(*runtime); - }); + thread_->runOnQueue( + [weakRuntime = std::weak_ptr(runtime_)]() { + auto runtime = weakRuntime.lock(); + if (!runtime) { + return; + } + jsi::Function func = + runtime->global().getPropertyAsFunction(*runtime, "__tickleJs"); + func.call(*runtime); + }); } private: From 9b9c07eaf055339d14d780e16bc0105e0a29ac8b Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 12 Oct 2023 03:31:32 -0700 Subject: [PATCH 052/190] Run all the tests when not on a PR Summary: ## Changelog: [Internal] - Run all the tests in CI when not on a PR Reviewed By: cortinico Differential Revision: D50220596 fbshipit-source-id: be1a30d713e9d427858cf22bd3ca9549ad513057 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2eb4a63b33d3..94756b553871 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,9 +69,9 @@ jobs: command: | if [[ -z "$CIRCLE_PULL_REQUEST" ]]; then echo "Not in a PR. Can't filter properly outside a PR. Please open a PR so that we can run the proper CI tests." - echo "Skipping!" + echo "For safety, we run all the tests!" mkdir -p /tmp/circleci/ - echo '{}' > /tmp/circleci/pipeline_config.json + echo '{ "run_all": true }' > /tmp/circleci/pipeline_config.json else PR_NUMBER="${CIRCLE_PULL_REQUEST##*/}" node ./scripts/circleci/pipeline_selection.js filter-jobs From bf0cdfcdd4b2b7ffccb196eb213d29d6b6f62348 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 17 Oct 2023 02:57:55 -0700 Subject: [PATCH 053/190] Add "Hermes only" to open debugger key prompt Summary: Changelog: [Internal] Reviewed By: cortinico Differential Revision: D50327180 fbshipit-source-id: 6ee08fadd313828ddbc7702d5b3b1174a91b1ac1 --- .../src/commands/start/attachKeyHandlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js index 548a9e8f44d8..13eb813f7c82 100644 --- a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js +++ b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js @@ -103,7 +103,7 @@ export default function attachKeyHandlers({ `${chalk.bold('a')} - run on Android`, `${chalk.bold('d')} - open Dev Menu`, ...(experimentalDebuggerFrontend - ? [`${chalk.bold('j')} - open debugger (experimental)`] + ? [`${chalk.bold('j')} - open debugger (experimental, Hermes only)`] : []), `${chalk.bold('r')} - reload app`, '', From 6bc0444acc8d121db048371e41bae80ae024b342 Mon Sep 17 00:00:00 2001 From: 116-7 <1167@local> Date: Tue, 17 Oct 2023 10:08:05 -0700 Subject: [PATCH 054/190] =?UTF-8?q?Refactors=20InspectorProxy=20to=20compa?= =?UTF-8?q?re=20pathname=20portion=20of=20url=20passed=20in=E2=80=A6=20(#4?= =?UTF-8?q?1005)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: … request to local pathname comparator variables to fix issue with other rightward elements of url such as query or fragment entering the comparison and causing 404 errors for key debugging routes. A change in Chromium appended the query "?for_tabs" to the /json/list request made by Chrome DevTools to find remote debugger targets. The current comparison in InspectorProxy.js compares the entire node IncomingMessage url field to the local pathname constants. The issue arises as url can also contain the query and fragment portions so the original comparison of "/json/list" === "/json/list" which resolved as true would become "/json/list?for_tabs" === "/json/list" and evaluate to false ultimately resulting in a 404 for the request. In summary, all these changes/issues caused remote debugging of Hermes code in React Native apps to become unavailable, greatly impacting developer experience. ## Changelog: [GENERAL] [FIXED] JS Debugging: Fix inspector-proxy to allow for DevTools requests with query strings Pull Request resolved: https://github.com/facebook/react-native/pull/41005 Reviewed By: NickGerleman Differential Revision: D50342265 Pulled By: robhogan fbshipit-source-id: a65f2908f0bea9fc15e1e3e4e6d31a3b9598e81f --- .../dev-middleware/src/inspector-proxy/InspectorProxy.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js b/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js index 0cfb55a05ff1..2fd08a01a7e8 100644 --- a/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js +++ b/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js @@ -94,12 +94,13 @@ export default class InspectorProxy implements InspectorProxyQueries { response: ServerResponse, next: (?Error) => mixed, ) { + const pathname = url.parse(request.url).pathname; if ( - request.url === PAGES_LIST_JSON_URL || - request.url === PAGES_LIST_JSON_URL_2 + pathname === PAGES_LIST_JSON_URL || + pathname === PAGES_LIST_JSON_URL_2 ) { this._sendJsonResponse(response, this.getPageDescriptions()); - } else if (request.url === PAGES_LIST_JSON_VERSION_URL) { + } else if (pathname === PAGES_LIST_JSON_VERSION_URL) { this._sendJsonResponse(response, { Browser: 'Mobile JavaScript', 'Protocol-Version': '1.1', From db45da71018c9e6e93f6049116d87df7937b9cda Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 13 Oct 2023 10:07:10 -0700 Subject: [PATCH 055/190] Make sure buildConfig is turned on for all the 3rd party libraries (#40939) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40939 Currently some libs on RN 0.73 are broken as the default for Build Config generation changed from true to false since AGP 8.x. This reverts the behavior to the old flag. Closes #40791 Closes #40559 Changelog: [Internal] [Changed] - Make sure buildConfig is turned on for all the 3rd party libraries Reviewed By: mdvacca Differential Revision: D50270382 fbshipit-source-id: 02dcb031c577f65be2f41d9da0334c1b3d89e4c5 --- .../main/kotlin/com/facebook/react/ReactPlugin.kt | 6 ++++-- .../com/facebook/react/utils/AgpConfiguratorUtils.kt | 12 +++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt index 6ab11a38c079..68add445e197 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt @@ -12,7 +12,8 @@ import com.android.build.gradle.internal.tasks.factory.dependsOn import com.facebook.react.internal.PrivateReactExtension import com.facebook.react.tasks.GenerateCodegenArtifactsTask import com.facebook.react.tasks.GenerateCodegenSchemaTask -import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFields +import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForApp +import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForLibraries import com.facebook.react.utils.AgpConfiguratorUtils.configureDevPorts import com.facebook.react.utils.BackwardCompatUtils.configureBackwardCompatibilityReactMap import com.facebook.react.utils.DependencyUtils.configureDependencies @@ -64,7 +65,7 @@ class ReactPlugin : Plugin { } configureReactNativeNdk(project, extension) - configureBuildConfigFields(project, extension) + configureBuildConfigFieldsForApp(project, extension) configureDevPorts(project) configureBackwardCompatibilityReactMap(project) @@ -83,6 +84,7 @@ class ReactPlugin : Plugin { // Library and App Configurations configureJavaToolChains(project) + configureBuildConfigFieldsForLibraries(project) } private fun checkJvmVersion(project: Project) { diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt index 0312095b0fe7..4f19af3ff1d1 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt @@ -18,7 +18,7 @@ import org.gradle.api.plugins.AppliedPlugin @Suppress("UnstableApiUsage") internal object AgpConfiguratorUtils { - fun configureBuildConfigFields(project: Project, extension: ReactExtension) { + fun configureBuildConfigFieldsForApp(project: Project, extension: ReactExtension) { val action = Action { project.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> @@ -35,6 +35,16 @@ internal object AgpConfiguratorUtils { project.pluginManager.withPlugin("com.android.library", action) } + fun configureBuildConfigFieldsForLibraries(appProject: Project) { + appProject.rootProject.allprojects { subproject -> + subproject.pluginManager.withPlugin("com.android.library") { + subproject.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> + ext.buildFeatures.buildConfig = true + } + } + } + } + fun configureDevPorts(project: Project) { val devServerPort = project.properties["reactNativeDevServerPort"]?.toString() ?: DEFAULT_DEV_SERVER_PORT From 0344de246de0871b0a195eaf3d87f4c5623872a1 Mon Sep 17 00:00:00 2001 From: UNIDY2002 Date: Tue, 17 Oct 2023 05:46:53 -0700 Subject: [PATCH 056/190] Configure Java toolchains only when executing App configuration (#40757) Summary: Fix https://github.com/facebook/react-native/issues/40560 ## Changelog: [ANDROID] [FIXED] - Ensure that `configureJavaToolChains` is only executed once during configuration Pull Request resolved: https://github.com/facebook/react-native/pull/40757 Test Plan: - Create a fresh `react-native@0.73.0-rc.1` project - Install `react-native-webview` - Apply [this patch](https://github.com/react-native-webview/react-native-webview/pull/3175/files) for `react-native-webview` (caused by another issue https://github.com/facebook/react-native/issues/40559) - Edit `android/gradle.properties` and set `newArchEnabled` to true - Build application - (Expected) Application fail to build - Apply this PR - (Expected) Application build successfully **Additional explanation:** According to the implementation of `configureJavaToolChains`, all the subprojects (both the app and the libraries) will have their toolchains setup in one execution of the method. Therefore, it is okay for the method to be invoked only when configuring the plugin for the app. On the other hand, invoking the method for more than one time will cause the issue stated in https://github.com/facebook/react-native/issues/40560. Reviewed By: cipolleschi Differential Revision: D50361871 Pulled By: cortinico fbshipit-source-id: bd5e18df97988122788d0482dba954e517a0cb5c --- .../src/main/kotlin/com/facebook/react/ReactPlugin.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt index 68add445e197..6889f4c44486 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt @@ -68,6 +68,7 @@ class ReactPlugin : Plugin { configureBuildConfigFieldsForApp(project, extension) configureDevPorts(project) configureBackwardCompatibilityReactMap(project) + configureJavaToolChains(project) project.extensions.getByType(AndroidComponentsExtension::class.java).apply { onVariants(selector().all()) { variant -> @@ -78,13 +79,10 @@ class ReactPlugin : Plugin { } // Library Only Configuration + configureBuildConfigFieldsForLibraries(project) project.pluginManager.withPlugin("com.android.library") { configureCodegen(project, extension, rootExtension, isLibrary = true) } - - // Library and App Configurations - configureJavaToolChains(project) - configureBuildConfigFieldsForLibraries(project) } private fun checkJvmVersion(project: Project) { From 2d163cf496c3732883ff95046eb74363398ad715 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 5 Oct 2023 15:09:18 -0700 Subject: [PATCH 057/190] Fix instacrash on bridgeless due to calling showMessage on null instance (#39834) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39834 Bridgeless is instacrashing on fast-refresh. This fixes it. Changelog: [Android] [Fixed] - Fix instacrash on bridgeless due to calling showMessage on null instance Reviewed By: cipolleschi Differential Revision: D49929822 fbshipit-source-id: a2ce65797abd34d6a3e2b7f2c50d38a62ea8bdea --- .../facebook/react/modules/devloading/DevLoadingModule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java index 4eaa3f2d0b9a..f5e3cf13cb3b 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java @@ -46,7 +46,9 @@ public void showMessage(final String message, final Double color, final Double b new Runnable() { @Override public void run() { - mDevLoadingViewManager.showMessage(message); + if (mDevLoadingViewManager != null) { + mDevLoadingViewManager.showMessage(message); + } } }); } From 7193bd720b1035efdfa5b66fe7667554b3b736d1 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Mon, 16 Oct 2023 06:21:07 -0700 Subject: [PATCH 058/190] Re-introduce FabricViewStateManager interface (#40998) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40998 changelog: [Android] Add back interface FabricViewStateManager to unblock 0.73 I incorrectly deleted FabricViewStateManager in D47993140. This is a breaking change even for old architecture. Let's add it back and mark it as deprected so we can remove it later on. This interface is not used in react-native anymore. We are removing FabricViewStateManager because it simply wraps StateWrapper and provides no additional anymore. Reviewed By: cortinico Differential Revision: D50318633 fbshipit-source-id: aeb1c66c35018e336339616b564dee6f3156b54b --- .../uimanager/FabricViewStateManager.java | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FabricViewStateManager.java diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FabricViewStateManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FabricViewStateManager.java new file mode 100644 index 000000000000..02ea431f7f48 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FabricViewStateManager.java @@ -0,0 +1,95 @@ +/* + * 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. + */ + +package com.facebook.react.uimanager; + +import androidx.annotation.Nullable; +import com.facebook.common.logging.FLog; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.WritableMap; + +/** + * This is a helper base class for ViewGroups that use Fabric State. + * + *

Reason to use this: UpdateState calls from the View layer to the Fabric core can fail, and + * optionally Fabric will call a "failure callback" if that happens. This class abstracts that and + * makes it easier ensure that State in Fabric is always up-to-date. + * + *

1. Whenever ViewManager.updateState is called, call View.setStateWrapper. 2. Instead of + * calling StateWrapper.updateState directly, call View.setState and it will automatically keep + * retrying the UpdateState call until it succeeds; or you call setState again; or the View layer is + * updated with a newer StateWrapper. + */ +@Deprecated( + since = + "Deprecated class since v0.73.0, please use com.facebook.react.uimanager.StateWrapper instead.", + forRemoval = true) +public class FabricViewStateManager { + private static final String TAG = "FabricViewStateManager"; + + @Deprecated + public interface HasFabricViewStateManager { + FabricViewStateManager getFabricViewStateManager(); + } + + @Deprecated + public interface StateUpdateCallback { + WritableMap getStateUpdate(); + } + + @Nullable private StateWrapper mStateWrapper = null; + + @Deprecated + public void setStateWrapper(StateWrapper stateWrapper) { + mStateWrapper = stateWrapper; + } + + @Deprecated + public boolean hasStateWrapper() { + return mStateWrapper != null; + } + + private void setState( + @Nullable final StateWrapper stateWrapper, + final StateUpdateCallback stateUpdateCallback, + final int numTries) { + // The StateWrapper will change, breaking the async loop, whenever the UpdateState MountItem + // is executed. + // The caller is responsible for detecting if data is up-to-date, and doing nothing, or + // detecting if state is stale and calling setState again. + if (stateWrapper == null) { + FLog.e(TAG, "setState called without a StateWrapper"); + return; + } + if (stateWrapper != mStateWrapper) { + return; + } + // We bail out after an arbitrary number of tries. In practice this should never go higher + // than 2 or 3, but there's nothing guaranteeing that. + if (numTries > 60) { + return; + } + + @Nullable WritableMap stateUpdate = stateUpdateCallback.getStateUpdate(); + if (stateUpdate == null) { + return; + } + + // TODO: State update cannot fail; remove `failureRunnable` and custom retrying logic. + stateWrapper.updateState(stateUpdate); + } + + @Deprecated + public void setState(final StateUpdateCallback stateUpdateCallback) { + setState(mStateWrapper, stateUpdateCallback, 0); + } + + @Deprecated + public @Nullable ReadableMap getStateData() { + return mStateWrapper != null ? mStateWrapper.getStateData() : null; + } +} From 034d815cfdf202a969f4d6a5662bcdcaacba587c Mon Sep 17 00:00:00 2001 From: Lulu Wu Date: Wed, 11 Oct 2023 09:56:27 -0700 Subject: [PATCH 059/190] Add ExceptionsManagerModule for RNTester (#40767) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40767 Fix the following issue: ```Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'ExceptionsManager' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: true. TurboModule interop: true. Modules loaded: {"NativeModules":[],"TurboModules": ["PlatformConstants","AppState","SourceCode","BlobModule","WebSocketModule","DevSettings","DevToolsSettingsManager","LogBox","Networking","Appearance","DevLoadingView","DeviceInfo","DeviceEventManager", "SoundManager","ImageLoader","DialogManagerAndroid","NativeAnimatedModule","I18nManager","AccessibilityInfo","StatusBarManager","StatusBarManager","IntentAndroid","ToastAndroid","ShareModule","Vibration"], "NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","RedBox","BugReporting","HeadlessJsTaskSupport","FrameRateLogger","KeyboardObserver", "AccessibilityManager","ModalManager","LinkingManager","ActionSheetManager","ExceptionsManager"]} ``` Changelog: [Android][Changed] - Add Add ExceptionsManagerModule to CoreReactPackage Reviewed By: cortinico Differential Revision: D50017783 fbshipit-source-id: 8642bb23bdae50a1e702f5e0586b0ede80007bb1 # Conflicts: # packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.kt --- .../java/com/facebook/react/runtime/CoreReactPackage.java | 5 +++++ .../java/com/facebook/react/uiapp/RNTesterApplication.java | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.java index 5ed3e4aa8d11..7ba138cd6b96 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.java @@ -19,6 +19,7 @@ import com.facebook.react.module.model.ReactModuleInfoProvider; import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; import com.facebook.react.modules.core.DeviceEventManagerModule; +import com.facebook.react.modules.core.ExceptionsManagerModule; import com.facebook.react.modules.debug.DevSettingsModule; import com.facebook.react.modules.debug.SourceCodeModule; import com.facebook.react.modules.deviceinfo.DeviceInfoModule; @@ -36,6 +37,7 @@ SourceCodeModule.class, LogBoxModule.class, DeviceEventManagerModule.class, + ExceptionsManagerModule.class, }) class CoreReactPackage extends TurboReactPackage { @@ -63,6 +65,8 @@ public NativeModule getModule(String name, ReactApplicationContext reactContext) return new DeviceEventManagerModule(reactContext, mHardwareBackBtnHandler); case LogBoxModule.NAME: return new LogBoxModule(reactContext, mDevSupportManager); + case ExceptionsManagerModule.NAME: + return new ExceptionsManagerModule(mDevSupportManager); default: throw new IllegalArgumentException( "In BridgelessReactPackage, could not find Native module for " + name); @@ -85,6 +89,7 @@ public ReactModuleInfoProvider getReactModuleInfoProvider() { DevSettingsModule.class, DeviceEventManagerModule.class, LogBoxModule.class, + ExceptionsManagerModule.class, }; final Map reactModuleInfoMap = new HashMap<>(); for (Class moduleClass : moduleList) { diff --git a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java index 8bf2493c5a89..a1c02a8f005f 100644 --- a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java +++ b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java @@ -170,9 +170,6 @@ public void onCreate() { @Override public ReactNativeHost getReactNativeHost() { - if (ReactFeatureFlags.enableBridgelessArchitecture) { - throw new RuntimeException("Should not use ReactNativeHost when Bridgeless enabled"); - } return mReactNativeHost; } From 20d1466be890045ea690dc4f95e7e1978b11a4c0 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 6 Oct 2023 11:38:59 -0700 Subject: [PATCH 060/190] Fix compilation warnings introduced by Gradle 8.4 (#39959) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39959 We're still accessing project.buildDir which will be removed in Gradle 9.0 I'm cleaning it up here. Changelog: [Internal] [Changed] - Fix compilation warnings introduced by Gradle 8.4 Reviewed By: yungsters Differential Revision: D50016573 fbshipit-source-id: de7a725f61b503f08991ebf85b9a002cefab221a --- packages/react-native-gradle-plugin/build.gradle.kts | 1 + .../src/main/kotlin/com/facebook/react/TaskConfiguration.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-native-gradle-plugin/build.gradle.kts b/packages/react-native-gradle-plugin/build.gradle.kts index 8934f0f30ba3..c4a31beb010e 100644 --- a/packages/react-native-gradle-plugin/build.gradle.kts +++ b/packages/react-native-gradle-plugin/build.gradle.kts @@ -66,6 +66,7 @@ tasks.withType().configureEach { apiVersion = "1.5" // See comment above on JDK 11 support jvmTarget = "11" + allWarningsAsErrors = true } } diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt index ed5551d0987f..e839e5c37ba3 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt @@ -23,6 +23,7 @@ internal fun Project.configureReactTasks(variant: Variant, config: ReactExtensio val targetName = variant.name.capitalizeCompat() val targetPath = variant.name + val buildDir = this.layout.buildDirectory.get().asFile // Resources: generated/assets/react//index.android.bundle val resourcesDir = File(buildDir, "generated/res/react/$targetPath") // Bundle: generated/assets/react//index.android.bundle From becb3696013a593ff928ae5377836f3218ccea10 Mon Sep 17 00:00:00 2001 From: DeokHyeon Wi Date: Tue, 17 Oct 2023 08:17:11 -0700 Subject: [PATCH 061/190] update: fresco 3.0.0 -> 3.1.0 (#41024) Summary: - ref: https://github.com/reactwg/react-native-releases/discussions/64#discussioncomment-7270126 With react-native@0.73.0-rc.2 and fresco@3.0.0, `dlopen failed: library "libnative-imagetranscoder.so"` error made crash in android. so, I patched fresco version to 3.1.0, so that resolves the crash error according to https://github.com/facebook/fresco/issues/2722#issuecomment-1749333089 this comment. ## Changelog: [ANDROID] [FIXED] - b1fccb05ccb306005dc7616a4eaaa182b0b1deaf bumped fresco version to 3.1.0. Pull Request resolved: https://github.com/facebook/react-native/pull/41024 Test Plan: after bumping fresco version, error not occurs. Reviewed By: cipolleschi Differential Revision: D50359564 Pulled By: cortinico fbshipit-source-id: d24caecc057bad4d9c94e378422ab18c106a7ee6 # Conflicts: # packages/react-native/gradle/libs.versions.toml --- packages/react-native/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/gradle/libs.versions.toml b/packages/react-native/gradle/libs.versions.toml index 85876f065cda..e6b790892f9f 100644 --- a/packages/react-native/gradle/libs.versions.toml +++ b/packages/react-native/gradle/libs.versions.toml @@ -16,7 +16,7 @@ assertj = "3.21.0" download = "5.4.0" fbjni = "0.5.1" flipper = "0.201.0" -fresco = "3.0.0" +fresco = "3.1.0" infer-annotation = "0.18.0" javax-inject = "1" jsr305 = "3.0.2" From efcb84126ed4b12c5c39775d1ac074852a33a56f Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 16 Oct 2023 07:04:38 -0700 Subject: [PATCH 062/190] =?UTF-8?q?Rename=20`RCTRootViewFrameDidChangeNoti?= =?UTF-8?q?fication`=20as=20it's=20not=20trac=E2=80=A6=20(#39835)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: …king root view frame changes Looking through where this was introduced (https://github.com/facebook/react-native/pull/37649), it seems the notification went from tracking root view size changes to window size changes. However, it was not renamed. I was using it for root view changes in RN-macOS, which.. I guess I'll refactor. Meanwhile, let's update the name? ## Changelog: [IOS] [CHANGED] - Rename `RCTRootViewFrameDidChangeNotification` as it's not tracking root view frame changes Pull Request resolved: https://github.com/facebook/react-native/pull/39835 Test Plan: CI should pass Reviewed By: cipolleschi Differential Revision: D50173742 Pulled By: javache fbshipit-source-id: 4651696174c439800984a5e6cf642200bb9c4f3c --- packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm | 2 +- packages/react-native/React/Base/RCTConstants.h | 2 +- packages/react-native/React/Base/RCTConstants.m | 2 +- packages/react-native/React/CoreModules/RCTDeviceInfo.mm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index d666fe31c100..7f8163ed2f8c 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -192,7 +192,7 @@ - (void)windowScene:(UIWindowScene *)windowScene interfaceOrientation:(UIInterfaceOrientation)previousInterfaceOrientation traitCollection:(UITraitCollection *)previousTraitCollection API_AVAILABLE(ios(13.0)) { - [[NSNotificationCenter defaultCenter] postNotificationName:RCTRootViewFrameDidChangeNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:RCTWindowFrameDidChangeNotification object:self]; } #pragma mark - RCTCxxBridgeDelegate diff --git a/packages/react-native/React/Base/RCTConstants.h b/packages/react-native/React/Base/RCTConstants.h index 54d3a470543a..e94adea579f9 100644 --- a/packages/react-native/React/Base/RCTConstants.h +++ b/packages/react-native/React/Base/RCTConstants.h @@ -12,7 +12,7 @@ RCT_EXTERN NSString *const RCTPlatformName; RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotification; RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollectionKey; -RCT_EXTERN NSString *const RCTRootViewFrameDidChangeNotification; +RCT_EXTERN NSString *const RCTWindowFrameDidChangeNotification; /** * This notification fires when the bridge initializes. diff --git a/packages/react-native/React/Base/RCTConstants.m b/packages/react-native/React/Base/RCTConstants.m index 056f6095d8fc..5f2376cbbafc 100644 --- a/packages/react-native/React/Base/RCTConstants.m +++ b/packages/react-native/React/Base/RCTConstants.m @@ -12,7 +12,7 @@ NSString *const RCTUserInterfaceStyleDidChangeNotification = @"RCTUserInterfaceStyleDidChangeNotification"; NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollectionKey = @"traitCollection"; -NSString *const RCTRootViewFrameDidChangeNotification = @"RCTRootViewFrameDidChangeNotification"; +NSString *const RCTWindowFrameDidChangeNotification = @"RCTWindowFrameDidChangeNotification"; NSString *const RCTJavaScriptDidFailToLoadNotification = @"RCTJavaScriptDidFailToLoadNotification"; NSString *const RCTJavaScriptDidLoadNotification = @"RCTJavaScriptDidLoadNotification"; diff --git a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm index f2d55e334a9a..38f8118c7337 100644 --- a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm +++ b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm @@ -73,7 +73,7 @@ - (void)initialize [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(interfaceFrameDidChange) - name:RCTRootViewFrameDidChangeNotification + name:RCTWindowFrameDidChangeNotification object:nil]; } From ba5895e190a4fdfc259c696a4c840029e3bed374 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 17 Oct 2023 05:40:06 -0700 Subject: [PATCH 063/190] Fix unstable RCTAppDelegate podspec (#41009) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41009 This change should fix [#39971](https://github.com/facebook/react-native/issues/39971), computing the relative path from the App path to the pod installation root and using that instead of the absolute path to the `react-native.config.js` file ## Changelog [Internal] - Stabilize RCTAppDelegate podspec Reviewed By: cortinico Differential Revision: D50323710 fbshipit-source-id: e29e62228d08c752e822d7a9ab5b1a2b5dcd6eb4 --- .../Libraries/AppDelegate/React-RCTAppDelegate.podspec | 8 ++++++-- .../codegen/generate-legacy-interop-components.js | 10 ++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec index 1da904f8946f..04796aacd5b6 100644 --- a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +++ b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec @@ -117,15 +117,19 @@ Pod::Spec.new do |s| s.dependency "React-debug" s.dependency "React-rendererdebug" + rel_path_from_pods_root_to_app = Pathname.new(ENV['APP_PATH']).relative_path_from(Pod::Config.instance.installation_root) + rel_path_from_pods_to_app = Pathname.new(ENV['APP_PATH']).relative_path_from(File.join(Pod::Config.instance.installation_root, 'Pods')) + + s.script_phases = { :name => "Generate Legacy Components Interop", :script => " WITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\" source $WITH_ENVIRONMENT -${NODE_BINARY} ${REACT_NATIVE_PATH}/scripts/codegen/generate-legacy-interop-components.js -p #{ENV['APP_PATH']} -o ${REACT_NATIVE_PATH}/Libraries/AppDelegate +${NODE_BINARY} ${REACT_NATIVE_PATH}/scripts/codegen/generate-legacy-interop-components.js -p #{rel_path_from_pods_to_app} -o ${REACT_NATIVE_PATH}/Libraries/AppDelegate ", :execution_position => :before_compile, - :input_files => ["#{ENV['APP_PATH']}/react-native.config.js"], + :input_files => ["#{rel_path_from_pods_root_to_app}/react-native.config.js"], :output_files => ["${REACT_NATIVE_PATH}/Libraries/AppDelegate/RCTLegacyInteropComponents.mm"], } end diff --git a/packages/react-native/scripts/codegen/generate-legacy-interop-components.js b/packages/react-native/scripts/codegen/generate-legacy-interop-components.js index 49ac074c9164..fc94a96080cd 100644 --- a/packages/react-native/scripts/codegen/generate-legacy-interop-components.js +++ b/packages/react-native/scripts/codegen/generate-legacy-interop-components.js @@ -11,6 +11,7 @@ const yargs = require('yargs'); const fs = require('fs'); +const p = require('path'); const CONFIG_FILE_NAME = 'react-native.config.js'; const PROJECT_FIELD = 'project'; @@ -93,7 +94,11 @@ function extractComponentsNames(reactNativeConfig) { } function generateRCTLegacyInteropComponents() { - const configFilePath = `${appRoot}/${CONFIG_FILE_NAME}`; + const cwd = process.cwd(); + const configFilePath = p.join(cwd, appRoot, CONFIG_FILE_NAME); + console.log( + `Looking for a react-native.config.js file at ${configFilePath}...`, + ); let reactNativeConfig = null; try { reactNativeConfig = require(configFilePath); @@ -107,7 +112,7 @@ function generateRCTLegacyInteropComponents() { console.log('Skip LegacyInterop generation'); return; } - + console.log(`Components found: ${componentNames}`); let componentsArray = componentNames.map(name => `\t\t\t@"${name}",`); // Remove the last comma if (componentsArray.length > 0) { @@ -118,6 +123,7 @@ function generateRCTLegacyInteropComponents() { const filePath = `${outputPath}/${OUTPUT_FILE_NAME}`; fs.writeFileSync(filePath, fileBody(componentsArray.join('\n'))); + console.log(`${filePath} updated!`); } generateRCTLegacyInteropComponents(); From c4c8b4b95ab27508941f1553ab699bda38909137 Mon Sep 17 00:00:00 2001 From: Oscar Franco Date: Tue, 17 Oct 2023 05:12:47 -0700 Subject: [PATCH 064/190] Symbolicate unhandled promise rejections (#40914) Summary: For a very long time when a promise rejects without an attached catch we get this warning screen without a correct stack trace, only some internal calls to the RN internals. I created [an issue for discussion](https://github.com/react-native-community/discussions-and-proposals/discussions/718) in the react-native-community repo and we figured out it was only a matter of symbolication. While it cannot be done on release without external packages and source maps, at least while developing we can provide a symbolicated stack-trace so developers can better debug the source of rejected promise. I got the stack trace symbolicated and the correct code frame. I'm missing some help trying to display it in the warning view but at the very least I can now correctly show the line of the error and log the codeframe to the console. ## Changelog: [ANDROID] [FIXED] - Fix textTransform not working in new architecture Pull Request resolved: https://github.com/facebook/react-native/pull/41223 Test Plan: **Before:** image **After:** image Reviewed By: javache Differential Revision: D50773216 Pulled By: NickGerleman fbshipit-source-id: 769bf67f2661ff4ff7b88121493bdd27564458d3 --- .../com/facebook/react/views/text/TextAttributeProps.java | 5 ++++- .../react/renderer/attributedstring/conversions.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java index eb03a50743f0..c5484cd0b849 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java @@ -59,6 +59,7 @@ public class TextAttributeProps { public static final short TA_KEY_ACCESSIBILITY_ROLE = 24; public static final short TA_KEY_LINE_BREAK_STRATEGY = 25; public static final short TA_KEY_ROLE = 26; + public static final short TA_KEY_TEXT_TRANSFORM = 27; public static final int UNSET = -1; @@ -219,6 +220,9 @@ public static TextAttributeProps fromMapBuffer(MapBuffer props) { case TA_KEY_ROLE: result.setRole(Role.values()[entry.getIntValue()]); break; + case TA_KEY_TEXT_TRANSFORM: + result.setTextTransform(entry.getStringValue()); + break; } } @@ -226,7 +230,6 @@ public static TextAttributeProps fromMapBuffer(MapBuffer props) { // setNumberOfLines // setColor // setIncludeFontPadding - // setTextTransform return result; } diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h index 9b562666bc79..445e452e1f4d 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h @@ -970,6 +970,7 @@ constexpr static MapBuffer::Key TA_KEY_LAYOUT_DIRECTION = 23; constexpr static MapBuffer::Key TA_KEY_ACCESSIBILITY_ROLE = 24; constexpr static MapBuffer::Key TA_KEY_LINE_BREAK_STRATEGY = 25; constexpr static MapBuffer::Key TA_KEY_ROLE = 26; +constexpr static MapBuffer::Key TA_KEY_TEXT_TRANSFORM = 27; // constants for ParagraphAttributes serialization constexpr static MapBuffer::Key PA_KEY_MAX_NUMBER_OF_LINES = 0; @@ -1077,6 +1078,11 @@ inline MapBuffer toMapBuffer(const TextAttributes& textAttributes) { TA_KEY_LINE_BREAK_STRATEGY, toString(*textAttributes.lineBreakStrategy)); } + if (textAttributes.textTransform.has_value()) { + builder.putString( + TA_KEY_TEXT_TRANSFORM, toString(*textAttributes.textTransform)); + } + // Decoration if (textAttributes.textDecorationColor) { builder.putInt( From 29f8f1e196e3891023afb02fb5a87bb21df3ad79 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 31 Oct 2023 16:49:58 -0700 Subject: [PATCH 094/190] Bail on hiPri render on missing layout data before checking priority (#41270) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41270 `scheduleCellsToRenderUpdate()` is called in response to new measurements, or component changes. It has logic to decide whether to immediately calculate new state, or to defer it until a later batched period. It will not immediately update state if we don't yet have measurements for cells, but this condition is after another which calculates priority, relying on these measurements. These are garbage if we don't yet have measurements, and trigger an invariant violation in horizontal RTL. This switches around the conditions, to avoid offset resolution if we don't yet have valid measurements. I suspect some "hiPri" renders where cells shift are bugged right now when we update state in response to content size change, before we have new corresponding cell layouts. Changelog: [General][Fixed] - Bail on hiPri render on missing layout data before checking priority Reviewed By: yungsters Differential Revision: D50791506 fbshipit-source-id: 8dbffc37edd2a42f7842c0090d344dcd6f3e3c6d --- packages/virtualized-lists/Lists/VirtualizedList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/virtualized-lists/Lists/VirtualizedList.js b/packages/virtualized-lists/Lists/VirtualizedList.js index dcd9cbaaeb10..70b2e20c5e47 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.js +++ b/packages/virtualized-lists/Lists/VirtualizedList.js @@ -1748,8 +1748,9 @@ class VirtualizedList extends StateSafePureComponent { // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate // We shouldn't do another hipri cellToRenderUpdate if ( + (this._listMetrics.getAverageCellLength() > 0 || + this.props.getItemLayout != null) && this._shouldRenderWithPriority() && - (this._listMetrics.getAverageCellLength() || this.props.getItemLayout) && !this._hiPriInProgress ) { this._hiPriInProgress = true; From 7aa46a169eef5639729799d45ba4381e2c0a7a9f Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Wed, 25 Oct 2023 05:59:19 -0700 Subject: [PATCH 095/190] Fix `createAnimatedStyle` when providing undefined transform style (#41176) Summary: https://github.com/facebook/react-native/pull/35198 introduced a regression where if an `{transform: undefined}` style is provided to an Animated View a `Cannot read property 'map' of undefined` type error is thrown ## Changelog: [GENERAL] [FIXED] - Fix `createAnimatedStyle` when providing an undefined transform style Pull Request resolved: https://github.com/facebook/react-native/pull/41176 Test Plan:

Render an `Animated.View` passing `style={{transform: undefined}}` E.g. ``` const UndefinedTransform = () => { return ( ); }; ```
### RNTester 1. Open the RNTester app and navigate to the Animated page 2. Navigate to the Transform Styles page 3. App should not throw any errors
BeforeAfter
Reviewed By: fabriziocucci Differential Revision: D50638415 Pulled By: javache fbshipit-source-id: 0ee949f019a77b8bef557888694e0e8404810105 --- .../react-native/Libraries/Animated/nodes/AnimatedStyle.js | 2 +- .../js/examples/Animated/TransformStylesExample.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js b/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js index 8fdc6532aeb2..8766d5e913b7 100644 --- a/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js +++ b/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js @@ -30,7 +30,7 @@ function createAnimatedStyle( const animatedStyles: any = {}; for (const key in style) { const value = style[key]; - if (key === 'transform') { + if (value != null && key === 'transform') { animatedStyles[key] = ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform() ? new AnimatedObject(value) diff --git a/packages/rn-tester/js/examples/Animated/TransformStylesExample.js b/packages/rn-tester/js/examples/Animated/TransformStylesExample.js index 60a90bc107a5..d9467354097d 100644 --- a/packages/rn-tester/js/examples/Animated/TransformStylesExample.js +++ b/packages/rn-tester/js/examples/Animated/TransformStylesExample.js @@ -123,6 +123,10 @@ function AnimatedTransformStyleExample(): React.Node { property => properties[property].selected, )} /> + + {'Should not crash when transform style key is undefined'} + + ); } @@ -149,6 +153,9 @@ const styles = StyleSheet.create({ marginBottom: 6, borderBottomWidth: 1, }, + section: { + marginTop: 20, + }, }); export default ({ From 31ce64073fc3673451b81da4661cd38bcfd7a977 Mon Sep 17 00:00:00 2001 From: Rob Hogan Date: Fri, 13 Oct 2023 08:24:09 -0700 Subject: [PATCH 096/190] Bump dependency on `deprecated-react-native-prop-types` (#40869) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40869 Bumps DRNPT to v5 - the significant change is that this one depends on `react-native/normalize-color: ^0.73.0`, instead of `*`, so is protected from future breaking changes to that package. NOTE: We can't safely include `react-native/normalize-color: ^0.74.0` in the dependency range of DRNPT because `0.74.0` isn't a semver-compliant release (0.74 isn't cut yet), so this will pull 0.73.2 from NPM, which is fine. We may need to publish DRNPT@6 if 0.74 final turns out to contain breaking changes (eg, a Node 20 bump). Changelog: [General][Fixed] Update `deprecated-react-native-prop-types` to remove fragile transitive `*` dependencies. Reviewed By: huntie Differential Revision: D50228564 fbshipit-source-id: 01aafafad40d9a93d00de2b5f45d2796620b9b5d --- packages/react-native/package.json | 2 +- yarn.lock | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 1762f0764387..f9b4a847105a 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -107,7 +107,7 @@ "anser": "^1.4.9", "ansi-regex": "^5.0.0", "base64-js": "^1.5.1", - "deprecated-react-native-prop-types": "4.2.1", + "deprecated-react-native-prop-types": "^5.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", diff --git a/yarn.lock b/yarn.lock index d8798ec24b71..afc9c268bf56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2520,6 +2520,11 @@ prompts "^2.4.2" semver "^7.5.2" +"@react-native/normalize-colors@^0.73.0": + version "0.73.2" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.2.tgz#cc8e48fbae2bbfff53e12f209369e8d2e4cf34ec" + integrity sha512-bRBcb2T+I88aG74LMVHaKms2p/T8aQd8+BZ7LuuzXlRfog1bMWWn/C5i0HVuvW4RPtXQYgIlGiXVDy9Ir1So/w== + "@rnx-kit/rn-changelog-generator@^0.4.0": version "0.4.0" resolved "https://registry.yarnpkg.com/@rnx-kit/rn-changelog-generator/-/rn-changelog-generator-0.4.0.tgz#637d87bcf8de6e87599930ed88d9375010277660" @@ -4204,14 +4209,14 @@ depd@2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -deprecated-react-native-prop-types@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-4.2.1.tgz#8cc990ff5319fec8306e7e8f30389a92978a7231" - integrity sha512-ef9AXisRrRhxuxd7d+noOEeGTtxIPVkfOQWf9WZUWuOqI+gs7P7hKTi49Rgb/dfvkmFULhwxO2UqAkH4nJsMfw== +deprecated-react-native-prop-types@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-5.0.0.tgz#02a12f090da7bd9e8c3ac53c31cf786a1315d302" + integrity sha512-cIK8KYiiGVOFsKdPMmm1L3tA/Gl+JopXL6F5+C7x39MyPsQYnP57Im/D6bNUzcborD7fcMwiwZqcBdBXXZucYQ== dependencies: - "@react-native/normalize-colors" "*" - invariant "*" - prop-types "*" + "@react-native/normalize-colors" "^0.73.0" + invariant "^2.2.4" + prop-types "^15.8.1" deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" @@ -5679,7 +5684,7 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= -invariant@*, invariant@^2.2.4: +invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -7830,7 +7835,7 @@ prompts@^2.0.1, prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*, prop-types@^15.8.1: +prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== From 126db5eb657ca919becbd14f6915e56262744176 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 2 Nov 2023 14:46:36 -0700 Subject: [PATCH 097/190] Bump CLI to 12.0.0 --- packages/react-native/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index f9b4a847105a..85ce4fc2b5da 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -93,9 +93,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.0.0-alpha.17", - "@react-native-community/cli-platform-android": "12.0.0-alpha.17", - "@react-native-community/cli-platform-ios": "12.0.0-alpha.17", + "@react-native-community/cli": "12.0.0", + "@react-native-community/cli-platform-android": "12.0.0", + "@react-native-community/cli-platform-ios": "12.0.0", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.7", "@react-native/codegen": "^0.73.1", From cddd0e17d1b8d4a3fcb018f903cc894fbe821aae Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 27 Oct 2023 08:03:04 -0700 Subject: [PATCH 098/190] Make the interop-layer work with components with custom name (#41207) Summary: This should fix https://github.com/facebook/react-native/issues/37905#issuecomment-1774851214 When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class. To fix this, we can use the Bridge to retrieve the actual view manager, given the component name. This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName. On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that. bypass-github-export-checks [iOS][Fixed] - Add support for Components with custom names in the interop layer. Pull Request resolved: https://github.com/facebook/react-native/pull/41207 Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode. Reviewed By: cortinico Differential Revision: D50698172 Pulled By: cipolleschi fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029 --- ...cyViewManagerInteropComponentDescriptor.mm | 26 +++- .../RCTLegacyViewManagerInteropCoordinator.mm | 4 + packages/rn-tester/Podfile.lock | 112 ++++++++---------- 3 files changed, 79 insertions(+), 63 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm index c0f3c2f80282..5ecfdce4ee0b 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm @@ -74,13 +74,29 @@ static Class getViewManagerFromComponentName(const std::string &componentName) return nil; } +static Class getViewManagerClass(const std::string &componentName, RCTBridge *bridge, RCTBridgeProxy *bridgeProxy) +{ + Class viewManager = getViewManagerFromComponentName(componentName); + if (viewManager != nil) { + return viewManager; + } + + // If all the heuristics fail, let's try to retrieve the view manager from the bridge/bridgeProxy + if (bridge != nil) { + return [[bridge moduleForName:RCTNSStringFromString(componentName)] class]; + } + + if (bridgeProxy != nil) { + return [[bridgeProxy moduleForName:RCTNSStringFromString(componentName) lazilyLoadIfNecessary:YES] class]; + } + + return nil; +} + static const std::shared_ptr constructCoordinator( const ContextContainer::Shared &contextContainer, const ComponentDescriptor::Flavor &flavor) { - auto componentName = *std::static_pointer_cast(flavor); - Class viewManagerClass = getViewManagerFromComponentName(componentName); - assert(viewManagerClass); auto optionalBridge = contextContainer->find>("Bridge"); RCTBridge *bridge; if (optionalBridge) { @@ -93,6 +109,10 @@ static Class getViewManagerFromComponentName(const std::string &componentName) bridgeProxy = unwrapManagedObjectWeakly(optionalBridgeProxy.value()); } + auto componentName = *std::static_pointer_cast(flavor); + Class viewManagerClass = getViewManagerClass(componentName, bridge, bridgeProxy); + assert(viewManagerClass); + auto optionalEventDispatcher = contextContainer->find>("RCTEventDispatcher"); RCTEventDispatcher *eventDispatcher; if (optionalEventDispatcher) { diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm index f114594fd3ed..afaea7424dd5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm @@ -101,6 +101,10 @@ - (void)setProps:(const folly::dynamic &)props forView:(UIView *)view if (props.isObject()) { NSDictionary *convertedProps = convertFollyDynamicToId(props); [_componentData setProps:convertedProps forView:view]; + + if ([view respondsToSelector:@selector(didSetProps:)]) { + [view performSelector:@selector(didSetProps:) withObject:[convertedProps allKeys]]; + } } } diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 81bb77f3c990..0b4b7ef134d3 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1083,6 +1083,7 @@ PODS: - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-callinvoker + - React-cxxreact - React-debug - React-jsi - React-rendererdebug @@ -1339,69 +1340,60 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: 6bf08f4ec7e5ad995785947b33a45d2e731f30b2 - FBReactNativeSpec: 41e1ff7a9532d81edd17c261928a8208329bc01d - Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f - fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 + FBLazyVector: a9d04c15a139b6d2b411dc48c14d0e5ccedb4dfc + FBReactNativeSpec: 2a0c0cdd738003bf9f6b8ee678e55f5a40ae555b + fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 2c487f00303f41fec0702a6d999b5d949526ac3b + hermes-engine: 9860d876ccc006c2922d12ee7e991a449fad22e1 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 32ebc31aa79b75afc4de5cb92c1446bc95847b08 - RCTTypeSafety: de7153ab41f6d4c8d2282ef8207b4b55c9b5585d - React: 3e9487e9f214a6d9cd62e5224c2eb9bba67551f6 - React-callinvoker: 9dd1c26bc733dc30b909c6fbf5ac7e76c296cd82 - React-Codegen: 5ca1a9110c3b0a5960b72b8c4a49bd8de4a6dfac - React-Core: b83d734749cc514132e92d8211b294e423d5ef5e - React-CoreModules: fdb5751397032854376cbd0240efd9e63058953b - React-cxxreact: bbacddd4a987fc110de82a609f35539bacc21366 - React-debug: 6f09b5ef6c82cd75ffe1ca68cccc5ae26d7fcc64 - React-Fabric: aa979c14b8c712e602ed3fa6f8e21be3b5cbe418 - React-FabricImage: 94d7e6829feb554395c9da39bf9462e83ee7656f - React-graphics: fc84a4dca68bd9e31af260ffc1dc5bd08f23916f - React-hermes: f3c199b3faf96e50a51ced6aa23f9e8b9e07b8a7 - React-ImageManager: 09370f69b8e0316eb4d9c4c8ff87615a475360e8 - React-jserrorhandler: 84cfe02fe1cf10136ca0e89bf26d5e8c8165dba8 - React-jsi: 3ec3843cacf043059319da39ef9931b3eb26762e - React-jsiexecutor: 12adc887e6dbd9fb5acf799e86c4b67b701b8258 - React-jsinspector: 46c3df92de409e85a3646d9990f95a63267d73db - React-logger: 4d7e6eff6f0ce843c2e1556e12c3f036807aa827 - React-Mapbuffer: f24a86cafcac5d74ca7db6fb0514c5a94d6ea5d6 - React-nativeconfig: b9cf6f3a5bfca7b1f694330a19e8a38855724330 - React-NativeModulesApple: b2d59e28b77c0cdda582dfb4a1da057d34446514 - React-perflogger: bc4beedce067adb4517fbf550b1d8dc6f5032dee - React-RCTActionSheet: ef9c81c111c5a08575bd0f50b27224a3b22b9b63 - React-RCTAnimation: 7b960ca1c7182b3538bd2b23fe4a279d1f249499 - React-RCTAppDelegate: 01954c7dfce9f6765d86059482048378222c72a4 - React-RCTBlob: a585d47dd2a0cc1e808ed6726cecbd68a3db574a - React-RCTFabric: b25d16dd910e0cb3abec2dab1ae39c85fdc4424e - React-RCTImage: a096cf8edf17f8ae7b038998370046c1bf9b0196 - React-RCTLinking: 251ecf78776fbd4da21d4ec25941a2f900f64727 - React-RCTNetwork: 73534f3ae4c02aa78d780d395d4b25cf5e68c974 - React-RCTPushNotification: b8e39cc39ceb3a01e15b236673558855b06199c8 - React-RCTSettings: 6c96150fdd071321942c5d2fc845933d5e77a300 - React-RCTTest: f36c829c1532d6937701188e0766ef012dec7f84 - React-RCTText: f66607968a96f04fdd402cc4ec2e2407e9053607 - React-RCTVibration: f3b0c51d1822c4a3b0f928de1271c0d29a885be0 - React-rendererdebug: ec04dbbb6a8179fd5fbd33a7d6a12eeec95b7975 - React-rncore: 3c10f7c6fa0495fb9e3199e0491bbf9255c51148 - React-runtimeexecutor: 812ebb8f37e1c2303133f04fac1af8d0e71bdbc3 - React-runtimescheduler: 95da7f8dc5a75cc79d76be3c631b79dc56282f00 - React-utils: 0db2b5ae7d681bf586f52322fe29b9b82b26347b - ReactCommon: 5a76a00468c3719740c1c89113622886a62f7aaa - ReactCommon-Samples: cb929abf219eabcc1ce2d8809a75e613cbcd2db2 - ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e - SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: de6f77faa8433a7bbce841097df8c10a64430c11 + RCT-Folly: 823c6f6ec910a75d4ad28898b4a11cdee140b92a + RCTRequired: 7e59b7b76964f56c833d25dc6181f9369bd9f5b6 + RCTTypeSafety: ef263f583381d5a3d5c7c8543665b59f60b33351 + React: bd73f4f27cd1d73499cfbeed09619ce705b1bc6a + React-callinvoker: 33f9673aeeecc522f082896dc8c2d4440f2523bf + React-Codegen: 05b37234a5252f99c890f3e2544b278827b613ca + React-Core: 681613ba23a3e002b5daaac841179c1c8c09bf7d + React-CoreModules: 8a302a639ada9384da0b3b48f5efcef1581d97ff + React-cxxreact: 2270d9c87e6e903e308d2ca1b23ef3d43d9b709b + React-debug: 157114273ac8eaf71d4f7c5ceab02aa9c523fe8c + React-Fabric: 2dcdb072a58b84165cd311c33dbce7ea41a41df8 + React-FabricImage: a9c2ae62757cc7f635a06d617febcbe248d68b75 + React-graphics: c226a7bed2a3868552c26c792d916ec87da4b0a3 + React-hermes: 114ebd73b7f528f10ee02c98acd1f8676396c84e + React-ImageManager: 5ee42fd7b963f214d3887babfa697cd3d364d35b + React-jserrorhandler: 9ec2310ccd65078a6a9aaa3126c42663990fccf9 + React-jsi: 47b821f7f0d784644c315678c97682bcc023cc39 + React-jsiexecutor: f39aa2f98a7057746933e06ddb1653c081047b04 + React-jsinspector: ec2fb8cbc0b450bc3056108f1d37dc90495338c2 + React-logger: 4b29f8a4c245d1639eb0bb42a20ea16b25cc0477 + React-Mapbuffer: e5301f57f61bd9eeadb57944f7a12eba30021f80 + React-nativeconfig: 05b0897cb72060b557126797400cc984b2568b0c + React-NativeModulesApple: 2d71dc507f4173ea772c8104689c6d71a913a28f + React-perflogger: 1ad14aec6ac9deea631579548b3a932bee2552fd + React-RCTActionSheet: e69af310a07e5b5f85257904b9d1d4ec214045ea + React-RCTAnimation: a92337f23c75e31a0d577756993ab8a258968673 + React-RCTAppDelegate: 42d2f48edc44bd942d4cb28edce3d0144bf4caff + React-RCTBlob: f70f38a26b9b8bb25ae5d1fa3d09e7f610cc8c0e + React-RCTFabric: 5ca56c798eedcf81095a88dbb0fd73085272fa21 + React-RCTImage: 0eda14109067cf83800f5cc75a3e1d19c9a5d3f6 + React-RCTLinking: 4dc8fecb19f6d045895910ff184e97efb442185d + React-RCTNetwork: fe389d36f4ecdb4d3631e4bc2b7a764d57a41fe2 + React-RCTPushNotification: 8b64e7c11de8f7ea856eb050a2717fc77973f7ee + React-RCTSettings: d351c2fa0a842ec55e693f8a3360f17194036176 + React-RCTTest: 2fc0f3286497c787f14093b8fdc5b73c0450c2a1 + React-RCTText: ca92b6f0facc595134508078917225c3ce0af048 + React-RCTVibration: fa6b996ceeb6aed49c178c9f76259c7195e51269 + React-rendererdebug: 70cc63ede660873a2ea1ab1758e738ef7066a49e + React-rncore: a1c8004539fb9e41fb6f1d435934e79a1d40fbfb + React-runtimeexecutor: c6e0cda0af0b538eab168710de14b1828d3ccfce + React-runtimescheduler: 98e48cb5fd93c19f09ef808a0a65d4cd91c9484c + React-utils: b239995f8239878dd11f4889bf29b5b1025c66a9 + ReactCommon: bff346950afee877611875f731c17e20a961c12c + ReactCommon-Samples: edf5dabd6ce5654d08665c4ef7fef85072b89e74 + ScreenshotManager: 2b23b74d25f5e307f7b4d21173a61a3934e69475 + SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d + Yoga: e8db4558087ce4980a67ce621aa91acc9dbe88fc PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 From 9b97cd95cff17e7fde6d8192e622b12cf83b32c1 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 2 Nov 2023 15:28:41 -0700 Subject: [PATCH 099/190] Update podfile.lock and yarn.lock --- packages/rn-tester/Podfile.lock | 114 ++++++------ .../RNTesterPods.xcodeproj/project.pbxproj | 4 - yarn.lock | 168 +++++++++++------- 3 files changed, 161 insertions(+), 125 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 0b4b7ef134d3..309946dd9407 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1083,7 +1083,6 @@ PODS: - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-callinvoker - - React-cxxreact - React-debug - React-jsi - React-rendererdebug @@ -1340,61 +1339,70 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: a9d04c15a139b6d2b411dc48c14d0e5ccedb4dfc - FBReactNativeSpec: 2a0c0cdd738003bf9f6b8ee678e55f5a40ae555b - fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 + FBLazyVector: 6bf08f4ec7e5ad995785947b33a45d2e731f30b2 + FBReactNativeSpec: 41e1ff7a9532d81edd17c261928a8208329bc01d + Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f + fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 9860d876ccc006c2922d12ee7e991a449fad22e1 + hermes-engine: 2c487f00303f41fec0702a6d999b5d949526ac3b libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - RCT-Folly: 823c6f6ec910a75d4ad28898b4a11cdee140b92a - RCTRequired: 7e59b7b76964f56c833d25dc6181f9369bd9f5b6 - RCTTypeSafety: ef263f583381d5a3d5c7c8543665b59f60b33351 - React: bd73f4f27cd1d73499cfbeed09619ce705b1bc6a - React-callinvoker: 33f9673aeeecc522f082896dc8c2d4440f2523bf - React-Codegen: 05b37234a5252f99c890f3e2544b278827b613ca - React-Core: 681613ba23a3e002b5daaac841179c1c8c09bf7d - React-CoreModules: 8a302a639ada9384da0b3b48f5efcef1581d97ff - React-cxxreact: 2270d9c87e6e903e308d2ca1b23ef3d43d9b709b - React-debug: 157114273ac8eaf71d4f7c5ceab02aa9c523fe8c - React-Fabric: 2dcdb072a58b84165cd311c33dbce7ea41a41df8 - React-FabricImage: a9c2ae62757cc7f635a06d617febcbe248d68b75 - React-graphics: c226a7bed2a3868552c26c792d916ec87da4b0a3 - React-hermes: 114ebd73b7f528f10ee02c98acd1f8676396c84e - React-ImageManager: 5ee42fd7b963f214d3887babfa697cd3d364d35b - React-jserrorhandler: 9ec2310ccd65078a6a9aaa3126c42663990fccf9 - React-jsi: 47b821f7f0d784644c315678c97682bcc023cc39 - React-jsiexecutor: f39aa2f98a7057746933e06ddb1653c081047b04 - React-jsinspector: ec2fb8cbc0b450bc3056108f1d37dc90495338c2 - React-logger: 4b29f8a4c245d1639eb0bb42a20ea16b25cc0477 - React-Mapbuffer: e5301f57f61bd9eeadb57944f7a12eba30021f80 - React-nativeconfig: 05b0897cb72060b557126797400cc984b2568b0c - React-NativeModulesApple: 2d71dc507f4173ea772c8104689c6d71a913a28f - React-perflogger: 1ad14aec6ac9deea631579548b3a932bee2552fd - React-RCTActionSheet: e69af310a07e5b5f85257904b9d1d4ec214045ea - React-RCTAnimation: a92337f23c75e31a0d577756993ab8a258968673 - React-RCTAppDelegate: 42d2f48edc44bd942d4cb28edce3d0144bf4caff - React-RCTBlob: f70f38a26b9b8bb25ae5d1fa3d09e7f610cc8c0e - React-RCTFabric: 5ca56c798eedcf81095a88dbb0fd73085272fa21 - React-RCTImage: 0eda14109067cf83800f5cc75a3e1d19c9a5d3f6 - React-RCTLinking: 4dc8fecb19f6d045895910ff184e97efb442185d - React-RCTNetwork: fe389d36f4ecdb4d3631e4bc2b7a764d57a41fe2 - React-RCTPushNotification: 8b64e7c11de8f7ea856eb050a2717fc77973f7ee - React-RCTSettings: d351c2fa0a842ec55e693f8a3360f17194036176 - React-RCTTest: 2fc0f3286497c787f14093b8fdc5b73c0450c2a1 - React-RCTText: ca92b6f0facc595134508078917225c3ce0af048 - React-RCTVibration: fa6b996ceeb6aed49c178c9f76259c7195e51269 - React-rendererdebug: 70cc63ede660873a2ea1ab1758e738ef7066a49e - React-rncore: a1c8004539fb9e41fb6f1d435934e79a1d40fbfb - React-runtimeexecutor: c6e0cda0af0b538eab168710de14b1828d3ccfce - React-runtimescheduler: 98e48cb5fd93c19f09ef808a0a65d4cd91c9484c - React-utils: b239995f8239878dd11f4889bf29b5b1025c66a9 - ReactCommon: bff346950afee877611875f731c17e20a961c12c - ReactCommon-Samples: edf5dabd6ce5654d08665c4ef7fef85072b89e74 - ScreenshotManager: 2b23b74d25f5e307f7b4d21173a61a3934e69475 - SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d - Yoga: e8db4558087ce4980a67ce621aa91acc9dbe88fc + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c + RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 + RCTRequired: 32ebc31aa79b75afc4de5cb92c1446bc95847b08 + RCTTypeSafety: de7153ab41f6d4c8d2282ef8207b4b55c9b5585d + React: 3e9487e9f214a6d9cd62e5224c2eb9bba67551f6 + React-callinvoker: 9dd1c26bc733dc30b909c6fbf5ac7e76c296cd82 + React-Codegen: 5ca1a9110c3b0a5960b72b8c4a49bd8de4a6dfac + React-Core: b83d734749cc514132e92d8211b294e423d5ef5e + React-CoreModules: fdb5751397032854376cbd0240efd9e63058953b + React-cxxreact: bbacddd4a987fc110de82a609f35539bacc21366 + React-debug: 6f09b5ef6c82cd75ffe1ca68cccc5ae26d7fcc64 + React-Fabric: aa979c14b8c712e602ed3fa6f8e21be3b5cbe418 + React-FabricImage: 94d7e6829feb554395c9da39bf9462e83ee7656f + React-graphics: fc84a4dca68bd9e31af260ffc1dc5bd08f23916f + React-hermes: f3c199b3faf96e50a51ced6aa23f9e8b9e07b8a7 + React-ImageManager: 09370f69b8e0316eb4d9c4c8ff87615a475360e8 + React-jserrorhandler: 84cfe02fe1cf10136ca0e89bf26d5e8c8165dba8 + React-jsi: 3ec3843cacf043059319da39ef9931b3eb26762e + React-jsiexecutor: 12adc887e6dbd9fb5acf799e86c4b67b701b8258 + React-jsinspector: 46c3df92de409e85a3646d9990f95a63267d73db + React-logger: 4d7e6eff6f0ce843c2e1556e12c3f036807aa827 + React-Mapbuffer: f24a86cafcac5d74ca7db6fb0514c5a94d6ea5d6 + React-nativeconfig: b9cf6f3a5bfca7b1f694330a19e8a38855724330 + React-NativeModulesApple: b2d59e28b77c0cdda582dfb4a1da057d34446514 + React-perflogger: bc4beedce067adb4517fbf550b1d8dc6f5032dee + React-RCTActionSheet: ef9c81c111c5a08575bd0f50b27224a3b22b9b63 + React-RCTAnimation: 7b960ca1c7182b3538bd2b23fe4a279d1f249499 + React-RCTAppDelegate: 01954c7dfce9f6765d86059482048378222c72a4 + React-RCTBlob: a585d47dd2a0cc1e808ed6726cecbd68a3db574a + React-RCTFabric: b25d16dd910e0cb3abec2dab1ae39c85fdc4424e + React-RCTImage: a096cf8edf17f8ae7b038998370046c1bf9b0196 + React-RCTLinking: 251ecf78776fbd4da21d4ec25941a2f900f64727 + React-RCTNetwork: 73534f3ae4c02aa78d780d395d4b25cf5e68c974 + React-RCTPushNotification: b8e39cc39ceb3a01e15b236673558855b06199c8 + React-RCTSettings: 6c96150fdd071321942c5d2fc845933d5e77a300 + React-RCTTest: f36c829c1532d6937701188e0766ef012dec7f84 + React-RCTText: f66607968a96f04fdd402cc4ec2e2407e9053607 + React-RCTVibration: f3b0c51d1822c4a3b0f928de1271c0d29a885be0 + React-rendererdebug: ec04dbbb6a8179fd5fbd33a7d6a12eeec95b7975 + React-rncore: 3c10f7c6fa0495fb9e3199e0491bbf9255c51148 + React-runtimeexecutor: 812ebb8f37e1c2303133f04fac1af8d0e71bdbc3 + React-runtimescheduler: 95da7f8dc5a75cc79d76be3c631b79dc56282f00 + React-utils: 0db2b5ae7d681bf586f52322fe29b9b82b26347b + ReactCommon: 5a76a00468c3719740c1c89113622886a62f7aaa + ReactCommon-Samples: cb929abf219eabcc1ce2d8809a75e613cbcd2db2 + ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e + SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 + Yoga: 551b5c2537a807784a103c9577ef94de21586b2f PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.13.0 +COCOAPODS: 1.12.1 diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj index 68261744016a..ec0082dd9e3d 100644 --- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj +++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj @@ -943,8 +943,6 @@ OTHER_LDFLAGS = ( "-ObjC", "-lc++", - "-Wl", - "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native"; SDKROOT = iphoneos; @@ -1029,8 +1027,6 @@ OTHER_LDFLAGS = ( "-ObjC", "-lc++", - "-Wl", - "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native"; SDKROOT = iphoneos; diff --git a/yarn.lock b/yarn.lock index afc9c268bf56..ecd826ca5492 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2366,28 +2366,34 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0-alpha.17.tgz#1b612ef1538ea5feca2a5ad3b4184fa1c54f7538" - integrity sha512-ZE5hB1c2wQo50Np4l+Vnmn4GZehhV6GFoK/35SQTbVOIRSSxXs2S/bOLzlS4MLOC7486EODodfQXpcDZqzkG1g== +"@react-native-community/cli-clean@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0.tgz#33f83709d566d1a59b317377eeb2a908b17509ae" + integrity sha512-wpR3317b18vQNAlAl8xa/+DA+3tX7gJj04dw6MWun2c6vk7o/iRCpk/FVbLpGx20k97ASW5fQ9reB2KJ+Wv7zg== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0" chalk "^4.1.2" execa "^5.0.0" - prompts "^2.4.2" -"@react-native-community/cli-config@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0-alpha.17.tgz#e2c1489d01e0e3ca5e68907d6ad5dee78b6f5ef0" - integrity sha512-BzL6ix++hlGH3RibZhsDIB7B5tF8GlTeDrspg4FYw9+7uS2YqRNCQsemiCGm56gnftwFLCMbCqbiZMjaAVHtvg== +"@react-native-community/cli-config@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0.tgz#ac6ae3cc409be52f3a40971331a5960a54d5977d" + integrity sha512-xGkqD7VtcAiDhI6pLXigJqGrd9voGPl+eQAhOvWWr1eZN7FfHM+jLhDI+JLDa6b3SNbFJBCXgiBunB6v90giWw== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" +"@react-native-community/cli-debugger-ui@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0.tgz#949e48f1770414d5d3c08d14ddd5b5847b6034a4" + integrity sha512-gOid9bGi9dfGm+Ro89SFY9gZfrEk29MFn8wETgEGZ3K+/lelGzysfZmXyV0qk/N5nNurL3jOyhHRvLqU+XGOdQ== + dependencies: + serve-static "^1.13.1" + "@react-native-community/cli-debugger-ui@12.0.0-alpha.17": version "12.0.0-alpha.17" resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0-alpha.17.tgz#e984231ce3fe3fc9489bc5ca892718e8372de690" @@ -2395,69 +2401,83 @@ dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0-alpha.17.tgz#b6a02c7ef5e4026ff609c0b720843be12ad08fb6" - integrity sha512-ZNCmsoSsNJ+9KeNylw0Y7uHpPD/m0yPKtZTI7FFTY1HgcLgDufuE1FjcF9Az/vb+wPyqASvrP2owvKk+6OLBbg== +"@react-native-community/cli-doctor@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0.tgz#d5b2a5974911ec628b894180565c5363861c4326" + integrity sha512-dt38KoQiPCxs2E/RREwucpJHYXUcUIYbPZRvXm1qo71YvxfPSF4a3PM7u9nJw6Oba5F8lpinPpavgY4ykkoQLg== dependencies: - "@react-native-community/cli-config" "12.0.0-alpha.17" - "@react-native-community/cli-platform-android" "12.0.0-alpha.17" - "@react-native-community/cli-platform-ios" "12.0.0-alpha.17" - "@react-native-community/cli-tools" "12.0.0-alpha.17" + "@react-native-community/cli-config" "12.0.0" + "@react-native-community/cli-platform-android" "12.0.0" + "@react-native-community/cli-platform-ios" "12.0.0" + "@react-native-community/cli-tools" "12.0.0" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" - envinfo "^7.7.2" + envinfo "^7.10.0" execa "^5.0.0" hermes-profile-transformer "^0.0.6" ip "^1.1.5" node-stream-zip "^1.9.1" ora "^5.4.1" - prompts "^2.4.2" semver "^7.5.2" strip-ansi "^5.2.0" wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0-alpha.17.tgz#03e073cd9e93c923439a8846b2571014c0a673b0" - integrity sha512-/tW/iogp77REppUKUGvdYxSDudxCGXpURjsJevElgUxNYzW22mbHfi5FJATzcwou9wDlhP5z8lsSDPyanbxnmQ== +"@react-native-community/cli-hermes@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0.tgz#b6d04d93e51b68c614a1ff9377694255a5e1294b" + integrity sha512-7W9bp0II83t9FvZ0UC+UwagBr1ySFWfb8gPfZwdpSRSAzTkrJjpLYjfFKs2uhLV63dzM8jyyE/voiQIWi2hnfA== dependencies: - "@react-native-community/cli-platform-android" "12.0.0-alpha.17" - "@react-native-community/cli-tools" "12.0.0-alpha.17" + "@react-native-community/cli-platform-android" "12.0.0" + "@react-native-community/cli-tools" "12.0.0" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0-alpha.17.tgz#74291d9ed59a02b3a0ef180808b0944883946996" - integrity sha512-1wEp4j8r9FJ1GBz2H4Q2SW3lDCVxnzBn8PetAhqlUPVptmazQN08x4u+EBhFJ9+ABUHUJ2hjtEUdA1/SqdyB2A== +"@react-native-community/cli-platform-android@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0.tgz#55450b94511cea0ea945661c6d4c83ea6770db78" + integrity sha512-QjQUh5it4TUwKZIn+T3xhU/IvrUrx1el535Ia6y940tyTxnZ5zQPZnd2JxRcOLiHtKSQL72VnD3yBMRjYtp1HA== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0-alpha.17.tgz#b4143c79c3aa62aa55f1bce9e9d79a9dbb446d95" - integrity sha512-zbRIvJAnYnGDgJzUCOpo/XXewWZqMmrxQpTW4h4Vf2JWA3o3CWLX2lDd3eNWU73suE3dg76f6Og1FkXnns2QxA== +"@react-native-community/cli-platform-ios@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0.tgz#9489f72ccaf915d4c8a3e1f6edd21908ec1f8d38" + integrity sha512-4c4xH59CpebgZb6dV/uw3lO3gZOSNY2GL9VjYFTXAMQSAnibnWjd1UFwP89TJNTyr/joYIU+vLDZ6nehZ78WoQ== dependencies: - "@react-native-community/cli-tools" "12.0.0-alpha.17" + "@react-native-community/cli-tools" "12.0.0" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0-alpha.17.tgz#7cc3e6a51fb31f02cb1cd36a43363e9b86c54dca" - integrity sha512-rhNNGaG0zjBBlCql5Ocq0oBdlYvfNHn9xH2YRT7+Dj+2j3P75uCiNExfdRNo1/3qdNY+dPmIVYbT4/0lglnVvA== +"@react-native-community/cli-plugin-metro@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0.tgz#0203677ced7f3f591b1839468c6d5f6fa3f40871" + integrity sha512-4fQOg2mBHhGWsSHw5btyI1Qbe8owZ5Ul2Soyysl5XT3aLVuXn+EBurVuH8Zyvbl1T4k09dgj03ojnlPA8PlIOg== + +"@react-native-community/cli-server-api@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0.tgz#50961549f715a2a9b3d605e8d21a52bb067de88a" + integrity sha512-ovHCG71oAsxl3/RNuxBFgqPNZT3aK2eM4o39VetmxQd/KsjKT7mXU02QdwLX53H31wA0Aex/xKwqOGAUBGLHfQ== + dependencies: + "@react-native-community/cli-debugger-ui" "12.0.0" + "@react-native-community/cli-tools" "12.0.0" + compression "^1.7.1" + connect "^3.6.5" + errorhandler "^1.5.1" + nocache "^3.0.1" + pretty-format "^26.6.2" + serve-static "^1.13.1" + ws "^7.5.1" "@react-native-community/cli-server-api@12.0.0-alpha.17": version "12.0.0-alpha.17" @@ -2474,6 +2494,22 @@ serve-static "^1.13.1" ws "^7.5.1" +"@react-native-community/cli-tools@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0.tgz#2ff8bff8d6bb0f1162c574fdcf47aa273a48b7ad" + integrity sha512-p5QN3UMoAKUTpVblKAf+tW3I+nX6wyPgaXYZ+K3H0vZNmbVim+eODFi32NH1XnvuvblVpakovmMrhnBpRnSAgg== + dependencies: + appdirsjs "^1.2.4" + chalk "^4.1.2" + find-up "^5.0.0" + mime "^2.4.1" + node-fetch "^2.6.0" + open "^6.2.0" + ora "^5.4.1" + semver "^7.5.2" + shell-quote "^1.7.3" + sudo-prompt "^9.0.0" + "@react-native-community/cli-tools@12.0.0-alpha.17": version "12.0.0-alpha.17" resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0-alpha.17.tgz#0c7520b41aa411b52a4cdc83ece759aa3dba72fa" @@ -2490,29 +2526,30 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0-alpha.17.tgz#d52837a7c7c6e26d505ae0e43e535dc0fc994aa2" - integrity sha512-9GWpRdf+1BkrhLLGXOJYyEu/lw9XlWCgTfG2dnOBMfKRbb5Hb3JZTh5MvYdi+em27jy2cV/MlbfIyXj0W42arQ== +"@react-native-community/cli-types@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0.tgz#333bcd4803343d5278e6fb436c21524b073cd1e8" + integrity sha512-1HhPlVqP99qRx1cd4PzQHAdaAW6cSv6LsOz/r+BGTEzl1wZ507vplVDGWDNRX0Zu7nGYiMIGeFBJwz2wINKhiQ== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0-alpha.17.tgz#fbaddf8ff6fd6262f62055b1aae3017df63c30cd" - integrity sha512-pXmXrU24DDsnVuZEkkKMZV3xNH3Z5UZ+fjw/MJtXeAUUbgfbd0iF4lf59zMpil8mUzb2u7X4G2gBCiXBh5/oLQ== - dependencies: - "@react-native-community/cli-clean" "12.0.0-alpha.17" - "@react-native-community/cli-config" "12.0.0-alpha.17" - "@react-native-community/cli-debugger-ui" "12.0.0-alpha.17" - "@react-native-community/cli-doctor" "12.0.0-alpha.17" - "@react-native-community/cli-hermes" "12.0.0-alpha.17" - "@react-native-community/cli-plugin-metro" "12.0.0-alpha.17" - "@react-native-community/cli-server-api" "12.0.0-alpha.17" - "@react-native-community/cli-tools" "12.0.0-alpha.17" - "@react-native-community/cli-types" "12.0.0-alpha.17" +"@react-native-community/cli@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0.tgz#8678e937497760788bcc0bde5a4e42be6fa38462" + integrity sha512-sSw0mPFuS24wHEulNq6hObkRzJbEhzWGb6SWwC59q0xnYztFfjg0M+f0B8EscW8OZ3Ky7vGFqF3IxFR62aP61Q== + dependencies: + "@react-native-community/cli-clean" "12.0.0" + "@react-native-community/cli-config" "12.0.0" + "@react-native-community/cli-debugger-ui" "12.0.0" + "@react-native-community/cli-doctor" "12.0.0" + "@react-native-community/cli-hermes" "12.0.0" + "@react-native-community/cli-plugin-metro" "12.0.0" + "@react-native-community/cli-server-api" "12.0.0" + "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-types" "12.0.0" chalk "^4.1.2" commander "^9.4.1" + deepmerge "^4.3.0" execa "^5.0.0" find-up "^4.1.0" fs-extra "^8.1.0" @@ -2520,11 +2557,6 @@ prompts "^2.4.2" semver "^7.5.2" -"@react-native/normalize-colors@^0.73.0": - version "0.73.2" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.2.tgz#cc8e48fbae2bbfff53e12f209369e8d2e4cf34ec" - integrity sha512-bRBcb2T+I88aG74LMVHaKms2p/T8aQd8+BZ7LuuzXlRfog1bMWWn/C5i0HVuvW4RPtXQYgIlGiXVDy9Ir1So/w== - "@rnx-kit/rn-changelog-generator@^0.4.0": version "0.4.0" resolved "https://registry.yarnpkg.com/@rnx-kit/rn-changelog-generator/-/rn-changelog-generator-0.4.0.tgz#637d87bcf8de6e87599930ed88d9375010277660" @@ -4373,10 +4405,10 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -envinfo@^7.7.2: - version "7.7.3" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz#4b2d8622e3e7366afb8091b23ed95569ea0208cc" - integrity sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA== +envinfo@^7.10.0: + version "7.11.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.0.tgz#c3793f44284a55ff8c82faf1ffd91bc6478ea01f" + integrity sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg== error-ex@^1.3.1: version "1.3.2" From 84144272ba7239b6b4dc0d5a414fa7342e80c746 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Wed, 1 Nov 2023 13:43:34 -0700 Subject: [PATCH 100/190] Fix ios pod post_install logic for detecting if fabric is enabled (#41284) Summary: There is a problem in the way that we check if Fabric is enabled inside `react_native_post_install`. https://github.com/facebook/react-native/blob/899e7cdb55197fc17a96a93af4f8bcc7519553c2/packages/react-native/scripts/react_native_pods.rb#L239 We're determining if fabric is enabled by checking if the `React-Fabric pod `is present, but since we always call `setup_fabric!(:react_native_path => prefix)` (https://github.com/facebook/react-native/pull/39057) inside `use_react_native` the `React-Fabric` pod is always present causing the `-DRN_FABRIC_ENABLED` flag to always be added to `project.pbxproj` even if the new arch is disabled. [IOS] [FIXED] - Fix ios pod post_install logic for detecting if fabric is enabled Pull Request resolved: https://github.com/facebook/react-native/pull/41284 Test Plan: Run `use_react_native!(fabric => false)` should not add the `-DRN_FABRIC_ENABLED` flag to `project.pbxproj` Reviewed By: fkgozali Differential Revision: D50896487 Pulled By: cipolleschi fbshipit-source-id: 78154407ce52b09fd3a317b7dc64bd4bba56363e --- packages/react-native/scripts/react_native_pods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index 1682b5e95d5c..ad8229cf8afa 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -258,7 +258,7 @@ def react_native_post_install( flipper_post_install(installer) end - fabric_enabled = ReactNativePodsUtils.has_pod(installer, 'React-Fabric') + fabric_enabled = ENV['RCT_FABRIC_ENABLED'] == '1' hermes_enabled = ReactNativePodsUtils.has_pod(installer, "React-hermes") if hermes_enabled From 641a11fe218afe97e4fcbd2c597c49bf664a1dff Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 3 Nov 2023 16:32:40 +0000 Subject: [PATCH 101/190] [RN][CI]Update node installation on debian (0.73) (#41275) --- .circleci/config.yml | 11 ++++++++++- .circleci/configurations/jobs.yml | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 94756b553871..8430e0e37ec7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,7 +35,16 @@ jobs: command: | apt update apt install -y wget git curl jq - curl -sL https://deb.nodesource.com/setup_18.x | bash - + + apt-get update + apt-get install -y ca-certificates curl gnupg + mkdir -p /etc/apt/keyrings + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + + NODE_MAJOR=18 + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list + apt-get update + apt install -y nodejs npm install --global yarn - checkout diff --git a/.circleci/configurations/jobs.yml b/.circleci/configurations/jobs.yml index d0d17a83f6aa..d21c54aee889 100644 --- a/.circleci/configurations/jobs.yml +++ b/.circleci/configurations/jobs.yml @@ -621,7 +621,7 @@ jobs: - run: name: Install Node JS # Note: Version set separately for non-Windows builds, see above. - command: choco install nodejs-lts + command: choco install nodejs --version=18.18.0 --allow-downgrade # Setup Dependencies - run: @@ -681,7 +681,16 @@ jobs: apt update apt install -y wget git curl jq - curl -sL https://deb.nodesource.com/setup_18.x | bash - + + apt-get update + apt-get install -y ca-certificates curl gnupg + mkdir -p /etc/apt/keyrings + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + + NODE_MAJOR=18 + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list + apt-get update + apt install -y nodejs npm install --global yarn - checkout From 40c149b0c4354564c305378aebdc79b9b4d34e7e Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Fri, 3 Nov 2023 10:38:27 -0700 Subject: [PATCH 102/190] Update missing rnc/cli related packages to 12.0.0 and update lockfile --- packages/community-cli-plugin/package.json | 4 +-- yarn.lock | 38 ---------------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 2bb8e42f1caa..18ffd1247240 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -23,8 +23,8 @@ ], "dependencies": { "@react-native/dev-middleware": "^0.73.4", - "@react-native-community/cli-server-api": "12.0.0-alpha.17", - "@react-native-community/cli-tools": "12.0.0-alpha.17", + "@react-native-community/cli-server-api": "12.0.0", + "@react-native-community/cli-tools": "12.0.0", "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index ecd826ca5492..a08381fc0819 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2394,13 +2394,6 @@ dependencies: serve-static "^1.13.1" -"@react-native-community/cli-debugger-ui@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0-alpha.17.tgz#e984231ce3fe3fc9489bc5ca892718e8372de690" - integrity sha512-JWP3cmtoThy/xaH7E/hqalanEqfRTduMwxd5F4hpZvVgbNJ9CSjrJoEMC362g4R2Uq5h/ZiD0EzhXYEZH1pRIg== - dependencies: - serve-static "^1.13.1" - "@react-native-community/cli-doctor@12.0.0": version "12.0.0" resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0.tgz#d5b2a5974911ec628b894180565c5363861c4326" @@ -2479,21 +2472,6 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-server-api@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0-alpha.17.tgz#f80fe0f40b465a0cbba0b3d166db6f45111ac9ef" - integrity sha512-G7qJZkHEC445ltX6hM7xByWfHajuCP+jDOTzV5I4CSFzGS4f1xVhkNtuWphsnP3dKvNgOzp4t5GZrWo9qksJQQ== - dependencies: - "@react-native-community/cli-debugger-ui" "12.0.0-alpha.17" - "@react-native-community/cli-tools" "12.0.0-alpha.17" - compression "^1.7.1" - connect "^3.6.5" - errorhandler "^1.5.1" - nocache "^3.0.1" - pretty-format "^26.6.2" - serve-static "^1.13.1" - ws "^7.5.1" - "@react-native-community/cli-tools@12.0.0": version "12.0.0" resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0.tgz#2ff8bff8d6bb0f1162c574fdcf47aa273a48b7ad" @@ -2510,22 +2488,6 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-tools@12.0.0-alpha.17": - version "12.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0-alpha.17.tgz#0c7520b41aa411b52a4cdc83ece759aa3dba72fa" - integrity sha512-NcBEiPgAp1iM5NSnZffizRHUYF38w4d+chT3MUgJWEGqSgQBnITqOF/tsnk4XBU8UH1lnxt9Hqng0Dh4RpPNAQ== - dependencies: - appdirsjs "^1.2.4" - chalk "^4.1.2" - find-up "^5.0.0" - mime "^2.4.1" - node-fetch "^2.6.0" - open "^6.2.0" - ora "^5.4.1" - semver "^7.5.2" - shell-quote "^1.7.3" - sudo-prompt "^9.0.0" - "@react-native-community/cli-types@12.0.0": version "12.0.0" resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0.tgz#333bcd4803343d5278e6fb436c21524b073cd1e8" From 7366fc64d82d9a48c774a8b660e6108f699210e7 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Mon, 6 Nov 2023 14:21:06 -0800 Subject: [PATCH 103/190] bumped packages versions #publish-packages-to-npm --- package.json | 2 +- packages/community-cli-plugin/package.json | 2 +- packages/metro-config/package.json | 2 +- packages/react-native-gradle-plugin/package.json | 2 +- packages/react-native/package.json | 8 ++++---- packages/react-native/template/package.json | 2 +- packages/virtualized-lists/package.json | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 267129ca9db5..dd69b026cc56 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@jest/create-cache-key-function": "^29.6.3", "@pkgjs/parseargs": "^0.11.0", "@react-native/metro-babel-transformer": "^0.73.12", - "@react-native/metro-config": "^0.73.1", + "@react-native/metro-config": "^0.73.2", "@tsconfig/node18": "1.0.1", "@types/react": "^18.0.18", "@typescript-eslint/parser": "^5.57.1", diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 18ffd1247240..e0e0faffb79b 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.7", + "version": "0.73.8", "description": "Core CLI commands for React Native", "keywords": [ "react-native", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index f55a61613b29..7876a404c06d 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/metro-config", - "version": "0.73.1", + "version": "0.73.2", "description": "Metro configuration for React Native.", "license": "MIT", "repository": { diff --git a/packages/react-native-gradle-plugin/package.json b/packages/react-native-gradle-plugin/package.json index 4cd24cdbdfb6..dcecbd9107c1 100644 --- a/packages/react-native-gradle-plugin/package.json +++ b/packages/react-native-gradle-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/gradle-plugin", - "version": "0.73.2", + "version": "0.73.3", "description": "Gradle Plugin for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 85ce4fc2b5da..3bd656cc7541 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,12 +97,12 @@ "@react-native-community/cli-platform-android": "12.0.0", "@react-native-community/cli-platform-ios": "12.0.0", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.7", + "@react-native/community-cli-plugin": "^0.73.8", "@react-native/codegen": "^0.73.1", - "@react-native/gradle-plugin": "^0.73.2", + "@react-native/gradle-plugin": "^0.73.3", "@react-native/js-polyfills": "^0.73.1", "@react-native/normalize-colors": "^0.73.2", - "@react-native/virtualized-lists": "^0.73.2", + "@react-native/virtualized-lists": "^0.73.3", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -148,4 +148,4 @@ } ] } -} \ No newline at end of file +} diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index a71eb2832ae6..1e4b5d5122a6 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -19,7 +19,7 @@ "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "^0.73.18", "@react-native/eslint-config": "^0.73.1", - "@react-native/metro-config": "^0.73.1", + "@react-native/metro-config": "^0.73.2", "@react-native/typescript-config": "^0.73.1", "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index 1a24dbe1651f..d4e0771d905b 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/virtualized-lists", - "version": "0.73.2", + "version": "0.73.3", "description": "Virtualized lists for React Native.", "license": "MIT", "repository": { From 7ba400c35e5862deafeb2e71cc7f9e0de18062a8 Mon Sep 17 00:00:00 2001 From: Distiller Date: Mon, 6 Nov 2023 22:35:02 +0000 Subject: [PATCH 104/190] [0.73.0-rc.4] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- .../react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index a82d68b4ea5a..f091db6bdb79 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.3', + prerelease: 'rc.4', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index cadd3b821580..cc92c9019348 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.3", + RCTVersionPrerelease: @"rc.4", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 483272352c35..4a35ff5254ac 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.3 +VERSION_NAME=0.73.0-rc.4 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 9b7c1ab5493e..b8be587a16b6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.3"); + "prerelease", "rc.4"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index dd32373f4b35..29866eb74f0c 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.3"; + std::string_view Prerelease = "rc.4"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 3bd656cc7541..963c15d53f65 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.3", + "version": "0.73.0-rc.4", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 1e4b5d5122a6..e427e48f2603 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.3" + "react-native": "0.73.0-rc.4" }, "devDependencies": { "@babel/core": "^7.20.0", From 77123b8d2383d158c27b2ae476e90e7ab1fed152 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 8 Nov 2023 12:06:40 +0000 Subject: [PATCH 105/190] [LOCAL] Update Podfile.lock --- packages/rn-tester/Podfile.lock | 860 ++++++++++++++++---------------- 1 file changed, 430 insertions(+), 430 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 309946dd9407..ffd4e7ff9758 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.3) - - FBReactNativeSpec (0.73.0-rc.3): + - FBLazyVector (0.73.0-rc.4) + - FBReactNativeSpec (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) - - React-Core (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) + - React-Core (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -68,9 +68,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.3): - - hermes-engine/Pre-built (= 0.73.0-rc.3) - - hermes-engine/Pre-built (0.73.0-rc.3) + - hermes-engine (0.73.0-rc.4): + - hermes-engine/Pre-built (= 0.73.0-rc.4) + - hermes-engine/Pre-built (0.73.0-rc.4) - libevent (2.1.12) - OCMock (3.9.1) - OpenSSL-Universal (1.1.1100) @@ -96,26 +96,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.3) - - RCTTypeSafety (0.73.0-rc.3): - - FBLazyVector (= 0.73.0-rc.3) - - RCTRequired (= 0.73.0-rc.3) - - React-Core (= 0.73.0-rc.3) - - React (0.73.0-rc.3): - - React-Core (= 0.73.0-rc.3) - - React-Core/DevSupport (= 0.73.0-rc.3) - - React-Core/RCTWebSocket (= 0.73.0-rc.3) - - React-RCTActionSheet (= 0.73.0-rc.3) - - React-RCTAnimation (= 0.73.0-rc.3) - - React-RCTBlob (= 0.73.0-rc.3) - - React-RCTImage (= 0.73.0-rc.3) - - React-RCTLinking (= 0.73.0-rc.3) - - React-RCTNetwork (= 0.73.0-rc.3) - - React-RCTSettings (= 0.73.0-rc.3) - - React-RCTText (= 0.73.0-rc.3) - - React-RCTVibration (= 0.73.0-rc.3) - - React-callinvoker (0.73.0-rc.3) - - React-Codegen (0.73.0-rc.3): + - RCTRequired (0.73.0-rc.4) + - RCTTypeSafety (0.73.0-rc.4): + - FBLazyVector (= 0.73.0-rc.4) + - RCTRequired (= 0.73.0-rc.4) + - React-Core (= 0.73.0-rc.4) + - React (0.73.0-rc.4): + - React-Core (= 0.73.0-rc.4) + - React-Core/DevSupport (= 0.73.0-rc.4) + - React-Core/RCTWebSocket (= 0.73.0-rc.4) + - React-RCTActionSheet (= 0.73.0-rc.4) + - React-RCTAnimation (= 0.73.0-rc.4) + - React-RCTBlob (= 0.73.0-rc.4) + - React-RCTImage (= 0.73.0-rc.4) + - React-RCTLinking (= 0.73.0-rc.4) + - React-RCTNetwork (= 0.73.0-rc.4) + - React-RCTSettings (= 0.73.0-rc.4) + - React-RCTText (= 0.73.0-rc.4) + - React-RCTVibration (= 0.73.0-rc.4) + - React-callinvoker (0.73.0-rc.4) + - React-Codegen (0.73.0-rc.4): - DoubleConversion - FBReactNativeSpec - glog @@ -135,11 +135,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.3): + - React-Core (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.3) + - React-Core/Default (= 0.73.0-rc.4) - React-cxxreact - React-hermes - React-jsi @@ -149,7 +149,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.3): + - React-Core/CoreModulesHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -163,7 +163,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.0-rc.3): + - React-Core/Default (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -176,23 +176,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.0-rc.3): + - React-Core/DevSupport (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.3) - - React-Core/RCTWebSocket (= 0.73.0-rc.3) + - React-Core/Default (= 0.73.0-rc.4) + - React-Core/RCTWebSocket (= 0.73.0-rc.4) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.3) + - React-jsinspector (= 0.73.0-rc.4) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.3): + - React-Core/RCTActionSheetHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -206,7 +206,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.3): + - React-Core/RCTAnimationHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -220,7 +220,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.3): + - React-Core/RCTBlobHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -234,7 +234,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.3): + - React-Core/RCTImageHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -248,7 +248,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.3): + - React-Core/RCTLinkingHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -262,7 +262,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.3): + - React-Core/RCTNetworkHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -276,7 +276,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0-rc.3): + - React-Core/RCTPushNotificationHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -290,7 +290,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.3): + - React-Core/RCTSettingsHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -304,7 +304,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.3): + - React-Core/RCTTextHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -318,7 +318,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.3): + - React-Core/RCTVibrationHeaders (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -332,11 +332,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.3): + - React-Core/RCTWebSocket (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.3) + - React-Core/Default (= 0.73.0-rc.4) - React-cxxreact - React-hermes - React-jsi @@ -346,588 +346,588 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.0-rc.3): + - React-CoreModules (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.3) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/CoreModulesHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) + - RCTTypeSafety (= 0.73.0-rc.4) + - React-Codegen (= 0.73.0-rc.4) + - React-Core/CoreModulesHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) + - React-RCTImage (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.0-rc.3): + - React-cxxreact (0.73.0-rc.4): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.3) - - React-debug (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsinspector (= 0.73.0-rc.3) - - React-logger (= 0.73.0-rc.3) - - React-perflogger (= 0.73.0-rc.3) - - React-runtimeexecutor (= 0.73.0-rc.3) - - React-debug (0.73.0-rc.3) - - React-Fabric (0.73.0-rc.3): + - React-callinvoker (= 0.73.0-rc.4) + - React-debug (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsinspector (= 0.73.0-rc.4) + - React-logger (= 0.73.0-rc.4) + - React-perflogger (= 0.73.0-rc.4) + - React-runtimeexecutor (= 0.73.0-rc.4) + - React-debug (0.73.0-rc.4) + - React-Fabric (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.3) - - React-Fabric/attributedstring (= 0.73.0-rc.3) - - React-Fabric/componentregistry (= 0.73.0-rc.3) - - React-Fabric/componentregistrynative (= 0.73.0-rc.3) - - React-Fabric/components (= 0.73.0-rc.3) - - React-Fabric/core (= 0.73.0-rc.3) - - React-Fabric/imagemanager (= 0.73.0-rc.3) - - React-Fabric/leakchecker (= 0.73.0-rc.3) - - React-Fabric/mounting (= 0.73.0-rc.3) - - React-Fabric/scheduler (= 0.73.0-rc.3) - - React-Fabric/telemetry (= 0.73.0-rc.3) - - React-Fabric/templateprocessor (= 0.73.0-rc.3) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.3) - - React-Fabric/uimanager (= 0.73.0-rc.3) - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-Fabric/animations (= 0.73.0-rc.4) + - React-Fabric/attributedstring (= 0.73.0-rc.4) + - React-Fabric/componentregistry (= 0.73.0-rc.4) + - React-Fabric/componentregistrynative (= 0.73.0-rc.4) + - React-Fabric/components (= 0.73.0-rc.4) + - React-Fabric/core (= 0.73.0-rc.4) + - React-Fabric/imagemanager (= 0.73.0-rc.4) + - React-Fabric/leakchecker (= 0.73.0-rc.4) + - React-Fabric/mounting (= 0.73.0-rc.4) + - React-Fabric/scheduler (= 0.73.0-rc.4) + - React-Fabric/telemetry (= 0.73.0-rc.4) + - React-Fabric/templateprocessor (= 0.73.0-rc.4) + - React-Fabric/textlayoutmanager (= 0.73.0-rc.4) + - React-Fabric/uimanager (= 0.73.0-rc.4) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/animations (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/animations (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/attributedstring (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/attributedstring (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/componentregistry (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/componentregistry (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/componentregistrynative (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/componentregistrynative (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.3) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.3) - - React-Fabric/components/modal (= 0.73.0-rc.3) - - React-Fabric/components/rncore (= 0.73.0-rc.3) - - React-Fabric/components/root (= 0.73.0-rc.3) - - React-Fabric/components/safeareaview (= 0.73.0-rc.3) - - React-Fabric/components/scrollview (= 0.73.0-rc.3) - - React-Fabric/components/text (= 0.73.0-rc.3) - - React-Fabric/components/textinput (= 0.73.0-rc.3) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.3) - - React-Fabric/components/view (= 0.73.0-rc.3) - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-Fabric/components/inputaccessory (= 0.73.0-rc.4) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.4) + - React-Fabric/components/modal (= 0.73.0-rc.4) + - React-Fabric/components/rncore (= 0.73.0-rc.4) + - React-Fabric/components/root (= 0.73.0-rc.4) + - React-Fabric/components/safeareaview (= 0.73.0-rc.4) + - React-Fabric/components/scrollview (= 0.73.0-rc.4) + - React-Fabric/components/text (= 0.73.0-rc.4) + - React-Fabric/components/textinput (= 0.73.0-rc.4) + - React-Fabric/components/unimplementedview (= 0.73.0-rc.4) + - React-Fabric/components/view (= 0.73.0-rc.4) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/inputaccessory (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/inputaccessory (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/modal (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/modal (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/rncore (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/rncore (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/root (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/root (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/safeareaview (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/safeareaview (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/scrollview (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/scrollview (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/text (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/text (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/textinput (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/textinput (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/unimplementedview (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/unimplementedview (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/components/view (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/components/view (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - Yoga - - React-Fabric/core (0.73.0-rc.3): + - React-Fabric/core (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/imagemanager (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/imagemanager (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/leakchecker (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/leakchecker (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/mounting (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/mounting (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/scheduler (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/scheduler (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/telemetry (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/telemetry (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/templateprocessor (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/templateprocessor (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/textlayoutmanager (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/textlayoutmanager (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - React-Fabric/uimanager - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-Fabric/uimanager (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Fabric/uimanager (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-FabricImage (0.73.0-rc.3): + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-FabricImage (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.3) - - RCTTypeSafety (= 0.73.0-rc.3) + - RCTRequired (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.4) - React-Fabric - - React-graphics (= 0.73.0-rc.3) + - React-graphics (= 0.73.0-rc.4) - React-ImageManager - - React-jsi (= 0.73.0-rc.3) - - React-jsiexecutor (= 0.73.0-rc.3) + - React-jsi (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - Yoga - - React-graphics (0.73.0-rc.3): + - React-graphics (0.73.0-rc.4): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.3) + - React-Core/Default (= 0.73.0-rc.4) - React-utils - - React-hermes (0.73.0-rc.3): + - React-hermes (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.3) + - React-cxxreact (= 0.73.0-rc.4) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.3) - - React-jsinspector (= 0.73.0-rc.3) - - React-perflogger (= 0.73.0-rc.3) - - React-ImageManager (0.73.0-rc.3): + - React-jsiexecutor (= 0.73.0-rc.4) + - React-jsinspector (= 0.73.0-rc.4) + - React-perflogger (= 0.73.0-rc.4) + - React-ImageManager (0.73.0-rc.4): - glog - RCT-Folly/Fabric - React-Core/Default @@ -936,33 +936,33 @@ PODS: - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.3): + - React-jserrorhandler (0.73.0-rc.4): - RCT-Folly/Fabric (= 2022.05.16.00) - - React-jsi (= 0.73.0-rc.3) + - React-jsi (= 0.73.0-rc.4) - React-Mapbuffer - - React-jsi (0.73.0-rc.3): + - React-jsi (0.73.0-rc.4): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.3): + - React-jsiexecutor (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-perflogger (= 0.73.0-rc.3) - - React-jsinspector (0.73.0-rc.3) - - React-logger (0.73.0-rc.3): + - React-cxxreact (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-perflogger (= 0.73.0-rc.4) + - React-jsinspector (0.73.0-rc.4) + - React-logger (0.73.0-rc.4): - glog - - React-Mapbuffer (0.73.0-rc.3): + - React-Mapbuffer (0.73.0-rc.4): - glog - React-debug - - React-nativeconfig (0.73.0-rc.3) - - React-NativeModulesApple (0.73.0-rc.3): + - React-nativeconfig (0.73.0-rc.4) + - React-NativeModulesApple (0.73.0-rc.4): - glog - hermes-engine - React-callinvoker @@ -972,17 +972,17 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.3) - - React-RCTActionSheet (0.73.0-rc.3): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.3) - - React-RCTAnimation (0.73.0-rc.3): + - React-perflogger (0.73.0-rc.4) + - React-RCTActionSheet (0.73.0-rc.4): + - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.4) + - React-RCTAnimation (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.3) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTAnimationHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTAppDelegate (0.73.0-rc.3): + - RCTTypeSafety (= 0.73.0-rc.4) + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTAnimationHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTAppDelegate (0.73.0-rc.4): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -996,89 +996,89 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon/turbomodule/core - - React-RCTBlob (0.73.0-rc.3): + - React-RCTBlob (0.73.0-rc.4): - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTBlobHeaders (= 0.73.0-rc.3) - - React-Core/RCTWebSocket (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-RCTNetwork (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTFabric (0.73.0-rc.3): + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTBlobHeaders (= 0.73.0-rc.4) + - React-Core/RCTWebSocket (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-RCTNetwork (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTFabric (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.3) + - React-Core (= 0.73.0-rc.4) - React-debug - - React-Fabric (= 0.73.0-rc.3) + - React-Fabric (= 0.73.0-rc.4) - React-FabricImage - React-graphics - React-ImageManager - React-nativeconfig - - React-RCTImage (= 0.73.0-rc.3) + - React-RCTImage (= 0.73.0-rc.4) - React-RCTText - React-rendererdebug - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.3): + - React-RCTImage (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.3) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTImageHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-RCTNetwork (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTLinking (0.73.0-rc.3): - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTNetwork (0.73.0-rc.3): + - RCTTypeSafety (= 0.73.0-rc.4) + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTImageHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-RCTNetwork (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTLinking (0.73.0-rc.4): + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTLinkingHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTNetwork (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.3) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTNetworkHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTPushNotification (0.73.0-rc.3): - - RCTTypeSafety (= 0.73.0-rc.3) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTSettings (0.73.0-rc.3): + - RCTTypeSafety (= 0.73.0-rc.4) + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTNetworkHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTPushNotification (0.73.0-rc.4): + - RCTTypeSafety (= 0.73.0-rc.4) + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTSettings (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.3) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTSettingsHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTTest (0.73.0-rc.3): + - RCTTypeSafety (= 0.73.0-rc.4) + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTSettingsHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTTest (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.3) - - React-CoreModules (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-RCTText (0.73.0-rc.3): - - React-Core/RCTTextHeaders (= 0.73.0-rc.3) + - React-Core (= 0.73.0-rc.4) + - React-CoreModules (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-RCTText (0.73.0-rc.4): + - React-Core/RCTTextHeaders (= 0.73.0-rc.4) - Yoga - - React-RCTVibration (0.73.0-rc.3): + - React-RCTVibration (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.3) - - React-Core/RCTVibrationHeaders (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (= 0.73.0-rc.3) - - React-rendererdebug (0.73.0-rc.3): + - React-Codegen (= 0.73.0-rc.4) + - React-Core/RCTVibrationHeaders (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-rendererdebug (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.3) - - React-runtimeexecutor (0.73.0-rc.3): - - React-jsi (= 0.73.0-rc.3) - - React-runtimescheduler (0.73.0-rc.3): + - React-rncore (0.73.0-rc.4) + - React-runtimeexecutor (0.73.0-rc.4): + - React-jsi (= 0.73.0-rc.4) + - React-runtimescheduler (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1088,11 +1088,11 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.3): + - React-utils (0.73.0-rc.4): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon-Samples (0.73.0-rc.3): + - ReactCommon-Samples (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1102,28 +1102,28 @@ PODS: - React-cxxreact - React-NativeModulesApple - ReactCommon/turbomodule/core - - ReactCommon/turbomodule/bridging (0.73.0-rc.3): + - ReactCommon/turbomodule/bridging (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.3) - - React-cxxreact (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-logger (= 0.73.0-rc.3) - - React-perflogger (= 0.73.0-rc.3) - - ReactCommon/turbomodule/core (0.73.0-rc.3): + - React-callinvoker (= 0.73.0-rc.4) + - React-cxxreact (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-logger (= 0.73.0-rc.4) + - React-perflogger (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.3) - - React-cxxreact (= 0.73.0-rc.3) - - React-jsi (= 0.73.0-rc.3) - - React-logger (= 0.73.0-rc.3) - - React-perflogger (= 0.73.0-rc.3) + - React-callinvoker (= 0.73.0-rc.4) + - React-cxxreact (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-logger (= 0.73.0-rc.4) + - React-perflogger (= 0.73.0-rc.4) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1339,8 +1339,8 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: 6bf08f4ec7e5ad995785947b33a45d2e731f30b2 - FBReactNativeSpec: 41e1ff7a9532d81edd17c261928a8208329bc01d + FBLazyVector: c30d7c84d9d25e99f0d6832ae0849f73a4a69658 + FBReactNativeSpec: 5d2d44109bccec2e7a38e8f4cb706dca34fa5044 Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1351,58 +1351,58 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 2c487f00303f41fec0702a6d999b5d949526ac3b + hermes-engine: c8106a2b9250a6fd1157c520ed0928cddb0bb90e libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 32ebc31aa79b75afc4de5cb92c1446bc95847b08 - RCTTypeSafety: de7153ab41f6d4c8d2282ef8207b4b55c9b5585d - React: 3e9487e9f214a6d9cd62e5224c2eb9bba67551f6 - React-callinvoker: 9dd1c26bc733dc30b909c6fbf5ac7e76c296cd82 - React-Codegen: 5ca1a9110c3b0a5960b72b8c4a49bd8de4a6dfac - React-Core: b83d734749cc514132e92d8211b294e423d5ef5e - React-CoreModules: fdb5751397032854376cbd0240efd9e63058953b - React-cxxreact: bbacddd4a987fc110de82a609f35539bacc21366 - React-debug: 6f09b5ef6c82cd75ffe1ca68cccc5ae26d7fcc64 - React-Fabric: aa979c14b8c712e602ed3fa6f8e21be3b5cbe418 - React-FabricImage: 94d7e6829feb554395c9da39bf9462e83ee7656f - React-graphics: fc84a4dca68bd9e31af260ffc1dc5bd08f23916f - React-hermes: f3c199b3faf96e50a51ced6aa23f9e8b9e07b8a7 - React-ImageManager: 09370f69b8e0316eb4d9c4c8ff87615a475360e8 - React-jserrorhandler: 84cfe02fe1cf10136ca0e89bf26d5e8c8165dba8 - React-jsi: 3ec3843cacf043059319da39ef9931b3eb26762e - React-jsiexecutor: 12adc887e6dbd9fb5acf799e86c4b67b701b8258 - React-jsinspector: 46c3df92de409e85a3646d9990f95a63267d73db - React-logger: 4d7e6eff6f0ce843c2e1556e12c3f036807aa827 - React-Mapbuffer: f24a86cafcac5d74ca7db6fb0514c5a94d6ea5d6 - React-nativeconfig: b9cf6f3a5bfca7b1f694330a19e8a38855724330 - React-NativeModulesApple: b2d59e28b77c0cdda582dfb4a1da057d34446514 - React-perflogger: bc4beedce067adb4517fbf550b1d8dc6f5032dee - React-RCTActionSheet: ef9c81c111c5a08575bd0f50b27224a3b22b9b63 - React-RCTAnimation: 7b960ca1c7182b3538bd2b23fe4a279d1f249499 - React-RCTAppDelegate: 01954c7dfce9f6765d86059482048378222c72a4 - React-RCTBlob: a585d47dd2a0cc1e808ed6726cecbd68a3db574a - React-RCTFabric: b25d16dd910e0cb3abec2dab1ae39c85fdc4424e - React-RCTImage: a096cf8edf17f8ae7b038998370046c1bf9b0196 - React-RCTLinking: 251ecf78776fbd4da21d4ec25941a2f900f64727 - React-RCTNetwork: 73534f3ae4c02aa78d780d395d4b25cf5e68c974 - React-RCTPushNotification: b8e39cc39ceb3a01e15b236673558855b06199c8 - React-RCTSettings: 6c96150fdd071321942c5d2fc845933d5e77a300 - React-RCTTest: f36c829c1532d6937701188e0766ef012dec7f84 - React-RCTText: f66607968a96f04fdd402cc4ec2e2407e9053607 - React-RCTVibration: f3b0c51d1822c4a3b0f928de1271c0d29a885be0 - React-rendererdebug: ec04dbbb6a8179fd5fbd33a7d6a12eeec95b7975 - React-rncore: 3c10f7c6fa0495fb9e3199e0491bbf9255c51148 - React-runtimeexecutor: 812ebb8f37e1c2303133f04fac1af8d0e71bdbc3 - React-runtimescheduler: 95da7f8dc5a75cc79d76be3c631b79dc56282f00 - React-utils: 0db2b5ae7d681bf586f52322fe29b9b82b26347b - ReactCommon: 5a76a00468c3719740c1c89113622886a62f7aaa - ReactCommon-Samples: cb929abf219eabcc1ce2d8809a75e613cbcd2db2 + RCTRequired: 473398596b8d6758a8a37bd6ceb233fd8fd4fe2f + RCTTypeSafety: beea8b7842072402d6cd0d183bd0e6f8022c4124 + React: 84cf182a117fa49e2396786a9388de4b2ba39fa2 + React-callinvoker: b37c7b352ee1971a262ed3c14cd96845f3465238 + React-Codegen: 32aeec1a88fd41f6dff1bac62e8ceb7a0b2f750c + React-Core: ab44b04d034eeb52243f2d7355213d25bf3bed9c + React-CoreModules: 47e13b338f34d10849aa51539e4f22f346cfb48b + React-cxxreact: 4cb4dbd26b53ce851be7d1c5012c52bf3125962c + React-debug: 470ca201def3864f82982818ca639ec821189faa + React-Fabric: a34fde7a2323879ac15ea3c25f3ffd0fc6c8e2b4 + React-FabricImage: 93c55bd20e78f718e3bf424a91ced982235e6be0 + React-graphics: 9947ecac6315514eba8c7aa30bcc9292764956ac + React-hermes: 799cbe702d008535f872268527f06e7ef5037351 + React-ImageManager: 4fe632da77c07e0890a6265b36a669eed04748b6 + React-jserrorhandler: 9b2b96bbbe015c7039657794a5fdab40556e893e + React-jsi: dfdc99e55ef4464be391886a7e0b8e0841d77a2e + React-jsiexecutor: 0c0bf4687e084cf7a1da51007ca52cb61205fe7a + React-jsinspector: 5548901692ef4a1943f7f4208abbf77a35c58bc7 + React-logger: 5761d3b499c34ff905d47eba897ccb033242eb57 + React-Mapbuffer: 9bfeeae0a1637598fc6697ec674cfbecb581af7d + React-nativeconfig: b799490d1edf76fe53feebab3fb6385b26fcc740 + React-NativeModulesApple: 47a1d38c3b7600d989fd4b963192165ed10e7c6a + React-perflogger: 77f7f259432c197d905edcb71fecadf1f5e1e720 + React-RCTActionSheet: f7df3632f0c30e96fef8afd4adeaef8fde1f106d + React-RCTAnimation: e0b1e4aa21057e8d47cf504c1c507de58450a744 + React-RCTAppDelegate: b7f2a890ed6f97fb9ceea3bfca19cbdd7ab9be42 + React-RCTBlob: 071dd14ec9662c6b12a4757c44f80d8e7ba63df4 + React-RCTFabric: 50b8b2681e979cd4ea2d69b94786863700d21ac4 + React-RCTImage: 5be79d2ba81ff048f13c57775cf6eed070ff415b + React-RCTLinking: 01ec371c6da4d20f3f765da769ef85d9603beb4f + React-RCTNetwork: d89d00d31f7351b59b53a098940220e7b95cd17b + React-RCTPushNotification: 6ce6151797f9964be89989dafb086f59e59d71ce + React-RCTSettings: a8a25b81e5fb1ecc067823bdaf0256f8c3b52a78 + React-RCTTest: 539803405ae68c5bc9df96e6df755c52c7bc50f9 + React-RCTText: d1ded63ea01f97c16dc3bfbe4703b29d3155eb42 + React-RCTVibration: a8733c554c5ba80004e8e0fb27249e02fec469da + React-rendererdebug: cabb2a6d356437ee455481c749d566c617b05bb2 + React-rncore: f52c2f50f7df33da0fb37ab2c3a29e54b1662f62 + React-runtimeexecutor: 6e796f5a1d0b3eb513f4cbf87c5dfc41be6ce784 + React-runtimescheduler: 1c46d10f8d34f8cfb1617acbfa0dc0adbb595dae + React-utils: 90f8d89937d2e04a941b9ce91b241034f5b4115a + ReactCommon: 1be3b68d3f445d84dc3a8b10f38b1ef3a1fae6fc + ReactCommon-Samples: ac6f5238ec31d0299e38cf5d1d1f3e90a550afb1 ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: 551b5c2537a807784a103c9577ef94de21586b2f + Yoga: eed8829e19fdf1a83dfe087f7ba4be6cda42530c PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.2 From 5d33f03b28e3dcccc236cf15465d813545de2f5c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 17 Nov 2023 06:35:27 +0000 Subject: [PATCH 106/190] [RN][iOS] Improve Podspec dependencies and prepare support for multiple Apple platforms (#41380) resolved: https://github.com/facebook/react-native/pull/41353 resolved: https://github.com/facebook/react-native/pull/41354 resolved: https://github.com/facebook/react-native/pull/41355 resolved: https://github.com/facebook/react-native/pull/41356 resolved: https://github.com/facebook/react-native/pull/41357 resolved: https://github.com/facebook/react-native/pull/41358 resolved: https://github.com/facebook/react-native/pull/41359 --- .../AppDelegate/React-RCTAppDelegate.podspec | 40 ++--- .../Libraries/Blob/React-RCTBlob.podspec | 22 +-- .../Libraries/Image/React-RCTImage.podspec | 22 +-- .../LinkingIOS/React-RCTLinking.podspec | 16 +- .../React-RCTAnimation.podspec | 20 +-- .../Network/React-RCTNetwork.podspec | 24 +-- .../React-RCTPushNotification.podspec | 20 +-- .../Settings/React-RCTSettings.podspec | 23 +-- .../Vibration/React-RCTVibration.podspec | 20 +-- packages/react-native/React-Core.podspec | 10 +- .../CoreModules/React-CoreModules.podspec | 12 +- .../React/React-RCTFabric.podspec | 58 +++--- .../ReactCommon/React-Fabric.podspec | 25 ++- .../ReactCommon/React-FabricImage.podspec | 28 +-- .../ReactCommon/React-Mapbuffer.podspec | 4 +- .../ReactCommon/React-rncore.podspec | 5 +- .../React-jserrorhandler.podspec | 11 +- .../ios/React-NativeModulesApple.podspec | 4 +- .../samples/ReactCommon-Samples.podspec | 24 ++- .../debug/React-rendererdebug.podspec | 5 +- .../platform/ios/React-ImageManager.podspec | 27 ++- .../React-runtimescheduler.podspec | 10 +- .../react/runtime/React-RuntimeHermes.podspec | 3 +- .../react/utils/React-utils.podspec | 7 +- .../cocoapods/__tests__/codegen_utils-test.rb | 21 ++- .../__tests__/new_architecture-test.rb | 4 +- .../scripts/cocoapods/__tests__/utils-test.rb | 170 +++++++++++++++++- .../scripts/cocoapods/codegen_utils.rb | 33 ++-- .../scripts/cocoapods/new_architecture.rb | 27 +-- .../react-native/scripts/cocoapods/utils.rb | 100 ++++++++--- .../react-native/scripts/react_native_pods.rb | 35 ++++ 31 files changed, 505 insertions(+), 325 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec index 04796aacd5b6..b2b124b45122 100644 --- a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +++ b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec @@ -21,7 +21,6 @@ folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32' is_new_arch_enabled = ENV["RCT_NEW_ARCH_ENABLED"] == "1" use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1' -use_frameworks = ENV['USE_FRAMEWORKS'] != nil new_arch_enabled_flag = (is_new_arch_enabled ? " -DRCT_NEW_ARCH_ENABLED" : "") is_fabric_enabled = is_new_arch_enabled || ENV["RCT_FABRIC_ENABLED"] @@ -43,21 +42,7 @@ header_search_paths = [ ].concat(use_hermes ? [ "$(PODS_ROOT)/Headers/Public/React-hermes", "$(PODS_ROOT)/Headers/Public/hermes-engine" -] : []).concat(use_frameworks ? [ - "$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx/", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", - "$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-RuntimeApple/React_RuntimeApple.framework/Headers", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-RuntimeCore/React_RuntimeCore.framework/Headers", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers/", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers/", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers/", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-runtimescheduler/React_runtimescheduler.framework/Headers/", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers/", -] : []).map{|p| "\"#{p}\""}.join(" ") +] : []) Pod::Spec.new do |s| s.name = "React-RCTAppDelegate" @@ -87,18 +72,19 @@ Pod::Spec.new do |s| s.dependency "RCT-Folly" s.dependency "RCTRequired" s.dependency "RCTTypeSafety" - s.dependency "ReactCommon/turbomodule/core" s.dependency "React-RCTNetwork" s.dependency "React-RCTImage" - s.dependency "React-NativeModulesApple" s.dependency "React-CoreModules" s.dependency "React-nativeconfig" - s.dependency "React-runtimescheduler" - s.dependency "React-RCTFabric" + + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple") + add_dependency(s, "React-runtimescheduler") + add_dependency(s, "React-RCTFabric", :framework_name => "RCTFabric") if is_new_arch_enabled - s.dependency "React-RuntimeCore" - s.dependency "React-RuntimeApple" + add_dependency(s, "React-RuntimeCore") + add_dependency(s, "React-RuntimeApple") if use_hermes s.dependency "React-RuntimeHermes" end @@ -111,11 +97,11 @@ Pod::Spec.new do |s| end if is_new_arch_enabled - s.dependency "React-Fabric" - s.dependency "React-graphics" - s.dependency "React-utils" - s.dependency "React-debug" - s.dependency "React-rendererdebug" + add_dependency(s, "React-Fabric", :additional_framework_paths => ["react/renderer/components/view/platform/cxx"]) + add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"]) + add_dependency(s, "React-utils") + add_dependency(s, "React-debug") + add_dependency(s, "React-rendererdebug") rel_path_from_pods_root_to_app = Pathname.new(ENV['APP_PATH']).relative_path_from(Pod::Config.instance.installation_root) rel_path_from_pods_to_app = Pathname.new(ENV['APP_PATH']).relative_path_from(File.join(Pod::Config.instance.installation_root, 'Pods')) diff --git a/packages/react-native/Libraries/Blob/React-RCTBlob.podspec b/packages/react-native/Libraries/Blob/React-RCTBlob.podspec index 932a718453db..b0fe2968ca74 100644 --- a/packages/react-native/Libraries/Blob/React-RCTBlob.podspec +++ b/packages/react-native/Libraries/Blob/React-RCTBlob.podspec @@ -22,16 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTBlob" s.version = version @@ -52,12 +44,14 @@ Pod::Spec.new do |s| } s.dependency "RCT-Folly", folly_version - s.dependency "React-Codegen", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version - s.dependency "React-Core/RCTBlobHeaders", version - s.dependency "React-Core/RCTWebSocket", version - s.dependency "React-RCTNetwork", version + s.dependency "React-jsi" + s.dependency "React-Core/RCTBlobHeaders" + s.dependency "React-Core/RCTWebSocket" + s.dependency "React-RCTNetwork" + + add_dependency(s, "React-Codegen") + add_dependency(s, "React-NativeModulesApple") + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" s.dependency "hermes-engine" diff --git a/packages/react-native/Libraries/Image/React-RCTImage.podspec b/packages/react-native/Libraries/Image/React-RCTImage.podspec index cc8433e25f10..471af8914096 100644 --- a/packages/react-native/Libraries/Image/React-RCTImage.podspec +++ b/packages/react-native/Libraries/Image/React-RCTImage.podspec @@ -22,15 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" - ]) -end Pod::Spec.new do |s| s.name = "React-RCTImage" @@ -54,10 +47,13 @@ Pod::Spec.new do |s| s.framework = ["Accelerate", "UIKit"] s.dependency "RCT-Folly", folly_version - s.dependency "React-Codegen", version - s.dependency "RCTTypeSafety", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version - s.dependency "React-Core/RCTImageHeaders", version - s.dependency "React-RCTNetwork", version + s.dependency "RCTTypeSafety" + s.dependency "React-jsi" + s.dependency "React-Core/RCTImageHeaders" + s.dependency "React-RCTNetwork" + + add_dependency(s, "React-Codegen") + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple") + end diff --git a/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec b/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec index 1615adb288dd..788976fc5368 100644 --- a/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec +++ b/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec @@ -22,19 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"" - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTLinking" s.version = version @@ -55,8 +44,11 @@ Pod::Spec.new do |s| "HEADER_SEARCH_PATHS" => header_search_paths.join(' ') } - s.dependency "React-Codegen", version s.dependency "React-Core/RCTLinkingHeaders", version s.dependency "ReactCommon/turbomodule/core", version s.dependency "React-jsi", version + + add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"]) + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"]) end diff --git a/packages/react-native/Libraries/NativeAnimation/React-RCTAnimation.podspec b/packages/react-native/Libraries/NativeAnimation/React-RCTAnimation.podspec index c9d0127264fd..6e9e5ecf8839 100644 --- a/packages/react-native/Libraries/NativeAnimation/React-RCTAnimation.podspec +++ b/packages/react-native/Libraries/NativeAnimation/React-RCTAnimation.podspec @@ -22,16 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTAnimation" s.version = version @@ -52,9 +44,11 @@ Pod::Spec.new do |s| } s.dependency "RCT-Folly", folly_version - s.dependency "React-Codegen", version - s.dependency "RCTTypeSafety", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version - s.dependency "React-Core/RCTAnimationHeaders", version + s.dependency "RCTTypeSafety" + s.dependency "React-jsi" + s.dependency "React-Core/RCTAnimationHeaders" + + add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"]) + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple") end diff --git a/packages/react-native/Libraries/Network/React-RCTNetwork.podspec b/packages/react-native/Libraries/Network/React-RCTNetwork.podspec index 87f64a701fd0..2f6d35036014 100644 --- a/packages/react-native/Libraries/Network/React-RCTNetwork.podspec +++ b/packages/react-native/Libraries/Network/React-RCTNetwork.podspec @@ -22,20 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"", - - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTNetwork" s.version = version @@ -57,9 +45,11 @@ Pod::Spec.new do |s| s.frameworks = "MobileCoreServices" s.dependency "RCT-Folly", folly_version - s.dependency "React-Codegen", version - s.dependency "RCTTypeSafety", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version - s.dependency "React-Core/RCTNetworkHeaders", version + s.dependency "RCTTypeSafety" + s.dependency "React-jsi" + s.dependency "React-Core/RCTNetworkHeaders" + + add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"]) + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"]) end diff --git a/packages/react-native/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec b/packages/react-native/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec index ef4b35ae721d..99d53589149d 100644 --- a/packages/react-native/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +++ b/packages/react-native/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec @@ -22,16 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTPushNotification" s.version = version @@ -53,9 +45,11 @@ Pod::Spec.new do |s| } s.framework = "UserNotifications" - s.dependency "React-Codegen", version - s.dependency "RCTTypeSafety", version - s.dependency "React-Core/RCTPushNotificationHeaders", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version + s.dependency "RCTTypeSafety" + s.dependency "React-Core/RCTPushNotificationHeaders" + s.dependency "React-jsi" + + add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"]) + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple") end diff --git a/packages/react-native/Libraries/Settings/React-RCTSettings.podspec b/packages/react-native/Libraries/Settings/React-RCTSettings.podspec index 48a0e54907db..efeba4a35e52 100644 --- a/packages/react-native/Libraries/Settings/React-RCTSettings.podspec +++ b/packages/react-native/Libraries/Settings/React-RCTSettings.podspec @@ -22,19 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"", - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTSettings" s.version = version @@ -56,9 +45,11 @@ Pod::Spec.new do |s| } s.dependency "RCT-Folly", folly_version - s.dependency "React-Codegen", version - s.dependency "RCTTypeSafety", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version - s.dependency "React-Core/RCTSettingsHeaders", version + s.dependency "RCTTypeSafety" + s.dependency "React-jsi" + s.dependency "React-Core/RCTSettingsHeaders" + + add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"]) + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"]) end diff --git a/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec b/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec index 8911ba9963e2..54c76ef8de57 100644 --- a/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec +++ b/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec @@ -22,18 +22,8 @@ folly_version = '2022.05.16.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"" - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTVibration" s.version = version @@ -56,8 +46,10 @@ Pod::Spec.new do |s| s.frameworks = "AudioToolbox" s.dependency "RCT-Folly", folly_version - s.dependency "React-Codegen", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version - s.dependency "React-Core/RCTVibrationHeaders", version + s.dependency "React-jsi" + s.dependency "React-Core/RCTVibrationHeaders" + + add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"]) + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple") end diff --git a/packages/react-native/React-Core.podspec b/packages/react-native/React-Core.podspec index a1e98679ca61..78572561c8d1 100644 --- a/packages/react-native/React-Core.podspec +++ b/packages/react-native/React-Core.podspec @@ -22,7 +22,6 @@ socket_rocket_version = '0.6.1' boost_compiler_flags = '-Wno-documentation' use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1' -use_frameworks = ENV['USE_FRAMEWORKS'] != nil header_subspecs = { 'CoreModulesHeaders' => 'React/CoreModules/**/*.h', @@ -40,8 +39,6 @@ header_subspecs = { frameworks_search_paths = [] frameworks_search_paths << "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-hermes\"" if use_hermes -frameworks_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon\"" if use_frameworks -frameworks_search_paths << "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric\"" if use_frameworks header_search_paths = [ "$(PODS_TARGET_SRCROOT)/ReactCommon", @@ -51,15 +48,10 @@ header_search_paths = [ "$(PODS_ROOT)/RCT-Folly", "${PODS_ROOT}/Headers/Public/FlipperKit", "$(PODS_ROOT)/Headers/Public/ReactCommon", - "$(PODS_ROOT)/Headers/Public/React-RCTFabric" ].concat(use_hermes ? [ "$(PODS_ROOT)/Headers/Public/React-hermes", "$(PODS_ROOT)/Headers/Public/hermes-engine" -] : []).concat(use_frameworks ? [ - "$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers", - "$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers" -] : []).map{|p| "\"#{p}\""}.join(" ") +] : []) Pod::Spec.new do |s| s.name = "React-Core" diff --git a/packages/react-native/React/CoreModules/React-CoreModules.podspec b/packages/react-native/React/CoreModules/React-CoreModules.podspec index 4754ab64e29c..d72c74cdbdc4 100644 --- a/packages/react-native/React/CoreModules/React-CoreModules.podspec +++ b/packages/react-native/React/CoreModules/React-CoreModules.podspec @@ -24,14 +24,8 @@ header_search_paths = [ "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\"", "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV['USE_FRAMEWORKS'] - header_search_paths.append("\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"") - header_search_paths.append("\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"") -end - Pod::Spec.new do |s| s.name = "React-CoreModules" s.version = version @@ -50,13 +44,15 @@ Pod::Spec.new do |s| "HEADER_SEARCH_PATHS" => header_search_paths.join(" ") } s.framework = "UIKit" - s.dependency "React-Codegen", version s.dependency "RCT-Folly", folly_version s.dependency "RCTTypeSafety", version s.dependency "React-Core/CoreModulesHeaders", version s.dependency "React-RCTImage", version - s.dependency "ReactCommon/turbomodule/core", version s.dependency "React-jsi", version s.dependency 'React-RCTBlob' s.dependency "SocketRocket", socket_rocket_version + + add_dependency(s, "React-Codegen") + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple") end diff --git a/packages/react-native/React/React-RCTFabric.podspec b/packages/react-native/React/React-RCTFabric.podspec index bd4ed10ec194..14e189a08bd8 100644 --- a/packages/react-native/React/React-RCTFabric.podspec +++ b/packages/react-native/React/React-RCTFabric.podspec @@ -30,27 +30,16 @@ header_search_paths = [ "\"$(PODS_ROOT)/Headers/Private/React-Core\"", "\"$(PODS_ROOT)/Headers/Private/Yoga\"", "\"$(PODS_ROOT)/Headers/Public/React-Codegen\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"", ] if ENV['USE_FRAMEWORKS'] - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/textlayoutmanager/platform/ios\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/textinput/iostextinput\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-nativeconfig/React_nativeconfig.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-rendererdebug/React_rendererdebug.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimescheduler/React_runtimescheduler.framework/Headers\"" + create_header_search_path_for_frameworks("React-RCTFabric", :framework_name => "RCTFabric") + .each { |search_path| header_search_paths << "\"#{search_path}\""} end +module_name = "RCTFabric" +header_dir = "React" + Pod::Spec.new do |s| s.name = "React-RCTFabric" s.version = version @@ -64,37 +53,44 @@ Pod::Spec.new do |s| s.exclude_files = "**/tests/*", "**/android/*", s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.header_dir = "React" - s.module_name = "RCTFabric" + s.header_dir = header_dir + s.module_name = module_name s.framework = ["JavaScriptCore", "MobileCoreServices"] s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths, "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags, "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }.merge!(ENV['USE_FRAMEWORKS'] != nil ? { - "PUBLIC_HEADERS_FOLDER_PATH" => "$(CONTENTS_FOLDER_PATH)/Headers/React" + "PUBLIC_HEADERS_FOLDER_PATH" => "#{module_name}.framework/Headers/#{header_dir}" }: {}) - s.dependency "React-Core", version - s.dependency "React-Fabric", version - s.dependency "React-RCTImage", version - s.dependency "React-ImageManager" - s.dependency "React-graphics" + s.dependency "React-Core" + s.dependency "React-RCTImage" s.dependency "RCT-Folly/Fabric", folly_version s.dependency "glog" s.dependency "Yoga" s.dependency "React-RCTText" - s.dependency "React-FabricImage" - s.dependency "React-debug" - s.dependency "React-utils" - s.dependency "React-rendererdebug" - s.dependency "React-nativeconfig" - s.dependency "React-runtimescheduler" + s.dependency "React-jsi" + + add_dependency(s, "React-FabricImage") + add_dependency(s, "React-Fabric", :additional_framework_paths => [ + "react/renderer/textlayoutmanager/platform/ios", + "react/renderer/components/textinput/iostextinput", + "react/renderer/components/view/platform/cxx", + "react/renderer/imagemanager/platform/ios", + ]) + add_dependency(s, "React-nativeconfig") + add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"]) + add_dependency(s, "React-ImageManager") + add_dependency(s, "React-debug") + add_dependency(s, "React-utils") + add_dependency(s, "React-rendererdebug") + add_dependency(s, "React-runtimescheduler") if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" s.dependency "hermes-engine" else - s.dependency "React-jsi" + s.dependency "React-jsc" end s.test_spec 'Tests' do |test_spec| diff --git a/packages/react-native/ReactCommon/React-Fabric.podspec b/packages/react-native/ReactCommon/React-Fabric.podspec index 55c5ce2aba77..c6dcaf3c51a0 100644 --- a/packages/react-native/ReactCommon/React-Fabric.podspec +++ b/packages/react-native/ReactCommon/React-Fabric.podspec @@ -42,12 +42,12 @@ Pod::Spec.new do |s| end s.dependency folly_dep_name, folly_version - s.dependency "React-graphics", version - s.dependency "React-jsiexecutor", version - s.dependency "RCTRequired", version - s.dependency "RCTTypeSafety", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version + + s.dependency "React-jsiexecutor" + s.dependency "RCTRequired" + s.dependency "RCTTypeSafety" + s.dependency "ReactCommon/turbomodule/core" + s.dependency "React-jsi" s.dependency "React-logger" s.dependency "glog" s.dependency "DoubleConversion" @@ -56,13 +56,15 @@ Pod::Spec.new do |s| s.dependency "React-debug" s.dependency "React-utils" s.dependency "React-runtimescheduler" - s.dependency "React-rendererdebug" s.dependency "React-cxxreact" + add_dependency(s, "React-rendererdebug") + add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"]) + if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" s.dependency "hermes-engine" else - s.dependency "React-jsi" + s.dependency "React-jsc" end s.subspec "animations" do |ss| @@ -88,15 +90,12 @@ Pod::Spec.new do |s| "\"$(PODS_ROOT)/RCT-Folly\"", "\"$(PODS_ROOT)/Headers/Private/Yoga\"", "\"$(PODS_TARGET_SRCROOT)\"", + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", ] if ENV['USE_FRAMEWORKS'] header_search_path = header_search_path + [ - "\"$(PODS_ROOT)/DoubleConversion\"", - "\"$(PODS_ROOT)/fmt/include\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers/\"", "\"$(PODS_TARGET_SRCROOT)/react/renderer/textlayoutmanager/platform/ios\"", "\"$(PODS_TARGET_SRCROOT)/react/renderer/components/textinput/iostextinput\"", "\"$(PODS_TARGET_SRCROOT)/react/renderer/components/view/platform/cxx\"", diff --git a/packages/react-native/ReactCommon/React-FabricImage.podspec b/packages/react-native/ReactCommon/React-FabricImage.podspec index 337570170d21..5dd828501dc1 100644 --- a/packages/react-native/ReactCommon/React-FabricImage.podspec +++ b/packages/react-native/ReactCommon/React-FabricImage.podspec @@ -27,21 +27,16 @@ header_search_path = [ "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"", "\"$(PODS_ROOT)/RCT-Folly\"", "\"$(PODS_ROOT)/Headers/Private/Yoga\"", + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", ] if ENV['USE_FRAMEWORKS'] header_search_path = header_search_path + [ "\"$(PODS_TARGET_SRCROOT)\"", - "\"$(PODS_ROOT)/DoubleConversion\"", - "\"$(PODS_ROOT)/fmt/include\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"", "\"$(PODS_TARGET_SRCROOT)/react/renderer/textlayoutmanager/platform/ios\"", "\"$(PODS_TARGET_SRCROOT)/react/renderer/components/textinput/iostextinput\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers/\"" + # "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"", ] end @@ -69,25 +64,30 @@ Pod::Spec.new do |s| end s.dependency folly_dep_name, folly_version - s.dependency "React-graphics", version + s.dependency "React-jsiexecutor", version s.dependency "RCTRequired", version s.dependency "RCTTypeSafety", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version + s.dependency "React-jsi" s.dependency "React-logger" s.dependency "glog" s.dependency "DoubleConversion" s.dependency 'fmt' , '~> 6.2.1' s.dependency "React-ImageManager" - s.dependency "React-Fabric" s.dependency "React-utils" - s.dependency "React-rendererdebug" s.dependency "Yoga" + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core") + add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"]) + add_dependency(s, "React-Fabric", :additional_framework_paths => [ + "react/renderer/components/view/platform/cxx", + "react/renderer/imagemanager/platform/ios" + ]) + add_dependency(s, "React-rendererdebug") + if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" s.dependency "hermes-engine" else - s.dependency "React-jsi" + s.dependency "React-jsc" end end diff --git a/packages/react-native/ReactCommon/React-Mapbuffer.podspec b/packages/react-native/ReactCommon/React-Mapbuffer.podspec index ec5ecc87f2d3..0905b5dee13a 100644 --- a/packages/react-native/ReactCommon/React-Mapbuffer.podspec +++ b/packages/react-native/ReactCommon/React-Mapbuffer.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.exclude_files = "react/renderer/mapbuffer/tests" s.public_header_files = 'react/renderer/mapbuffer/*.h' s.header_dir = "react/renderer/mapbuffer" - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\"", "USE_HEADERMAP" => "YES", + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"", "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" } if ENV['USE_FRAMEWORKS'] @@ -38,6 +38,6 @@ Pod::Spec.new do |s| end s.dependency "glog" - s.dependency "React-debug" + add_dependency(s, "React-debug") end diff --git a/packages/react-native/ReactCommon/React-rncore.podspec b/packages/react-native/ReactCommon/React-rncore.podspec index b3d337a838eb..a4532697403b 100644 --- a/packages/react-native/ReactCommon/React-rncore.podspec +++ b/packages/react-native/ReactCommon/React-rncore.podspec @@ -32,9 +32,8 @@ header_search_paths = [ ] if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - ]) + create_header_search_path_for_frameworks("ReactCommon", :additional_framework_paths => ["react/nativemodule/core"], :include_base_folder => false) + .each { |search_path| header_search_paths << "\"#{search_path}\"" } end Pod::Spec.new do |s| diff --git a/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec b/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec index 66b4dc9e2469..b1766d8fea74 100644 --- a/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +++ b/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec @@ -33,8 +33,10 @@ Pod::Spec.new do |s| s.source = source s.header_dir = "jserrorhandler" s.source_files = "JsErrorHandler.{cpp,h}" - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Mapbuffer/React_Mapbuffer.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\"", "USE_HEADERMAP" => "YES", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" } + s.pod_target_xcconfig = { + "USE_HEADERMAP" => "YES", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" + } s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags if ENV['USE_FRAMEWORKS'] @@ -43,7 +45,8 @@ Pod::Spec.new do |s| end s.dependency folly_dep_name, folly_version - s.dependency "React-jsi", version - s.dependency "React-Mapbuffer" + s.dependency "React-jsi" + add_dependency(s, "React-debug") + add_dependency(s, "React-Mapbuffer") end diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec index 71e1082857d5..fafd890d8be1 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec @@ -48,10 +48,12 @@ Pod::Spec.new do |s| s.dependency "React-callinvoker" s.dependency "React-Core" s.dependency "React-cxxreact" - s.dependency "React-runtimeexecutor" s.dependency "React-jsi" + s.dependency "React-runtimeexecutor" if using_hermes s.dependency "hermes-engine" + else + s.dependency "React-jsc" end end diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec index 7e6769b3dd46..a4257cf810a7 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec @@ -20,6 +20,17 @@ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 folly_version = '2022.05.16.00' boost_compiler_flags = '-Wno-documentation' using_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1" + +header_search_paths = [ + "\"$(PODS_ROOT)/boost\"", + "\"$(PODS_ROOT)/RCT-Folly\"", + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", + "\"$(PODS_ROOT)/Headers/Private/React-Core\"", +] + +create_header_search_path_for_frameworks("ReactCommon-Samples").each { |search_path| header_search_paths << "\"#{search_path}\""} + Pod::Spec.new do |s| s.name = "ReactCommon-Samples" s.module_name = "ReactCommon_Samples" @@ -32,7 +43,7 @@ Pod::Spec.new do |s| s.platforms = min_supported_versions s.source = source s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers\"", + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths, "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++20", "GCC_WARN_PEDANTIC" => "YES" } @@ -47,16 +58,17 @@ Pod::Spec.new do |s| s.dependency "RCT-Folly" s.dependency "DoubleConversion" - s.dependency 'fmt' , '~> 6.2.1' - s.dependency "ReactCommon/turbomodule/core" - s.dependency "React-NativeModulesApple" + s.dependency "fmt", '~> 6.2.1' s.dependency "React-Core" s.dependency "React-cxxreact" - s.dependency "React-Codegen" + s.dependency "React-jsi" + add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"]) + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) + add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"]) if using_hermes s.dependency "hermes-engine" else - s.dependency "React-jsi" + s.dependency "React-jsc" end end diff --git a/packages/react-native/ReactCommon/react/renderer/debug/React-rendererdebug.podspec b/packages/react-native/ReactCommon/react/renderer/debug/React-rendererdebug.podspec index 93fc85aa2008..82099e76691c 100644 --- a/packages/react-native/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +++ b/packages/react-native/ReactCommon/react/renderer/debug/React-rendererdebug.podspec @@ -27,8 +27,7 @@ header_search_paths = [ ] if ENV['USE_FRAMEWORKS'] - header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" #this is needed to allow the Renderer/Debug access its own files - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"" + header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" # this is needed to allow the Renderer/Debug access its own files end Pod::Spec.new do |s| @@ -55,8 +54,8 @@ Pod::Spec.new do |s| s.header_mappings_dir = "../../.." end - s.dependency "React-debug" s.dependency "RCT-Folly", folly_version s.dependency "DoubleConversion" s.dependency 'fmt' , '~> 6.2.1' + add_dependency(s, "React-debug") end diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec index 646270c8be7e..4ca143a1a7eb 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec @@ -26,7 +26,9 @@ Pod::Spec.new do |s| "\"$(PODS_TARGET_SRCROOT)/../../../\"", "\"$(PODS_TARGET_SRCROOT)\"", "\"$(PODS_ROOT)/RCT-Folly\"", - ] + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", + ].join(" ") s.name = "React-ImageManager" s.version = version @@ -43,31 +45,24 @@ Pod::Spec.new do |s| if ENV['USE_FRAMEWORKS'] s.module_name = "React_ImageManager" s.header_mappings_dir = "./" - header_search_paths = header_search_paths + [ - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"", - "\"$(PODS_ROOT)/DoubleConversion\"", - "\"$(PODS_ROOT)/fmt/include\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers/\"", - ] end s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", - "HEADER_SEARCH_PATHS" => header_search_paths.join(" "), + "HEADER_SEARCH_PATHS" => header_search_paths, "CLANG_CXX_LANGUAGE_STANDARD" => "c++20", "DEFINES_MODULE" => "YES", } s.dependency "RCT-Folly/Fabric" - s.dependency "React-Fabric" s.dependency "React-Core/Default" s.dependency "React-RCTImage" - s.dependency "React-debug" - s.dependency "React-rendererdebug" - s.dependency "React-utils" s.dependency "glog" + + add_dependency(s, "React-Fabric") + add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"]) + add_dependency(s, "React-debug") + add_dependency(s, "React-utils") + add_dependency(s, "React-rendererdebug") + end diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec index e4a197ab0451..36ac7a739d4b 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec @@ -25,8 +25,7 @@ header_search_paths = [ ] if ENV['USE_FRAMEWORKS'] - header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" #this is needed to allow the RuntimeScheduler access its own files - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"" + header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" # this is needed to allow the RuntimeScheduler access its own files end Pod::Spec.new do |s| @@ -51,17 +50,20 @@ Pod::Spec.new do |s| s.header_mappings_dir = "../../.." end - s.dependency "React-jsi" s.dependency "React-runtimeexecutor" s.dependency "React-callinvoker" - s.dependency "React-debug" + s.dependency "React-cxxreact" s.dependency "React-rendererdebug" s.dependency "React-utils" s.dependency "glog" s.dependency "RCT-Folly", folly_version + s.dependency "React-jsi" + add_dependency(s, "React-debug") if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" s.dependency "hermes-engine" + else + s.dependency "React-jsc" end end diff --git a/packages/react-native/ReactCommon/react/runtime/React-RuntimeHermes.podspec b/packages/react-native/ReactCommon/react/runtime/React-RuntimeHermes.podspec index 3381e1901171..bbd1814d9d6b 100644 --- a/packages/react-native/ReactCommon/react/runtime/React-RuntimeHermes.podspec +++ b/packages/react-native/ReactCommon/react/runtime/React-RuntimeHermes.podspec @@ -44,9 +44,10 @@ Pod::Spec.new do |s| end s.dependency folly_dep_name, folly_version - s.dependency "React-jsi" s.dependency "React-nativeconfig" s.dependency "React-jsitracing" + s.dependency "React-utils" + s.dependency "React-jsi" if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" s.dependency "hermes-engine" diff --git a/packages/react-native/ReactCommon/react/utils/React-utils.podspec b/packages/react-native/ReactCommon/react/utils/React-utils.podspec index eae635a8929c..fe9dda60726c 100644 --- a/packages/react-native/ReactCommon/react/utils/React-utils.podspec +++ b/packages/react-native/ReactCommon/react/utils/React-utils.podspec @@ -25,10 +25,6 @@ header_search_paths = [ "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"", ] -if ENV["USE_FRAMEWORKS"] - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"" -end - Pod::Spec.new do |s| s.name = "React-utils" s.version = version @@ -52,6 +48,7 @@ Pod::Spec.new do |s| end s.dependency "RCT-Folly", folly_version - s.dependency "React-debug" s.dependency "glog" + + add_dependency(s, "React-debug") end diff --git a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb index 0b5671bfd2a3..0655cabd5d21 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb @@ -546,14 +546,17 @@ def get_podspec_no_fabric_no_script "FRAMEWORK_SEARCH_PATHS" => [], "HEADER_SEARCH_PATHS" => [ - "\"$(PODS_ROOT)/boost\"", - "\"$(PODS_ROOT)/RCT-Folly\"", - "\"$(PODS_ROOT)/DoubleConversion\"", - "\"$(PODS_ROOT)/fmt/include\"", - "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"$(PODS_ROOT)/Headers/Private/React-Fabric\"", - "\"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"", - "\"$(PODS_ROOT)/Headers/Private/Yoga\"", + "\"$(PODS_ROOT)/boost\"", + "\"$(PODS_ROOT)/RCT-Folly\"", + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", + "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", + "\"$(PODS_ROOT)/Headers/Private/React-Fabric\"", + "\"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"", + "\"$(PODS_ROOT)/Headers/Private/Yoga\"", + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", + "\"$(PODS_TARGET_SRCROOT)\"", ].join(' ') }, 'dependencies': { @@ -596,7 +599,7 @@ def get_podspec_when_use_frameworks specs = get_podspec_no_fabric_no_script() specs["pod_target_xcconfig"]["FRAMEWORK_SEARCH_PATHS"].concat([]) - specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-FabricImage/React_FabricImage.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"") + specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-rendererdebug/React_rendererdebug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\"") specs[:dependencies].merge!({ 'React-graphics': [], diff --git a/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb b/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb index 481185d02508..46d129bba937 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb @@ -132,7 +132,7 @@ def test_installModulesDependencies_whenNewArchEnabledAndNewArchAndNoSearchPaths # Assert assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags) - assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"") + assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-rendererdebug/React_rendererdebug.framework/Headers\"") assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++20") assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1") assert_equal( @@ -173,7 +173,7 @@ def test_installModulesDependencies_whenNewArchDisabledAndSearchPathsAndCompiler # Assert assert_equal(spec.compiler_flags, "-Wno-nullability-completeness #{NewArchitectureHelper.folly_compiler_flags}") - assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"") + assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-rendererdebug/React_rendererdebug.framework/Headers\"") assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++20") assert_equal( spec.dependencies, diff --git a/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb b/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb index 4c57727fa8f4..88b298e025ab 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/utils-test.rb @@ -16,6 +16,7 @@ require_relative "./test_utils/TargetDefinitionMock.rb" require_relative "./test_utils/XcodeprojMock.rb" require_relative "./test_utils/XcodebuildMock.rb" +require_relative "./test_utils/SpecMock.rb" class UtilsTests < Test::Unit::TestCase def setup @@ -36,6 +37,7 @@ def teardown ENV['USE_HERMES'] = '1' ENV['USE_FRAMEWORKS'] = nil system_reset_commands + $RN_PLATFORMS = nil end # ======================= # @@ -834,7 +836,7 @@ def test_updateSearchPaths_whenUseFrameworks_addsSearchPaths # Assert user_project_mock.build_configurations.each do |config| received_search_path = config.build_settings["HEADER_SEARCH_PATHS"] - expected_search_path = "$(inherited) ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx ${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios" + expected_search_path = "$(inherited) ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx ${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios" assert_equal(expected_search_path, received_search_path) end @@ -995,6 +997,172 @@ def test_applyATSConfig_plistNonNil end end + # =============================================== # + # Test - Create Header Search Path For Frameworks # + # =============================================== # + def test_creatHeaderSearchPathForFrameworks_whenNoPlatformsAndNoExtraPath_createsPlainSearchPath + result = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-RCTFabric", "RCTFabric", []) + + assert_equal(result, [ + "${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers" + ]) + end + + def test_creatHeaderSearchPathForFrameworks_whenNoPlatformsAndExtraPath_createsPlainSearchPath + result = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"]) + + assert_equal(result, [ + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + ]) + end + + def test_creatHeaderSearchPathForFrameworks_whenEmptyPlatformsAndExtraPath_createsPlainSearchPath + $RN_PLATFORMS = [] + + result = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"]) + + assert_equal(result, [ + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + ]) + end + + def test_creatHeaderSearchPathForFrameworks_whenOnlyOnePlatformsAndExtraPath_createsPlainSearchPath + $RN_PLATFORMS = ['iOS'] + + result = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"]) + + assert_equal(result, [ + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + ]) + end + + def test_creatHeaderSearchPathForFrameworks_whenMultiplePlatformsAndExtraPath_createsPlainSearchPath + $RN_PLATFORMS = ["iOS", "macOS"] + + result = ReactNativePodsUtils.create_header_search_path_for_frameworks( + "PODS_CONFIGURATION_BUILD_DIR", + "React-Fabric", + "React_Fabric", + [ + "react/renderer/components/view/platform/cxx", + "react/renderer/components/view/platform/ios" + ] + ) + + assert_equal(result, [ + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-iOS/React_Fabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-iOS/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-iOS/React_Fabric.framework/Headers/react/renderer/components/view/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-macOS/React_Fabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-macOS/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-macOS/React_Fabric.framework/Headers/react/renderer/components/view/platform/ios", + ]) + end + + # ===================== # + # TEST - Add Dependency # + # ===================== # + def test_addDependency_whenNoHeaderSearchPathAndNoVersion_addsThem + spec = SpecMock.new + + ReactNativePodsUtils.add_dependency(spec, "React-Fabric", "PODS_CONFIGURATION_BUILD_DIR", "React_Fabric") + + assert_equal(spec.dependencies, [{:dependency_name => "React-Fabric"}]) + assert_equal(spec.to_hash["pod_target_xcconfig"], {"HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\""}) + end + + def test_addDependency_whenNoHeaderSearchPathAndVersion_addsThem + spec = SpecMock.new + + ReactNativePodsUtils.add_dependency(spec, "React-Fabric", "PODS_CONFIGURATION_BUILD_DIR", "React_Fabric", :additional_paths => [], :version => '1000.0.0') + + assert_equal(spec.dependencies, [{:dependency_name => "React-Fabric", "version" => '1000.0.0'}]) + assert_equal(spec.to_hash["pod_target_xcconfig"], {"HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\""}) + end + + def test_addDependency_whenHeaderSearchPathAndVersion_addsThemMaintainingTheSearchPaths + spec = SpecMock.new + spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"] = "\"$(PODS_ROOT)/RCT-Folly\"" + + ReactNativePodsUtils.add_dependency(spec, "React-Fabric", "PODS_CONFIGURATION_BUILD_DIR", "React_Fabric", :additional_paths => [], :version => '1000.0.0') + + assert_equal(spec.dependencies, [{:dependency_name => "React-Fabric", "version" => '1000.0.0'}]) + assert_equal(spec.to_hash["pod_target_xcconfig"], {"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\""}) + end + + def test_addDependencies_whenHeaderSearchPathAndVersion_addsThemMaintainingTheSearchPaths + spec = SpecMock.new + spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"] = "\"$(PODS_ROOT)/RCT-Folly\"" + + ReactNativePodsUtils.add_dependency(spec, "React-Fabric", "PODS_CONFIGURATION_BUILD_DIR", "React_Fabric", :additional_paths => [], :version => '1000.0.0') + ReactNativePodsUtils.add_dependency(spec, "React-RCTFabric", "PODS_CONFIGURATION_BUILD_DIR", "RCTFabric", :additional_paths => []) + + assert_equal(spec.dependencies, [{:dependency_name => "React-Fabric", "version" => '1000.0.0'}, {:dependency_name => "React-RCTFabric" }]) + assert_equal(spec.to_hash["pod_target_xcconfig"], { + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\""}) + end + + def test_addDependencies_whenHeaderSearchPathAndVersionWithAdditionalPaths_addsThemMaintainingTheSearchPaths + spec = SpecMock.new + spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"] = "\"$(PODS_ROOT)/RCT-Folly\"" + + ReactNativePodsUtils.add_dependency(spec, "React-Fabric", "PODS_CONFIGURATION_BUILD_DIR", "React_Fabric", :additional_paths => [], :version => '1000.0.0') + ReactNativePodsUtils.add_dependency(spec, "React-RCTFabric", "PODS_CONFIGURATION_BUILD_DIR", "RCTFabric", :additional_paths => ["react/renderer/components/view/platform/ios"]) + + assert_equal(spec.dependencies, [{:dependency_name => "React-Fabric", "version" => '1000.0.0'}, {:dependency_name => "React-RCTFabric" }]) + assert_equal(spec.to_hash["pod_target_xcconfig"], { + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers/react/renderer/components/view/platform/ios\""}) + end + + def test_addDependencies_whenHeaderSearchPathAndVersionWithAdditionalPathsAndPlatforms_addsThemMaintainingTheSearchPaths + spec = SpecMock.new + spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"] = "\"$(PODS_ROOT)/RCT-Folly\"" + $RN_PLATFORMS = ['iOS', 'macOS'] + + ReactNativePodsUtils.add_dependency(spec, "React-Fabric", "PODS_CONFIGURATION_BUILD_DIR", "React_Fabric", :additional_paths => [], :version => '1000.0.0') + ReactNativePodsUtils.add_dependency(spec, "React-RCTFabric", "PODS_CONFIGURATION_BUILD_DIR", "RCTFabric", :additional_paths => ["react/renderer/components/view/platform/ios"]) + + expected_search_paths = [ + "$(PODS_ROOT)/RCT-Folly", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-iOS/React_Fabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric-iOS/RCTFabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric-iOS/RCTFabric.framework/Headers/react/renderer/components/view/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric-macOS/React_Fabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric-macOS/RCTFabric.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric-macOS/RCTFabric.framework/Headers/react/renderer/components/view/platform/ios" + ] + .map { |sp| return "\"#{sp}\"" } + .join(" ") + + assert_equal(spec.dependencies, [{:dependency_name => "React-Fabric", "version" => '1000.0.0'}, {:dependency_name => "React-RCTFabric" }]) + assert_equal(spec.to_hash["pod_target_xcconfig"], { + "HEADER_SEARCH_PATHS" => expected_search_paths}) + end + + def test_addDependencies_whenSubspecsAndHeaderSearchPathAndVersionWithAdditionalPathsAndPlatforms_addsThemMaintainingTheSearchPaths + spec = SpecMock.new + spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"] = "\"$(PODS_ROOT)/RCT-Folly\"" + $RN_PLATFORMS = ['iOS', 'macOS'] + + ReactNativePodsUtils.add_dependency(spec, "ReactCommon", "PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", :additional_paths => ["react/nativemodule/core"], :subspec_dependency => 'turbomodule/core') + + expected_search_paths = [ + "$(PODS_ROOT)/RCT-Folly", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-iOS/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-iOS/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-macOS/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-macOS/ReactCommon.framework/Headers/react/nativemodule/core", + ] + .map { |sp| return "\"#{sp}\"" } + .join(" ") + + assert_equal(spec.dependencies, [{:dependency_name => "ReactCommon/turbomodule/core"}]) + assert_equal(spec.to_hash["pod_target_xcconfig"], { + "HEADER_SEARCH_PATHS" => expected_search_paths}) + end end # ===== # diff --git a/packages/react-native/scripts/cocoapods/codegen_utils.rb b/packages/react-native/scripts/cocoapods/codegen_utils.rb index 78e39ed862a2..b97a3382929e 100644 --- a/packages/react-native/scripts/cocoapods/codegen_utils.rb +++ b/packages/react-native/scripts/cocoapods/codegen_utils.rb @@ -4,6 +4,7 @@ # LICENSE file in the root directory of this source tree. require 'json' +require_relative './utils.rb' require_relative './helpers.rb' require_relative './codegen_script_phase_extractor.rb' @@ -86,27 +87,25 @@ def get_react_codegen_spec(package_json_file, folly_version: '2022.05.16.00', fa "\"$(PODS_ROOT)/Headers/Private/React-Fabric\"", "\"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"", "\"$(PODS_ROOT)/Headers/Private/Yoga\"", + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", + "\"$(PODS_TARGET_SRCROOT)\"", ] framework_search_paths = [] if use_frameworks - header_search_paths.concat([ - "\"$(PODS_ROOT)/DoubleConversion\"", - "\"$(PODS_ROOT)/fmt/include\"", - "\"$(PODS_TARGET_SRCROOT)\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-FabricImage/React_FabricImage.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"", - ]) + ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"]) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-FabricImage", "React_FabricImage", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-graphics", "React_graphics", ["react/renderer/graphics/platform/ios"])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", "ReactCommon", ["react/nativemodule/core"])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-NativeModulesApple", "React_NativeModulesApple", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-RCTFabric", "RCTFabric", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-debug", "React_debug", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-rendererdebug", "React_rendererdebug", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-utils", "React_utils", [])) + .each { |search_path| + header_search_paths << "\"#{search_path}\"" + } end spec = { diff --git a/packages/react-native/scripts/cocoapods/new_architecture.rb b/packages/react-native/scripts/cocoapods/new_architecture.rb index 7210379bdded..ba75b019a9b9 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -5,6 +5,8 @@ require 'json' +require_relative "./utils" + class NewArchitectureHelper @@shared_flags = "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1" @@ -106,18 +108,19 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version) if ENV['USE_FRAMEWORKS'] header_search_paths << "\"$(PODS_ROOT)/DoubleConversion\"" header_search_paths << "\"$(PODS_ROOT)/fmt/include\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"" - header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\"" - header_search_paths << "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"" + ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-graphics", "React_graphics", ["react/renderer/graphics/platform/ios"]) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-FabricImage", "React_FabricImage", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", "ReactCommon", ["react/nativemodule/core"])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-NativeModulesApple", "React_NativeModulesApple", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-RCTFabric", "RCTFabric", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-utils", "React_utils", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-debug", "React_debug", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-ImageManager", "React_ImageManager", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-rendererdebug", "React_rendererdebug", [])) + .each { |search_path| + header_search_paths << "\"#{search_path}\"" + } end header_search_paths_string = header_search_paths.join(" ") spec.compiler_flags = compiler_flags.empty? ? @@folly_compiler_flags : "#{compiler_flags} #{@@folly_compiler_flags}" diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index 0d83e6063ca0..718304ed7703 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -254,6 +254,46 @@ def self.detect_use_frameworks(target_definition) end end + def self.create_header_search_path_for_frameworks(base_folder, pod_name, framework_name, additional_paths, include_base_path = true) + platforms = $RN_PLATFORMS != nil ? $RN_PLATFORMS : [] + search_paths = [] + + if platforms.empty?() || platforms.length() == 1 + base_path = File.join("${#{base_folder}}", pod_name, "#{framework_name}.framework", "Headers") + self.add_search_path_to_result(search_paths, base_path, additional_paths, include_base_path) + else + platforms.each { |platform| + base_path = File.join("${#{base_folder}}", "#{pod_name}-#{platform}", "#{framework_name}.framework", "Headers") + self.add_search_path_to_result(search_paths, base_path, additional_paths, include_base_path) + } + end + return search_paths + end + + # Add a new dependency to an existing spec, configuring also the headers search paths + def self.add_dependency(spec, dependency_name, base_folder_for_frameworks, framework_name, additional_paths: [], version: nil, subspec_dependency: nil) + # Update Search Path + optional_current_search_path = spec.to_hash["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"] + current_search_paths = (optional_current_search_path != nil ? optional_current_search_path : "") + .split(" ") + create_header_search_path_for_frameworks(base_folder_for_frameworks, dependency_name, framework_name, additional_paths) + .each { |path| + wrapped_path = "\"#{path}\"" + current_search_paths << wrapped_path + } + current_pod_target_xcconfig = spec.to_hash["pod_target_xcconfig"] + current_pod_target_xcconfig["HEADER_SEARCH_PATHS"] = current_search_paths.join(" ") + spec.pod_target_xcconfig = current_pod_target_xcconfig + + actual_dependency = subspec_dependency != nil ? "#{dependency_name}/#{subspec_dependency}" : dependency_name + # Set Dependency + if !version + spec.dependency actual_dependency + else + spec.dependency actual_dependency, version + end + end + def self.update_search_paths(installer) return if ENV['USE_FRAMEWORKS'] == nil @@ -264,12 +304,14 @@ def self.update_search_paths(installer) header_search_paths = config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited)" - header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers") - header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core") - header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios") - header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx") - header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers") - header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios") + ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", "ReactCommon", ["react/nativemodule/core"]) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon-Samples", "ReactCommon_Samples", ["platform/ios"])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"], false)) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-NativeModulesApple", "React_NativeModulesApple", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-graphics", "React_graphics", ["react/renderer/graphics/platform/ios"])) + .each{ |search_path| + header_search_paths = self.add_search_path_if_not_included(header_search_paths, search_path) + } config.build_settings["HEADER_SEARCH_PATHS"] = header_search_paths end @@ -469,34 +511,31 @@ def self.set_rctfolly_search_paths(target_installation_result) end def self.set_codegen_search_paths(target_installation_result) - ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-Codegen", [ - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"", - ]) + header_search_paths = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Codegen", "React_Codegen", []) + .map { |search_path| "\"#{search_path}\"" } + ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-Codegen", header_search_paths) end def self.set_reactcommon_searchpaths(target_installation_result) - ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "ReactCommon", [ - "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - ]) - + header_search_paths = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", "ReactCommon", ["react/nativemodule/core"]) + .map { |search_path| "\"#{search_path}\"" } + ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "ReactCommon", header_search_paths) end def self.set_rctfabric_search_paths(target_installation_result) - ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-RCTFabric", [ - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Graphics/React_graphics.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"", - ]) + header_search_paths = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-RCTFabric", "RCTFabric", []) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-FabricImage", "React_FabricImage", [])) + .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Graphics", "React_graphics", ["react/renderer/graphics/platform/ios"])) + .map { |search_path| "\"#{search_path}\"" } + + ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-RCTFabric", header_search_paths) end def self.set_imagemanager_search_path(target_installation_result) - ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-ImageManager", [ - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\"" - ]) + header_search_paths = ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/imagemanager/platform/ios"]) + .map { |search_path| "\"#{search_path}\"" } + ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-ImageManager", header_search_paths) end def self.get_plist_paths_from(user_project) @@ -583,4 +622,15 @@ def self.react_native_pods "React-hermes", ] end + + def self.add_search_path_to_result(result, base_path, additional_paths, include_base_path) + if (include_base_path) + result << base_path + end + + additional_paths.each { |extra_path| + result << File.join(base_path, extra_path) + } + return result + end end diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index ad8229cf8afa..d29dca30081b 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -210,6 +210,41 @@ def folly_flags() return NewArchitectureHelper.folly_compiler_flags end +# Add a dependency to a spec, making sure that the HEADER_SERACH_PATHS are set properly. +# This function automate the requirement to specify the HEADER_SEARCH_PATHS which was error prone +# and hard to pull out properly to begin with. +# Secondly, it prepares the podspec to work also with other platforms, because this function is +# able to generate search paths that are compatible with macOS and other platform if specified by +# the $RN_PLATFORMS variable. +# To generate Header Search Paths for multiple platforms, define in your Podfile or Ruby infra a +# $RN_PLATFORMS static variable with the list of supported platforms, for example: +# `$RN_PLATFORMS = ["iOS", "macOS"]` +# +# Parameters: +# - spec: the spec that needs to be modified +# - pod_name: the name of the dependency we had to add to the spec +# - additional_framework_paths: additional sub paths we had to add to the HEADER_SEARCH_PATH +# - framework_name: the name of the framework in case it is different from the pod_name +# - version: the version of the pod_name the spec needs to depend on +# - base_dir: Base directory from where we need to start looking. Defaults to PODS_CONFIGURATION_BUILD_DIR +def add_dependency(spec, pod_name, subspec: nil, additional_framework_paths: [], framework_name: nil, version: nil, base_dir: "PODS_CONFIGURATION_BUILD_DIR") + fixed_framework_name = framework_name != nil ? framework_name : pod_name.gsub("-", "_") # frameworks can't have "-" in their name + ReactNativePodsUtils.add_dependency(spec, pod_name, base_dir, fixed_framework_name, :additional_paths => additional_framework_paths, :version => version) +end + +# This function generates an array of HEADER_SEARCH_PATH that can be added to the HEADER_SEARCH_PATH property when use_frameworks! is enabled +# +# Parameters: +# - pod_name: the name of the dependency we had to add to the spec +# - additional_framework_paths: additional sub paths we had to add to the HEADER_SEARCH_PATH +# - framework_name: the name of the framework in case it is different from the pod_name +# - base_dir: Base directory from where we need to start looking. Defaults to PODS_CONFIGURATION_BUILD_DIR +# - include_base_folder: whether the array must include the base import path or only the additional_framework_paths +def create_header_search_path_for_frameworks(pod_name, additional_framework_paths: [], framework_name: nil, base_dir: "PODS_CONFIGURATION_BUILD_DIR", include_base_folder: true) + fixed_framework_name = framework_name != nil ? framework_name : pod_name.gsub("-", "_") + return ReactNativePodsUtils.create_header_search_path_for_frameworks(base_dir, pod_name, fixed_framework_name, additional_framework_paths, include_base_folder) +end + # This function can be used by library developer to prepare their modules for the New Architecture. # It passes the Folly Flags to the module, it configures the search path and installs some New Architecture specific dependencies. # From 735781cc9f898cf09e1b976065909657649eac30 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Wed, 11 Oct 2023 07:31:57 -0700 Subject: [PATCH 107/190] Purge children from view registry when UIManager is invalidated (#38617) Summary: Talking about Paper & iOS here. In standard RN applications when a native component is removed permanently from view hierarchy [it is invalidated (if it implements `RCTInvalidating`)](https://github.com/facebook/react-native/blob/e64756ae5bb5c0607a4d97a134620fafcb132b3b/packages/react-native/React/Modules/RCTUIManager.m#L483-L495). Components that implement `RCTInvalidating` such as [`RNSScreenView`](https://github.com/software-mansion/react-native-screens/blob/9fb3bd00850bcdf29b46daa57e56eabda3ae30ea/ios/RNSScreen.mm#L35) of [`react-native-screens`](https://github.com/software-mansion/react-native-screens) library rely on `RCTInvalidating#invalidate` method being called in adequate moment to release retained resources (in my case the `RNSScreenView` holds a strong reference to it's view controller preventing it from being garbage collected). However in case of brownfield applications (React Native is used only for a particular view & loaded on demand, see: https://github.com/software-mansion/react-native-screens/issues/1754 for discussion & app example) when view controller holding `RCTRootView` is dismissed and whole `React Native` managed view / controller tree gets deallocated, `RCTInvalidating#invalidate` method is not called on the dismissed components, thus in my particular use case, leading to memory leak. Right now I've added call to `RCTUIManager#_purgeChildren:fromRegistry:` (which internally invalidates all components which implement `RCTInvalidating`) in `RCTUIManager#invalidate`. ## Changelog: [IOS][FIXED] - Purge children from view registry on `RCTUIManager` invalidation. Pull Request resolved: https://github.com/facebook/react-native/pull/38617 Test Plan: You can run the [demo](https://github.com/mkondakov/RNSScreensMemoryLeak) provided in the [issue](https://github.com/software-mansion/react-native-screens/issues/1754). Following screenshots show that memory leak in brownfield application is resolved. Without the change (`invalidate` method is not being called on native components) ![image](https://github.com/facebook/react-native/assets/50801299/dac331c2-1e7c-4e66-a8c1-b88f7a007d9b) With the change: ![image](https://github.com/facebook/react-native/assets/50801299/7a8afbe9-446c-47a2-a972-d7589b921677) Reviewed By: NickGerleman Differential Revision: D49952215 Pulled By: javache fbshipit-source-id: 6336b86774615acc40279c97e6ae0bb777bda8ad --- packages/react-native/React/Modules/RCTUIManager.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/Modules/RCTUIManager.m b/packages/react-native/React/Modules/RCTUIManager.m index 9fe11430c8b7..c6b73cc5bbbd 100644 --- a/packages/react-native/React/Modules/RCTUIManager.m +++ b/packages/react-native/React/Modules/RCTUIManager.m @@ -101,8 +101,11 @@ - (void)invalidate RCTExecuteOnMainQueue(^{ RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"UIManager invalidate", nil); + NSMutableDictionary> *viewRegistry = + (NSMutableDictionary> *)self->_viewRegistry; for (NSNumber *rootViewTag in self->_rootViewTags) { - UIView *rootView = self->_viewRegistry[rootViewTag]; + id rootView = viewRegistry[rootViewTag]; + [self _purgeChildren:[rootView reactSubviews] fromRegistry:viewRegistry]; if ([rootView conformsToProtocol:@protocol(RCTInvalidating)]) { [(id)rootView invalidate]; } From edb474608583a9a4250cd6a24d6bb31a2690722b Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Fri, 10 Nov 2023 04:45:51 -0800 Subject: [PATCH 108/190] Expose unstable_InspectorProxy and unstable_Device from dev-middleware (#41370) Summary: Recently, both `metro-inspector-proxy`(https://github.com/facebook/react-native/pull/39045) and `react-native-community/cli-plugin-metro`(https://github.com/facebook/react-native/pull/38795) were moved to this repo and in the process of moving these packages, the `exports` field inside package.json was added, only exporting the `index.js` file. The problem is that Expo CLI (and possibly other community packages) rely on functions and classes that are not exported in the `index.js` file, e.g. Importing the InspectorProxy class from `react-native/dev-middleware/dist/inspector-proxy/InspectorProxy`. Normally this wouldn't be a problem and we would just import from `dist/` but due to the `exports` field, attempting to import from any other file not specified on this field will result in a `ERR_PACKAGE_PATH_NOT_EXPORTED` error. As a short-term fix, we should create `unstable_`-prefixed exports of individual features Expo currently depends on. ## Changelog: [INTERNAL] [CHANGED] - Expose unstable_InspectorProxy and unstable_Device from `react-native/dev-middleware` Pull Request resolved: https://github.com/facebook/react-native/pull/41370 Test Plan: N / A Reviewed By: robhogan Differential Revision: D51163134 Pulled By: blakef fbshipit-source-id: e67adaedc4fc64131e4c9dd8383c9877b8202283 --- packages/dev-middleware/src/createDevMiddleware.js | 11 ++++++++++- packages/dev-middleware/src/index.flow.js | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js index 7feeb8555e94..3451882d8948 100644 --- a/packages/dev-middleware/src/createDevMiddleware.js +++ b/packages/dev-middleware/src/createDevMiddleware.js @@ -60,6 +60,13 @@ type Options = $ReadOnly<{ * This is an unstable API with no semver guarantees. */ unstable_experiments?: ExperimentsConfig, + + /** + * An interface for using a modified inspector proxy implementation. + * + * This is an unstable API with no semver guarantees. + */ + unstable_InspectorProxy?: Class, }>; type DevMiddlewareAPI = $ReadOnly<{ @@ -74,10 +81,12 @@ export default function createDevMiddleware({ unstable_browserLauncher = DefaultBrowserLauncher, unstable_eventReporter, unstable_experiments: experimentConfig = {}, + unstable_InspectorProxy, }: Options): DevMiddlewareAPI { const experiments = getExperiments(experimentConfig); - const inspectorProxy = new InspectorProxy( + const InspectorProxyClass = unstable_InspectorProxy ?? InspectorProxy; + const inspectorProxy = new InspectorProxyClass( projectRoot, serverBaseUrl, unstable_eventReporter, diff --git a/packages/dev-middleware/src/index.flow.js b/packages/dev-middleware/src/index.flow.js index 4060a2bb2d4c..c662838fea10 100644 --- a/packages/dev-middleware/src/index.flow.js +++ b/packages/dev-middleware/src/index.flow.js @@ -13,3 +13,6 @@ export {default as createDevMiddleware} from './createDevMiddleware'; export type {BrowserLauncher, LaunchedBrowser} from './types/BrowserLauncher'; export type {EventReporter, ReportableEvent} from './types/EventReporter'; + +export {default as unstable_InspectorProxy} from './inspector-proxy/InspectorProxy'; +export {default as unstable_Device} from './inspector-proxy/Device'; From b23d71ca467db02467a5d4cb3d3ea18828ee4f93 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Thu, 16 Nov 2023 03:05:35 -0800 Subject: [PATCH 109/190] Do not include two copies of JSI when using hermes-engine (#41499) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41499 After D48152876 we consume JSI from `ReactCommon/jsi`, and ignore JSI that is distributed with `hermes-engine`. This diff removes `include/jsi` from `source_files` of `hermes-engine` so we don't get two sets of JSI headers - one from `ReactCommon`, and the other one from `hermes-engine`. This diff also fixes accidental breakage of ODR violation. We will no longer compile JSI into `react-native` when linking against `hermes-engine`, which already has JSI in it. Changelog: [iOS][Fixed] - Exclude JSI headers when using hermes-engine prebuilt. Reviewed By: cipolleschi Differential Revision: D51347562 fbshipit-source-id: 6e4b9940c43d74d227a05999926b8752d7685670 --- .../react-native/ReactCommon/jsi/React-jsi.podspec | 10 ++++++++-- .../sdks/hermes-engine/hermes-engine.podspec | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactCommon/jsi/React-jsi.podspec b/packages/react-native/ReactCommon/jsi/React-jsi.podspec index e6bea70de293..e9047318bc34 100644 --- a/packages/react-native/ReactCommon/jsi/React-jsi.podspec +++ b/packages/react-native/ReactCommon/jsi/React-jsi.podspec @@ -46,9 +46,15 @@ Pod::Spec.new do |s| s.dependency "glog" s.source_files = "**/*.{cpp,h}" - s.exclude_files = [ + files_to_exclude = [ "jsi/jsilib-posix.cpp", "jsi/jsilib-windows.cpp", "**/test/*" - ] + ] + if js_engine == :hermes + # JSI is a part of hermes-engine. Including them also in react-native will violate the One Definition Rulle. + files_to_exclude += [ "jsi/jsi.cpp" ] + s.dependency "hermes-engine" + end + s.exclude_files = files_to_exclude end diff --git a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec index c7e22ddf5722..ab678e142c65 100644 --- a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec +++ b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec @@ -41,7 +41,7 @@ Pod::Spec.new do |spec| spec.subspec 'Pre-built' do |ss| ss.preserve_paths = ["destroot/bin/*"].concat(["**/*.{h,c,cpp}"]) - ss.source_files = "destroot/include/**/*.h" + ss.source_files = "destroot/include/hermes/**/*.h" ss.header_mappings_dir = "destroot/include" ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework" ss.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework" From 40fe1cbd8c61d921b1fb19cbbc7fcb6dc0f8a181 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 29 Sep 2023 12:11:24 -0700 Subject: [PATCH 110/190] Remove support for Android API < 23 in ReactEditText (#39671) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39671 Since minsdk version was increased to 23, we are deleting code using Android APIs < 23 for class ReactEditText changelog: [Android][Breaking] Remove support for Android API < 23 in ReactEditText Reviewed By: NickGerleman Differential Revision: D48545507 fbshipit-source-id: 98be52ba36248962864e99e80ff648bbb351ff61 --- .../react/views/textinput/ReactEditText.java | 33 +++---------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 081f2b80160f..ecc6165f7244 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -9,8 +9,6 @@ import static com.facebook.react.uimanager.UIManagerHelper.getReactContext; -import android.content.ClipData; -import android.content.ClipboardManager; import android.content.Context; import android.graphics.Color; import android.graphics.Paint; @@ -210,9 +208,7 @@ public boolean onActionItemClicked(ActionMode mode, MenuItem item) { public void onDestroyActionMode(ActionMode mode) {} }; setCustomSelectionActionModeCallback(customActionModeCallback); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - setCustomInsertionActionModeCallback(customActionModeCallback); - } + setCustomInsertionActionModeCallback(customActionModeCallback); } @Override @@ -308,26 +304,7 @@ public InputConnection onCreateInputConnection(EditorInfo outAttrs) { @Override public boolean onTextContextMenuItem(int id) { if (id == android.R.id.paste) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - id = android.R.id.pasteAsPlainText; - } else { - ClipboardManager clipboard = - (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE); - ClipData previousClipData = clipboard.getPrimaryClip(); - if (previousClipData != null) { - for (int i = 0; i < previousClipData.getItemCount(); i++) { - final CharSequence text = previousClipData.getItemAt(i).coerceToText(getContext()); - final CharSequence paste = (text instanceof Spanned) ? text.toString() : text; - if (paste != null) { - ClipData clipData = ClipData.newPlainText(null, text); - clipboard.setPrimaryClip(clipData); - } - } - boolean actionPerformed = super.onTextContextMenuItem(id); - clipboard.setPrimaryClip(previousClipData); - return actionPerformed; - } - } + id = android.R.id.pasteAsPlainText; } return super.onTextContextMenuItem(id); } @@ -702,10 +679,8 @@ public void maybeSetText(ReactTextUpdate reactTextUpdate) { } mDisableTextDiffing = false; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - if (getBreakStrategy() != reactTextUpdate.getTextBreakStrategy()) { - setBreakStrategy(reactTextUpdate.getTextBreakStrategy()); - } + if (getBreakStrategy() != reactTextUpdate.getTextBreakStrategy()) { + setBreakStrategy(reactTextUpdate.getTextBreakStrategy()); } // Update cached spans (in Fabric only). From 3f907b10d489d37e0833a6791f38b6335dfea47f Mon Sep 17 00:00:00 2001 From: Jesse Watts-Russell Date: Tue, 17 Oct 2023 12:55:40 -0700 Subject: [PATCH 111/190] Android Events - setting default to true to use C++ event pipeline (#41036) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41036 Changelog: [Added] - Shipping the new event dispatching pipeline that immediately moves events over to the C++ queue. This should unblock useDeferredValue + useTransition interruptibility on Android. Reviewed By: javache Differential Revision: D50365981 fbshipit-source-id: ecf60e5bc29fb4568463568a6ede4330e0294fd3 --- .../main/java/com/facebook/react/config/ReactFeatureFlags.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java index 3a514917cc7c..baa1efaaed32 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -155,7 +155,7 @@ public class ReactFeatureFlags { public static boolean enableDefaultAsyncBatchedPriority = false; /** Utilize shared Event C++ pipeline with fabric's renderer */ - public static boolean enableFabricSharedEventPipeline = false; + public static boolean enableFabricSharedEventPipeline = true; /** When enabled, Fabric will avoid cloning notes to perform state progression. */ public static boolean enableClonelessStateProgression = false; From 690b317106a99f83dba2cd98e81763f5f564b02d Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 16 Nov 2023 23:13:11 -0800 Subject: [PATCH 112/190] Update Hermes tag to hermes-2023-11-17-RNv0.73.0-21043a3fc062be445e56a2c10ecd8be028dd9cc5 --- packages/react-native/sdks/.hermesversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/sdks/.hermesversion b/packages/react-native/sdks/.hermesversion index a612ccf72e73..21b170d18fe3 100644 --- a/packages/react-native/sdks/.hermesversion +++ b/packages/react-native/sdks/.hermesversion @@ -1 +1 @@ -hermes-2023-09-26-RNv0.73.0-ee2922a50fb719bdb378025d95dbd32ad93cd679 \ No newline at end of file +hermes-2023-11-17-RNv0.73.0-21043a3fc062be445e56a2c10ecd8be028dd9cc5 \ No newline at end of file From 3efabb6fa5d3a73af5145382a03e232fa77e2803 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 16 Nov 2023 23:15:30 -0800 Subject: [PATCH 113/190] bumped packages versions #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 2 +- packages/dev-middleware/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index e0e0faffb79b..1f59ffea4f09 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -22,7 +22,7 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "^0.73.4", + "@react-native/dev-middleware": "^0.73.5", "@react-native-community/cli-server-api": "12.0.0", "@react-native-community/cli-tools": "12.0.0", "@react-native/metro-babel-transformer": "^0.73.12", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 2567884ee6a6..0c3869784552 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.73.4", + "version": "0.73.5", "description": "Dev server middleware for React Native", "keywords": [ "react-native", From 5a3bcea25d632bc78d0e9985a14f579a7a5b2707 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 16 Nov 2023 23:48:02 -0800 Subject: [PATCH 114/190] Update podfile.lock --- packages/rn-tester/Podfile.lock | 494 ++++++++++-------- .../RNTesterPods.xcodeproj/project.pbxproj | 4 + 2 files changed, 267 insertions(+), 231 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index ffd4e7ff9758..1d358d34a276 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -349,12 +349,13 @@ PODS: - React-CoreModules (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety (= 0.73.0-rc.4) - - React-Codegen (= 0.73.0-rc.4) + - React-Codegen - React-Core/CoreModulesHeaders (= 0.73.0-rc.4) - React-jsi (= 0.73.0-rc.4) + - React-NativeModulesApple - React-RCTBlob - React-RCTImage (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon - SocketRocket (= 0.6.1) - React-cxxreact (0.73.0-rc.4): - boost (= 1.83.0) @@ -377,8 +378,8 @@ PODS: - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug @@ -396,98 +397,98 @@ PODS: - React-Fabric/templateprocessor (= 0.73.0-rc.4) - React-Fabric/textlayoutmanager (= 0.73.0-rc.4) - React-Fabric/uimanager (= 0.73.0-rc.4) - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/animations (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/attributedstring (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/componentregistry (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/componentregistrynative (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug @@ -502,223 +503,223 @@ PODS: - React-Fabric/components/textinput (= 0.73.0-rc.4) - React-Fabric/components/unimplementedview (= 0.73.0-rc.4) - React-Fabric/components/view (= 0.73.0-rc.4) - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/inputaccessory (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/modal (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/rncore (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/root (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/safeareaview (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/scrollview (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/text (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/textinput (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/unimplementedview (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/components/view (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - Yoga - React-Fabric/core (0.73.0-rc.4): - DoubleConversion @@ -726,172 +727,172 @@ PODS: - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/imagemanager (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/leakchecker (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/mounting (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/scheduler (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/telemetry (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/templateprocessor (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/textlayoutmanager (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - React-Fabric/uimanager - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-Fabric/uimanager (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired + - RCTTypeSafety - React-Core - React-cxxreact - React-debug - - React-graphics (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsiexecutor (= 0.73.0-rc.4) + - React-graphics + - React-jsi + - React-jsiexecutor - React-logger - React-rendererdebug - React-runtimescheduler - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core - React-FabricImage (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) @@ -901,14 +902,14 @@ PODS: - RCTRequired (= 0.73.0-rc.4) - RCTTypeSafety (= 0.73.0-rc.4) - React-Fabric - - React-graphics (= 0.73.0-rc.4) + - React-graphics - React-ImageManager - - React-jsi (= 0.73.0-rc.4) + - React-jsi - React-jsiexecutor (= 0.73.0-rc.4) - React-logger - React-rendererdebug - React-utils - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - ReactCommon - Yoga - React-graphics (0.73.0-rc.4): - glog @@ -933,18 +934,21 @@ PODS: - React-Core/Default - React-debug - React-Fabric + - React-graphics - React-RCTImage - React-rendererdebug - React-utils - React-jserrorhandler (0.73.0-rc.4): - RCT-Folly/Fabric (= 2022.05.16.00) - - React-jsi (= 0.73.0-rc.4) + - React-debug + - React-jsi - React-Mapbuffer - React-jsi (0.73.0-rc.4): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog + - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-jsiexecutor (0.73.0-rc.4): - DoubleConversion @@ -977,11 +981,12 @@ PODS: - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.4) - React-RCTAnimation (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.4) - - React-Codegen (= 0.73.0-rc.4) - - React-Core/RCTAnimationHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTAnimationHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon - React-RCTAppDelegate (0.73.0-rc.4): - RCT-Folly - RCTRequired @@ -995,28 +1000,30 @@ PODS: - React-RCTImage - React-RCTNetwork - React-runtimescheduler - - ReactCommon/turbomodule/core + - ReactCommon - React-RCTBlob (0.73.0-rc.4): - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.4) - - React-Core/RCTBlobHeaders (= 0.73.0-rc.4) - - React-Core/RCTWebSocket (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-RCTNetwork (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Codegen + - React-Core/RCTBlobHeaders + - React-Core/RCTWebSocket + - React-jsi + - React-NativeModulesApple + - React-RCTNetwork + - ReactCommon - React-RCTFabric (0.73.0-rc.4): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.4) + - React-Core - React-debug - - React-Fabric (= 0.73.0-rc.4) + - React-Fabric - React-FabricImage - React-graphics - React-ImageManager + - React-jsi - React-nativeconfig - - React-RCTImage (= 0.73.0-rc.4) + - React-RCTImage - React-RCTText - React-rendererdebug - React-runtimescheduler @@ -1024,37 +1031,43 @@ PODS: - Yoga - React-RCTImage (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.4) - - React-Codegen (= 0.73.0-rc.4) - - React-Core/RCTImageHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-RCTNetwork (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTImageHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTNetwork + - ReactCommon - React-RCTLinking (0.73.0-rc.4): - - React-Codegen (= 0.73.0-rc.4) + - React-Codegen - React-Core/RCTLinkingHeaders (= 0.73.0-rc.4) - React-jsi (= 0.73.0-rc.4) + - React-NativeModulesApple + - ReactCommon - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - React-RCTNetwork (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.4) - - React-Codegen (= 0.73.0-rc.4) - - React-Core/RCTNetworkHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTNetworkHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon - React-RCTPushNotification (0.73.0-rc.4): - - RCTTypeSafety (= 0.73.0-rc.4) - - React-Codegen (= 0.73.0-rc.4) - - React-Core/RCTPushNotificationHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTPushNotificationHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon - React-RCTSettings (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.4) - - React-Codegen (= 0.73.0-rc.4) - - React-Core/RCTSettingsHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTSettingsHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon - React-RCTTest (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - React-Core (= 0.73.0-rc.4) @@ -1066,10 +1079,11 @@ PODS: - Yoga - React-RCTVibration (0.73.0-rc.4): - RCT-Folly (= 2022.05.16.00) - - React-Codegen (= 0.73.0-rc.4) - - React-Core/RCTVibrationHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - React-Codegen + - React-Core/RCTVibrationHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon - React-rendererdebug (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) @@ -1083,6 +1097,7 @@ PODS: - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-callinvoker + - React-cxxreact - React-debug - React-jsi - React-rendererdebug @@ -1092,6 +1107,9 @@ PODS: - glog - RCT-Folly (= 2022.05.16.00) - React-debug + - ReactCommon (0.73.0-rc.4): + - React-logger (= 0.73.0-rc.4) + - ReactCommon/turbomodule (= 0.73.0-rc.4) - ReactCommon-Samples (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) @@ -1100,8 +1118,22 @@ PODS: - React-Codegen - React-Core - React-cxxreact + - React-jsi - React-NativeModulesApple - - ReactCommon/turbomodule/core + - ReactCommon + - ReactCommon/turbomodule (0.73.0-rc.4): + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - hermes-engine + - RCT-Folly (= 2022.05.16.00) + - React-callinvoker (= 0.73.0-rc.4) + - React-cxxreact (= 0.73.0-rc.4) + - React-jsi (= 0.73.0-rc.4) + - React-logger (= 0.73.0-rc.4) + - React-perflogger (= 0.73.0-rc.4) + - ReactCommon/turbomodule/bridging (= 0.73.0-rc.4) + - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - ReactCommon/turbomodule/bridging (0.73.0-rc.4): - DoubleConversion - fmt (~> 6.2.1) @@ -1241,7 +1273,7 @@ EXTERNAL SOURCES: :podspec: "../react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2023-09-26-RNv0.73.0-ee2922a50fb719bdb378025d95dbd32ad93cd679 + :tag: hermes-2023-11-17-RNv0.73.0-21043a3fc062be445e56a2c10ecd8be028dd9cc5 RCT-Folly: :podspec: "../react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -1351,7 +1383,7 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: c8106a2b9250a6fd1157c520ed0928cddb0bb90e + hermes-engine: 11f13a1ee023bfe9d8b72a9e2f03604fa5e720c7 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c @@ -1360,48 +1392,48 @@ SPEC CHECKSUMS: RCTTypeSafety: beea8b7842072402d6cd0d183bd0e6f8022c4124 React: 84cf182a117fa49e2396786a9388de4b2ba39fa2 React-callinvoker: b37c7b352ee1971a262ed3c14cd96845f3465238 - React-Codegen: 32aeec1a88fd41f6dff1bac62e8ceb7a0b2f750c - React-Core: ab44b04d034eeb52243f2d7355213d25bf3bed9c - React-CoreModules: 47e13b338f34d10849aa51539e4f22f346cfb48b + React-Codegen: 5f00574d80ce5a66b2787ce98519394a3e0fed1f + React-Core: 1c137befb255bb3df4717b8265adfd46ec41fdd0 + React-CoreModules: 91c0573a030105fd35bf990a1678a900e569faf4 React-cxxreact: 4cb4dbd26b53ce851be7d1c5012c52bf3125962c React-debug: 470ca201def3864f82982818ca639ec821189faa - React-Fabric: a34fde7a2323879ac15ea3c25f3ffd0fc6c8e2b4 - React-FabricImage: 93c55bd20e78f718e3bf424a91ced982235e6be0 + React-Fabric: 50c4b189b1e9fef6db4f402fdd3bd647bf69ba5b + React-FabricImage: 57846d59ea69b94cfcfb3f4c8152d86044bd089d React-graphics: 9947ecac6315514eba8c7aa30bcc9292764956ac React-hermes: 799cbe702d008535f872268527f06e7ef5037351 - React-ImageManager: 4fe632da77c07e0890a6265b36a669eed04748b6 - React-jserrorhandler: 9b2b96bbbe015c7039657794a5fdab40556e893e - React-jsi: dfdc99e55ef4464be391886a7e0b8e0841d77a2e + React-ImageManager: 992261dbb628080e6e44fc3cb44acdab6535fc74 + React-jserrorhandler: 2e9cd000d2ac33b59d28ae47e21add32e7fbe0e0 + React-jsi: 565fe937221db1a718cdd964945a9463e128de68 React-jsiexecutor: 0c0bf4687e084cf7a1da51007ca52cb61205fe7a React-jsinspector: 5548901692ef4a1943f7f4208abbf77a35c58bc7 React-logger: 5761d3b499c34ff905d47eba897ccb033242eb57 - React-Mapbuffer: 9bfeeae0a1637598fc6697ec674cfbecb581af7d + React-Mapbuffer: c0c4f0fccc99d3bd53cd9ae4661d289da662629a React-nativeconfig: b799490d1edf76fe53feebab3fb6385b26fcc740 - React-NativeModulesApple: 47a1d38c3b7600d989fd4b963192165ed10e7c6a + React-NativeModulesApple: 1f2a07337c903c759b4f64c8b3ed1162ed949975 React-perflogger: 77f7f259432c197d905edcb71fecadf1f5e1e720 React-RCTActionSheet: f7df3632f0c30e96fef8afd4adeaef8fde1f106d - React-RCTAnimation: e0b1e4aa21057e8d47cf504c1c507de58450a744 - React-RCTAppDelegate: b7f2a890ed6f97fb9ceea3bfca19cbdd7ab9be42 - React-RCTBlob: 071dd14ec9662c6b12a4757c44f80d8e7ba63df4 - React-RCTFabric: 50b8b2681e979cd4ea2d69b94786863700d21ac4 - React-RCTImage: 5be79d2ba81ff048f13c57775cf6eed070ff415b - React-RCTLinking: 01ec371c6da4d20f3f765da769ef85d9603beb4f - React-RCTNetwork: d89d00d31f7351b59b53a098940220e7b95cd17b - React-RCTPushNotification: 6ce6151797f9964be89989dafb086f59e59d71ce - React-RCTSettings: a8a25b81e5fb1ecc067823bdaf0256f8c3b52a78 + React-RCTAnimation: 9a38746c4d09af6440a0d4106ab9c22056f19f53 + React-RCTAppDelegate: 332c9540a3811b380f25decfcf32764a78f9bc54 + React-RCTBlob: 55a19331c6e0025d822a8df8521f8414d2dd53e7 + React-RCTFabric: 3c1e0d264a3382b8f67d713b7e7647aee5aaf574 + React-RCTImage: 00eb07a0550912aef4c5df0c5a433c84d907217d + React-RCTLinking: c15cc6183c22a5fbffc042da960fa97d6330fa5c + React-RCTNetwork: 29a4d3d93bb2fd805810839c74292bc4e180092d + React-RCTPushNotification: a9668b339a73c7b8688ec24b25afe1e3895b74f2 + React-RCTSettings: f34129bc02b1024d8e899a9f4067e87dd34a9c48 React-RCTTest: 539803405ae68c5bc9df96e6df755c52c7bc50f9 React-RCTText: d1ded63ea01f97c16dc3bfbe4703b29d3155eb42 - React-RCTVibration: a8733c554c5ba80004e8e0fb27249e02fec469da - React-rendererdebug: cabb2a6d356437ee455481c749d566c617b05bb2 + React-RCTVibration: d5c92235edbea028e33258b398a450efc7731558 + React-rendererdebug: 66b3d72785be7563ed1e040f9b650b7a6d051dea React-rncore: f52c2f50f7df33da0fb37ab2c3a29e54b1662f62 React-runtimeexecutor: 6e796f5a1d0b3eb513f4cbf87c5dfc41be6ce784 - React-runtimescheduler: 1c46d10f8d34f8cfb1617acbfa0dc0adbb595dae - React-utils: 90f8d89937d2e04a941b9ce91b241034f5b4115a + React-runtimescheduler: d8d2b238464b8c304f3945878155ab0698fddb84 + React-utils: 18bd90ce8c6b5db0892f2b6a7c0a4b302438dce7 ReactCommon: 1be3b68d3f445d84dc3a8b10f38b1ef3a1fae6fc - ReactCommon-Samples: ac6f5238ec31d0299e38cf5d1d1f3e90a550afb1 + ReactCommon-Samples: b438a5f5e35931c09c6a4e2b7b9a3880d714daaa ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: eed8829e19fdf1a83dfe087f7ba4be6cda42530c + Yoga: 3125dd507e33de31a96f0723e36fd92417844521 PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj index ec0082dd9e3d..68261744016a 100644 --- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj +++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj @@ -943,6 +943,8 @@ OTHER_LDFLAGS = ( "-ObjC", "-lc++", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native"; SDKROOT = iphoneos; @@ -1027,6 +1029,8 @@ OTHER_LDFLAGS = ( "-ObjC", "-lc++", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../react-native"; SDKROOT = iphoneos; From 2896a5735358e2867fa85932b0fce5b78a47791d Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Mon, 20 Nov 2023 17:24:36 +0100 Subject: [PATCH 115/190] bumped packages versions #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 2 +- packages/react-native/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 1f59ffea4f09..8588a17b9fb2 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.8", + "version": "0.73.9", "description": "Core CLI commands for React Native", "keywords": [ "react-native", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 963c15d53f65..4e707975f3e2 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,7 +97,7 @@ "@react-native-community/cli-platform-android": "12.0.0", "@react-native-community/cli-platform-ios": "12.0.0", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.8", + "@react-native/community-cli-plugin": "^0.73.9", "@react-native/codegen": "^0.73.1", "@react-native/gradle-plugin": "^0.73.3", "@react-native/js-polyfills": "^0.73.1", @@ -148,4 +148,4 @@ } ] } -} \ No newline at end of file +} From 4cd4b398ddeaf1d169a21d83fc3dd88a6e34bb51 Mon Sep 17 00:00:00 2001 From: Distiller Date: Mon, 20 Nov 2023 18:10:13 +0000 Subject: [PATCH 116/190] [0.73.0-rc.5] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- .../react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index f091db6bdb79..9300ebd11362 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.4', + prerelease: 'rc.5', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index cc92c9019348..2b8719a34dc7 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.4", + RCTVersionPrerelease: @"rc.5", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 4a35ff5254ac..f2b0d45d5b3e 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.4 +VERSION_NAME=0.73.0-rc.5 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index b8be587a16b6..4f4b310641a2 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.4"); + "prerelease", "rc.5"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 29866eb74f0c..600080765264 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.4"; + std::string_view Prerelease = "rc.5"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 4e707975f3e2..5b3bd13fc734 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.4", + "version": "0.73.0-rc.5", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index e427e48f2603..2b4dbc64f985 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.4" + "react-native": "0.73.0-rc.5" }, "devDependencies": { "@babel/core": "^7.20.0", From 3da0959291d34eca45da386a660bff184b7adb9e Mon Sep 17 00:00:00 2001 From: szymonrybczak Date: Mon, 20 Nov 2023 14:48:54 +0100 Subject: [PATCH 117/190] Update CLI to v12.1.1 --- packages/community-cli-plugin/package.json | 4 +- packages/react-native/cli.js | 4 +- packages/react-native/package.json | 6 +- yarn.lock | 140 ++++++++++----------- 4 files changed, 77 insertions(+), 77 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 8588a17b9fb2..e6a6e70157ba 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -23,8 +23,8 @@ ], "dependencies": { "@react-native/dev-middleware": "^0.73.5", - "@react-native-community/cli-server-api": "12.0.0", - "@react-native-community/cli-tools": "12.0.0", + "@react-native-community/cli-server-api": "12.1.1", + "@react-native-community/cli-tools": "12.1.1", "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", diff --git a/packages/react-native/cli.js b/packages/react-native/cli.js index 451c0860fc0b..0a03d912d784 100755 --- a/packages/react-native/cli.js +++ b/packages/react-native/cli.js @@ -15,7 +15,7 @@ const {URL} = require('url'); const chalk = require('chalk'); const cli = require('@react-native-community/cli'); -const {version: currentVersion} = require('./package.json'); +const {version: currentVersion, name} = require('./package.json'); const isNpxRuntime = process.env.npm_lifecycle_event === 'npx'; const DEFAULT_REGISTRY_HOST = @@ -67,7 +67,7 @@ async function main() { // Ignore errors, since it's a nice to have warning } } - return cli.run(); + return cli.run(name); } if (require.main === module) { diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 5b3bd13fc734..c69be861c774 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -93,9 +93,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.0.0", - "@react-native-community/cli-platform-android": "12.0.0", - "@react-native-community/cli-platform-ios": "12.0.0", + "@react-native-community/cli": "12.1.1", + "@react-native-community/cli-platform-android": "12.1.1", + "@react-native-community/cli-platform-ios": "12.1.1", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.9", "@react-native/codegen": "^0.73.1", diff --git a/yarn.lock b/yarn.lock index a08381fc0819..30cada18e110 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2366,43 +2366,43 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.0.0.tgz#33f83709d566d1a59b317377eeb2a908b17509ae" - integrity sha512-wpR3317b18vQNAlAl8xa/+DA+3tX7gJj04dw6MWun2c6vk7o/iRCpk/FVbLpGx20k97ASW5fQ9reB2KJ+Wv7zg== +"@react-native-community/cli-clean@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.1.1.tgz#4f92b3d5eaa301c9db3fef2cbbaf68b87652f6f1" + integrity sha512-lbEQJ9xO8DmNbES7nFcGIQC0Q15e9q1zwKfkN2ty2eM93ZTFqYzOwsddlNoRN9FO7diakMWoWgielhcfcIeIrQ== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" execa "^5.0.0" -"@react-native-community/cli-config@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.0.0.tgz#ac6ae3cc409be52f3a40971331a5960a54d5977d" - integrity sha512-xGkqD7VtcAiDhI6pLXigJqGrd9voGPl+eQAhOvWWr1eZN7FfHM+jLhDI+JLDa6b3SNbFJBCXgiBunB6v90giWw== +"@react-native-community/cli-config@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.1.1.tgz#6fe932b6215f731b39eb54c800d1b068a2080666" + integrity sha512-og8/yH7ZNMBcRJOGaHcn9BLt1WJF3XvgBw8iYsByVSEN7yvzAbYZ+CvfN6EdObGOqendbnE4lN9CVyQYM9Ufsw== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.0.0.tgz#949e48f1770414d5d3c08d14ddd5b5847b6034a4" - integrity sha512-gOid9bGi9dfGm+Ro89SFY9gZfrEk29MFn8wETgEGZ3K+/lelGzysfZmXyV0qk/N5nNurL3jOyhHRvLqU+XGOdQ== +"@react-native-community/cli-debugger-ui@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.1.1.tgz#b2e3854f8f77d2f60f845a0a9553123cedfa4669" + integrity sha512-q427jvbJ0WdDuS6HNdc3EbmUu/dX/+FWCcZI60xB7m1i/8p+LzmrsoR2yIJCricsAIV3hhiFOGfquZDgrbF27Q== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.0.0.tgz#d5b2a5974911ec628b894180565c5363861c4326" - integrity sha512-dt38KoQiPCxs2E/RREwucpJHYXUcUIYbPZRvXm1qo71YvxfPSF4a3PM7u9nJw6Oba5F8lpinPpavgY4ykkoQLg== +"@react-native-community/cli-doctor@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.1.1.tgz#e651a63c537ad7c9b8d9baa69e63947f5384a6bd" + integrity sha512-IUZJ/KUCuz+IzL9GdHUlIf6zF93XadxCBDPseUYb0ucIS+rEb3RmYC+IukYhUWwN3y4F/yxipYy3ytKrQ33AxA== dependencies: - "@react-native-community/cli-config" "12.0.0" - "@react-native-community/cli-platform-android" "12.0.0" - "@react-native-community/cli-platform-ios" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-config" "12.1.1" + "@react-native-community/cli-platform-android" "12.1.1" + "@react-native-community/cli-platform-ios" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2417,53 +2417,53 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.0.0.tgz#b6d04d93e51b68c614a1ff9377694255a5e1294b" - integrity sha512-7W9bp0II83t9FvZ0UC+UwagBr1ySFWfb8gPfZwdpSRSAzTkrJjpLYjfFKs2uhLV63dzM8jyyE/voiQIWi2hnfA== +"@react-native-community/cli-hermes@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.1.1.tgz#9b48c91acb4db88aab648e92d4d1fe19cd0a6191" + integrity sha512-J6yxQoZooFRT8+Dtz8Px/bwasQxnbxZZFAFQzOs3f6CAfXrcr/+JLVFZRWRv9XGfcuLdCHr22JUVPAnyEd48DA== dependencies: - "@react-native-community/cli-platform-android" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-platform-android" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.0.0.tgz#55450b94511cea0ea945661c6d4c83ea6770db78" - integrity sha512-QjQUh5it4TUwKZIn+T3xhU/IvrUrx1el535Ia6y940tyTxnZ5zQPZnd2JxRcOLiHtKSQL72VnD3yBMRjYtp1HA== +"@react-native-community/cli-platform-android@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.1.1.tgz#f6541ee07ee479ee0e1b082cbf4ff970737606e4" + integrity sha512-jnyc9y5cPltBo518pfVZ53dtKGDy02kkCkSIwv4ltaHYse7JyEFxFbzBn9lloWvbZ0iFHvEo1NN78YGPAlXSDw== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.0.0.tgz#9489f72ccaf915d4c8a3e1f6edd21908ec1f8d38" - integrity sha512-4c4xH59CpebgZb6dV/uw3lO3gZOSNY2GL9VjYFTXAMQSAnibnWjd1UFwP89TJNTyr/joYIU+vLDZ6nehZ78WoQ== +"@react-native-community/cli-platform-ios@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.1.1.tgz#399fc39279b8bd95f372c0f69180696b6f9767e1" + integrity sha512-RA2lvFrswwQRIhCV3hoIYZmLe9TkRegpAWimdubtMxRHiv7Eh2dC0VWWR5VdWy3ltbJzeiEpxCoH/EcrMfp9tg== dependencies: - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-tools" "12.1.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.0.0.tgz#0203677ced7f3f591b1839468c6d5f6fa3f40871" - integrity sha512-4fQOg2mBHhGWsSHw5btyI1Qbe8owZ5Ul2Soyysl5XT3aLVuXn+EBurVuH8Zyvbl1T4k09dgj03ojnlPA8PlIOg== +"@react-native-community/cli-plugin-metro@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.1.1.tgz#446f829aa37caee7440d863a42d0f600a4713d8b" + integrity sha512-HV+lW1mFSu6GL7du+0/tfq8/5jytKp+w3n4+MWzRkx5wXvUq3oJjzwe8y+ZvvCqkRPdsOiwFDgJrtPhvaZp+xA== -"@react-native-community/cli-server-api@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.0.0.tgz#50961549f715a2a9b3d605e8d21a52bb067de88a" - integrity sha512-ovHCG71oAsxl3/RNuxBFgqPNZT3aK2eM4o39VetmxQd/KsjKT7mXU02QdwLX53H31wA0Aex/xKwqOGAUBGLHfQ== +"@react-native-community/cli-server-api@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.1.1.tgz#c00319cba3cdd1ba2cf82286cfa4aa3a6bc6a5b2" + integrity sha512-dUqqEmtEiCMyqFd6LF1UqH0WwXirK2tpU7YhyFsBbigBj3hPz2NmzghCe7DRIcC9iouU0guBxhgmiLtmUEPduQ== dependencies: - "@react-native-community/cli-debugger-ui" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" + "@react-native-community/cli-debugger-ui" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -2472,10 +2472,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.0.0.tgz#2ff8bff8d6bb0f1162c574fdcf47aa273a48b7ad" - integrity sha512-p5QN3UMoAKUTpVblKAf+tW3I+nX6wyPgaXYZ+K3H0vZNmbVim+eODFi32NH1XnvuvblVpakovmMrhnBpRnSAgg== +"@react-native-community/cli-tools@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.1.1.tgz#c70df5da2d3ad61e5e8ab70dd36d84a89c322b23" + integrity sha512-c9vjDVojZnivGsLoVoTZsJjHnwBEI785yV8mgyKTVFx1sciK8lCsIj1Lke7jNpz7UAE1jW94nI7de2B1aQ9rbA== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2488,27 +2488,27 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.0.0.tgz#333bcd4803343d5278e6fb436c21524b073cd1e8" - integrity sha512-1HhPlVqP99qRx1cd4PzQHAdaAW6cSv6LsOz/r+BGTEzl1wZ507vplVDGWDNRX0Zu7nGYiMIGeFBJwz2wINKhiQ== +"@react-native-community/cli-types@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.1.1.tgz#5a5c0593f50dc394af5265364d0e919ba6134653" + integrity sha512-B9lFEIc1/H2GjiyRCk6ISJNn06h5j0cWuokNm3FmeyGOoGIfm4XYUbnM6IpGlIDdQpTtUzZfNq8CL4CIJZXF0g== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.0.0.tgz#8678e937497760788bcc0bde5a4e42be6fa38462" - integrity sha512-sSw0mPFuS24wHEulNq6hObkRzJbEhzWGb6SWwC59q0xnYztFfjg0M+f0B8EscW8OZ3Ky7vGFqF3IxFR62aP61Q== - dependencies: - "@react-native-community/cli-clean" "12.0.0" - "@react-native-community/cli-config" "12.0.0" - "@react-native-community/cli-debugger-ui" "12.0.0" - "@react-native-community/cli-doctor" "12.0.0" - "@react-native-community/cli-hermes" "12.0.0" - "@react-native-community/cli-plugin-metro" "12.0.0" - "@react-native-community/cli-server-api" "12.0.0" - "@react-native-community/cli-tools" "12.0.0" - "@react-native-community/cli-types" "12.0.0" +"@react-native-community/cli@12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.1.1.tgz#55e413ee620bea1e6b58c92dad2e9f196d3a5af2" + integrity sha512-St/lyxQ//crrigfE2QCqmjDb0IH3S9nmolm0eqmCA1bB8WWUk5dpjTgQk6xxDxz+3YtMghDJkGZPK4AxDXT42g== + dependencies: + "@react-native-community/cli-clean" "12.1.1" + "@react-native-community/cli-config" "12.1.1" + "@react-native-community/cli-debugger-ui" "12.1.1" + "@react-native-community/cli-doctor" "12.1.1" + "@react-native-community/cli-hermes" "12.1.1" + "@react-native-community/cli-plugin-metro" "12.1.1" + "@react-native-community/cli-server-api" "12.1.1" + "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-types" "12.1.1" chalk "^4.1.2" commander "^9.4.1" deepmerge "^4.3.0" From 02a411e997ebeb2a2a3b306051770f812f5af9de Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Mon, 20 Nov 2023 16:25:46 -0800 Subject: [PATCH 118/190] RNTester-ios / RCTAppDelegate > correctly check for USE_HERMES Flag (#41573) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41573 Changelog: [iOS][Fixed] RNTester-ios / RCTAppDelegate > correctly check for USE_HERMES Flag On iOS we check for ENV flags if Hermes should be used: - https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/React-Core.podspec#L24 - https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/React/React-RCTFabric.podspec#L90 and add necessary C++ packages based on that flag. In code we do check for those imports https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h#L16-L27 and decided if we should use Hermes or not. However the .mm check is faulty and does not check for the `RCT_USE_HERMES` flag set in code. Reviewed By: fkgozali Differential Revision: D51483740 fbshipit-source-id: 428c27aae80fe6f9799cf6ae21a5d3801fe6ca11 --- packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index 7f8163ed2f8c..2caa9aee7a31 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -23,7 +23,7 @@ #import #import #import -#if USE_HERMES +#if RCT_USE_HERMES #import #else #import @@ -291,7 +291,7 @@ - (void)createReactHost - (std::shared_ptr)createJSEngineInstance { -#if USE_HERMES +#if RCT_USE_HERMES return std::make_shared(_reactNativeConfig, nullptr); #else return std::make_shared(); From a66cda9284da693ee95b17ac442234bd856aee0a Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Fri, 17 Nov 2023 15:42:59 -0800 Subject: [PATCH 119/190] Remove "Open Debugger" action under JSC (#41535) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41535 ## Context **Remote JS Debugging removal** In React Native 0.73, we have deprecated Remote JS Debugging (execution of JavaScript in a separate V8 process) and also removed the Dev Menu launcher (https://github.com/facebook/react-native/pull/36754). ## This diff Follows D46187942 — this option wasn't correctly removed for Android when running JSC. This is now consistent with iOS. Changelog: [Android][Changed] "Open Debugger" is no longer available for remote JS debugging from the Dev Menu (non-Hermes). Please use `NativeDevSettings.setIsDebuggingRemotely()`. Reviewed By: blakef Differential Revision: D50555095 fbshipit-source-id: 1aeb48ab1390dc12ce300d6f321c30de5343cf0a --- .../react/devsupport/DevSupportManagerBase.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index 57f0b9ac76fa..e3094c72f212 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -365,15 +365,16 @@ public void onOptionSelected() { } }); - if (mDevSettings.isDeviceDebugEnabled()) { - // On-device JS debugging (CDP). Render action to open debugger frontend. + if (mDevSettings.isRemoteJSDebugEnabled()) { + // [Deprecated in React Native 0.73] Remote JS debugging. Handle reload + // via external JS executor. This capability will be removed in a future + // release. + mDevSettings.setRemoteJSDebugEnabled(false); + handleReloadJS(); + } - // Reset the old debugger setting so no one gets stuck. - // TODO: Remove in a few weeks. - if (mDevSettings.isRemoteJSDebugEnabled()) { - mDevSettings.setRemoteJSDebugEnabled(false); - handleReloadJS(); - } + if (mDevSettings.isDeviceDebugEnabled() && !mDevSettings.isRemoteJSDebugEnabled()) { + // On-device JS debugging (CDP). Render action to open debugger frontend. options.put( mApplicationContext.getString(R.string.catalyst_debug_open), () -> From 154a81ad1631df53086e565b5ecc0c76f5a86f0a Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Wed, 22 Nov 2023 16:58:31 -0800 Subject: [PATCH 120/190] FP Tolerance in iOS Paper SafeAreaView debouncing (#41614) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41614 Fixes https://github.com/facebook/react-native/issues/41545 SafeAreaView works by adding padding in order to shift content out of the safe area. This may change the layout dimensions of the SafeAreaView, in turn effecting its safe area insets. This can cause layout results to change, which in turn changes the inset value. Because of this, there is a tolerance, where safe area inset changes do not trigger a new update. Yoga is instructed to round layout dimensions to the closest physical pixel, so a very small difference in layout may result being off by about a pixel. Right now the tolerance is exactly one physical pixel, and if there is FP error here, we may not pass the test, and start oscillating with different layout values. After changing affected ShadowNode order to always be root-first, the first call to set the frame of the `SafeAreaView` happens when a non-zero-sized RootView is present, which I think may lead to a safe area inset update communicated that wasn't before? Or other cosmic butterflies. Layout rounds to one physical pixel in difference, and our tolerance is `0.00001` dips off (not helped that 1/3 screen scale cannot be represented as decimal, even without FP error). This adds a small tolerance beyond just the pixel boundary, matching the logic in Fabric, which seems to resolve the issue. Changelog: [iOS][Fixed] - FP Tolerance in iOS Paper SafeAreaView debouncing Reviewed By: philIip Differential Revision: D51539091 fbshipit-source-id: 88bddc38c7cd8d93feef5f12da64b124af22f46d --- .../React/Views/SafeAreaView/RCTSafeAreaView.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/Views/SafeAreaView/RCTSafeAreaView.m b/packages/react-native/React/Views/SafeAreaView/RCTSafeAreaView.m index 41dc74b06b66..eeb12da71bfb 100644 --- a/packages/react-native/React/Views/SafeAreaView/RCTSafeAreaView.m +++ b/packages/react-native/React/Views/SafeAreaView/RCTSafeAreaView.m @@ -57,7 +57,12 @@ - (void)safeAreaInsetsDidChange - (void)setSafeAreaInsets:(UIEdgeInsets)safeAreaInsets { - if (UIEdgeInsetsEqualToEdgeInsetsWithThreshold(safeAreaInsets, _currentSafeAreaInsets, 1.0 / RCTScreenScale())) { + // Relayout with different padding may result in a close but slightly different result, amplified by Yoga rounding to + // physical pixel grid. To avoid infinite relayout, allow one physical pixel of difference, along with small amount of + // extra tolerance for FP error. + CGFloat tolerance = 1.0 / RCTScreenScale() + 0.01; + + if (UIEdgeInsetsEqualToEdgeInsetsWithThreshold(safeAreaInsets, _currentSafeAreaInsets, tolerance)) { return; } From 3bb7a70c0d506d7ad5eb6664d676bfe102f3ca5b Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 24 Nov 2023 17:52:41 +0000 Subject: [PATCH 121/190] [LOCAL] Update Podfile.lock --- packages/rn-tester/Podfile.lock | 476 ++++++++++++++++---------------- 1 file changed, 238 insertions(+), 238 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 1d358d34a276..5b34a0f52c0a 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.4) - - FBReactNativeSpec (0.73.0-rc.4): + - FBLazyVector (0.73.0-rc.5) + - FBReactNativeSpec (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) - - React-Core (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) + - RCTRequired (= 0.73.0-rc.5) + - RCTTypeSafety (= 0.73.0-rc.5) + - React-Core (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) + - ReactCommon/turbomodule/core (= 0.73.0-rc.5) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -68,9 +68,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.4): - - hermes-engine/Pre-built (= 0.73.0-rc.4) - - hermes-engine/Pre-built (0.73.0-rc.4) + - hermes-engine (0.73.0-rc.5): + - hermes-engine/Pre-built (= 0.73.0-rc.5) + - hermes-engine/Pre-built (0.73.0-rc.5) - libevent (2.1.12) - OCMock (3.9.1) - OpenSSL-Universal (1.1.1100) @@ -96,26 +96,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.4) - - RCTTypeSafety (0.73.0-rc.4): - - FBLazyVector (= 0.73.0-rc.4) - - RCTRequired (= 0.73.0-rc.4) - - React-Core (= 0.73.0-rc.4) - - React (0.73.0-rc.4): - - React-Core (= 0.73.0-rc.4) - - React-Core/DevSupport (= 0.73.0-rc.4) - - React-Core/RCTWebSocket (= 0.73.0-rc.4) - - React-RCTActionSheet (= 0.73.0-rc.4) - - React-RCTAnimation (= 0.73.0-rc.4) - - React-RCTBlob (= 0.73.0-rc.4) - - React-RCTImage (= 0.73.0-rc.4) - - React-RCTLinking (= 0.73.0-rc.4) - - React-RCTNetwork (= 0.73.0-rc.4) - - React-RCTSettings (= 0.73.0-rc.4) - - React-RCTText (= 0.73.0-rc.4) - - React-RCTVibration (= 0.73.0-rc.4) - - React-callinvoker (0.73.0-rc.4) - - React-Codegen (0.73.0-rc.4): + - RCTRequired (0.73.0-rc.5) + - RCTTypeSafety (0.73.0-rc.5): + - FBLazyVector (= 0.73.0-rc.5) + - RCTRequired (= 0.73.0-rc.5) + - React-Core (= 0.73.0-rc.5) + - React (0.73.0-rc.5): + - React-Core (= 0.73.0-rc.5) + - React-Core/DevSupport (= 0.73.0-rc.5) + - React-Core/RCTWebSocket (= 0.73.0-rc.5) + - React-RCTActionSheet (= 0.73.0-rc.5) + - React-RCTAnimation (= 0.73.0-rc.5) + - React-RCTBlob (= 0.73.0-rc.5) + - React-RCTImage (= 0.73.0-rc.5) + - React-RCTLinking (= 0.73.0-rc.5) + - React-RCTNetwork (= 0.73.0-rc.5) + - React-RCTSettings (= 0.73.0-rc.5) + - React-RCTText (= 0.73.0-rc.5) + - React-RCTVibration (= 0.73.0-rc.5) + - React-callinvoker (0.73.0-rc.5) + - React-Codegen (0.73.0-rc.5): - DoubleConversion - FBReactNativeSpec - glog @@ -135,11 +135,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.4): + - React-Core (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.4) + - React-Core/Default (= 0.73.0-rc.5) - React-cxxreact - React-hermes - React-jsi @@ -149,7 +149,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.4): + - React-Core/CoreModulesHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -163,7 +163,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.0-rc.4): + - React-Core/Default (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -176,23 +176,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.0-rc.4): + - React-Core/DevSupport (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.4) - - React-Core/RCTWebSocket (= 0.73.0-rc.4) + - React-Core/Default (= 0.73.0-rc.5) + - React-Core/RCTWebSocket (= 0.73.0-rc.5) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.4) + - React-jsinspector (= 0.73.0-rc.5) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.4): + - React-Core/RCTActionSheetHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -206,7 +206,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.4): + - React-Core/RCTAnimationHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -220,7 +220,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.4): + - React-Core/RCTBlobHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -234,7 +234,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.4): + - React-Core/RCTImageHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -248,7 +248,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.4): + - React-Core/RCTLinkingHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -262,7 +262,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.4): + - React-Core/RCTNetworkHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -276,7 +276,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0-rc.4): + - React-Core/RCTPushNotificationHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -290,7 +290,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.4): + - React-Core/RCTSettingsHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -304,7 +304,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.4): + - React-Core/RCTTextHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -318,7 +318,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.4): + - React-Core/RCTVibrationHeaders (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -332,11 +332,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.4): + - React-Core/RCTWebSocket (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.4) + - React-Core/Default (= 0.73.0-rc.5) - React-cxxreact - React-hermes - React-jsi @@ -346,33 +346,33 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.0-rc.4): + - React-CoreModules (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTTypeSafety (= 0.73.0-rc.5) - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) + - React-Core/CoreModulesHeaders (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) - React-NativeModulesApple - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.4) + - React-RCTImage (= 0.73.0-rc.5) - ReactCommon - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.0-rc.4): + - React-cxxreact (0.73.0-rc.5): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.4) - - React-debug (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-jsinspector (= 0.73.0-rc.4) - - React-logger (= 0.73.0-rc.4) - - React-perflogger (= 0.73.0-rc.4) - - React-runtimeexecutor (= 0.73.0-rc.4) - - React-debug (0.73.0-rc.4) - - React-Fabric (0.73.0-rc.4): + - React-callinvoker (= 0.73.0-rc.5) + - React-debug (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) + - React-jsinspector (= 0.73.0-rc.5) + - React-logger (= 0.73.0-rc.5) + - React-perflogger (= 0.73.0-rc.5) + - React-runtimeexecutor (= 0.73.0-rc.5) + - React-debug (0.73.0-rc.5) + - React-Fabric (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -383,20 +383,20 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.4) - - React-Fabric/attributedstring (= 0.73.0-rc.4) - - React-Fabric/componentregistry (= 0.73.0-rc.4) - - React-Fabric/componentregistrynative (= 0.73.0-rc.4) - - React-Fabric/components (= 0.73.0-rc.4) - - React-Fabric/core (= 0.73.0-rc.4) - - React-Fabric/imagemanager (= 0.73.0-rc.4) - - React-Fabric/leakchecker (= 0.73.0-rc.4) - - React-Fabric/mounting (= 0.73.0-rc.4) - - React-Fabric/scheduler (= 0.73.0-rc.4) - - React-Fabric/telemetry (= 0.73.0-rc.4) - - React-Fabric/templateprocessor (= 0.73.0-rc.4) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.4) - - React-Fabric/uimanager (= 0.73.0-rc.4) + - React-Fabric/animations (= 0.73.0-rc.5) + - React-Fabric/attributedstring (= 0.73.0-rc.5) + - React-Fabric/componentregistry (= 0.73.0-rc.5) + - React-Fabric/componentregistrynative (= 0.73.0-rc.5) + - React-Fabric/components (= 0.73.0-rc.5) + - React-Fabric/core (= 0.73.0-rc.5) + - React-Fabric/imagemanager (= 0.73.0-rc.5) + - React-Fabric/leakchecker (= 0.73.0-rc.5) + - React-Fabric/mounting (= 0.73.0-rc.5) + - React-Fabric/scheduler (= 0.73.0-rc.5) + - React-Fabric/telemetry (= 0.73.0-rc.5) + - React-Fabric/templateprocessor (= 0.73.0-rc.5) + - React-Fabric/textlayoutmanager (= 0.73.0-rc.5) + - React-Fabric/uimanager (= 0.73.0-rc.5) - React-graphics - React-jsi - React-jsiexecutor @@ -405,7 +405,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.0-rc.4): + - React-Fabric/animations (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -424,7 +424,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.0-rc.4): + - React-Fabric/attributedstring (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -443,7 +443,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.0-rc.4): + - React-Fabric/componentregistry (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -462,7 +462,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.0-rc.4): + - React-Fabric/componentregistrynative (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -481,7 +481,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.0-rc.4): + - React-Fabric/components (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -492,17 +492,17 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.4) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.4) - - React-Fabric/components/modal (= 0.73.0-rc.4) - - React-Fabric/components/rncore (= 0.73.0-rc.4) - - React-Fabric/components/root (= 0.73.0-rc.4) - - React-Fabric/components/safeareaview (= 0.73.0-rc.4) - - React-Fabric/components/scrollview (= 0.73.0-rc.4) - - React-Fabric/components/text (= 0.73.0-rc.4) - - React-Fabric/components/textinput (= 0.73.0-rc.4) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.4) - - React-Fabric/components/view (= 0.73.0-rc.4) + - React-Fabric/components/inputaccessory (= 0.73.0-rc.5) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.5) + - React-Fabric/components/modal (= 0.73.0-rc.5) + - React-Fabric/components/rncore (= 0.73.0-rc.5) + - React-Fabric/components/root (= 0.73.0-rc.5) + - React-Fabric/components/safeareaview (= 0.73.0-rc.5) + - React-Fabric/components/scrollview (= 0.73.0-rc.5) + - React-Fabric/components/text (= 0.73.0-rc.5) + - React-Fabric/components/textinput (= 0.73.0-rc.5) + - React-Fabric/components/unimplementedview (= 0.73.0-rc.5) + - React-Fabric/components/view (= 0.73.0-rc.5) - React-graphics - React-jsi - React-jsiexecutor @@ -511,7 +511,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.0-rc.4): + - React-Fabric/components/inputaccessory (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -530,7 +530,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.4): + - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -549,7 +549,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.0-rc.4): + - React-Fabric/components/modal (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -568,7 +568,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.0-rc.4): + - React-Fabric/components/rncore (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -587,7 +587,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.0-rc.4): + - React-Fabric/components/root (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -606,7 +606,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.0-rc.4): + - React-Fabric/components/safeareaview (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -625,7 +625,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.0-rc.4): + - React-Fabric/components/scrollview (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -644,7 +644,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.0-rc.4): + - React-Fabric/components/text (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -663,7 +663,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.0-rc.4): + - React-Fabric/components/textinput (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -682,7 +682,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.0-rc.4): + - React-Fabric/components/unimplementedview (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -701,7 +701,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.0-rc.4): + - React-Fabric/components/view (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -721,7 +721,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (0.73.0-rc.4): + - React-Fabric/core (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -740,7 +740,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.0-rc.4): + - React-Fabric/imagemanager (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -759,7 +759,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.0-rc.4): + - React-Fabric/leakchecker (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -778,7 +778,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.0-rc.4): + - React-Fabric/mounting (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -797,7 +797,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.0-rc.4): + - React-Fabric/scheduler (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -816,7 +816,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.0-rc.4): + - React-Fabric/telemetry (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -835,7 +835,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.0-rc.4): + - React-Fabric/templateprocessor (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -854,7 +854,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.0-rc.4): + - React-Fabric/textlayoutmanager (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -874,7 +874,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.0-rc.4): + - React-Fabric/uimanager (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -893,42 +893,42 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricImage (0.73.0-rc.4): + - React-FabricImage (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.4) - - RCTTypeSafety (= 0.73.0-rc.4) + - RCTRequired (= 0.73.0-rc.5) + - RCTTypeSafety (= 0.73.0-rc.5) - React-Fabric - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.73.0-rc.4) + - React-jsiexecutor (= 0.73.0-rc.5) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-graphics (0.73.0-rc.4): + - React-graphics (0.73.0-rc.5): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.4) + - React-Core/Default (= 0.73.0-rc.5) - React-utils - - React-hermes (0.73.0-rc.4): + - React-hermes (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.4) + - React-cxxreact (= 0.73.0-rc.5) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.4) - - React-jsinspector (= 0.73.0-rc.4) - - React-perflogger (= 0.73.0-rc.4) - - React-ImageManager (0.73.0-rc.4): + - React-jsiexecutor (= 0.73.0-rc.5) + - React-jsinspector (= 0.73.0-rc.5) + - React-perflogger (= 0.73.0-rc.5) + - React-ImageManager (0.73.0-rc.5): - glog - RCT-Folly/Fabric - React-Core/Default @@ -938,35 +938,35 @@ PODS: - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.4): + - React-jserrorhandler (0.73.0-rc.5): - RCT-Folly/Fabric (= 2022.05.16.00) - React-debug - React-jsi - React-Mapbuffer - - React-jsi (0.73.0-rc.4): + - React-jsi (0.73.0-rc.5): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.4): + - React-jsiexecutor (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-perflogger (= 0.73.0-rc.4) - - React-jsinspector (0.73.0-rc.4) - - React-logger (0.73.0-rc.4): + - React-cxxreact (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) + - React-perflogger (= 0.73.0-rc.5) + - React-jsinspector (0.73.0-rc.5) + - React-logger (0.73.0-rc.5): - glog - - React-Mapbuffer (0.73.0-rc.4): + - React-Mapbuffer (0.73.0-rc.5): - glog - React-debug - - React-nativeconfig (0.73.0-rc.4) - - React-NativeModulesApple (0.73.0-rc.4): + - React-nativeconfig (0.73.0-rc.5) + - React-NativeModulesApple (0.73.0-rc.5): - glog - hermes-engine - React-callinvoker @@ -976,10 +976,10 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.4) - - React-RCTActionSheet (0.73.0-rc.4): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.4) - - React-RCTAnimation (0.73.0-rc.4): + - React-perflogger (0.73.0-rc.5) + - React-RCTActionSheet (0.73.0-rc.5): + - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.5) + - React-RCTAnimation (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -987,7 +987,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTAppDelegate (0.73.0-rc.4): + - React-RCTAppDelegate (0.73.0-rc.5): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1001,7 +1001,7 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon - - React-RCTBlob (0.73.0-rc.4): + - React-RCTBlob (0.73.0-rc.5): - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-Codegen @@ -1011,7 +1011,7 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.73.0-rc.4): + - React-RCTFabric (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1029,7 +1029,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.4): + - React-RCTImage (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1038,14 +1038,14 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.73.0-rc.4): + - React-RCTLinking (0.73.0-rc.5): - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) + - React-Core/RCTLinkingHeaders (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - - React-RCTNetwork (0.73.0-rc.4): + - ReactCommon/turbomodule/core (= 0.73.0-rc.5) + - React-RCTNetwork (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1053,14 +1053,14 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTPushNotification (0.73.0-rc.4): + - React-RCTPushNotification (0.73.0-rc.5): - RCTTypeSafety - React-Codegen - React-Core/RCTPushNotificationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTSettings (0.73.0-rc.4): + - React-RCTSettings (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1068,31 +1068,31 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTTest (0.73.0-rc.4): + - React-RCTTest (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.4) - - React-CoreModules (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - - React-RCTText (0.73.0-rc.4): - - React-Core/RCTTextHeaders (= 0.73.0-rc.4) + - React-Core (= 0.73.0-rc.5) + - React-CoreModules (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) + - ReactCommon/turbomodule/core (= 0.73.0-rc.5) + - React-RCTText (0.73.0-rc.5): + - React-Core/RCTTextHeaders (= 0.73.0-rc.5) - Yoga - - React-RCTVibration (0.73.0-rc.4): + - React-RCTVibration (0.73.0-rc.5): - RCT-Folly (= 2022.05.16.00) - React-Codegen - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-rendererdebug (0.73.0-rc.4): + - React-rendererdebug (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.4) - - React-runtimeexecutor (0.73.0-rc.4): - - React-jsi (= 0.73.0-rc.4) - - React-runtimescheduler (0.73.0-rc.4): + - React-rncore (0.73.0-rc.5) + - React-runtimeexecutor (0.73.0-rc.5): + - React-jsi (= 0.73.0-rc.5) + - React-runtimescheduler (0.73.0-rc.5): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1103,14 +1103,14 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.4): + - React-utils (0.73.0-rc.5): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon (0.73.0-rc.4): - - React-logger (= 0.73.0-rc.4) - - ReactCommon/turbomodule (= 0.73.0-rc.4) - - ReactCommon-Samples (0.73.0-rc.4): + - ReactCommon (0.73.0-rc.5): + - React-logger (= 0.73.0-rc.5) + - ReactCommon/turbomodule (= 0.73.0-rc.5) + - ReactCommon-Samples (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1121,41 +1121,41 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule (0.73.0-rc.4): + - ReactCommon/turbomodule (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.4) - - React-cxxreact (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-logger (= 0.73.0-rc.4) - - React-perflogger (= 0.73.0-rc.4) - - ReactCommon/turbomodule/bridging (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (= 0.73.0-rc.4) - - ReactCommon/turbomodule/bridging (0.73.0-rc.4): + - React-callinvoker (= 0.73.0-rc.5) + - React-cxxreact (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) + - React-logger (= 0.73.0-rc.5) + - React-perflogger (= 0.73.0-rc.5) + - ReactCommon/turbomodule/bridging (= 0.73.0-rc.5) + - ReactCommon/turbomodule/core (= 0.73.0-rc.5) + - ReactCommon/turbomodule/bridging (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.4) - - React-cxxreact (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-logger (= 0.73.0-rc.4) - - React-perflogger (= 0.73.0-rc.4) - - ReactCommon/turbomodule/core (0.73.0-rc.4): + - React-callinvoker (= 0.73.0-rc.5) + - React-cxxreact (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) + - React-logger (= 0.73.0-rc.5) + - React-perflogger (= 0.73.0-rc.5) + - ReactCommon/turbomodule/core (0.73.0-rc.5): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.4) - - React-cxxreact (= 0.73.0-rc.4) - - React-jsi (= 0.73.0-rc.4) - - React-logger (= 0.73.0-rc.4) - - React-perflogger (= 0.73.0-rc.4) + - React-callinvoker (= 0.73.0-rc.5) + - React-cxxreact (= 0.73.0-rc.5) + - React-jsi (= 0.73.0-rc.5) + - React-logger (= 0.73.0-rc.5) + - React-perflogger (= 0.73.0-rc.5) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1371,8 +1371,8 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: c30d7c84d9d25e99f0d6832ae0849f73a4a69658 - FBReactNativeSpec: 5d2d44109bccec2e7a38e8f4cb706dca34fa5044 + FBLazyVector: ff4684184a6596b7c4d7a12b07230df063a6810f + FBReactNativeSpec: a2b40a4f9ff3e47998d7721b0bc71c3e3a79889e Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1383,57 +1383,57 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 11f13a1ee023bfe9d8b72a9e2f03604fa5e720c7 + hermes-engine: f8faecb17f642424e5c70d0cf50cf2568f4c2c83 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 473398596b8d6758a8a37bd6ceb233fd8fd4fe2f - RCTTypeSafety: beea8b7842072402d6cd0d183bd0e6f8022c4124 - React: 84cf182a117fa49e2396786a9388de4b2ba39fa2 - React-callinvoker: b37c7b352ee1971a262ed3c14cd96845f3465238 - React-Codegen: 5f00574d80ce5a66b2787ce98519394a3e0fed1f - React-Core: 1c137befb255bb3df4717b8265adfd46ec41fdd0 - React-CoreModules: 91c0573a030105fd35bf990a1678a900e569faf4 - React-cxxreact: 4cb4dbd26b53ce851be7d1c5012c52bf3125962c - React-debug: 470ca201def3864f82982818ca639ec821189faa - React-Fabric: 50c4b189b1e9fef6db4f402fdd3bd647bf69ba5b - React-FabricImage: 57846d59ea69b94cfcfb3f4c8152d86044bd089d - React-graphics: 9947ecac6315514eba8c7aa30bcc9292764956ac - React-hermes: 799cbe702d008535f872268527f06e7ef5037351 - React-ImageManager: 992261dbb628080e6e44fc3cb44acdab6535fc74 - React-jserrorhandler: 2e9cd000d2ac33b59d28ae47e21add32e7fbe0e0 - React-jsi: 565fe937221db1a718cdd964945a9463e128de68 - React-jsiexecutor: 0c0bf4687e084cf7a1da51007ca52cb61205fe7a - React-jsinspector: 5548901692ef4a1943f7f4208abbf77a35c58bc7 - React-logger: 5761d3b499c34ff905d47eba897ccb033242eb57 - React-Mapbuffer: c0c4f0fccc99d3bd53cd9ae4661d289da662629a - React-nativeconfig: b799490d1edf76fe53feebab3fb6385b26fcc740 - React-NativeModulesApple: 1f2a07337c903c759b4f64c8b3ed1162ed949975 - React-perflogger: 77f7f259432c197d905edcb71fecadf1f5e1e720 - React-RCTActionSheet: f7df3632f0c30e96fef8afd4adeaef8fde1f106d - React-RCTAnimation: 9a38746c4d09af6440a0d4106ab9c22056f19f53 - React-RCTAppDelegate: 332c9540a3811b380f25decfcf32764a78f9bc54 - React-RCTBlob: 55a19331c6e0025d822a8df8521f8414d2dd53e7 - React-RCTFabric: 3c1e0d264a3382b8f67d713b7e7647aee5aaf574 - React-RCTImage: 00eb07a0550912aef4c5df0c5a433c84d907217d - React-RCTLinking: c15cc6183c22a5fbffc042da960fa97d6330fa5c - React-RCTNetwork: 29a4d3d93bb2fd805810839c74292bc4e180092d - React-RCTPushNotification: a9668b339a73c7b8688ec24b25afe1e3895b74f2 - React-RCTSettings: f34129bc02b1024d8e899a9f4067e87dd34a9c48 - React-RCTTest: 539803405ae68c5bc9df96e6df755c52c7bc50f9 - React-RCTText: d1ded63ea01f97c16dc3bfbe4703b29d3155eb42 - React-RCTVibration: d5c92235edbea028e33258b398a450efc7731558 - React-rendererdebug: 66b3d72785be7563ed1e040f9b650b7a6d051dea - React-rncore: f52c2f50f7df33da0fb37ab2c3a29e54b1662f62 - React-runtimeexecutor: 6e796f5a1d0b3eb513f4cbf87c5dfc41be6ce784 - React-runtimescheduler: d8d2b238464b8c304f3945878155ab0698fddb84 - React-utils: 18bd90ce8c6b5db0892f2b6a7c0a4b302438dce7 - ReactCommon: 1be3b68d3f445d84dc3a8b10f38b1ef3a1fae6fc - ReactCommon-Samples: b438a5f5e35931c09c6a4e2b7b9a3880d714daaa + RCTRequired: 52f38ab2b9ce8b0d713fa394895a0c60c22cad6a + RCTTypeSafety: 834daf2695e2766d0a08082403a6c622e3581a36 + React: ae410e0d71bdbce181d7e5fdde31bf3dec8861ef + React-callinvoker: adcef32af8fd0558a6790969610fc3e96368732f + React-Codegen: 84bf52041937b31fda3a37cd098a49300b59ffff + React-Core: d9b9a00aecd051ff919d2def123d91a158744897 + React-CoreModules: 49698ebd4f456668c26f4e19b42fd61721d258b3 + React-cxxreact: d7ec1e7a83b063998341a9b65f5854f020a172f7 + React-debug: b27df7971c67877bc7ccbea0ff87fe630e33cd03 + React-Fabric: e8d1027506cf99f7c2d89f1ee516a8699a499a5b + React-FabricImage: c58f0b34fe2d4d72ddc4ede3be1ca706e0f78db7 + React-graphics: 609f00796ef90ab40bb7fcf827987a463ebfc584 + React-hermes: a2b258069b57823b6b93f9cf2110f3321d36d9e8 + React-ImageManager: 4c75c2c56949693df52a2fe59ae3113222fd829e + React-jserrorhandler: 24ec1c0f242850296e84d6dfd433417a31bb3624 + React-jsi: 84df4e55c583fbc8af83da558799a4bedfc3e7f0 + React-jsiexecutor: d5fa8c5107577a0f51e42828a4305716a19442c7 + React-jsinspector: 6b007a99908c40ee9e4005f00552a766fe470f06 + React-logger: bced7740cd78c496573c4dc9fd8120a8e19660ad + React-Mapbuffer: e8d66ac50883e65cc6ee07738a36b09c58a6bf17 + React-nativeconfig: 59e6f9ddeb9d884de486d850a783b92cfebbe1b5 + React-NativeModulesApple: 0ab07d1155f6f522c6557532e89182d021717e7d + React-perflogger: 3c8953940b170732c1365c23aeef5fd50245d9fe + React-RCTActionSheet: cc6bb06be2f8340a670928999e510ccaf94ce04e + React-RCTAnimation: f554949ddc2f744d6230b6c69fe315bf3069d03c + React-RCTAppDelegate: 465593f6fa8012fa708298729b25d4853dcfe8f7 + React-RCTBlob: 7512cd5a7b5dd7ce91c425ab9e0924f538fdd889 + React-RCTFabric: 5a4244ddb0f123364f5b91aa97debd5d8c923ada + React-RCTImage: b02e13c2aec1bec0f6af60deb25a88b47b7aa47b + React-RCTLinking: 10c7ba83b234bc5b720916d65cd64270785f0549 + React-RCTNetwork: 3cb96b886d75ee77b4d843b43ce9a3d7cea09d17 + React-RCTPushNotification: fff2c713ddf61147def978997ad4a71e94f56674 + React-RCTSettings: c34a61569d673efac2c59a588972ee87e115b816 + React-RCTTest: 533178885fcb1573b67f3d3c706bdd43418cda01 + React-RCTText: 3e06e44603760ad09095a82e69104e656357d2e1 + React-RCTVibration: 0c54cee821ef71f232131fcd816e9acaf50fe688 + React-rendererdebug: 135e16aa4b100dfea3fb07de33ef0cc797764387 + React-rncore: f871fa57fc92d4eed3118bb4b8ec788757b4d3b0 + React-runtimeexecutor: 097d0edcff4c463431ad6538ea2153583922ca86 + React-runtimescheduler: a80659eb4504ad696295b3e51b90805a97c34129 + React-utils: 2e199c0f64d49f8ca4175d878e365d2701ad41f7 + ReactCommon: 82a6500a0906815f2e6079d6a3f226bd2f58e61d + ReactCommon-Samples: 878e46bb741fea592556b3bca139ae240220a04c ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: 3125dd507e33de31a96f0723e36fd92417844521 + Yoga: 1b395db8632a574e065f5e7f0f97f8f613675b64 PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 From 9dfb0ffa1b39d6835241e402779b917a1b34bb8c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 23 Nov 2023 12:13:08 +0000 Subject: [PATCH 122/190] Revert "RNTester-ios / RCTAppDelegate > correctly check for USE_HERMES Flag (#41573)" This reverts commit 02a411e997ebeb2a2a3b306051770f812f5af9de. --- packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index 2caa9aee7a31..7f8163ed2f8c 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -23,7 +23,7 @@ #import #import #import -#if RCT_USE_HERMES +#if USE_HERMES #import #else #import @@ -291,7 +291,7 @@ - (void)createReactHost - (std::shared_ptr)createJSEngineInstance { -#if RCT_USE_HERMES +#if USE_HERMES return std::make_shared(_reactNativeConfig, nullptr); #else return std::make_shared(); From 830c2e7c571650f49b645e7f9f9445a021e8a0a2 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 24 Nov 2023 17:28:54 +0000 Subject: [PATCH 123/190] [RN][iOS] Fix React-ImageManager dependencies --- .../imagemanager/platform/ios/React-ImageManager.podspec | 1 - .../scripts/cocoapods/__tests__/codegen_utils-test.rb | 2 ++ packages/react-native/scripts/cocoapods/codegen_utils.rb | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec index 4ca143a1a7eb..f37734c99e01 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec @@ -56,7 +56,6 @@ Pod::Spec.new do |s| s.dependency "RCT-Folly/Fabric" s.dependency "React-Core/Default" - s.dependency "React-RCTImage" s.dependency "glog" add_dependency(s, "React-Fabric") diff --git a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb index 0655cabd5d21..91539ef42bff 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb @@ -585,6 +585,7 @@ def get_podspec_fabric_and_script_phases(script_phases) 'React-graphics': [], 'React-rncore': [], 'React-Fabric': [], + 'React-FabricImage': [], 'React-utils': [], 'React-debug': [], 'React-rendererdebug': [], @@ -604,6 +605,7 @@ def get_podspec_when_use_frameworks specs[:dependencies].merge!({ 'React-graphics': [], 'React-Fabric': [], + 'React-FabricImage': [], 'React-utils': [], 'React-debug': [], 'React-rendererdebug': [], diff --git a/packages/react-native/scripts/cocoapods/codegen_utils.rb b/packages/react-native/scripts/cocoapods/codegen_utils.rb index b97a3382929e..e0d2e8f964d5 100644 --- a/packages/react-native/scripts/cocoapods/codegen_utils.rb +++ b/packages/react-native/scripts/cocoapods/codegen_utils.rb @@ -144,6 +144,7 @@ def get_react_codegen_spec(package_json_file, folly_version: '2022.05.16.00', fa 'React-graphics': [], 'React-rendererdebug': [], 'React-Fabric': [], + 'React-FabricImage': [], 'React-debug': [], 'React-utils': [], }); From f3f75e86d8374e5b980c6bafb8e4e3212fbf8043 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 23 Nov 2023 06:59:18 -0800 Subject: [PATCH 124/190] Fix projects being broken on dependencies starting with `a..` (#41621) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41621 Currently, if you have a dependency that is alphabetically smaller than `app`, it's evaluation will happen before `app`. This means that the namespace auto-discovery and the JVM toolchain configuration won't be working and the project will fail to buid. This fixes it by introducing a root-project Gradle Plugin that takes care of enforcing the evaluation order on the `app` project. Fixes #41620 Changelog: [Android] [Fixed] - Fix projects being broken on dependencies starting with `a..` Reviewed By: huntie Differential Revision: D51547294 fbshipit-source-id: 65df7149548b7087dd8928e556fb803b3baf7b79 --- .../build.gradle.kts | 4 +++ .../facebook/react/ReactRootProjectPlugin.kt | 30 +++++++++++++++++++ .../template/android/build.gradle | 4 +-- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactRootProjectPlugin.kt diff --git a/packages/react-native-gradle-plugin/build.gradle.kts b/packages/react-native-gradle-plugin/build.gradle.kts index c4a31beb010e..9346508f4970 100644 --- a/packages/react-native-gradle-plugin/build.gradle.kts +++ b/packages/react-native-gradle-plugin/build.gradle.kts @@ -26,6 +26,10 @@ gradlePlugin { id = "com.facebook.react" implementationClass = "com.facebook.react.ReactPlugin" } + create("reactrootproject") { + id = "com.facebook.react.rootproject" + implementationClass = "com.facebook.react.ReactRootProjectPlugin" + } } } diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactRootProjectPlugin.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactRootProjectPlugin.kt new file mode 100644 index 000000000000..5f232cd0e581 --- /dev/null +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactRootProjectPlugin.kt @@ -0,0 +1,30 @@ +/* + * 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. + */ + +package com.facebook.react + +import org.gradle.api.Plugin +import org.gradle.api.Project + +/** + * Gradle plugin applied to the `android/build.gradle` file. + * + * This plugin allows to specify project wide configurations that can be applied to both apps and + * libraries before they're evaluated. + */ +class ReactRootProjectPlugin : Plugin { + override fun apply(project: Project) { + project.subprojects { + // As the :app project (i.e. ReactPlugin) configures both namespaces and JVM toolchains + // for libraries, its evaluation must happen before the libraries' evaluation. + // Eventually the configuration of namespace/JVM toolchain can be moved inside this plugin. + if (it.path != ":app") { + it.evaluationDependsOn(":app") + } + } + } +} diff --git a/packages/react-native/template/android/build.gradle b/packages/react-native/template/android/build.gradle index 7e6117e3ab46..cb9d6232a704 100644 --- a/packages/react-native/template/android/build.gradle +++ b/packages/react-native/template/android/build.gradle @@ -1,5 +1,3 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - buildscript { ext { buildToolsVersion = "34.0.0" @@ -19,3 +17,5 @@ buildscript { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") } } + +apply plugin: "com.facebook.react.rootproject" From e03137ecbd118845b1eb6fd4c06895d090607f92 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Mon, 27 Nov 2023 11:03:07 +0000 Subject: [PATCH 125/190] Bump package versions #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 2 +- packages/react-native-gradle-plugin/package.json | 2 +- packages/react-native/package.json | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index e6a6e70157ba..9b6b549c4b3f 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.9", + "version": "0.73.10", "description": "Core CLI commands for React Native", "keywords": [ "react-native", diff --git a/packages/react-native-gradle-plugin/package.json b/packages/react-native-gradle-plugin/package.json index dcecbd9107c1..62a29ce22ecb 100644 --- a/packages/react-native-gradle-plugin/package.json +++ b/packages/react-native-gradle-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/gradle-plugin", - "version": "0.73.3", + "version": "0.73.4", "description": "Gradle Plugin for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native/package.json b/packages/react-native/package.json index c69be861c774..a91741c7fd3e 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,9 +97,9 @@ "@react-native-community/cli-platform-android": "12.1.1", "@react-native-community/cli-platform-ios": "12.1.1", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.9", + "@react-native/community-cli-plugin": "^0.73.10", "@react-native/codegen": "^0.73.1", - "@react-native/gradle-plugin": "^0.73.3", + "@react-native/gradle-plugin": "^0.73.4", "@react-native/js-polyfills": "^0.73.1", "@react-native/normalize-colors": "^0.73.2", "@react-native/virtualized-lists": "^0.73.3", @@ -148,4 +148,4 @@ } ] } -} \ No newline at end of file +} From c32064c5102cfd9b48abd25697cef9ceb05d18a3 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 13 Nov 2023 12:54:23 +0100 Subject: [PATCH 126/190] Correctly declare runtime dependencies In pnpm setups, codegen will fail during build because it cannot find its dependencies. Some of the dependencies it relies on at runtime are currently declared under `devDependencies`. This change moves them to `dependencies`. --- packages/react-native-codegen/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index d557abf24592..a03e9ee3cb78 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -31,7 +31,10 @@ "dependencies": { "@babel/parser": "^7.20.0", "flow-parser": "^0.206.0", + "glob": "^7.1.1", + "invariant": "^2.2.4", "jscodeshift": "^0.14.0", + "mkdirp": "^0.5.1", "nullthrows": "^1.1.1" }, "devDependencies": { @@ -46,10 +49,7 @@ "@babel/plugin-transform-flow-strip-types": "^7.20.0", "@babel/preset-env": "^7.20.0", "chalk": "^4.0.0", - "glob": "^7.1.1", - "invariant": "^2.2.4", "micromatch": "^4.0.4", - "mkdirp": "^0.5.1", "prettier": "2.8.8", "rimraf": "^3.0.2" }, From dcdea80d9ec690acea48bb4d76202f76453cba76 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 13 Nov 2023 07:58:58 -0800 Subject: [PATCH 127/190] Fix `build_codegen!` not finding `@react-native/codegen` in pnpm setups (#41399) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: `build_codegen!` currently assumes that `react-native/codegen` gets installed next to `react-native`. In a pnpm setup, it's found under `/~/react-native/node_modules/react-native/codegen` instead. However, as dmytrorykun pointed out, we don't actually need to build it outside of this repository. ## Changelog: [GENERAL] [FIXED] - `react-native/codegen` shouldn't be built unless it's in the repo — fixes `pod install` failures in pnpm setups Pull Request resolved: https://github.com/facebook/react-native/pull/41399 Test Plan: We have a patched version of `react-native` working in a pnpm setup here: https://github.com/microsoft/rnx-kit/pull/2811 Reviewed By: dmytrorykun Differential Revision: D51201643 Pulled By: cipolleschi fbshipit-source-id: 53767ae08686a20f03b3b93abcbc7d5383083872 --- .../cocoapods/__tests__/codegen-test.rb | 32 ++++++++++--------- .../react-native/scripts/cocoapods/codegen.rb | 21 +++--------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/packages/react-native/scripts/cocoapods/__tests__/codegen-test.rb b/packages/react-native/scripts/cocoapods/__tests__/codegen-test.rb index 5d2c4a6cd8bf..8ea74032c439 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/codegen-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/codegen-test.rb @@ -68,7 +68,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenFileAlreadyExists_doNothing( assert_equal(Pod::Executable.executed_commands.length, 0) end - def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissing_raiseError() + def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissing_dontBuildCodegen() # Arrange FileMock.mocked_existing_files([ @@ -76,7 +76,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissi ]) # Act - assert_raise { + assert_nothing_raised { checkAndGenerateEmptyThirdPartyProvider!(@prefix, false, dir_manager: DirMock, file_manager: FileMock) } @@ -84,16 +84,18 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissi assert_equal(Pathname.pwd_invocation_count, 1) assert_equal(Pod::Config.instance.installation_root.relative_path_from_invocation_count, 1) assert_equal(FileMock.exist_invocation_params, [ - @base_path + "/" + @prefix + "/React/Fabric/" + @third_party_provider_header + @base_path + "/" + @prefix + "/React/Fabric/" + @third_party_provider_header, + @base_path + "/" + @prefix + "/React/Fabric/tmpSchemaList.txt", ]) assert_equal(DirMock.exist_invocation_params, [ @base_path + "/"+ @prefix + "/../react-native-codegen", - @base_path + "/"+ @prefix + "/../@react-native/codegen", ]) - assert_equal(Pod::UI.collected_messages, []) + assert_equal(Pod::UI.collected_messages, [ + "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider", + ]) assert_equal($collected_commands, []) - assert_equal(FileMock.open_files.length, 0) - assert_equal(Pod::Executable.executed_commands.length, 0) + assert_equal(FileMock.open_files.length, 1) + assert_equal(Pod::Executable.executed_commands.length, 1) end def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCodegenrepoExists_dontBuildCodegen() @@ -145,7 +147,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCode def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen() # Arrange - codegen_cli_path = @base_path + "/" + @prefix + "/../@react-native/codegen" + codegen_cli_path = @base_path + "/" + @prefix + "/../react-native-codegen" DirMock.mocked_existing_dirs([ codegen_cli_path, ]) @@ -160,15 +162,14 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen() @base_path + "/" + @prefix + "/React/Fabric/" + @tmp_schema_list_file ]) assert_equal(DirMock.exist_invocation_params, [ - @base_path + "/" + @prefix + "/../react-native-codegen", codegen_cli_path, codegen_cli_path + "/lib", ]) assert_equal(Pod::UI.collected_messages, [ - "[Codegen] building #{codegen_cli_path}.", + "[Codegen] building #{codegen_cli_path}", "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider" ]) - assert_equal($collected_commands, ["~/app/ios/../../../@react-native/codegen/scripts/oss/build.sh"]) + assert_equal($collected_commands, ["~/app/ios/../../../react-native-codegen/scripts/oss/build.sh"]) assert_equal(FileMock.open_files[0].collected_write, ["[]"]) assert_equal(FileMock.open_files[0].fsync_invocation_count, 1) assert_equal(Pod::Executable.executed_commands[0], { @@ -185,7 +186,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen() def testCheckAndGenerateEmptyThirdPartyProvider_withAbsoluteReactNativePath_buildCodegen() # Arrange rn_path = 'packages/react-native' - codegen_cli_path = rn_path + "/../@react-native/codegen" + codegen_cli_path = rn_path + "/../react-native-codegen" DirMock.mocked_existing_dirs([ @base_path + "/" + codegen_cli_path, ]) @@ -201,15 +202,16 @@ def testCheckAndGenerateEmptyThirdPartyProvider_withAbsoluteReactNativePath_buil @base_path + "/" + rn_path + "/React/Fabric/" + @tmp_schema_list_file ]) assert_equal(DirMock.exist_invocation_params, [ - @base_path + "/" + rn_path + "/../react-native-codegen", @base_path + "/" + codegen_cli_path, @base_path + "/" + codegen_cli_path + "/lib", ]) assert_equal(Pod::UI.collected_messages, [ - "[Codegen] building #{@base_path + "/" + codegen_cli_path}.", + "[Codegen] building #{@base_path + "/" + codegen_cli_path}", "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider" ]) - assert_equal($collected_commands, [@base_path + "/" + rn_path + "/../@react-native/codegen/scripts/oss/build.sh"]) + assert_equal($collected_commands, [ + @base_path + "/" + rn_path + "/../react-native-codegen/scripts/oss/build.sh", + ]) assert_equal(FileMock.open_files[0].collected_write, ["[]"]) assert_equal(FileMock.open_files[0].fsync_invocation_count, 1) assert_equal(Pod::Executable.executed_commands[0], { diff --git a/packages/react-native/scripts/cocoapods/codegen.rb b/packages/react-native/scripts/cocoapods/codegen.rb index 898e3995f384..52f6283fb513 100644 --- a/packages/react-native/scripts/cocoapods/codegen.rb +++ b/packages/react-native/scripts/cocoapods/codegen.rb @@ -11,23 +11,12 @@ # - dir_manager: a class that implements the `Dir` interface. Defaults to `Dir`, the Dependency can be injected for testing purposes. # @throws an error if it could not find the codegen folder. def build_codegen!(react_native_path, relative_installation_root, dir_manager: Dir) - codegen_repo_path = "#{basePath(react_native_path, relative_installation_root)}/../react-native-codegen"; - codegen_npm_path = "#{basePath(react_native_path, relative_installation_root)}/../@react-native/codegen"; - codegen_cli_path = "" + codegen_repo_path = "#{basePath(react_native_path, relative_installation_root)}/../react-native-codegen" + return unless dir_manager.exist?(codegen_repo_path) && !dir_manager.exist?("#{codegen_repo_path}/lib") - if dir_manager.exist?(codegen_repo_path) - codegen_cli_path = codegen_repo_path - elsif dir_manager.exist?(codegen_npm_path) - codegen_cli_path = codegen_npm_path - else - raise "[codegen] Could not find react-native-codegen." - end - - if !dir_manager.exist?("#{codegen_cli_path}/lib") - Pod::UI.puts "[Codegen] building #{codegen_cli_path}." - system("#{codegen_cli_path}/scripts/oss/build.sh") - end - end + Pod::UI.puts "[Codegen] building #{codegen_repo_path}" + system("#{codegen_repo_path}/scripts/oss/build.sh") +end # It generates an empty `ThirdPartyProvider`, required by Fabric to load the components # From 61867e24de5e7be2e05e27133bfd9ba2cc907889 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Mon, 27 Nov 2023 11:08:34 +0000 Subject: [PATCH 128/190] Bump package versions #publish-packages-to-npm --- packages/react-native-codegen/package.json | 2 +- packages/react-native/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index a03e9ee3cb78..4fd8b1cd981c 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen", - "version": "0.73.1", + "version": "0.73.2", "description": "Code generation tools for React Native", "license": "MIT", "repository": { diff --git a/packages/react-native/package.json b/packages/react-native/package.json index a91741c7fd3e..d0ba77c301d8 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -98,7 +98,7 @@ "@react-native-community/cli-platform-ios": "12.1.1", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.10", - "@react-native/codegen": "^0.73.1", + "@react-native/codegen": "^0.73.2", "@react-native/gradle-plugin": "^0.73.4", "@react-native/js-polyfills": "^0.73.1", "@react-native/normalize-colors": "^0.73.2", From 0d5e67841f778d8a41fb17463061dc45126a33f8 Mon Sep 17 00:00:00 2001 From: Distiller Date: Tue, 28 Nov 2023 11:54:44 +0000 Subject: [PATCH 129/190] [0.73.0-rc.6] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- .../react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 9300ebd11362..9658d95793e7 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.5', + prerelease: 'rc.6', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index 2b8719a34dc7..d7fa3d83eba1 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.5", + RCTVersionPrerelease: @"rc.6", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index f2b0d45d5b3e..72f455f2a495 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.5 +VERSION_NAME=0.73.0-rc.6 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 4f4b310641a2..c5018630c6f8 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.5"); + "prerelease", "rc.6"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 600080765264..7ff2e76dc0a9 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.5"; + std::string_view Prerelease = "rc.6"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index d0ba77c301d8..81a34a20470b 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.5", + "version": "0.73.0-rc.6", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 2b4dbc64f985..42fb2169d360 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.5" + "react-native": "0.73.0-rc.6" }, "devDependencies": { "@babel/core": "^7.20.0", From cd43de6ca979410c1a6529394bb0fbdfde8d7cc3 Mon Sep 17 00:00:00 2001 From: Will Schurman Date: Wed, 29 Nov 2023 04:53:31 -0800 Subject: [PATCH 130/190] Fix android root view group removal during instance re-creation (#41678) Summary: This is my proposed solution to https://github.com/facebook/react-native/issues/41677. Fixes https://github.com/facebook/react-native/issues/41677. ## Changelog: [ANDROID] [FIXED] - Fix android root view group removal during instance re-creation Pull Request resolved: https://github.com/facebook/react-native/pull/41678 Test Plan: Both with fabric enabled and disabled (new architecture): 1. Clone repro repo: https://github.com/wschurman/rn-reload-repro 2. Build and run on android (I use android studio) 3. Click reload button, see timestamp doesn't change (indicating that the view is not removed) 4. Apply this PR as a patch. 5. Re-build and run. 6. Click reload button, see view is correctly disposed of and the new view is set. Reviewed By: cortinico Differential Revision: D51658524 Pulled By: javache fbshipit-source-id: d9a026cde677ad1ec113230bc31bd9297bca8bfc --- .../main/java/com/facebook/react/ReactInstanceManager.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index 7a56f1d1345f..5d358067d61a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -1278,14 +1278,12 @@ private void detachRootViewFromInstance(ReactRoot reactRoot, ReactContext reactC uiManager.stopSurface(surfaceId); } else { FLog.w(ReactConstants.TAG, "Failed to stop surface, UIManager has already gone away"); - reactRoot.getRootViewGroup().removeAllViews(); } } else { ReactSoftExceptionLogger.logSoftException( TAG, new RuntimeException( "detachRootViewFromInstance called with ReactRootView with invalid id")); - reactRoot.getRootViewGroup().removeAllViews(); } } else { reactContext @@ -1294,8 +1292,7 @@ private void detachRootViewFromInstance(ReactRoot reactRoot, ReactContext reactC .unmountApplicationComponentAtRootTag(reactRoot.getRootViewTag()); } - // The view is no longer attached, so mark it as such by resetting its ID. - reactRoot.getRootViewGroup().setId(View.NO_ID); + clearReactRoot(reactRoot); } @ThreadConfined(UI) From d97e8e656665b4393077caa2b8f0fe10ce819155 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Fri, 1 Dec 2023 17:16:00 +0000 Subject: [PATCH 131/190] Update Podfile.lock --- packages/rn-tester/Podfile.lock | 480 ++++++++++++++++---------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 5b34a0f52c0a..49c7b2f9df08 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.5) - - FBReactNativeSpec (0.73.0-rc.5): + - FBLazyVector (0.73.0-rc.6) + - FBReactNativeSpec (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.5) - - RCTTypeSafety (= 0.73.0-rc.5) - - React-Core (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - ReactCommon/turbomodule/core (= 0.73.0-rc.5) + - RCTRequired (= 0.73.0-rc.6) + - RCTTypeSafety (= 0.73.0-rc.6) + - React-Core (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) + - ReactCommon/turbomodule/core (= 0.73.0-rc.6) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -68,9 +68,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.5): - - hermes-engine/Pre-built (= 0.73.0-rc.5) - - hermes-engine/Pre-built (0.73.0-rc.5) + - hermes-engine (0.73.0-rc.6): + - hermes-engine/Pre-built (= 0.73.0-rc.6) + - hermes-engine/Pre-built (0.73.0-rc.6) - libevent (2.1.12) - OCMock (3.9.1) - OpenSSL-Universal (1.1.1100) @@ -96,26 +96,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.5) - - RCTTypeSafety (0.73.0-rc.5): - - FBLazyVector (= 0.73.0-rc.5) - - RCTRequired (= 0.73.0-rc.5) - - React-Core (= 0.73.0-rc.5) - - React (0.73.0-rc.5): - - React-Core (= 0.73.0-rc.5) - - React-Core/DevSupport (= 0.73.0-rc.5) - - React-Core/RCTWebSocket (= 0.73.0-rc.5) - - React-RCTActionSheet (= 0.73.0-rc.5) - - React-RCTAnimation (= 0.73.0-rc.5) - - React-RCTBlob (= 0.73.0-rc.5) - - React-RCTImage (= 0.73.0-rc.5) - - React-RCTLinking (= 0.73.0-rc.5) - - React-RCTNetwork (= 0.73.0-rc.5) - - React-RCTSettings (= 0.73.0-rc.5) - - React-RCTText (= 0.73.0-rc.5) - - React-RCTVibration (= 0.73.0-rc.5) - - React-callinvoker (0.73.0-rc.5) - - React-Codegen (0.73.0-rc.5): + - RCTRequired (0.73.0-rc.6) + - RCTTypeSafety (0.73.0-rc.6): + - FBLazyVector (= 0.73.0-rc.6) + - RCTRequired (= 0.73.0-rc.6) + - React-Core (= 0.73.0-rc.6) + - React (0.73.0-rc.6): + - React-Core (= 0.73.0-rc.6) + - React-Core/DevSupport (= 0.73.0-rc.6) + - React-Core/RCTWebSocket (= 0.73.0-rc.6) + - React-RCTActionSheet (= 0.73.0-rc.6) + - React-RCTAnimation (= 0.73.0-rc.6) + - React-RCTBlob (= 0.73.0-rc.6) + - React-RCTImage (= 0.73.0-rc.6) + - React-RCTLinking (= 0.73.0-rc.6) + - React-RCTNetwork (= 0.73.0-rc.6) + - React-RCTSettings (= 0.73.0-rc.6) + - React-RCTText (= 0.73.0-rc.6) + - React-RCTVibration (= 0.73.0-rc.6) + - React-callinvoker (0.73.0-rc.6) + - React-Codegen (0.73.0-rc.6): - DoubleConversion - FBReactNativeSpec - glog @@ -126,6 +126,7 @@ PODS: - React-Core - React-debug - React-Fabric + - React-FabricImage - React-graphics - React-jsi - React-jsiexecutor @@ -135,11 +136,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.5): + - React-Core (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0-rc.6) - React-cxxreact - React-hermes - React-jsi @@ -149,7 +150,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.5): + - React-Core/CoreModulesHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -163,7 +164,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.0-rc.5): + - React-Core/Default (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -176,23 +177,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.0-rc.5): + - React-Core/DevSupport (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) - - React-Core/RCTWebSocket (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0-rc.6) + - React-Core/RCTWebSocket (= 0.73.0-rc.6) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.5) + - React-jsinspector (= 0.73.0-rc.6) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.5): + - React-Core/RCTActionSheetHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -206,7 +207,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.5): + - React-Core/RCTAnimationHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -220,7 +221,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.5): + - React-Core/RCTBlobHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -234,7 +235,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.5): + - React-Core/RCTImageHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -248,7 +249,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.5): + - React-Core/RCTLinkingHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -262,7 +263,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.5): + - React-Core/RCTNetworkHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -276,7 +277,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0-rc.5): + - React-Core/RCTPushNotificationHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -290,7 +291,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.5): + - React-Core/RCTSettingsHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -304,7 +305,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.5): + - React-Core/RCTTextHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -318,7 +319,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.5): + - React-Core/RCTVibrationHeaders (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -332,11 +333,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.5): + - React-Core/RCTWebSocket (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0-rc.6) - React-cxxreact - React-hermes - React-jsi @@ -346,33 +347,33 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.0-rc.5): + - React-CoreModules (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.5) + - RCTTypeSafety (= 0.73.0-rc.6) - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) + - React-Core/CoreModulesHeaders (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) - React-NativeModulesApple - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.5) + - React-RCTImage (= 0.73.0-rc.6) - ReactCommon - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.0-rc.5): + - React-cxxreact (0.73.0-rc.6): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-debug (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-jsinspector (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - React-runtimeexecutor (= 0.73.0-rc.5) - - React-debug (0.73.0-rc.5) - - React-Fabric (0.73.0-rc.5): + - React-callinvoker (= 0.73.0-rc.6) + - React-debug (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) + - React-jsinspector (= 0.73.0-rc.6) + - React-logger (= 0.73.0-rc.6) + - React-perflogger (= 0.73.0-rc.6) + - React-runtimeexecutor (= 0.73.0-rc.6) + - React-debug (0.73.0-rc.6) + - React-Fabric (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -383,20 +384,20 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.5) - - React-Fabric/attributedstring (= 0.73.0-rc.5) - - React-Fabric/componentregistry (= 0.73.0-rc.5) - - React-Fabric/componentregistrynative (= 0.73.0-rc.5) - - React-Fabric/components (= 0.73.0-rc.5) - - React-Fabric/core (= 0.73.0-rc.5) - - React-Fabric/imagemanager (= 0.73.0-rc.5) - - React-Fabric/leakchecker (= 0.73.0-rc.5) - - React-Fabric/mounting (= 0.73.0-rc.5) - - React-Fabric/scheduler (= 0.73.0-rc.5) - - React-Fabric/telemetry (= 0.73.0-rc.5) - - React-Fabric/templateprocessor (= 0.73.0-rc.5) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.5) - - React-Fabric/uimanager (= 0.73.0-rc.5) + - React-Fabric/animations (= 0.73.0-rc.6) + - React-Fabric/attributedstring (= 0.73.0-rc.6) + - React-Fabric/componentregistry (= 0.73.0-rc.6) + - React-Fabric/componentregistrynative (= 0.73.0-rc.6) + - React-Fabric/components (= 0.73.0-rc.6) + - React-Fabric/core (= 0.73.0-rc.6) + - React-Fabric/imagemanager (= 0.73.0-rc.6) + - React-Fabric/leakchecker (= 0.73.0-rc.6) + - React-Fabric/mounting (= 0.73.0-rc.6) + - React-Fabric/scheduler (= 0.73.0-rc.6) + - React-Fabric/telemetry (= 0.73.0-rc.6) + - React-Fabric/templateprocessor (= 0.73.0-rc.6) + - React-Fabric/textlayoutmanager (= 0.73.0-rc.6) + - React-Fabric/uimanager (= 0.73.0-rc.6) - React-graphics - React-jsi - React-jsiexecutor @@ -405,7 +406,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.0-rc.5): + - React-Fabric/animations (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -424,7 +425,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.0-rc.5): + - React-Fabric/attributedstring (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -443,7 +444,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.0-rc.5): + - React-Fabric/componentregistry (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -462,7 +463,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.0-rc.5): + - React-Fabric/componentregistrynative (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -481,7 +482,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.0-rc.5): + - React-Fabric/components (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -492,17 +493,17 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.5) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.5) - - React-Fabric/components/modal (= 0.73.0-rc.5) - - React-Fabric/components/rncore (= 0.73.0-rc.5) - - React-Fabric/components/root (= 0.73.0-rc.5) - - React-Fabric/components/safeareaview (= 0.73.0-rc.5) - - React-Fabric/components/scrollview (= 0.73.0-rc.5) - - React-Fabric/components/text (= 0.73.0-rc.5) - - React-Fabric/components/textinput (= 0.73.0-rc.5) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.5) - - React-Fabric/components/view (= 0.73.0-rc.5) + - React-Fabric/components/inputaccessory (= 0.73.0-rc.6) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.6) + - React-Fabric/components/modal (= 0.73.0-rc.6) + - React-Fabric/components/rncore (= 0.73.0-rc.6) + - React-Fabric/components/root (= 0.73.0-rc.6) + - React-Fabric/components/safeareaview (= 0.73.0-rc.6) + - React-Fabric/components/scrollview (= 0.73.0-rc.6) + - React-Fabric/components/text (= 0.73.0-rc.6) + - React-Fabric/components/textinput (= 0.73.0-rc.6) + - React-Fabric/components/unimplementedview (= 0.73.0-rc.6) + - React-Fabric/components/view (= 0.73.0-rc.6) - React-graphics - React-jsi - React-jsiexecutor @@ -511,7 +512,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.0-rc.5): + - React-Fabric/components/inputaccessory (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -530,7 +531,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.5): + - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -549,7 +550,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.0-rc.5): + - React-Fabric/components/modal (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -568,7 +569,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.0-rc.5): + - React-Fabric/components/rncore (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -587,7 +588,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.0-rc.5): + - React-Fabric/components/root (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -606,7 +607,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.0-rc.5): + - React-Fabric/components/safeareaview (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -625,7 +626,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.0-rc.5): + - React-Fabric/components/scrollview (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -644,7 +645,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.0-rc.5): + - React-Fabric/components/text (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -663,7 +664,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.0-rc.5): + - React-Fabric/components/textinput (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -682,7 +683,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.0-rc.5): + - React-Fabric/components/unimplementedview (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -701,7 +702,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.0-rc.5): + - React-Fabric/components/view (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -721,7 +722,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (0.73.0-rc.5): + - React-Fabric/core (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -740,7 +741,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.0-rc.5): + - React-Fabric/imagemanager (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -759,7 +760,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.0-rc.5): + - React-Fabric/leakchecker (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -778,7 +779,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.0-rc.5): + - React-Fabric/mounting (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -797,7 +798,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.0-rc.5): + - React-Fabric/scheduler (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -816,7 +817,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.0-rc.5): + - React-Fabric/telemetry (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -835,7 +836,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.0-rc.5): + - React-Fabric/templateprocessor (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -854,7 +855,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.0-rc.5): + - React-Fabric/textlayoutmanager (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -874,7 +875,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.0-rc.5): + - React-Fabric/uimanager (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -893,80 +894,79 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricImage (0.73.0-rc.5): + - React-FabricImage (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.5) - - RCTTypeSafety (= 0.73.0-rc.5) + - RCTRequired (= 0.73.0-rc.6) + - RCTTypeSafety (= 0.73.0-rc.6) - React-Fabric - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.73.0-rc.5) + - React-jsiexecutor (= 0.73.0-rc.6) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-graphics (0.73.0-rc.5): + - React-graphics (0.73.0-rc.6): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.5) + - React-Core/Default (= 0.73.0-rc.6) - React-utils - - React-hermes (0.73.0-rc.5): + - React-hermes (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.5) + - React-cxxreact (= 0.73.0-rc.6) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.5) - - React-jsinspector (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - React-ImageManager (0.73.0-rc.5): + - React-jsiexecutor (= 0.73.0-rc.6) + - React-jsinspector (= 0.73.0-rc.6) + - React-perflogger (= 0.73.0-rc.6) + - React-ImageManager (0.73.0-rc.6): - glog - RCT-Folly/Fabric - React-Core/Default - React-debug - React-Fabric - React-graphics - - React-RCTImage - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.5): + - React-jserrorhandler (0.73.0-rc.6): - RCT-Folly/Fabric (= 2022.05.16.00) - React-debug - React-jsi - React-Mapbuffer - - React-jsi (0.73.0-rc.5): + - React-jsi (0.73.0-rc.6): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.5): + - React-jsiexecutor (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - React-jsinspector (0.73.0-rc.5) - - React-logger (0.73.0-rc.5): + - React-cxxreact (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) + - React-perflogger (= 0.73.0-rc.6) + - React-jsinspector (0.73.0-rc.6) + - React-logger (0.73.0-rc.6): - glog - - React-Mapbuffer (0.73.0-rc.5): + - React-Mapbuffer (0.73.0-rc.6): - glog - React-debug - - React-nativeconfig (0.73.0-rc.5) - - React-NativeModulesApple (0.73.0-rc.5): + - React-nativeconfig (0.73.0-rc.6) + - React-NativeModulesApple (0.73.0-rc.6): - glog - hermes-engine - React-callinvoker @@ -976,10 +976,10 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.5) - - React-RCTActionSheet (0.73.0-rc.5): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.5) - - React-RCTAnimation (0.73.0-rc.5): + - React-perflogger (0.73.0-rc.6) + - React-RCTActionSheet (0.73.0-rc.6): + - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.6) + - React-RCTAnimation (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -987,7 +987,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTAppDelegate (0.73.0-rc.5): + - React-RCTAppDelegate (0.73.0-rc.6): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1001,7 +1001,7 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon - - React-RCTBlob (0.73.0-rc.5): + - React-RCTBlob (0.73.0-rc.6): - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-Codegen @@ -1011,7 +1011,7 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.73.0-rc.5): + - React-RCTFabric (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1029,7 +1029,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.5): + - React-RCTImage (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1038,14 +1038,14 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.73.0-rc.5): + - React-RCTLinking (0.73.0-rc.6): - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) + - React-Core/RCTLinkingHeaders (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.0-rc.5) - - React-RCTNetwork (0.73.0-rc.5): + - ReactCommon/turbomodule/core (= 0.73.0-rc.6) + - React-RCTNetwork (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1053,14 +1053,14 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTPushNotification (0.73.0-rc.5): + - React-RCTPushNotification (0.73.0-rc.6): - RCTTypeSafety - React-Codegen - React-Core/RCTPushNotificationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTSettings (0.73.0-rc.5): + - React-RCTSettings (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1068,31 +1068,31 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTTest (0.73.0-rc.5): + - React-RCTTest (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.5) - - React-CoreModules (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - ReactCommon/turbomodule/core (= 0.73.0-rc.5) - - React-RCTText (0.73.0-rc.5): - - React-Core/RCTTextHeaders (= 0.73.0-rc.5) + - React-Core (= 0.73.0-rc.6) + - React-CoreModules (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) + - ReactCommon/turbomodule/core (= 0.73.0-rc.6) + - React-RCTText (0.73.0-rc.6): + - React-Core/RCTTextHeaders (= 0.73.0-rc.6) - Yoga - - React-RCTVibration (0.73.0-rc.5): + - React-RCTVibration (0.73.0-rc.6): - RCT-Folly (= 2022.05.16.00) - React-Codegen - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-rendererdebug (0.73.0-rc.5): + - React-rendererdebug (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.5) - - React-runtimeexecutor (0.73.0-rc.5): - - React-jsi (= 0.73.0-rc.5) - - React-runtimescheduler (0.73.0-rc.5): + - React-rncore (0.73.0-rc.6) + - React-runtimeexecutor (0.73.0-rc.6): + - React-jsi (= 0.73.0-rc.6) + - React-runtimescheduler (0.73.0-rc.6): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1103,14 +1103,14 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.5): + - React-utils (0.73.0-rc.6): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon (0.73.0-rc.5): - - React-logger (= 0.73.0-rc.5) - - ReactCommon/turbomodule (= 0.73.0-rc.5) - - ReactCommon-Samples (0.73.0-rc.5): + - ReactCommon (0.73.0-rc.6): + - React-logger (= 0.73.0-rc.6) + - ReactCommon/turbomodule (= 0.73.0-rc.6) + - ReactCommon-Samples (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1121,41 +1121,41 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule (0.73.0-rc.5): + - ReactCommon/turbomodule (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - ReactCommon/turbomodule/bridging (= 0.73.0-rc.5) - - ReactCommon/turbomodule/core (= 0.73.0-rc.5) - - ReactCommon/turbomodule/bridging (0.73.0-rc.5): + - React-callinvoker (= 0.73.0-rc.6) + - React-cxxreact (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) + - React-logger (= 0.73.0-rc.6) + - React-perflogger (= 0.73.0-rc.6) + - ReactCommon/turbomodule/bridging (= 0.73.0-rc.6) + - ReactCommon/turbomodule/core (= 0.73.0-rc.6) + - ReactCommon/turbomodule/bridging (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) - - ReactCommon/turbomodule/core (0.73.0-rc.5): + - React-callinvoker (= 0.73.0-rc.6) + - React-cxxreact (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) + - React-logger (= 0.73.0-rc.6) + - React-perflogger (= 0.73.0-rc.6) + - ReactCommon/turbomodule/core (0.73.0-rc.6): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.5) - - React-cxxreact (= 0.73.0-rc.5) - - React-jsi (= 0.73.0-rc.5) - - React-logger (= 0.73.0-rc.5) - - React-perflogger (= 0.73.0-rc.5) + - React-callinvoker (= 0.73.0-rc.6) + - React-cxxreact (= 0.73.0-rc.6) + - React-jsi (= 0.73.0-rc.6) + - React-logger (= 0.73.0-rc.6) + - React-perflogger (= 0.73.0-rc.6) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1371,8 +1371,8 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: ff4684184a6596b7c4d7a12b07230df063a6810f - FBReactNativeSpec: a2b40a4f9ff3e47998d7721b0bc71c3e3a79889e + FBLazyVector: 6008365e52f7b689f375f4b37a6fea166bd745eb + FBReactNativeSpec: f43d6f3954b4ca61ae335d6d19a3cfac4543f1fc Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1383,58 +1383,58 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: f8faecb17f642424e5c70d0cf50cf2568f4c2c83 + hermes-engine: 7cea8d9de082031f5e81d491d1e346e4eeca1699 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 52f38ab2b9ce8b0d713fa394895a0c60c22cad6a - RCTTypeSafety: 834daf2695e2766d0a08082403a6c622e3581a36 - React: ae410e0d71bdbce181d7e5fdde31bf3dec8861ef - React-callinvoker: adcef32af8fd0558a6790969610fc3e96368732f - React-Codegen: 84bf52041937b31fda3a37cd098a49300b59ffff - React-Core: d9b9a00aecd051ff919d2def123d91a158744897 - React-CoreModules: 49698ebd4f456668c26f4e19b42fd61721d258b3 - React-cxxreact: d7ec1e7a83b063998341a9b65f5854f020a172f7 - React-debug: b27df7971c67877bc7ccbea0ff87fe630e33cd03 - React-Fabric: e8d1027506cf99f7c2d89f1ee516a8699a499a5b - React-FabricImage: c58f0b34fe2d4d72ddc4ede3be1ca706e0f78db7 - React-graphics: 609f00796ef90ab40bb7fcf827987a463ebfc584 - React-hermes: a2b258069b57823b6b93f9cf2110f3321d36d9e8 - React-ImageManager: 4c75c2c56949693df52a2fe59ae3113222fd829e - React-jserrorhandler: 24ec1c0f242850296e84d6dfd433417a31bb3624 - React-jsi: 84df4e55c583fbc8af83da558799a4bedfc3e7f0 - React-jsiexecutor: d5fa8c5107577a0f51e42828a4305716a19442c7 - React-jsinspector: 6b007a99908c40ee9e4005f00552a766fe470f06 - React-logger: bced7740cd78c496573c4dc9fd8120a8e19660ad - React-Mapbuffer: e8d66ac50883e65cc6ee07738a36b09c58a6bf17 - React-nativeconfig: 59e6f9ddeb9d884de486d850a783b92cfebbe1b5 - React-NativeModulesApple: 0ab07d1155f6f522c6557532e89182d021717e7d - React-perflogger: 3c8953940b170732c1365c23aeef5fd50245d9fe - React-RCTActionSheet: cc6bb06be2f8340a670928999e510ccaf94ce04e - React-RCTAnimation: f554949ddc2f744d6230b6c69fe315bf3069d03c - React-RCTAppDelegate: 465593f6fa8012fa708298729b25d4853dcfe8f7 - React-RCTBlob: 7512cd5a7b5dd7ce91c425ab9e0924f538fdd889 - React-RCTFabric: 5a4244ddb0f123364f5b91aa97debd5d8c923ada - React-RCTImage: b02e13c2aec1bec0f6af60deb25a88b47b7aa47b - React-RCTLinking: 10c7ba83b234bc5b720916d65cd64270785f0549 - React-RCTNetwork: 3cb96b886d75ee77b4d843b43ce9a3d7cea09d17 - React-RCTPushNotification: fff2c713ddf61147def978997ad4a71e94f56674 - React-RCTSettings: c34a61569d673efac2c59a588972ee87e115b816 - React-RCTTest: 533178885fcb1573b67f3d3c706bdd43418cda01 - React-RCTText: 3e06e44603760ad09095a82e69104e656357d2e1 - React-RCTVibration: 0c54cee821ef71f232131fcd816e9acaf50fe688 - React-rendererdebug: 135e16aa4b100dfea3fb07de33ef0cc797764387 - React-rncore: f871fa57fc92d4eed3118bb4b8ec788757b4d3b0 - React-runtimeexecutor: 097d0edcff4c463431ad6538ea2153583922ca86 - React-runtimescheduler: a80659eb4504ad696295b3e51b90805a97c34129 - React-utils: 2e199c0f64d49f8ca4175d878e365d2701ad41f7 - ReactCommon: 82a6500a0906815f2e6079d6a3f226bd2f58e61d - ReactCommon-Samples: 878e46bb741fea592556b3bca139ae240220a04c + RCTRequired: 1f2d61037c356837b9e2b7ae2176db37b6505524 + RCTTypeSafety: 9d3193180ad2893f1b883b991721c6e78c1c2700 + React: 4fc87b90382a02b33737e00dbc22079dca2076d3 + React-callinvoker: 94f2df6ebfae6db411612c1345fef465d75c2b2c + React-Codegen: e696e2676ae51fe21efea19bc5b66b409ee43669 + React-Core: 134a990271277c544bf67e76dad4ed5a59c54f12 + React-CoreModules: a95a49df091f917a56db51730d0fbeae4791bfdb + React-cxxreact: eee06bc4d6d44f366f695e6f60de254d9ac96dc1 + React-debug: b7a74d39e69f9ef8596b3cf3b31a7e679c83e04f + React-Fabric: 24ef180bd83ea806e3868330e7e59bccd5f8b955 + React-FabricImage: b4f1276c3f8bdf3d6c1756eba0f4cf5287c6fd78 + React-graphics: 927a9dd772a9ef9226c31afa8d196edde0cec802 + React-hermes: c781ec7697ee28b3234d425322ad4e44d03c724b + React-ImageManager: 5b57913743b49071e9c1cad5f749fee4aae3252a + React-jserrorhandler: 02ac437ad37547598ca22e6a86f89aed22a6699c + React-jsi: 29aa71dfd30c80719b20656b651b8184b1a7e86a + React-jsiexecutor: 6d92b09c54e290ed0287416610b3e1c764df9494 + React-jsinspector: 9bd38eac237ff6906035c1b3ed3b96308d58c820 + React-logger: e7d5069816b9ce38151a67829a87fcf04ef61585 + React-Mapbuffer: e3f6423306d98a77bc8d5de436f67e1b7d3c90fd + React-nativeconfig: b91e65004863aec6b42c2f247d7af8603acf8939 + React-NativeModulesApple: 8ac6b0fe4141c14fd90d7e9881a7cf69fd17c2cf + React-perflogger: 8667c5ea4542bba298fd2c79955e2daa74a9ea31 + React-RCTActionSheet: 6e7df6469b2e022b0230da652198f711469f0613 + React-RCTAnimation: 3f9f90cbc3fdd03e128b14e25807c654b1e1ebab + React-RCTAppDelegate: 78f5ecc6078d130c3ad32ae2bdc3044fc63028bc + React-RCTBlob: 2f7274d43349120cfd9e99911220159e949550c4 + React-RCTFabric: cfba55f1c55241871a1928ef4f63bfb7a79a22f4 + React-RCTImage: 389a2b364e9223567df96ff95fff7ba3f0751a77 + React-RCTLinking: 824dca5afc24e68747abf42e9d28b98ddb14c60b + React-RCTNetwork: 7a30f93c85d25a598c7e540b77de4f05f8551c56 + React-RCTPushNotification: de6c765f8c9079bf0d25dff1de8aa31b5854d304 + React-RCTSettings: da78ab24ef66eab6d7b5becfd1246154ac7749ce + React-RCTTest: 7f89631e803bb99781e43be983e04515082123e9 + React-RCTText: fcbcb3d85ced5224671c4bfdc266429c83bdaff1 + React-RCTVibration: 5ca6a4e420899d0223fedc08785267122a19ae10 + React-rendererdebug: 485a3a0d0786ff4a49707eb1f90a80110587045b + React-rncore: c75f8bf603276d5c604768f0519f9fdf3c46589b + React-runtimeexecutor: ad172f59dbfa1806aa0ec253b26cf64855794c94 + React-runtimescheduler: e7c7a849066cac7d681b4287e6d8b038e0a17197 + React-utils: d86c098ae9144d9181a19f25fa9a6a9954db8a5c + ReactCommon: d222185b50b2fa70948b82a646d2fe9453a3ec60 + ReactCommon-Samples: e2c2fc6e162d9a13496f05836b512e5226e8d18e ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: 1b395db8632a574e065f5e7f0f97f8f613675b64 + Yoga: bf76366ce45defb2c9f62c948373b2877f6001da PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.14.2 +COCOAPODS: 1.14.3 From bb989e982c076979f6b520e1e6c353426a6e8673 Mon Sep 17 00:00:00 2001 From: Distiller Date: Mon, 4 Dec 2023 10:58:21 +0000 Subject: [PATCH 132/190] [0.73.0-rc.7] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 2 +- packages/react-native/template/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 9658d95793e7..efb441593c1b 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.6', + prerelease: 'rc.7', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index d7fa3d83eba1..b775569c3b46 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.6", + RCTVersionPrerelease: @"rc.7", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 72f455f2a495..02fad44d8e1e 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.6 +VERSION_NAME=0.73.0-rc.7 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index c5018630c6f8..f0d5a554502a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.6"); + "prerelease", "rc.7"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 7ff2e76dc0a9..3a4753061dd2 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.6"; + std::string_view Prerelease = "rc.7"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 81a34a20470b..83a20dbb6a1f 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.6", + "version": "0.73.0-rc.7", "description": "A framework for building native apps using React", "license": "MIT", "repository": { diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 42fb2169d360..1861ef306bd5 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.6" + "react-native": "0.73.0-rc.7" }, "devDependencies": { "@babel/core": "^7.20.0", From d2517afcfc85ca57c081394024cb3daee55c914f Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Mon, 4 Dec 2023 12:37:51 +0000 Subject: [PATCH 133/190] Update Podfile.lock --- packages/rn-tester/Podfile.lock | 478 ++++++++++++++++---------------- 1 file changed, 239 insertions(+), 239 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 49c7b2f9df08..e1a4ad5e1cb3 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.6) - - FBReactNativeSpec (0.73.0-rc.6): + - FBLazyVector (0.73.0-rc.7) + - FBReactNativeSpec (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.6) - - RCTTypeSafety (= 0.73.0-rc.6) - - React-Core (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) - - ReactCommon/turbomodule/core (= 0.73.0-rc.6) + - RCTRequired (= 0.73.0-rc.7) + - RCTTypeSafety (= 0.73.0-rc.7) + - React-Core (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) + - ReactCommon/turbomodule/core (= 0.73.0-rc.7) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -68,9 +68,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.6): - - hermes-engine/Pre-built (= 0.73.0-rc.6) - - hermes-engine/Pre-built (0.73.0-rc.6) + - hermes-engine (0.73.0-rc.7): + - hermes-engine/Pre-built (= 0.73.0-rc.7) + - hermes-engine/Pre-built (0.73.0-rc.7) - libevent (2.1.12) - OCMock (3.9.1) - OpenSSL-Universal (1.1.1100) @@ -96,26 +96,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.6) - - RCTTypeSafety (0.73.0-rc.6): - - FBLazyVector (= 0.73.0-rc.6) - - RCTRequired (= 0.73.0-rc.6) - - React-Core (= 0.73.0-rc.6) - - React (0.73.0-rc.6): - - React-Core (= 0.73.0-rc.6) - - React-Core/DevSupport (= 0.73.0-rc.6) - - React-Core/RCTWebSocket (= 0.73.0-rc.6) - - React-RCTActionSheet (= 0.73.0-rc.6) - - React-RCTAnimation (= 0.73.0-rc.6) - - React-RCTBlob (= 0.73.0-rc.6) - - React-RCTImage (= 0.73.0-rc.6) - - React-RCTLinking (= 0.73.0-rc.6) - - React-RCTNetwork (= 0.73.0-rc.6) - - React-RCTSettings (= 0.73.0-rc.6) - - React-RCTText (= 0.73.0-rc.6) - - React-RCTVibration (= 0.73.0-rc.6) - - React-callinvoker (0.73.0-rc.6) - - React-Codegen (0.73.0-rc.6): + - RCTRequired (0.73.0-rc.7) + - RCTTypeSafety (0.73.0-rc.7): + - FBLazyVector (= 0.73.0-rc.7) + - RCTRequired (= 0.73.0-rc.7) + - React-Core (= 0.73.0-rc.7) + - React (0.73.0-rc.7): + - React-Core (= 0.73.0-rc.7) + - React-Core/DevSupport (= 0.73.0-rc.7) + - React-Core/RCTWebSocket (= 0.73.0-rc.7) + - React-RCTActionSheet (= 0.73.0-rc.7) + - React-RCTAnimation (= 0.73.0-rc.7) + - React-RCTBlob (= 0.73.0-rc.7) + - React-RCTImage (= 0.73.0-rc.7) + - React-RCTLinking (= 0.73.0-rc.7) + - React-RCTNetwork (= 0.73.0-rc.7) + - React-RCTSettings (= 0.73.0-rc.7) + - React-RCTText (= 0.73.0-rc.7) + - React-RCTVibration (= 0.73.0-rc.7) + - React-callinvoker (0.73.0-rc.7) + - React-Codegen (0.73.0-rc.7): - DoubleConversion - FBReactNativeSpec - glog @@ -136,11 +136,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.6): + - React-Core (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.6) + - React-Core/Default (= 0.73.0-rc.7) - React-cxxreact - React-hermes - React-jsi @@ -150,7 +150,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.6): + - React-Core/CoreModulesHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -164,7 +164,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.0-rc.6): + - React-Core/Default (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -177,23 +177,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.0-rc.6): + - React-Core/DevSupport (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.6) - - React-Core/RCTWebSocket (= 0.73.0-rc.6) + - React-Core/Default (= 0.73.0-rc.7) + - React-Core/RCTWebSocket (= 0.73.0-rc.7) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.6) + - React-jsinspector (= 0.73.0-rc.7) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.6): + - React-Core/RCTActionSheetHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -207,7 +207,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.6): + - React-Core/RCTAnimationHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -221,7 +221,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.6): + - React-Core/RCTBlobHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -235,7 +235,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.6): + - React-Core/RCTImageHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -249,7 +249,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.6): + - React-Core/RCTLinkingHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -263,7 +263,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.6): + - React-Core/RCTNetworkHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -277,7 +277,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0-rc.6): + - React-Core/RCTPushNotificationHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -291,7 +291,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.6): + - React-Core/RCTSettingsHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -305,7 +305,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.6): + - React-Core/RCTTextHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -319,7 +319,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.6): + - React-Core/RCTVibrationHeaders (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -333,11 +333,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.6): + - React-Core/RCTWebSocket (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.6) + - React-Core/Default (= 0.73.0-rc.7) - React-cxxreact - React-hermes - React-jsi @@ -347,33 +347,33 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.0-rc.6): + - React-CoreModules (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.6) + - RCTTypeSafety (= 0.73.0-rc.7) - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) + - React-Core/CoreModulesHeaders (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) - React-NativeModulesApple - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.6) + - React-RCTImage (= 0.73.0-rc.7) - ReactCommon - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.0-rc.6): + - React-cxxreact (0.73.0-rc.7): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.6) - - React-debug (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) - - React-jsinspector (= 0.73.0-rc.6) - - React-logger (= 0.73.0-rc.6) - - React-perflogger (= 0.73.0-rc.6) - - React-runtimeexecutor (= 0.73.0-rc.6) - - React-debug (0.73.0-rc.6) - - React-Fabric (0.73.0-rc.6): + - React-callinvoker (= 0.73.0-rc.7) + - React-debug (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) + - React-jsinspector (= 0.73.0-rc.7) + - React-logger (= 0.73.0-rc.7) + - React-perflogger (= 0.73.0-rc.7) + - React-runtimeexecutor (= 0.73.0-rc.7) + - React-debug (0.73.0-rc.7) + - React-Fabric (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -384,20 +384,20 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.6) - - React-Fabric/attributedstring (= 0.73.0-rc.6) - - React-Fabric/componentregistry (= 0.73.0-rc.6) - - React-Fabric/componentregistrynative (= 0.73.0-rc.6) - - React-Fabric/components (= 0.73.0-rc.6) - - React-Fabric/core (= 0.73.0-rc.6) - - React-Fabric/imagemanager (= 0.73.0-rc.6) - - React-Fabric/leakchecker (= 0.73.0-rc.6) - - React-Fabric/mounting (= 0.73.0-rc.6) - - React-Fabric/scheduler (= 0.73.0-rc.6) - - React-Fabric/telemetry (= 0.73.0-rc.6) - - React-Fabric/templateprocessor (= 0.73.0-rc.6) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.6) - - React-Fabric/uimanager (= 0.73.0-rc.6) + - React-Fabric/animations (= 0.73.0-rc.7) + - React-Fabric/attributedstring (= 0.73.0-rc.7) + - React-Fabric/componentregistry (= 0.73.0-rc.7) + - React-Fabric/componentregistrynative (= 0.73.0-rc.7) + - React-Fabric/components (= 0.73.0-rc.7) + - React-Fabric/core (= 0.73.0-rc.7) + - React-Fabric/imagemanager (= 0.73.0-rc.7) + - React-Fabric/leakchecker (= 0.73.0-rc.7) + - React-Fabric/mounting (= 0.73.0-rc.7) + - React-Fabric/scheduler (= 0.73.0-rc.7) + - React-Fabric/telemetry (= 0.73.0-rc.7) + - React-Fabric/templateprocessor (= 0.73.0-rc.7) + - React-Fabric/textlayoutmanager (= 0.73.0-rc.7) + - React-Fabric/uimanager (= 0.73.0-rc.7) - React-graphics - React-jsi - React-jsiexecutor @@ -406,7 +406,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.0-rc.6): + - React-Fabric/animations (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -425,7 +425,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.0-rc.6): + - React-Fabric/attributedstring (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -444,7 +444,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.0-rc.6): + - React-Fabric/componentregistry (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -463,7 +463,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.0-rc.6): + - React-Fabric/componentregistrynative (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -482,7 +482,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.0-rc.6): + - React-Fabric/components (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -493,17 +493,17 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.6) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.6) - - React-Fabric/components/modal (= 0.73.0-rc.6) - - React-Fabric/components/rncore (= 0.73.0-rc.6) - - React-Fabric/components/root (= 0.73.0-rc.6) - - React-Fabric/components/safeareaview (= 0.73.0-rc.6) - - React-Fabric/components/scrollview (= 0.73.0-rc.6) - - React-Fabric/components/text (= 0.73.0-rc.6) - - React-Fabric/components/textinput (= 0.73.0-rc.6) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.6) - - React-Fabric/components/view (= 0.73.0-rc.6) + - React-Fabric/components/inputaccessory (= 0.73.0-rc.7) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.7) + - React-Fabric/components/modal (= 0.73.0-rc.7) + - React-Fabric/components/rncore (= 0.73.0-rc.7) + - React-Fabric/components/root (= 0.73.0-rc.7) + - React-Fabric/components/safeareaview (= 0.73.0-rc.7) + - React-Fabric/components/scrollview (= 0.73.0-rc.7) + - React-Fabric/components/text (= 0.73.0-rc.7) + - React-Fabric/components/textinput (= 0.73.0-rc.7) + - React-Fabric/components/unimplementedview (= 0.73.0-rc.7) + - React-Fabric/components/view (= 0.73.0-rc.7) - React-graphics - React-jsi - React-jsiexecutor @@ -512,7 +512,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.0-rc.6): + - React-Fabric/components/inputaccessory (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -531,7 +531,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.6): + - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -550,7 +550,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.0-rc.6): + - React-Fabric/components/modal (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -569,7 +569,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.0-rc.6): + - React-Fabric/components/rncore (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -588,7 +588,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.0-rc.6): + - React-Fabric/components/root (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -607,7 +607,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.0-rc.6): + - React-Fabric/components/safeareaview (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -626,7 +626,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.0-rc.6): + - React-Fabric/components/scrollview (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -645,7 +645,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.0-rc.6): + - React-Fabric/components/text (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -664,7 +664,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.0-rc.6): + - React-Fabric/components/textinput (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -683,7 +683,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.0-rc.6): + - React-Fabric/components/unimplementedview (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -702,7 +702,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.0-rc.6): + - React-Fabric/components/view (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -722,7 +722,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (0.73.0-rc.6): + - React-Fabric/core (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -741,7 +741,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.0-rc.6): + - React-Fabric/imagemanager (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -760,7 +760,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.0-rc.6): + - React-Fabric/leakchecker (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -779,7 +779,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.0-rc.6): + - React-Fabric/mounting (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -798,7 +798,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.0-rc.6): + - React-Fabric/scheduler (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -817,7 +817,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.0-rc.6): + - React-Fabric/telemetry (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -836,7 +836,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.0-rc.6): + - React-Fabric/templateprocessor (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -855,7 +855,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.0-rc.6): + - React-Fabric/textlayoutmanager (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -875,7 +875,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.0-rc.6): + - React-Fabric/uimanager (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -894,42 +894,42 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricImage (0.73.0-rc.6): + - React-FabricImage (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.6) - - RCTTypeSafety (= 0.73.0-rc.6) + - RCTRequired (= 0.73.0-rc.7) + - RCTTypeSafety (= 0.73.0-rc.7) - React-Fabric - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.73.0-rc.6) + - React-jsiexecutor (= 0.73.0-rc.7) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-graphics (0.73.0-rc.6): + - React-graphics (0.73.0-rc.7): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.6) + - React-Core/Default (= 0.73.0-rc.7) - React-utils - - React-hermes (0.73.0-rc.6): + - React-hermes (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.6) + - React-cxxreact (= 0.73.0-rc.7) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.6) - - React-jsinspector (= 0.73.0-rc.6) - - React-perflogger (= 0.73.0-rc.6) - - React-ImageManager (0.73.0-rc.6): + - React-jsiexecutor (= 0.73.0-rc.7) + - React-jsinspector (= 0.73.0-rc.7) + - React-perflogger (= 0.73.0-rc.7) + - React-ImageManager (0.73.0-rc.7): - glog - RCT-Folly/Fabric - React-Core/Default @@ -938,35 +938,35 @@ PODS: - React-graphics - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.6): + - React-jserrorhandler (0.73.0-rc.7): - RCT-Folly/Fabric (= 2022.05.16.00) - React-debug - React-jsi - React-Mapbuffer - - React-jsi (0.73.0-rc.6): + - React-jsi (0.73.0-rc.7): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.6): + - React-jsiexecutor (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) - - React-perflogger (= 0.73.0-rc.6) - - React-jsinspector (0.73.0-rc.6) - - React-logger (0.73.0-rc.6): + - React-cxxreact (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) + - React-perflogger (= 0.73.0-rc.7) + - React-jsinspector (0.73.0-rc.7) + - React-logger (0.73.0-rc.7): - glog - - React-Mapbuffer (0.73.0-rc.6): + - React-Mapbuffer (0.73.0-rc.7): - glog - React-debug - - React-nativeconfig (0.73.0-rc.6) - - React-NativeModulesApple (0.73.0-rc.6): + - React-nativeconfig (0.73.0-rc.7) + - React-NativeModulesApple (0.73.0-rc.7): - glog - hermes-engine - React-callinvoker @@ -976,10 +976,10 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.6) - - React-RCTActionSheet (0.73.0-rc.6): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.6) - - React-RCTAnimation (0.73.0-rc.6): + - React-perflogger (0.73.0-rc.7) + - React-RCTActionSheet (0.73.0-rc.7): + - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.7) + - React-RCTAnimation (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -987,7 +987,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTAppDelegate (0.73.0-rc.6): + - React-RCTAppDelegate (0.73.0-rc.7): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1001,7 +1001,7 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon - - React-RCTBlob (0.73.0-rc.6): + - React-RCTBlob (0.73.0-rc.7): - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-Codegen @@ -1011,7 +1011,7 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.73.0-rc.6): + - React-RCTFabric (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1029,7 +1029,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.6): + - React-RCTImage (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1038,14 +1038,14 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.73.0-rc.6): + - React-RCTLinking (0.73.0-rc.7): - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) + - React-Core/RCTLinkingHeaders (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.0-rc.6) - - React-RCTNetwork (0.73.0-rc.6): + - ReactCommon/turbomodule/core (= 0.73.0-rc.7) + - React-RCTNetwork (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1053,14 +1053,14 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTPushNotification (0.73.0-rc.6): + - React-RCTPushNotification (0.73.0-rc.7): - RCTTypeSafety - React-Codegen - React-Core/RCTPushNotificationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTSettings (0.73.0-rc.6): + - React-RCTSettings (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1068,31 +1068,31 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTTest (0.73.0-rc.6): + - React-RCTTest (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.6) - - React-CoreModules (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) - - ReactCommon/turbomodule/core (= 0.73.0-rc.6) - - React-RCTText (0.73.0-rc.6): - - React-Core/RCTTextHeaders (= 0.73.0-rc.6) + - React-Core (= 0.73.0-rc.7) + - React-CoreModules (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) + - ReactCommon/turbomodule/core (= 0.73.0-rc.7) + - React-RCTText (0.73.0-rc.7): + - React-Core/RCTTextHeaders (= 0.73.0-rc.7) - Yoga - - React-RCTVibration (0.73.0-rc.6): + - React-RCTVibration (0.73.0-rc.7): - RCT-Folly (= 2022.05.16.00) - React-Codegen - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-rendererdebug (0.73.0-rc.6): + - React-rendererdebug (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.6) - - React-runtimeexecutor (0.73.0-rc.6): - - React-jsi (= 0.73.0-rc.6) - - React-runtimescheduler (0.73.0-rc.6): + - React-rncore (0.73.0-rc.7) + - React-runtimeexecutor (0.73.0-rc.7): + - React-jsi (= 0.73.0-rc.7) + - React-runtimescheduler (0.73.0-rc.7): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1103,14 +1103,14 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.6): + - React-utils (0.73.0-rc.7): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon (0.73.0-rc.6): - - React-logger (= 0.73.0-rc.6) - - ReactCommon/turbomodule (= 0.73.0-rc.6) - - ReactCommon-Samples (0.73.0-rc.6): + - ReactCommon (0.73.0-rc.7): + - React-logger (= 0.73.0-rc.7) + - ReactCommon/turbomodule (= 0.73.0-rc.7) + - ReactCommon-Samples (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1121,41 +1121,41 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule (0.73.0-rc.6): + - ReactCommon/turbomodule (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.6) - - React-cxxreact (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) - - React-logger (= 0.73.0-rc.6) - - React-perflogger (= 0.73.0-rc.6) - - ReactCommon/turbomodule/bridging (= 0.73.0-rc.6) - - ReactCommon/turbomodule/core (= 0.73.0-rc.6) - - ReactCommon/turbomodule/bridging (0.73.0-rc.6): + - React-callinvoker (= 0.73.0-rc.7) + - React-cxxreact (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) + - React-logger (= 0.73.0-rc.7) + - React-perflogger (= 0.73.0-rc.7) + - ReactCommon/turbomodule/bridging (= 0.73.0-rc.7) + - ReactCommon/turbomodule/core (= 0.73.0-rc.7) + - ReactCommon/turbomodule/bridging (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.6) - - React-cxxreact (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) - - React-logger (= 0.73.0-rc.6) - - React-perflogger (= 0.73.0-rc.6) - - ReactCommon/turbomodule/core (0.73.0-rc.6): + - React-callinvoker (= 0.73.0-rc.7) + - React-cxxreact (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) + - React-logger (= 0.73.0-rc.7) + - React-perflogger (= 0.73.0-rc.7) + - ReactCommon/turbomodule/core (0.73.0-rc.7): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.6) - - React-cxxreact (= 0.73.0-rc.6) - - React-jsi (= 0.73.0-rc.6) - - React-logger (= 0.73.0-rc.6) - - React-perflogger (= 0.73.0-rc.6) + - React-callinvoker (= 0.73.0-rc.7) + - React-cxxreact (= 0.73.0-rc.7) + - React-jsi (= 0.73.0-rc.7) + - React-logger (= 0.73.0-rc.7) + - React-perflogger (= 0.73.0-rc.7) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1371,8 +1371,8 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: 6008365e52f7b689f375f4b37a6fea166bd745eb - FBReactNativeSpec: f43d6f3954b4ca61ae335d6d19a3cfac4543f1fc + FBLazyVector: e9b722beebd016cb14d7ff6019a22ae6fd9338be + FBReactNativeSpec: b045a061c6beb4a3904cc0c91650b006acdf71eb Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1383,58 +1383,58 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 7cea8d9de082031f5e81d491d1e346e4eeca1699 + hermes-engine: 93e93ab461081ebb33d3f0a48944b85cd7cc5035 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 1f2d61037c356837b9e2b7ae2176db37b6505524 - RCTTypeSafety: 9d3193180ad2893f1b883b991721c6e78c1c2700 - React: 4fc87b90382a02b33737e00dbc22079dca2076d3 - React-callinvoker: 94f2df6ebfae6db411612c1345fef465d75c2b2c - React-Codegen: e696e2676ae51fe21efea19bc5b66b409ee43669 - React-Core: 134a990271277c544bf67e76dad4ed5a59c54f12 - React-CoreModules: a95a49df091f917a56db51730d0fbeae4791bfdb - React-cxxreact: eee06bc4d6d44f366f695e6f60de254d9ac96dc1 - React-debug: b7a74d39e69f9ef8596b3cf3b31a7e679c83e04f - React-Fabric: 24ef180bd83ea806e3868330e7e59bccd5f8b955 - React-FabricImage: b4f1276c3f8bdf3d6c1756eba0f4cf5287c6fd78 - React-graphics: 927a9dd772a9ef9226c31afa8d196edde0cec802 - React-hermes: c781ec7697ee28b3234d425322ad4e44d03c724b - React-ImageManager: 5b57913743b49071e9c1cad5f749fee4aae3252a - React-jserrorhandler: 02ac437ad37547598ca22e6a86f89aed22a6699c - React-jsi: 29aa71dfd30c80719b20656b651b8184b1a7e86a - React-jsiexecutor: 6d92b09c54e290ed0287416610b3e1c764df9494 - React-jsinspector: 9bd38eac237ff6906035c1b3ed3b96308d58c820 - React-logger: e7d5069816b9ce38151a67829a87fcf04ef61585 - React-Mapbuffer: e3f6423306d98a77bc8d5de436f67e1b7d3c90fd - React-nativeconfig: b91e65004863aec6b42c2f247d7af8603acf8939 - React-NativeModulesApple: 8ac6b0fe4141c14fd90d7e9881a7cf69fd17c2cf - React-perflogger: 8667c5ea4542bba298fd2c79955e2daa74a9ea31 - React-RCTActionSheet: 6e7df6469b2e022b0230da652198f711469f0613 - React-RCTAnimation: 3f9f90cbc3fdd03e128b14e25807c654b1e1ebab - React-RCTAppDelegate: 78f5ecc6078d130c3ad32ae2bdc3044fc63028bc - React-RCTBlob: 2f7274d43349120cfd9e99911220159e949550c4 - React-RCTFabric: cfba55f1c55241871a1928ef4f63bfb7a79a22f4 - React-RCTImage: 389a2b364e9223567df96ff95fff7ba3f0751a77 - React-RCTLinking: 824dca5afc24e68747abf42e9d28b98ddb14c60b - React-RCTNetwork: 7a30f93c85d25a598c7e540b77de4f05f8551c56 - React-RCTPushNotification: de6c765f8c9079bf0d25dff1de8aa31b5854d304 - React-RCTSettings: da78ab24ef66eab6d7b5becfd1246154ac7749ce - React-RCTTest: 7f89631e803bb99781e43be983e04515082123e9 - React-RCTText: fcbcb3d85ced5224671c4bfdc266429c83bdaff1 - React-RCTVibration: 5ca6a4e420899d0223fedc08785267122a19ae10 - React-rendererdebug: 485a3a0d0786ff4a49707eb1f90a80110587045b - React-rncore: c75f8bf603276d5c604768f0519f9fdf3c46589b - React-runtimeexecutor: ad172f59dbfa1806aa0ec253b26cf64855794c94 - React-runtimescheduler: e7c7a849066cac7d681b4287e6d8b038e0a17197 - React-utils: d86c098ae9144d9181a19f25fa9a6a9954db8a5c - ReactCommon: d222185b50b2fa70948b82a646d2fe9453a3ec60 - ReactCommon-Samples: e2c2fc6e162d9a13496f05836b512e5226e8d18e + RCTRequired: 9d56f80cef497058ff48d3cf3ea1eeecb7048880 + RCTTypeSafety: e168a9430905e6a400d1a51e8b97d242eb244ada + React: a41f2c56f67bb9cd55c77a7f23fa8653ef42b345 + React-callinvoker: 4b587c2033fa0ef72e11b6228edb061c63526463 + React-Codegen: 8fd2e0bec8e470ef6c22769b44087a79e29f34de + React-Core: 6b4f8988e7cd631b5e5b6f777e32d7ea42c62774 + React-CoreModules: 8d52585d265d0741b01736d3542a9d304bb90ff2 + React-cxxreact: 2658d6131cc3c0c656ac7c5328d583efe99d6769 + React-debug: 6cead8e29b4d1ab7954f22abe51cde1bdcfe79ff + React-Fabric: 87d983a373144b6e84e5780ffc72de8ed8b01245 + React-FabricImage: dc1985ee08237a56694dd84702ef2c7b048a354d + React-graphics: f83db2547d548067abaa1d266a0d58be4058ec22 + React-hermes: e539f19d825e24ee65e11e032241d855783f3705 + React-ImageManager: 5efba8d4ce216b09adfa02cd3af5574df507335d + React-jserrorhandler: 0616f7d70892d13430476a1cf29d55a118ced6b0 + React-jsi: fa5129d50859ae9fefc54db56fd41955c1f18e2e + React-jsiexecutor: 317c2c0adeaf51f84d12ce591341d571bb5ae820 + React-jsinspector: 69e4492e86cd19020a76025b240ab50999bf2fae + React-logger: 4add551e3cdb502adeaf1e20c29dde36ac19c40c + React-Mapbuffer: 7413e88eca55df2d92b94cc4c47e40c6b92544ed + React-nativeconfig: c892d943bf98f3b2f5512427d4ac0c1afd2a8120 + React-NativeModulesApple: 16e487add68d64a4a7fa98a566a576fbbd33ac45 + React-perflogger: 4d91a04b4de8a0d582fb35adb6383773420e0c59 + React-RCTActionSheet: 12dec21812fd2511f3da48011de9b458156d58a0 + React-RCTAnimation: bb7938eb8b682219708fa82f9b4591ec1ea877fa + React-RCTAppDelegate: 2aad64c975c0de9341e7ff102de9d037e567ac57 + React-RCTBlob: bf4766db8cccacc9b4e679e94d8d8a95e4fd1ed6 + React-RCTFabric: 5f1c8262fdf1416eaaa8c74c438557346eda1862 + React-RCTImage: 302ce4a3a8f0a284d9cb0f768755c23a83a8bace + React-RCTLinking: d2d23de3999db79fbf42032f44e1f8e0e612ef9f + React-RCTNetwork: 8fa76b6b7e5c58009e38cfa7384a067c7714d62d + React-RCTPushNotification: cf7da8494ac1e6e94d6c23408de0d4140cbcd031 + React-RCTSettings: 4cd1951cbfb832b057f75db5c0f0d9722a31d7e1 + React-RCTTest: fbd15dbd793fc2531fbf0cb18f7090e9f098a89a + React-RCTText: 7684f343e44a1d5cb714886cf1e32fe545d24f65 + React-RCTVibration: f23ec15a7eead66c957ff74f3a6cdb00017f9fb2 + React-rendererdebug: 3be85535ab2256e6b7c46e68f2c0a5253190db88 + React-rncore: 3e3dbedf1a4f57f4dbdb11e2e82fc29411f5f026 + React-runtimeexecutor: 095d70e5c4e2819a2ed6972c282fa6661928d3d3 + React-runtimescheduler: cedb5e8e673b9b0638ca5e8a219f3db22a383076 + React-utils: de47f01dd02323b2535440d41b3aed9b60bacfa8 + ReactCommon: 98ba799e2ff5591412fab678c568328fb3f42c18 + ReactCommon-Samples: d9bd364c28f9b7d7f1ee3e15af3d6fa7887b53d4 ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: bf76366ce45defb2c9f62c948373b2877f6001da + Yoga: 690b58b78c73b532e40be5491be5e9a20685e919 PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.14.3 +COCOAPODS: 1.13.0 From 0b3a8118d8103615ade621fe6aa8f7df31a67d94 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005232357 Date: Tue, 26 Sep 2023 18:34:51 -0700 Subject: [PATCH 134/190] Revert D49509633: Multisect successfully blamed "D49509633: [react-native][PR] fix: Text cut off issues when adjusting text size and font weight in system settings" for test or build failures Summary: This diff is reverting D49509633 D49509633: [react-native][PR] fix: Text cut off issues when adjusting text size and font weight in system settings by ryancat has been identified to be causing the following test or build failures: Tests affected: - [xplat/endtoend/jest-e2e/apps/facebook_xplat/ReactNativeTTRCTester/__tests__/ReactNativeTTRCTester-errorReportedManually-android-e2e.js](https://www.internalfb.com/intern/test/281475019301157/) Here's the Multisect link: https://www.internalfb.com/multisect/3131615 Here are the tasks that are relevant to this breakage: We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it. If you believe this diff has been generated in error you may Commandeer and Abandon it. Reviewed By: NickGerleman Differential Revision: D49645585 fbshipit-source-id: 414531e067cffa109d0663d6af185dcaf8fb9c4e --- .../text/ReactTextAnchorViewManager.java | 10 --- .../react/views/text/ReactTextView.java | 71 +++++++++---------- 2 files changed, 33 insertions(+), 48 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java index 679bcf47102b..f683c24f74d7 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java @@ -75,16 +75,6 @@ public void setAdjustFontSizeToFit(ReactTextView view, boolean adjustsFontSizeTo view.setAdjustFontSizeToFit(adjustsFontSizeToFit); } - @ReactProp(name = ViewProps.ALLOW_FONT_SCALING, defaultBoolean = true) - public void setAllowFontScaling(ReactTextView view, boolean allowFontScaling) { - view.setAllowFontScaling(allowFontScaling); - } - - @ReactProp(name = ViewProps.MAX_FONT_SIZE_MULTIPLIER, defaultFloat = Float.NaN) - public void setMaxFontSizeMultiplier(ReactTextView view, float maxFontSizeMultiplier) { - view.setMaxFontSizeMultiplier(maxFontSizeMultiplier); - } - @ReactProp(name = ViewProps.FONT_SIZE) public void setFontSize(ReactTextView view, float fontSize) { view.setFontSize(fontSize); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java index 849f04661cf8..4af57295d9aa 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java @@ -58,6 +58,8 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie private int mNumberOfLines; private TextUtils.TruncateAt mEllipsizeLocation; private boolean mAdjustsFontSizeToFit; + private float mFontSize = Float.NaN; + private float mLetterSpacing = Float.NaN; private int mLinkifyMaskType; private boolean mNotifyOnInlineViewLayout; private boolean mTextIsSelectable; @@ -65,12 +67,6 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie private ReactViewBackgroundManager mReactBackgroundManager; private Spannable mSpanned; - /** - * Used to collect some text size affecting attributes to fix some text cut-off issues when users - * adjust text size and font weight to the max value in system font settings. - */ - private TextAttributes mTextAttributes; - public ReactTextView(Context context) { super(context); @@ -102,7 +98,6 @@ private void initView() { mEllipsizeLocation = TextUtils.TruncateAt.END; mSpanned = null; - mTextAttributes = new TextAttributes(); } /* package */ void recycleView() { @@ -592,6 +587,29 @@ public void setAdjustFontSizeToFit(boolean adjustsFontSizeToFit) { mAdjustsFontSizeToFit = adjustsFontSizeToFit; } + public void setFontSize(float fontSize) { + mFontSize = + mAdjustsFontSizeToFit + ? (float) Math.ceil(PixelUtil.toPixelFromSP(fontSize)) + : (float) Math.ceil(PixelUtil.toPixelFromDIP(fontSize)); + + applyTextAttributes(); + } + + public void setLetterSpacing(float letterSpacing) { + if (Float.isNaN(letterSpacing)) { + return; + } + + float letterSpacingPixels = PixelUtil.toPixelFromDIP(letterSpacing); + + // `letterSpacingPixels` and `getEffectiveFontSize` are both in pixels, + // yielding an accurate em value. + mLetterSpacing = letterSpacingPixels / mFontSize; + + applyTextAttributes(); + } + public void setEllipsizeLocation(TextUtils.TruncateAt ellipsizeLocation) { mEllipsizeLocation = ellipsizeLocation; } @@ -607,8 +625,6 @@ public void updateView() { ? null : mEllipsizeLocation; setEllipsize(ellipsizeLocation); - - applyTextAttributes(); } @Override @@ -664,37 +680,16 @@ protected boolean dispatchHoverEvent(MotionEvent event) { return super.dispatchHoverEvent(event); } - public void setLetterSpacing(float letterSpacing) { - mTextAttributes.setLetterSpacing(letterSpacing); - } - - public void setAllowFontScaling(boolean allowFontScaling) { - if (mTextAttributes.getAllowFontScaling() != allowFontScaling) { - mTextAttributes.setAllowFontScaling(allowFontScaling); - } - } - - public void setFontSize(float fontSize) { - mTextAttributes.setFontSize(fontSize); - } - - public void setMaxFontSizeMultiplier(float maxFontSizeMultiplier) { - if (maxFontSizeMultiplier != mTextAttributes.getMaxFontSizeMultiplier()) { - mTextAttributes.setMaxFontSizeMultiplier(maxFontSizeMultiplier); - } - } - private void applyTextAttributes() { - // In general, the `getEffective*` functions return `Float.NaN` if the - // property hasn't been set. - - // `getEffectiveFontSize` always returns a value so don't need to check for anything like - // `Float.NaN`. - setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextAttributes.getEffectiveFontSize()); + // Workaround for an issue where text can be cut off with an ellipsis when + // using certain font sizes and padding. Sets the provided text size and + // letter spacing to ensure consistent rendering and prevent cut-off. + if (!Float.isNaN(mFontSize)) { + setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize); + } - float effectiveLetterSpacing = mTextAttributes.getEffectiveLetterSpacing(); - if (!Float.isNaN(effectiveLetterSpacing)) { - super.setLetterSpacing(effectiveLetterSpacing); + if (!Float.isNaN(mLetterSpacing)) { + super.setLetterSpacing(mLetterSpacing); } } } From 6a4b434c8faa88c5b29ecf998c502a47fedc081b Mon Sep 17 00:00:00 2001 From: Distiller Date: Mon, 4 Dec 2023 18:04:48 +0000 Subject: [PATCH 135/190] [0.73.0-rc.8] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 2 +- packages/react-native/template/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index efb441593c1b..4bc998ca9ba6 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.7', + prerelease: 'rc.8', }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index b775569c3b46..d0332754127f 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.7", + RCTVersionPrerelease: @"rc.8", }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 02fad44d8e1e..444a7729da1f 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.7 +VERSION_NAME=0.73.0-rc.8 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index f0d5a554502a..a2d3424c7ab5 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.7"); + "prerelease", "rc.8"); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 3a4753061dd2..babf366cacb3 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.7"; + std::string_view Prerelease = "rc.8"; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 83a20dbb6a1f..54586214745f 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.7", + "version": "0.73.0-rc.8", "description": "A framework for building native apps using React", "license": "MIT", "repository": { diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 1861ef306bd5..51f2bb9ba994 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.7" + "react-native": "0.73.0-rc.8" }, "devDependencies": { "@babel/core": "^7.20.0", From 1eb4bf0d3af1fe267f5de6bf4bbe1e65d41fea1b Mon Sep 17 00:00:00 2001 From: Distiller Date: Wed, 6 Dec 2023 16:12:08 +0000 Subject: [PATCH 136/190] [0.73.0] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 2 +- packages/react-native/template/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 4bc998ca9ba6..0d86bfcde000 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -13,5 +13,5 @@ exports.version = { major: 0, minor: 73, patch: 0, - prerelease: 'rc.8', + prerelease: null, }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index d0332754127f..20f7e22f963f 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -24,7 +24,7 @@ RCTVersionMajor: @(0), RCTVersionMinor: @(73), RCTVersionPatch: @(0), - RCTVersionPrerelease: @"rc.8", + RCTVersionPrerelease: [NSNull null], }; }); return __rnVersion; diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index 444a7729da1f..ee8e2c040660 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0-rc.8 +VERSION_NAME=0.73.0 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index a2d3424c7ab5..703263382c85 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -18,5 +18,5 @@ public class ReactNativeVersion { "major", 0, "minor", 73, "patch", 0, - "prerelease", "rc.8"); + "prerelease", null); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index babf366cacb3..837d4037e3bb 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -18,7 +18,7 @@ constexpr struct { int32_t Major = 0; int32_t Minor = 73; int32_t Patch = 0; - std::string_view Prerelease = "rc.8"; + std::string_view Prerelease = ""; } ReactNativeVersion; } // namespace facebook::react diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 54586214745f..003006fc9aa3 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0-rc.8", + "version": "0.73.0", "description": "A framework for building native apps using React", "license": "MIT", "repository": { diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 51f2bb9ba994..761b004a4bd7 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0-rc.8" + "react-native": "0.73.0" }, "devDependencies": { "@babel/core": "^7.20.0", From 63c0acf57b0a7ccc058f4a4ca88a99e24b7a8880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 30 Nov 2023 14:25:47 +0100 Subject: [PATCH 137/190] Update CLI to 12.2 --- packages/community-cli-plugin/package.json | 4 +- packages/react-native/package.json | 8 +- yarn.lock | 140 ++++++++++----------- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 9b6b549c4b3f..29f5ea9bb463 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -23,8 +23,8 @@ ], "dependencies": { "@react-native/dev-middleware": "^0.73.5", - "@react-native-community/cli-server-api": "12.1.1", - "@react-native-community/cli-tools": "12.1.1", + "@react-native-community/cli-server-api": "12.2.0", + "@react-native-community/cli-tools": "12.2.0", "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 003006fc9aa3..abcd6e9aa125 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -93,9 +93,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.1.1", - "@react-native-community/cli-platform-android": "12.1.1", - "@react-native-community/cli-platform-ios": "12.1.1", + "@react-native-community/cli": "12.2.0", + "@react-native-community/cli-platform-android": "12.2.0", + "@react-native-community/cli-platform-ios": "12.2.0", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.10", "@react-native/codegen": "^0.73.2", @@ -148,4 +148,4 @@ } ] } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 30cada18e110..e096757fd1fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2366,43 +2366,43 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.1.1.tgz#4f92b3d5eaa301c9db3fef2cbbaf68b87652f6f1" - integrity sha512-lbEQJ9xO8DmNbES7nFcGIQC0Q15e9q1zwKfkN2ty2eM93ZTFqYzOwsddlNoRN9FO7diakMWoWgielhcfcIeIrQ== +"@react-native-community/cli-clean@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.2.0.tgz#eb9c918959f23ff05d6edc9058d0ca901475e38e" + integrity sha512-HmMpH93mpLjnZJbra5zDBXR04qcsu5CofzPX3Q+aatIDglInEyMweYrH7apR/gao1RXwRYKW6+la5xoBjqaAOg== dependencies: - "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-tools" "12.2.0" chalk "^4.1.2" execa "^5.0.0" -"@react-native-community/cli-config@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.1.1.tgz#6fe932b6215f731b39eb54c800d1b068a2080666" - integrity sha512-og8/yH7ZNMBcRJOGaHcn9BLt1WJF3XvgBw8iYsByVSEN7yvzAbYZ+CvfN6EdObGOqendbnE4lN9CVyQYM9Ufsw== +"@react-native-community/cli-config@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.2.0.tgz#ef49699cb70fd5f41bd9535739e4dc87f1cdc7ed" + integrity sha512-SB8X5EDpZmv7hU+ItKnhvNuGmtqyK+3dC88gbMLPCaE/bXvAPsKVbMbk3K4m1LJ60snFHxDgPdsKisA7tqZ/Ng== dependencies: - "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-tools" "12.2.0" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.1.1.tgz#b2e3854f8f77d2f60f845a0a9553123cedfa4669" - integrity sha512-q427jvbJ0WdDuS6HNdc3EbmUu/dX/+FWCcZI60xB7m1i/8p+LzmrsoR2yIJCricsAIV3hhiFOGfquZDgrbF27Q== +"@react-native-community/cli-debugger-ui@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.2.0.tgz#6cb78a0a91d0350875493d4b56393a674c86670c" + integrity sha512-TTkPAGvoGdYy3rpUb4azXRiauXfPF2pNa3Uov15ti6J6I17FdFGliDowghjEF67okeoVs7QPZXlPHpOqBF063Q== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.1.1.tgz#e651a63c537ad7c9b8d9baa69e63947f5384a6bd" - integrity sha512-IUZJ/KUCuz+IzL9GdHUlIf6zF93XadxCBDPseUYb0ucIS+rEb3RmYC+IukYhUWwN3y4F/yxipYy3ytKrQ33AxA== +"@react-native-community/cli-doctor@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.2.0.tgz#69b0314f92f46116e863b85763372559cd6be3fc" + integrity sha512-iyWdwD2gznjM4VSHS4dLmBn9Hzg1UELNRX0XDo/fEhZ5iumRSMnXZd0+XWzhkJns7LM0FtfzV4bf/31jYdcBKg== dependencies: - "@react-native-community/cli-config" "12.1.1" - "@react-native-community/cli-platform-android" "12.1.1" - "@react-native-community/cli-platform-ios" "12.1.1" - "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-config" "12.2.0" + "@react-native-community/cli-platform-android" "12.2.0" + "@react-native-community/cli-platform-ios" "12.2.0" + "@react-native-community/cli-tools" "12.2.0" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2417,53 +2417,53 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.1.1.tgz#9b48c91acb4db88aab648e92d4d1fe19cd0a6191" - integrity sha512-J6yxQoZooFRT8+Dtz8Px/bwasQxnbxZZFAFQzOs3f6CAfXrcr/+JLVFZRWRv9XGfcuLdCHr22JUVPAnyEd48DA== +"@react-native-community/cli-hermes@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.2.0.tgz#4e48ababccbae0d19b539bfccd593ba916d2f2c8" + integrity sha512-u8AeM15mB/1HJgddmzQJ63UeS0QAhvYM101bpWFJU7uD/bZagXwQOrQUBXrGVoAwL7ZK1qWXw63/VRxL/TkX0Q== dependencies: - "@react-native-community/cli-platform-android" "12.1.1" - "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-platform-android" "12.2.0" + "@react-native-community/cli-tools" "12.2.0" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.1.1.tgz#f6541ee07ee479ee0e1b082cbf4ff970737606e4" - integrity sha512-jnyc9y5cPltBo518pfVZ53dtKGDy02kkCkSIwv4ltaHYse7JyEFxFbzBn9lloWvbZ0iFHvEo1NN78YGPAlXSDw== +"@react-native-community/cli-platform-android@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.2.0.tgz#779804ad049fd67da98db996a3f2afae0b0a099e" + integrity sha512-FIYp5eqt1vADsKXzimANseAnsfk3X6WnoRpSwD0o0w+3LqiAN/3LFs8RZKO3TniHdfrLvz0MGm3jocoy1RxXSw== dependencies: - "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-tools" "12.2.0" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.1.1.tgz#399fc39279b8bd95f372c0f69180696b6f9767e1" - integrity sha512-RA2lvFrswwQRIhCV3hoIYZmLe9TkRegpAWimdubtMxRHiv7Eh2dC0VWWR5VdWy3ltbJzeiEpxCoH/EcrMfp9tg== +"@react-native-community/cli-platform-ios@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.2.0.tgz#315175b2b33cfc7b33a1ed969e0482169b39895c" + integrity sha512-EmJzP2Aeit8HCJ68Tb0vw95NbnCr9v4vLhmLyN+cCXUf6N8dV9SnA7gRXp1arRawKLrWqIdqz1valqX+FMz0DA== dependencies: - "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-tools" "12.2.0" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.1.1.tgz#446f829aa37caee7440d863a42d0f600a4713d8b" - integrity sha512-HV+lW1mFSu6GL7du+0/tfq8/5jytKp+w3n4+MWzRkx5wXvUq3oJjzwe8y+ZvvCqkRPdsOiwFDgJrtPhvaZp+xA== +"@react-native-community/cli-plugin-metro@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.2.0.tgz#0724cb1c7e9ab885dac3713a9bb4d6e29af1bb0f" + integrity sha512-RFcS4bsoFiwaf4mG8UiNW+lRSRN8it8Pw+y2g3N3d7n9CMSbWiToJh/UKZeJCjMZS5oh7BazfN+zUivtPog/Qg== -"@react-native-community/cli-server-api@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.1.1.tgz#c00319cba3cdd1ba2cf82286cfa4aa3a6bc6a5b2" - integrity sha512-dUqqEmtEiCMyqFd6LF1UqH0WwXirK2tpU7YhyFsBbigBj3hPz2NmzghCe7DRIcC9iouU0guBxhgmiLtmUEPduQ== +"@react-native-community/cli-server-api@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.2.0.tgz#dfd70f2139509b774f1f460a83384a44e22d622a" + integrity sha512-AYoJOAknKdc7seqsUdOfin9cdHr7XzLKmL/cso94DUNCORwzxUfc8zCpu+XGsxLXsk5P/Ljt2agrJei3Er4tqA== dependencies: - "@react-native-community/cli-debugger-ui" "12.1.1" - "@react-native-community/cli-tools" "12.1.1" + "@react-native-community/cli-debugger-ui" "12.2.0" + "@react-native-community/cli-tools" "12.2.0" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -2472,10 +2472,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.1.1.tgz#c70df5da2d3ad61e5e8ab70dd36d84a89c322b23" - integrity sha512-c9vjDVojZnivGsLoVoTZsJjHnwBEI785yV8mgyKTVFx1sciK8lCsIj1Lke7jNpz7UAE1jW94nI7de2B1aQ9rbA== +"@react-native-community/cli-tools@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.2.0.tgz#2b89a6387aefebd6a90a5eb9077885ad407680b3" + integrity sha512-rXPLku0rZ7VOwxDvxLecTu1TbYL2UD7ap1wnJ6E3ZsPjyzuFzZ2CTTVqmko76NavXTdIUi0qLSjEwKrrAjbnqA== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2488,27 +2488,27 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.1.1.tgz#5a5c0593f50dc394af5265364d0e919ba6134653" - integrity sha512-B9lFEIc1/H2GjiyRCk6ISJNn06h5j0cWuokNm3FmeyGOoGIfm4XYUbnM6IpGlIDdQpTtUzZfNq8CL4CIJZXF0g== +"@react-native-community/cli-types@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.2.0.tgz#958ce4757e59697c87683d9d51af1e09589bf3bf" + integrity sha512-K9S4nMKzJVvI7tjTWio9GzmvfD+FepoK60JzhK8dBMVI+3hoaeHedH7cT4VzkyQABFxj/L+AOp0rWBGNtulWaw== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.1.1.tgz#55e413ee620bea1e6b58c92dad2e9f196d3a5af2" - integrity sha512-St/lyxQ//crrigfE2QCqmjDb0IH3S9nmolm0eqmCA1bB8WWUk5dpjTgQk6xxDxz+3YtMghDJkGZPK4AxDXT42g== - dependencies: - "@react-native-community/cli-clean" "12.1.1" - "@react-native-community/cli-config" "12.1.1" - "@react-native-community/cli-debugger-ui" "12.1.1" - "@react-native-community/cli-doctor" "12.1.1" - "@react-native-community/cli-hermes" "12.1.1" - "@react-native-community/cli-plugin-metro" "12.1.1" - "@react-native-community/cli-server-api" "12.1.1" - "@react-native-community/cli-tools" "12.1.1" - "@react-native-community/cli-types" "12.1.1" +"@react-native-community/cli@12.2.0": + version "12.2.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.2.0.tgz#ee0d07e662f448fa83c0673f1036420433891312" + integrity sha512-0E/T/EmIzjn5zDm4MvZmyljzIJaSAHmuuoxsjgiHKryvdahrAmSN6ZjVzJzLGxMe+NbSKaG6z+MNHAG4j0LXcg== + dependencies: + "@react-native-community/cli-clean" "12.2.0" + "@react-native-community/cli-config" "12.2.0" + "@react-native-community/cli-debugger-ui" "12.2.0" + "@react-native-community/cli-doctor" "12.2.0" + "@react-native-community/cli-hermes" "12.2.0" + "@react-native-community/cli-plugin-metro" "12.2.0" + "@react-native-community/cli-server-api" "12.2.0" + "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-types" "12.2.0" chalk "^4.1.2" commander "^9.4.1" deepmerge "^4.3.0" From 92254f93803f8e03cb5dfed803f4bacd76082d1a Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Thu, 30 Nov 2023 04:32:16 -0800 Subject: [PATCH 138/190] Fix Binding JNI type (#41657) Summary: New implementation: This PR adds cast from interface Binding to BindingImpl class. Previous implementation: The changes made in this PR make the `mBinding` field of `FabricUIManager` visible for JNI. Without these changes, calling the method `JFabricUIManager::getBinding()` would result in an error. Screenshot 2023-11-27 at 13 55 44 In the `react-native-reanimated` library, we utilize `JFabricUIManager::getBinding()`, and we have noticed this issue since version 0.73. This isn't perfect solution, but I'm not certain which change in RN or FBJNI is the source of the problem. If there are any alternative solutions worth considering, I am open to discussing them. Usage of `getBinding()` in Reanimated: https://github.com/software-mansion/react-native-reanimated/blob/main/android/src/main/cpp/NativeProxy.cpp#L57 ## Changelog: [ANDROID] [FIXED] - Fix type for unrecognisable field mBinding Pull Request resolved: https://github.com/facebook/react-native/pull/41657 Test Plan: Just call `JFabricUIManager::getBinding` method (https://github.com/facebook/react-native/blob/v0.73.0-rc.5/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp#L14) or run app with repro: https://github.com/piaskowyk/missing-mBinding-repro after the app lunch you will receive error from above screenshot. Co-author: tomekzaw Reviewed By: NickGerleman Differential Revision: D51661873 Pulled By: javache fbshipit-source-id: 1891c36bf25c503ebc9b0501211df03be6f74115 --- .../ReactAndroid/src/main/jni/react/fabric/Binding.h | 6 +++++- .../src/main/jni/react/fabric/JFabricUIManager.cpp | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h index d4266bcab6f2..9eaa1ee76701 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h @@ -34,7 +34,11 @@ class ReactNativeConfig; class Scheduler; class SurfaceHandlerBinding; -class Binding : public jni::HybridClass, +struct JBinding : public jni::JavaClass { + constexpr static auto kJavaDescriptor = "Lcom/facebook/react/fabric/Binding;"; +}; + +class Binding : public jni::HybridClass, public SchedulerDelegate, public LayoutAnimationStatusDelegate { public: diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp index a2ccdbf5d570..48326b97c260 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp @@ -13,8 +13,9 @@ namespace facebook::react { Binding* JFabricUIManager::getBinding() { static const auto bindingField = - javaClassStatic()->getField("mBinding"); + javaClassStatic()->getField("mBinding"); - return getFieldValue(bindingField)->cthis(); + return jni::static_ref_cast(getFieldValue(bindingField)) + ->cthis(); } } // namespace facebook::react From 33a6fb8c8b89c5be02d8c3d76629103d4972d980 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Thu, 7 Dec 2023 08:30:03 -0800 Subject: [PATCH 139/190] feature(dev-middleware): add `enableNetworkInspector` experiment (#41787) Summary: This enables the network panel/inspector by passing the `unstable_enableNetworkPanel=true` to the React Native JS Inspector. (See https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/2) By setting this inside the `experiments`, we can enable/disable network related CDP handlers within the proxy. ## Changelog: [GENERAL] [ADDED] - Add `enableNetworkInspector` experiment to enable Network panel and CDP handlers in inspector proxy Pull Request resolved: https://github.com/facebook/react-native/pull/41787 Test Plan: TBD, will provide a repository using an Expo canary / RN 0.73.0-rc release. Reviewed By: NickGerleman Differential Revision: D51811892 Pulled By: huntie fbshipit-source-id: 541d96b6f0735104a4050a24a152e1158871ed1d --- packages/dev-middleware/src/createDevMiddleware.js | 1 + .../src/middleware/openDebuggerMiddleware.js | 3 +++ packages/dev-middleware/src/types/Experiments.js | 5 +++++ .../dev-middleware/src/utils/getDevToolsFrontendUrl.js | 9 ++++++++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js index 3451882d8948..93badbcecd8d 100644 --- a/packages/dev-middleware/src/createDevMiddleware.js +++ b/packages/dev-middleware/src/createDevMiddleware.js @@ -127,5 +127,6 @@ function getExperiments(config: ExperimentsConfig): Experiments { return { enableNewDebugger: config.enableNewDebugger ?? false, enableOpenDebuggerRedirect: config.enableOpenDebuggerRedirect ?? false, + enableNetworkInspector: config.enableNetworkInspector ?? false, }; } diff --git a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js index 14ee05051a60..3fff54358968 100644 --- a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js +++ b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js @@ -64,6 +64,7 @@ export default function openDebuggerMiddleware({ app => app.title === 'React Native Experimental (Improved Chrome Reloads)', ); + let target; const launchType: 'launch' | 'redirect' = @@ -106,6 +107,7 @@ export default function openDebuggerMiddleware({ appId, await browserLauncher.launchDebuggerAppWindow( getDevToolsFrontendUrl( + experiments, target.webSocketDebuggerUrl, serverBaseUrl, ), @@ -116,6 +118,7 @@ export default function openDebuggerMiddleware({ case 'redirect': res.writeHead(302, { Location: getDevToolsFrontendUrl( + experiments, target.webSocketDebuggerUrl, // Use a relative URL. '', diff --git a/packages/dev-middleware/src/types/Experiments.js b/packages/dev-middleware/src/types/Experiments.js index 9f15d94c8ef3..c5c2c9af439b 100644 --- a/packages/dev-middleware/src/types/Experiments.js +++ b/packages/dev-middleware/src/types/Experiments.js @@ -23,6 +23,11 @@ export type Experiments = $ReadOnly<{ * interface. */ enableOpenDebuggerRedirect: boolean, + + /** + * Enables the Network panel when launching the custom debugger frontend. + */ + enableNetworkInspector: boolean, }>; export type ExperimentsConfig = Partial; diff --git a/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js b/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js index 0178c4db2d3f..76b497e04db8 100644 --- a/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js +++ b/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js @@ -9,10 +9,13 @@ * @oncall react_native */ +import type {Experiments} from '../types/Experiments'; + /** * Get the DevTools frontend URL to debug a given React Native CDP target. */ export default function getDevToolsFrontendUrl( + experiments: Experiments, webSocketDebuggerUrl: string, devServerUrl: string, ): string { @@ -22,5 +25,9 @@ export default function getDevToolsFrontendUrl( webSocketDebuggerUrl.replace(/^wss?:\/\//, ''), ); - return `${appUrl}?${scheme}=${webSocketUrlWithoutProtocol}&sources.hide_add_folder=true`; + const devToolsUrl = `${appUrl}?${scheme}=${webSocketUrlWithoutProtocol}&sources.hide_add_folder=true`; + + return experiments.enableNetworkInspector + ? `${devToolsUrl}&unstable_enableNetworkPanel=true` + : devToolsUrl; } From 3826a664e2933745cc888309ed7bbb5cd2b5a70c Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 7 Dec 2023 09:52:07 -0800 Subject: [PATCH 140/190] Sync debugger-frontend (12a45e0) (#41840) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41840 Sync `react-native/debugger-frontend`. Includes: - https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/2 Changelog: [Internal] Differential Revision: D51946121 fbshipit-source-id: 8118cb5075aa86d95bbd8e1ba56a73360122aaab # Conflicts: # packages/debugger-frontend/BUILD_INFO --- packages/debugger-frontend/BUILD_INFO | 8 ++++---- .../dist/third-party/front_end/core/host/host.js | 2 +- .../dist/third-party/front_end/core/root/root.js | 2 +- .../front_end/entrypoints/devtools_app/devtools_app.js | 2 +- .../front_end/entrypoints/rn_inspector/rn_inspector.js | 2 +- .../front_end/entrypoints/worker_app/worker_app.js | 2 +- .../third-party/front_end/panels/network/network-meta.js | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/debugger-frontend/BUILD_INFO b/packages/debugger-frontend/BUILD_INFO index 67e1ea665da8..ccaa289b9792 100644 --- a/packages/debugger-frontend/BUILD_INFO +++ b/packages/debugger-frontend/BUILD_INFO @@ -1,9 +1,9 @@ -@generated SignedSource<<7fdc9e65be03ba4c6654f14c6f23d645>> -Git revision: 18f202a1ae468a01afb44ffd2f71d28023126989 +@generated SignedSource<> +Git revision: 12a45e0628384aa80075493354159ef5d91b2698 Built with --nohooks: false Is local checkout: false -Remote URL: https://github.com/motiz88/rn-chrome-devtools-frontend -Remote branch: rn-0.73-chromium-5845 +Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend +Remote branch: main GN build args (overrides only): is_official_build = true Git status in checkout: diff --git a/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js b/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js index 3d51fc09fcd9..37f131c3a0ee 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js +++ b/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js @@ -1 +1 @@ -import*as e from"../common/common.js";import*as o from"../i18n/i18n.js";import*as r from"../platform/platform.js";import*as t from"../root/root.js";var n;!function(e){e.AppendedToURL="appendedToURL",e.CanceledSaveURL="canceledSaveURL",e.ContextMenuCleared="contextMenuCleared",e.ContextMenuItemSelected="contextMenuItemSelected",e.DeviceCountUpdated="deviceCountUpdated",e.DevicesDiscoveryConfigChanged="devicesDiscoveryConfigChanged",e.DevicesPortForwardingStatusChanged="devicesPortForwardingStatusChanged",e.DevicesUpdated="devicesUpdated",e.DispatchMessage="dispatchMessage",e.DispatchMessageChunk="dispatchMessageChunk",e.EnterInspectElementMode="enterInspectElementMode",e.EyeDropperPickedColor="eyeDropperPickedColor",e.FileSystemsLoaded="fileSystemsLoaded",e.FileSystemRemoved="fileSystemRemoved",e.FileSystemAdded="fileSystemAdded",e.FileSystemFilesChangedAddedRemoved="FileSystemFilesChangedAddedRemoved",e.IndexingTotalWorkCalculated="indexingTotalWorkCalculated",e.IndexingWorked="indexingWorked",e.IndexingDone="indexingDone",e.KeyEventUnhandled="keyEventUnhandled",e.ReattachRootTarget="reattachMainTarget",e.ReloadInspectedPage="reloadInspectedPage",e.RevealSourceLine="revealSourceLine",e.SavedURL="savedURL",e.SearchCompleted="searchCompleted",e.SetInspectedTabId="setInspectedTabId",e.SetUseSoftMenu="setUseSoftMenu",e.ShowPanel="showPanel"}(n||(n={}));const i=[[n.AppendedToURL,"appendedToURL",["url"]],[n.CanceledSaveURL,"canceledSaveURL",["url"]],[n.ContextMenuCleared,"contextMenuCleared",[]],[n.ContextMenuItemSelected,"contextMenuItemSelected",["id"]],[n.DeviceCountUpdated,"deviceCountUpdated",["count"]],[n.DevicesDiscoveryConfigChanged,"devicesDiscoveryConfigChanged",["config"]],[n.DevicesPortForwardingStatusChanged,"devicesPortForwardingStatusChanged",["status"]],[n.DevicesUpdated,"devicesUpdated",["devices"]],[n.DispatchMessage,"dispatchMessage",["messageObject"]],[n.DispatchMessageChunk,"dispatchMessageChunk",["messageChunk","messageSize"]],[n.EnterInspectElementMode,"enterInspectElementMode",[]],[n.EyeDropperPickedColor,"eyeDropperPickedColor",["color"]],[n.FileSystemsLoaded,"fileSystemsLoaded",["fileSystems"]],[n.FileSystemRemoved,"fileSystemRemoved",["fileSystemPath"]],[n.FileSystemAdded,"fileSystemAdded",["errorMessage","fileSystem"]],[n.FileSystemFilesChangedAddedRemoved,"fileSystemFilesChangedAddedRemoved",["changed","added","removed"]],[n.IndexingTotalWorkCalculated,"indexingTotalWorkCalculated",["requestId","fileSystemPath","totalWork"]],[n.IndexingWorked,"indexingWorked",["requestId","fileSystemPath","worked"]],[n.IndexingDone,"indexingDone",["requestId","fileSystemPath"]],[n.KeyEventUnhandled,"keyEventUnhandled",["event"]],[n.ReattachRootTarget,"reattachMainTarget",[]],[n.ReloadInspectedPage,"reloadInspectedPage",["hard"]],[n.RevealSourceLine,"revealSourceLine",["url","lineNumber","columnNumber"]],[n.SavedURL,"savedURL",["url","fileSystemPath"]],[n.SearchCompleted,"searchCompleted",["requestId","fileSystemPath","files"]],[n.SetInspectedTabId,"setInspectedTabId",["tabId"]],[n.SetUseSoftMenu,"setUseSoftMenu",["useSoftMenu"]],[n.ShowPanel,"showPanel",["panelName"]]];var s;!function(e){e.ActionTaken="DevTools.ActionTaken",e.BreakpointWithConditionAdded="DevTools.BreakpointWithConditionAdded",e.BreakpointEditDialogRevealedFrom="DevTools.BreakpointEditDialogRevealedFrom",e.PanelClosed="DevTools.PanelClosed",e.PanelShown="DevTools.PanelShown",e.SidebarPaneShown="DevTools.SidebarPaneShown",e.KeyboardShortcutFired="DevTools.KeyboardShortcutFired",e.IssueCreated="DevTools.IssueCreated",e.IssuesPanelIssueExpanded="DevTools.IssuesPanelIssueExpanded",e.IssuesPanelOpenedFrom="DevTools.IssuesPanelOpenedFrom",e.IssuesPanelResourceOpened="DevTools.IssuesPanelResourceOpened",e.KeybindSetSettingChanged="DevTools.KeybindSetSettingChanged",e.ElementsSidebarTabShown="DevTools.Elements.SidebarTabShown",e.ExperimentEnabledAtLaunch="DevTools.ExperimentEnabledAtLaunch",e.ExperimentEnabled="DevTools.ExperimentEnabled",e.ExperimentDisabled="DevTools.ExperimentDisabled",e.DeveloperResourceLoaded="DevTools.DeveloperResourceLoaded",e.DeveloperResourceScheme="DevTools.DeveloperResourceScheme",e.LinearMemoryInspectorRevealedFrom="DevTools.LinearMemoryInspector.RevealedFrom",e.LinearMemoryInspectorTarget="DevTools.LinearMemoryInspector.Target",e.Language="DevTools.Language",e.SyncSetting="DevTools.SyncSetting",e.RecordingAssertion="DevTools.RecordingAssertion",e.RecordingCodeToggled="DevTools.RecordingCodeToggled",e.RecordingCopiedToClipboard="DevTools.RecordingCopiedToClipboard",e.RecordingEdited="DevTools.RecordingEdited",e.RecordingExported="DevTools.RecordingExported",e.RecordingReplayFinished="DevTools.RecordingReplayFinished",e.RecordingReplaySpeed="DevTools.RecordingReplaySpeed",e.RecordingReplayStarted="DevTools.RecordingReplayStarted",e.RecordingToggled="DevTools.RecordingToggled",e.SourcesSidebarTabShown="DevTools.Sources.SidebarTabShown",e.SourcesPanelFileDebugged="DevTools.SourcesPanelFileDebugged",e.SourcesPanelFileOpened="DevTools.SourcesPanelFileOpened",e.NetworkPanelResponsePreviewOpened="DevTools.NetworkPanelResponsePreviewOpened",e.StyleTextCopied="DevTools.StyleTextCopied",e.ManifestSectionSelected="DevTools.ManifestSectionSelected",e.CSSHintShown="DevTools.CSSHintShown",e.LighthouseModeRun="DevTools.LighthouseModeRun",e.ColorConvertedFrom="DevTools.ColorConvertedFrom",e.ColorPickerOpenedFrom="DevTools.ColorPickerOpenedFrom",e.CSSPropertyDocumentation="DevTools.CSSPropertyDocumentation",e.InlineScriptParsed="DevTools.InlineScriptParsed",e.VMInlineScriptTypeShown="DevTools.VMInlineScriptShown",e.BreakpointsRestoredFromStorageCount="DevTools.BreakpointsRestoredFromStorageCount",e.SwatchActivated="DevTools.SwatchActivated",e.BadgeActivated="DevTools.BadgeActivated"}(s||(s={}));var a=Object.freeze({__proto__:null,get Events(){return n},EventDescriptors:i,get EnumeratedHistogram(){return s}});const d={systemError:"System error",connectionError:"Connection error",certificateError:"Certificate error",httpError:"HTTP error",cacheError:"Cache error",signedExchangeError:"Signed Exchange error",ftpError:"FTP error",certificateManagerError:"Certificate manager error",dnsResolverError:"DNS resolver error",unknownError:"Unknown error",httpErrorStatusCodeSS:"HTTP error: status code {PH1}, {PH2}",invalidUrl:"Invalid URL",decodingDataUrlFailed:"Decoding Data URL failed"},l=o.i18n.registerUIStrings("core/host/ResourceLoader.ts",d),c=o.i18n.getLocalizedString.bind(void 0,l);let u=0;const m={},g=function(e,o){m[e].write(o)};let p=function(o,r,t,n){const i=new e.StringOutputStream.StringOutputStream;h(o,r,i,(function(e,o,r){t(e,o,i.data(),r)}),n)};function S(e,o,r){if(void 0===e||void 0===r)return null;if(0!==e){if(function(e){return e<=-300&&e>-400}(e))return c(d.httpErrorStatusCodeSS,{PH1:String(o),PH2:r});const t=function(e){return c(e>-100?d.systemError:e>-200?d.connectionError:e>-300?d.certificateError:e>-400?d.httpError:e>-500?d.cacheError:e>-600?d.signedExchangeError:e>-700?d.ftpError:e>-800?d.certificateManagerError:e>-900?d.dnsResolverError:d.unknownError)}(e);return`${t}: ${r}`}return null}const h=function(o,r,t,n,i){const s=function(e){return m[++u]=e,u}(t);if(new e.ParsedURL.ParsedURL(o).isDataURL())return void(e=>new Promise(((o,r)=>{const t=new XMLHttpRequest;t.withCredentials=!1,t.open("GET",e,!0),t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.DONE){if(200!==t.status)return t.onreadystatechange=null,void r(new Error(String(t.status)));t.onreadystatechange=null,o(t.responseText)}},t.send(null)})))(o).then((function(e){g(s,e),l({statusCode:200})})).catch((function(e){l({statusCode:404,messageOverride:c(d.decodingDataUrlFailed)})}));if(!i&&function(e){try{const o=new URL(e);return"file:"===o.protocol&&""!==o.host}catch(e){return!1}}(o))return void(n&&n(!1,{},{statusCode:400,netError:-20,netErrorName:"net::BLOCKED_BY_CLIENT",message:"Loading from a remote file path is prohibited for security reasons."}));const a=[];if(r)for(const e in r)a.push(e+": "+r[e]);function l(e){if(n){const{success:o,description:r}=function(e){const{statusCode:o,netError:r,netErrorName:t,urlValid:n,messageOverride:i}=e;let s="";const a=o>=200&&o<300;if("string"==typeof i)s=i;else if(!a)if(void 0===r)s=c(!1===n?d.invalidUrl:d.unknownError);else{const e=S(r,o,t);e&&(s=e)}return console.assert(a===(0===s.length)),{success:a,description:{statusCode:o,netError:r,netErrorName:t,urlValid:n,message:s}}}(e);n(o,e.headers||{},r)}var o;m[o=s].close(),delete m[o]}f.loadNetworkResource(o,a.join("\r\n"),s,l)};var C=Object.freeze({__proto__:null,ResourceLoader:{},streamWrite:g,get load(){return p},setLoadForTest:function(e){p=e},netErrorToMessage:S,loadAsStream:h});const v={devtoolsS:"DevTools - {PH1}"},y=o.i18n.registerUIStrings("core/host/InspectorFrontendHost.ts",v),k=o.i18n.getLocalizedString.bind(void 0,y);class x{#e;events;#o=null;recordedCountHistograms=[];recordedEnumeratedHistograms=[];recordedPerformanceHistograms=[];constructor(){function e(e){!("mac"===this.platform()?e.metaKey:e.ctrlKey)||"+"!==e.key&&"-"!==e.key||e.stopPropagation()}this.#e=new Map,"undefined"!=typeof document&&document.addEventListener("keydown",(o=>{e.call(this,o)}),!0)}platform(){const e=navigator.userAgent;return e.includes("Windows NT")?"windows":e.includes("Mac OS X")?"mac":"linux"}loadCompleted(){}bringToFront(){}closeWindow(){}setIsDocked(e,o){window.setTimeout(o,0)}showSurvey(e,o){window.setTimeout((()=>o({surveyShown:!1})),0)}canShowSurvey(e,o){window.setTimeout((()=>o({canShowSurvey:!1})),0)}setInspectedPageBounds(e){}inspectElementCompleted(){}setInjectedScriptForOrigin(e,o){}inspectedURLChanged(e){document.title=k(v.devtoolsS,{PH1:e.replace(/^https?:\/\//,"")})}copyText(e){null!=e&&navigator.clipboard.writeText(e)}openInNewTab(e){window.open(e,"_blank")}showItemInFolder(o){e.Console.Console.instance().error("Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect")}save(e,o,r){let t=this.#e.get(e);t||(t=[],this.#e.set(e,t)),t.push(o),this.events.dispatchEventToListeners(n.SavedURL,{url:e,fileSystemPath:e})}append(e,o){const r=this.#e.get(e);r&&(r.push(o),this.events.dispatchEventToListeners(n.AppendedToURL,e))}close(e){const o=this.#e.get(e)||[];this.#e.delete(e);let t="";if(e)try{const o=r.StringUtilities.trimURL(e);t=r.StringUtilities.removeURLFragment(o)}catch(o){t=e}const n=document.createElement("a");n.download=t;const i=new Blob([o.join("")],{type:"text/plain"}),s=URL.createObjectURL(i);n.href=s,n.click(),URL.revokeObjectURL(s)}sendMessageToBackend(e){}recordCountHistogram(e,o,r,t,n){this.recordedCountHistograms.length>=100&&this.recordedCountHistograms.shift(),this.recordedCountHistograms.push({histogramName:e,sample:o,min:r,exclusiveMax:t,bucketSize:n})}recordEnumeratedHistogram(e,o,r){this.recordedEnumeratedHistograms.length>=100&&this.recordedEnumeratedHistograms.shift(),this.recordedEnumeratedHistograms.push({actionName:e,actionCode:o})}recordPerformanceHistogram(e,o){this.recordedPerformanceHistograms.length>=100&&this.recordedPerformanceHistograms.shift(),this.recordedPerformanceHistograms.push({histogramName:e,duration:o})}recordUserMetricsAction(e){}requestFileSystems(){this.events.dispatchEventToListeners(n.FileSystemsLoaded,[])}addFileSystem(e){window.webkitRequestFileSystem(window.TEMPORARY,1048576,(e=>{this.#o=e;const o={fileSystemName:"sandboxedRequestedFileSystem",fileSystemPath:"/overrides",rootURL:"filesystem:devtools://devtools/isolated/",type:"overrides"};this.events.dispatchEventToListeners(n.FileSystemAdded,{fileSystem:o})}))}removeFileSystem(e){const o=e=>{e.forEach((e=>{e.isDirectory?e.removeRecursively((()=>{})):e.isFile&&e.remove((()=>{}))}))};this.#o&&this.#o.root.createReader().readEntries(o),this.#o=null,this.events.dispatchEventToListeners(n.FileSystemRemoved,"/overrides")}isolatedFileSystem(e,o){return this.#o}loadNetworkResource(e,o,r,t){fetch(e).then((async e=>{const o=await e.arrayBuffer();let r=o;if(function(e){const o=new Uint8Array(e);return!(!o||o.length<3)&&31===o[0]&&139===o[1]&&8===o[2]}(o)){const e=new DecompressionStream("gzip"),t=e.writable.getWriter();t.write(o),t.close(),r=e.readable}return await new Response(r).text()})).then((function(e){g(r,e),t({statusCode:200,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})})).catch((function(){t({statusCode:404,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})}))}registerPreference(e,o){}getPreferences(e){const o={};for(const e in window.localStorage)o[e]=window.localStorage[e];e(o)}getPreference(e,o){o(window.localStorage[e])}setPreference(e,o){window.localStorage[e]=o}removePreference(e){delete window.localStorage[e]}clearPreferences(){window.localStorage.clear()}getSyncInformation(e){e({isSyncActive:!1,arePreferencesSynced:!1})}upgradeDraggedFileSystemPermissions(e){}indexPath(e,o,r){}stopIndexing(e){}searchInPath(e,o,r){}zoomFactor(){return 1}zoomIn(){}zoomOut(){}resetZoom(){}setWhitelistedShortcuts(e){}setEyeDropperActive(e){}showCertificateViewer(e){}reattach(e){}readyForTest(){}connectionReady(){}setOpenNewWindowForPopups(e){}setDevicesDiscoveryConfig(e){}setDevicesUpdatesEnabled(e){}performActionOnRemotePage(e,o){}openRemotePage(e,o){}openNodeFrontend(){}showContextMenuAtPoint(e,o,r,t){throw"Soft context menu should be used"}isHostedMode(){return!0}setAddExtensionCallback(e){}async initialTargetId(){return null}}let f=globalThis.InspectorFrontendHost;class I{constructor(){for(const e of i)this[e[1]]=this.dispatch.bind(this,e[0],e[2],e[3])}dispatch(e,o,r,...t){if(o.length<2){try{f.events.dispatchEventToListeners(e,t[0])}catch(e){console.error(e+" "+e.stack)}return}const n={};for(let e=0;e=2||f.recordEnumeratedHistogram(s.BreakpointWithConditionAdded,e,2)}breakpointEditDialogRevealedFrom(e){e>=7||f.recordEnumeratedHistogram(s.BreakpointEditDialogRevealedFrom,e,7)}panelShown(e){const o=D[e]||0;f.recordEnumeratedHistogram(s.PanelShown,o,D.MaxValue),f.recordUserMetricsAction("DevTools_PanelShown_"+e),this.#r=!0}panelClosed(e){const o=D[e]||0;f.recordEnumeratedHistogram(s.PanelClosed,o,D.MaxValue),this.#r=!0}elementsSidebarTabShown(e){const o=L[e]||0;f.recordEnumeratedHistogram(s.ElementsSidebarTabShown,o,L.MaxValue)}sourcesSidebarTabShown(e){const o=A[e]||0;f.recordEnumeratedHistogram(s.SourcesSidebarTabShown,o,A.MaxValue)}settingsPanelShown(e){this.panelShown("settings-"+e)}sourcesPanelFileDebugged(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.SourcesPanelFileDebugged,o,V.MaxValue)}sourcesPanelFileOpened(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.SourcesPanelFileOpened,o,V.MaxValue)}networkPanelResponsePreviewOpened(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.NetworkPanelResponsePreviewOpened,o,V.MaxValue)}actionTaken(e){f.recordEnumeratedHistogram(s.ActionTaken,e,F.MaxValue)}panelLoaded(e,o){this.#t||e!==this.#n||(this.#t=!0,requestAnimationFrame((()=>{window.setTimeout((()=>{performance.mark(o),this.#r||f.recordPerformanceHistogram(o,performance.now())}),0)})))}setLaunchPanel(e){this.#n=e}keybindSetSettingChanged(e){const o=O[e]||0;f.recordEnumeratedHistogram(s.KeybindSetSettingChanged,o,O.MaxValue)}keyboardShortcutFired(e){const o=H[e]||H.OtherShortcut;f.recordEnumeratedHistogram(s.KeyboardShortcutFired,o,H.MaxValue)}issuesPanelOpenedFrom(e){f.recordEnumeratedHistogram(s.IssuesPanelOpenedFrom,e,N.MaxValue)}issuesPanelIssueExpanded(e){if(void 0===e)return;const o=_[e];void 0!==o&&f.recordEnumeratedHistogram(s.IssuesPanelIssueExpanded,o,_.MaxValue)}issuesPanelResourceOpened(e,o){const r=U[e+o];void 0!==r&&f.recordEnumeratedHistogram(s.IssuesPanelResourceOpened,r,U.MaxValue)}issueCreated(e){const o=B[e];void 0!==o&&f.recordEnumeratedHistogram(s.IssueCreated,o,B.MaxValue)}experimentEnabledAtLaunch(e){const o=W[e];void 0!==o&&f.recordEnumeratedHistogram(s.ExperimentEnabledAtLaunch,o,W.MaxValue)}experimentChanged(e,o){const r=W[e];if(void 0===r)return;const t=o?s.ExperimentEnabled:s.ExperimentDisabled;f.recordEnumeratedHistogram(t,r,W.MaxValue)}developerResourceLoaded(e){e>=j.MaxValue||f.recordEnumeratedHistogram(s.DeveloperResourceLoaded,e,j.MaxValue)}developerResourceScheme(e){e>=G.MaxValue||f.recordEnumeratedHistogram(s.DeveloperResourceScheme,e,G.MaxValue)}inlineScriptParsed(e){e>=2||f.recordEnumeratedHistogram(s.InlineScriptParsed,e,2)}vmInlineScriptContentShown(e){e>=2||f.recordEnumeratedHistogram(s.VMInlineScriptTypeShown,e,2)}linearMemoryInspectorRevealedFrom(e){e>=z.MaxValue||f.recordEnumeratedHistogram(s.LinearMemoryInspectorRevealedFrom,e,z.MaxValue)}linearMemoryInspectorTarget(e){e>=q.MaxValue||f.recordEnumeratedHistogram(s.LinearMemoryInspectorTarget,e,q.MaxValue)}language(e){const o=J[e];void 0!==o&&f.recordEnumeratedHistogram(s.Language,o,J.MaxValue)}syncSetting(e){f.getSyncInformation((o=>{let r=K.ChromeSyncDisabled;o.isSyncActive&&!o.arePreferencesSynced?r=K.ChromeSyncSettingsDisabled:o.isSyncActive&&o.arePreferencesSynced&&(r=e?K.DevToolsSyncSettingEnabled:K.DevToolsSyncSettingDisabled),f.recordEnumeratedHistogram(s.SyncSetting,r,K.MaxValue)}))}recordingAssertion(e){f.recordEnumeratedHistogram(s.RecordingAssertion,e,X.MaxValue)}recordingToggled(e){f.recordEnumeratedHistogram(s.RecordingToggled,e,Q.MaxValue)}recordingReplayFinished(e){f.recordEnumeratedHistogram(s.RecordingReplayFinished,e,Z.MaxValue)}recordingReplaySpeed(e){f.recordEnumeratedHistogram(s.RecordingReplaySpeed,e,$.MaxValue)}recordingReplayStarted(e){f.recordEnumeratedHistogram(s.RecordingReplayStarted,e,Y.MaxValue)}recordingEdited(e){f.recordEnumeratedHistogram(s.RecordingEdited,e,ee.MaxValue)}recordingExported(e){f.recordEnumeratedHistogram(s.RecordingExported,e,oe.MaxValue)}recordingCodeToggled(e){f.recordEnumeratedHistogram(s.RecordingCodeToggled,e,re.MaxValue)}recordingCopiedToClipboard(e){f.recordEnumeratedHistogram(s.RecordingCopiedToClipboard,e,te.MaxValue)}styleTextCopied(e){f.recordEnumeratedHistogram(s.StyleTextCopied,e,ie.MaxValue)}manifestSectionSelected(e){const o=se[e]||se.OtherSection;f.recordEnumeratedHistogram(s.ManifestSectionSelected,o,se.MaxValue)}cssHintShown(e){f.recordEnumeratedHistogram(s.CSSHintShown,e,ae.MaxValue)}lighthouseModeRun(e){f.recordEnumeratedHistogram(s.LighthouseModeRun,e,de.MaxValue)}colorConvertedFrom(e){f.recordEnumeratedHistogram(s.ColorConvertedFrom,e,2)}colorPickerOpenedFrom(e){f.recordEnumeratedHistogram(s.ColorPickerOpenedFrom,e,2)}cssPropertyDocumentation(e){f.recordEnumeratedHistogram(s.CSSPropertyDocumentation,e,3)}swatchActivated(e){f.recordEnumeratedHistogram(s.SwatchActivated,e,10)}badgeActivated(e){f.recordEnumeratedHistogram(s.BadgeActivated,e,9)}breakpointsRestoredFromStorage(e){const o=this.#i(e);f.recordEnumeratedHistogram(s.BreakpointsRestoredFromStorageCount,o,10)}#i(e){return e<100?0:e<300?1:e<1e3?2:e<3e3?3:e<1e4?4:e<3e4?5:e<1e5?6:e<3e5?7:e<1e6?8:9}workspacesPopulated(e){f.recordPerformanceHistogram("DevTools.Workspaces.PopulateWallClocktime",e)}workspacesNumberOfFiles(e,o){f.recordCountHistogram("DevTools.Workspaces.NumberOfFilesLoaded",e,0,1e5,100),f.recordCountHistogram("DevTools.Workspaces.NumberOfDirectoriesTraversed",o,0,1e4,100)}}!function(e){e[e.WindowDocked=1]="WindowDocked",e[e.WindowUndocked=2]="WindowUndocked",e[e.ScriptsBreakpointSet=3]="ScriptsBreakpointSet",e[e.TimelineStarted=4]="TimelineStarted",e[e.ProfilesCPUProfileTaken=5]="ProfilesCPUProfileTaken",e[e.ProfilesHeapProfileTaken=6]="ProfilesHeapProfileTaken",e[e.ConsoleEvaluated=8]="ConsoleEvaluated",e[e.FileSavedInWorkspace=9]="FileSavedInWorkspace",e[e.DeviceModeEnabled=10]="DeviceModeEnabled",e[e.AnimationsPlaybackRateChanged=11]="AnimationsPlaybackRateChanged",e[e.RevisionApplied=12]="RevisionApplied",e[e.FileSystemDirectoryContentReceived=13]="FileSystemDirectoryContentReceived",e[e.StyleRuleEdited=14]="StyleRuleEdited",e[e.CommandEvaluatedInConsolePanel=15]="CommandEvaluatedInConsolePanel",e[e.DOMPropertiesExpanded=16]="DOMPropertiesExpanded",e[e.ResizedViewInResponsiveMode=17]="ResizedViewInResponsiveMode",e[e.TimelinePageReloadStarted=18]="TimelinePageReloadStarted",e[e.ConnectToNodeJSFromFrontend=19]="ConnectToNodeJSFromFrontend",e[e.ConnectToNodeJSDirectly=20]="ConnectToNodeJSDirectly",e[e.CpuThrottlingEnabled=21]="CpuThrottlingEnabled",e[e.CpuProfileNodeFocused=22]="CpuProfileNodeFocused",e[e.CpuProfileNodeExcluded=23]="CpuProfileNodeExcluded",e[e.SelectFileFromFilePicker=24]="SelectFileFromFilePicker",e[e.SelectCommandFromCommandMenu=25]="SelectCommandFromCommandMenu",e[e.ChangeInspectedNodeInElementsPanel=26]="ChangeInspectedNodeInElementsPanel",e[e.StyleRuleCopied=27]="StyleRuleCopied",e[e.CoverageStarted=28]="CoverageStarted",e[e.LighthouseStarted=29]="LighthouseStarted",e[e.LighthouseFinished=30]="LighthouseFinished",e[e.ShowedThirdPartyBadges=31]="ShowedThirdPartyBadges",e[e.LighthouseViewTrace=32]="LighthouseViewTrace",e[e.FilmStripStartedRecording=33]="FilmStripStartedRecording",e[e.CoverageReportFiltered=34]="CoverageReportFiltered",e[e.CoverageStartedPerBlock=35]="CoverageStartedPerBlock",e[e["SettingsOpenedFromGear-deprecated"]=36]="SettingsOpenedFromGear-deprecated",e[e["SettingsOpenedFromMenu-deprecated"]=37]="SettingsOpenedFromMenu-deprecated",e[e["SettingsOpenedFromCommandMenu-deprecated"]=38]="SettingsOpenedFromCommandMenu-deprecated",e[e.TabMovedToDrawer=39]="TabMovedToDrawer",e[e.TabMovedToMainPanel=40]="TabMovedToMainPanel",e[e.CaptureCssOverviewClicked=41]="CaptureCssOverviewClicked",e[e.VirtualAuthenticatorEnvironmentEnabled=42]="VirtualAuthenticatorEnvironmentEnabled",e[e.SourceOrderViewActivated=43]="SourceOrderViewActivated",e[e.UserShortcutAdded=44]="UserShortcutAdded",e[e.ShortcutRemoved=45]="ShortcutRemoved",e[e.ShortcutModified=46]="ShortcutModified",e[e.CustomPropertyLinkClicked=47]="CustomPropertyLinkClicked",e[e.CustomPropertyEdited=48]="CustomPropertyEdited",e[e.ServiceWorkerNetworkRequestClicked=49]="ServiceWorkerNetworkRequestClicked",e[e.ServiceWorkerNetworkRequestClosedQuickly=50]="ServiceWorkerNetworkRequestClosedQuickly",e[e.NetworkPanelServiceWorkerRespondWith=51]="NetworkPanelServiceWorkerRespondWith",e[e.NetworkPanelCopyValue=52]="NetworkPanelCopyValue",e[e.ConsoleSidebarOpened=53]="ConsoleSidebarOpened",e[e.PerfPanelTraceImported=54]="PerfPanelTraceImported",e[e.PerfPanelTraceExported=55]="PerfPanelTraceExported",e[e.StackFrameRestarted=56]="StackFrameRestarted",e[e.CaptureTestProtocolClicked=57]="CaptureTestProtocolClicked",e[e.BreakpointRemovedFromRemoveButton=58]="BreakpointRemovedFromRemoveButton",e[e.BreakpointGroupExpandedStateChanged=59]="BreakpointGroupExpandedStateChanged",e[e.HeaderOverrideFileCreated=60]="HeaderOverrideFileCreated",e[e.HeaderOverrideEnableEditingClicked=61]="HeaderOverrideEnableEditingClicked",e[e.HeaderOverrideHeaderAdded=62]="HeaderOverrideHeaderAdded",e[e.HeaderOverrideHeaderEdited=63]="HeaderOverrideHeaderEdited",e[e.HeaderOverrideHeaderRemoved=64]="HeaderOverrideHeaderRemoved",e[e.HeaderOverrideHeadersFileEdited=65]="HeaderOverrideHeadersFileEdited",e[e.PersistenceNetworkOverridesEnabled=66]="PersistenceNetworkOverridesEnabled",e[e.PersistenceNetworkOverridesDisabled=67]="PersistenceNetworkOverridesDisabled",e[e.BreakpointRemovedFromContextMenu=68]="BreakpointRemovedFromContextMenu",e[e.BreakpointsInFileRemovedFromRemoveButton=69]="BreakpointsInFileRemovedFromRemoveButton",e[e.BreakpointsInFileRemovedFromContextMenu=70]="BreakpointsInFileRemovedFromContextMenu",e[e.BreakpointsInFileCheckboxToggled=71]="BreakpointsInFileCheckboxToggled",e[e.BreakpointsInFileEnabledDisabledFromContextMenu=72]="BreakpointsInFileEnabledDisabledFromContextMenu",e[e.BreakpointConditionEditedFromSidebar=73]="BreakpointConditionEditedFromSidebar",e[e.AddFileSystemToWorkspace=74]="AddFileSystemToWorkspace",e[e.RemoveFileSystemFromWorkspace=75]="RemoveFileSystemFromWorkspace",e[e.AddFileSystemForOverrides=76]="AddFileSystemForOverrides",e[e.RemoveFileSystemForOverrides=77]="RemoveFileSystemForOverrides",e[e.FileSystemSourceSelected=78]="FileSystemSourceSelected",e[e.OverridesSourceSelected=79]="OverridesSourceSelected",e[e.StyleSheetInitiatorLinkClicked=80]="StyleSheetInitiatorLinkClicked",e[e.MaxValue=81]="MaxValue"}(F||(F={})),function(e){e[e.elements=1]="elements",e[e.resources=2]="resources",e[e.network=3]="network",e[e.sources=4]="sources",e[e.timeline=5]="timeline",e[e.heap_profiler=6]="heap_profiler",e[e.console=8]="console",e[e.layers=9]="layers",e[e["console-view"]=10]="console-view",e[e.animations=11]="animations",e[e["network.config"]=12]="network.config",e[e.rendering=13]="rendering",e[e.sensors=14]="sensors",e[e["sources.search"]=15]="sources.search",e[e.security=16]="security",e[e.js_profiler=17]="js_profiler",e[e.lighthouse=18]="lighthouse",e[e.coverage=19]="coverage",e[e["protocol-monitor"]=20]="protocol-monitor",e[e["remote-devices"]=21]="remote-devices",e[e["web-audio"]=22]="web-audio",e[e["changes.changes"]=23]="changes.changes",e[e["performance.monitor"]=24]="performance.monitor",e[e["release-note"]=25]="release-note",e[e.live_heap_profile=26]="live_heap_profile",e[e["sources.quick"]=27]="sources.quick",e[e["network.blocked-urls"]=28]="network.blocked-urls",e[e["settings-preferences"]=29]="settings-preferences",e[e["settings-workspace"]=30]="settings-workspace",e[e["settings-experiments"]=31]="settings-experiments",e[e["settings-blackbox"]=32]="settings-blackbox",e[e["settings-devices"]=33]="settings-devices",e[e["settings-throttling-conditions"]=34]="settings-throttling-conditions",e[e["settings-emulation-locations"]=35]="settings-emulation-locations",e[e["settings-shortcuts"]=36]="settings-shortcuts",e[e["issues-pane"]=37]="issues-pane",e[e["settings-keybinds"]=38]="settings-keybinds",e[e.cssoverview=39]="cssoverview",e[e.chrome_recorder=40]="chrome_recorder",e[e.trust_tokens=41]="trust_tokens",e[e.reporting_api=42]="reporting_api",e[e.interest_groups=43]="interest_groups",e[e.back_forward_cache=44]="back_forward_cache",e[e.service_worker_cache=45]="service_worker_cache",e[e.background_service_backgroundFetch=46]="background_service_backgroundFetch",e[e.background_service_backgroundSync=47]="background_service_backgroundSync",e[e.background_service_pushMessaging=48]="background_service_pushMessaging",e[e.background_service_notifications=49]="background_service_notifications",e[e.background_service_paymentHandler=50]="background_service_paymentHandler",e[e.background_service_periodicBackgroundSync=51]="background_service_periodicBackgroundSync",e[e.service_workers=52]="service_workers",e[e.app_manifest=53]="app_manifest",e[e.storage=54]="storage",e[e.cookies=55]="cookies",e[e.frame_details=56]="frame_details",e[e.frame_resource=57]="frame_resource",e[e.frame_window=58]="frame_window",e[e.frame_worker=59]="frame_worker",e[e.dom_storage=60]="dom_storage",e[e.indexed_db=61]="indexed_db",e[e.web_sql=62]="web_sql",e[e.performance_insights=63]="performance_insights",e[e.preloading=64]="preloading",e[e.bounce_tracking_mitigations=65]="bounce_tracking_mitigations",e[e.MaxValue=66]="MaxValue"}(D||(D={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e.Styles=1]="Styles",e[e.Computed=2]="Computed",e[e["elements.layout"]=3]="elements.layout",e[e["elements.eventListeners"]=4]="elements.eventListeners",e[e["elements.domBreakpoints"]=5]="elements.domBreakpoints",e[e["elements.domProperties"]=6]="elements.domProperties",e[e["accessibility.view"]=7]="accessibility.view",e[e.MaxValue=8]="MaxValue"}(L||(L={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e["navigator-network"]=1]="navigator-network",e[e["navigator-files"]=2]="navigator-files",e[e["navigator-overrides"]=3]="navigator-overrides",e[e["navigator-contentScripts"]=4]="navigator-contentScripts",e[e["navigator-snippets"]=5]="navigator-snippets",e[e.MaxValue=6]="MaxValue"}(A||(A={})),function(e){e[e.Unknown=0]="Unknown",e[e["text/css"]=2]="text/css",e[e["text/html"]=3]="text/html",e[e["application/xml"]=4]="application/xml",e[e["application/wasm"]=5]="application/wasm",e[e["application/manifest+json"]=6]="application/manifest+json",e[e["application/x-aspx"]=7]="application/x-aspx",e[e["application/jsp"]=8]="application/jsp",e[e["text/x-c++src"]=9]="text/x-c++src",e[e["text/x-coffeescript"]=10]="text/x-coffeescript",e[e["application/vnd.dart"]=11]="application/vnd.dart",e[e["text/typescript"]=12]="text/typescript",e[e["text/typescript-jsx"]=13]="text/typescript-jsx",e[e["application/json"]=14]="application/json",e[e["text/x-csharp"]=15]="text/x-csharp",e[e["text/x-java"]=16]="text/x-java",e[e["text/x-less"]=17]="text/x-less",e[e["application/x-httpd-php"]=18]="application/x-httpd-php",e[e["text/x-python"]=19]="text/x-python",e[e["text/x-sh"]=20]="text/x-sh",e[e["text/x-gss"]=21]="text/x-gss",e[e["text/x-sass"]=22]="text/x-sass",e[e["text/x-scss"]=23]="text/x-scss",e[e["text/markdown"]=24]="text/markdown",e[e["text/x-clojure"]=25]="text/x-clojure",e[e["text/jsx"]=26]="text/jsx",e[e["text/x-go"]=27]="text/x-go",e[e["text/x-kotlin"]=28]="text/x-kotlin",e[e["text/x-scala"]=29]="text/x-scala",e[e["text/x.svelte"]=30]="text/x.svelte",e[e["text/javascript+plain"]=31]="text/javascript+plain",e[e["text/javascript+minified"]=32]="text/javascript+minified",e[e["text/javascript+sourcemapped"]=33]="text/javascript+sourcemapped",e[e["text/x.angular"]=34]="text/x.angular",e[e["text/x.vue"]=35]="text/x.vue",e[e.MaxValue=36]="MaxValue"}(V||(V={})),function(e){e[e.devToolsDefault=0]="devToolsDefault",e[e.vsCode=1]="vsCode",e[e.MaxValue=2]="MaxValue"}(O||(O={})),function(e){e[e.OtherShortcut=0]="OtherShortcut",e[e["commandMenu.show"]=1]="commandMenu.show",e[e["console.clear"]=2]="console.clear",e[e["console.show"]=3]="console.show",e[e["debugger.step"]=4]="debugger.step",e[e["debugger.step-into"]=5]="debugger.step-into",e[e["debugger.step-out"]=6]="debugger.step-out",e[e["debugger.step-over"]=7]="debugger.step-over",e[e["debugger.toggle-breakpoint"]=8]="debugger.toggle-breakpoint",e[e["debugger.toggle-breakpoint-enabled"]=9]="debugger.toggle-breakpoint-enabled",e[e["debugger.toggle-pause"]=10]="debugger.toggle-pause",e[e["elements.edit-as-html"]=11]="elements.edit-as-html",e[e["elements.hide-element"]=12]="elements.hide-element",e[e["elements.redo"]=13]="elements.redo",e[e["elements.toggle-element-search"]=14]="elements.toggle-element-search",e[e["elements.undo"]=15]="elements.undo",e[e["main.search-in-panel.find"]=16]="main.search-in-panel.find",e[e["main.toggle-drawer"]=17]="main.toggle-drawer",e[e["network.hide-request-details"]=18]="network.hide-request-details",e[e["network.search"]=19]="network.search",e[e["network.toggle-recording"]=20]="network.toggle-recording",e[e["quickOpen.show"]=21]="quickOpen.show",e[e["settings.show"]=22]="settings.show",e[e["sources.search"]=23]="sources.search",e[e["background-service.toggle-recording"]=24]="background-service.toggle-recording",e[e["components.collect-garbage"]=25]="components.collect-garbage",e[e["console.clear.history"]=26]="console.clear.history",e[e["console.create-pin"]=27]="console.create-pin",e[e["coverage.start-with-reload"]=28]="coverage.start-with-reload",e[e["coverage.toggle-recording"]=29]="coverage.toggle-recording",e[e["debugger.breakpoint-input-window"]=30]="debugger.breakpoint-input-window",e[e["debugger.evaluate-selection"]=31]="debugger.evaluate-selection",e[e["debugger.next-call-frame"]=32]="debugger.next-call-frame",e[e["debugger.previous-call-frame"]=33]="debugger.previous-call-frame",e[e["debugger.run-snippet"]=34]="debugger.run-snippet",e[e["debugger.toggle-breakpoints-active"]=35]="debugger.toggle-breakpoints-active",e[e["elements.capture-area-screenshot"]=36]="elements.capture-area-screenshot",e[e["emulation.capture-full-height-screenshot"]=37]="emulation.capture-full-height-screenshot",e[e["emulation.capture-node-screenshot"]=38]="emulation.capture-node-screenshot",e[e["emulation.capture-screenshot"]=39]="emulation.capture-screenshot",e[e["emulation.show-sensors"]=40]="emulation.show-sensors",e[e["emulation.toggle-device-mode"]=41]="emulation.toggle-device-mode",e[e["help.release-notes"]=42]="help.release-notes",e[e["help.report-issue"]=43]="help.report-issue",e[e["input.start-replaying"]=44]="input.start-replaying",e[e["input.toggle-pause"]=45]="input.toggle-pause",e[e["input.toggle-recording"]=46]="input.toggle-recording",e[e["inspector_main.focus-debuggee"]=47]="inspector_main.focus-debuggee",e[e["inspector_main.hard-reload"]=48]="inspector_main.hard-reload",e[e["inspector_main.reload"]=49]="inspector_main.reload",e[e["live-heap-profile.start-with-reload"]=50]="live-heap-profile.start-with-reload",e[e["live-heap-profile.toggle-recording"]=51]="live-heap-profile.toggle-recording",e[e["main.debug-reload"]=52]="main.debug-reload",e[e["main.next-tab"]=53]="main.next-tab",e[e["main.previous-tab"]=54]="main.previous-tab",e[e["main.search-in-panel.cancel"]=55]="main.search-in-panel.cancel",e[e["main.search-in-panel.find-next"]=56]="main.search-in-panel.find-next",e[e["main.search-in-panel.find-previous"]=57]="main.search-in-panel.find-previous",e[e["main.toggle-dock"]=58]="main.toggle-dock",e[e["main.zoom-in"]=59]="main.zoom-in",e[e["main.zoom-out"]=60]="main.zoom-out",e[e["main.zoom-reset"]=61]="main.zoom-reset",e[e["network-conditions.network-low-end-mobile"]=62]="network-conditions.network-low-end-mobile",e[e["network-conditions.network-mid-tier-mobile"]=63]="network-conditions.network-mid-tier-mobile",e[e["network-conditions.network-offline"]=64]="network-conditions.network-offline",e[e["network-conditions.network-online"]=65]="network-conditions.network-online",e[e["profiler.heap-toggle-recording"]=66]="profiler.heap-toggle-recording",e[e["profiler.js-toggle-recording"]=67]="profiler.js-toggle-recording",e[e["resources.clear"]=68]="resources.clear",e[e["settings.documentation"]=69]="settings.documentation",e[e["settings.shortcuts"]=70]="settings.shortcuts",e[e["sources.add-folder-to-workspace"]=71]="sources.add-folder-to-workspace",e[e["sources.add-to-watch"]=72]="sources.add-to-watch",e[e["sources.close-all"]=73]="sources.close-all",e[e["sources.close-editor-tab"]=74]="sources.close-editor-tab",e[e["sources.create-snippet"]=75]="sources.create-snippet",e[e["sources.go-to-line"]=76]="sources.go-to-line",e[e["sources.go-to-member"]=77]="sources.go-to-member",e[e["sources.jump-to-next-location"]=78]="sources.jump-to-next-location",e[e["sources.jump-to-previous-location"]=79]="sources.jump-to-previous-location",e[e["sources.rename"]=80]="sources.rename",e[e["sources.save"]=81]="sources.save",e[e["sources.save-all"]=82]="sources.save-all",e[e["sources.switch-file"]=83]="sources.switch-file",e[e["timeline.jump-to-next-frame"]=84]="timeline.jump-to-next-frame",e[e["timeline.jump-to-previous-frame"]=85]="timeline.jump-to-previous-frame",e[e["timeline.load-from-file"]=86]="timeline.load-from-file",e[e["timeline.next-recording"]=87]="timeline.next-recording",e[e["timeline.previous-recording"]=88]="timeline.previous-recording",e[e["timeline.record-reload"]=89]="timeline.record-reload",e[e["timeline.save-to-file"]=90]="timeline.save-to-file",e[e["timeline.show-history"]=91]="timeline.show-history",e[e["timeline.toggle-recording"]=92]="timeline.toggle-recording",e[e["sources.increment-css"]=93]="sources.increment-css",e[e["sources.increment-css-by-ten"]=94]="sources.increment-css-by-ten",e[e["sources.decrement-css"]=95]="sources.decrement-css",e[e["sources.decrement-css-by-ten"]=96]="sources.decrement-css-by-ten",e[e["layers.reset-view"]=97]="layers.reset-view",e[e["layers.pan-mode"]=98]="layers.pan-mode",e[e["layers.rotate-mode"]=99]="layers.rotate-mode",e[e["layers.zoom-in"]=100]="layers.zoom-in",e[e["layers.zoom-out"]=101]="layers.zoom-out",e[e["layers.up"]=102]="layers.up",e[e["layers.down"]=103]="layers.down",e[e["layers.left"]=104]="layers.left",e[e["layers.right"]=105]="layers.right",e[e["help.report-translation-issue"]=106]="help.report-translation-issue",e[e["rendering.toggle-prefers-color-scheme"]=107]="rendering.toggle-prefers-color-scheme",e[e["chrome_recorder.start-recording"]=108]="chrome_recorder.start-recording",e[e["chrome_recorder.replay-recording"]=109]="chrome_recorder.replay-recording",e[e["chrome_recorder.toggle-code-view"]=110]="chrome_recorder.toggle-code-view",e[e["chrome_recorder.copy-recording-or-step"]=111]="chrome_recorder.copy-recording-or-step",e[e.MaxValue=112]="MaxValue"}(H||(H={})),function(e){e[e.ConsoleInfoBar=0]="ConsoleInfoBar",e[e.LearnMoreLinkCOEP=1]="LearnMoreLinkCOEP",e[e.StatusBarIssuesCounter=2]="StatusBarIssuesCounter",e[e.HamburgerMenu=3]="HamburgerMenu",e[e.Adorner=4]="Adorner",e[e.CommandMenu=5]="CommandMenu",e[e.MaxValue=6]="MaxValue"}(N||(N={})),function(e){e[e.applyCustomStylesheet=0]="applyCustomStylesheet",e[e.captureNodeCreationStacks=1]="captureNodeCreationStacks",e[e.sourcesPrettyPrint=2]="sourcesPrettyPrint",e[e.liveHeapProfile=11]="liveHeapProfile",e[e.protocolMonitor=13]="protocolMonitor",e[e.developerResourcesView=15]="developerResourcesView",e[e.samplingHeapProfilerTimeline=17]="samplingHeapProfilerTimeline",e[e.showOptionToExposeInternalsInHeapSnapshot=18]="showOptionToExposeInternalsInHeapSnapshot",e[e.sourceOrderViewer=20]="sourceOrderViewer",e[e.webauthnPane=22]="webauthnPane",e[e.timelineEventInitiators=24]="timelineEventInitiators",e[e.timelineInvalidationTracking=26]="timelineInvalidationTracking",e[e.timelineShowAllEvents=27]="timelineShowAllEvents",e[e.timelineV8RuntimeCallStats=28]="timelineV8RuntimeCallStats",e[e.wasmDWARFDebugging=31]="wasmDWARFDebugging",e[e.dualScreenSupport=32]="dualScreenSupport",e[e.keyboardShortcutEditor=35]="keyboardShortcutEditor",e[e.APCA=39]="APCA",e[e.cspViolationsView=40]="cspViolationsView",e[e.fontEditor=41]="fontEditor",e[e.fullAccessibilityTree=42]="fullAccessibilityTree",e[e.ignoreListJSFramesOnTimeline=43]="ignoreListJSFramesOnTimeline",e[e.contrastIssues=44]="contrastIssues",e[e.experimentalCookieFeatures=45]="experimentalCookieFeatures",e[e.cssTypeComponentLength=52]="cssTypeComponentLength",e[e.preciseChanges=53]="preciseChanges",e[e.bfcacheDisplayTree=54]="bfcacheDisplayTree",e[e.stylesPaneCSSChanges=55]="stylesPaneCSSChanges",e[e.headerOverrides=56]="headerOverrides",e[e.evaluateExpressionsWithSourceMaps=58]="evaluateExpressionsWithSourceMaps",e[e.eyedropperColorPicker=60]="eyedropperColorPicker",e[e.instrumentationBreakpoints=61]="instrumentationBreakpoints",e[e.authoredDeployedGrouping=63]="authoredDeployedGrouping",e[e.importantDOMProperties=64]="importantDOMProperties",e[e.justMyCode=65]="justMyCode",e[e.timelineAsConsoleProfileResultPanel=67]="timelineAsConsoleProfileResultPanel",e[e.preloadingStatusPanel=68]="preloadingStatusPanel",e[e.disableColorFormatSetting=69]="disableColorFormatSetting",e[e.outermostTargetSelector=71]="outermostTargetSelector",e[e.jsProfilerTemporarilyEnable=72]="jsProfilerTemporarilyEnable",e[e.highlightErrorsElementsPanel=73]="highlightErrorsElementsPanel",e[e.setAllBreakpointsEagerly=74]="setAllBreakpointsEagerly",e[e.MaxValue=75]="MaxValue"}(W||(W={})),function(e){e[e.CrossOriginEmbedderPolicy=0]="CrossOriginEmbedderPolicy",e[e.MixedContent=1]="MixedContent",e[e.Cookie=2]="Cookie",e[e.HeavyAd=3]="HeavyAd",e[e.ContentSecurityPolicy=4]="ContentSecurityPolicy",e[e.Other=5]="Other",e[e.Generic=6]="Generic",e[e.MaxValue=7]="MaxValue"}(_||(_={})),function(e){e[e.CrossOriginEmbedderPolicyRequest=0]="CrossOriginEmbedderPolicyRequest",e[e.CrossOriginEmbedderPolicyElement=1]="CrossOriginEmbedderPolicyElement",e[e.MixedContentRequest=2]="MixedContentRequest",e[e.SameSiteCookieCookie=3]="SameSiteCookieCookie",e[e.SameSiteCookieRequest=4]="SameSiteCookieRequest",e[e.HeavyAdElement=5]="HeavyAdElement",e[e.ContentSecurityPolicyDirective=6]="ContentSecurityPolicyDirective",e[e.ContentSecurityPolicyElement=7]="ContentSecurityPolicyElement",e[e.CrossOriginEmbedderPolicyLearnMore=8]="CrossOriginEmbedderPolicyLearnMore",e[e.MixedContentLearnMore=9]="MixedContentLearnMore",e[e.SameSiteCookieLearnMore=10]="SameSiteCookieLearnMore",e[e.HeavyAdLearnMore=11]="HeavyAdLearnMore",e[e.ContentSecurityPolicyLearnMore=12]="ContentSecurityPolicyLearnMore",e[e.MaxValue=13]="MaxValue"}(U||(U={})),function(e){e[e.MixedContentIssue=0]="MixedContentIssue",e[e["ContentSecurityPolicyIssue::kInlineViolation"]=1]="ContentSecurityPolicyIssue::kInlineViolation",e[e["ContentSecurityPolicyIssue::kEvalViolation"]=2]="ContentSecurityPolicyIssue::kEvalViolation",e[e["ContentSecurityPolicyIssue::kURLViolation"]=3]="ContentSecurityPolicyIssue::kURLViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesSinkViolation"]=4]="ContentSecurityPolicyIssue::kTrustedTypesSinkViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation"]=5]="ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation",e[e["HeavyAdIssue::NetworkTotalLimit"]=6]="HeavyAdIssue::NetworkTotalLimit",e[e["HeavyAdIssue::CpuTotalLimit"]=7]="HeavyAdIssue::CpuTotalLimit",e[e["HeavyAdIssue::CpuPeakLimit"]=8]="HeavyAdIssue::CpuPeakLimit",e[e["CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader"]=9]="CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader",e[e["CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage"]=10]="CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin"]=11]="CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep"]=12]="CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameSite"]=13]="CrossOriginEmbedderPolicyIssue::CorpNotSameSite",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie"]=14]="CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie"]=15]="CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::ReadCookie"]=16]="CookieIssue::WarnSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::SetCookie"]=17]="CookieIssue::WarnSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure"]=18]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure"]=19]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Secure"]=20]="CookieIssue::WarnCrossDowngrade::ReadCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure"]=21]="CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Secure"]=22]="CookieIssue::WarnCrossDowngrade::SetCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Insecure"]=23]="CookieIssue::WarnCrossDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Secure"]=24]="CookieIssue::ExcludeNavigationContextDowngrade::Secure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Insecure"]=25]="CookieIssue::ExcludeNavigationContextDowngrade::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure"]=26]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure"]=27]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Secure"]=28]="CookieIssue::ExcludeContextDowngrade::SetCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure"]=29]="CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie"]=30]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie"]=31]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie"]=32]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie"]=33]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie"]=34]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie"]=35]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie",e[e["SharedArrayBufferIssue::TransferIssue"]=36]="SharedArrayBufferIssue::TransferIssue",e[e["SharedArrayBufferIssue::CreationIssue"]=37]="SharedArrayBufferIssue::CreationIssue",e[e.LowTextContrastIssue=41]="LowTextContrastIssue",e[e["CorsIssue::InsecurePrivateNetwork"]=42]="CorsIssue::InsecurePrivateNetwork",e[e["CorsIssue::InvalidHeaders"]=44]="CorsIssue::InvalidHeaders",e[e["CorsIssue::WildcardOriginWithCredentials"]=45]="CorsIssue::WildcardOriginWithCredentials",e[e["CorsIssue::PreflightResponseInvalid"]=46]="CorsIssue::PreflightResponseInvalid",e[e["CorsIssue::OriginMismatch"]=47]="CorsIssue::OriginMismatch",e[e["CorsIssue::AllowCredentialsRequired"]=48]="CorsIssue::AllowCredentialsRequired",e[e["CorsIssue::MethodDisallowedByPreflightResponse"]=49]="CorsIssue::MethodDisallowedByPreflightResponse",e[e["CorsIssue::HeaderDisallowedByPreflightResponse"]=50]="CorsIssue::HeaderDisallowedByPreflightResponse",e[e["CorsIssue::RedirectContainsCredentials"]=51]="CorsIssue::RedirectContainsCredentials",e[e["CorsIssue::DisallowedByMode"]=52]="CorsIssue::DisallowedByMode",e[e["CorsIssue::CorsDisabledScheme"]=53]="CorsIssue::CorsDisabledScheme",e[e["CorsIssue::PreflightMissingAllowExternal"]=54]="CorsIssue::PreflightMissingAllowExternal",e[e["CorsIssue::PreflightInvalidAllowExternal"]=55]="CorsIssue::PreflightInvalidAllowExternal",e[e["CorsIssue::NoCorsRedirectModeNotFollow"]=57]="CorsIssue::NoCorsRedirectModeNotFollow",e[e["QuirksModeIssue::QuirksMode"]=58]="QuirksModeIssue::QuirksMode",e[e["QuirksModeIssue::LimitedQuirksMode"]=59]="QuirksModeIssue::LimitedQuirksMode",e[e.DeprecationIssue=60]="DeprecationIssue",e[e["ClientHintIssue::MetaTagAllowListInvalidOrigin"]=61]="ClientHintIssue::MetaTagAllowListInvalidOrigin",e[e["ClientHintIssue::MetaTagModifiedHTML"]=62]="ClientHintIssue::MetaTagModifiedHTML",e[e["CorsIssue::PreflightAllowPrivateNetworkError"]=63]="CorsIssue::PreflightAllowPrivateNetworkError",e[e["GenericIssue::CrossOriginPortalPostMessageError"]=64]="GenericIssue::CrossOriginPortalPostMessageError",e[e["GenericIssue::FormLabelForNameError"]=65]="GenericIssue::FormLabelForNameError",e[e["GenericIssue::FormDuplicateIdForInputError"]=66]="GenericIssue::FormDuplicateIdForInputError",e[e["GenericIssue::FormInputWithNoLabelError"]=67]="GenericIssue::FormInputWithNoLabelError",e[e["GenericIssue::FormAutocompleteAttributeEmptyError"]=68]="GenericIssue::FormAutocompleteAttributeEmptyError",e[e["GenericIssue::FormEmptyIdAndNameAttributesForInputError"]=69]="GenericIssue::FormEmptyIdAndNameAttributesForInputError",e[e["GenericIssue::FormAriaLabelledByToNonExistingId"]=70]="GenericIssue::FormAriaLabelledByToNonExistingId",e[e["GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError"]=71]="GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError",e[e["GenericIssue::FormLabelHasNeitherForNorNestedInput"]=72]="GenericIssue::FormLabelHasNeitherForNorNestedInput",e[e["GenericIssue::FormLabelForMatchesNonExistingIdError"]=73]="GenericIssue::FormLabelForMatchesNonExistingIdError",e[e["GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError"]=74]="GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError",e[e["GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError"]=75]="GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError",e[e["StylesheetLoadingIssue::LateImportRule"]=76]="StylesheetLoadingIssue::LateImportRule",e[e["StylesheetLoadingIssue::RequestFailed"]=77]="StylesheetLoadingIssue::RequestFailed",e[e.MaxValue=78]="MaxValue"}(B||(B={})),function(e){e[e.LoadThroughPageViaTarget=0]="LoadThroughPageViaTarget",e[e.LoadThroughPageViaFrame=1]="LoadThroughPageViaFrame",e[e.LoadThroughPageFailure=2]="LoadThroughPageFailure",e[e.LoadThroughPageFallback=3]="LoadThroughPageFallback",e[e.FallbackAfterFailure=4]="FallbackAfterFailure",e[e.FallbackPerOverride=5]="FallbackPerOverride",e[e.FallbackPerProtocol=6]="FallbackPerProtocol",e[e.FallbackFailure=7]="FallbackFailure",e[e.MaxValue=8]="MaxValue"}(j||(j={})),function(e){e[e.SchemeOther=0]="SchemeOther",e[e.SchemeUnknown=1]="SchemeUnknown",e[e.SchemeHttp=2]="SchemeHttp",e[e.SchemeHttps=3]="SchemeHttps",e[e.SchemeHttpLocalhost=4]="SchemeHttpLocalhost",e[e.SchemeHttpsLocalhost=5]="SchemeHttpsLocalhost",e[e.SchemeData=6]="SchemeData",e[e.SchemeFile=7]="SchemeFile",e[e.SchemeBlob=8]="SchemeBlob",e[e.MaxValue=9]="MaxValue"}(G||(G={})),function(e){e[e.ContextMenu=0]="ContextMenu",e[e.MemoryIcon=1]="MemoryIcon",e[e.MaxValue=2]="MaxValue"}(z||(z={})),function(e){e[e.DWARFInspectableAddress=0]="DWARFInspectableAddress",e[e.ArrayBuffer=1]="ArrayBuffer",e[e.DataView=2]="DataView",e[e.TypedArray=3]="TypedArray",e[e.WebAssemblyMemory=4]="WebAssemblyMemory",e[e.MaxValue=5]="MaxValue"}(q||(q={})),function(e){e[e.af=1]="af",e[e.am=2]="am",e[e.ar=3]="ar",e[e.as=4]="as",e[e.az=5]="az",e[e.be=6]="be",e[e.bg=7]="bg",e[e.bn=8]="bn",e[e.bs=9]="bs",e[e.ca=10]="ca",e[e.cs=11]="cs",e[e.cy=12]="cy",e[e.da=13]="da",e[e.de=14]="de",e[e.el=15]="el",e[e["en-GB"]=16]="en-GB",e[e["en-US"]=17]="en-US",e[e["es-419"]=18]="es-419",e[e.es=19]="es",e[e.et=20]="et",e[e.eu=21]="eu",e[e.fa=22]="fa",e[e.fi=23]="fi",e[e.fil=24]="fil",e[e["fr-CA"]=25]="fr-CA",e[e.fr=26]="fr",e[e.gl=27]="gl",e[e.gu=28]="gu",e[e.he=29]="he",e[e.hi=30]="hi",e[e.hr=31]="hr",e[e.hu=32]="hu",e[e.hy=33]="hy",e[e.id=34]="id",e[e.is=35]="is",e[e.it=36]="it",e[e.ja=37]="ja",e[e.ka=38]="ka",e[e.kk=39]="kk",e[e.km=40]="km",e[e.kn=41]="kn",e[e.ko=42]="ko",e[e.ky=43]="ky",e[e.lo=44]="lo",e[e.lt=45]="lt",e[e.lv=46]="lv",e[e.mk=47]="mk",e[e.ml=48]="ml",e[e.mn=49]="mn",e[e.mr=50]="mr",e[e.ms=51]="ms",e[e.my=52]="my",e[e.ne=53]="ne",e[e.nl=54]="nl",e[e.no=55]="no",e[e.or=56]="or",e[e.pa=57]="pa",e[e.pl=58]="pl",e[e["pt-PT"]=59]="pt-PT",e[e.pt=60]="pt",e[e.ro=61]="ro",e[e.ru=62]="ru",e[e.si=63]="si",e[e.sk=64]="sk",e[e.sl=65]="sl",e[e.sq=66]="sq",e[e["sr-Latn"]=67]="sr-Latn",e[e.sr=68]="sr",e[e.sv=69]="sv",e[e.sw=70]="sw",e[e.ta=71]="ta",e[e.te=72]="te",e[e.th=73]="th",e[e.tr=74]="tr",e[e.uk=75]="uk",e[e.ur=76]="ur",e[e.uz=77]="uz",e[e.vi=78]="vi",e[e.zh=79]="zh",e[e["zh-HK"]=80]="zh-HK",e[e["zh-TW"]=81]="zh-TW",e[e.zu=82]="zu",e[e.MaxValue=83]="MaxValue"}(J||(J={})),function(e){e[e.ChromeSyncDisabled=1]="ChromeSyncDisabled",e[e.ChromeSyncSettingsDisabled=2]="ChromeSyncSettingsDisabled",e[e.DevToolsSyncSettingDisabled=3]="DevToolsSyncSettingDisabled",e[e.DevToolsSyncSettingEnabled=4]="DevToolsSyncSettingEnabled",e[e.MaxValue=5]="MaxValue"}(K||(K={})),function(e){e[e.RecordingStarted=1]="RecordingStarted",e[e.RecordingFinished=2]="RecordingFinished",e[e.MaxValue=3]="MaxValue"}(Q||(Q={})),function(e){e[e.AssertionAdded=1]="AssertionAdded",e[e.PropertyAssertionEdited=2]="PropertyAssertionEdited",e[e.AttributeAssertionEdited=3]="AttributeAssertionEdited",e[e.MaxValue=4]="MaxValue"}(X||(X={})),function(e){e[e.Success=1]="Success",e[e.TimeoutErrorSelectors=2]="TimeoutErrorSelectors",e[e.TimeoutErrorTarget=3]="TimeoutErrorTarget",e[e.OtherError=4]="OtherError",e[e.MaxValue=5]="MaxValue"}(Z||(Z={})),function(e){e[e.Normal=1]="Normal",e[e.Slow=2]="Slow",e[e.VerySlow=3]="VerySlow",e[e.ExtremelySlow=4]="ExtremelySlow",e[e.MaxValue=5]="MaxValue"}($||($={})),function(e){e[e.ReplayOnly=1]="ReplayOnly",e[e.ReplayWithPerformanceTracing=2]="ReplayWithPerformanceTracing",e[e.ReplayViaExtension=3]="ReplayViaExtension",e[e.MaxValue=4]="MaxValue"}(Y||(Y={})),function(e){e[e.SelectorPickerUsed=1]="SelectorPickerUsed",e[e.StepAdded=2]="StepAdded",e[e.StepRemoved=3]="StepRemoved",e[e.SelectorAdded=4]="SelectorAdded",e[e.SelectorRemoved=5]="SelectorRemoved",e[e.SelectorPartAdded=6]="SelectorPartAdded",e[e.SelectorPartEdited=7]="SelectorPartEdited",e[e.SelectorPartRemoved=8]="SelectorPartRemoved",e[e.TypeChanged=9]="TypeChanged",e[e.OtherEditing=10]="OtherEditing",e[e.MaxValue=11]="MaxValue"}(ee||(ee={})),function(e){e[e.ToPuppeteer=1]="ToPuppeteer",e[e.ToJSON=2]="ToJSON",e[e.ToPuppeteerReplay=3]="ToPuppeteerReplay",e[e.ToExtension=4]="ToExtension",e[e.ToLighthouse=5]="ToLighthouse",e[e.MaxValue=6]="MaxValue"}(oe||(oe={})),function(e){e[e.CodeShown=1]="CodeShown",e[e.CodeHidden=2]="CodeHidden",e[e.MaxValue=3]="MaxValue"}(re||(re={})),function(e){e[e.CopiedRecordingWithPuppeteer=1]="CopiedRecordingWithPuppeteer",e[e.CopiedRecordingWithJSON=2]="CopiedRecordingWithJSON",e[e.CopiedRecordingWithReplay=3]="CopiedRecordingWithReplay",e[e.CopiedRecordingWithExtension=4]="CopiedRecordingWithExtension",e[e.CopiedStepWithPuppeteer=5]="CopiedStepWithPuppeteer",e[e.CopiedStepWithJSON=6]="CopiedStepWithJSON",e[e.CopiedStepWithReplay=7]="CopiedStepWithReplay",e[e.CopiedStepWithExtension=8]="CopiedStepWithExtension",e[e.MaxValue=9]="MaxValue"}(te||(te={})),function(e){e[e.false=0]="false",e[e.true=1]="true",e[e.MaxValue=2]="MaxValue"}(ne||(ne={})),function(e){e[e.DeclarationViaChangedLine=1]="DeclarationViaChangedLine",e[e.AllChangesViaStylesPane=2]="AllChangesViaStylesPane",e[e.DeclarationViaContextMenu=3]="DeclarationViaContextMenu",e[e.PropertyViaContextMenu=4]="PropertyViaContextMenu",e[e.ValueViaContextMenu=5]="ValueViaContextMenu",e[e.DeclarationAsJSViaContextMenu=6]="DeclarationAsJSViaContextMenu",e[e.RuleViaContextMenu=7]="RuleViaContextMenu",e[e.AllDeclarationsViaContextMenu=8]="AllDeclarationsViaContextMenu",e[e.AllDeclarationsAsJSViaContextMenu=9]="AllDeclarationsAsJSViaContextMenu",e[e.SelectorViaContextMenu=10]="SelectorViaContextMenu",e[e.MaxValue=11]="MaxValue"}(ie||(ie={})),function(e){e[e.OtherSection=0]="OtherSection",e[e.Identity=1]="Identity",e[e.Presentation=2]="Presentation",e[e["Protocol Handlers"]=3]="Protocol Handlers",e[e.Icons=4]="Icons",e[e["Window Controls Overlay"]=5]="Window Controls Overlay",e[e.MaxValue=6]="MaxValue"}(se||(se={})),function(e){e[e.Other=0]="Other",e[e.AlignContent=1]="AlignContent",e[e.FlexItem=2]="FlexItem",e[e.FlexContainer=3]="FlexContainer",e[e.GridContainer=4]="GridContainer",e[e.GridItem=5]="GridItem",e[e.FlexGrid=6]="FlexGrid",e[e.MulticolFlexGrid=7]="MulticolFlexGrid",e[e.Padding=8]="Padding",e[e.Position=9]="Position",e[e.ZIndex=10]="ZIndex",e[e.Sizing=11]="Sizing",e[e.FlexOrGridItem=12]="FlexOrGridItem",e[e.FontVariationSettings=13]="FontVariationSettings",e[e.MaxValue=14]="MaxValue"}(ae||(ae={})),function(e){e[e.Navigation=0]="Navigation",e[e.Timespan=1]="Timespan",e[e.Snapshot=2]="Snapshot",e[e.LegacyNavigation=3]="LegacyNavigation",e[e.MaxValue=4]="MaxValue"}(de||(de={}));var ue=Object.freeze({__proto__:null,UserMetrics:ce,get Action(){return F},get PanelCodes(){return D},get ElementsSidebarTabCodes(){return L},get SourcesSidebarTabCodes(){return A},get MediaTypes(){return V},get KeybindSetSettings(){return O},get KeyboardShortcutAction(){return H},get IssueOpener(){return N},get DevtoolsExperiments(){return W},get IssueExpanded(){return _},get IssueResourceOpened(){return U},get IssueCreated(){return B},get DeveloperResourceLoaded(){return j},get DeveloperResourceScheme(){return G},get LinearMemoryInspectorRevealedFrom(){return z},get LinearMemoryInspectorTarget(){return q},get Language(){return J},get SyncSetting(){return K},get RecordingToggled(){return Q},get RecordingAssertion(){return X},get RecordingReplayFinished(){return Z},get RecordingReplaySpeed(){return $},get RecordingReplayStarted(){return Y},get RecordingEdited(){return ee},get RecordingExported(){return oe},get RecordingCodeToggled(){return re},get RecordingCopiedToClipboard(){return te},get ConsoleShowsCorsErrors(){return ne},get StyleTextCopied(){return ie},get ManifestSectionCodes(){return se},get CSSHintType(){return ae},get LighthouseModeRun(){return de}});const me=new ce;export{w as InspectorFrontendHost,a as InspectorFrontendHostAPI,le as Platform,C as ResourceLoader,ue as UserMetrics,me as userMetrics}; +import*as e from"../common/common.js";import*as o from"../i18n/i18n.js";import*as r from"../platform/platform.js";import*as t from"../root/root.js";var n;!function(e){e.AppendedToURL="appendedToURL",e.CanceledSaveURL="canceledSaveURL",e.ContextMenuCleared="contextMenuCleared",e.ContextMenuItemSelected="contextMenuItemSelected",e.DeviceCountUpdated="deviceCountUpdated",e.DevicesDiscoveryConfigChanged="devicesDiscoveryConfigChanged",e.DevicesPortForwardingStatusChanged="devicesPortForwardingStatusChanged",e.DevicesUpdated="devicesUpdated",e.DispatchMessage="dispatchMessage",e.DispatchMessageChunk="dispatchMessageChunk",e.EnterInspectElementMode="enterInspectElementMode",e.EyeDropperPickedColor="eyeDropperPickedColor",e.FileSystemsLoaded="fileSystemsLoaded",e.FileSystemRemoved="fileSystemRemoved",e.FileSystemAdded="fileSystemAdded",e.FileSystemFilesChangedAddedRemoved="FileSystemFilesChangedAddedRemoved",e.IndexingTotalWorkCalculated="indexingTotalWorkCalculated",e.IndexingWorked="indexingWorked",e.IndexingDone="indexingDone",e.KeyEventUnhandled="keyEventUnhandled",e.ReattachRootTarget="reattachMainTarget",e.ReloadInspectedPage="reloadInspectedPage",e.RevealSourceLine="revealSourceLine",e.SavedURL="savedURL",e.SearchCompleted="searchCompleted",e.SetInspectedTabId="setInspectedTabId",e.SetUseSoftMenu="setUseSoftMenu",e.ShowPanel="showPanel"}(n||(n={}));const i=[[n.AppendedToURL,"appendedToURL",["url"]],[n.CanceledSaveURL,"canceledSaveURL",["url"]],[n.ContextMenuCleared,"contextMenuCleared",[]],[n.ContextMenuItemSelected,"contextMenuItemSelected",["id"]],[n.DeviceCountUpdated,"deviceCountUpdated",["count"]],[n.DevicesDiscoveryConfigChanged,"devicesDiscoveryConfigChanged",["config"]],[n.DevicesPortForwardingStatusChanged,"devicesPortForwardingStatusChanged",["status"]],[n.DevicesUpdated,"devicesUpdated",["devices"]],[n.DispatchMessage,"dispatchMessage",["messageObject"]],[n.DispatchMessageChunk,"dispatchMessageChunk",["messageChunk","messageSize"]],[n.EnterInspectElementMode,"enterInspectElementMode",[]],[n.EyeDropperPickedColor,"eyeDropperPickedColor",["color"]],[n.FileSystemsLoaded,"fileSystemsLoaded",["fileSystems"]],[n.FileSystemRemoved,"fileSystemRemoved",["fileSystemPath"]],[n.FileSystemAdded,"fileSystemAdded",["errorMessage","fileSystem"]],[n.FileSystemFilesChangedAddedRemoved,"fileSystemFilesChangedAddedRemoved",["changed","added","removed"]],[n.IndexingTotalWorkCalculated,"indexingTotalWorkCalculated",["requestId","fileSystemPath","totalWork"]],[n.IndexingWorked,"indexingWorked",["requestId","fileSystemPath","worked"]],[n.IndexingDone,"indexingDone",["requestId","fileSystemPath"]],[n.KeyEventUnhandled,"keyEventUnhandled",["event"]],[n.ReattachRootTarget,"reattachMainTarget",[]],[n.ReloadInspectedPage,"reloadInspectedPage",["hard"]],[n.RevealSourceLine,"revealSourceLine",["url","lineNumber","columnNumber"]],[n.SavedURL,"savedURL",["url","fileSystemPath"]],[n.SearchCompleted,"searchCompleted",["requestId","fileSystemPath","files"]],[n.SetInspectedTabId,"setInspectedTabId",["tabId"]],[n.SetUseSoftMenu,"setUseSoftMenu",["useSoftMenu"]],[n.ShowPanel,"showPanel",["panelName"]]];var s;!function(e){e.ActionTaken="DevTools.ActionTaken",e.BreakpointWithConditionAdded="DevTools.BreakpointWithConditionAdded",e.BreakpointEditDialogRevealedFrom="DevTools.BreakpointEditDialogRevealedFrom",e.PanelClosed="DevTools.PanelClosed",e.PanelShown="DevTools.PanelShown",e.SidebarPaneShown="DevTools.SidebarPaneShown",e.KeyboardShortcutFired="DevTools.KeyboardShortcutFired",e.IssueCreated="DevTools.IssueCreated",e.IssuesPanelIssueExpanded="DevTools.IssuesPanelIssueExpanded",e.IssuesPanelOpenedFrom="DevTools.IssuesPanelOpenedFrom",e.IssuesPanelResourceOpened="DevTools.IssuesPanelResourceOpened",e.KeybindSetSettingChanged="DevTools.KeybindSetSettingChanged",e.ElementsSidebarTabShown="DevTools.Elements.SidebarTabShown",e.ExperimentEnabledAtLaunch="DevTools.ExperimentEnabledAtLaunch",e.ExperimentEnabled="DevTools.ExperimentEnabled",e.ExperimentDisabled="DevTools.ExperimentDisabled",e.DeveloperResourceLoaded="DevTools.DeveloperResourceLoaded",e.DeveloperResourceScheme="DevTools.DeveloperResourceScheme",e.LinearMemoryInspectorRevealedFrom="DevTools.LinearMemoryInspector.RevealedFrom",e.LinearMemoryInspectorTarget="DevTools.LinearMemoryInspector.Target",e.Language="DevTools.Language",e.SyncSetting="DevTools.SyncSetting",e.RecordingAssertion="DevTools.RecordingAssertion",e.RecordingCodeToggled="DevTools.RecordingCodeToggled",e.RecordingCopiedToClipboard="DevTools.RecordingCopiedToClipboard",e.RecordingEdited="DevTools.RecordingEdited",e.RecordingExported="DevTools.RecordingExported",e.RecordingReplayFinished="DevTools.RecordingReplayFinished",e.RecordingReplaySpeed="DevTools.RecordingReplaySpeed",e.RecordingReplayStarted="DevTools.RecordingReplayStarted",e.RecordingToggled="DevTools.RecordingToggled",e.SourcesSidebarTabShown="DevTools.Sources.SidebarTabShown",e.SourcesPanelFileDebugged="DevTools.SourcesPanelFileDebugged",e.SourcesPanelFileOpened="DevTools.SourcesPanelFileOpened",e.NetworkPanelResponsePreviewOpened="DevTools.NetworkPanelResponsePreviewOpened",e.StyleTextCopied="DevTools.StyleTextCopied",e.ManifestSectionSelected="DevTools.ManifestSectionSelected",e.CSSHintShown="DevTools.CSSHintShown",e.LighthouseModeRun="DevTools.LighthouseModeRun",e.ColorConvertedFrom="DevTools.ColorConvertedFrom",e.ColorPickerOpenedFrom="DevTools.ColorPickerOpenedFrom",e.CSSPropertyDocumentation="DevTools.CSSPropertyDocumentation",e.InlineScriptParsed="DevTools.InlineScriptParsed",e.VMInlineScriptTypeShown="DevTools.VMInlineScriptShown",e.BreakpointsRestoredFromStorageCount="DevTools.BreakpointsRestoredFromStorageCount",e.SwatchActivated="DevTools.SwatchActivated",e.BadgeActivated="DevTools.BadgeActivated"}(s||(s={}));var a=Object.freeze({__proto__:null,get Events(){return n},EventDescriptors:i,get EnumeratedHistogram(){return s}});const d={systemError:"System error",connectionError:"Connection error",certificateError:"Certificate error",httpError:"HTTP error",cacheError:"Cache error",signedExchangeError:"Signed Exchange error",ftpError:"FTP error",certificateManagerError:"Certificate manager error",dnsResolverError:"DNS resolver error",unknownError:"Unknown error",httpErrorStatusCodeSS:"HTTP error: status code {PH1}, {PH2}",invalidUrl:"Invalid URL",decodingDataUrlFailed:"Decoding Data URL failed"},l=o.i18n.registerUIStrings("core/host/ResourceLoader.ts",d),c=o.i18n.getLocalizedString.bind(void 0,l);let u=0;const m={},g=function(e,o){m[e].write(o)};let p=function(o,r,t,n){const i=new e.StringOutputStream.StringOutputStream;h(o,r,i,(function(e,o,r){t(e,o,i.data(),r)}),n)};function S(e,o,r){if(void 0===e||void 0===r)return null;if(0!==e){if(function(e){return e<=-300&&e>-400}(e))return c(d.httpErrorStatusCodeSS,{PH1:String(o),PH2:r});const t=function(e){return c(e>-100?d.systemError:e>-200?d.connectionError:e>-300?d.certificateError:e>-400?d.httpError:e>-500?d.cacheError:e>-600?d.signedExchangeError:e>-700?d.ftpError:e>-800?d.certificateManagerError:e>-900?d.dnsResolverError:d.unknownError)}(e);return`${t}: ${r}`}return null}const h=function(o,r,t,n,i){const s=function(e){return m[++u]=e,u}(t);if(new e.ParsedURL.ParsedURL(o).isDataURL())return void(e=>new Promise(((o,r)=>{const t=new XMLHttpRequest;t.withCredentials=!1,t.open("GET",e,!0),t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.DONE){if(200!==t.status)return t.onreadystatechange=null,void r(new Error(String(t.status)));t.onreadystatechange=null,o(t.responseText)}},t.send(null)})))(o).then((function(e){g(s,e),l({statusCode:200})})).catch((function(e){l({statusCode:404,messageOverride:c(d.decodingDataUrlFailed)})}));if(!i&&function(e){try{const o=new URL(e);return"file:"===o.protocol&&""!==o.host}catch(e){return!1}}(o))return void(n&&n(!1,{},{statusCode:400,netError:-20,netErrorName:"net::BLOCKED_BY_CLIENT",message:"Loading from a remote file path is prohibited for security reasons."}));const a=[];if(r)for(const e in r)a.push(e+": "+r[e]);function l(e){if(n){const{success:o,description:r}=function(e){const{statusCode:o,netError:r,netErrorName:t,urlValid:n,messageOverride:i}=e;let s="";const a=o>=200&&o<300;if("string"==typeof i)s=i;else if(!a)if(void 0===r)s=c(!1===n?d.invalidUrl:d.unknownError);else{const e=S(r,o,t);e&&(s=e)}return console.assert(a===(0===s.length)),{success:a,description:{statusCode:o,netError:r,netErrorName:t,urlValid:n,message:s}}}(e);n(o,e.headers||{},r)}var o;m[o=s].close(),delete m[o]}f.loadNetworkResource(o,a.join("\r\n"),s,l)};var C=Object.freeze({__proto__:null,ResourceLoader:{},streamWrite:g,get load(){return p},setLoadForTest:function(e){p=e},netErrorToMessage:S,loadAsStream:h});const v={devtoolsS:"DevTools - {PH1}"},y=o.i18n.registerUIStrings("core/host/InspectorFrontendHost.ts",v),k=o.i18n.getLocalizedString.bind(void 0,y);class x{#e;events;#o=null;recordedCountHistograms=[];recordedEnumeratedHistograms=[];recordedPerformanceHistograms=[];constructor(){function e(e){!("mac"===this.platform()?e.metaKey:e.ctrlKey)||"+"!==e.key&&"-"!==e.key||e.stopPropagation()}this.#e=new Map,"undefined"!=typeof document&&document.addEventListener("keydown",(o=>{e.call(this,o)}),!0)}platform(){const e=navigator.userAgent;return e.includes("Windows NT")?"windows":e.includes("Mac OS X")?"mac":"linux"}loadCompleted(){}bringToFront(){}closeWindow(){}setIsDocked(e,o){window.setTimeout(o,0)}showSurvey(e,o){window.setTimeout((()=>o({surveyShown:!1})),0)}canShowSurvey(e,o){window.setTimeout((()=>o({canShowSurvey:!1})),0)}setInspectedPageBounds(e){}inspectElementCompleted(){}setInjectedScriptForOrigin(e,o){}inspectedURLChanged(e){document.title=k(v.devtoolsS,{PH1:e.replace(/^https?:\/\//,"")})}copyText(e){null!=e&&navigator.clipboard.writeText(e)}openInNewTab(e){window.open(e,"_blank")}showItemInFolder(o){e.Console.Console.instance().error("Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect")}save(e,o,r){let t=this.#e.get(e);t||(t=[],this.#e.set(e,t)),t.push(o),this.events.dispatchEventToListeners(n.SavedURL,{url:e,fileSystemPath:e})}append(e,o){const r=this.#e.get(e);r&&(r.push(o),this.events.dispatchEventToListeners(n.AppendedToURL,e))}close(e){const o=this.#e.get(e)||[];this.#e.delete(e);let t="";if(e)try{const o=r.StringUtilities.trimURL(e);t=r.StringUtilities.removeURLFragment(o)}catch(o){t=e}const n=document.createElement("a");n.download=t;const i=new Blob([o.join("")],{type:"text/plain"}),s=URL.createObjectURL(i);n.href=s,n.click(),URL.revokeObjectURL(s)}sendMessageToBackend(e){}recordCountHistogram(e,o,r,t,n){this.recordedCountHistograms.length>=100&&this.recordedCountHistograms.shift(),this.recordedCountHistograms.push({histogramName:e,sample:o,min:r,exclusiveMax:t,bucketSize:n})}recordEnumeratedHistogram(e,o,r){this.recordedEnumeratedHistograms.length>=100&&this.recordedEnumeratedHistograms.shift(),this.recordedEnumeratedHistograms.push({actionName:e,actionCode:o})}recordPerformanceHistogram(e,o){this.recordedPerformanceHistograms.length>=100&&this.recordedPerformanceHistograms.shift(),this.recordedPerformanceHistograms.push({histogramName:e,duration:o})}recordUserMetricsAction(e){}requestFileSystems(){this.events.dispatchEventToListeners(n.FileSystemsLoaded,[])}addFileSystem(e){window.webkitRequestFileSystem(window.TEMPORARY,1048576,(e=>{this.#o=e;const o={fileSystemName:"sandboxedRequestedFileSystem",fileSystemPath:"/overrides",rootURL:"filesystem:devtools://devtools/isolated/",type:"overrides"};this.events.dispatchEventToListeners(n.FileSystemAdded,{fileSystem:o})}))}removeFileSystem(e){const o=e=>{e.forEach((e=>{e.isDirectory?e.removeRecursively((()=>{})):e.isFile&&e.remove((()=>{}))}))};this.#o&&this.#o.root.createReader().readEntries(o),this.#o=null,this.events.dispatchEventToListeners(n.FileSystemRemoved,"/overrides")}isolatedFileSystem(e,o){return this.#o}loadNetworkResource(e,o,r,t){fetch(e).then((async e=>{const o=await e.arrayBuffer();let r=o;if(function(e){const o=new Uint8Array(e);return!(!o||o.length<3)&&31===o[0]&&139===o[1]&&8===o[2]}(o)){const e=new DecompressionStream("gzip"),t=e.writable.getWriter();t.write(o),t.close(),r=e.readable}return await new Response(r).text()})).then((function(e){g(r,e),t({statusCode:200,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})})).catch((function(){t({statusCode:404,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})}))}registerPreference(e,o){}getPreferences(e){const o={};for(const e in window.localStorage)o[e]=window.localStorage[e];e(o)}getPreference(e,o){o(window.localStorage[e])}setPreference(e,o){window.localStorage[e]=o}removePreference(e){delete window.localStorage[e]}clearPreferences(){window.localStorage.clear()}getSyncInformation(e){e({isSyncActive:!1,arePreferencesSynced:!1})}upgradeDraggedFileSystemPermissions(e){}indexPath(e,o,r){}stopIndexing(e){}searchInPath(e,o,r){}zoomFactor(){return 1}zoomIn(){}zoomOut(){}resetZoom(){}setWhitelistedShortcuts(e){}setEyeDropperActive(e){}showCertificateViewer(e){}reattach(e){e()}readyForTest(){}connectionReady(){}setOpenNewWindowForPopups(e){}setDevicesDiscoveryConfig(e){}setDevicesUpdatesEnabled(e){}performActionOnRemotePage(e,o){}openRemotePage(e,o){}openNodeFrontend(){}showContextMenuAtPoint(e,o,r,t){throw"Soft context menu should be used"}isHostedMode(){return!0}setAddExtensionCallback(e){}async initialTargetId(){return null}}let f=globalThis.InspectorFrontendHost;class I{constructor(){for(const e of i)this[e[1]]=this.dispatch.bind(this,e[0],e[2],e[3])}dispatch(e,o,r,...t){if(o.length<2){try{f.events.dispatchEventToListeners(e,t[0])}catch(e){console.error(e+" "+e.stack)}return}const n={};for(let e=0;e=2||f.recordEnumeratedHistogram(s.BreakpointWithConditionAdded,e,2)}breakpointEditDialogRevealedFrom(e){e>=7||f.recordEnumeratedHistogram(s.BreakpointEditDialogRevealedFrom,e,7)}panelShown(e){const o=D[e]||0;f.recordEnumeratedHistogram(s.PanelShown,o,D.MaxValue),f.recordUserMetricsAction("DevTools_PanelShown_"+e),this.#r=!0}panelClosed(e){const o=D[e]||0;f.recordEnumeratedHistogram(s.PanelClosed,o,D.MaxValue),this.#r=!0}elementsSidebarTabShown(e){const o=L[e]||0;f.recordEnumeratedHistogram(s.ElementsSidebarTabShown,o,L.MaxValue)}sourcesSidebarTabShown(e){const o=A[e]||0;f.recordEnumeratedHistogram(s.SourcesSidebarTabShown,o,A.MaxValue)}settingsPanelShown(e){this.panelShown("settings-"+e)}sourcesPanelFileDebugged(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.SourcesPanelFileDebugged,o,V.MaxValue)}sourcesPanelFileOpened(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.SourcesPanelFileOpened,o,V.MaxValue)}networkPanelResponsePreviewOpened(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.NetworkPanelResponsePreviewOpened,o,V.MaxValue)}actionTaken(e){f.recordEnumeratedHistogram(s.ActionTaken,e,F.MaxValue)}panelLoaded(e,o){this.#t||e!==this.#n||(this.#t=!0,requestAnimationFrame((()=>{window.setTimeout((()=>{performance.mark(o),this.#r||f.recordPerformanceHistogram(o,performance.now())}),0)})))}setLaunchPanel(e){this.#n=e}keybindSetSettingChanged(e){const o=O[e]||0;f.recordEnumeratedHistogram(s.KeybindSetSettingChanged,o,O.MaxValue)}keyboardShortcutFired(e){const o=H[e]||H.OtherShortcut;f.recordEnumeratedHistogram(s.KeyboardShortcutFired,o,H.MaxValue)}issuesPanelOpenedFrom(e){f.recordEnumeratedHistogram(s.IssuesPanelOpenedFrom,e,N.MaxValue)}issuesPanelIssueExpanded(e){if(void 0===e)return;const o=_[e];void 0!==o&&f.recordEnumeratedHistogram(s.IssuesPanelIssueExpanded,o,_.MaxValue)}issuesPanelResourceOpened(e,o){const r=U[e+o];void 0!==r&&f.recordEnumeratedHistogram(s.IssuesPanelResourceOpened,r,U.MaxValue)}issueCreated(e){const o=B[e];void 0!==o&&f.recordEnumeratedHistogram(s.IssueCreated,o,B.MaxValue)}experimentEnabledAtLaunch(e){const o=W[e];void 0!==o&&f.recordEnumeratedHistogram(s.ExperimentEnabledAtLaunch,o,W.MaxValue)}experimentChanged(e,o){const r=W[e];if(void 0===r)return;const t=o?s.ExperimentEnabled:s.ExperimentDisabled;f.recordEnumeratedHistogram(t,r,W.MaxValue)}developerResourceLoaded(e){e>=j.MaxValue||f.recordEnumeratedHistogram(s.DeveloperResourceLoaded,e,j.MaxValue)}developerResourceScheme(e){e>=G.MaxValue||f.recordEnumeratedHistogram(s.DeveloperResourceScheme,e,G.MaxValue)}inlineScriptParsed(e){e>=2||f.recordEnumeratedHistogram(s.InlineScriptParsed,e,2)}vmInlineScriptContentShown(e){e>=2||f.recordEnumeratedHistogram(s.VMInlineScriptTypeShown,e,2)}linearMemoryInspectorRevealedFrom(e){e>=z.MaxValue||f.recordEnumeratedHistogram(s.LinearMemoryInspectorRevealedFrom,e,z.MaxValue)}linearMemoryInspectorTarget(e){e>=q.MaxValue||f.recordEnumeratedHistogram(s.LinearMemoryInspectorTarget,e,q.MaxValue)}language(e){const o=J[e];void 0!==o&&f.recordEnumeratedHistogram(s.Language,o,J.MaxValue)}syncSetting(e){f.getSyncInformation((o=>{let r=K.ChromeSyncDisabled;o.isSyncActive&&!o.arePreferencesSynced?r=K.ChromeSyncSettingsDisabled:o.isSyncActive&&o.arePreferencesSynced&&(r=e?K.DevToolsSyncSettingEnabled:K.DevToolsSyncSettingDisabled),f.recordEnumeratedHistogram(s.SyncSetting,r,K.MaxValue)}))}recordingAssertion(e){f.recordEnumeratedHistogram(s.RecordingAssertion,e,X.MaxValue)}recordingToggled(e){f.recordEnumeratedHistogram(s.RecordingToggled,e,Q.MaxValue)}recordingReplayFinished(e){f.recordEnumeratedHistogram(s.RecordingReplayFinished,e,Z.MaxValue)}recordingReplaySpeed(e){f.recordEnumeratedHistogram(s.RecordingReplaySpeed,e,$.MaxValue)}recordingReplayStarted(e){f.recordEnumeratedHistogram(s.RecordingReplayStarted,e,Y.MaxValue)}recordingEdited(e){f.recordEnumeratedHistogram(s.RecordingEdited,e,ee.MaxValue)}recordingExported(e){f.recordEnumeratedHistogram(s.RecordingExported,e,oe.MaxValue)}recordingCodeToggled(e){f.recordEnumeratedHistogram(s.RecordingCodeToggled,e,re.MaxValue)}recordingCopiedToClipboard(e){f.recordEnumeratedHistogram(s.RecordingCopiedToClipboard,e,te.MaxValue)}styleTextCopied(e){f.recordEnumeratedHistogram(s.StyleTextCopied,e,ie.MaxValue)}manifestSectionSelected(e){const o=se[e]||se.OtherSection;f.recordEnumeratedHistogram(s.ManifestSectionSelected,o,se.MaxValue)}cssHintShown(e){f.recordEnumeratedHistogram(s.CSSHintShown,e,ae.MaxValue)}lighthouseModeRun(e){f.recordEnumeratedHistogram(s.LighthouseModeRun,e,de.MaxValue)}colorConvertedFrom(e){f.recordEnumeratedHistogram(s.ColorConvertedFrom,e,2)}colorPickerOpenedFrom(e){f.recordEnumeratedHistogram(s.ColorPickerOpenedFrom,e,2)}cssPropertyDocumentation(e){f.recordEnumeratedHistogram(s.CSSPropertyDocumentation,e,3)}swatchActivated(e){f.recordEnumeratedHistogram(s.SwatchActivated,e,10)}badgeActivated(e){f.recordEnumeratedHistogram(s.BadgeActivated,e,9)}breakpointsRestoredFromStorage(e){const o=this.#i(e);f.recordEnumeratedHistogram(s.BreakpointsRestoredFromStorageCount,o,10)}#i(e){return e<100?0:e<300?1:e<1e3?2:e<3e3?3:e<1e4?4:e<3e4?5:e<1e5?6:e<3e5?7:e<1e6?8:9}workspacesPopulated(e){f.recordPerformanceHistogram("DevTools.Workspaces.PopulateWallClocktime",e)}workspacesNumberOfFiles(e,o){f.recordCountHistogram("DevTools.Workspaces.NumberOfFilesLoaded",e,0,1e5,100),f.recordCountHistogram("DevTools.Workspaces.NumberOfDirectoriesTraversed",o,0,1e4,100)}}!function(e){e[e.WindowDocked=1]="WindowDocked",e[e.WindowUndocked=2]="WindowUndocked",e[e.ScriptsBreakpointSet=3]="ScriptsBreakpointSet",e[e.TimelineStarted=4]="TimelineStarted",e[e.ProfilesCPUProfileTaken=5]="ProfilesCPUProfileTaken",e[e.ProfilesHeapProfileTaken=6]="ProfilesHeapProfileTaken",e[e.ConsoleEvaluated=8]="ConsoleEvaluated",e[e.FileSavedInWorkspace=9]="FileSavedInWorkspace",e[e.DeviceModeEnabled=10]="DeviceModeEnabled",e[e.AnimationsPlaybackRateChanged=11]="AnimationsPlaybackRateChanged",e[e.RevisionApplied=12]="RevisionApplied",e[e.FileSystemDirectoryContentReceived=13]="FileSystemDirectoryContentReceived",e[e.StyleRuleEdited=14]="StyleRuleEdited",e[e.CommandEvaluatedInConsolePanel=15]="CommandEvaluatedInConsolePanel",e[e.DOMPropertiesExpanded=16]="DOMPropertiesExpanded",e[e.ResizedViewInResponsiveMode=17]="ResizedViewInResponsiveMode",e[e.TimelinePageReloadStarted=18]="TimelinePageReloadStarted",e[e.ConnectToNodeJSFromFrontend=19]="ConnectToNodeJSFromFrontend",e[e.ConnectToNodeJSDirectly=20]="ConnectToNodeJSDirectly",e[e.CpuThrottlingEnabled=21]="CpuThrottlingEnabled",e[e.CpuProfileNodeFocused=22]="CpuProfileNodeFocused",e[e.CpuProfileNodeExcluded=23]="CpuProfileNodeExcluded",e[e.SelectFileFromFilePicker=24]="SelectFileFromFilePicker",e[e.SelectCommandFromCommandMenu=25]="SelectCommandFromCommandMenu",e[e.ChangeInspectedNodeInElementsPanel=26]="ChangeInspectedNodeInElementsPanel",e[e.StyleRuleCopied=27]="StyleRuleCopied",e[e.CoverageStarted=28]="CoverageStarted",e[e.LighthouseStarted=29]="LighthouseStarted",e[e.LighthouseFinished=30]="LighthouseFinished",e[e.ShowedThirdPartyBadges=31]="ShowedThirdPartyBadges",e[e.LighthouseViewTrace=32]="LighthouseViewTrace",e[e.FilmStripStartedRecording=33]="FilmStripStartedRecording",e[e.CoverageReportFiltered=34]="CoverageReportFiltered",e[e.CoverageStartedPerBlock=35]="CoverageStartedPerBlock",e[e["SettingsOpenedFromGear-deprecated"]=36]="SettingsOpenedFromGear-deprecated",e[e["SettingsOpenedFromMenu-deprecated"]=37]="SettingsOpenedFromMenu-deprecated",e[e["SettingsOpenedFromCommandMenu-deprecated"]=38]="SettingsOpenedFromCommandMenu-deprecated",e[e.TabMovedToDrawer=39]="TabMovedToDrawer",e[e.TabMovedToMainPanel=40]="TabMovedToMainPanel",e[e.CaptureCssOverviewClicked=41]="CaptureCssOverviewClicked",e[e.VirtualAuthenticatorEnvironmentEnabled=42]="VirtualAuthenticatorEnvironmentEnabled",e[e.SourceOrderViewActivated=43]="SourceOrderViewActivated",e[e.UserShortcutAdded=44]="UserShortcutAdded",e[e.ShortcutRemoved=45]="ShortcutRemoved",e[e.ShortcutModified=46]="ShortcutModified",e[e.CustomPropertyLinkClicked=47]="CustomPropertyLinkClicked",e[e.CustomPropertyEdited=48]="CustomPropertyEdited",e[e.ServiceWorkerNetworkRequestClicked=49]="ServiceWorkerNetworkRequestClicked",e[e.ServiceWorkerNetworkRequestClosedQuickly=50]="ServiceWorkerNetworkRequestClosedQuickly",e[e.NetworkPanelServiceWorkerRespondWith=51]="NetworkPanelServiceWorkerRespondWith",e[e.NetworkPanelCopyValue=52]="NetworkPanelCopyValue",e[e.ConsoleSidebarOpened=53]="ConsoleSidebarOpened",e[e.PerfPanelTraceImported=54]="PerfPanelTraceImported",e[e.PerfPanelTraceExported=55]="PerfPanelTraceExported",e[e.StackFrameRestarted=56]="StackFrameRestarted",e[e.CaptureTestProtocolClicked=57]="CaptureTestProtocolClicked",e[e.BreakpointRemovedFromRemoveButton=58]="BreakpointRemovedFromRemoveButton",e[e.BreakpointGroupExpandedStateChanged=59]="BreakpointGroupExpandedStateChanged",e[e.HeaderOverrideFileCreated=60]="HeaderOverrideFileCreated",e[e.HeaderOverrideEnableEditingClicked=61]="HeaderOverrideEnableEditingClicked",e[e.HeaderOverrideHeaderAdded=62]="HeaderOverrideHeaderAdded",e[e.HeaderOverrideHeaderEdited=63]="HeaderOverrideHeaderEdited",e[e.HeaderOverrideHeaderRemoved=64]="HeaderOverrideHeaderRemoved",e[e.HeaderOverrideHeadersFileEdited=65]="HeaderOverrideHeadersFileEdited",e[e.PersistenceNetworkOverridesEnabled=66]="PersistenceNetworkOverridesEnabled",e[e.PersistenceNetworkOverridesDisabled=67]="PersistenceNetworkOverridesDisabled",e[e.BreakpointRemovedFromContextMenu=68]="BreakpointRemovedFromContextMenu",e[e.BreakpointsInFileRemovedFromRemoveButton=69]="BreakpointsInFileRemovedFromRemoveButton",e[e.BreakpointsInFileRemovedFromContextMenu=70]="BreakpointsInFileRemovedFromContextMenu",e[e.BreakpointsInFileCheckboxToggled=71]="BreakpointsInFileCheckboxToggled",e[e.BreakpointsInFileEnabledDisabledFromContextMenu=72]="BreakpointsInFileEnabledDisabledFromContextMenu",e[e.BreakpointConditionEditedFromSidebar=73]="BreakpointConditionEditedFromSidebar",e[e.AddFileSystemToWorkspace=74]="AddFileSystemToWorkspace",e[e.RemoveFileSystemFromWorkspace=75]="RemoveFileSystemFromWorkspace",e[e.AddFileSystemForOverrides=76]="AddFileSystemForOverrides",e[e.RemoveFileSystemForOverrides=77]="RemoveFileSystemForOverrides",e[e.FileSystemSourceSelected=78]="FileSystemSourceSelected",e[e.OverridesSourceSelected=79]="OverridesSourceSelected",e[e.StyleSheetInitiatorLinkClicked=80]="StyleSheetInitiatorLinkClicked",e[e.MaxValue=81]="MaxValue"}(F||(F={})),function(e){e[e.elements=1]="elements",e[e.resources=2]="resources",e[e.network=3]="network",e[e.sources=4]="sources",e[e.timeline=5]="timeline",e[e.heap_profiler=6]="heap_profiler",e[e.console=8]="console",e[e.layers=9]="layers",e[e["console-view"]=10]="console-view",e[e.animations=11]="animations",e[e["network.config"]=12]="network.config",e[e.rendering=13]="rendering",e[e.sensors=14]="sensors",e[e["sources.search"]=15]="sources.search",e[e.security=16]="security",e[e.js_profiler=17]="js_profiler",e[e.lighthouse=18]="lighthouse",e[e.coverage=19]="coverage",e[e["protocol-monitor"]=20]="protocol-monitor",e[e["remote-devices"]=21]="remote-devices",e[e["web-audio"]=22]="web-audio",e[e["changes.changes"]=23]="changes.changes",e[e["performance.monitor"]=24]="performance.monitor",e[e["release-note"]=25]="release-note",e[e.live_heap_profile=26]="live_heap_profile",e[e["sources.quick"]=27]="sources.quick",e[e["network.blocked-urls"]=28]="network.blocked-urls",e[e["settings-preferences"]=29]="settings-preferences",e[e["settings-workspace"]=30]="settings-workspace",e[e["settings-experiments"]=31]="settings-experiments",e[e["settings-blackbox"]=32]="settings-blackbox",e[e["settings-devices"]=33]="settings-devices",e[e["settings-throttling-conditions"]=34]="settings-throttling-conditions",e[e["settings-emulation-locations"]=35]="settings-emulation-locations",e[e["settings-shortcuts"]=36]="settings-shortcuts",e[e["issues-pane"]=37]="issues-pane",e[e["settings-keybinds"]=38]="settings-keybinds",e[e.cssoverview=39]="cssoverview",e[e.chrome_recorder=40]="chrome_recorder",e[e.trust_tokens=41]="trust_tokens",e[e.reporting_api=42]="reporting_api",e[e.interest_groups=43]="interest_groups",e[e.back_forward_cache=44]="back_forward_cache",e[e.service_worker_cache=45]="service_worker_cache",e[e.background_service_backgroundFetch=46]="background_service_backgroundFetch",e[e.background_service_backgroundSync=47]="background_service_backgroundSync",e[e.background_service_pushMessaging=48]="background_service_pushMessaging",e[e.background_service_notifications=49]="background_service_notifications",e[e.background_service_paymentHandler=50]="background_service_paymentHandler",e[e.background_service_periodicBackgroundSync=51]="background_service_periodicBackgroundSync",e[e.service_workers=52]="service_workers",e[e.app_manifest=53]="app_manifest",e[e.storage=54]="storage",e[e.cookies=55]="cookies",e[e.frame_details=56]="frame_details",e[e.frame_resource=57]="frame_resource",e[e.frame_window=58]="frame_window",e[e.frame_worker=59]="frame_worker",e[e.dom_storage=60]="dom_storage",e[e.indexed_db=61]="indexed_db",e[e.web_sql=62]="web_sql",e[e.performance_insights=63]="performance_insights",e[e.preloading=64]="preloading",e[e.bounce_tracking_mitigations=65]="bounce_tracking_mitigations",e[e.MaxValue=66]="MaxValue"}(D||(D={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e.Styles=1]="Styles",e[e.Computed=2]="Computed",e[e["elements.layout"]=3]="elements.layout",e[e["elements.eventListeners"]=4]="elements.eventListeners",e[e["elements.domBreakpoints"]=5]="elements.domBreakpoints",e[e["elements.domProperties"]=6]="elements.domProperties",e[e["accessibility.view"]=7]="accessibility.view",e[e.MaxValue=8]="MaxValue"}(L||(L={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e["navigator-network"]=1]="navigator-network",e[e["navigator-files"]=2]="navigator-files",e[e["navigator-overrides"]=3]="navigator-overrides",e[e["navigator-contentScripts"]=4]="navigator-contentScripts",e[e["navigator-snippets"]=5]="navigator-snippets",e[e.MaxValue=6]="MaxValue"}(A||(A={})),function(e){e[e.Unknown=0]="Unknown",e[e["text/css"]=2]="text/css",e[e["text/html"]=3]="text/html",e[e["application/xml"]=4]="application/xml",e[e["application/wasm"]=5]="application/wasm",e[e["application/manifest+json"]=6]="application/manifest+json",e[e["application/x-aspx"]=7]="application/x-aspx",e[e["application/jsp"]=8]="application/jsp",e[e["text/x-c++src"]=9]="text/x-c++src",e[e["text/x-coffeescript"]=10]="text/x-coffeescript",e[e["application/vnd.dart"]=11]="application/vnd.dart",e[e["text/typescript"]=12]="text/typescript",e[e["text/typescript-jsx"]=13]="text/typescript-jsx",e[e["application/json"]=14]="application/json",e[e["text/x-csharp"]=15]="text/x-csharp",e[e["text/x-java"]=16]="text/x-java",e[e["text/x-less"]=17]="text/x-less",e[e["application/x-httpd-php"]=18]="application/x-httpd-php",e[e["text/x-python"]=19]="text/x-python",e[e["text/x-sh"]=20]="text/x-sh",e[e["text/x-gss"]=21]="text/x-gss",e[e["text/x-sass"]=22]="text/x-sass",e[e["text/x-scss"]=23]="text/x-scss",e[e["text/markdown"]=24]="text/markdown",e[e["text/x-clojure"]=25]="text/x-clojure",e[e["text/jsx"]=26]="text/jsx",e[e["text/x-go"]=27]="text/x-go",e[e["text/x-kotlin"]=28]="text/x-kotlin",e[e["text/x-scala"]=29]="text/x-scala",e[e["text/x.svelte"]=30]="text/x.svelte",e[e["text/javascript+plain"]=31]="text/javascript+plain",e[e["text/javascript+minified"]=32]="text/javascript+minified",e[e["text/javascript+sourcemapped"]=33]="text/javascript+sourcemapped",e[e["text/x.angular"]=34]="text/x.angular",e[e["text/x.vue"]=35]="text/x.vue",e[e.MaxValue=36]="MaxValue"}(V||(V={})),function(e){e[e.devToolsDefault=0]="devToolsDefault",e[e.vsCode=1]="vsCode",e[e.MaxValue=2]="MaxValue"}(O||(O={})),function(e){e[e.OtherShortcut=0]="OtherShortcut",e[e["commandMenu.show"]=1]="commandMenu.show",e[e["console.clear"]=2]="console.clear",e[e["console.show"]=3]="console.show",e[e["debugger.step"]=4]="debugger.step",e[e["debugger.step-into"]=5]="debugger.step-into",e[e["debugger.step-out"]=6]="debugger.step-out",e[e["debugger.step-over"]=7]="debugger.step-over",e[e["debugger.toggle-breakpoint"]=8]="debugger.toggle-breakpoint",e[e["debugger.toggle-breakpoint-enabled"]=9]="debugger.toggle-breakpoint-enabled",e[e["debugger.toggle-pause"]=10]="debugger.toggle-pause",e[e["elements.edit-as-html"]=11]="elements.edit-as-html",e[e["elements.hide-element"]=12]="elements.hide-element",e[e["elements.redo"]=13]="elements.redo",e[e["elements.toggle-element-search"]=14]="elements.toggle-element-search",e[e["elements.undo"]=15]="elements.undo",e[e["main.search-in-panel.find"]=16]="main.search-in-panel.find",e[e["main.toggle-drawer"]=17]="main.toggle-drawer",e[e["network.hide-request-details"]=18]="network.hide-request-details",e[e["network.search"]=19]="network.search",e[e["network.toggle-recording"]=20]="network.toggle-recording",e[e["quickOpen.show"]=21]="quickOpen.show",e[e["settings.show"]=22]="settings.show",e[e["sources.search"]=23]="sources.search",e[e["background-service.toggle-recording"]=24]="background-service.toggle-recording",e[e["components.collect-garbage"]=25]="components.collect-garbage",e[e["console.clear.history"]=26]="console.clear.history",e[e["console.create-pin"]=27]="console.create-pin",e[e["coverage.start-with-reload"]=28]="coverage.start-with-reload",e[e["coverage.toggle-recording"]=29]="coverage.toggle-recording",e[e["debugger.breakpoint-input-window"]=30]="debugger.breakpoint-input-window",e[e["debugger.evaluate-selection"]=31]="debugger.evaluate-selection",e[e["debugger.next-call-frame"]=32]="debugger.next-call-frame",e[e["debugger.previous-call-frame"]=33]="debugger.previous-call-frame",e[e["debugger.run-snippet"]=34]="debugger.run-snippet",e[e["debugger.toggle-breakpoints-active"]=35]="debugger.toggle-breakpoints-active",e[e["elements.capture-area-screenshot"]=36]="elements.capture-area-screenshot",e[e["emulation.capture-full-height-screenshot"]=37]="emulation.capture-full-height-screenshot",e[e["emulation.capture-node-screenshot"]=38]="emulation.capture-node-screenshot",e[e["emulation.capture-screenshot"]=39]="emulation.capture-screenshot",e[e["emulation.show-sensors"]=40]="emulation.show-sensors",e[e["emulation.toggle-device-mode"]=41]="emulation.toggle-device-mode",e[e["help.release-notes"]=42]="help.release-notes",e[e["help.report-issue"]=43]="help.report-issue",e[e["input.start-replaying"]=44]="input.start-replaying",e[e["input.toggle-pause"]=45]="input.toggle-pause",e[e["input.toggle-recording"]=46]="input.toggle-recording",e[e["inspector_main.focus-debuggee"]=47]="inspector_main.focus-debuggee",e[e["inspector_main.hard-reload"]=48]="inspector_main.hard-reload",e[e["inspector_main.reload"]=49]="inspector_main.reload",e[e["live-heap-profile.start-with-reload"]=50]="live-heap-profile.start-with-reload",e[e["live-heap-profile.toggle-recording"]=51]="live-heap-profile.toggle-recording",e[e["main.debug-reload"]=52]="main.debug-reload",e[e["main.next-tab"]=53]="main.next-tab",e[e["main.previous-tab"]=54]="main.previous-tab",e[e["main.search-in-panel.cancel"]=55]="main.search-in-panel.cancel",e[e["main.search-in-panel.find-next"]=56]="main.search-in-panel.find-next",e[e["main.search-in-panel.find-previous"]=57]="main.search-in-panel.find-previous",e[e["main.toggle-dock"]=58]="main.toggle-dock",e[e["main.zoom-in"]=59]="main.zoom-in",e[e["main.zoom-out"]=60]="main.zoom-out",e[e["main.zoom-reset"]=61]="main.zoom-reset",e[e["network-conditions.network-low-end-mobile"]=62]="network-conditions.network-low-end-mobile",e[e["network-conditions.network-mid-tier-mobile"]=63]="network-conditions.network-mid-tier-mobile",e[e["network-conditions.network-offline"]=64]="network-conditions.network-offline",e[e["network-conditions.network-online"]=65]="network-conditions.network-online",e[e["profiler.heap-toggle-recording"]=66]="profiler.heap-toggle-recording",e[e["profiler.js-toggle-recording"]=67]="profiler.js-toggle-recording",e[e["resources.clear"]=68]="resources.clear",e[e["settings.documentation"]=69]="settings.documentation",e[e["settings.shortcuts"]=70]="settings.shortcuts",e[e["sources.add-folder-to-workspace"]=71]="sources.add-folder-to-workspace",e[e["sources.add-to-watch"]=72]="sources.add-to-watch",e[e["sources.close-all"]=73]="sources.close-all",e[e["sources.close-editor-tab"]=74]="sources.close-editor-tab",e[e["sources.create-snippet"]=75]="sources.create-snippet",e[e["sources.go-to-line"]=76]="sources.go-to-line",e[e["sources.go-to-member"]=77]="sources.go-to-member",e[e["sources.jump-to-next-location"]=78]="sources.jump-to-next-location",e[e["sources.jump-to-previous-location"]=79]="sources.jump-to-previous-location",e[e["sources.rename"]=80]="sources.rename",e[e["sources.save"]=81]="sources.save",e[e["sources.save-all"]=82]="sources.save-all",e[e["sources.switch-file"]=83]="sources.switch-file",e[e["timeline.jump-to-next-frame"]=84]="timeline.jump-to-next-frame",e[e["timeline.jump-to-previous-frame"]=85]="timeline.jump-to-previous-frame",e[e["timeline.load-from-file"]=86]="timeline.load-from-file",e[e["timeline.next-recording"]=87]="timeline.next-recording",e[e["timeline.previous-recording"]=88]="timeline.previous-recording",e[e["timeline.record-reload"]=89]="timeline.record-reload",e[e["timeline.save-to-file"]=90]="timeline.save-to-file",e[e["timeline.show-history"]=91]="timeline.show-history",e[e["timeline.toggle-recording"]=92]="timeline.toggle-recording",e[e["sources.increment-css"]=93]="sources.increment-css",e[e["sources.increment-css-by-ten"]=94]="sources.increment-css-by-ten",e[e["sources.decrement-css"]=95]="sources.decrement-css",e[e["sources.decrement-css-by-ten"]=96]="sources.decrement-css-by-ten",e[e["layers.reset-view"]=97]="layers.reset-view",e[e["layers.pan-mode"]=98]="layers.pan-mode",e[e["layers.rotate-mode"]=99]="layers.rotate-mode",e[e["layers.zoom-in"]=100]="layers.zoom-in",e[e["layers.zoom-out"]=101]="layers.zoom-out",e[e["layers.up"]=102]="layers.up",e[e["layers.down"]=103]="layers.down",e[e["layers.left"]=104]="layers.left",e[e["layers.right"]=105]="layers.right",e[e["help.report-translation-issue"]=106]="help.report-translation-issue",e[e["rendering.toggle-prefers-color-scheme"]=107]="rendering.toggle-prefers-color-scheme",e[e["chrome_recorder.start-recording"]=108]="chrome_recorder.start-recording",e[e["chrome_recorder.replay-recording"]=109]="chrome_recorder.replay-recording",e[e["chrome_recorder.toggle-code-view"]=110]="chrome_recorder.toggle-code-view",e[e["chrome_recorder.copy-recording-or-step"]=111]="chrome_recorder.copy-recording-or-step",e[e.MaxValue=112]="MaxValue"}(H||(H={})),function(e){e[e.ConsoleInfoBar=0]="ConsoleInfoBar",e[e.LearnMoreLinkCOEP=1]="LearnMoreLinkCOEP",e[e.StatusBarIssuesCounter=2]="StatusBarIssuesCounter",e[e.HamburgerMenu=3]="HamburgerMenu",e[e.Adorner=4]="Adorner",e[e.CommandMenu=5]="CommandMenu",e[e.MaxValue=6]="MaxValue"}(N||(N={})),function(e){e[e.applyCustomStylesheet=0]="applyCustomStylesheet",e[e.captureNodeCreationStacks=1]="captureNodeCreationStacks",e[e.sourcesPrettyPrint=2]="sourcesPrettyPrint",e[e.liveHeapProfile=11]="liveHeapProfile",e[e.protocolMonitor=13]="protocolMonitor",e[e.developerResourcesView=15]="developerResourcesView",e[e.samplingHeapProfilerTimeline=17]="samplingHeapProfilerTimeline",e[e.showOptionToExposeInternalsInHeapSnapshot=18]="showOptionToExposeInternalsInHeapSnapshot",e[e.sourceOrderViewer=20]="sourceOrderViewer",e[e.webauthnPane=22]="webauthnPane",e[e.timelineEventInitiators=24]="timelineEventInitiators",e[e.timelineInvalidationTracking=26]="timelineInvalidationTracking",e[e.timelineShowAllEvents=27]="timelineShowAllEvents",e[e.timelineV8RuntimeCallStats=28]="timelineV8RuntimeCallStats",e[e.wasmDWARFDebugging=31]="wasmDWARFDebugging",e[e.dualScreenSupport=32]="dualScreenSupport",e[e.keyboardShortcutEditor=35]="keyboardShortcutEditor",e[e.APCA=39]="APCA",e[e.cspViolationsView=40]="cspViolationsView",e[e.fontEditor=41]="fontEditor",e[e.fullAccessibilityTree=42]="fullAccessibilityTree",e[e.ignoreListJSFramesOnTimeline=43]="ignoreListJSFramesOnTimeline",e[e.contrastIssues=44]="contrastIssues",e[e.experimentalCookieFeatures=45]="experimentalCookieFeatures",e[e.cssTypeComponentLength=52]="cssTypeComponentLength",e[e.preciseChanges=53]="preciseChanges",e[e.bfcacheDisplayTree=54]="bfcacheDisplayTree",e[e.stylesPaneCSSChanges=55]="stylesPaneCSSChanges",e[e.headerOverrides=56]="headerOverrides",e[e.evaluateExpressionsWithSourceMaps=58]="evaluateExpressionsWithSourceMaps",e[e.eyedropperColorPicker=60]="eyedropperColorPicker",e[e.instrumentationBreakpoints=61]="instrumentationBreakpoints",e[e.authoredDeployedGrouping=63]="authoredDeployedGrouping",e[e.importantDOMProperties=64]="importantDOMProperties",e[e.justMyCode=65]="justMyCode",e[e.timelineAsConsoleProfileResultPanel=67]="timelineAsConsoleProfileResultPanel",e[e.preloadingStatusPanel=68]="preloadingStatusPanel",e[e.disableColorFormatSetting=69]="disableColorFormatSetting",e[e.outermostTargetSelector=71]="outermostTargetSelector",e[e.jsProfilerTemporarilyEnable=72]="jsProfilerTemporarilyEnable",e[e.highlightErrorsElementsPanel=73]="highlightErrorsElementsPanel",e[e.setAllBreakpointsEagerly=74]="setAllBreakpointsEagerly",e[e.MaxValue=75]="MaxValue"}(W||(W={})),function(e){e[e.CrossOriginEmbedderPolicy=0]="CrossOriginEmbedderPolicy",e[e.MixedContent=1]="MixedContent",e[e.Cookie=2]="Cookie",e[e.HeavyAd=3]="HeavyAd",e[e.ContentSecurityPolicy=4]="ContentSecurityPolicy",e[e.Other=5]="Other",e[e.Generic=6]="Generic",e[e.MaxValue=7]="MaxValue"}(_||(_={})),function(e){e[e.CrossOriginEmbedderPolicyRequest=0]="CrossOriginEmbedderPolicyRequest",e[e.CrossOriginEmbedderPolicyElement=1]="CrossOriginEmbedderPolicyElement",e[e.MixedContentRequest=2]="MixedContentRequest",e[e.SameSiteCookieCookie=3]="SameSiteCookieCookie",e[e.SameSiteCookieRequest=4]="SameSiteCookieRequest",e[e.HeavyAdElement=5]="HeavyAdElement",e[e.ContentSecurityPolicyDirective=6]="ContentSecurityPolicyDirective",e[e.ContentSecurityPolicyElement=7]="ContentSecurityPolicyElement",e[e.CrossOriginEmbedderPolicyLearnMore=8]="CrossOriginEmbedderPolicyLearnMore",e[e.MixedContentLearnMore=9]="MixedContentLearnMore",e[e.SameSiteCookieLearnMore=10]="SameSiteCookieLearnMore",e[e.HeavyAdLearnMore=11]="HeavyAdLearnMore",e[e.ContentSecurityPolicyLearnMore=12]="ContentSecurityPolicyLearnMore",e[e.MaxValue=13]="MaxValue"}(U||(U={})),function(e){e[e.MixedContentIssue=0]="MixedContentIssue",e[e["ContentSecurityPolicyIssue::kInlineViolation"]=1]="ContentSecurityPolicyIssue::kInlineViolation",e[e["ContentSecurityPolicyIssue::kEvalViolation"]=2]="ContentSecurityPolicyIssue::kEvalViolation",e[e["ContentSecurityPolicyIssue::kURLViolation"]=3]="ContentSecurityPolicyIssue::kURLViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesSinkViolation"]=4]="ContentSecurityPolicyIssue::kTrustedTypesSinkViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation"]=5]="ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation",e[e["HeavyAdIssue::NetworkTotalLimit"]=6]="HeavyAdIssue::NetworkTotalLimit",e[e["HeavyAdIssue::CpuTotalLimit"]=7]="HeavyAdIssue::CpuTotalLimit",e[e["HeavyAdIssue::CpuPeakLimit"]=8]="HeavyAdIssue::CpuPeakLimit",e[e["CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader"]=9]="CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader",e[e["CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage"]=10]="CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin"]=11]="CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep"]=12]="CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameSite"]=13]="CrossOriginEmbedderPolicyIssue::CorpNotSameSite",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie"]=14]="CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie"]=15]="CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::ReadCookie"]=16]="CookieIssue::WarnSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::SetCookie"]=17]="CookieIssue::WarnSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure"]=18]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure"]=19]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Secure"]=20]="CookieIssue::WarnCrossDowngrade::ReadCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure"]=21]="CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Secure"]=22]="CookieIssue::WarnCrossDowngrade::SetCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Insecure"]=23]="CookieIssue::WarnCrossDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Secure"]=24]="CookieIssue::ExcludeNavigationContextDowngrade::Secure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Insecure"]=25]="CookieIssue::ExcludeNavigationContextDowngrade::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure"]=26]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure"]=27]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Secure"]=28]="CookieIssue::ExcludeContextDowngrade::SetCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure"]=29]="CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie"]=30]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie"]=31]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie"]=32]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie"]=33]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie"]=34]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie"]=35]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie",e[e["SharedArrayBufferIssue::TransferIssue"]=36]="SharedArrayBufferIssue::TransferIssue",e[e["SharedArrayBufferIssue::CreationIssue"]=37]="SharedArrayBufferIssue::CreationIssue",e[e.LowTextContrastIssue=41]="LowTextContrastIssue",e[e["CorsIssue::InsecurePrivateNetwork"]=42]="CorsIssue::InsecurePrivateNetwork",e[e["CorsIssue::InvalidHeaders"]=44]="CorsIssue::InvalidHeaders",e[e["CorsIssue::WildcardOriginWithCredentials"]=45]="CorsIssue::WildcardOriginWithCredentials",e[e["CorsIssue::PreflightResponseInvalid"]=46]="CorsIssue::PreflightResponseInvalid",e[e["CorsIssue::OriginMismatch"]=47]="CorsIssue::OriginMismatch",e[e["CorsIssue::AllowCredentialsRequired"]=48]="CorsIssue::AllowCredentialsRequired",e[e["CorsIssue::MethodDisallowedByPreflightResponse"]=49]="CorsIssue::MethodDisallowedByPreflightResponse",e[e["CorsIssue::HeaderDisallowedByPreflightResponse"]=50]="CorsIssue::HeaderDisallowedByPreflightResponse",e[e["CorsIssue::RedirectContainsCredentials"]=51]="CorsIssue::RedirectContainsCredentials",e[e["CorsIssue::DisallowedByMode"]=52]="CorsIssue::DisallowedByMode",e[e["CorsIssue::CorsDisabledScheme"]=53]="CorsIssue::CorsDisabledScheme",e[e["CorsIssue::PreflightMissingAllowExternal"]=54]="CorsIssue::PreflightMissingAllowExternal",e[e["CorsIssue::PreflightInvalidAllowExternal"]=55]="CorsIssue::PreflightInvalidAllowExternal",e[e["CorsIssue::NoCorsRedirectModeNotFollow"]=57]="CorsIssue::NoCorsRedirectModeNotFollow",e[e["QuirksModeIssue::QuirksMode"]=58]="QuirksModeIssue::QuirksMode",e[e["QuirksModeIssue::LimitedQuirksMode"]=59]="QuirksModeIssue::LimitedQuirksMode",e[e.DeprecationIssue=60]="DeprecationIssue",e[e["ClientHintIssue::MetaTagAllowListInvalidOrigin"]=61]="ClientHintIssue::MetaTagAllowListInvalidOrigin",e[e["ClientHintIssue::MetaTagModifiedHTML"]=62]="ClientHintIssue::MetaTagModifiedHTML",e[e["CorsIssue::PreflightAllowPrivateNetworkError"]=63]="CorsIssue::PreflightAllowPrivateNetworkError",e[e["GenericIssue::CrossOriginPortalPostMessageError"]=64]="GenericIssue::CrossOriginPortalPostMessageError",e[e["GenericIssue::FormLabelForNameError"]=65]="GenericIssue::FormLabelForNameError",e[e["GenericIssue::FormDuplicateIdForInputError"]=66]="GenericIssue::FormDuplicateIdForInputError",e[e["GenericIssue::FormInputWithNoLabelError"]=67]="GenericIssue::FormInputWithNoLabelError",e[e["GenericIssue::FormAutocompleteAttributeEmptyError"]=68]="GenericIssue::FormAutocompleteAttributeEmptyError",e[e["GenericIssue::FormEmptyIdAndNameAttributesForInputError"]=69]="GenericIssue::FormEmptyIdAndNameAttributesForInputError",e[e["GenericIssue::FormAriaLabelledByToNonExistingId"]=70]="GenericIssue::FormAriaLabelledByToNonExistingId",e[e["GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError"]=71]="GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError",e[e["GenericIssue::FormLabelHasNeitherForNorNestedInput"]=72]="GenericIssue::FormLabelHasNeitherForNorNestedInput",e[e["GenericIssue::FormLabelForMatchesNonExistingIdError"]=73]="GenericIssue::FormLabelForMatchesNonExistingIdError",e[e["GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError"]=74]="GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError",e[e["GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError"]=75]="GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError",e[e["StylesheetLoadingIssue::LateImportRule"]=76]="StylesheetLoadingIssue::LateImportRule",e[e["StylesheetLoadingIssue::RequestFailed"]=77]="StylesheetLoadingIssue::RequestFailed",e[e.MaxValue=78]="MaxValue"}(B||(B={})),function(e){e[e.LoadThroughPageViaTarget=0]="LoadThroughPageViaTarget",e[e.LoadThroughPageViaFrame=1]="LoadThroughPageViaFrame",e[e.LoadThroughPageFailure=2]="LoadThroughPageFailure",e[e.LoadThroughPageFallback=3]="LoadThroughPageFallback",e[e.FallbackAfterFailure=4]="FallbackAfterFailure",e[e.FallbackPerOverride=5]="FallbackPerOverride",e[e.FallbackPerProtocol=6]="FallbackPerProtocol",e[e.FallbackFailure=7]="FallbackFailure",e[e.MaxValue=8]="MaxValue"}(j||(j={})),function(e){e[e.SchemeOther=0]="SchemeOther",e[e.SchemeUnknown=1]="SchemeUnknown",e[e.SchemeHttp=2]="SchemeHttp",e[e.SchemeHttps=3]="SchemeHttps",e[e.SchemeHttpLocalhost=4]="SchemeHttpLocalhost",e[e.SchemeHttpsLocalhost=5]="SchemeHttpsLocalhost",e[e.SchemeData=6]="SchemeData",e[e.SchemeFile=7]="SchemeFile",e[e.SchemeBlob=8]="SchemeBlob",e[e.MaxValue=9]="MaxValue"}(G||(G={})),function(e){e[e.ContextMenu=0]="ContextMenu",e[e.MemoryIcon=1]="MemoryIcon",e[e.MaxValue=2]="MaxValue"}(z||(z={})),function(e){e[e.DWARFInspectableAddress=0]="DWARFInspectableAddress",e[e.ArrayBuffer=1]="ArrayBuffer",e[e.DataView=2]="DataView",e[e.TypedArray=3]="TypedArray",e[e.WebAssemblyMemory=4]="WebAssemblyMemory",e[e.MaxValue=5]="MaxValue"}(q||(q={})),function(e){e[e.af=1]="af",e[e.am=2]="am",e[e.ar=3]="ar",e[e.as=4]="as",e[e.az=5]="az",e[e.be=6]="be",e[e.bg=7]="bg",e[e.bn=8]="bn",e[e.bs=9]="bs",e[e.ca=10]="ca",e[e.cs=11]="cs",e[e.cy=12]="cy",e[e.da=13]="da",e[e.de=14]="de",e[e.el=15]="el",e[e["en-GB"]=16]="en-GB",e[e["en-US"]=17]="en-US",e[e["es-419"]=18]="es-419",e[e.es=19]="es",e[e.et=20]="et",e[e.eu=21]="eu",e[e.fa=22]="fa",e[e.fi=23]="fi",e[e.fil=24]="fil",e[e["fr-CA"]=25]="fr-CA",e[e.fr=26]="fr",e[e.gl=27]="gl",e[e.gu=28]="gu",e[e.he=29]="he",e[e.hi=30]="hi",e[e.hr=31]="hr",e[e.hu=32]="hu",e[e.hy=33]="hy",e[e.id=34]="id",e[e.is=35]="is",e[e.it=36]="it",e[e.ja=37]="ja",e[e.ka=38]="ka",e[e.kk=39]="kk",e[e.km=40]="km",e[e.kn=41]="kn",e[e.ko=42]="ko",e[e.ky=43]="ky",e[e.lo=44]="lo",e[e.lt=45]="lt",e[e.lv=46]="lv",e[e.mk=47]="mk",e[e.ml=48]="ml",e[e.mn=49]="mn",e[e.mr=50]="mr",e[e.ms=51]="ms",e[e.my=52]="my",e[e.ne=53]="ne",e[e.nl=54]="nl",e[e.no=55]="no",e[e.or=56]="or",e[e.pa=57]="pa",e[e.pl=58]="pl",e[e["pt-PT"]=59]="pt-PT",e[e.pt=60]="pt",e[e.ro=61]="ro",e[e.ru=62]="ru",e[e.si=63]="si",e[e.sk=64]="sk",e[e.sl=65]="sl",e[e.sq=66]="sq",e[e["sr-Latn"]=67]="sr-Latn",e[e.sr=68]="sr",e[e.sv=69]="sv",e[e.sw=70]="sw",e[e.ta=71]="ta",e[e.te=72]="te",e[e.th=73]="th",e[e.tr=74]="tr",e[e.uk=75]="uk",e[e.ur=76]="ur",e[e.uz=77]="uz",e[e.vi=78]="vi",e[e.zh=79]="zh",e[e["zh-HK"]=80]="zh-HK",e[e["zh-TW"]=81]="zh-TW",e[e.zu=82]="zu",e[e.MaxValue=83]="MaxValue"}(J||(J={})),function(e){e[e.ChromeSyncDisabled=1]="ChromeSyncDisabled",e[e.ChromeSyncSettingsDisabled=2]="ChromeSyncSettingsDisabled",e[e.DevToolsSyncSettingDisabled=3]="DevToolsSyncSettingDisabled",e[e.DevToolsSyncSettingEnabled=4]="DevToolsSyncSettingEnabled",e[e.MaxValue=5]="MaxValue"}(K||(K={})),function(e){e[e.RecordingStarted=1]="RecordingStarted",e[e.RecordingFinished=2]="RecordingFinished",e[e.MaxValue=3]="MaxValue"}(Q||(Q={})),function(e){e[e.AssertionAdded=1]="AssertionAdded",e[e.PropertyAssertionEdited=2]="PropertyAssertionEdited",e[e.AttributeAssertionEdited=3]="AttributeAssertionEdited",e[e.MaxValue=4]="MaxValue"}(X||(X={})),function(e){e[e.Success=1]="Success",e[e.TimeoutErrorSelectors=2]="TimeoutErrorSelectors",e[e.TimeoutErrorTarget=3]="TimeoutErrorTarget",e[e.OtherError=4]="OtherError",e[e.MaxValue=5]="MaxValue"}(Z||(Z={})),function(e){e[e.Normal=1]="Normal",e[e.Slow=2]="Slow",e[e.VerySlow=3]="VerySlow",e[e.ExtremelySlow=4]="ExtremelySlow",e[e.MaxValue=5]="MaxValue"}($||($={})),function(e){e[e.ReplayOnly=1]="ReplayOnly",e[e.ReplayWithPerformanceTracing=2]="ReplayWithPerformanceTracing",e[e.ReplayViaExtension=3]="ReplayViaExtension",e[e.MaxValue=4]="MaxValue"}(Y||(Y={})),function(e){e[e.SelectorPickerUsed=1]="SelectorPickerUsed",e[e.StepAdded=2]="StepAdded",e[e.StepRemoved=3]="StepRemoved",e[e.SelectorAdded=4]="SelectorAdded",e[e.SelectorRemoved=5]="SelectorRemoved",e[e.SelectorPartAdded=6]="SelectorPartAdded",e[e.SelectorPartEdited=7]="SelectorPartEdited",e[e.SelectorPartRemoved=8]="SelectorPartRemoved",e[e.TypeChanged=9]="TypeChanged",e[e.OtherEditing=10]="OtherEditing",e[e.MaxValue=11]="MaxValue"}(ee||(ee={})),function(e){e[e.ToPuppeteer=1]="ToPuppeteer",e[e.ToJSON=2]="ToJSON",e[e.ToPuppeteerReplay=3]="ToPuppeteerReplay",e[e.ToExtension=4]="ToExtension",e[e.ToLighthouse=5]="ToLighthouse",e[e.MaxValue=6]="MaxValue"}(oe||(oe={})),function(e){e[e.CodeShown=1]="CodeShown",e[e.CodeHidden=2]="CodeHidden",e[e.MaxValue=3]="MaxValue"}(re||(re={})),function(e){e[e.CopiedRecordingWithPuppeteer=1]="CopiedRecordingWithPuppeteer",e[e.CopiedRecordingWithJSON=2]="CopiedRecordingWithJSON",e[e.CopiedRecordingWithReplay=3]="CopiedRecordingWithReplay",e[e.CopiedRecordingWithExtension=4]="CopiedRecordingWithExtension",e[e.CopiedStepWithPuppeteer=5]="CopiedStepWithPuppeteer",e[e.CopiedStepWithJSON=6]="CopiedStepWithJSON",e[e.CopiedStepWithReplay=7]="CopiedStepWithReplay",e[e.CopiedStepWithExtension=8]="CopiedStepWithExtension",e[e.MaxValue=9]="MaxValue"}(te||(te={})),function(e){e[e.false=0]="false",e[e.true=1]="true",e[e.MaxValue=2]="MaxValue"}(ne||(ne={})),function(e){e[e.DeclarationViaChangedLine=1]="DeclarationViaChangedLine",e[e.AllChangesViaStylesPane=2]="AllChangesViaStylesPane",e[e.DeclarationViaContextMenu=3]="DeclarationViaContextMenu",e[e.PropertyViaContextMenu=4]="PropertyViaContextMenu",e[e.ValueViaContextMenu=5]="ValueViaContextMenu",e[e.DeclarationAsJSViaContextMenu=6]="DeclarationAsJSViaContextMenu",e[e.RuleViaContextMenu=7]="RuleViaContextMenu",e[e.AllDeclarationsViaContextMenu=8]="AllDeclarationsViaContextMenu",e[e.AllDeclarationsAsJSViaContextMenu=9]="AllDeclarationsAsJSViaContextMenu",e[e.SelectorViaContextMenu=10]="SelectorViaContextMenu",e[e.MaxValue=11]="MaxValue"}(ie||(ie={})),function(e){e[e.OtherSection=0]="OtherSection",e[e.Identity=1]="Identity",e[e.Presentation=2]="Presentation",e[e["Protocol Handlers"]=3]="Protocol Handlers",e[e.Icons=4]="Icons",e[e["Window Controls Overlay"]=5]="Window Controls Overlay",e[e.MaxValue=6]="MaxValue"}(se||(se={})),function(e){e[e.Other=0]="Other",e[e.AlignContent=1]="AlignContent",e[e.FlexItem=2]="FlexItem",e[e.FlexContainer=3]="FlexContainer",e[e.GridContainer=4]="GridContainer",e[e.GridItem=5]="GridItem",e[e.FlexGrid=6]="FlexGrid",e[e.MulticolFlexGrid=7]="MulticolFlexGrid",e[e.Padding=8]="Padding",e[e.Position=9]="Position",e[e.ZIndex=10]="ZIndex",e[e.Sizing=11]="Sizing",e[e.FlexOrGridItem=12]="FlexOrGridItem",e[e.FontVariationSettings=13]="FontVariationSettings",e[e.MaxValue=14]="MaxValue"}(ae||(ae={})),function(e){e[e.Navigation=0]="Navigation",e[e.Timespan=1]="Timespan",e[e.Snapshot=2]="Snapshot",e[e.LegacyNavigation=3]="LegacyNavigation",e[e.MaxValue=4]="MaxValue"}(de||(de={}));var ue=Object.freeze({__proto__:null,UserMetrics:ce,get Action(){return F},get PanelCodes(){return D},get ElementsSidebarTabCodes(){return L},get SourcesSidebarTabCodes(){return A},get MediaTypes(){return V},get KeybindSetSettings(){return O},get KeyboardShortcutAction(){return H},get IssueOpener(){return N},get DevtoolsExperiments(){return W},get IssueExpanded(){return _},get IssueResourceOpened(){return U},get IssueCreated(){return B},get DeveloperResourceLoaded(){return j},get DeveloperResourceScheme(){return G},get LinearMemoryInspectorRevealedFrom(){return z},get LinearMemoryInspectorTarget(){return q},get Language(){return J},get SyncSetting(){return K},get RecordingToggled(){return Q},get RecordingAssertion(){return X},get RecordingReplayFinished(){return Z},get RecordingReplaySpeed(){return $},get RecordingReplayStarted(){return Y},get RecordingEdited(){return ee},get RecordingExported(){return oe},get RecordingCodeToggled(){return re},get RecordingCopiedToClipboard(){return te},get ConsoleShowsCorsErrors(){return ne},get StyleTextCopied(){return ie},get ManifestSectionCodes(){return se},get CSSHintType(){return ae},get LighthouseModeRun(){return de}});const me=new ce;export{w as InspectorFrontendHost,a as InspectorFrontendHostAPI,le as Platform,C as ResourceLoader,ue as UserMetrics,me as userMetrics}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/core/root/root.js b/packages/debugger-frontend/dist/third-party/front_end/core/root/root.js index d231ec4dd10c..2e25b5694d59 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/core/root/root.js +++ b/packages/debugger-frontend/dist/third-party/front_end/core/root/root.js @@ -1 +1 @@ -import*as e from"../platform/platform.js";const t=new URLSearchParams(location.search);let n,s="";class r{constructor(){}static instance(e={forceNew:null}){const{forceNew:t}=e;return n&&!t||(n=new r),n}static removeInstance(){n=void 0}static queryParam(e){return t.get(e)}static setQueryParamForTesting(e,n){t.set(e,n)}static experimentsSetting(){try{return JSON.parse(self.localStorage&&self.localStorage.experiments?self.localStorage.experiments:"{}")}catch(e){return console.error("Failed to parse localStorage['experiments']"),{}}}static setPlatform(e){s=e}static platform(){return s}static isDescriptorEnabled(e){const t=e.experiment;if("*"===t)return!0;if(t&&t.startsWith("!")&&o.isEnabled(t.substring(1)))return!1;if(t&&!t.startsWith("!")&&!o.isEnabled(t))return!1;const n=e.condition;return!(n&&!n.startsWith("!")&&!r.queryParam(n))&&!(n&&n.startsWith("!")&&r.queryParam(n.substring(1)))}loadLegacyModule(e){return import(`../../${e}`)}}class i{#e;#t;#n;#s;#r;#i;constructor(){this.#e=[],this.#t=new Set,this.#n=new Set,this.#s=new Set,this.#r=new Set,this.#i=new Set}allConfigurableExperiments(){const e=[];for(const t of this.#e)this.#n.has(t.name)||this.#i.has(t.name)||e.push(t);return e}enabledExperiments(){return this.#e.filter((e=>e.isEnabled()))}setExperimentsSetting(e){self.localStorage&&(self.localStorage.experiments=JSON.stringify(e))}register(t,n,s,r,i){this.#t.add(t),this.#e.push(new a(this,t,n,Boolean(s),r??e.DevToolsPath.EmptyUrlString,i??e.DevToolsPath.EmptyUrlString))}isEnabled(e){return this.checkExperiment(e),!1!==r.experimentsSetting()[e]&&(!(!this.#n.has(e)&&!this.#s.has(e))||(!!this.#r.has(e)||Boolean(r.experimentsSetting()[e])))}setEnabled(e,t){this.checkExperiment(e);const n=r.experimentsSetting();n[e]=t,this.setExperimentsSetting(n)}enableExperimentsTransiently(e){for(const t of e)this.checkExperiment(t),this.#n.add(t)}enableExperimentsByDefault(e){for(const t of e)this.checkExperiment(t),this.#s.add(t)}setServerEnabledExperiments(e){for(const t of e)this.checkExperiment(t),this.#r.add(t)}setNonConfigurableExperiments(e){for(const t of e)this.checkExperiment(t),this.#i.add(t)}enableForTest(e){this.checkExperiment(e),this.#n.add(e)}disableForTest(e){this.checkExperiment(e),this.#n.delete(e)}clearForTest(){this.#e=[],this.#t.clear(),this.#n.clear(),this.#s.clear(),this.#r.clear()}cleanUpStaleExperiments(){const e=r.experimentsSetting(),t={};for(const{name:n}of this.#e)if(e.hasOwnProperty(n)){const s=e[n];(s||this.#s.has(n))&&(t[n]=s)}this.setExperimentsSetting(t)}checkExperiment(e){}}class a{name;title;unstable;docLink;feedbackLink;#e;constructor(e,t,n,s,r,i){this.name=t,this.title=n,this.unstable=s,this.docLink=r,this.feedbackLink=i,this.#e=e}isEnabled(){return this.#e.isEnabled(this.name)}setEnabled(e){this.#e.setEnabled(this.name,e)}}const o=new i;var l,E;!function(e){e.CAPTURE_NODE_CREATION_STACKS="captureNodeCreationStacks",e.CSS_OVERVIEW="cssOverview",e.LIVE_HEAP_PROFILE="liveHeapProfile",e.DEVELOPER_RESOURCES_VIEW="developerResourcesView",e.CSP_VIOLATIONS_VIEW="cspViolationsView",e.WASM_DWARF_DEBUGGING="wasmDWARFDebugging",e.ALL="*",e.PROTOCOL_MONITOR="protocolMonitor",e.WEBAUTHN_PANE="webauthnPane",e.FULL_ACCESSIBILITY_TREE="fullAccessibilityTree",e.PRECISE_CHANGES="preciseChanges",e.STYLES_PANE_CSS_CHANGES="stylesPaneCSSChanges",e.HEADER_OVERRIDES="headerOverrides",e.EYEDROPPER_COLOR_PICKER="eyedropperColorPicker",e.INSTRUMENTATION_BREAKPOINTS="instrumentationBreakpoints",e.AUTHORED_DEPLOYED_GROUPING="authoredDeployedGrouping",e.IMPORTANT_DOM_PROPERTIES="importantDOMProperties",e.JUST_MY_CODE="justMyCode",e.PRELOADING_STATUS_PANEL="preloadingStatusPanel",e.DISABLE_COLOR_FORMAT_SETTING="disableColorFormatSetting",e.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL="timelineAsConsoleProfileResultPanel",e.OUTERMOST_TARGET_SELECTOR="outermostTargetSelector",e.JS_PROFILER_TEMP_ENABLE="jsProfilerTemporarilyEnable",e.HIGHLIGHT_ERRORS_ELEMENTS_PANEL="highlightErrorsElementsPanel",e.SET_ALL_BREAKPOINTS_EAGERLY="setAllBreakpointsEagerly",e.REACT_NATIVE_SPECIFIC_UI="reactNativeSpecificUI"}(l||(l={})),function(e){e.CAN_DOCK="can_dock",e.NOT_SOURCES_HIDE_ADD_FOLDER="!sources.hide_add_folder"}(E||(E={}));var c=Object.freeze({__proto__:null,getRemoteBase:function(e=self.location.toString()){const t=new URL(e).searchParams.get("remoteBase");if(!t)return null;const n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools/remote/serve_file/${n[1]}/`,version:n[1]}:null},Runtime:r,ExperimentsSupport:i,Experiment:a,experiments:o,get ExperimentName(){return l},get ConditionName(){return E}});export{c as Runtime}; +import*as e from"../platform/platform.js";const t=new URLSearchParams(location.search);let n,s="";class r{constructor(){}static instance(e={forceNew:null}){const{forceNew:t}=e;return n&&!t||(n=new r),n}static removeInstance(){n=void 0}static queryParam(e){return t.get(e)}static setQueryParamForTesting(e,n){t.set(e,n)}static experimentsSetting(){try{return JSON.parse(self.localStorage&&self.localStorage.experiments?self.localStorage.experiments:"{}")}catch(e){return console.error("Failed to parse localStorage['experiments']"),{}}}static setPlatform(e){s=e}static platform(){return s}static isDescriptorEnabled(e){const t=e.experiment;if("*"===t)return!0;if(t&&t.startsWith("!")&&l.isEnabled(t.substring(1)))return!1;if(t&&!t.startsWith("!")&&!l.isEnabled(t))return!1;const n=e.condition;return!(n&&!n.startsWith("!")&&!r.queryParam(n))&&!(n&&n.startsWith("!")&&r.queryParam(n.substring(1)))}loadLegacyModule(e){return import(`../../${e}`)}}class i{#e;#t;#n;#s;#r;#i;constructor(){this.#e=[],this.#t=new Set,this.#n=new Set,this.#s=new Set,this.#r=new Set,this.#i=new Set}allConfigurableExperiments(){const e=[];for(const t of this.#e)this.#n.has(t.name)||this.#i.has(t.name)||e.push(t);return e}enabledExperiments(){return this.#e.filter((e=>e.isEnabled()))}setExperimentsSetting(e){self.localStorage&&(self.localStorage.experiments=JSON.stringify(e))}register(t,n,s,r,i){this.#t.add(t),this.#e.push(new a(this,t,n,Boolean(s),r??e.DevToolsPath.EmptyUrlString,i??e.DevToolsPath.EmptyUrlString))}isEnabled(e){return this.checkExperiment(e),!1!==r.experimentsSetting()[e]&&(!(!this.#n.has(e)&&!this.#s.has(e))||(!!this.#r.has(e)||Boolean(r.experimentsSetting()[e])))}setEnabled(e,t){this.checkExperiment(e);const n=r.experimentsSetting();n[e]=t,this.setExperimentsSetting(n)}enableExperimentsTransiently(e){for(const t of e)this.checkExperiment(t),this.#n.add(t)}enableExperimentsByDefault(e){for(const t of e)this.checkExperiment(t),this.#s.add(t)}setServerEnabledExperiments(e){for(const t of e)this.checkExperiment(t),this.#r.add(t)}setNonConfigurableExperiments(e){for(const t of e)this.checkExperiment(t),this.#i.add(t)}enableForTest(e){this.checkExperiment(e),this.#n.add(e)}disableForTest(e){this.checkExperiment(e),this.#n.delete(e)}clearForTest(){this.#e=[],this.#t.clear(),this.#n.clear(),this.#s.clear(),this.#r.clear()}cleanUpStaleExperiments(){const e=r.experimentsSetting(),t={};for(const{name:n}of this.#e)if(e.hasOwnProperty(n)){const s=e[n];(s||this.#s.has(n))&&(t[n]=s)}this.setExperimentsSetting(t)}checkExperiment(e){}}class a{name;title;unstable;docLink;feedbackLink;#e;constructor(e,t,n,s,r,i){this.name=t,this.title=n,this.unstable=s,this.docLink=r,this.feedbackLink=i,this.#e=e}isEnabled(){return this.#e.isEnabled(this.name)}setEnabled(e){this.#e.setEnabled(this.name,e)}}const l=new i;var o,E;!function(e){e.CAPTURE_NODE_CREATION_STACKS="captureNodeCreationStacks",e.CSS_OVERVIEW="cssOverview",e.LIVE_HEAP_PROFILE="liveHeapProfile",e.DEVELOPER_RESOURCES_VIEW="developerResourcesView",e.CSP_VIOLATIONS_VIEW="cspViolationsView",e.WASM_DWARF_DEBUGGING="wasmDWARFDebugging",e.ALL="*",e.PROTOCOL_MONITOR="protocolMonitor",e.WEBAUTHN_PANE="webauthnPane",e.FULL_ACCESSIBILITY_TREE="fullAccessibilityTree",e.PRECISE_CHANGES="preciseChanges",e.STYLES_PANE_CSS_CHANGES="stylesPaneCSSChanges",e.HEADER_OVERRIDES="headerOverrides",e.EYEDROPPER_COLOR_PICKER="eyedropperColorPicker",e.INSTRUMENTATION_BREAKPOINTS="instrumentationBreakpoints",e.AUTHORED_DEPLOYED_GROUPING="authoredDeployedGrouping",e.IMPORTANT_DOM_PROPERTIES="importantDOMProperties",e.JUST_MY_CODE="justMyCode",e.PRELOADING_STATUS_PANEL="preloadingStatusPanel",e.DISABLE_COLOR_FORMAT_SETTING="disableColorFormatSetting",e.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL="timelineAsConsoleProfileResultPanel",e.OUTERMOST_TARGET_SELECTOR="outermostTargetSelector",e.JS_PROFILER_TEMP_ENABLE="jsProfilerTemporarilyEnable",e.HIGHLIGHT_ERRORS_ELEMENTS_PANEL="highlightErrorsElementsPanel",e.SET_ALL_BREAKPOINTS_EAGERLY="setAllBreakpointsEagerly",e.REACT_NATIVE_SPECIFIC_UI="reactNativeSpecificUI"}(o||(o={})),function(e){e.CAN_DOCK="can_dock",e.NOT_SOURCES_HIDE_ADD_FOLDER="!sources.hide_add_folder",e.REACT_NATIVE_UNSTABLE_NETWORK_PANEL="unstable_enableNetworkPanel"}(E||(E={}));var c=Object.freeze({__proto__:null,getRemoteBase:function(e=self.location.toString()){const t=new URL(e).searchParams.get("remoteBase");if(!t)return null;const n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools/remote/serve_file/${n[1]}/`,version:n[1]}:null},Runtime:r,ExperimentsSupport:i,Experiment:a,experiments:l,get ExperimentName(){return o},get ConditionName(){return E}});export{c as Runtime}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js index d4c88c14fcbc..2627ff4a0650 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js +++ b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js @@ -1 +1 @@ -import"../shell/shell.js";import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/common/common.js";import*as o from"../../core/root/root.js";import*as n from"../../core/sdk/sdk.js";import*as a from"../../models/workspace/workspace.js";import*as r from"../../panels/network/forward/forward.js";import*as s from"../../models/issues_manager/issues_manager.js";import*as c from"../main/main.js";const l={cssOverview:"CSS Overview",showCssOverview:"Show CSS Overview"},g=e.i18n.registerUIStrings("panels/css_overview/css_overview-meta.ts",l),d=e.i18n.getLazilyComputedLocalizedString.bind(void 0,g);let m;t.ViewManager.registerViewExtension({location:"panel",id:"cssoverview",commandPrompt:d(l.showCssOverview),title:d(l.cssOverview),order:95,persistence:"closeable",async loadView(){const e=await async function(){return m||(m=await import("../../panels/css_overview/css_overview.js")),m}();return new e.CSSOverviewPanel.CSSOverviewPanel(new e.CSSOverviewController.OverviewController)},isPreviewFeature:!0});const p={showElements:"Show Elements",elements:"Elements",showEventListeners:"Show Event Listeners",eventListeners:"Event Listeners",showProperties:"Show Properties",properties:"Properties",showStackTrace:"Show Stack Trace",stackTrace:"Stack Trace",showLayout:"Show Layout",layout:"Layout",hideElement:"Hide element",editAsHtml:"Edit as HTML",duplicateElement:"Duplicate element",undo:"Undo",redo:"Redo",captureAreaScreenshot:"Capture area screenshot",selectAnElementInThePageTo:"Select an element in the page to inspect it",wordWrap:"Word wrap",enableDomWordWrap:"Enable `DOM` word wrap",disableDomWordWrap:"Disable `DOM` word wrap",showHtmlComments:"Show `HTML` comments",hideHtmlComments:"Hide `HTML` comments",revealDomNodeOnHover:"Reveal `DOM` node on hover",showDetailedInspectTooltip:"Show detailed inspect tooltip",showCSSDocumentationTooltip:"Show CSS documentation tooltip",copyStyles:"Copy styles",showUserAgentShadowDOM:"Show user agent shadow `DOM`",showComputedStyles:"Show Computed Styles",showStyles:"Show Styles",toggleEyeDropper:"Toggle eye dropper"},w=e.i18n.registerUIStrings("panels/elements/elements-meta.ts",p),u=e.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let y,S;async function h(){return y||(y=await import("../../panels/elements/elements.js")),y}function A(e){return void 0===y?[]:e(y)}t.ViewManager.registerViewExtension({location:"panel",id:"elements",commandPrompt:u(p.showElements),title:u(p.elements),order:10,persistence:"permanent",hasToolbar:!1,loadView:async()=>(await h()).ElementsPanel.ElementsPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"elements.show-styles",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.showStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"elements.show-computed",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.showComputedStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.eventListeners",commandPrompt:u(p.showEventListeners),title:u(p.eventListeners),order:5,hasToolbar:!0,persistence:"permanent",loadView:async()=>(await h()).EventListenersWidget.EventListenersWidget.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.domProperties",commandPrompt:u(p.showProperties),title:u(p.properties),order:7,persistence:"permanent",loadView:async()=>(await h()).PropertiesWidget.PropertiesWidget.instance()}),t.ViewManager.registerViewExtension({experiment:o.Runtime.ExperimentName.CAPTURE_NODE_CREATION_STACKS,location:"elements-sidebar",id:"elements.domCreation",commandPrompt:u(p.showStackTrace),title:u(p.stackTrace),order:10,persistence:"permanent",loadView:async()=>(await h()).NodeStackTraceWidget.NodeStackTraceWidget.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.layout",commandPrompt:u(p.showLayout),title:u(p.layout),order:4,persistence:"permanent",loadView:async()=>(await async function(){return S||(S=await import("../../panels/elements/components/components.js")),S}()).LayoutPane.LayoutPane.instance().wrapper}),t.ActionRegistration.registerActionExtension({actionId:"elements.hide-element",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.hideElement),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"H"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.toggle-eye-dropper",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.toggleEyeDropper),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ColorSwatchPopoverIcon.ColorSwatchPopoverIcon])),bindings:[{shortcut:"c"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.edit-as-html",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.editAsHtml),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"F2"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.duplicate-element",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.duplicateElement),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Shift+Alt+Down"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.copy-styles",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.copyStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Alt+C",platform:"windows,linux"},{shortcut:"Meta+Alt+C",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.undo",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.undo),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Z",platform:"windows,linux"},{shortcut:"Meta+Z",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.redo",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.redo),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Y",platform:"windows,linux"},{shortcut:"Meta+Shift+Z",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.capture-area-screenshot",loadActionDelegate:async()=>(await h()).InspectElementModeController.ToggleSearchActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:u(p.captureAreaScreenshot),category:t.ActionRegistration.ActionCategory.SCREENSHOT}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.ELEMENTS,actionId:"elements.toggle-element-search",toggleable:!0,loadActionDelegate:async()=>(await h()).InspectElementModeController.ToggleSearchActionDelegate.instance(),title:u(p.selectAnElementInThePageTo),iconClass:"select-element",bindings:[{shortcut:"Ctrl+Shift+C",platform:"windows,linux"},{shortcut:"Meta+Shift+C",platform:"mac"}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:1,title:u(p.showUserAgentShadowDOM),settingName:"showUAShadowDOM",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:2,title:u(p.wordWrap),settingName:"domWordWrap",settingType:i.Settings.SettingType.BOOLEAN,options:[{value:!0,title:u(p.enableDomWordWrap)},{value:!1,title:u(p.disableDomWordWrap)}],defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:3,title:u(p.showHtmlComments),settingName:"showHTMLComments",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:u(p.showHtmlComments)},{value:!1,title:u(p.hideHtmlComments)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:4,title:u(p.revealDomNodeOnHover),settingName:"highlightNodeOnHoverInOverlay",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:5,title:u(p.showDetailedInspectTooltip),settingName:"showDetailedInspectTooltip",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({settingName:"showEventListenersForAncestors",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ADORNER,storageType:i.Settings.SettingStorageType.Synced,settingName:"adornerSettings",settingType:i.Settings.SettingType.ARRAY,defaultValue:[]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,title:u(p.showCSSDocumentationTooltip),settingName:"showCSSPropertyDocumentationOnHover",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),t.ContextMenu.registerProvider({contextTypes:()=>[n.RemoteObject.RemoteObject,n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadProvider:async()=>(await h()).ElementsPanel.ContextMenuProvider.instance(),experiment:void 0}),t.ViewManager.registerLocationResolver({name:"elements-sidebar",category:t.ViewManager.ViewLocationCategory.ELEMENTS,loadResolver:async()=>(await h()).ElementsPanel.ElementsPanel.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode,n.RemoteObject.RemoteObject],destination:i.Revealer.RevealerDestination.ELEMENTS_PANEL,loadRevealer:async()=>(await h()).ElementsPanel.DOMNodeRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.CSSProperty.CSSProperty],destination:i.Revealer.RevealerDestination.STYLES_SIDEBAR,loadRevealer:async()=>(await h()).ElementsPanel.CSSPropertyRevealer.instance()}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).LayersWidget.ButtonProvider.instance(),order:1,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).ElementStatePaneWidget.ButtonProvider.instance(),order:2,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).ClassesPaneWidget.ButtonProvider.instance(),order:3,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).StylesSidebarPane.ButtonProvider.instance(),order:100,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({actionId:"elements.toggle-element-search",location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:0,showLabel:void 0,condition:void 0,separator:void 0,loadItem:void 0}),t.UIUtils.registerRenderer({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadRenderer:async()=>(await h()).ElementsTreeOutline.Renderer.instance()}),i.Linkifier.registerLinkifier({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadLinkifier:async()=>(await h()).DOMLinkifier.Linkifier.instance()});const E={showEventListenerBreakpoints:"Show Event Listener Breakpoints",eventListenerBreakpoints:"Event Listener Breakpoints",showCspViolationBreakpoints:"Show CSP Violation Breakpoints",cspViolationBreakpoints:"CSP Violation Breakpoints",showXhrfetchBreakpoints:"Show XHR/fetch Breakpoints",xhrfetchBreakpoints:"XHR/fetch Breakpoints",showDomBreakpoints:"Show DOM Breakpoints",domBreakpoints:"DOM Breakpoints",showGlobalListeners:"Show Global Listeners",globalListeners:"Global Listeners",page:"Page",showPage:"Show Page",overrides:"Overrides",showOverrides:"Show Overrides",contentScripts:"Content scripts",showContentScripts:"Show Content scripts"},R=e.i18n.registerUIStrings("panels/browser_debugger/browser_debugger-meta.ts",E),v=e.i18n.getLazilyComputedLocalizedString.bind(void 0,R);let T,P;async function C(){return T||(T=await import("../../panels/browser_debugger/browser_debugger.js")),T}async function b(){return P||(P=await import("../../panels/sources/sources.js")),P}t.ViewManager.registerViewExtension({loadView:async()=>(await C()).EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane.instance(),id:"sources.eventListenerBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showEventListenerBreakpoints),title:v(E.eventListenerBreakpoints),order:9,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).CSPViolationBreakpointsSidebarPane.CSPViolationBreakpointsSidebarPane.instance(),id:"sources.cspViolationBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showCspViolationBreakpoints),title:v(E.cspViolationBreakpoints),order:10,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance(),id:"sources.xhrBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showXhrfetchBreakpoints),title:v(E.xhrfetchBreakpoints),order:5,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"sources.domBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showDomBreakpoints),title:v(E.domBreakpoints),order:7,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).ObjectEventListenersSidebarPane.ObjectEventListenersSidebarPane.instance(),id:"sources.globalListeners",location:"sources.sidebar-bottom",commandPrompt:v(E.showGlobalListeners),title:v(E.globalListeners),order:8,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"elements.domBreakpoints",location:"elements-sidebar",commandPrompt:v(E.showDomBreakpoints),title:v(E.domBreakpoints),order:6,persistence:"permanent"}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:v(E.page),commandPrompt:v(E.showPage),order:2,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.NetworkNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-overrides",title:v(E.overrides),commandPrompt:v(E.showOverrides),order:4,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.OverridesNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-contentScripts",title:v(E.contentScripts),commandPrompt:v(E.showContentScripts),order:5,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.ContentScriptsNavigatorView.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[n.DOMModel.DOMNode],loadProvider:async()=>(await C()).DOMBreakpointsSidebarPane.ContextMenuProvider.instance(),experiment:void 0}),t.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await C()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance()}),t.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance()});const f={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},L=e.i18n.registerUIStrings("panels/network/network-meta.ts",f),N=e.i18n.getLazilyComputedLocalizedString.bind(void 0,L);let I;async function M(){return I||(I=await import("../../panels/network/network.js")),I}function D(e){return void 0===I?[]:e(I)}t.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:N(f.showNetwork),title:N(f.network),order:40,loadView:async()=>(await M()).NetworkPanel.NetworkPanel.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:N(f.showNetworkRequestBlocking),title:N(f.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await M()).BlockedURLsPane.BlockedURLsPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:N(f.showNetworkConditions),title:N(f.networkConditions),persistence:"closeable",order:40,tags:[N(f.diskCache),N(f.networkThrottling),e.i18n.lockedLazyString("useragent"),e.i18n.lockedLazyString("user agent"),e.i18n.lockedLazyString("user-agent")],loadView:async()=>(await M()).NetworkConfigView.NetworkConfigView.instance()}),t.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:N(f.showSearch),title:N(f.search),persistence:"permanent",loadView:async()=>(await M()).NetworkPanel.SearchNetworkView.instance()}),t.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:t.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:N(f.recordNetworkLog)},{value:!1,title:N(f.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.clear",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.clear),iconClass:"clear",loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.hideRequestDetails),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.search",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.search),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,storageType:i.Settings.SettingStorageType.Synced,title:N(f.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[N(f.colorCode),N(f.resourceType)],options:[{value:!0,title:N(f.colorCodeByResourceType)},{value:!1,title:N(f.useDefaultColors)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,storageType:i.Settings.SettingStorageType.Synced,title:N(f.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[N(f.netWork),N(f.frame),N(f.group)],options:[{value:!0,title:N(f.groupNetworkLogItemsByFrame)},{value:!1,title:N(f.dontGroupNetworkLogItemsByFrame)}]}),t.ViewManager.registerLocationResolver({name:"network-sidebar",category:t.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await M()).NetworkPanel.NetworkPanel.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[n.NetworkRequest.NetworkRequest,n.Resource.Resource,a.UISourceCode.UISourceCode],loadProvider:async()=>(await M()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),i.Revealer.registerRevealer({contextTypes:()=>[n.NetworkRequest.NetworkRequest],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.RequestRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[r.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await M()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),i.Revealer.registerRevealer({contextTypes:()=>[r.NetworkRequestId.NetworkRequestId],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.RequestIdRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[r.UIFilter.UIRequestFilter],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const x={security:"Security",showSecurity:"Show Security"},k=e.i18n.registerUIStrings("panels/security/security-meta.ts",x),V=e.i18n.getLazilyComputedLocalizedString.bind(void 0,k);let O;t.ViewManager.registerViewExtension({location:"panel",id:"security",title:V(x.security),commandPrompt:V(x.showSecurity),order:80,persistence:"closeable",loadView:async()=>(await async function(){return O||(O=await import("../../panels/security/security.js")),O}()).SecurityPanel.SecurityPanel.instance()});const B={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},_=e.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",B),U=e.i18n.getLazilyComputedLocalizedString.bind(void 0,_);let z;async function W(){return z||(z=await import("../../panels/emulation/emulation.js")),z}t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureScreenshot)}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureFullSizeScreenshot)}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureNodeScreenshot)}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showMediaQueries)},{value:!1,title:U(B.hideMediaQueries)}],tags:[U(B.device)]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showRulers)},{value:!1,title:U(B.hideRulers)}],tags:[U(B.device)]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showDeviceFrame)},{value:!1,title:U(B.hideDeviceFrame)}],tags:[U(B.device)]}),t.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:o.Runtime.ConditionName.CAN_DOCK,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),i.AppProvider.registerAppProvider({loadAppProvider:async()=>(await W()).AdvancedApp.AdvancedAppProvider.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,order:0}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const F={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},j=e.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",F),H=e.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let K,q;async function G(){return K||(K=await import("../../panels/sensors/sensors.js")),K}t.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:H(F.showSensors),title:H(F.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await G()).SensorsView.SensorsView.instance(),tags:[H(F.geolocation),H(F.timezones),H(F.locale),H(F.locales),H(F.accelerometer),H(F.deviceOrientation)]}),t.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:H(F.showLocations),title:H(F.locations),order:40,loadView:async()=>(await G()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),i.Settings.registerSettingExtension({storageType:i.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:i.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),i.Settings.registerSettingExtension({title:H(F.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:i.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:H(F.devicebased),text:H(F.devicebased)},{value:"force",title:H(F.forceEnabled),text:H(F.forceEnabled)}]}),i.Settings.registerSettingExtension({title:H(F.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:i.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:H(F.noIdleEmulation),text:H(F.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:H(F.userActiveScreenUnlocked),text:H(F.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:H(F.userActiveScreenLocked),text:H(F.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:H(F.userIdleScreenUnlocked),text:H(F.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:H(F.userIdleScreenLocked),text:H(F.userIdleScreenLocked)}]});const Y={accessibility:"Accessibility",shoAccessibility:"Show Accessibility"},J=e.i18n.registerUIStrings("panels/accessibility/accessibility-meta.ts",Y),X=e.i18n.getLazilyComputedLocalizedString.bind(void 0,J);let Q;t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"accessibility.view",title:X(Y.accessibility),commandPrompt:X(Y.shoAccessibility),order:10,persistence:"permanent",loadView:async()=>(await async function(){return q||(q=await import("../../panels/accessibility/accessibility.js")),q}()).AccessibilitySidebarView.AccessibilitySidebarView.instance()});const Z={animations:"Animations",showAnimations:"Show Animations"},$=e.i18n.registerUIStrings("panels/animation/animation-meta.ts",Z),ee=e.i18n.getLazilyComputedLocalizedString.bind(void 0,$);t.ViewManager.registerViewExtension({location:"drawer-view",id:"animations",title:ee(Z.animations),commandPrompt:ee(Z.showAnimations),persistence:"closeable",order:0,loadView:async()=>(await async function(){return Q||(Q=await import("../../panels/animation/animation.js")),Q}()).AnimationTimeline.AnimationTimeline.instance()});const te={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},ie=e.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",te),oe=e.i18n.getLazilyComputedLocalizedString.bind(void 0,ie);let ne;t.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:oe(te.developerResources),commandPrompt:oe(te.showDeveloperResources),order:100,persistence:"closeable",experiment:o.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return ne||(ne=await import("../../panels/developer_resources/developer_resources.js")),ne}()).DeveloperResourcesView.DeveloperResourcesView)});const ae={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},re=e.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",ae),se=e.i18n.getLazilyComputedLocalizedString.bind(void 0,re);let ce;async function le(){return ce||(ce=await import("../inspector_main/inspector_main.js")),ce}t.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:se(ae.rendering),commandPrompt:se(ae.showRendering),persistence:"closeable",order:50,loadView:async()=>(await le()).RenderingOptions.RenderingOptionsView.instance(),tags:[se(ae.paint),se(ae.layout),se(ae.fps),se(ae.cssMediaType),se(ae.cssMediaFeature),se(ae.visionDeficiency),se(ae.colorVisionDeficiency)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await le()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:se(ae.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await le()).InspectorMain.ReloadActionDelegate.instance(),title:se(ae.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),t.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:t.ActionRegistration.ActionCategory.RENDERING,title:se(ae.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await le()).RenderingOptions.ReloadActionDelegate.instance()}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,title:se(ae.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:i.Settings.SettingType.BOOLEAN,storageType:i.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:se(ae.blockAds)},{value:!1,title:se(ae.showAds)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.GLOBAL,storageType:i.Settings.SettingStorageType.Synced,title:se(ae.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:i.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:se(ae.autoOpenDevTools)},{value:!1,title:se(ae.doNotAutoOpen)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.APPEARANCE,storageType:i.Settings.SettingStorageType.Synced,title:se(ae.disablePaused),settingName:"disablePausedStateOverlay",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await le()).InspectorMain.NodeIndicator.instance(),order:2,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await le()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:o.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const ge={application:"Application",showApplication:"Show Application",pwa:"pwa",clearSiteData:"Clear site data",clearSiteDataIncludingThirdparty:"Clear site data (including third-party cookies)",startRecordingEvents:"Start recording events",stopRecordingEvents:"Stop recording events"},de=e.i18n.registerUIStrings("panels/application/application-meta.ts",ge),me=e.i18n.getLazilyComputedLocalizedString.bind(void 0,de);let pe;async function we(){return pe||(pe=await import("../../panels/application/application.js")),pe}t.ViewManager.registerViewExtension({location:"panel",id:"resources",title:me(ge.application),commandPrompt:me(ge.showApplication),order:70,loadView:async()=>(await we()).ResourcesPanel.ResourcesPanel.instance(),tags:[me(ge.pwa)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear",title:me(ge.clearSiteData),loadActionDelegate:async()=>(await we()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear-incl-third-party-cookies",title:me(ge.clearSiteDataIncludingThirdparty),loadActionDelegate:async()=>(await we()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"background-service.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===pe?[]:(e=>[e.BackgroundServiceView.BackgroundServiceView])(pe),loadActionDelegate:async()=>(await we()).BackgroundServiceView.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.BACKGROUND_SERVICES,options:[{value:!0,title:me(ge.startRecordingEvents)},{value:!1,title:me(ge.stopRecordingEvents)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.Revealer.registerRevealer({contextTypes:()=>[n.Resource.Resource],destination:i.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await we()).ResourcesPanel.ResourceRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.ResourceTreeModel.ResourceTreeFrame],destination:i.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await we()).ResourcesPanel.FrameDetailsRevealer.instance()});const ue={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},ye=e.i18n.registerUIStrings("panels/issues/issues-meta.ts",ue),Se=e.i18n.getLazilyComputedLocalizedString.bind(void 0,ye);let he;async function Ae(){return he||(he=await import("../../panels/issues/issues.js")),he}t.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:Se(ue.issues),commandPrompt:Se(ue.showIssues),order:100,persistence:"closeable",loadView:async()=>(await Ae()).IssuesPane.IssuesPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:Se(ue.cspViolations),commandPrompt:Se(ue.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await Ae()).CSPViolationsView.CSPViolationsView.instance(),experiment:o.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),i.Revealer.registerRevealer({contextTypes:()=>[s.Issue.Issue],destination:i.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await Ae()).IssueRevealer.IssueRevealer.instance()});const Ee={layers:"Layers",showLayers:"Show Layers"},Re=e.i18n.registerUIStrings("panels/layers/layers-meta.ts",Ee),ve=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Re);let Te;t.ViewManager.registerViewExtension({location:"panel",id:"layers",title:ve(Ee.layers),commandPrompt:ve(Ee.showLayers),order:100,persistence:"closeable",loadView:async()=>(await async function(){return Te||(Te=await import("../../panels/layers/layers.js")),Te}()).LayersPanel.LayersPanel.instance()});const Pe={showLighthouse:"Show `Lighthouse`"},Ce=e.i18n.registerUIStrings("panels/lighthouse/lighthouse-meta.ts",Pe),be=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Ce);let fe;t.ViewManager.registerViewExtension({location:"panel",id:"lighthouse",title:e.i18n.lockedLazyString("Lighthouse"),commandPrompt:be(Pe.showLighthouse),order:90,loadView:async()=>(await async function(){return fe||(fe=await import("../../panels/lighthouse/lighthouse.js")),fe}()).LighthousePanel.LighthousePanel.instance(),tags:[e.i18n.lockedLazyString("lighthouse"),e.i18n.lockedLazyString("pwa")]});const Le={media:"Media",video:"video",showMedia:"Show Media"},Ne=e.i18n.registerUIStrings("panels/media/media-meta.ts",Le),Ie=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Ne);let Me;t.ViewManager.registerViewExtension({location:"panel",id:"medias",title:Ie(Le.media),commandPrompt:Ie(Le.showMedia),persistence:"closeable",order:100,loadView:async()=>(await async function(){return Me||(Me=await import("../../panels/media/media.js")),Me}()).MainView.MainView.instance(),tags:[Ie(Le.media),Ie(Le.video)]});const De={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},xe=e.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",De),ke=e.i18n.getLazilyComputedLocalizedString.bind(void 0,xe);let Ve;async function Oe(){return Ve||(Ve=await import("../../panels/mobile_throttling/mobile_throttling.js")),Ve}t.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:ke(De.throttling),commandPrompt:ke(De.showThrottling),order:35,loadView:async()=>(await Oe()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.goOffline),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.enableSlowGThrottling),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.enableFastGThrottling),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.goOnline),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),i.Settings.registerSettingExtension({storageType:i.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:i.Settings.SettingType.ARRAY,defaultValue:[]});const Be={performanceMonitor:"Performance monitor",performance:"performance",systemMonitor:"system monitor",monitor:"monitor",activity:"activity",metrics:"metrics",showPerformanceMonitor:"Show Performance monitor"},_e=e.i18n.registerUIStrings("panels/performance_monitor/performance_monitor-meta.ts",Be),Ue=e.i18n.getLazilyComputedLocalizedString.bind(void 0,_e);let ze;t.ViewManager.registerViewExtension({location:"drawer-view",id:"performance.monitor",title:Ue(Be.performanceMonitor),commandPrompt:Ue(Be.showPerformanceMonitor),persistence:"closeable",order:100,loadView:async()=>(await async function(){return ze||(ze=await import("../../panels/performance_monitor/performance_monitor.js")),ze}()).PerformanceMonitor.PerformanceMonitorImpl.instance(),tags:[Ue(Be.performance),Ue(Be.systemMonitor),Ue(Be.monitor),Ue(Be.activity),Ue(Be.metrics)]});const We={performance:"Performance",showPerformance:"Show Performance",javascriptProfiler:"JavaScript Profiler",showJavascriptProfiler:"Show JavaScript Profiler",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view",startStopRecording:"Start/stop recording"},Fe=e.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",We),je=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Fe);let He,Ke;async function qe(){return He||(He=await import("../../panels/timeline/timeline.js")),He}async function Ge(){return Ke||(Ke=await import("../../panels/profiler/profiler.js")),Ke}function Ye(e){return void 0===He?[]:e(He)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:je(We.performance),commandPrompt:je(We.showPerformance),order:50,loadView:async()=>(await qe()).TimelinePanel.TimelinePanel.instance()}),t.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:je(We.javascriptProfiler),commandPrompt:je(We.showJavascriptProfiler),persistence:"closeable",order:65,experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Ge()).ProfilesPanel.JSProfilerPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:je(We.record)},{value:!1,title:je(We.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.startProfilingAndReloadPage),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.previousFrame),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.nextFrame),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.showRecentTimelineSessions),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.previousRecording),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.nextRecording),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),t.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:t.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:je(We.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===Ke?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(Ke),loadActionDelegate:async()=>(await Ge()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.PERFORMANCE,storageType:i.Settings.SettingStorageType.Synced,title:je(We.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Linkifier.registerLinkifier({contextTypes:()=>Ye((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await qe()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const Je={webaudio:"WebAudio",audio:"audio",showWebaudio:"Show WebAudio"},Xe=e.i18n.registerUIStrings("panels/web_audio/web_audio-meta.ts",Je),Qe=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Xe);let Ze;t.ViewManager.registerViewExtension({location:"drawer-view",id:"web-audio",title:Qe(Je.webaudio),commandPrompt:Qe(Je.showWebaudio),persistence:"closeable",order:100,loadView:async()=>(await async function(){return Ze||(Ze=await import("../../panels/web_audio/web_audio.js")),Ze}()).WebAudioView.WebAudioView.instance(),tags:[Qe(Je.audio)]});const $e={webauthn:"WebAuthn",showWebauthn:"Show WebAuthn"},et=e.i18n.registerUIStrings("panels/webauthn/webauthn-meta.ts",$e),tt=e.i18n.getLazilyComputedLocalizedString.bind(void 0,et);let it;t.ViewManager.registerViewExtension({location:"drawer-view",id:"webauthn-pane",title:tt($e.webauthn),commandPrompt:tt($e.showWebauthn),order:100,persistence:"closeable",loadView:async()=>(await async function(){return it||(it=await import("../../panels/webauthn/webauthn.js")),it}()).WebauthnPane.WebauthnPaneImpl.instance(),experiment:o.Runtime.ExperimentName.WEBAUTHN_PANE});const ot={resetView:"Reset view",switchToPanMode:"Switch to pan mode",switchToRotateMode:"Switch to rotate mode",zoomIn:"Zoom in",zoomOut:"Zoom out",panOrRotateUp:"Pan or rotate up",panOrRotateDown:"Pan or rotate down",panOrRotateLeft:"Pan or rotate left",panOrRotateRight:"Pan or rotate right"},nt=e.i18n.registerUIStrings("panels/layer_viewer/layer_viewer-meta.ts",ot),at=e.i18n.getLazilyComputedLocalizedString.bind(void 0,nt);t.ActionRegistration.registerActionExtension({actionId:"layers.reset-view",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.resetView),bindings:[{shortcut:"0"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.pan-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.switchToPanMode),bindings:[{shortcut:"x"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.rotate-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.switchToRotateMode),bindings:[{shortcut:"v"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-in",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.zoomIn),bindings:[{shortcut:"Shift+Plus"},{shortcut:"NumpadPlus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-out",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.zoomOut),bindings:[{shortcut:"Shift+Minus"},{shortcut:"NumpadMinus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.up",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateUp),bindings:[{shortcut:"Up"},{shortcut:"w"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.down",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateDown),bindings:[{shortcut:"Down"},{shortcut:"s"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.left",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateLeft),bindings:[{shortcut:"Left"},{shortcut:"a"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.right",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateRight),bindings:[{shortcut:"Right"},{shortcut:"d"}]});const rt={recorder:"Recorder",showRecorder:"Show Recorder",startStopRecording:"Start/Stop recording",createRecording:"Create a new recording",replayRecording:"Replay recording",toggleCode:"Toggle code view"},st=e.i18n.registerUIStrings("panels/recorder/recorder-meta.ts",rt),ct=e.i18n.getLazilyComputedLocalizedString.bind(void 0,st);let lt;async function gt(){return lt||(lt=await import("../../panels/recorder/recorder.js")),lt}function dt(e,t){return void 0===lt?[]:t&<.RecorderPanel.RecorderPanel.instance().isActionPossible(t)?e(lt):[]}t.ViewManager.defaultOptionsForTabs.chrome_recorder=!0,t.ViewManager.registerViewExtension({location:"panel",id:"chrome_recorder",commandPrompt:ct(rt.showRecorder),title:ct(rt.recorder),order:90,persistence:"closeable",isPreviewFeature:!0,loadView:async()=>(await gt()).RecorderPanel.RecorderPanel.instance()}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.create-recording",title:ct(rt.createRecording),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.start-recording",title:ct(rt.startStopRecording),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.start-recording"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.replay-recording",title:ct(rt.replayRecording),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.replay-recording"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+Enter",platform:"windows,linux"},{shortcut:"Meta+Enter",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.toggle-code-view",title:ct(rt.toggleCode),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.toggle-code-view"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+B",platform:"windows,linux"},{shortcut:"Meta+B",platform:"mac"}]}),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),new c.MainImpl.MainImpl; +import"../shell/shell.js";import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/common/common.js";import*as o from"../../core/root/root.js";import*as n from"../../core/sdk/sdk.js";import*as a from"../../models/workspace/workspace.js";import*as r from"../../panels/network/forward/forward.js";import*as s from"../../models/issues_manager/issues_manager.js";import*as c from"../main/main.js";const l={cssOverview:"CSS Overview",showCssOverview:"Show CSS Overview"},g=e.i18n.registerUIStrings("panels/css_overview/css_overview-meta.ts",l),d=e.i18n.getLazilyComputedLocalizedString.bind(void 0,g);let m;t.ViewManager.registerViewExtension({location:"panel",id:"cssoverview",commandPrompt:d(l.showCssOverview),title:d(l.cssOverview),order:95,persistence:"closeable",async loadView(){const e=await async function(){return m||(m=await import("../../panels/css_overview/css_overview.js")),m}();return new e.CSSOverviewPanel.CSSOverviewPanel(new e.CSSOverviewController.OverviewController)},isPreviewFeature:!0});const p={showElements:"Show Elements",elements:"Elements",showEventListeners:"Show Event Listeners",eventListeners:"Event Listeners",showProperties:"Show Properties",properties:"Properties",showStackTrace:"Show Stack Trace",stackTrace:"Stack Trace",showLayout:"Show Layout",layout:"Layout",hideElement:"Hide element",editAsHtml:"Edit as HTML",duplicateElement:"Duplicate element",undo:"Undo",redo:"Redo",captureAreaScreenshot:"Capture area screenshot",selectAnElementInThePageTo:"Select an element in the page to inspect it",wordWrap:"Word wrap",enableDomWordWrap:"Enable `DOM` word wrap",disableDomWordWrap:"Disable `DOM` word wrap",showHtmlComments:"Show `HTML` comments",hideHtmlComments:"Hide `HTML` comments",revealDomNodeOnHover:"Reveal `DOM` node on hover",showDetailedInspectTooltip:"Show detailed inspect tooltip",showCSSDocumentationTooltip:"Show CSS documentation tooltip",copyStyles:"Copy styles",showUserAgentShadowDOM:"Show user agent shadow `DOM`",showComputedStyles:"Show Computed Styles",showStyles:"Show Styles",toggleEyeDropper:"Toggle eye dropper"},w=e.i18n.registerUIStrings("panels/elements/elements-meta.ts",p),u=e.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let y,S;async function h(){return y||(y=await import("../../panels/elements/elements.js")),y}function A(e){return void 0===y?[]:e(y)}t.ViewManager.registerViewExtension({location:"panel",id:"elements",commandPrompt:u(p.showElements),title:u(p.elements),order:10,persistence:"permanent",hasToolbar:!1,loadView:async()=>(await h()).ElementsPanel.ElementsPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"elements.show-styles",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.showStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"elements.show-computed",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.showComputedStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.eventListeners",commandPrompt:u(p.showEventListeners),title:u(p.eventListeners),order:5,hasToolbar:!0,persistence:"permanent",loadView:async()=>(await h()).EventListenersWidget.EventListenersWidget.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.domProperties",commandPrompt:u(p.showProperties),title:u(p.properties),order:7,persistence:"permanent",loadView:async()=>(await h()).PropertiesWidget.PropertiesWidget.instance()}),t.ViewManager.registerViewExtension({experiment:o.Runtime.ExperimentName.CAPTURE_NODE_CREATION_STACKS,location:"elements-sidebar",id:"elements.domCreation",commandPrompt:u(p.showStackTrace),title:u(p.stackTrace),order:10,persistence:"permanent",loadView:async()=>(await h()).NodeStackTraceWidget.NodeStackTraceWidget.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.layout",commandPrompt:u(p.showLayout),title:u(p.layout),order:4,persistence:"permanent",loadView:async()=>(await async function(){return S||(S=await import("../../panels/elements/components/components.js")),S}()).LayoutPane.LayoutPane.instance().wrapper}),t.ActionRegistration.registerActionExtension({actionId:"elements.hide-element",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.hideElement),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"H"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.toggle-eye-dropper",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.toggleEyeDropper),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ColorSwatchPopoverIcon.ColorSwatchPopoverIcon])),bindings:[{shortcut:"c"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.edit-as-html",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.editAsHtml),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"F2"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.duplicate-element",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.duplicateElement),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Shift+Alt+Down"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.copy-styles",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.copyStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Alt+C",platform:"windows,linux"},{shortcut:"Meta+Alt+C",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.undo",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.undo),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Z",platform:"windows,linux"},{shortcut:"Meta+Z",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.redo",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.redo),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Y",platform:"windows,linux"},{shortcut:"Meta+Shift+Z",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.capture-area-screenshot",loadActionDelegate:async()=>(await h()).InspectElementModeController.ToggleSearchActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:u(p.captureAreaScreenshot),category:t.ActionRegistration.ActionCategory.SCREENSHOT}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.ELEMENTS,actionId:"elements.toggle-element-search",toggleable:!0,loadActionDelegate:async()=>(await h()).InspectElementModeController.ToggleSearchActionDelegate.instance(),title:u(p.selectAnElementInThePageTo),iconClass:"select-element",bindings:[{shortcut:"Ctrl+Shift+C",platform:"windows,linux"},{shortcut:"Meta+Shift+C",platform:"mac"}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:1,title:u(p.showUserAgentShadowDOM),settingName:"showUAShadowDOM",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:2,title:u(p.wordWrap),settingName:"domWordWrap",settingType:i.Settings.SettingType.BOOLEAN,options:[{value:!0,title:u(p.enableDomWordWrap)},{value:!1,title:u(p.disableDomWordWrap)}],defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:3,title:u(p.showHtmlComments),settingName:"showHTMLComments",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:u(p.showHtmlComments)},{value:!1,title:u(p.hideHtmlComments)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:4,title:u(p.revealDomNodeOnHover),settingName:"highlightNodeOnHoverInOverlay",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:5,title:u(p.showDetailedInspectTooltip),settingName:"showDetailedInspectTooltip",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({settingName:"showEventListenersForAncestors",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ADORNER,storageType:i.Settings.SettingStorageType.Synced,settingName:"adornerSettings",settingType:i.Settings.SettingType.ARRAY,defaultValue:[]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,title:u(p.showCSSDocumentationTooltip),settingName:"showCSSPropertyDocumentationOnHover",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),t.ContextMenu.registerProvider({contextTypes:()=>[n.RemoteObject.RemoteObject,n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadProvider:async()=>(await h()).ElementsPanel.ContextMenuProvider.instance(),experiment:void 0}),t.ViewManager.registerLocationResolver({name:"elements-sidebar",category:t.ViewManager.ViewLocationCategory.ELEMENTS,loadResolver:async()=>(await h()).ElementsPanel.ElementsPanel.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode,n.RemoteObject.RemoteObject],destination:i.Revealer.RevealerDestination.ELEMENTS_PANEL,loadRevealer:async()=>(await h()).ElementsPanel.DOMNodeRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.CSSProperty.CSSProperty],destination:i.Revealer.RevealerDestination.STYLES_SIDEBAR,loadRevealer:async()=>(await h()).ElementsPanel.CSSPropertyRevealer.instance()}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).LayersWidget.ButtonProvider.instance(),order:1,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).ElementStatePaneWidget.ButtonProvider.instance(),order:2,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).ClassesPaneWidget.ButtonProvider.instance(),order:3,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).StylesSidebarPane.ButtonProvider.instance(),order:100,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({actionId:"elements.toggle-element-search",location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:0,showLabel:void 0,condition:void 0,separator:void 0,loadItem:void 0}),t.UIUtils.registerRenderer({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadRenderer:async()=>(await h()).ElementsTreeOutline.Renderer.instance()}),i.Linkifier.registerLinkifier({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadLinkifier:async()=>(await h()).DOMLinkifier.Linkifier.instance()});const E={showEventListenerBreakpoints:"Show Event Listener Breakpoints",eventListenerBreakpoints:"Event Listener Breakpoints",showCspViolationBreakpoints:"Show CSP Violation Breakpoints",cspViolationBreakpoints:"CSP Violation Breakpoints",showXhrfetchBreakpoints:"Show XHR/fetch Breakpoints",xhrfetchBreakpoints:"XHR/fetch Breakpoints",showDomBreakpoints:"Show DOM Breakpoints",domBreakpoints:"DOM Breakpoints",showGlobalListeners:"Show Global Listeners",globalListeners:"Global Listeners",page:"Page",showPage:"Show Page",overrides:"Overrides",showOverrides:"Show Overrides",contentScripts:"Content scripts",showContentScripts:"Show Content scripts"},R=e.i18n.registerUIStrings("panels/browser_debugger/browser_debugger-meta.ts",E),v=e.i18n.getLazilyComputedLocalizedString.bind(void 0,R);let T,P;async function C(){return T||(T=await import("../../panels/browser_debugger/browser_debugger.js")),T}async function b(){return P||(P=await import("../../panels/sources/sources.js")),P}t.ViewManager.registerViewExtension({loadView:async()=>(await C()).EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane.instance(),id:"sources.eventListenerBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showEventListenerBreakpoints),title:v(E.eventListenerBreakpoints),order:9,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).CSPViolationBreakpointsSidebarPane.CSPViolationBreakpointsSidebarPane.instance(),id:"sources.cspViolationBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showCspViolationBreakpoints),title:v(E.cspViolationBreakpoints),order:10,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance(),id:"sources.xhrBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showXhrfetchBreakpoints),title:v(E.xhrfetchBreakpoints),order:5,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"sources.domBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showDomBreakpoints),title:v(E.domBreakpoints),order:7,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).ObjectEventListenersSidebarPane.ObjectEventListenersSidebarPane.instance(),id:"sources.globalListeners",location:"sources.sidebar-bottom",commandPrompt:v(E.showGlobalListeners),title:v(E.globalListeners),order:8,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"elements.domBreakpoints",location:"elements-sidebar",commandPrompt:v(E.showDomBreakpoints),title:v(E.domBreakpoints),order:6,persistence:"permanent"}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:v(E.page),commandPrompt:v(E.showPage),order:2,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.NetworkNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-overrides",title:v(E.overrides),commandPrompt:v(E.showOverrides),order:4,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.OverridesNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-contentScripts",title:v(E.contentScripts),commandPrompt:v(E.showContentScripts),order:5,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.ContentScriptsNavigatorView.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[n.DOMModel.DOMNode],loadProvider:async()=>(await C()).DOMBreakpointsSidebarPane.ContextMenuProvider.instance(),experiment:void 0}),t.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await C()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance()}),t.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance()});const f={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},L=e.i18n.registerUIStrings("panels/network/network-meta.ts",f),N=e.i18n.getLazilyComputedLocalizedString.bind(void 0,L);let I;async function M(){return I||(I=await import("../../panels/network/network.js")),I}function D(e){return void 0===I?[]:e(I)}t.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:N(f.showNetwork),title:N(f.network),order:40,condition:o.Runtime.ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL,loadView:async()=>(await M()).NetworkPanel.NetworkPanel.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:N(f.showNetworkRequestBlocking),title:N(f.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await M()).BlockedURLsPane.BlockedURLsPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:N(f.showNetworkConditions),title:N(f.networkConditions),persistence:"closeable",order:40,tags:[N(f.diskCache),N(f.networkThrottling),e.i18n.lockedLazyString("useragent"),e.i18n.lockedLazyString("user agent"),e.i18n.lockedLazyString("user-agent")],loadView:async()=>(await M()).NetworkConfigView.NetworkConfigView.instance()}),t.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:N(f.showSearch),title:N(f.search),persistence:"permanent",loadView:async()=>(await M()).NetworkPanel.SearchNetworkView.instance()}),t.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:t.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:N(f.recordNetworkLog)},{value:!1,title:N(f.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.clear",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.clear),iconClass:"clear",loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.hideRequestDetails),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.search",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.search),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,storageType:i.Settings.SettingStorageType.Synced,title:N(f.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[N(f.colorCode),N(f.resourceType)],options:[{value:!0,title:N(f.colorCodeByResourceType)},{value:!1,title:N(f.useDefaultColors)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,storageType:i.Settings.SettingStorageType.Synced,title:N(f.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[N(f.netWork),N(f.frame),N(f.group)],options:[{value:!0,title:N(f.groupNetworkLogItemsByFrame)},{value:!1,title:N(f.dontGroupNetworkLogItemsByFrame)}]}),t.ViewManager.registerLocationResolver({name:"network-sidebar",category:t.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await M()).NetworkPanel.NetworkPanel.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[n.NetworkRequest.NetworkRequest,n.Resource.Resource,a.UISourceCode.UISourceCode],loadProvider:async()=>(await M()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),i.Revealer.registerRevealer({contextTypes:()=>[n.NetworkRequest.NetworkRequest],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.RequestRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[r.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await M()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),i.Revealer.registerRevealer({contextTypes:()=>[r.NetworkRequestId.NetworkRequestId],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.RequestIdRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[r.UIFilter.UIRequestFilter],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const x={security:"Security",showSecurity:"Show Security"},k=e.i18n.registerUIStrings("panels/security/security-meta.ts",x),V=e.i18n.getLazilyComputedLocalizedString.bind(void 0,k);let O;t.ViewManager.registerViewExtension({location:"panel",id:"security",title:V(x.security),commandPrompt:V(x.showSecurity),order:80,persistence:"closeable",loadView:async()=>(await async function(){return O||(O=await import("../../panels/security/security.js")),O}()).SecurityPanel.SecurityPanel.instance()});const B={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},_=e.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",B),U=e.i18n.getLazilyComputedLocalizedString.bind(void 0,_);let z;async function W(){return z||(z=await import("../../panels/emulation/emulation.js")),z}t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureScreenshot)}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureFullSizeScreenshot)}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureNodeScreenshot)}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showMediaQueries)},{value:!1,title:U(B.hideMediaQueries)}],tags:[U(B.device)]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showRulers)},{value:!1,title:U(B.hideRulers)}],tags:[U(B.device)]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showDeviceFrame)},{value:!1,title:U(B.hideDeviceFrame)}],tags:[U(B.device)]}),t.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:o.Runtime.ConditionName.CAN_DOCK,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),i.AppProvider.registerAppProvider({loadAppProvider:async()=>(await W()).AdvancedApp.AdvancedAppProvider.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,order:0}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const F={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},j=e.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",F),H=e.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let K,q;async function G(){return K||(K=await import("../../panels/sensors/sensors.js")),K}t.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:H(F.showSensors),title:H(F.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await G()).SensorsView.SensorsView.instance(),tags:[H(F.geolocation),H(F.timezones),H(F.locale),H(F.locales),H(F.accelerometer),H(F.deviceOrientation)]}),t.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:H(F.showLocations),title:H(F.locations),order:40,loadView:async()=>(await G()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),i.Settings.registerSettingExtension({storageType:i.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:i.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),i.Settings.registerSettingExtension({title:H(F.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:i.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:H(F.devicebased),text:H(F.devicebased)},{value:"force",title:H(F.forceEnabled),text:H(F.forceEnabled)}]}),i.Settings.registerSettingExtension({title:H(F.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:i.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:H(F.noIdleEmulation),text:H(F.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:H(F.userActiveScreenUnlocked),text:H(F.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:H(F.userActiveScreenLocked),text:H(F.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:H(F.userIdleScreenUnlocked),text:H(F.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:H(F.userIdleScreenLocked),text:H(F.userIdleScreenLocked)}]});const Y={accessibility:"Accessibility",shoAccessibility:"Show Accessibility"},J=e.i18n.registerUIStrings("panels/accessibility/accessibility-meta.ts",Y),X=e.i18n.getLazilyComputedLocalizedString.bind(void 0,J);let Q;t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"accessibility.view",title:X(Y.accessibility),commandPrompt:X(Y.shoAccessibility),order:10,persistence:"permanent",loadView:async()=>(await async function(){return q||(q=await import("../../panels/accessibility/accessibility.js")),q}()).AccessibilitySidebarView.AccessibilitySidebarView.instance()});const Z={animations:"Animations",showAnimations:"Show Animations"},$=e.i18n.registerUIStrings("panels/animation/animation-meta.ts",Z),ee=e.i18n.getLazilyComputedLocalizedString.bind(void 0,$);t.ViewManager.registerViewExtension({location:"drawer-view",id:"animations",title:ee(Z.animations),commandPrompt:ee(Z.showAnimations),persistence:"closeable",order:0,loadView:async()=>(await async function(){return Q||(Q=await import("../../panels/animation/animation.js")),Q}()).AnimationTimeline.AnimationTimeline.instance()});const te={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},ie=e.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",te),oe=e.i18n.getLazilyComputedLocalizedString.bind(void 0,ie);let ne;t.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:oe(te.developerResources),commandPrompt:oe(te.showDeveloperResources),order:100,persistence:"closeable",experiment:o.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return ne||(ne=await import("../../panels/developer_resources/developer_resources.js")),ne}()).DeveloperResourcesView.DeveloperResourcesView)});const ae={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},re=e.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",ae),se=e.i18n.getLazilyComputedLocalizedString.bind(void 0,re);let ce;async function le(){return ce||(ce=await import("../inspector_main/inspector_main.js")),ce}t.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:se(ae.rendering),commandPrompt:se(ae.showRendering),persistence:"closeable",order:50,loadView:async()=>(await le()).RenderingOptions.RenderingOptionsView.instance(),tags:[se(ae.paint),se(ae.layout),se(ae.fps),se(ae.cssMediaType),se(ae.cssMediaFeature),se(ae.visionDeficiency),se(ae.colorVisionDeficiency)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await le()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:se(ae.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await le()).InspectorMain.ReloadActionDelegate.instance(),title:se(ae.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),t.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:t.ActionRegistration.ActionCategory.RENDERING,title:se(ae.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await le()).RenderingOptions.ReloadActionDelegate.instance()}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,title:se(ae.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:i.Settings.SettingType.BOOLEAN,storageType:i.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:se(ae.blockAds)},{value:!1,title:se(ae.showAds)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.GLOBAL,storageType:i.Settings.SettingStorageType.Synced,title:se(ae.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:i.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:se(ae.autoOpenDevTools)},{value:!1,title:se(ae.doNotAutoOpen)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.APPEARANCE,storageType:i.Settings.SettingStorageType.Synced,title:se(ae.disablePaused),settingName:"disablePausedStateOverlay",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await le()).InspectorMain.NodeIndicator.instance(),order:2,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await le()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:o.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const ge={application:"Application",showApplication:"Show Application",pwa:"pwa",clearSiteData:"Clear site data",clearSiteDataIncludingThirdparty:"Clear site data (including third-party cookies)",startRecordingEvents:"Start recording events",stopRecordingEvents:"Stop recording events"},de=e.i18n.registerUIStrings("panels/application/application-meta.ts",ge),me=e.i18n.getLazilyComputedLocalizedString.bind(void 0,de);let pe;async function we(){return pe||(pe=await import("../../panels/application/application.js")),pe}t.ViewManager.registerViewExtension({location:"panel",id:"resources",title:me(ge.application),commandPrompt:me(ge.showApplication),order:70,loadView:async()=>(await we()).ResourcesPanel.ResourcesPanel.instance(),tags:[me(ge.pwa)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear",title:me(ge.clearSiteData),loadActionDelegate:async()=>(await we()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear-incl-third-party-cookies",title:me(ge.clearSiteDataIncludingThirdparty),loadActionDelegate:async()=>(await we()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"background-service.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===pe?[]:(e=>[e.BackgroundServiceView.BackgroundServiceView])(pe),loadActionDelegate:async()=>(await we()).BackgroundServiceView.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.BACKGROUND_SERVICES,options:[{value:!0,title:me(ge.startRecordingEvents)},{value:!1,title:me(ge.stopRecordingEvents)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.Revealer.registerRevealer({contextTypes:()=>[n.Resource.Resource],destination:i.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await we()).ResourcesPanel.ResourceRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.ResourceTreeModel.ResourceTreeFrame],destination:i.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await we()).ResourcesPanel.FrameDetailsRevealer.instance()});const ue={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},ye=e.i18n.registerUIStrings("panels/issues/issues-meta.ts",ue),Se=e.i18n.getLazilyComputedLocalizedString.bind(void 0,ye);let he;async function Ae(){return he||(he=await import("../../panels/issues/issues.js")),he}t.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:Se(ue.issues),commandPrompt:Se(ue.showIssues),order:100,persistence:"closeable",loadView:async()=>(await Ae()).IssuesPane.IssuesPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:Se(ue.cspViolations),commandPrompt:Se(ue.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await Ae()).CSPViolationsView.CSPViolationsView.instance(),experiment:o.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),i.Revealer.registerRevealer({contextTypes:()=>[s.Issue.Issue],destination:i.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await Ae()).IssueRevealer.IssueRevealer.instance()});const Ee={layers:"Layers",showLayers:"Show Layers"},Re=e.i18n.registerUIStrings("panels/layers/layers-meta.ts",Ee),ve=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Re);let Te;t.ViewManager.registerViewExtension({location:"panel",id:"layers",title:ve(Ee.layers),commandPrompt:ve(Ee.showLayers),order:100,persistence:"closeable",loadView:async()=>(await async function(){return Te||(Te=await import("../../panels/layers/layers.js")),Te}()).LayersPanel.LayersPanel.instance()});const Pe={showLighthouse:"Show `Lighthouse`"},Ce=e.i18n.registerUIStrings("panels/lighthouse/lighthouse-meta.ts",Pe),be=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Ce);let fe;t.ViewManager.registerViewExtension({location:"panel",id:"lighthouse",title:e.i18n.lockedLazyString("Lighthouse"),commandPrompt:be(Pe.showLighthouse),order:90,loadView:async()=>(await async function(){return fe||(fe=await import("../../panels/lighthouse/lighthouse.js")),fe}()).LighthousePanel.LighthousePanel.instance(),tags:[e.i18n.lockedLazyString("lighthouse"),e.i18n.lockedLazyString("pwa")]});const Le={media:"Media",video:"video",showMedia:"Show Media"},Ne=e.i18n.registerUIStrings("panels/media/media-meta.ts",Le),Ie=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Ne);let Me;t.ViewManager.registerViewExtension({location:"panel",id:"medias",title:Ie(Le.media),commandPrompt:Ie(Le.showMedia),persistence:"closeable",order:100,loadView:async()=>(await async function(){return Me||(Me=await import("../../panels/media/media.js")),Me}()).MainView.MainView.instance(),tags:[Ie(Le.media),Ie(Le.video)]});const De={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},xe=e.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",De),ke=e.i18n.getLazilyComputedLocalizedString.bind(void 0,xe);let Ve;async function Oe(){return Ve||(Ve=await import("../../panels/mobile_throttling/mobile_throttling.js")),Ve}t.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:ke(De.throttling),commandPrompt:ke(De.showThrottling),order:35,loadView:async()=>(await Oe()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.goOffline),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.enableSlowGThrottling),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.enableFastGThrottling),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.goOnline),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),i.Settings.registerSettingExtension({storageType:i.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:i.Settings.SettingType.ARRAY,defaultValue:[]});const Be={performanceMonitor:"Performance monitor",performance:"performance",systemMonitor:"system monitor",monitor:"monitor",activity:"activity",metrics:"metrics",showPerformanceMonitor:"Show Performance monitor"},_e=e.i18n.registerUIStrings("panels/performance_monitor/performance_monitor-meta.ts",Be),Ue=e.i18n.getLazilyComputedLocalizedString.bind(void 0,_e);let ze;t.ViewManager.registerViewExtension({location:"drawer-view",id:"performance.monitor",title:Ue(Be.performanceMonitor),commandPrompt:Ue(Be.showPerformanceMonitor),persistence:"closeable",order:100,loadView:async()=>(await async function(){return ze||(ze=await import("../../panels/performance_monitor/performance_monitor.js")),ze}()).PerformanceMonitor.PerformanceMonitorImpl.instance(),tags:[Ue(Be.performance),Ue(Be.systemMonitor),Ue(Be.monitor),Ue(Be.activity),Ue(Be.metrics)]});const We={performance:"Performance",showPerformance:"Show Performance",javascriptProfiler:"JavaScript Profiler",showJavascriptProfiler:"Show JavaScript Profiler",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view",startStopRecording:"Start/stop recording"},Fe=e.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",We),je=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Fe);let He,Ke;async function qe(){return He||(He=await import("../../panels/timeline/timeline.js")),He}async function Ge(){return Ke||(Ke=await import("../../panels/profiler/profiler.js")),Ke}function Ye(e){return void 0===He?[]:e(He)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:je(We.performance),commandPrompt:je(We.showPerformance),order:50,loadView:async()=>(await qe()).TimelinePanel.TimelinePanel.instance()}),t.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:je(We.javascriptProfiler),commandPrompt:je(We.showJavascriptProfiler),persistence:"closeable",order:65,experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Ge()).ProfilesPanel.JSProfilerPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:je(We.record)},{value:!1,title:je(We.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.startProfilingAndReloadPage),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.previousFrame),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.nextFrame),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.showRecentTimelineSessions),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.previousRecording),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.nextRecording),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),t.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:t.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:je(We.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===Ke?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(Ke),loadActionDelegate:async()=>(await Ge()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.PERFORMANCE,storageType:i.Settings.SettingStorageType.Synced,title:je(We.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Linkifier.registerLinkifier({contextTypes:()=>Ye((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await qe()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const Je={webaudio:"WebAudio",audio:"audio",showWebaudio:"Show WebAudio"},Xe=e.i18n.registerUIStrings("panels/web_audio/web_audio-meta.ts",Je),Qe=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Xe);let Ze;t.ViewManager.registerViewExtension({location:"drawer-view",id:"web-audio",title:Qe(Je.webaudio),commandPrompt:Qe(Je.showWebaudio),persistence:"closeable",order:100,loadView:async()=>(await async function(){return Ze||(Ze=await import("../../panels/web_audio/web_audio.js")),Ze}()).WebAudioView.WebAudioView.instance(),tags:[Qe(Je.audio)]});const $e={webauthn:"WebAuthn",showWebauthn:"Show WebAuthn"},et=e.i18n.registerUIStrings("panels/webauthn/webauthn-meta.ts",$e),tt=e.i18n.getLazilyComputedLocalizedString.bind(void 0,et);let it;t.ViewManager.registerViewExtension({location:"drawer-view",id:"webauthn-pane",title:tt($e.webauthn),commandPrompt:tt($e.showWebauthn),order:100,persistence:"closeable",loadView:async()=>(await async function(){return it||(it=await import("../../panels/webauthn/webauthn.js")),it}()).WebauthnPane.WebauthnPaneImpl.instance(),experiment:o.Runtime.ExperimentName.WEBAUTHN_PANE});const ot={resetView:"Reset view",switchToPanMode:"Switch to pan mode",switchToRotateMode:"Switch to rotate mode",zoomIn:"Zoom in",zoomOut:"Zoom out",panOrRotateUp:"Pan or rotate up",panOrRotateDown:"Pan or rotate down",panOrRotateLeft:"Pan or rotate left",panOrRotateRight:"Pan or rotate right"},nt=e.i18n.registerUIStrings("panels/layer_viewer/layer_viewer-meta.ts",ot),at=e.i18n.getLazilyComputedLocalizedString.bind(void 0,nt);t.ActionRegistration.registerActionExtension({actionId:"layers.reset-view",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.resetView),bindings:[{shortcut:"0"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.pan-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.switchToPanMode),bindings:[{shortcut:"x"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.rotate-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.switchToRotateMode),bindings:[{shortcut:"v"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-in",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.zoomIn),bindings:[{shortcut:"Shift+Plus"},{shortcut:"NumpadPlus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-out",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.zoomOut),bindings:[{shortcut:"Shift+Minus"},{shortcut:"NumpadMinus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.up",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateUp),bindings:[{shortcut:"Up"},{shortcut:"w"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.down",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateDown),bindings:[{shortcut:"Down"},{shortcut:"s"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.left",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateLeft),bindings:[{shortcut:"Left"},{shortcut:"a"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.right",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateRight),bindings:[{shortcut:"Right"},{shortcut:"d"}]});const rt={recorder:"Recorder",showRecorder:"Show Recorder",startStopRecording:"Start/Stop recording",createRecording:"Create a new recording",replayRecording:"Replay recording",toggleCode:"Toggle code view"},st=e.i18n.registerUIStrings("panels/recorder/recorder-meta.ts",rt),ct=e.i18n.getLazilyComputedLocalizedString.bind(void 0,st);let lt;async function gt(){return lt||(lt=await import("../../panels/recorder/recorder.js")),lt}function dt(e,t){return void 0===lt?[]:t&<.RecorderPanel.RecorderPanel.instance().isActionPossible(t)?e(lt):[]}t.ViewManager.defaultOptionsForTabs.chrome_recorder=!0,t.ViewManager.registerViewExtension({location:"panel",id:"chrome_recorder",commandPrompt:ct(rt.showRecorder),title:ct(rt.recorder),order:90,persistence:"closeable",isPreviewFeature:!0,loadView:async()=>(await gt()).RecorderPanel.RecorderPanel.instance()}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.create-recording",title:ct(rt.createRecording),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.start-recording",title:ct(rt.startStopRecording),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.start-recording"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.replay-recording",title:ct(rt.replayRecording),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.replay-recording"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+Enter",platform:"windows,linux"},{shortcut:"Meta+Enter",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.toggle-code-view",title:ct(rt.toggleCode),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.toggle-code-view"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+B",platform:"windows,linux"},{shortcut:"Meta+B",platform:"mac"}]}),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),new c.MainImpl.MainImpl; diff --git a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js index 85fc7c66c401..bb0bb42f6f5e 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js +++ b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js @@ -1 +1 @@ -import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";import*as o from"../../core/i18n/i18n.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../main/main.js";const r={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},s=o.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",r),l=o.i18n.getLazilyComputedLocalizedString.bind(void 0,s);let c;async function g(){return c||(c=await import("../../panels/emulation/emulation.js")),c}i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureFullSizeScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showMediaQueries)},{value:!1,title:l(r.hideMediaQueries)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showRulers)},{value:!1,title:l(r.hideRulers)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showDeviceFrame)},{value:!1,title:l(r.hideDeviceFrame)}],tags:[l(r.device)]}),i.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:t.Runtime.ConditionName.CAN_DOCK,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await g()).AdvancedApp.AdvancedAppProvider.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,order:0}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const d={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},m=o.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",d),u=o.i18n.getLazilyComputedLocalizedString.bind(void 0,m);let p;async function S(){return p||(p=await import("../../panels/sensors/sensors.js")),p}i.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:u(d.showSensors),title:u(d.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await S()).SensorsView.SensorsView.instance(),tags:[u(d.geolocation),u(d.timezones),u(d.locale),u(d.locales),u(d.accelerometer),u(d.deviceOrientation)]}),i.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:u(d.showLocations),title:u(d.locations),order:40,loadView:async()=>(await S()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:e.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),e.Settings.registerSettingExtension({title:u(d.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.devicebased),text:u(d.devicebased)},{value:"force",title:u(d.forceEnabled),text:u(d.forceEnabled)}]}),e.Settings.registerSettingExtension({title:u(d.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.noIdleEmulation),text:u(d.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:u(d.userActiveScreenUnlocked),text:u(d.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:u(d.userActiveScreenLocked),text:u(d.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:u(d.userIdleScreenUnlocked),text:u(d.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:u(d.userIdleScreenLocked),text:u(d.userIdleScreenLocked)}]});const w={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},A=o.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",w),h=o.i18n.getLazilyComputedLocalizedString.bind(void 0,A);let y;i.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:h(w.developerResources),commandPrompt:h(w.showDeveloperResources),order:100,persistence:"closeable",experiment:t.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return y||(y=await import("../../panels/developer_resources/developer_resources.js")),y}()).DeveloperResourcesView.DeveloperResourcesView)});const R={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},E=o.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",R),v=o.i18n.getLazilyComputedLocalizedString.bind(void 0,E);let T;async function f(){return T||(T=await import("../inspector_main/inspector_main.js")),T}i.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:v(R.rendering),commandPrompt:v(R.showRendering),persistence:"closeable",order:50,loadView:async()=>(await f()).RenderingOptions.RenderingOptionsView.instance(),tags:[v(R.paint),v(R.layout),v(R.fps),v(R.cssMediaType),v(R.cssMediaFeature),v(R.visionDeficiency),v(R.colorVisionDeficiency)]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await f()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:v(R.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await f()).InspectorMain.ReloadActionDelegate.instance(),title:v(R.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),i.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:i.ActionRegistration.ActionCategory.RENDERING,title:v(R.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await f()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:v(R.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:v(R.blockAds)},{value:!1,title:v(R.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:v(R.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:v(R.autoOpenDevTools)},{value:!1,title:v(R.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:v(R.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await f()).InspectorMain.NodeIndicator.instance(),order:2,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await f()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:t.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const I={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},C=o.i18n.registerUIStrings("panels/issues/issues-meta.ts",I),N=o.i18n.getLazilyComputedLocalizedString.bind(void 0,C);let P;async function x(){return P||(P=await import("../../panels/issues/issues.js")),P}i.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:N(I.issues),commandPrompt:N(I.showIssues),order:100,persistence:"closeable",loadView:async()=>(await x()).IssuesPane.IssuesPane.instance()}),i.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:N(I.cspViolations),commandPrompt:N(I.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await x()).CSPViolationsView.CSPViolationsView.instance(),experiment:t.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),e.Revealer.registerRevealer({contextTypes:()=>[n.Issue.Issue],destination:e.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await x()).IssueRevealer.IssueRevealer.instance()});const D={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},b=o.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",D),O=o.i18n.getLazilyComputedLocalizedString.bind(void 0,b);let M;async function V(){return M||(M=await import("../../panels/mobile_throttling/mobile_throttling.js")),M}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:O(D.throttling),commandPrompt:O(D.showThrottling),order:35,loadView:async()=>(await V()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOffline),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableSlowGThrottling),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableFastGThrottling),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOnline),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const _={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},L=o.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",_),k=o.i18n.getLazilyComputedLocalizedString.bind(void 0,L);let U,z;async function F(){return z||(z=await import("../../panels/profiler/profiler.js")),z}async function B(){return U||(U=await import("../../panels/timeline/timeline.js")),U}function W(e){return void 0===U?[]:e(U)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:k(_.profiler),commandPrompt:k(_.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await F()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:k(_.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===z?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(z),loadActionDelegate:async()=>(await F()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(_.showRecentTimelineSessions),contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:k(_.record)},{value:!1,title:k(_.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(_.startProfilingAndReloadPage),loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const j={rnWelcome:"⚛️ Welcome",showRnWelcome:"Show React Native Welcome panel"},G=o.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",j),K=o.i18n.getLazilyComputedLocalizedString.bind(void 0,G);let H;i.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:K(j.rnWelcome),commandPrompt:K(j.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return H||(H=await import("../../panels/rn_welcome/rn_welcome.js")),H}()).RNWelcome.RNWelcomeImpl.instance(),experiment:t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI}),t.Runtime.experiments.register(t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,"Enable JavaScript Profiler (legacy)",!1),t.Runtime.experiments.register(t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,"Show React Native-specific UI",!1),t.Runtime.experiments.enableExperimentsByDefault([t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI]),self.runtime=t.Runtime.Runtime.instance({forceNew:!0}),new a.MainImpl.MainImpl; +import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/root/root.js";import*as o from"../../ui/legacy/legacy.js";import*as i from"../../core/i18n/i18n.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../../core/sdk/sdk.js";import*as r from"../../models/workspace/workspace.js";import*as s from"../../panels/network/forward/forward.js";import*as l from"../main/main.js";const c={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},g=i.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",c),d=i.i18n.getLazilyComputedLocalizedString.bind(void 0,g);let u;async function m(){return u||(u=await import("../../panels/emulation/emulation.js")),u}o.ActionRegistration.registerActionExtension({category:o.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),o.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:o.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.captureScreenshot)}),o.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:o.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.captureFullSizeScreenshot)}),o.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:o.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:d(c.showMediaQueries)},{value:!1,title:d(c.hideMediaQueries)}],tags:[d(c.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:d(c.showRulers)},{value:!1,title:d(c.hideRulers)}],tags:[d(c.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:d(c.showDeviceFrame)},{value:!1,title:d(c.hideDeviceFrame)}],tags:[d(c.device)]}),o.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:t.Runtime.ConditionName.CAN_DOCK,location:o.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await m()).AdvancedApp.AdvancedAppProvider.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,order:0}),o.ContextMenu.registerItem({location:o.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),o.ContextMenu.registerItem({location:o.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const p={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},w=i.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",p),S=i.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let y;async function R(){return y||(y=await import("../../panels/sensors/sensors.js")),y}o.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:S(p.showSensors),title:S(p.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await R()).SensorsView.SensorsView.instance(),tags:[S(p.geolocation),S(p.timezones),S(p.locale),S(p.locales),S(p.accelerometer),S(p.deviceOrientation)]}),o.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:S(p.showLocations),title:S(p.locations),order:40,loadView:async()=>(await R()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:e.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),e.Settings.registerSettingExtension({title:S(p.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:S(p.devicebased),text:S(p.devicebased)},{value:"force",title:S(p.forceEnabled),text:S(p.forceEnabled)}]}),e.Settings.registerSettingExtension({title:S(p.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:S(p.noIdleEmulation),text:S(p.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:S(p.userActiveScreenUnlocked),text:S(p.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:S(p.userActiveScreenLocked),text:S(p.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:S(p.userIdleScreenUnlocked),text:S(p.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:S(p.userIdleScreenLocked),text:S(p.userIdleScreenLocked)}]});const A={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},h=i.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",A),v=i.i18n.getLazilyComputedLocalizedString.bind(void 0,h);let E;o.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:v(A.developerResources),commandPrompt:v(A.showDeveloperResources),order:100,persistence:"closeable",experiment:t.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return E||(E=await import("../../panels/developer_resources/developer_resources.js")),E}()).DeveloperResourcesView.DeveloperResourcesView)});const T={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},N=i.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",T),f=i.i18n.getLazilyComputedLocalizedString.bind(void 0,N);let C;async function k(){return C||(C=await import("../inspector_main/inspector_main.js")),C}o.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:f(T.rendering),commandPrompt:f(T.showRendering),persistence:"closeable",order:50,loadView:async()=>(await k()).RenderingOptions.RenderingOptionsView.instance(),tags:[f(T.paint),f(T.layout),f(T.fps),f(T.cssMediaType),f(T.cssMediaFeature),f(T.visionDeficiency),f(T.colorVisionDeficiency)]}),o.ActionRegistration.registerActionExtension({category:o.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await k()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:f(T.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),o.ActionRegistration.registerActionExtension({category:o.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await k()).InspectorMain.ReloadActionDelegate.instance(),title:f(T.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),o.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:o.ActionRegistration.ActionCategory.RENDERING,title:f(T.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await k()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:f(T.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:f(T.blockAds)},{value:!1,title:f(T.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:f(T.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:f(T.autoOpenDevTools)},{value:!1,title:f(T.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:f(T.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),o.Toolbar.registerToolbarItem({loadItem:async()=>(await k()).InspectorMain.NodeIndicator.instance(),order:2,location:o.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),o.Toolbar.registerToolbarItem({loadItem:async()=>(await k()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:o.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:t.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const I={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},P=i.i18n.registerUIStrings("panels/issues/issues-meta.ts",I),x=i.i18n.getLazilyComputedLocalizedString.bind(void 0,P);let b;async function L(){return b||(b=await import("../../panels/issues/issues.js")),b}o.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:x(I.issues),commandPrompt:x(I.showIssues),order:100,persistence:"closeable",loadView:async()=>(await L()).IssuesPane.IssuesPane.instance()}),o.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:x(I.cspViolations),commandPrompt:x(I.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await L()).CSPViolationsView.CSPViolationsView.instance(),experiment:t.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),e.Revealer.registerRevealer({contextTypes:()=>[n.Issue.Issue],destination:e.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await L()).IssueRevealer.IssueRevealer.instance()});const D={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},V=i.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",D),O=i.i18n.getLazilyComputedLocalizedString.bind(void 0,V);let M;async function _(){return M||(M=await import("../../panels/mobile_throttling/mobile_throttling.js")),M}o.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:O(D.throttling),commandPrompt:O(D.showThrottling),order:35,loadView:async()=>(await _()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOffline),loadActionDelegate:async()=>(await _()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableSlowGThrottling),loadActionDelegate:async()=>(await _()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableFastGThrottling),loadActionDelegate:async()=>(await _()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOnline),loadActionDelegate:async()=>(await _()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const U={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},B=i.i18n.registerUIStrings("panels/network/network-meta.ts",U),F=i.i18n.getLazilyComputedLocalizedString.bind(void 0,B);let z;async function W(){return z||(z=await import("../../panels/network/network.js")),z}function j(e){return void 0===z?[]:e(z)}o.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:F(U.showNetwork),title:F(U.network),order:40,condition:t.Runtime.ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL,loadView:async()=>(await W()).NetworkPanel.NetworkPanel.instance()}),o.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:F(U.showNetworkRequestBlocking),title:F(U.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await W()).BlockedURLsPane.BlockedURLsPane.instance()}),o.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:F(U.showNetworkConditions),title:F(U.networkConditions),persistence:"closeable",order:40,tags:[F(U.diskCache),F(U.networkThrottling),i.i18n.lockedLazyString("useragent"),i.i18n.lockedLazyString("user agent"),i.i18n.lockedLazyString("user-agent")],loadView:async()=>(await W()).NetworkConfigView.NetworkConfigView.instance()}),o.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:F(U.showSearch),title:F(U.search),persistence:"permanent",loadView:async()=>(await W()).NetworkPanel.SearchNetworkView.instance()}),o.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:o.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:F(U.recordNetworkLog)},{value:!1,title:F(U.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),o.ActionRegistration.registerActionExtension({actionId:"network.clear",category:o.ActionRegistration.ActionCategory.NETWORK,title:F(U.clear),iconClass:"clear",loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),o.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:o.ActionRegistration.ActionCategory.NETWORK,title:F(U.hideRequestDetails),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),o.ActionRegistration.registerActionExtension({actionId:"network.search",category:o.ActionRegistration.ActionCategory.NETWORK,title:F(U.search),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:F(U.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[F(U.colorCode),F(U.resourceType)],options:[{value:!0,title:F(U.colorCodeByResourceType)},{value:!1,title:F(U.useDefaultColors)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:F(U.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[F(U.netWork),F(U.frame),F(U.group)],options:[{value:!0,title:F(U.groupNetworkLogItemsByFrame)},{value:!1,title:F(U.dontGroupNetworkLogItemsByFrame)}]}),o.ViewManager.registerLocationResolver({name:"network-sidebar",category:o.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await W()).NetworkPanel.NetworkPanel.instance()}),o.ContextMenu.registerProvider({contextTypes:()=>[a.NetworkRequest.NetworkRequest,a.Resource.Resource,r.UISourceCode.UISourceCode],loadProvider:async()=>(await W()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[a.NetworkRequest.NetworkRequest],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await W()).NetworkPanel.RequestRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[s.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await W()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[s.NetworkRequestId.NetworkRequestId],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await W()).NetworkPanel.RequestIdRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[s.UIFilter.UIRequestFilter],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await W()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const q={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},K=i.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",q),G=i.i18n.getLazilyComputedLocalizedString.bind(void 0,K);let H,J;async function Q(){return J||(J=await import("../../panels/profiler/profiler.js")),J}async function Y(){return H||(H=await import("../../panels/timeline/timeline.js")),H}function X(e){return void 0===H?[]:e(H)}o.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:G(q.profiler),commandPrompt:G(q.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance()}),o.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:o.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:G(q.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===J?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(J),loadActionDelegate:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),o.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await Y()).TimelinePanel.ActionDelegate.instance(),category:o.ActionRegistration.ActionCategory.PERFORMANCE,title:G(q.showRecentTimelineSessions),contextTypes:()=>X((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),o.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:o.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>X((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Y()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:G(q.record)},{value:!1,title:G(q.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),o.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>X((e=>[e.TimelinePanel.TimelinePanel])),category:o.ActionRegistration.ActionCategory.PERFORMANCE,title:G(q.startProfilingAndReloadPage),loadActionDelegate:async()=>(await Y()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const Z={rnWelcome:"⚛️ Welcome",showRnWelcome:"Show React Native Welcome panel"},$=i.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",Z),ee=i.i18n.getLazilyComputedLocalizedString.bind(void 0,$);let te;o.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:ee(Z.rnWelcome),commandPrompt:ee(Z.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return te||(te=await import("../../panels/rn_welcome/rn_welcome.js")),te}()).RNWelcome.RNWelcomeImpl.instance(),experiment:t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI}),t.Runtime.experiments.register(t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,"Enable JavaScript Profiler (legacy)",!1),t.Runtime.experiments.register(t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,"Show React Native-specific UI",!1),t.Runtime.experiments.enableExperimentsByDefault([t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI]),self.runtime=t.Runtime.Runtime.instance({forceNew:!0}),new l.MainImpl.MainImpl; diff --git a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/worker_app/worker_app.js b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/worker_app/worker_app.js index 379992bd6e67..eab4a9e84512 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/entrypoints/worker_app/worker_app.js +++ b/packages/debugger-frontend/dist/third-party/front_end/entrypoints/worker_app/worker_app.js @@ -1 +1 @@ -import"../shell/shell.js";import*as e from"../../core/sdk/sdk.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as n from"../../core/common/common.js";import*as r from"../../models/issues_manager/issues_manager.js";import*as a from"../../models/workspace/workspace.js";import*as s from"../../panels/network/forward/forward.js";import*as c from"../../panels/mobile_throttling/mobile_throttling.js";import*as l from"../../ui/legacy/components/utils/utils.js";import*as g from"../main/main.js";const d={showEventListenerBreakpoints:"Show Event Listener Breakpoints",eventListenerBreakpoints:"Event Listener Breakpoints",showCspViolationBreakpoints:"Show CSP Violation Breakpoints",cspViolationBreakpoints:"CSP Violation Breakpoints",showXhrfetchBreakpoints:"Show XHR/fetch Breakpoints",xhrfetchBreakpoints:"XHR/fetch Breakpoints",showDomBreakpoints:"Show DOM Breakpoints",domBreakpoints:"DOM Breakpoints",showGlobalListeners:"Show Global Listeners",globalListeners:"Global Listeners",page:"Page",showPage:"Show Page",overrides:"Overrides",showOverrides:"Show Overrides",contentScripts:"Content scripts",showContentScripts:"Show Content scripts"},w=i.i18n.registerUIStrings("panels/browser_debugger/browser_debugger-meta.ts",d),p=i.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let m,u;async function R(){return m||(m=await import("../../panels/browser_debugger/browser_debugger.js")),m}async function y(){return u||(u=await import("../../panels/sources/sources.js")),u}t.ViewManager.registerViewExtension({loadView:async()=>(await R()).EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane.instance(),id:"sources.eventListenerBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showEventListenerBreakpoints),title:p(d.eventListenerBreakpoints),order:9,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).CSPViolationBreakpointsSidebarPane.CSPViolationBreakpointsSidebarPane.instance(),id:"sources.cspViolationBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showCspViolationBreakpoints),title:p(d.cspViolationBreakpoints),order:10,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance(),id:"sources.xhrBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showXhrfetchBreakpoints),title:p(d.xhrfetchBreakpoints),order:5,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"sources.domBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showDomBreakpoints),title:p(d.domBreakpoints),order:7,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).ObjectEventListenersSidebarPane.ObjectEventListenersSidebarPane.instance(),id:"sources.globalListeners",location:"sources.sidebar-bottom",commandPrompt:p(d.showGlobalListeners),title:p(d.globalListeners),order:8,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"elements.domBreakpoints",location:"elements-sidebar",commandPrompt:p(d.showDomBreakpoints),title:p(d.domBreakpoints),order:6,persistence:"permanent"}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:p(d.page),commandPrompt:p(d.showPage),order:2,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.NetworkNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-overrides",title:p(d.overrides),commandPrompt:p(d.showOverrides),order:4,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.OverridesNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-contentScripts",title:p(d.contentScripts),commandPrompt:p(d.showContentScripts),order:5,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.ContentScriptsNavigatorView.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[e.DOMModel.DOMNode],loadProvider:async()=>(await R()).DOMBreakpointsSidebarPane.ContextMenuProvider.instance(),experiment:void 0}),t.Context.registerListener({contextTypes:()=>[e.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await R()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance()}),t.Context.registerListener({contextTypes:()=>[e.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance()});const h={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},A=i.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",h),S=i.i18n.getLazilyComputedLocalizedString.bind(void 0,A);let k;t.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:S(h.developerResources),commandPrompt:S(h.showDeveloperResources),order:100,persistence:"closeable",experiment:o.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return k||(k=await import("../../panels/developer_resources/developer_resources.js")),k}()).DeveloperResourcesView.DeveloperResourcesView)});const P={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},v=i.i18n.registerUIStrings("panels/issues/issues-meta.ts",P),E=i.i18n.getLazilyComputedLocalizedString.bind(void 0,v);let T;async function C(){return T||(T=await import("../../panels/issues/issues.js")),T}t.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:E(P.issues),commandPrompt:E(P.showIssues),order:100,persistence:"closeable",loadView:async()=>(await C()).IssuesPane.IssuesPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:E(P.cspViolations),commandPrompt:E(P.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await C()).CSPViolationsView.CSPViolationsView.instance(),experiment:o.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),n.Revealer.registerRevealer({contextTypes:()=>[r.Issue.Issue],destination:n.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await C()).IssueRevealer.IssueRevealer.instance()});const f={resetView:"Reset view",switchToPanMode:"Switch to pan mode",switchToRotateMode:"Switch to rotate mode",zoomIn:"Zoom in",zoomOut:"Zoom out",panOrRotateUp:"Pan or rotate up",panOrRotateDown:"Pan or rotate down",panOrRotateLeft:"Pan or rotate left",panOrRotateRight:"Pan or rotate right"},b=i.i18n.registerUIStrings("panels/layer_viewer/layer_viewer-meta.ts",f),N=i.i18n.getLazilyComputedLocalizedString.bind(void 0,b);t.ActionRegistration.registerActionExtension({actionId:"layers.reset-view",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.resetView),bindings:[{shortcut:"0"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.pan-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.switchToPanMode),bindings:[{shortcut:"x"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.rotate-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.switchToRotateMode),bindings:[{shortcut:"v"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-in",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.zoomIn),bindings:[{shortcut:"Shift+Plus"},{shortcut:"NumpadPlus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-out",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.zoomOut),bindings:[{shortcut:"Shift+Minus"},{shortcut:"NumpadMinus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.up",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateUp),bindings:[{shortcut:"Up"},{shortcut:"w"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.down",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateDown),bindings:[{shortcut:"Down"},{shortcut:"s"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.left",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateLeft),bindings:[{shortcut:"Left"},{shortcut:"a"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.right",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateRight),bindings:[{shortcut:"Right"},{shortcut:"d"}]});const x={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},V=i.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",x),L=i.i18n.getLazilyComputedLocalizedString.bind(void 0,V);let I;async function D(){return I||(I=await import("../../panels/mobile_throttling/mobile_throttling.js")),I}t.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:L(x.throttling),commandPrompt:L(x.showThrottling),order:35,loadView:async()=>(await D()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.goOffline),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.enableSlowGThrottling),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.enableFastGThrottling),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.goOnline),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),n.Settings.registerSettingExtension({storageType:n.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:n.Settings.SettingType.ARRAY,defaultValue:[]});const M={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},O=i.i18n.registerUIStrings("panels/network/network-meta.ts",M),B=i.i18n.getLazilyComputedLocalizedString.bind(void 0,O);let _;async function F(){return _||(_=await import("../../panels/network/network.js")),_}function j(e){return void 0===_?[]:e(_)}t.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:B(M.showNetwork),title:B(M.network),order:40,loadView:async()=>(await F()).NetworkPanel.NetworkPanel.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:B(M.showNetworkRequestBlocking),title:B(M.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await F()).BlockedURLsPane.BlockedURLsPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:B(M.showNetworkConditions),title:B(M.networkConditions),persistence:"closeable",order:40,tags:[B(M.diskCache),B(M.networkThrottling),i.i18n.lockedLazyString("useragent"),i.i18n.lockedLazyString("user agent"),i.i18n.lockedLazyString("user-agent")],loadView:async()=>(await F()).NetworkConfigView.NetworkConfigView.instance()}),t.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:B(M.showSearch),title:B(M.search),persistence:"permanent",loadView:async()=>(await F()).NetworkPanel.SearchNetworkView.instance()}),t.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:t.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:B(M.recordNetworkLog)},{value:!1,title:B(M.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.clear",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.clear),iconClass:"clear",loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.hideRequestDetails),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.search",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.search),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.NETWORK,storageType:n.Settings.SettingStorageType.Synced,title:B(M.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[B(M.colorCode),B(M.resourceType)],options:[{value:!0,title:B(M.colorCodeByResourceType)},{value:!1,title:B(M.useDefaultColors)}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.NETWORK,storageType:n.Settings.SettingStorageType.Synced,title:B(M.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[B(M.netWork),B(M.frame),B(M.group)],options:[{value:!0,title:B(M.groupNetworkLogItemsByFrame)},{value:!1,title:B(M.dontGroupNetworkLogItemsByFrame)}]}),t.ViewManager.registerLocationResolver({name:"network-sidebar",category:t.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await F()).NetworkPanel.NetworkPanel.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[e.NetworkRequest.NetworkRequest,e.Resource.Resource,a.UISourceCode.UISourceCode],loadProvider:async()=>(await F()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),n.Revealer.registerRevealer({contextTypes:()=>[e.NetworkRequest.NetworkRequest],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.RequestRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[s.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await F()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),n.Revealer.registerRevealer({contextTypes:()=>[s.NetworkRequestId.NetworkRequestId],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.RequestIdRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[s.UIFilter.UIRequestFilter],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const U={application:"Application",showApplication:"Show Application",pwa:"pwa",clearSiteData:"Clear site data",clearSiteDataIncludingThirdparty:"Clear site data (including third-party cookies)",startRecordingEvents:"Start recording events",stopRecordingEvents:"Stop recording events"},W=i.i18n.registerUIStrings("panels/application/application-meta.ts",U),z=i.i18n.getLazilyComputedLocalizedString.bind(void 0,W);let q;async function G(){return q||(q=await import("../../panels/application/application.js")),q}t.ViewManager.registerViewExtension({location:"panel",id:"resources",title:z(U.application),commandPrompt:z(U.showApplication),order:70,loadView:async()=>(await G()).ResourcesPanel.ResourcesPanel.instance(),tags:[z(U.pwa)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear",title:z(U.clearSiteData),loadActionDelegate:async()=>(await G()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear-incl-third-party-cookies",title:z(U.clearSiteDataIncludingThirdparty),loadActionDelegate:async()=>(await G()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"background-service.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===q?[]:(e=>[e.BackgroundServiceView.BackgroundServiceView])(q),loadActionDelegate:async()=>(await G()).BackgroundServiceView.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.BACKGROUND_SERVICES,options:[{value:!0,title:z(U.startRecordingEvents)},{value:!1,title:z(U.stopRecordingEvents)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.Revealer.registerRevealer({contextTypes:()=>[e.Resource.Resource],destination:n.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await G()).ResourcesPanel.ResourceRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[e.ResourceTreeModel.ResourceTreeFrame],destination:n.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await G()).ResourcesPanel.FrameDetailsRevealer.instance()});const K={performance:"Performance",showPerformance:"Show Performance",javascriptProfiler:"JavaScript Profiler",showJavascriptProfiler:"Show JavaScript Profiler",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view",startStopRecording:"Start/stop recording"},Y=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",K),H=i.i18n.getLazilyComputedLocalizedString.bind(void 0,Y);let J,X;async function Z(){return J||(J=await import("../../panels/timeline/timeline.js")),J}async function Q(){return X||(X=await import("../../panels/profiler/profiler.js")),X}function $(e){return void 0===J?[]:e(J)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:H(K.performance),commandPrompt:H(K.showPerformance),order:50,loadView:async()=>(await Z()).TimelinePanel.TimelinePanel.instance()}),t.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:H(K.javascriptProfiler),commandPrompt:H(K.showJavascriptProfiler),persistence:"closeable",order:65,experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:H(K.record)},{value:!1,title:H(K.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.startProfilingAndReloadPage),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.previousFrame),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.nextFrame),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.showRecentTimelineSessions),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.previousRecording),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.nextRecording),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),t.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:t.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:H(K.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===X?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(X),loadActionDelegate:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.PERFORMANCE,storageType:n.Settings.SettingStorageType.Synced,title:H(K.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1}),n.Linkifier.registerLinkifier({contextTypes:()=>$((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await Z()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const ee={main:"Main"},te=i.i18n.registerUIStrings("entrypoints/worker_app/WorkerMain.ts",ee),ie=i.i18n.getLocalizedString.bind(void 0,te);let oe;class ne{static instance(e={forceNew:null}){const{forceNew:t}=e;return oe&&!t||(oe=new ne),oe}async run(){e.Connections.initMainConnection((async()=>{await e.TargetManager.TargetManager.instance().maybeAttachInitialTarget()||e.TargetManager.TargetManager.instance().createTarget("main",ie(ee.main),e.Target.Type.ServiceWorker,null)}),l.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost),new c.NetworkPanelIndicator.NetworkPanelIndicator}}n.Runnable.registerEarlyInitializationRunnable(ne.instance),e.ChildTargetManager.ChildTargetManager.install((async({target:t,waitingForDebugger:i})=>{if(t.parentTarget()||t.type()!==e.Target.Type.ServiceWorker||!i)return;const o=t.model(e.DebuggerModel.DebuggerModel);o&&(o.isReadyToPause()||await o.once(e.DebuggerModel.Events.DebuggerIsReadyToPause),o.pause())})),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),new g.MainImpl.MainImpl; +import"../shell/shell.js";import*as e from"../../core/sdk/sdk.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as n from"../../core/common/common.js";import*as r from"../../models/issues_manager/issues_manager.js";import*as a from"../../models/workspace/workspace.js";import*as s from"../../panels/network/forward/forward.js";import*as c from"../../panels/mobile_throttling/mobile_throttling.js";import*as l from"../../ui/legacy/components/utils/utils.js";import*as g from"../main/main.js";const d={showEventListenerBreakpoints:"Show Event Listener Breakpoints",eventListenerBreakpoints:"Event Listener Breakpoints",showCspViolationBreakpoints:"Show CSP Violation Breakpoints",cspViolationBreakpoints:"CSP Violation Breakpoints",showXhrfetchBreakpoints:"Show XHR/fetch Breakpoints",xhrfetchBreakpoints:"XHR/fetch Breakpoints",showDomBreakpoints:"Show DOM Breakpoints",domBreakpoints:"DOM Breakpoints",showGlobalListeners:"Show Global Listeners",globalListeners:"Global Listeners",page:"Page",showPage:"Show Page",overrides:"Overrides",showOverrides:"Show Overrides",contentScripts:"Content scripts",showContentScripts:"Show Content scripts"},w=i.i18n.registerUIStrings("panels/browser_debugger/browser_debugger-meta.ts",d),p=i.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let m,u;async function R(){return m||(m=await import("../../panels/browser_debugger/browser_debugger.js")),m}async function y(){return u||(u=await import("../../panels/sources/sources.js")),u}t.ViewManager.registerViewExtension({loadView:async()=>(await R()).EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane.instance(),id:"sources.eventListenerBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showEventListenerBreakpoints),title:p(d.eventListenerBreakpoints),order:9,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).CSPViolationBreakpointsSidebarPane.CSPViolationBreakpointsSidebarPane.instance(),id:"sources.cspViolationBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showCspViolationBreakpoints),title:p(d.cspViolationBreakpoints),order:10,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance(),id:"sources.xhrBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showXhrfetchBreakpoints),title:p(d.xhrfetchBreakpoints),order:5,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"sources.domBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showDomBreakpoints),title:p(d.domBreakpoints),order:7,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).ObjectEventListenersSidebarPane.ObjectEventListenersSidebarPane.instance(),id:"sources.globalListeners",location:"sources.sidebar-bottom",commandPrompt:p(d.showGlobalListeners),title:p(d.globalListeners),order:8,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"elements.domBreakpoints",location:"elements-sidebar",commandPrompt:p(d.showDomBreakpoints),title:p(d.domBreakpoints),order:6,persistence:"permanent"}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:p(d.page),commandPrompt:p(d.showPage),order:2,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.NetworkNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-overrides",title:p(d.overrides),commandPrompt:p(d.showOverrides),order:4,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.OverridesNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-contentScripts",title:p(d.contentScripts),commandPrompt:p(d.showContentScripts),order:5,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.ContentScriptsNavigatorView.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[e.DOMModel.DOMNode],loadProvider:async()=>(await R()).DOMBreakpointsSidebarPane.ContextMenuProvider.instance(),experiment:void 0}),t.Context.registerListener({contextTypes:()=>[e.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await R()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance()}),t.Context.registerListener({contextTypes:()=>[e.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance()});const A={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},h=i.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",A),S=i.i18n.getLazilyComputedLocalizedString.bind(void 0,h);let k;t.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:S(A.developerResources),commandPrompt:S(A.showDeveloperResources),order:100,persistence:"closeable",experiment:o.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return k||(k=await import("../../panels/developer_resources/developer_resources.js")),k}()).DeveloperResourcesView.DeveloperResourcesView)});const P={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},v=i.i18n.registerUIStrings("panels/issues/issues-meta.ts",P),E=i.i18n.getLazilyComputedLocalizedString.bind(void 0,v);let T;async function C(){return T||(T=await import("../../panels/issues/issues.js")),T}t.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:E(P.issues),commandPrompt:E(P.showIssues),order:100,persistence:"closeable",loadView:async()=>(await C()).IssuesPane.IssuesPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:E(P.cspViolations),commandPrompt:E(P.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await C()).CSPViolationsView.CSPViolationsView.instance(),experiment:o.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),n.Revealer.registerRevealer({contextTypes:()=>[r.Issue.Issue],destination:n.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await C()).IssueRevealer.IssueRevealer.instance()});const f={resetView:"Reset view",switchToPanMode:"Switch to pan mode",switchToRotateMode:"Switch to rotate mode",zoomIn:"Zoom in",zoomOut:"Zoom out",panOrRotateUp:"Pan or rotate up",panOrRotateDown:"Pan or rotate down",panOrRotateLeft:"Pan or rotate left",panOrRotateRight:"Pan or rotate right"},b=i.i18n.registerUIStrings("panels/layer_viewer/layer_viewer-meta.ts",f),N=i.i18n.getLazilyComputedLocalizedString.bind(void 0,b);t.ActionRegistration.registerActionExtension({actionId:"layers.reset-view",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.resetView),bindings:[{shortcut:"0"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.pan-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.switchToPanMode),bindings:[{shortcut:"x"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.rotate-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.switchToRotateMode),bindings:[{shortcut:"v"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-in",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.zoomIn),bindings:[{shortcut:"Shift+Plus"},{shortcut:"NumpadPlus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-out",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.zoomOut),bindings:[{shortcut:"Shift+Minus"},{shortcut:"NumpadMinus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.up",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateUp),bindings:[{shortcut:"Up"},{shortcut:"w"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.down",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateDown),bindings:[{shortcut:"Down"},{shortcut:"s"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.left",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateLeft),bindings:[{shortcut:"Left"},{shortcut:"a"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.right",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateRight),bindings:[{shortcut:"Right"},{shortcut:"d"}]});const x={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},V=i.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",x),L=i.i18n.getLazilyComputedLocalizedString.bind(void 0,V);let I;async function D(){return I||(I=await import("../../panels/mobile_throttling/mobile_throttling.js")),I}t.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:L(x.throttling),commandPrompt:L(x.showThrottling),order:35,loadView:async()=>(await D()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.goOffline),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.enableSlowGThrottling),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.enableFastGThrottling),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.goOnline),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),n.Settings.registerSettingExtension({storageType:n.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:n.Settings.SettingType.ARRAY,defaultValue:[]});const M={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},O=i.i18n.registerUIStrings("panels/network/network-meta.ts",M),B=i.i18n.getLazilyComputedLocalizedString.bind(void 0,O);let _;async function F(){return _||(_=await import("../../panels/network/network.js")),_}function j(e){return void 0===_?[]:e(_)}t.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:B(M.showNetwork),title:B(M.network),order:40,condition:o.Runtime.ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL,loadView:async()=>(await F()).NetworkPanel.NetworkPanel.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:B(M.showNetworkRequestBlocking),title:B(M.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await F()).BlockedURLsPane.BlockedURLsPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:B(M.showNetworkConditions),title:B(M.networkConditions),persistence:"closeable",order:40,tags:[B(M.diskCache),B(M.networkThrottling),i.i18n.lockedLazyString("useragent"),i.i18n.lockedLazyString("user agent"),i.i18n.lockedLazyString("user-agent")],loadView:async()=>(await F()).NetworkConfigView.NetworkConfigView.instance()}),t.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:B(M.showSearch),title:B(M.search),persistence:"permanent",loadView:async()=>(await F()).NetworkPanel.SearchNetworkView.instance()}),t.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:t.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:B(M.recordNetworkLog)},{value:!1,title:B(M.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.clear",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.clear),iconClass:"clear",loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.hideRequestDetails),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.search",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.search),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.NETWORK,storageType:n.Settings.SettingStorageType.Synced,title:B(M.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[B(M.colorCode),B(M.resourceType)],options:[{value:!0,title:B(M.colorCodeByResourceType)},{value:!1,title:B(M.useDefaultColors)}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.NETWORK,storageType:n.Settings.SettingStorageType.Synced,title:B(M.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[B(M.netWork),B(M.frame),B(M.group)],options:[{value:!0,title:B(M.groupNetworkLogItemsByFrame)},{value:!1,title:B(M.dontGroupNetworkLogItemsByFrame)}]}),t.ViewManager.registerLocationResolver({name:"network-sidebar",category:t.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await F()).NetworkPanel.NetworkPanel.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[e.NetworkRequest.NetworkRequest,e.Resource.Resource,a.UISourceCode.UISourceCode],loadProvider:async()=>(await F()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),n.Revealer.registerRevealer({contextTypes:()=>[e.NetworkRequest.NetworkRequest],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.RequestRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[s.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await F()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),n.Revealer.registerRevealer({contextTypes:()=>[s.NetworkRequestId.NetworkRequestId],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.RequestIdRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[s.UIFilter.UIRequestFilter],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const U={application:"Application",showApplication:"Show Application",pwa:"pwa",clearSiteData:"Clear site data",clearSiteDataIncludingThirdparty:"Clear site data (including third-party cookies)",startRecordingEvents:"Start recording events",stopRecordingEvents:"Stop recording events"},W=i.i18n.registerUIStrings("panels/application/application-meta.ts",U),z=i.i18n.getLazilyComputedLocalizedString.bind(void 0,W);let q;async function G(){return q||(q=await import("../../panels/application/application.js")),q}t.ViewManager.registerViewExtension({location:"panel",id:"resources",title:z(U.application),commandPrompt:z(U.showApplication),order:70,loadView:async()=>(await G()).ResourcesPanel.ResourcesPanel.instance(),tags:[z(U.pwa)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear",title:z(U.clearSiteData),loadActionDelegate:async()=>(await G()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear-incl-third-party-cookies",title:z(U.clearSiteDataIncludingThirdparty),loadActionDelegate:async()=>(await G()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"background-service.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===q?[]:(e=>[e.BackgroundServiceView.BackgroundServiceView])(q),loadActionDelegate:async()=>(await G()).BackgroundServiceView.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.BACKGROUND_SERVICES,options:[{value:!0,title:z(U.startRecordingEvents)},{value:!1,title:z(U.stopRecordingEvents)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.Revealer.registerRevealer({contextTypes:()=>[e.Resource.Resource],destination:n.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await G()).ResourcesPanel.ResourceRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[e.ResourceTreeModel.ResourceTreeFrame],destination:n.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await G()).ResourcesPanel.FrameDetailsRevealer.instance()});const K={performance:"Performance",showPerformance:"Show Performance",javascriptProfiler:"JavaScript Profiler",showJavascriptProfiler:"Show JavaScript Profiler",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view",startStopRecording:"Start/stop recording"},Y=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",K),H=i.i18n.getLazilyComputedLocalizedString.bind(void 0,Y);let J,X;async function Z(){return J||(J=await import("../../panels/timeline/timeline.js")),J}async function Q(){return X||(X=await import("../../panels/profiler/profiler.js")),X}function $(e){return void 0===J?[]:e(J)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:H(K.performance),commandPrompt:H(K.showPerformance),order:50,loadView:async()=>(await Z()).TimelinePanel.TimelinePanel.instance()}),t.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:H(K.javascriptProfiler),commandPrompt:H(K.showJavascriptProfiler),persistence:"closeable",order:65,experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:H(K.record)},{value:!1,title:H(K.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.startProfilingAndReloadPage),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.previousFrame),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.nextFrame),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.showRecentTimelineSessions),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.previousRecording),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.nextRecording),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),t.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:t.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:H(K.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===X?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(X),loadActionDelegate:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.PERFORMANCE,storageType:n.Settings.SettingStorageType.Synced,title:H(K.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1}),n.Linkifier.registerLinkifier({contextTypes:()=>$((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await Z()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const ee={main:"Main"},te=i.i18n.registerUIStrings("entrypoints/worker_app/WorkerMain.ts",ee),ie=i.i18n.getLocalizedString.bind(void 0,te);let oe;class ne{static instance(e={forceNew:null}){const{forceNew:t}=e;return oe&&!t||(oe=new ne),oe}async run(){e.Connections.initMainConnection((async()=>{await e.TargetManager.TargetManager.instance().maybeAttachInitialTarget()||e.TargetManager.TargetManager.instance().createTarget("main",ie(ee.main),e.Target.Type.ServiceWorker,null)}),l.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost),new c.NetworkPanelIndicator.NetworkPanelIndicator}}n.Runnable.registerEarlyInitializationRunnable(ne.instance),e.ChildTargetManager.ChildTargetManager.install((async({target:t,waitingForDebugger:i})=>{if(t.parentTarget()||t.type()!==e.Target.Type.ServiceWorker||!i)return;const o=t.model(e.DebuggerModel.DebuggerModel);o&&(o.isReadyToPause()||await o.once(e.DebuggerModel.Events.DebuggerIsReadyToPause),o.pause())})),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),new g.MainImpl.MainImpl; diff --git a/packages/debugger-frontend/dist/third-party/front_end/panels/network/network-meta.js b/packages/debugger-frontend/dist/third-party/front_end/panels/network/network-meta.js index afef2ac0e09b..621d9f66abad 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/panels/network/network-meta.js +++ b/packages/debugger-frontend/dist/third-party/front_end/panels/network/network-meta.js @@ -1 +1 @@ -import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as o from"../../core/sdk/sdk.js";import*as r from"../../models/workspace/workspace.js";import*as n from"./forward/forward.js";import*as a from"../../ui/legacy/legacy.js";const i={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},s=t.i18n.registerUIStrings("panels/network/network-meta.ts",i),c=t.i18n.getLazilyComputedLocalizedString.bind(void 0,s);let l;async function g(){return l||(l=await import("./network.js")),l}function w(e){return void 0===l?[]:e(l)}a.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:c(i.showNetwork),title:c(i.network),order:40,loadView:async()=>(await g()).NetworkPanel.NetworkPanel.instance()}),a.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:c(i.showNetworkRequestBlocking),title:c(i.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await g()).BlockedURLsPane.BlockedURLsPane.instance()}),a.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:c(i.showNetworkConditions),title:c(i.networkConditions),persistence:"closeable",order:40,tags:[c(i.diskCache),c(i.networkThrottling),t.i18n.lockedLazyString("useragent"),t.i18n.lockedLazyString("user agent"),t.i18n.lockedLazyString("user-agent")],loadView:async()=>(await g()).NetworkConfigView.NetworkConfigView.instance()}),a.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:c(i.showSearch),title:c(i.search),persistence:"permanent",loadView:async()=>(await g()).NetworkPanel.SearchNetworkView.instance()}),a.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:a.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>w((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await g()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:c(i.recordNetworkLog)},{value:!1,title:c(i.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),a.ActionRegistration.registerActionExtension({actionId:"network.clear",category:a.ActionRegistration.ActionCategory.NETWORK,title:c(i.clear),iconClass:"clear",loadActionDelegate:async()=>(await g()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>w((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),a.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:a.ActionRegistration.ActionCategory.NETWORK,title:c(i.hideRequestDetails),contextTypes:()=>w((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await g()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),a.ActionRegistration.registerActionExtension({actionId:"network.search",category:a.ActionRegistration.ActionCategory.NETWORK,title:c(i.search),contextTypes:()=>w((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await g()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:c(i.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[c(i.colorCode),c(i.resourceType)],options:[{value:!0,title:c(i.colorCodeByResourceType)},{value:!1,title:c(i.useDefaultColors)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:c(i.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[c(i.netWork),c(i.frame),c(i.group)],options:[{value:!0,title:c(i.groupNetworkLogItemsByFrame)},{value:!1,title:c(i.dontGroupNetworkLogItemsByFrame)}]}),a.ViewManager.registerLocationResolver({name:"network-sidebar",category:a.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await g()).NetworkPanel.NetworkPanel.instance()}),a.ContextMenu.registerProvider({contextTypes:()=>[o.NetworkRequest.NetworkRequest,o.Resource.Resource,r.UISourceCode.UISourceCode],loadProvider:async()=>(await g()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[o.NetworkRequest.NetworkRequest],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await g()).NetworkPanel.RequestRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[n.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await g()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[n.NetworkRequestId.NetworkRequestId],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await g()).NetworkPanel.RequestIdRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[n.UIFilter.UIRequestFilter],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await g()).NetworkPanel.NetworkLogWithFilterRevealer.instance()}); +import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as r from"../../core/sdk/sdk.js";import*as n from"../../models/workspace/workspace.js";import*as a from"./forward/forward.js";import*as i from"../../ui/legacy/legacy.js";const s={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},c=t.i18n.registerUIStrings("panels/network/network-meta.ts",s),l=t.i18n.getLazilyComputedLocalizedString.bind(void 0,c);let g;async function w(){return g||(g=await import("./network.js")),g}function d(e){return void 0===g?[]:e(g)}i.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:l(s.showNetwork),title:l(s.network),order:40,condition:o.Runtime.ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL,loadView:async()=>(await w()).NetworkPanel.NetworkPanel.instance()}),i.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:l(s.showNetworkRequestBlocking),title:l(s.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await w()).BlockedURLsPane.BlockedURLsPane.instance()}),i.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:l(s.showNetworkConditions),title:l(s.networkConditions),persistence:"closeable",order:40,tags:[l(s.diskCache),l(s.networkThrottling),t.i18n.lockedLazyString("useragent"),t.i18n.lockedLazyString("user agent"),t.i18n.lockedLazyString("user-agent")],loadView:async()=>(await w()).NetworkConfigView.NetworkConfigView.instance()}),i.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:l(s.showSearch),title:l(s.search),persistence:"permanent",loadView:async()=>(await w()).NetworkPanel.SearchNetworkView.instance()}),i.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:i.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>d((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await w()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:l(s.recordNetworkLog)},{value:!1,title:l(s.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),i.ActionRegistration.registerActionExtension({actionId:"network.clear",category:i.ActionRegistration.ActionCategory.NETWORK,title:l(s.clear),iconClass:"clear",loadActionDelegate:async()=>(await w()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>d((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),i.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:i.ActionRegistration.ActionCategory.NETWORK,title:l(s.hideRequestDetails),contextTypes:()=>d((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await w()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),i.ActionRegistration.registerActionExtension({actionId:"network.search",category:i.ActionRegistration.ActionCategory.NETWORK,title:l(s.search),contextTypes:()=>d((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await w()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:l(s.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[l(s.colorCode),l(s.resourceType)],options:[{value:!0,title:l(s.colorCodeByResourceType)},{value:!1,title:l(s.useDefaultColors)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:l(s.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[l(s.netWork),l(s.frame),l(s.group)],options:[{value:!0,title:l(s.groupNetworkLogItemsByFrame)},{value:!1,title:l(s.dontGroupNetworkLogItemsByFrame)}]}),i.ViewManager.registerLocationResolver({name:"network-sidebar",category:i.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await w()).NetworkPanel.NetworkPanel.instance()}),i.ContextMenu.registerProvider({contextTypes:()=>[r.NetworkRequest.NetworkRequest,r.Resource.Resource,n.UISourceCode.UISourceCode],loadProvider:async()=>(await w()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[r.NetworkRequest.NetworkRequest],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await w()).NetworkPanel.RequestRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[a.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await w()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[a.NetworkRequestId.NetworkRequestId],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await w()).NetworkPanel.RequestIdRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[a.UIFilter.UIRequestFilter],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await w()).NetworkPanel.NetworkLogWithFilterRevealer.instance()}); From 5a44de45901703c31f21f3191509ee6cfb57846d Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Mon, 11 Dec 2023 11:37:33 +0000 Subject: [PATCH 141/190] Update Podfile.lock --- packages/rn-tester/Podfile.lock | 468 ++++++++++++++++---------------- 1 file changed, 234 insertions(+), 234 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index e1a4ad5e1cb3..83a830ba6c4f 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0-rc.7) - - FBReactNativeSpec (0.73.0-rc.7): + - FBLazyVector (0.73.0) + - FBReactNativeSpec (0.73.0): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.7) - - RCTTypeSafety (= 0.73.0-rc.7) - - React-Core (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) - - ReactCommon/turbomodule/core (= 0.73.0-rc.7) + - RCTRequired (= 0.73.0) + - RCTTypeSafety (= 0.73.0) + - React-Core (= 0.73.0) + - React-jsi (= 0.73.0) + - ReactCommon/turbomodule/core (= 0.73.0) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -96,26 +96,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0-rc.7) - - RCTTypeSafety (0.73.0-rc.7): - - FBLazyVector (= 0.73.0-rc.7) - - RCTRequired (= 0.73.0-rc.7) - - React-Core (= 0.73.0-rc.7) - - React (0.73.0-rc.7): - - React-Core (= 0.73.0-rc.7) - - React-Core/DevSupport (= 0.73.0-rc.7) - - React-Core/RCTWebSocket (= 0.73.0-rc.7) - - React-RCTActionSheet (= 0.73.0-rc.7) - - React-RCTAnimation (= 0.73.0-rc.7) - - React-RCTBlob (= 0.73.0-rc.7) - - React-RCTImage (= 0.73.0-rc.7) - - React-RCTLinking (= 0.73.0-rc.7) - - React-RCTNetwork (= 0.73.0-rc.7) - - React-RCTSettings (= 0.73.0-rc.7) - - React-RCTText (= 0.73.0-rc.7) - - React-RCTVibration (= 0.73.0-rc.7) - - React-callinvoker (0.73.0-rc.7) - - React-Codegen (0.73.0-rc.7): + - RCTRequired (0.73.0) + - RCTTypeSafety (0.73.0): + - FBLazyVector (= 0.73.0) + - RCTRequired (= 0.73.0) + - React-Core (= 0.73.0) + - React (0.73.0): + - React-Core (= 0.73.0) + - React-Core/DevSupport (= 0.73.0) + - React-Core/RCTWebSocket (= 0.73.0) + - React-RCTActionSheet (= 0.73.0) + - React-RCTAnimation (= 0.73.0) + - React-RCTBlob (= 0.73.0) + - React-RCTImage (= 0.73.0) + - React-RCTLinking (= 0.73.0) + - React-RCTNetwork (= 0.73.0) + - React-RCTSettings (= 0.73.0) + - React-RCTText (= 0.73.0) + - React-RCTVibration (= 0.73.0) + - React-callinvoker (0.73.0) + - React-Codegen (0.73.0): - DoubleConversion - FBReactNativeSpec - glog @@ -136,11 +136,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0-rc.7): + - React-Core (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.7) + - React-Core/Default (= 0.73.0) - React-cxxreact - React-hermes - React-jsi @@ -150,7 +150,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.0-rc.7): + - React-Core/CoreModulesHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -164,7 +164,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.0-rc.7): + - React-Core/Default (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -177,23 +177,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.0-rc.7): + - React-Core/DevSupport (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.7) - - React-Core/RCTWebSocket (= 0.73.0-rc.7) + - React-Core/Default (= 0.73.0) + - React-Core/RCTWebSocket (= 0.73.0) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0-rc.7) + - React-jsinspector (= 0.73.0) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0-rc.7): + - React-Core/RCTActionSheetHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -207,7 +207,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0-rc.7): + - React-Core/RCTAnimationHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -221,7 +221,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.0-rc.7): + - React-Core/RCTBlobHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -235,7 +235,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.0-rc.7): + - React-Core/RCTImageHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -249,7 +249,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0-rc.7): + - React-Core/RCTLinkingHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -263,7 +263,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0-rc.7): + - React-Core/RCTNetworkHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -277,7 +277,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0-rc.7): + - React-Core/RCTPushNotificationHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -291,7 +291,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0-rc.7): + - React-Core/RCTSettingsHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -305,7 +305,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.0-rc.7): + - React-Core/RCTTextHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -319,7 +319,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0-rc.7): + - React-Core/RCTVibrationHeaders (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -333,11 +333,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.0-rc.7): + - React-Core/RCTWebSocket (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.7) + - React-Core/Default (= 0.73.0) - React-cxxreact - React-hermes - React-jsi @@ -347,33 +347,33 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.0-rc.7): + - React-CoreModules (0.73.0): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0-rc.7) + - RCTTypeSafety (= 0.73.0) - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) + - React-Core/CoreModulesHeaders (= 0.73.0) + - React-jsi (= 0.73.0) - React-NativeModulesApple - React-RCTBlob - - React-RCTImage (= 0.73.0-rc.7) + - React-RCTImage (= 0.73.0) - ReactCommon - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.0-rc.7): + - React-cxxreact (0.73.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.7) - - React-debug (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) - - React-jsinspector (= 0.73.0-rc.7) - - React-logger (= 0.73.0-rc.7) - - React-perflogger (= 0.73.0-rc.7) - - React-runtimeexecutor (= 0.73.0-rc.7) - - React-debug (0.73.0-rc.7) - - React-Fabric (0.73.0-rc.7): + - React-callinvoker (= 0.73.0) + - React-debug (= 0.73.0) + - React-jsi (= 0.73.0) + - React-jsinspector (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) + - React-runtimeexecutor (= 0.73.0) + - React-debug (0.73.0) + - React-Fabric (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -384,20 +384,20 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0-rc.7) - - React-Fabric/attributedstring (= 0.73.0-rc.7) - - React-Fabric/componentregistry (= 0.73.0-rc.7) - - React-Fabric/componentregistrynative (= 0.73.0-rc.7) - - React-Fabric/components (= 0.73.0-rc.7) - - React-Fabric/core (= 0.73.0-rc.7) - - React-Fabric/imagemanager (= 0.73.0-rc.7) - - React-Fabric/leakchecker (= 0.73.0-rc.7) - - React-Fabric/mounting (= 0.73.0-rc.7) - - React-Fabric/scheduler (= 0.73.0-rc.7) - - React-Fabric/telemetry (= 0.73.0-rc.7) - - React-Fabric/templateprocessor (= 0.73.0-rc.7) - - React-Fabric/textlayoutmanager (= 0.73.0-rc.7) - - React-Fabric/uimanager (= 0.73.0-rc.7) + - React-Fabric/animations (= 0.73.0) + - React-Fabric/attributedstring (= 0.73.0) + - React-Fabric/componentregistry (= 0.73.0) + - React-Fabric/componentregistrynative (= 0.73.0) + - React-Fabric/components (= 0.73.0) + - React-Fabric/core (= 0.73.0) + - React-Fabric/imagemanager (= 0.73.0) + - React-Fabric/leakchecker (= 0.73.0) + - React-Fabric/mounting (= 0.73.0) + - React-Fabric/scheduler (= 0.73.0) + - React-Fabric/telemetry (= 0.73.0) + - React-Fabric/templateprocessor (= 0.73.0) + - React-Fabric/textlayoutmanager (= 0.73.0) + - React-Fabric/uimanager (= 0.73.0) - React-graphics - React-jsi - React-jsiexecutor @@ -406,7 +406,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.0-rc.7): + - React-Fabric/animations (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -425,7 +425,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.0-rc.7): + - React-Fabric/attributedstring (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -444,7 +444,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.0-rc.7): + - React-Fabric/componentregistry (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -463,7 +463,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.0-rc.7): + - React-Fabric/componentregistrynative (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -482,7 +482,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.0-rc.7): + - React-Fabric/components (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -493,17 +493,17 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0-rc.7) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0-rc.7) - - React-Fabric/components/modal (= 0.73.0-rc.7) - - React-Fabric/components/rncore (= 0.73.0-rc.7) - - React-Fabric/components/root (= 0.73.0-rc.7) - - React-Fabric/components/safeareaview (= 0.73.0-rc.7) - - React-Fabric/components/scrollview (= 0.73.0-rc.7) - - React-Fabric/components/text (= 0.73.0-rc.7) - - React-Fabric/components/textinput (= 0.73.0-rc.7) - - React-Fabric/components/unimplementedview (= 0.73.0-rc.7) - - React-Fabric/components/view (= 0.73.0-rc.7) + - React-Fabric/components/inputaccessory (= 0.73.0) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0) + - React-Fabric/components/modal (= 0.73.0) + - React-Fabric/components/rncore (= 0.73.0) + - React-Fabric/components/root (= 0.73.0) + - React-Fabric/components/safeareaview (= 0.73.0) + - React-Fabric/components/scrollview (= 0.73.0) + - React-Fabric/components/text (= 0.73.0) + - React-Fabric/components/textinput (= 0.73.0) + - React-Fabric/components/unimplementedview (= 0.73.0) + - React-Fabric/components/view (= 0.73.0) - React-graphics - React-jsi - React-jsiexecutor @@ -512,7 +512,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.0-rc.7): + - React-Fabric/components/inputaccessory (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -531,7 +531,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.0-rc.7): + - React-Fabric/components/legacyviewmanagerinterop (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -550,7 +550,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.0-rc.7): + - React-Fabric/components/modal (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -569,7 +569,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.0-rc.7): + - React-Fabric/components/rncore (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -588,7 +588,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.0-rc.7): + - React-Fabric/components/root (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -607,7 +607,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.0-rc.7): + - React-Fabric/components/safeareaview (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -626,7 +626,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.0-rc.7): + - React-Fabric/components/scrollview (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -645,7 +645,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.0-rc.7): + - React-Fabric/components/text (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -664,7 +664,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.0-rc.7): + - React-Fabric/components/textinput (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -683,7 +683,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.0-rc.7): + - React-Fabric/components/unimplementedview (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -702,7 +702,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.0-rc.7): + - React-Fabric/components/view (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -722,7 +722,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (0.73.0-rc.7): + - React-Fabric/core (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -741,7 +741,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.0-rc.7): + - React-Fabric/imagemanager (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -760,7 +760,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.0-rc.7): + - React-Fabric/leakchecker (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -779,7 +779,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.0-rc.7): + - React-Fabric/mounting (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -798,7 +798,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.0-rc.7): + - React-Fabric/scheduler (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -817,7 +817,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.0-rc.7): + - React-Fabric/telemetry (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -836,7 +836,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.0-rc.7): + - React-Fabric/templateprocessor (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -855,7 +855,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.0-rc.7): + - React-Fabric/textlayoutmanager (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -875,7 +875,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.0-rc.7): + - React-Fabric/uimanager (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -894,42 +894,42 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricImage (0.73.0-rc.7): + - React-FabricImage (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0-rc.7) - - RCTTypeSafety (= 0.73.0-rc.7) + - RCTRequired (= 0.73.0) + - RCTTypeSafety (= 0.73.0) - React-Fabric - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.73.0-rc.7) + - React-jsiexecutor (= 0.73.0) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-graphics (0.73.0-rc.7): + - React-graphics (0.73.0): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0-rc.7) + - React-Core/Default (= 0.73.0) - React-utils - - React-hermes (0.73.0-rc.7): + - React-hermes (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.7) + - React-cxxreact (= 0.73.0) - React-jsi - - React-jsiexecutor (= 0.73.0-rc.7) - - React-jsinspector (= 0.73.0-rc.7) - - React-perflogger (= 0.73.0-rc.7) - - React-ImageManager (0.73.0-rc.7): + - React-jsiexecutor (= 0.73.0) + - React-jsinspector (= 0.73.0) + - React-perflogger (= 0.73.0) + - React-ImageManager (0.73.0): - glog - RCT-Folly/Fabric - React-Core/Default @@ -938,35 +938,35 @@ PODS: - React-graphics - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0-rc.7): + - React-jserrorhandler (0.73.0): - RCT-Folly/Fabric (= 2022.05.16.00) - React-debug - React-jsi - React-Mapbuffer - - React-jsi (0.73.0-rc.7): + - React-jsi (0.73.0): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0-rc.7): + - React-jsiexecutor (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) - - React-perflogger (= 0.73.0-rc.7) - - React-jsinspector (0.73.0-rc.7) - - React-logger (0.73.0-rc.7): + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-perflogger (= 0.73.0) + - React-jsinspector (0.73.0) + - React-logger (0.73.0): - glog - - React-Mapbuffer (0.73.0-rc.7): + - React-Mapbuffer (0.73.0): - glog - React-debug - - React-nativeconfig (0.73.0-rc.7) - - React-NativeModulesApple (0.73.0-rc.7): + - React-nativeconfig (0.73.0) + - React-NativeModulesApple (0.73.0): - glog - hermes-engine - React-callinvoker @@ -976,10 +976,10 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0-rc.7) - - React-RCTActionSheet (0.73.0-rc.7): - - React-Core/RCTActionSheetHeaders (= 0.73.0-rc.7) - - React-RCTAnimation (0.73.0-rc.7): + - React-perflogger (0.73.0) + - React-RCTActionSheet (0.73.0): + - React-Core/RCTActionSheetHeaders (= 0.73.0) + - React-RCTAnimation (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -987,7 +987,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTAppDelegate (0.73.0-rc.7): + - React-RCTAppDelegate (0.73.0): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1001,7 +1001,7 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon - - React-RCTBlob (0.73.0-rc.7): + - React-RCTBlob (0.73.0): - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-Codegen @@ -1011,7 +1011,7 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.73.0-rc.7): + - React-RCTFabric (0.73.0): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1029,7 +1029,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0-rc.7): + - React-RCTImage (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1038,14 +1038,14 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.73.0-rc.7): + - React-RCTLinking (0.73.0): - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) + - React-Core/RCTLinkingHeaders (= 0.73.0) + - React-jsi (= 0.73.0) - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.0-rc.7) - - React-RCTNetwork (0.73.0-rc.7): + - ReactCommon/turbomodule/core (= 0.73.0) + - React-RCTNetwork (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1053,14 +1053,14 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTPushNotification (0.73.0-rc.7): + - React-RCTPushNotification (0.73.0): - RCTTypeSafety - React-Codegen - React-Core/RCTPushNotificationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTSettings (0.73.0-rc.7): + - React-RCTSettings (0.73.0): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1068,31 +1068,31 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTTest (0.73.0-rc.7): + - React-RCTTest (0.73.0): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0-rc.7) - - React-CoreModules (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) - - ReactCommon/turbomodule/core (= 0.73.0-rc.7) - - React-RCTText (0.73.0-rc.7): - - React-Core/RCTTextHeaders (= 0.73.0-rc.7) + - React-Core (= 0.73.0) + - React-CoreModules (= 0.73.0) + - React-jsi (= 0.73.0) + - ReactCommon/turbomodule/core (= 0.73.0) + - React-RCTText (0.73.0): + - React-Core/RCTTextHeaders (= 0.73.0) - Yoga - - React-RCTVibration (0.73.0-rc.7): + - React-RCTVibration (0.73.0): - RCT-Folly (= 2022.05.16.00) - React-Codegen - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-rendererdebug (0.73.0-rc.7): + - React-rendererdebug (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0-rc.7) - - React-runtimeexecutor (0.73.0-rc.7): - - React-jsi (= 0.73.0-rc.7) - - React-runtimescheduler (0.73.0-rc.7): + - React-rncore (0.73.0) + - React-runtimeexecutor (0.73.0): + - React-jsi (= 0.73.0) + - React-runtimescheduler (0.73.0): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1103,14 +1103,14 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0-rc.7): + - React-utils (0.73.0): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon (0.73.0-rc.7): - - React-logger (= 0.73.0-rc.7) - - ReactCommon/turbomodule (= 0.73.0-rc.7) - - ReactCommon-Samples (0.73.0-rc.7): + - ReactCommon (0.73.0): + - React-logger (= 0.73.0) + - ReactCommon/turbomodule (= 0.73.0) + - ReactCommon-Samples (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1121,41 +1121,41 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule (0.73.0-rc.7): + - ReactCommon/turbomodule (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.7) - - React-cxxreact (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) - - React-logger (= 0.73.0-rc.7) - - React-perflogger (= 0.73.0-rc.7) - - ReactCommon/turbomodule/bridging (= 0.73.0-rc.7) - - ReactCommon/turbomodule/core (= 0.73.0-rc.7) - - ReactCommon/turbomodule/bridging (0.73.0-rc.7): + - React-callinvoker (= 0.73.0) + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) + - ReactCommon/turbomodule/bridging (= 0.73.0) + - ReactCommon/turbomodule/core (= 0.73.0) + - ReactCommon/turbomodule/bridging (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.7) - - React-cxxreact (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) - - React-logger (= 0.73.0-rc.7) - - React-perflogger (= 0.73.0-rc.7) - - ReactCommon/turbomodule/core (0.73.0-rc.7): + - React-callinvoker (= 0.73.0) + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) + - ReactCommon/turbomodule/core (0.73.0): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0-rc.7) - - React-cxxreact (= 0.73.0-rc.7) - - React-jsi (= 0.73.0-rc.7) - - React-logger (= 0.73.0-rc.7) - - React-perflogger (= 0.73.0-rc.7) + - React-callinvoker (= 0.73.0) + - React-cxxreact (= 0.73.0) + - React-jsi (= 0.73.0) + - React-logger (= 0.73.0) + - React-perflogger (= 0.73.0) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1371,8 +1371,8 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: e9b722beebd016cb14d7ff6019a22ae6fd9338be - FBReactNativeSpec: b045a061c6beb4a3904cc0c91650b006acdf71eb + FBLazyVector: 39ba45baf4e398618f8b3a4bb6ba8fcdb7fc2133 + FBReactNativeSpec: 8b5987a14d001477ca779b73e56aeb8fcfdfddb2 Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1388,52 +1388,52 @@ SPEC CHECKSUMS: OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 9d56f80cef497058ff48d3cf3ea1eeecb7048880 - RCTTypeSafety: e168a9430905e6a400d1a51e8b97d242eb244ada - React: a41f2c56f67bb9cd55c77a7f23fa8653ef42b345 - React-callinvoker: 4b587c2033fa0ef72e11b6228edb061c63526463 - React-Codegen: 8fd2e0bec8e470ef6c22769b44087a79e29f34de - React-Core: 6b4f8988e7cd631b5e5b6f777e32d7ea42c62774 - React-CoreModules: 8d52585d265d0741b01736d3542a9d304bb90ff2 - React-cxxreact: 2658d6131cc3c0c656ac7c5328d583efe99d6769 - React-debug: 6cead8e29b4d1ab7954f22abe51cde1bdcfe79ff - React-Fabric: 87d983a373144b6e84e5780ffc72de8ed8b01245 - React-FabricImage: dc1985ee08237a56694dd84702ef2c7b048a354d - React-graphics: f83db2547d548067abaa1d266a0d58be4058ec22 - React-hermes: e539f19d825e24ee65e11e032241d855783f3705 - React-ImageManager: 5efba8d4ce216b09adfa02cd3af5574df507335d - React-jserrorhandler: 0616f7d70892d13430476a1cf29d55a118ced6b0 - React-jsi: fa5129d50859ae9fefc54db56fd41955c1f18e2e - React-jsiexecutor: 317c2c0adeaf51f84d12ce591341d571bb5ae820 - React-jsinspector: 69e4492e86cd19020a76025b240ab50999bf2fae - React-logger: 4add551e3cdb502adeaf1e20c29dde36ac19c40c - React-Mapbuffer: 7413e88eca55df2d92b94cc4c47e40c6b92544ed - React-nativeconfig: c892d943bf98f3b2f5512427d4ac0c1afd2a8120 - React-NativeModulesApple: 16e487add68d64a4a7fa98a566a576fbbd33ac45 - React-perflogger: 4d91a04b4de8a0d582fb35adb6383773420e0c59 - React-RCTActionSheet: 12dec21812fd2511f3da48011de9b458156d58a0 - React-RCTAnimation: bb7938eb8b682219708fa82f9b4591ec1ea877fa - React-RCTAppDelegate: 2aad64c975c0de9341e7ff102de9d037e567ac57 - React-RCTBlob: bf4766db8cccacc9b4e679e94d8d8a95e4fd1ed6 - React-RCTFabric: 5f1c8262fdf1416eaaa8c74c438557346eda1862 - React-RCTImage: 302ce4a3a8f0a284d9cb0f768755c23a83a8bace - React-RCTLinking: d2d23de3999db79fbf42032f44e1f8e0e612ef9f - React-RCTNetwork: 8fa76b6b7e5c58009e38cfa7384a067c7714d62d - React-RCTPushNotification: cf7da8494ac1e6e94d6c23408de0d4140cbcd031 - React-RCTSettings: 4cd1951cbfb832b057f75db5c0f0d9722a31d7e1 - React-RCTTest: fbd15dbd793fc2531fbf0cb18f7090e9f098a89a - React-RCTText: 7684f343e44a1d5cb714886cf1e32fe545d24f65 - React-RCTVibration: f23ec15a7eead66c957ff74f3a6cdb00017f9fb2 - React-rendererdebug: 3be85535ab2256e6b7c46e68f2c0a5253190db88 - React-rncore: 3e3dbedf1a4f57f4dbdb11e2e82fc29411f5f026 - React-runtimeexecutor: 095d70e5c4e2819a2ed6972c282fa6661928d3d3 - React-runtimescheduler: cedb5e8e673b9b0638ca5e8a219f3db22a383076 - React-utils: de47f01dd02323b2535440d41b3aed9b60bacfa8 - ReactCommon: 98ba799e2ff5591412fab678c568328fb3f42c18 - ReactCommon-Samples: d9bd364c28f9b7d7f1ee3e15af3d6fa7887b53d4 + RCTRequired: 5e3631b27c08716986980ef23eed8abdee1cdcaf + RCTTypeSafety: 02a64828b0b428eb4f63de1397d44fb2d0747e85 + React: df5dbfbd10c5bd8d4bcb49bd9830551533e11c7e + React-callinvoker: dc0dff59e8d3d1fe4cd9fb5f120f82a775d2a325 + React-Codegen: e41493fc60cfe314eb5a600247d13c0533c4b75b + React-Core: 276ccbbf282538138f4429313bb1200a15067c6e + React-CoreModules: 64747180c0329bebed8307ffdc97c331220277a6 + React-cxxreact: 84d98283f701bae882dcd3ad7c573a02f4c9d5c0 + React-debug: 443cf46ade52f3555dd1ec709718793490ac5edc + React-Fabric: 4c877c032b3acc07ed3f2e46ae25b5a39af89382 + React-FabricImage: c46c47ea3c672b9fadd6850795a51d3d9e5df712 + React-graphics: e1cff03acf09098513642535324432d495b6425c + React-hermes: e3356f82c76c5c41688a7e08ced2254a944501c4 + React-ImageManager: c783771479ab0bf1e3dbe711cc8b9f5b0f65972b + React-jserrorhandler: 7cd93ce5165e5d66c87b6f612f94e5642f5c5028 + React-jsi: 81b5fe94500e69051c2f3a775308afaa53e2608b + React-jsiexecutor: 4f790f865ad23fa949396c1a103d06867c0047ed + React-jsinspector: 9f6fb9ed9f03a0fb961ab8dc2e0e0ee0dc729e77 + React-logger: 008caec0d6a587abc1e71be21bfac5ba1662fe6a + React-Mapbuffer: 58fe558faf52ecde6705376700f848d0293d1cef + React-nativeconfig: a063483672b8add47a4875b0281e202908ff6747 + React-NativeModulesApple: 169506a5fd708ab22811f76ee06a976595c367a1 + React-perflogger: b61e5db8e5167f5e70366e820766c492847c082e + React-RCTActionSheet: dcaecff7ffc1888972cd1c1935751ff3bce1e0c1 + React-RCTAnimation: 24b8ae7ebc897ba3f33a93a020bbc66ab7863f5d + React-RCTAppDelegate: 661fc59d833e6727cc8c7e36bf8664215e5c277f + React-RCTBlob: 112880abc731c5a0d8eefb5919a591ad30f630e8 + React-RCTFabric: a0289e3bf73da8c03b68b4e9733ba497b021de45 + React-RCTImage: b8065c1b51cc6c2ff58ad81001619352518dd793 + React-RCTLinking: fdf9f43f8bd763d178281a079700105674953849 + React-RCTNetwork: ad3d988e425288492510ee37c9dcdf8259566214 + React-RCTPushNotification: d932fdab545a9750b9c2af920ba4dbde152491e8 + React-RCTSettings: 67c3876f2775d1cf86298f657e6006afc2a2e4cf + React-RCTTest: bcca2affbb6e973b6b82b3ee5edcd131d56d2b24 + React-RCTText: 671518da40bd548943ec12ee6a60f733a751e2e9 + React-RCTVibration: 60bc4d01d7d8ab7cff14852a195a7fa93b38e1f3 + React-rendererdebug: 6aaab394c9fefe395ef61809580a9bf63b98fd3e + React-rncore: 7149cff667c8ea4a2857592ac94e0fd17a802ea6 + React-runtimeexecutor: 2ca6f02d3fd6eea5b9575eb30720cf12c5d89906 + React-runtimescheduler: 77543c74df984ce56c09d49d427149c53784aaf6 + React-utils: 42708ea436853045ef1eaff29996813d9fbbe209 + ReactCommon: 851280fb976399ca1aabc74cc2c3612069ea70a2 + ReactCommon-Samples: 6226f6b7a41796501464849709127ab57dfcba05 ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: 690b58b78c73b532e40be5491be5e9a20685e919 + Yoga: 44003f970aa541b79dfdd59cf236fda41bd5890f PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 From 39e8e494ca3bdd951430759cc9efa576d31c7c12 Mon Sep 17 00:00:00 2001 From: szymonrybczak Date: Mon, 11 Dec 2023 11:10:48 +0100 Subject: [PATCH 142/190] Bump CLI to 12.2.1 --- packages/community-cli-plugin/package.json | 4 +- packages/react-native/package.json | 6 +- yarn.lock | 140 ++++++++++----------- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 29f5ea9bb463..e342ccbf4e8a 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -23,8 +23,8 @@ ], "dependencies": { "@react-native/dev-middleware": "^0.73.5", - "@react-native-community/cli-server-api": "12.2.0", - "@react-native-community/cli-tools": "12.2.0", + "@react-native-community/cli-server-api": "12.2.1", + "@react-native-community/cli-tools": "12.2.1", "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index abcd6e9aa125..240ba1bc7c0d 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -93,9 +93,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.2.0", - "@react-native-community/cli-platform-android": "12.2.0", - "@react-native-community/cli-platform-ios": "12.2.0", + "@react-native-community/cli": "12.2.1", + "@react-native-community/cli-platform-android": "12.2.1", + "@react-native-community/cli-platform-ios": "12.2.1", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.10", "@react-native/codegen": "^0.73.2", diff --git a/yarn.lock b/yarn.lock index e096757fd1fd..9b87c27e218d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2366,43 +2366,43 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.2.0.tgz#eb9c918959f23ff05d6edc9058d0ca901475e38e" - integrity sha512-HmMpH93mpLjnZJbra5zDBXR04qcsu5CofzPX3Q+aatIDglInEyMweYrH7apR/gao1RXwRYKW6+la5xoBjqaAOg== +"@react-native-community/cli-clean@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.2.1.tgz#c32615387746fdc551a74b6a7198967ce9f8d723" + integrity sha512-Ifw0JQQu62VdF1W+YwpB1Mrh/+fAWZRbD58UGT5ASZg55wO0FcxjArcx1hvpzr6MUjgtIDDR+pMWjKvTc2Yl5Q== dependencies: - "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-tools" "12.2.1" chalk "^4.1.2" execa "^5.0.0" -"@react-native-community/cli-config@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.2.0.tgz#ef49699cb70fd5f41bd9535739e4dc87f1cdc7ed" - integrity sha512-SB8X5EDpZmv7hU+ItKnhvNuGmtqyK+3dC88gbMLPCaE/bXvAPsKVbMbk3K4m1LJ60snFHxDgPdsKisA7tqZ/Ng== +"@react-native-community/cli-config@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.2.1.tgz#84996e2fa886be1cc1838a3a38ff622e1acde3f4" + integrity sha512-vzMNf+K8XzL8eTgbT6Sy94aQ2GF2hQXXF1GK/Q9QdqGgmVJUNuVZRiM3VfwdIUpI76OBqkYIu5rB71HiykzHSg== dependencies: - "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-tools" "12.2.1" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.2.0.tgz#6cb78a0a91d0350875493d4b56393a674c86670c" - integrity sha512-TTkPAGvoGdYy3rpUb4azXRiauXfPF2pNa3Uov15ti6J6I17FdFGliDowghjEF67okeoVs7QPZXlPHpOqBF063Q== +"@react-native-community/cli-debugger-ui@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.2.1.tgz#d1558f1f5f4d8e961920ca4a710ff45daa0ff97f" + integrity sha512-RUmipCEtqsgQLNUYGZowiGpv3x6VpoCTCS+cKBzA0Bk0LytR9lTO3OIF7uMFDQ/eGtsoLjtsKGGqz2djVOKhIg== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.2.0.tgz#69b0314f92f46116e863b85763372559cd6be3fc" - integrity sha512-iyWdwD2gznjM4VSHS4dLmBn9Hzg1UELNRX0XDo/fEhZ5iumRSMnXZd0+XWzhkJns7LM0FtfzV4bf/31jYdcBKg== +"@react-native-community/cli-doctor@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.2.1.tgz#940f67415295f9124869de19be7c7dc9f51bc37d" + integrity sha512-pqs+b7WfTcmczTye0TQzjo4Z9dN83T9/T7/g4JQLFcsmTFhEuokWLN2WCSN8Qmg43xfpcvhG9K6AZmj5B7GHJA== dependencies: - "@react-native-community/cli-config" "12.2.0" - "@react-native-community/cli-platform-android" "12.2.0" - "@react-native-community/cli-platform-ios" "12.2.0" - "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-config" "12.2.1" + "@react-native-community/cli-platform-android" "12.2.1" + "@react-native-community/cli-platform-ios" "12.2.1" + "@react-native-community/cli-tools" "12.2.1" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2417,53 +2417,53 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.2.0.tgz#4e48ababccbae0d19b539bfccd593ba916d2f2c8" - integrity sha512-u8AeM15mB/1HJgddmzQJ63UeS0QAhvYM101bpWFJU7uD/bZagXwQOrQUBXrGVoAwL7ZK1qWXw63/VRxL/TkX0Q== +"@react-native-community/cli-hermes@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.2.1.tgz#6646c780a48f560d1634a0c74d262ac632a8b362" + integrity sha512-cyB8Gdh5itALyGPab5XYWgFs8y3FtClkEWseajDdC8rN5cArV1uAGC9+gJHge1Cw/Vj+3db7MqhCEdvoPvfLxw== dependencies: - "@react-native-community/cli-platform-android" "12.2.0" - "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-platform-android" "12.2.1" + "@react-native-community/cli-tools" "12.2.1" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.2.0.tgz#779804ad049fd67da98db996a3f2afae0b0a099e" - integrity sha512-FIYp5eqt1vADsKXzimANseAnsfk3X6WnoRpSwD0o0w+3LqiAN/3LFs8RZKO3TniHdfrLvz0MGm3jocoy1RxXSw== +"@react-native-community/cli-platform-android@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.2.1.tgz#149450d0a415be88b040da5b272c024682ef05cd" + integrity sha512-d8S4Rzly4fa3lumUg/zPQWAd+tvWTjGeHF3M5IwORPVQAA5sMWZmOA6Bvzz0jbZ1pIdCmJn2yxUMUv4b8U3DAg== dependencies: - "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-tools" "12.2.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.2.0.tgz#315175b2b33cfc7b33a1ed969e0482169b39895c" - integrity sha512-EmJzP2Aeit8HCJ68Tb0vw95NbnCr9v4vLhmLyN+cCXUf6N8dV9SnA7gRXp1arRawKLrWqIdqz1valqX+FMz0DA== +"@react-native-community/cli-platform-ios@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.2.1.tgz#fabad3ec8ea57d1f0a859c77ce2bcf0e12e7c9cd" + integrity sha512-SHCIstEe9cNrNDbTH8uBFuU893a0Quwq0ecqBmPPGeyVtmJnKF5JHjTyNICBjYl/s0GxKcaXARmvob3RoM4rOA== dependencies: - "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-tools" "12.2.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.2.0.tgz#0724cb1c7e9ab885dac3713a9bb4d6e29af1bb0f" - integrity sha512-RFcS4bsoFiwaf4mG8UiNW+lRSRN8it8Pw+y2g3N3d7n9CMSbWiToJh/UKZeJCjMZS5oh7BazfN+zUivtPog/Qg== +"@react-native-community/cli-plugin-metro@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.2.1.tgz#050668d59be729b3c8576fe0c1f3caa1da5a1d2c" + integrity sha512-JcUPfF7jB78O+QHArzmEBeH1uLxENspsXr6VGc2c5NRei6NUGWR85LmjJtMn2gTUJ/gk+VB7o+HwP9S8OG2s3A== -"@react-native-community/cli-server-api@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.2.0.tgz#dfd70f2139509b774f1f460a83384a44e22d622a" - integrity sha512-AYoJOAknKdc7seqsUdOfin9cdHr7XzLKmL/cso94DUNCORwzxUfc8zCpu+XGsxLXsk5P/Ljt2agrJei3Er4tqA== +"@react-native-community/cli-server-api@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.2.1.tgz#b68e26336a96915a5f9609ac43cb4daf5fe8a86f" + integrity sha512-T5SMK9BhXT99gECcofCYdbMyIhGALSKorg/xXLzQIqLzGKFmUek6uiXj5AoXrBOWEtIFyRYa1qrRV4lDRcyekg== dependencies: - "@react-native-community/cli-debugger-ui" "12.2.0" - "@react-native-community/cli-tools" "12.2.0" + "@react-native-community/cli-debugger-ui" "12.2.1" + "@react-native-community/cli-tools" "12.2.1" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -2472,10 +2472,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.2.0.tgz#2b89a6387aefebd6a90a5eb9077885ad407680b3" - integrity sha512-rXPLku0rZ7VOwxDvxLecTu1TbYL2UD7ap1wnJ6E3ZsPjyzuFzZ2CTTVqmko76NavXTdIUi0qLSjEwKrrAjbnqA== +"@react-native-community/cli-tools@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.2.1.tgz#e5d0cb821f3dbd485dbc6195582cb0226347f6f3" + integrity sha512-mV26wWYKeOhDNzuKLfIYm/1lygZVVjOQ7FMOrm6BuYGtJZAYdRZlc3aGk1v6akh/xHz1Ozvk+M95vnFFlDtjiw== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2488,27 +2488,27 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.2.0.tgz#958ce4757e59697c87683d9d51af1e09589bf3bf" - integrity sha512-K9S4nMKzJVvI7tjTWio9GzmvfD+FepoK60JzhK8dBMVI+3hoaeHedH7cT4VzkyQABFxj/L+AOp0rWBGNtulWaw== +"@react-native-community/cli-types@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.2.1.tgz#506d0aa6727f2a5987dbb3cd7bc06eac46f911d2" + integrity sha512-VlFpPQmonEXIu2KSQOD91Yk/RGFSATl/6WfjKRpxhjPDcG0ujiuj8g9fAJibyt8k0BGLKNMzSDCM2nHSfbOasg== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.2.0": - version "12.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.2.0.tgz#ee0d07e662f448fa83c0673f1036420433891312" - integrity sha512-0E/T/EmIzjn5zDm4MvZmyljzIJaSAHmuuoxsjgiHKryvdahrAmSN6ZjVzJzLGxMe+NbSKaG6z+MNHAG4j0LXcg== - dependencies: - "@react-native-community/cli-clean" "12.2.0" - "@react-native-community/cli-config" "12.2.0" - "@react-native-community/cli-debugger-ui" "12.2.0" - "@react-native-community/cli-doctor" "12.2.0" - "@react-native-community/cli-hermes" "12.2.0" - "@react-native-community/cli-plugin-metro" "12.2.0" - "@react-native-community/cli-server-api" "12.2.0" - "@react-native-community/cli-tools" "12.2.0" - "@react-native-community/cli-types" "12.2.0" +"@react-native-community/cli@12.2.1": + version "12.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.2.1.tgz#d510030209d74fa817e52d0b0e88ac04cb3dae31" + integrity sha512-dbQrfeFGcqaSESGPOE+wgVjfABQz7cm0xrd9Xea76u7F2TOugYi4A+vcjVjvvo7whb8RYO0MWGgfuPyB5+QqhQ== + dependencies: + "@react-native-community/cli-clean" "12.2.1" + "@react-native-community/cli-config" "12.2.1" + "@react-native-community/cli-debugger-ui" "12.2.1" + "@react-native-community/cli-doctor" "12.2.1" + "@react-native-community/cli-hermes" "12.2.1" + "@react-native-community/cli-plugin-metro" "12.2.1" + "@react-native-community/cli-server-api" "12.2.1" + "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-types" "12.2.1" chalk "^4.1.2" commander "^9.4.1" deepmerge "^4.3.0" From 6230f9e9d46bcdee5b735248e1211a5854a15019 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Tue, 12 Dec 2023 09:49:49 -0800 Subject: [PATCH 143/190] Fix last spacer constrain logic in VirtualizedList (#41846) Summary: The logic to constrain the last spacer size is incorrect in some cases where the spacer is the last spacer, but not the last section in the list. For more context, the role of spacer constraining is explained in this comment: ``` // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to // prevent the user for hyperscrolling into un-measured area because otherwise content will // likely jump around as it renders in above the viewport. ``` For example it is incorrect in the case where we have: ITEMS SPACER ITEMS In this case the spacer is not actually the tail spacer so the constraining is incorrectly appied. This causes issues mainly when using `maintainVisibleContentPosition` since it will cause it to scroll to an incorrect position and then cause the view that was supposed to stay visible to be virtualized away. ## Changelog: [GENERAL] [FIXED] - Fix last spacer constrain logic in VirtualizedList Pull Request resolved: https://github.com/facebook/react-native/pull/41846 Test Plan: Tested using https://gist.github.com/janicduplessis/b67d1fafc08ef848378263208ab93d4c in RN tester, before the change content will jump on first click on add items. Tested using the same example and setting initial posts to 1000, then we can see our content view size is still constrained properly (see scrolling indicator as reference). Reviewed By: yungsters Differential Revision: D51964500 Pulled By: NickGerleman fbshipit-source-id: 4465aa5a36c95466aef6571314973c1e2c9a0f2c --- .../virtualized-lists/Lists/VirtualizedList.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/virtualized-lists/Lists/VirtualizedList.js b/packages/virtualized-lists/Lists/VirtualizedList.js index 70b2e20c5e47..05166798002e 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.js +++ b/packages/virtualized-lists/Lists/VirtualizedList.js @@ -91,19 +91,6 @@ type State = { pendingScrollUpdateCount: number, }; -function findLastWhere( - arr: $ReadOnlyArray, - predicate: (element: T) => boolean, -): T | null { - for (let i = arr.length - 1; i >= 0; i--) { - if (predicate(arr[i])) { - return arr[i]; - } - } - - return null; -} - function getScrollingThreshold(threshold: number, visibleLength: number) { return (threshold * visibleLength) / 2; } @@ -986,7 +973,8 @@ class VirtualizedList extends StateSafePureComponent { const spacerKey = this._getSpacerKey(!horizontal); const renderRegions = this.state.renderMask.enumerateRegions(); - const lastSpacer = findLastWhere(renderRegions, r => r.isSpacer); + const lastRegion = renderRegions[renderRegions.length - 1]; + const lastSpacer = lastRegion?.isSpacer ? lastRegion : null; for (const section of renderRegions) { if (section.isSpacer) { From a7fc0c64f2259290b38bc54cd416426698918a42 Mon Sep 17 00:00:00 2001 From: Rui Ying Date: Mon, 11 Dec 2023 06:33:05 -0800 Subject: [PATCH 144/190] Fix NSAppTransportSecurity being overwritten during pod install (#41875) Summary: This PR fixes https://github.com/facebook/react-native/issues/41874. ## Changelog: [iOS] [Fixed] - Fix NSAppTransportSecurity being overwritten during pod install Pull Request resolved: https://github.com/facebook/react-native/pull/41875 Test Plan: 1. Delete the whole `NSAppTransportSecurity` in Info.plist and run `pod install`: `NSAllowsArbitraryLoads` and `NSAllowsLocalNetworking` are added as expected. 2. Modify `NSAppTransportSecurity` to only contain `NSExceptionDomains` and run `pod install`: `NSAllowsArbitraryLoads` and `NSAllowsLocalNetworking` are added, and `NSExceptionDomains` is still there. 3. Run `pod install` again: nothing changes. Reviewed By: christophpurrer Differential Revision: D52032400 Pulled By: dmytrorykun fbshipit-source-id: 48cf29809c283af80613ffbf1ac0dc663a0a2fb5 --- packages/react-native/scripts/cocoapods/utils.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index 718304ed7703..54ea36ce5fda 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -560,7 +560,8 @@ def self.update_ats_in_plist(plistPaths, parent) "NSAppTransportSecurity" => ats_configs } else - plist["NSAppTransportSecurity"] = ats_configs + plist["NSAppTransportSecurity"] ||= {} + plist["NSAppTransportSecurity"] = plist["NSAppTransportSecurity"].merge(ats_configs) end Xcodeproj::Plist.write_to_path(plist, fullPlistPath) end From dff11ab993e57a097988537791afe8ef086e4ce4 Mon Sep 17 00:00:00 2001 From: szymonrybczak Date: Wed, 13 Dec 2023 17:33:42 +0100 Subject: [PATCH 145/190] chore: bump CLI to 12.3.0 --- packages/community-cli-plugin/package.json | 4 +- packages/react-native/package.json | 6 +- yarn.lock | 140 ++++++++++----------- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index e342ccbf4e8a..e71139c2e7c9 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -23,8 +23,8 @@ ], "dependencies": { "@react-native/dev-middleware": "^0.73.5", - "@react-native-community/cli-server-api": "12.2.1", - "@react-native-community/cli-tools": "12.2.1", + "@react-native-community/cli-server-api": "12.3.0", + "@react-native-community/cli-tools": "12.3.0", "@react-native/metro-babel-transformer": "^0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 240ba1bc7c0d..a2cc2876b307 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -93,9 +93,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.2.1", - "@react-native-community/cli-platform-android": "12.2.1", - "@react-native-community/cli-platform-ios": "12.2.1", + "@react-native-community/cli": "12.3.0", + "@react-native-community/cli-platform-android": "12.3.0", + "@react-native-community/cli-platform-ios": "12.3.0", "@react-native/assets-registry": "^0.73.1", "@react-native/community-cli-plugin": "^0.73.10", "@react-native/codegen": "^0.73.2", diff --git a/yarn.lock b/yarn.lock index 9b87c27e218d..e9f67f382f90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2366,43 +2366,43 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.2.1.tgz#c32615387746fdc551a74b6a7198967ce9f8d723" - integrity sha512-Ifw0JQQu62VdF1W+YwpB1Mrh/+fAWZRbD58UGT5ASZg55wO0FcxjArcx1hvpzr6MUjgtIDDR+pMWjKvTc2Yl5Q== +"@react-native-community/cli-clean@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.3.0.tgz#667b32daa58b4d11d5b5ab9eb0a2e216d500c90b" + integrity sha512-iAgLCOWYRGh9ukr+eVQnhkV/OqN3V2EGd/in33Ggn/Mj4uO6+oUncXFwB+yjlyaUNz6FfjudhIz09yYGSF+9sg== dependencies: - "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-tools" "12.3.0" chalk "^4.1.2" execa "^5.0.0" -"@react-native-community/cli-config@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.2.1.tgz#84996e2fa886be1cc1838a3a38ff622e1acde3f4" - integrity sha512-vzMNf+K8XzL8eTgbT6Sy94aQ2GF2hQXXF1GK/Q9QdqGgmVJUNuVZRiM3VfwdIUpI76OBqkYIu5rB71HiykzHSg== +"@react-native-community/cli-config@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.3.0.tgz#255b4e5391878937a25888f452f50a968d053e3e" + integrity sha512-BrTn5ndFD9uOxO8kxBQ32EpbtOvAsQExGPI7SokdI4Zlve70FziLtTq91LTlTUgMq1InVZn/jJb3VIDk6BTInQ== dependencies: - "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-tools" "12.3.0" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.2.1.tgz#d1558f1f5f4d8e961920ca4a710ff45daa0ff97f" - integrity sha512-RUmipCEtqsgQLNUYGZowiGpv3x6VpoCTCS+cKBzA0Bk0LytR9lTO3OIF7uMFDQ/eGtsoLjtsKGGqz2djVOKhIg== +"@react-native-community/cli-debugger-ui@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.3.0.tgz#75bbb2082a369b3559e0dffa8bfeebf2a9107e3e" + integrity sha512-w3b0iwjQlk47GhZWHaeTG8kKH09NCMUJO729xSdMBXE8rlbm4kHpKbxQY9qKb6NlfWSJN4noGY+FkNZS2rRwnQ== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.2.1.tgz#940f67415295f9124869de19be7c7dc9f51bc37d" - integrity sha512-pqs+b7WfTcmczTye0TQzjo4Z9dN83T9/T7/g4JQLFcsmTFhEuokWLN2WCSN8Qmg43xfpcvhG9K6AZmj5B7GHJA== +"@react-native-community/cli-doctor@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.3.0.tgz#420eb4e80d482f16d431c4df33fbc203862508af" + integrity sha512-BPCwNNesoQMkKsxB08Ayy6URgGQ8Kndv6mMhIvJSNdST3J1+x3ehBHXzG9B9Vfi+DrTKRb8lmEl/b/7VkDlPkA== dependencies: - "@react-native-community/cli-config" "12.2.1" - "@react-native-community/cli-platform-android" "12.2.1" - "@react-native-community/cli-platform-ios" "12.2.1" - "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-config" "12.3.0" + "@react-native-community/cli-platform-android" "12.3.0" + "@react-native-community/cli-platform-ios" "12.3.0" + "@react-native-community/cli-tools" "12.3.0" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2417,53 +2417,53 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.2.1.tgz#6646c780a48f560d1634a0c74d262ac632a8b362" - integrity sha512-cyB8Gdh5itALyGPab5XYWgFs8y3FtClkEWseajDdC8rN5cArV1uAGC9+gJHge1Cw/Vj+3db7MqhCEdvoPvfLxw== +"@react-native-community/cli-hermes@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.3.0.tgz#c302acbfb07e1f4e73e76e3150c32f0e4f54e9ed" + integrity sha512-G6FxpeZBO4AimKZwtWR3dpXRqTvsmEqlIkkxgwthdzn3LbVjDVIXKpVYU9PkR5cnT+KuAUxO0WwthrJ6Nmrrlg== dependencies: - "@react-native-community/cli-platform-android" "12.2.1" - "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-platform-android" "12.3.0" + "@react-native-community/cli-tools" "12.3.0" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.2.1.tgz#149450d0a415be88b040da5b272c024682ef05cd" - integrity sha512-d8S4Rzly4fa3lumUg/zPQWAd+tvWTjGeHF3M5IwORPVQAA5sMWZmOA6Bvzz0jbZ1pIdCmJn2yxUMUv4b8U3DAg== +"@react-native-community/cli-platform-android@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.3.0.tgz#eafa5fb12ebc25f716aea18cd55039c19fbedca6" + integrity sha512-VU1NZw63+GLU2TnyQ919bEMThpHQ/oMFju9MCfrd3pyPJz4Sn+vc3NfnTDUVA5Z5yfLijFOkHIHr4vo/C9bjnw== dependencies: - "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-tools" "12.3.0" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.2.1.tgz#fabad3ec8ea57d1f0a859c77ce2bcf0e12e7c9cd" - integrity sha512-SHCIstEe9cNrNDbTH8uBFuU893a0Quwq0ecqBmPPGeyVtmJnKF5JHjTyNICBjYl/s0GxKcaXARmvob3RoM4rOA== +"@react-native-community/cli-platform-ios@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.3.0.tgz#42a9185bb51f35a7eb9c5818b2f0072846945ef5" + integrity sha512-H95Sgt3wT7L8V75V0syFJDtv4YgqK5zbu69ko4yrXGv8dv2EBi6qZP0VMmkqXDamoPm9/U7tDTdbcf26ctnLfg== dependencies: - "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-tools" "12.3.0" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.2.1.tgz#050668d59be729b3c8576fe0c1f3caa1da5a1d2c" - integrity sha512-JcUPfF7jB78O+QHArzmEBeH1uLxENspsXr6VGc2c5NRei6NUGWR85LmjJtMn2gTUJ/gk+VB7o+HwP9S8OG2s3A== +"@react-native-community/cli-plugin-metro@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.3.0.tgz#b4ea8da691d294aee98ccfcd1162bcd958cae834" + integrity sha512-tYNHIYnNmxrBcsqbE2dAnLMzlKI3Cp1p1xUgTrNaOMsGPDN1epzNfa34n6Nps3iwKElSL7Js91CzYNqgTalucA== -"@react-native-community/cli-server-api@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.2.1.tgz#b68e26336a96915a5f9609ac43cb4daf5fe8a86f" - integrity sha512-T5SMK9BhXT99gECcofCYdbMyIhGALSKorg/xXLzQIqLzGKFmUek6uiXj5AoXrBOWEtIFyRYa1qrRV4lDRcyekg== +"@react-native-community/cli-server-api@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.3.0.tgz#0460472d44c121d1db8a98ad1df811200c074fb3" + integrity sha512-Rode8NrdyByC+lBKHHn+/W8Zu0c+DajJvLmOWbe2WY/ECvnwcd9MHHbu92hlT2EQaJ9LbLhGrSbQE3cQy9EOCw== dependencies: - "@react-native-community/cli-debugger-ui" "12.2.1" - "@react-native-community/cli-tools" "12.2.1" + "@react-native-community/cli-debugger-ui" "12.3.0" + "@react-native-community/cli-tools" "12.3.0" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -2472,10 +2472,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.2.1.tgz#e5d0cb821f3dbd485dbc6195582cb0226347f6f3" - integrity sha512-mV26wWYKeOhDNzuKLfIYm/1lygZVVjOQ7FMOrm6BuYGtJZAYdRZlc3aGk1v6akh/xHz1Ozvk+M95vnFFlDtjiw== +"@react-native-community/cli-tools@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.3.0.tgz#d459a116e1a95034d3c9a6385069c9e2049fb2a6" + integrity sha512-2GafnCr8D88VdClwnm9KZfkEb+lzVoFdr/7ybqhdeYM0Vnt/tr2N+fM1EQzwI1DpzXiBzTYemw8GjRq+Utcz2Q== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2488,27 +2488,27 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.2.1.tgz#506d0aa6727f2a5987dbb3cd7bc06eac46f911d2" - integrity sha512-VlFpPQmonEXIu2KSQOD91Yk/RGFSATl/6WfjKRpxhjPDcG0ujiuj8g9fAJibyt8k0BGLKNMzSDCM2nHSfbOasg== +"@react-native-community/cli-types@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.3.0.tgz#2d21a1f93aefbdb34a04311d68097aef0388704f" + integrity sha512-MgOkmrXH4zsGxhte4YqKL7d+N8ZNEd3w1wo56MZlhu5WabwCJh87wYpU5T8vyfujFLYOFuFK5jjlcbs8F4/WDw== dependencies: joi "^17.2.1" -"@react-native-community/cli@12.2.1": - version "12.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.2.1.tgz#d510030209d74fa817e52d0b0e88ac04cb3dae31" - integrity sha512-dbQrfeFGcqaSESGPOE+wgVjfABQz7cm0xrd9Xea76u7F2TOugYi4A+vcjVjvvo7whb8RYO0MWGgfuPyB5+QqhQ== - dependencies: - "@react-native-community/cli-clean" "12.2.1" - "@react-native-community/cli-config" "12.2.1" - "@react-native-community/cli-debugger-ui" "12.2.1" - "@react-native-community/cli-doctor" "12.2.1" - "@react-native-community/cli-hermes" "12.2.1" - "@react-native-community/cli-plugin-metro" "12.2.1" - "@react-native-community/cli-server-api" "12.2.1" - "@react-native-community/cli-tools" "12.2.1" - "@react-native-community/cli-types" "12.2.1" +"@react-native-community/cli@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.3.0.tgz#c89aacc3973943bf24002255d7d0859b511d88a1" + integrity sha512-XeQohi2E+S2+MMSz97QcEZ/bWpi8sfKiQg35XuYeJkc32Til2g0b97jRpn0/+fV0BInHoG1CQYWwHA7opMsrHg== + dependencies: + "@react-native-community/cli-clean" "12.3.0" + "@react-native-community/cli-config" "12.3.0" + "@react-native-community/cli-debugger-ui" "12.3.0" + "@react-native-community/cli-doctor" "12.3.0" + "@react-native-community/cli-hermes" "12.3.0" + "@react-native-community/cli-plugin-metro" "12.3.0" + "@react-native-community/cli-server-api" "12.3.0" + "@react-native-community/cli-tools" "12.3.0" + "@react-native-community/cli-types" "12.3.0" chalk "^4.1.2" commander "^9.4.1" deepmerge "^4.3.0" From 8c7fc732b719786014e351415f7f424a0280d52e Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 14 Dec 2023 13:45:47 +0000 Subject: [PATCH 146/190] Bump package versions #publish-packages-to-npm --- packages/community-cli-plugin/package.json | 4 ++-- packages/debugger-frontend/package.json | 2 +- packages/dev-middleware/package.json | 4 ++-- packages/react-native/package.json | 4 ++-- packages/virtualized-lists/package.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index e71139c2e7c9..238b37428f70 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.10", + "version": "0.73.11", "description": "Core CLI commands for React Native", "keywords": [ "react-native", @@ -22,7 +22,7 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "^0.73.5", + "@react-native/dev-middleware": "^0.73.6", "@react-native-community/cli-server-api": "12.3.0", "@react-native-community/cli-tools": "12.3.0", "@react-native/metro-babel-transformer": "^0.73.12", diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index 652794653053..8b717b1a2b99 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/debugger-frontend", - "version": "0.73.2", + "version": "0.73.3", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 0c3869784552..5bbee5143493 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/dev-middleware", - "version": "0.73.5", + "version": "0.73.6", "description": "Dev server middleware for React Native", "keywords": [ "react-native", @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "^0.73.2", + "@react-native/debugger-frontend": "^0.73.3", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^1.0.0", "connect": "^3.6.5", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index a2cc2876b307..c65b010ddbde 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,12 +97,12 @@ "@react-native-community/cli-platform-android": "12.3.0", "@react-native-community/cli-platform-ios": "12.3.0", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.10", + "@react-native/community-cli-plugin": "^0.73.11", "@react-native/codegen": "^0.73.2", "@react-native/gradle-plugin": "^0.73.4", "@react-native/js-polyfills": "^0.73.1", "@react-native/normalize-colors": "^0.73.2", - "@react-native/virtualized-lists": "^0.73.3", + "@react-native/virtualized-lists": "^0.73.4", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index d4e0771d905b..caec85334b0d 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/virtualized-lists", - "version": "0.73.3", + "version": "0.73.4", "description": "Virtualized lists for React Native.", "license": "MIT", "repository": { From e15c784d1a6721cc81cc70856862aedee154366a Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Fri, 15 Dec 2023 13:05:46 -0800 Subject: [PATCH 147/190] Remove patch range dependency on @react-native/community-cli-plugin for react-native --- packages/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index c65b010ddbde..809deb0ddccd 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -97,7 +97,7 @@ "@react-native-community/cli-platform-android": "12.3.0", "@react-native-community/cli-platform-ios": "12.3.0", "@react-native/assets-registry": "^0.73.1", - "@react-native/community-cli-plugin": "^0.73.11", + "@react-native/community-cli-plugin": "0.73.11", "@react-native/codegen": "^0.73.2", "@react-native/gradle-plugin": "^0.73.4", "@react-native/js-polyfills": "^0.73.1", From f6b7243d2ae7c8d7fe690da8f9a922df844061d3 Mon Sep 17 00:00:00 2001 From: Distiller Date: Mon, 18 Dec 2023 09:45:38 +0000 Subject: [PATCH 148/190] [0.73.1] Bump version numbers --- packages/react-native/Libraries/Core/ReactNativeVersion.js | 2 +- packages/react-native/React/Base/RCTVersion.m | 2 +- packages/react-native/ReactAndroid/gradle.properties | 2 +- .../facebook/react/modules/systeminfo/ReactNativeVersion.java | 2 +- .../react-native/ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- packages/react-native/package.json | 4 ++-- packages/react-native/template/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js index 0d86bfcde000..0904158a1cbf 100644 --- a/packages/react-native/Libraries/Core/ReactNativeVersion.js +++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js @@ -12,6 +12,6 @@ exports.version = { major: 0, minor: 73, - patch: 0, + patch: 1, prerelease: null, }; diff --git a/packages/react-native/React/Base/RCTVersion.m b/packages/react-native/React/Base/RCTVersion.m index 20f7e22f963f..ec74424f317e 100644 --- a/packages/react-native/React/Base/RCTVersion.m +++ b/packages/react-native/React/Base/RCTVersion.m @@ -23,7 +23,7 @@ __rnVersion = @{ RCTVersionMajor: @(0), RCTVersionMinor: @(73), - RCTVersionPatch: @(0), + RCTVersionPatch: @(1), RCTVersionPrerelease: [NSNull null], }; }); diff --git a/packages/react-native/ReactAndroid/gradle.properties b/packages/react-native/ReactAndroid/gradle.properties index ee8e2c040660..e1f830463239 100644 --- a/packages/react-native/ReactAndroid/gradle.properties +++ b/packages/react-native/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.73.0 +VERSION_NAME=0.73.1 react.internal.publishingGroup=com.facebook.react android.useAndroidX=true diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index 703263382c85..5da52f761f43 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -17,6 +17,6 @@ public class ReactNativeVersion { public static final Map VERSION = MapBuilder.of( "major", 0, "minor", 73, - "patch", 0, + "patch", 1, "prerelease", null); } diff --git a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h index 837d4037e3bb..63fa86a258ba 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h @@ -17,7 +17,7 @@ namespace facebook::react { constexpr struct { int32_t Major = 0; int32_t Minor = 73; - int32_t Patch = 0; + int32_t Patch = 1; std::string_view Prerelease = ""; } ReactNativeVersion; diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 809deb0ddccd..44421739bc2e 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "react-native", - "version": "0.73.0", + "version": "0.73.1", "description": "A framework for building native apps using React", "license": "MIT", "repository": { @@ -148,4 +148,4 @@ } ] } -} +} \ No newline at end of file diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 761b004a4bd7..ddcc00321cd2 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.0" + "react-native": "0.73.1" }, "devDependencies": { "@babel/core": "^7.20.0", From aec4669086a5ae616d21d35973cd70e72963618f Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Mon, 23 Oct 2023 05:50:36 -0700 Subject: [PATCH 149/190] Use a stable device+app ID to register with the inspector proxy (#41152) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41152 Building on byCedric's approach in https://github.com/facebook/metro/pull/991, and on D49954920, this diff passes stable, unique *logical device IDs* to the debugger connection infrastructure from Android and iOS. See D49954920 for the precise stability and uniqueness requirements that these IDs meet. Changelog: [Changed][General] - Automatically reconnect to an existing debugger session on relaunching the app Reviewed By: huntie Differential Revision: D49954919 fbshipit-source-id: d4d918f0cbfd9df426e888845817e00410efb9d3 --- .../DevSupport/RCTInspectorDevServerHelper.mm | 64 +++++++++++++++- .../react/devsupport/DevServerHelper.java | 75 +++++++++++++++++-- 2 files changed, 130 insertions(+), 9 deletions(-) diff --git a/packages/react-native/React/DevSupport/RCTInspectorDevServerHelper.mm b/packages/react-native/React/DevSupport/RCTInspectorDevServerHelper.mm index 819e14a39fd7..a0c4b69be2ea 100644 --- a/packages/react-native/React/DevSupport/RCTInspectorDevServerHelper.mm +++ b/packages/react-native/React/DevSupport/RCTInspectorDevServerHelper.mm @@ -15,6 +15,8 @@ #import #import +#import + static NSString *const kDebuggerMsgDisable = @"{ \"id\":1,\"method\":\"Debugger.disable\" }"; static NSString *getServerHost(NSURL *bundleURL) @@ -40,16 +42,65 @@ return [NSString stringWithFormat:@"%@:%@", host, port]; } +static NSString *getSHA256(NSString *string) +{ + const char *str = string.UTF8String; + unsigned char result[CC_SHA256_DIGEST_LENGTH]; + CC_SHA256(str, (CC_LONG)strlen(str), result); + + return [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + result[0], + result[1], + result[2], + result[3], + result[4], + result[5], + result[6], + result[7], + result[8], + result[9], + result[10], + result[11], + result[12], + result[13], + result[14], + result[15], + result[16], + result[17], + result[18], + result[19]]; +} + +// Returns an opaque ID which is stable for the current combination of device and app, stable across installs, +// and unique across devices. +static NSString *getInspectorDeviceId() +{ + // A bundle ID uniquely identifies a single app throughout the system. [Source: Apple docs] + NSString *bundleId = [[NSBundle mainBundle] bundleIdentifier]; + + // An alphanumeric string that uniquely identifies a device to the app's vendor. [Source: Apple docs] + NSString *identifierForVendor = [[UIDevice currentDevice] identifierForVendor].UUIDString; + + NSString *rawDeviceId = [NSString stringWithFormat:@"apple-%@-%@", identifierForVendor, bundleId]; + + return getSHA256(rawDeviceId); +} + static NSURL *getInspectorDeviceUrl(NSURL *bundleURL) { NSString *escapedDeviceName = [[[UIDevice currentDevice] name] stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; NSString *escapedAppName = [[[NSBundle mainBundle] bundleIdentifier] stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; - return [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/inspector/device?name=%@&app=%@", + + NSString *escapedInspectorDeviceId = [getInspectorDeviceId() + stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; + + return [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/inspector/device?name=%@&app=%@&device=%@", getServerHost(bundleURL), escapedDeviceName, - escapedAppName]]; + escapedAppName, + escapedInspectorDeviceId]]; } @implementation RCTInspectorDevServerHelper @@ -70,8 +121,13 @@ + (void)openDebugger:(NSURL *)bundleURL withErrorMessage:(NSString *)errorMessag NSString *appId = [[[NSBundle mainBundle] bundleIdentifier] stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; - NSURL *url = [NSURL - URLWithString:[NSString stringWithFormat:@"http://%@/open-debugger?appId=%@", getServerHost(bundleURL), appId]]; + NSString *escapedInspectorDeviceId = [getInspectorDeviceId() + stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; + + NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/open-debugger?appId=%@&device=%@", + getServerHost(bundleURL), + appId, + escapedInspectorDeviceId]]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@"POST"]; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java index d5c427fc67a4..4cef3eed6904 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java @@ -9,6 +9,7 @@ import android.net.Uri; import android.os.AsyncTask; +import android.provider.Settings; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.facebook.common.logging.FLog; @@ -30,6 +31,9 @@ import com.facebook.react.util.RNLog; import java.io.File; import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -244,13 +248,73 @@ public String getWebsocketProxyURL() { mPackagerConnectionSettings.getDebugServerHost()); } + private static String getSHA256(String string) { + MessageDigest digest = null; + try { + digest = MessageDigest.getInstance("SHA-256"); + } catch (NoSuchAlgorithmException e) { + throw new AssertionError("Could not get standard SHA-256 algorithm", e); + } + digest.reset(); + byte[] result; + try { + result = digest.digest(string.getBytes("UTF-8")); + } catch (UnsupportedEncodingException e) { + throw new AssertionError("This environment doesn't support UTF-8 encoding", e); + } + return String.format( + "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + result[0], + result[1], + result[2], + result[3], + result[4], + result[5], + result[6], + result[7], + result[8], + result[9], + result[10], + result[11], + result[12], + result[13], + result[14], + result[15], + result[16], + result[17], + result[18], + result[19]); + } + + // Returns an opaque ID which is stable for the current combination of device and app, stable + // across installs, and unique across devices. + private String getInspectorDeviceId() { + // Every Android app has a unique application ID that looks like a Java or Kotlin package name, + // such as com.example.myapp. This ID uniquely identifies your app on the device and in the + // Google Play Store. + // [Source: Android docs] + String packageName = mPackageName; + + // A 64-bit number expressed as a hexadecimal string, which is either: + // * unique to each combination of app-signing key, user, and device (API level >= 26), or + // * randomly generated when the user first sets up the device and should remain constant for + // the lifetime of the user's device (API level < 26). + // [Source: Android docs] + String androidId = Settings.Secure.ANDROID_ID; + + String rawDeviceId = String.format(Locale.US, "android-%s-%s", packageName, androidId); + + return getSHA256(rawDeviceId); + } + private String getInspectorDeviceUrl() { return String.format( Locale.US, - "http://%s/inspector/device?name=%s&app=%s", + "http://%s/inspector/device?name=%s&app=%s&device=%s", mPackagerConnectionSettings.getInspectorServerHost(), - AndroidInfoHelpers.getFriendlyDeviceName(), - mPackageName); + Uri.encode(AndroidInfoHelpers.getFriendlyDeviceName()), + Uri.encode(mPackageName), + Uri.encode(getInspectorDeviceId())); } public void downloadBundleFromURL( @@ -425,9 +489,10 @@ public void openDebugger(final ReactContext context, final String errorMessage) String requestUrl = String.format( Locale.US, - "http://%s/open-debugger?appId=%s", + "http://%s/open-debugger?appId=%s&device=%s", mPackagerConnectionSettings.getInspectorServerHost(), - Uri.encode(mPackageName)); + Uri.encode(mPackageName), + Uri.encode(getInspectorDeviceId())); Request request = new Request.Builder().url(requestUrl).method("POST", RequestBody.create(null, "")).build(); From 8edc36e33c79cebcf13f1acffa08726e40479bc1 Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 21 Dec 2023 20:26:21 -0400 Subject: [PATCH 150/190] [Local] Clean up invalid translations (#42040) --- .../main/res/devsupport/values-cb/strings.xml | 6 ---- .../res/devsupport/values-fb-rLS/strings.xml | 8 ----- .../main/res/devsupport/values-fb/strings.xml | 8 ----- .../res/views/uimanager/values-cb/strings.xml | 13 -------- .../views/uimanager/values-fb-rLS/strings.xml | 26 ---------------- .../res/views/uimanager/values-fb/strings.xml | 31 ------------------- 6 files changed, 92 deletions(-) delete mode 100644 packages/react-native/ReactAndroid/src/main/res/devsupport/values-cb/strings.xml delete mode 100644 packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb-rLS/strings.xml delete mode 100644 packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb/strings.xml delete mode 100644 packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cb/strings.xml delete mode 100644 packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb-rLS/strings.xml delete mode 100644 packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb/strings.xml diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-cb/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-cb/strings.xml deleted file mode 100644 index 89de99e2b6bf..000000000000 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-cb/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb-rLS/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb-rLS/strings.xml deleted file mode 100644 index 448b9c7e8f40..000000000000 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb-rLS/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - React Native Dev Menu (%1$s)\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@ - Running %1$s\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@ - diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb/strings.xml deleted file mode 100644 index 05438a4eb22e..000000000000 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fb/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - [React Native Dev Menu (%1$s)#f560753940a8856cdc2de8717c0295df:1] - [Running %1$s#c566f94d6bbe163799a3235b4b55f9d1:1] - diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cb/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cb/strings.xml deleted file mode 100644 index 390c26b1965b..000000000000 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cb/strings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - بەستەر - وێنە - دوگمە، وێنە - خشتەی دیاریکردن - پێڕست - کارا - کوژاندنەوە - diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb-rLS/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb-rLS/strings.xml deleted file mode 100644 index b36e207a5eff..000000000000 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb-rLS/strings.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - Image \@\@\@ - Button, Image\@\@\@\@\@\@ - Heading \@\@\@ \@\@\@ - Combo Box \@\@\@ - Menu \@\@\@ - Menu Bar \@\@\@ - Menu Item\@\@\@\@\@\@ - Progress Bar\@\@\@\@\@\@ - Radio Group\@\@\@\@\@\@\@\@\@ - Scroll Bar\@\@\@\@\@\@\@\@\@ - Spin Button \@\@\@ \@\@\@ - Tab List\@\@\@ - Timer \@\@\@ - Tool Bar\@\@\@\@\@\@ - Summary\@\@\@\@\@\@ - expanded \@\@\@ \@\@\@ - collapsed \@\@\@ \@\@\@ \@\@\@ - unselected\@\@\@ - off \@\@\@ - mixed\@\@\@ - diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb/strings.xml deleted file mode 100644 index 42769e25d7f3..000000000000 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fb/strings.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - [Link#a31d26668a679e44a0843994a6744274:1] - [Image#d8aa55c15c7118a635092b092bcf1d33:1] - [Button, Image#2b5b423bf3daff8f8b188f5d5733ec14:1] - [Heading#03d19d231fd31bc5dae409f337e4fea3:1] - [Alert#f230077c00a8397fcc7138dfd8b37405:1] - [Combo Box#c399e5a30d2d764efcced424465cacc4:1] - [Menu#a2c49a9b7c94c31d6f53f5f59329a558:1] - [Menu Bar#9ede63b4972815fe4810781f1f15770c:1] - [Menu Item#ba3a1d642e7bfae7a60f57181ff5a91f:1] - [Progress Bar#fc1ee5dacc16eb35a88ca3aff9355683:1] - [Radio Group#382586bc34074311334bc929c63f69e4:1] - [Scroll Bar#8c5cb8c1bbbac0ed64bb63c240b9a415:1] - [Spin Button#8af18737c08f4adab8e7103876d29955:1] - [Tab#60c56bd22945b4d1532f474bfc568a66:1] - [Tab List#8daaf7f9316191f0e35f3ba31ed11aec:1] - [Timer#2f3aa4d3a05064a96945540d06072632:1] - [Tool Bar#13851684ac57a6612b478471e4894082:1] - [Summary#12f17d5316cde76d270ad4534e1d9f35:1] - [busy#c38a44fbc4bbf985a9e846c05e60b947:1] - [expanded#45ee23081f04143c5be90131a7b0e3c5:1] - [collapsed#850739bd3f1cb1a9b82c3a6f68399233:1] - [unselected#815cb61a1bc6c57ed0a65707d8c0c2d2:1] - [on#86ddae449e2a1cb3b1fc5fed82bfc660:1] - [off#f1ca5b210c9adef0fe7f14fe85ba521d:1] - [mixed#30d19e1c3c088ba70e30538143bad3a8:1] - From ddf35052527b4d59aebd1dae1351fad18ca5af96 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Sat, 16 Dec 2023 08:50:20 -0800 Subject: [PATCH 151/190] Install bundler versions depending on Ruby version (#41962) Summary: Since yesterday evening (why it is always friday evening???) CircleCI or Gem decided to update the default bundler version that is installed with `gem bundle install`. Therefore, CI for iOS stopped working. This change installs bundler's versions so that they are compatible with the Ruby version. ## Changelog: [Internal] - Fix CI for iOS installing versions of bundler that are compatible with Ruby Pull Request resolved: https://github.com/facebook/react-native/pull/41962 Test Plan: CircleCI is green Reviewed By: GijsWeterings Differential Revision: D52230544 Pulled By: cipolleschi fbshipit-source-id: 2f96e16ecb94159953056e8de757ea4d249f80f0 --- .circleci/configurations/commands.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/configurations/commands.yml b/.circleci/configurations/commands.yml index 0461946330ab..13909bb7df25 100644 --- a/.circleci/configurations/commands.yml +++ b/.circleci/configurations/commands.yml @@ -61,7 +61,11 @@ commands: # Set ruby dependencies rbenv global << parameters.ruby_version >> - gem install bundler + if [[ << parameters.ruby_version >> == "2.6.10" ]]; then + gem install bundler -v 2.4.22 + else + gem install bundler + fi bundle check || bundle install --path vendor/bundle --clean - save_cache: key: *rbenv_cache_key From 99b5b9d9a7512221c8e6a15b64e42d6b0991dccd Mon Sep 17 00:00:00 2001 From: Ivan Alexandrov Date: Wed, 11 Oct 2023 08:47:23 -0700 Subject: [PATCH 152/190] Fix android platform border color (#39893) Summary: If you try to apply PlatformColor to borders on Android app will crash with the next error: "Error while updating property 'borderColor' of a view managed by: RCTView" ## Changelog: [ANDROID] [FIXED] - Fix android crash when apply PlatformColor to borders Pull Request resolved: https://github.com/facebook/react-native/pull/39893 Test Plan: In RNTester example, go to APIs -> PlatformColor | Before | After | | ----------- | ----------- | | drawing | drawing | Reviewed By: NickGerleman Differential Revision: D50011758 Pulled By: javache fbshipit-source-id: ea06c18c6aef4b6731e9b9b87422a1e0d13de208 --- .../uimanager/ViewManagersPropertyCache.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java index c187cac7bea3..09ae7a272ad0 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java @@ -204,6 +204,11 @@ public ColorPropSetter(ReactProp prop, Method setter, int defaultValue) { mDefaultValue = defaultValue; } + public ColorPropSetter(ReactPropGroup prop, Method setter, int index, int defaultValue) { + super(prop, "mixed", setter, index); + mDefaultValue = defaultValue; + } + @Override protected Object getValueOrDefault(Object value, Context context) { if (value == null) { @@ -331,6 +336,10 @@ public BoxedColorPropSetter(ReactProp prop, Method setter) { super(prop, "mixed", setter); } + public BoxedColorPropSetter(ReactPropGroup prop, Method setter, int index) { + super(prop, "mixed", setter, index); + } + @Override protected @Nullable Object getValueOrDefault(Object value, Context context) { if (value != null) { @@ -468,7 +477,11 @@ private static void createPropSetters( } } else if (propTypeClass == int.class) { for (int i = 0; i < names.length; i++) { - props.put(names[i], new IntPropSetter(annotation, method, i, annotation.defaultInt())); + if ("Color".equals(annotation.customType())) { + props.put(names[i], new ColorPropSetter(annotation, method, i, annotation.defaultInt())); + } else { + props.put(names[i], new IntPropSetter(annotation, method, i, annotation.defaultInt())); + } } } else if (propTypeClass == float.class) { for (int i = 0; i < names.length; i++) { @@ -481,7 +494,11 @@ private static void createPropSetters( } } else if (propTypeClass == Integer.class) { for (int i = 0; i < names.length; i++) { - props.put(names[i], new BoxedIntPropSetter(annotation, method, i)); + if ("Color".equals(annotation.customType())) { + props.put(names[i], new BoxedColorPropSetter(annotation, method, i)); + } else { + props.put(names[i], new BoxedIntPropSetter(annotation, method, i)); + } } } else { throw new RuntimeException( From bc05f48ad125b398f338f861bb5abd1749bd59d7 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Wed, 27 Dec 2023 08:47:02 -0800 Subject: [PATCH 153/190] Fix comment about adding packages in android template (#41856) Summary: I noticed this comment is still in Java in the Kotlin template. It also doesn't really work anymore since there is no packages variable. To fix it I completed the comment with all code needed for it to work in kotlin. I think an older version of the template used to be more like: ```kotlin val packages = PackageList(this).packages // packages.add(MyReactNativePackage()) return packages ``` But then it requires adding a lint suppress annotation since packages variable can be simplified. I think this is simpler even if it makes the comment a few more lines. ## Changelog: [GENERAL] [FIXED] - Fix comment about adding packages in android template Pull Request resolved: https://github.com/facebook/react-native/pull/41856 Test Plan: Tested that uncommenting that code works Reviewed By: cipolleschi Differential Revision: D51987483 Pulled By: cortinico fbshipit-source-id: d0135b5b536960017ccc7b25f92c75b3bd863cd9 --- .../src/main/java/com/helloworld/MainApplication.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt index 1c38e10c0f7d..cee542dd0812 100644 --- a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt +++ b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt @@ -16,11 +16,11 @@ class MainApplication : Application(), ReactApplication { override val reactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) { - override fun getPackages(): List { - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return PackageList(this).packages - } + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } override fun getJSMainModuleName(): String = "index" From 2f92a87e4385d515f718479005c623c04fa1bb83 Mon Sep 17 00:00:00 2001 From: Morritz <12800230+Morritz@users.noreply.github.com> Date: Mon, 11 Dec 2023 07:08:48 -0800 Subject: [PATCH 154/190] Enhance IP address retrieval for iOS devices in Metro bundler setup (#41839) Summary: After introducing this commit https://github.com/facebook/react-native/commit/a56e5dad7c31b6e9e6b02333219bc33811215056 script may fail in some circumstances. Example: When there is IP address available only for en1 and not en0, first "ipconfig" command in the loop fails with error code 1 and cancels whole script. ## Changelog: [iOS] [Fixed] - [enhance IP address retrieval for iOS devices in Metro bundler setup](https://github.com/facebook/react-native/pull/41839/commits/6a351db158dadf944933173aa0150435c742001f) Pull Request resolved: https://github.com/facebook/react-native/pull/41839 Reviewed By: christophpurrer Differential Revision: D51979040 Pulled By: dmytrorykun fbshipit-source-id: 0f6f42a7dd70bac012875ffae5d651b74b225c94 --- packages/react-native/scripts/react-native-xcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/react-native-xcode.sh b/packages/react-native/scripts/react-native-xcode.sh index c34ea666d782..c821d74d1d0e 100755 --- a/packages/react-native/scripts/react-native-xcode.sh +++ b/packages/react-native/scripts/react-native-xcode.sh @@ -15,7 +15,7 @@ DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH # Enables iOS devices to get the IP address of the machine running Metro if [[ ! "$SKIP_BUNDLING_METRO_IP" && "$CONFIGURATION" = *Debug* && ! "$PLATFORM_NAME" == *simulator ]]; then for num in 0 1 2 3 4 5 6 7 8; do - IP=$(ipconfig getifaddr en${num}) + IP=$(ipconfig getifaddr en${num} || echo "") if [ ! -z "$IP" ]; then break fi From 869ce3b2d389668eb2a6690c784cd3179fdb5b81 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Wed, 27 Dec 2023 22:26:53 -0800 Subject: [PATCH 155/190] [Local] Update podfile lockfile --- packages/rn-tester/Podfile.lock | 478 ++++++++++++++++---------------- 1 file changed, 239 insertions(+), 239 deletions(-) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 83a830ba6c4f..06997b1b35ea 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.0) - - FBReactNativeSpec (0.73.0): + - FBLazyVector (0.73.1) + - FBReactNativeSpec (0.73.1): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.0) - - RCTTypeSafety (= 0.73.0) - - React-Core (= 0.73.0) - - React-jsi (= 0.73.0) - - ReactCommon/turbomodule/core (= 0.73.0) + - RCTRequired (= 0.73.1) + - RCTTypeSafety (= 0.73.1) + - React-Core (= 0.73.1) + - React-jsi (= 0.73.1) + - ReactCommon/turbomodule/core (= 0.73.1) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -68,9 +68,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.0-rc.7): - - hermes-engine/Pre-built (= 0.73.0-rc.7) - - hermes-engine/Pre-built (0.73.0-rc.7) + - hermes-engine (0.73.1): + - hermes-engine/Pre-built (= 0.73.1) + - hermes-engine/Pre-built (0.73.1) - libevent (2.1.12) - OCMock (3.9.1) - OpenSSL-Universal (1.1.1100) @@ -96,26 +96,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.0) - - RCTTypeSafety (0.73.0): - - FBLazyVector (= 0.73.0) - - RCTRequired (= 0.73.0) - - React-Core (= 0.73.0) - - React (0.73.0): - - React-Core (= 0.73.0) - - React-Core/DevSupport (= 0.73.0) - - React-Core/RCTWebSocket (= 0.73.0) - - React-RCTActionSheet (= 0.73.0) - - React-RCTAnimation (= 0.73.0) - - React-RCTBlob (= 0.73.0) - - React-RCTImage (= 0.73.0) - - React-RCTLinking (= 0.73.0) - - React-RCTNetwork (= 0.73.0) - - React-RCTSettings (= 0.73.0) - - React-RCTText (= 0.73.0) - - React-RCTVibration (= 0.73.0) - - React-callinvoker (0.73.0) - - React-Codegen (0.73.0): + - RCTRequired (0.73.1) + - RCTTypeSafety (0.73.1): + - FBLazyVector (= 0.73.1) + - RCTRequired (= 0.73.1) + - React-Core (= 0.73.1) + - React (0.73.1): + - React-Core (= 0.73.1) + - React-Core/DevSupport (= 0.73.1) + - React-Core/RCTWebSocket (= 0.73.1) + - React-RCTActionSheet (= 0.73.1) + - React-RCTAnimation (= 0.73.1) + - React-RCTBlob (= 0.73.1) + - React-RCTImage (= 0.73.1) + - React-RCTLinking (= 0.73.1) + - React-RCTNetwork (= 0.73.1) + - React-RCTSettings (= 0.73.1) + - React-RCTText (= 0.73.1) + - React-RCTVibration (= 0.73.1) + - React-callinvoker (0.73.1) + - React-Codegen (0.73.1): - DoubleConversion - FBReactNativeSpec - glog @@ -136,11 +136,11 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.0): + - React-Core (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0) + - React-Core/Default (= 0.73.1) - React-cxxreact - React-hermes - React-jsi @@ -150,7 +150,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.0): + - React-Core/CoreModulesHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -164,7 +164,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.0): + - React-Core/Default (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -177,23 +177,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.0): + - React-Core/DevSupport (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0) - - React-Core/RCTWebSocket (= 0.73.0) + - React-Core/Default (= 0.73.1) + - React-Core/RCTWebSocket (= 0.73.1) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.0) + - React-jsinspector (= 0.73.1) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.0): + - React-Core/RCTActionSheetHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -207,7 +207,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.0): + - React-Core/RCTAnimationHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -221,7 +221,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.0): + - React-Core/RCTBlobHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -235,7 +235,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.0): + - React-Core/RCTImageHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -249,7 +249,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.0): + - React-Core/RCTLinkingHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -263,7 +263,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.0): + - React-Core/RCTNetworkHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -277,7 +277,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.73.0): + - React-Core/RCTPushNotificationHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -291,7 +291,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.0): + - React-Core/RCTSettingsHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -305,7 +305,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.0): + - React-Core/RCTTextHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -319,7 +319,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.0): + - React-Core/RCTVibrationHeaders (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -333,11 +333,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.0): + - React-Core/RCTWebSocket (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.0) + - React-Core/Default (= 0.73.1) - React-cxxreact - React-hermes - React-jsi @@ -347,33 +347,33 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.0): + - React-CoreModules (0.73.1): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.0) + - RCTTypeSafety (= 0.73.1) - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.0) - - React-jsi (= 0.73.0) + - React-Core/CoreModulesHeaders (= 0.73.1) + - React-jsi (= 0.73.1) - React-NativeModulesApple - React-RCTBlob - - React-RCTImage (= 0.73.0) + - React-RCTImage (= 0.73.1) - ReactCommon - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.0): + - React-cxxreact (0.73.1): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0) - - React-debug (= 0.73.0) - - React-jsi (= 0.73.0) - - React-jsinspector (= 0.73.0) - - React-logger (= 0.73.0) - - React-perflogger (= 0.73.0) - - React-runtimeexecutor (= 0.73.0) - - React-debug (0.73.0) - - React-Fabric (0.73.0): + - React-callinvoker (= 0.73.1) + - React-debug (= 0.73.1) + - React-jsi (= 0.73.1) + - React-jsinspector (= 0.73.1) + - React-logger (= 0.73.1) + - React-perflogger (= 0.73.1) + - React-runtimeexecutor (= 0.73.1) + - React-debug (0.73.1) + - React-Fabric (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -384,20 +384,20 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.0) - - React-Fabric/attributedstring (= 0.73.0) - - React-Fabric/componentregistry (= 0.73.0) - - React-Fabric/componentregistrynative (= 0.73.0) - - React-Fabric/components (= 0.73.0) - - React-Fabric/core (= 0.73.0) - - React-Fabric/imagemanager (= 0.73.0) - - React-Fabric/leakchecker (= 0.73.0) - - React-Fabric/mounting (= 0.73.0) - - React-Fabric/scheduler (= 0.73.0) - - React-Fabric/telemetry (= 0.73.0) - - React-Fabric/templateprocessor (= 0.73.0) - - React-Fabric/textlayoutmanager (= 0.73.0) - - React-Fabric/uimanager (= 0.73.0) + - React-Fabric/animations (= 0.73.1) + - React-Fabric/attributedstring (= 0.73.1) + - React-Fabric/componentregistry (= 0.73.1) + - React-Fabric/componentregistrynative (= 0.73.1) + - React-Fabric/components (= 0.73.1) + - React-Fabric/core (= 0.73.1) + - React-Fabric/imagemanager (= 0.73.1) + - React-Fabric/leakchecker (= 0.73.1) + - React-Fabric/mounting (= 0.73.1) + - React-Fabric/scheduler (= 0.73.1) + - React-Fabric/telemetry (= 0.73.1) + - React-Fabric/templateprocessor (= 0.73.1) + - React-Fabric/textlayoutmanager (= 0.73.1) + - React-Fabric/uimanager (= 0.73.1) - React-graphics - React-jsi - React-jsiexecutor @@ -406,7 +406,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.0): + - React-Fabric/animations (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -425,7 +425,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.0): + - React-Fabric/attributedstring (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -444,7 +444,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.0): + - React-Fabric/componentregistry (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -463,7 +463,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.0): + - React-Fabric/componentregistrynative (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -482,7 +482,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.0): + - React-Fabric/components (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -493,17 +493,17 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.0) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.0) - - React-Fabric/components/modal (= 0.73.0) - - React-Fabric/components/rncore (= 0.73.0) - - React-Fabric/components/root (= 0.73.0) - - React-Fabric/components/safeareaview (= 0.73.0) - - React-Fabric/components/scrollview (= 0.73.0) - - React-Fabric/components/text (= 0.73.0) - - React-Fabric/components/textinput (= 0.73.0) - - React-Fabric/components/unimplementedview (= 0.73.0) - - React-Fabric/components/view (= 0.73.0) + - React-Fabric/components/inputaccessory (= 0.73.1) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.1) + - React-Fabric/components/modal (= 0.73.1) + - React-Fabric/components/rncore (= 0.73.1) + - React-Fabric/components/root (= 0.73.1) + - React-Fabric/components/safeareaview (= 0.73.1) + - React-Fabric/components/scrollview (= 0.73.1) + - React-Fabric/components/text (= 0.73.1) + - React-Fabric/components/textinput (= 0.73.1) + - React-Fabric/components/unimplementedview (= 0.73.1) + - React-Fabric/components/view (= 0.73.1) - React-graphics - React-jsi - React-jsiexecutor @@ -512,7 +512,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.0): + - React-Fabric/components/inputaccessory (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -531,7 +531,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.0): + - React-Fabric/components/legacyviewmanagerinterop (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -550,7 +550,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.0): + - React-Fabric/components/modal (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -569,7 +569,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.0): + - React-Fabric/components/rncore (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -588,7 +588,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.0): + - React-Fabric/components/root (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -607,7 +607,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.0): + - React-Fabric/components/safeareaview (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -626,7 +626,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.0): + - React-Fabric/components/scrollview (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -645,7 +645,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.0): + - React-Fabric/components/text (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -664,7 +664,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.0): + - React-Fabric/components/textinput (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -683,7 +683,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.0): + - React-Fabric/components/unimplementedview (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -702,7 +702,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.0): + - React-Fabric/components/view (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -722,7 +722,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (0.73.0): + - React-Fabric/core (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -741,7 +741,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.0): + - React-Fabric/imagemanager (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -760,7 +760,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.0): + - React-Fabric/leakchecker (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -779,7 +779,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.0): + - React-Fabric/mounting (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -798,7 +798,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.0): + - React-Fabric/scheduler (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -817,7 +817,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.0): + - React-Fabric/telemetry (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -836,7 +836,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.0): + - React-Fabric/templateprocessor (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -855,7 +855,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.0): + - React-Fabric/textlayoutmanager (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -875,7 +875,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.0): + - React-Fabric/uimanager (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -894,42 +894,42 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricImage (0.73.0): + - React-FabricImage (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.0) - - RCTTypeSafety (= 0.73.0) + - RCTRequired (= 0.73.1) + - RCTTypeSafety (= 0.73.1) - React-Fabric - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.73.0) + - React-jsiexecutor (= 0.73.1) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-graphics (0.73.0): + - React-graphics (0.73.1): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.0) + - React-Core/Default (= 0.73.1) - React-utils - - React-hermes (0.73.0): + - React-hermes (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.0) + - React-cxxreact (= 0.73.1) - React-jsi - - React-jsiexecutor (= 0.73.0) - - React-jsinspector (= 0.73.0) - - React-perflogger (= 0.73.0) - - React-ImageManager (0.73.0): + - React-jsiexecutor (= 0.73.1) + - React-jsinspector (= 0.73.1) + - React-perflogger (= 0.73.1) + - React-ImageManager (0.73.1): - glog - RCT-Folly/Fabric - React-Core/Default @@ -938,35 +938,35 @@ PODS: - React-graphics - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.0): + - React-jserrorhandler (0.73.1): - RCT-Folly/Fabric (= 2022.05.16.00) - React-debug - React-jsi - React-Mapbuffer - - React-jsi (0.73.0): + - React-jsi (0.73.1): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.0): + - React-jsiexecutor (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.0) - - React-jsi (= 0.73.0) - - React-perflogger (= 0.73.0) - - React-jsinspector (0.73.0) - - React-logger (0.73.0): + - React-cxxreact (= 0.73.1) + - React-jsi (= 0.73.1) + - React-perflogger (= 0.73.1) + - React-jsinspector (0.73.1) + - React-logger (0.73.1): - glog - - React-Mapbuffer (0.73.0): + - React-Mapbuffer (0.73.1): - glog - React-debug - - React-nativeconfig (0.73.0) - - React-NativeModulesApple (0.73.0): + - React-nativeconfig (0.73.1) + - React-NativeModulesApple (0.73.1): - glog - hermes-engine - React-callinvoker @@ -976,10 +976,10 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.0) - - React-RCTActionSheet (0.73.0): - - React-Core/RCTActionSheetHeaders (= 0.73.0) - - React-RCTAnimation (0.73.0): + - React-perflogger (0.73.1) + - React-RCTActionSheet (0.73.1): + - React-Core/RCTActionSheetHeaders (= 0.73.1) + - React-RCTAnimation (0.73.1): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -987,7 +987,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTAppDelegate (0.73.0): + - React-RCTAppDelegate (0.73.1): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1001,7 +1001,7 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon - - React-RCTBlob (0.73.0): + - React-RCTBlob (0.73.1): - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-Codegen @@ -1011,7 +1011,7 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.73.0): + - React-RCTFabric (0.73.1): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1029,7 +1029,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.0): + - React-RCTImage (0.73.1): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1038,14 +1038,14 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.73.0): + - React-RCTLinking (0.73.1): - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.0) - - React-jsi (= 0.73.0) + - React-Core/RCTLinkingHeaders (= 0.73.1) + - React-jsi (= 0.73.1) - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.0) - - React-RCTNetwork (0.73.0): + - ReactCommon/turbomodule/core (= 0.73.1) + - React-RCTNetwork (0.73.1): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1053,14 +1053,14 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTPushNotification (0.73.0): + - React-RCTPushNotification (0.73.1): - RCTTypeSafety - React-Codegen - React-Core/RCTPushNotificationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTSettings (0.73.0): + - React-RCTSettings (0.73.1): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1068,31 +1068,31 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTTest (0.73.0): + - React-RCTTest (0.73.1): - RCT-Folly (= 2022.05.16.00) - - React-Core (= 0.73.0) - - React-CoreModules (= 0.73.0) - - React-jsi (= 0.73.0) - - ReactCommon/turbomodule/core (= 0.73.0) - - React-RCTText (0.73.0): - - React-Core/RCTTextHeaders (= 0.73.0) + - React-Core (= 0.73.1) + - React-CoreModules (= 0.73.1) + - React-jsi (= 0.73.1) + - ReactCommon/turbomodule/core (= 0.73.1) + - React-RCTText (0.73.1): + - React-Core/RCTTextHeaders (= 0.73.1) - Yoga - - React-RCTVibration (0.73.0): + - React-RCTVibration (0.73.1): - RCT-Folly (= 2022.05.16.00) - React-Codegen - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-rendererdebug (0.73.0): + - React-rendererdebug (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.0) - - React-runtimeexecutor (0.73.0): - - React-jsi (= 0.73.0) - - React-runtimescheduler (0.73.0): + - React-rncore (0.73.1) + - React-runtimeexecutor (0.73.1): + - React-jsi (= 0.73.1) + - React-runtimescheduler (0.73.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1103,14 +1103,14 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.0): + - React-utils (0.73.1): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon (0.73.0): - - React-logger (= 0.73.0) - - ReactCommon/turbomodule (= 0.73.0) - - ReactCommon-Samples (0.73.0): + - ReactCommon (0.73.1): + - React-logger (= 0.73.1) + - ReactCommon/turbomodule (= 0.73.1) + - ReactCommon-Samples (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - hermes-engine @@ -1121,41 +1121,41 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule (0.73.0): + - ReactCommon/turbomodule (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0) - - React-cxxreact (= 0.73.0) - - React-jsi (= 0.73.0) - - React-logger (= 0.73.0) - - React-perflogger (= 0.73.0) - - ReactCommon/turbomodule/bridging (= 0.73.0) - - ReactCommon/turbomodule/core (= 0.73.0) - - ReactCommon/turbomodule/bridging (0.73.0): + - React-callinvoker (= 0.73.1) + - React-cxxreact (= 0.73.1) + - React-jsi (= 0.73.1) + - React-logger (= 0.73.1) + - React-perflogger (= 0.73.1) + - ReactCommon/turbomodule/bridging (= 0.73.1) + - ReactCommon/turbomodule/core (= 0.73.1) + - ReactCommon/turbomodule/bridging (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0) - - React-cxxreact (= 0.73.0) - - React-jsi (= 0.73.0) - - React-logger (= 0.73.0) - - React-perflogger (= 0.73.0) - - ReactCommon/turbomodule/core (0.73.0): + - React-callinvoker (= 0.73.1) + - React-cxxreact (= 0.73.1) + - React-jsi (= 0.73.1) + - React-logger (= 0.73.1) + - React-perflogger (= 0.73.1) + - ReactCommon/turbomodule/core (0.73.1): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.0) - - React-cxxreact (= 0.73.0) - - React-jsi (= 0.73.0) - - React-logger (= 0.73.0) - - React-perflogger (= 0.73.0) + - React-callinvoker (= 0.73.1) + - React-cxxreact (= 0.73.1) + - React-jsi (= 0.73.1) + - React-logger (= 0.73.1) + - React-perflogger (= 0.73.1) - ScreenshotManager (0.0.1): - glog - RCT-Folly (= 2022.05.16.00) @@ -1371,8 +1371,8 @@ SPEC CHECKSUMS: boost: 26fad476bfa736552bbfa698a06cc530475c1505 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: 39ba45baf4e398618f8b3a4bb6ba8fcdb7fc2133 - FBReactNativeSpec: 8b5987a14d001477ca779b73e56aeb8fcfdfddb2 + FBLazyVector: 2296bacb2fa157a43991048b0a9d71c1c8b65083 + FBReactNativeSpec: 61ca3a5cc9d4bc5fbf6a3a00cbbf66f00ef6d908 Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1383,58 +1383,58 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 93e93ab461081ebb33d3f0a48944b85cd7cc5035 + hermes-engine: 34df9d5034e90bd9bf1505e1ca198760373935af libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 5e3631b27c08716986980ef23eed8abdee1cdcaf - RCTTypeSafety: 02a64828b0b428eb4f63de1397d44fb2d0747e85 - React: df5dbfbd10c5bd8d4bcb49bd9830551533e11c7e - React-callinvoker: dc0dff59e8d3d1fe4cd9fb5f120f82a775d2a325 - React-Codegen: e41493fc60cfe314eb5a600247d13c0533c4b75b - React-Core: 276ccbbf282538138f4429313bb1200a15067c6e - React-CoreModules: 64747180c0329bebed8307ffdc97c331220277a6 - React-cxxreact: 84d98283f701bae882dcd3ad7c573a02f4c9d5c0 - React-debug: 443cf46ade52f3555dd1ec709718793490ac5edc - React-Fabric: 4c877c032b3acc07ed3f2e46ae25b5a39af89382 - React-FabricImage: c46c47ea3c672b9fadd6850795a51d3d9e5df712 - React-graphics: e1cff03acf09098513642535324432d495b6425c - React-hermes: e3356f82c76c5c41688a7e08ced2254a944501c4 - React-ImageManager: c783771479ab0bf1e3dbe711cc8b9f5b0f65972b - React-jserrorhandler: 7cd93ce5165e5d66c87b6f612f94e5642f5c5028 - React-jsi: 81b5fe94500e69051c2f3a775308afaa53e2608b - React-jsiexecutor: 4f790f865ad23fa949396c1a103d06867c0047ed - React-jsinspector: 9f6fb9ed9f03a0fb961ab8dc2e0e0ee0dc729e77 - React-logger: 008caec0d6a587abc1e71be21bfac5ba1662fe6a - React-Mapbuffer: 58fe558faf52ecde6705376700f848d0293d1cef - React-nativeconfig: a063483672b8add47a4875b0281e202908ff6747 - React-NativeModulesApple: 169506a5fd708ab22811f76ee06a976595c367a1 - React-perflogger: b61e5db8e5167f5e70366e820766c492847c082e - React-RCTActionSheet: dcaecff7ffc1888972cd1c1935751ff3bce1e0c1 - React-RCTAnimation: 24b8ae7ebc897ba3f33a93a020bbc66ab7863f5d - React-RCTAppDelegate: 661fc59d833e6727cc8c7e36bf8664215e5c277f - React-RCTBlob: 112880abc731c5a0d8eefb5919a591ad30f630e8 - React-RCTFabric: a0289e3bf73da8c03b68b4e9733ba497b021de45 - React-RCTImage: b8065c1b51cc6c2ff58ad81001619352518dd793 - React-RCTLinking: fdf9f43f8bd763d178281a079700105674953849 - React-RCTNetwork: ad3d988e425288492510ee37c9dcdf8259566214 - React-RCTPushNotification: d932fdab545a9750b9c2af920ba4dbde152491e8 - React-RCTSettings: 67c3876f2775d1cf86298f657e6006afc2a2e4cf - React-RCTTest: bcca2affbb6e973b6b82b3ee5edcd131d56d2b24 - React-RCTText: 671518da40bd548943ec12ee6a60f733a751e2e9 - React-RCTVibration: 60bc4d01d7d8ab7cff14852a195a7fa93b38e1f3 - React-rendererdebug: 6aaab394c9fefe395ef61809580a9bf63b98fd3e - React-rncore: 7149cff667c8ea4a2857592ac94e0fd17a802ea6 - React-runtimeexecutor: 2ca6f02d3fd6eea5b9575eb30720cf12c5d89906 - React-runtimescheduler: 77543c74df984ce56c09d49d427149c53784aaf6 - React-utils: 42708ea436853045ef1eaff29996813d9fbbe209 - ReactCommon: 851280fb976399ca1aabc74cc2c3612069ea70a2 - ReactCommon-Samples: 6226f6b7a41796501464849709127ab57dfcba05 + RCTRequired: 6dda55e483f75d2b43781d8ad5bd7df276a50981 + RCTTypeSafety: df0f2632f4e89938b9b9f6152b5e6c66fc6e969e + React: 5373769b4a544945831d9c5d455212186d68f763 + React-callinvoker: 2c54fb73b27fdf9bd7772f36dcda23d76e0e7d14 + React-Codegen: 8817cdc011667f11c457f04f597e8f2cbb5defd6 + React-Core: f0e1e99728ebdb785286b0c4c55f0f923a9d826f + React-CoreModules: 1ee65dbd93429c1c6ec3de069d75f5fde05db5d5 + React-cxxreact: dc0f1968914a6c7da62b1287c1eb84dd3ab0a7bb + React-debug: 52cced4b9e280d03825d687925898cf65bd8712d + React-Fabric: 1805f148aedab4bf31c48c8c3bae6045aeb75275 + React-FabricImage: ee5ee9abe4ab05043fdce515e46f396b025a5028 + React-graphics: a1652cbea6f779a1cf2692987d9c94efcd6e4497 + React-hermes: 12499684a1005213e7ed71a94467ef72cf24320c + React-ImageManager: 5e50ba59059ca7547c8968f936e4ae7a50ff7384 + React-jserrorhandler: 27154e650959506a4455384f3aea134eba62335b + React-jsi: b03ac7f7af1371e3e81e8ac894af4e46454dee79 + React-jsiexecutor: ae30693413a40b7c72f25da2e794997754a780bf + React-jsinspector: 369048694e39942063c5d08e9580b43e2edd379a + React-logger: e0c1e918d9588a9f39c9bc62d9d6bfe9ca238d9d + React-Mapbuffer: 9731a0a63ebaf8976014623c4d637744d7353a7c + React-nativeconfig: 37aecd26d64b79327c3f10e43b2e9a6c425e0a60 + React-NativeModulesApple: 9ca6d2eaa1dd5606588262195b46d0774bdec83a + React-perflogger: 5ffc4d6ccb74eaac7b8b2867e58a447232483d6d + React-RCTActionSheet: eca2174431ff2cc14b7fb847f92b89e081d27541 + React-RCTAnimation: a039b2416aa0a55e6fa7c8cd0a2e870bfffc4caa + React-RCTAppDelegate: be26c542774d36211b1562a9278c72f821887103 + React-RCTBlob: 0d4892d25e57fbbce13e221fff7e4c9567a2ace3 + React-RCTFabric: d11187cac1f4e0141738805f7011145c7786a369 + React-RCTImage: 5b70891cb2adb75bbdc5ad8e6cc56c48e95d90e5 + React-RCTLinking: 5fe4756ab016e9f200e93e771bd6e43ea05f8f50 + React-RCTNetwork: 877b4a85f71c63cf719574f187e3333c1e15a425 + React-RCTPushNotification: 957c0357c786daf1d07fde86dfa281631226823e + React-RCTSettings: ae477a33a04389f5d42486004b09b04eeba64fd5 + React-RCTTest: 078d6e10e873dae497167f4aee2ac9a1636a8cfe + React-RCTText: 08dd5d7173ed279d3468b333217afb22bb7948c3 + React-RCTVibration: 2f906cd58dfd44ff5e4ca4fc0edd8740dceda6be + React-rendererdebug: e3db5db14234d9ee46d2e58fff3b8652ee7da6bc + React-rncore: 1b6e37eee13bec218413abe14b12f719738d2449 + React-runtimeexecutor: d87e84455640dc5685e87563c2eaef90e5df8752 + React-runtimescheduler: 93a4c84e46a85c3fc9678abd4f6923b785226ea7 + React-utils: debda2c206770ee2785bdebb7f16d8db9f18838a + ReactCommon: ddb128564dcbfa0287d3d1a2d10f8c7457c971f6 + ReactCommon-Samples: 8acd68d5fb27255c849e2cb4b9fdca8ac7d5099d ScreenshotManager: 338d56378199c1e9fb50d896a7ce4400cd250b5e SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: 44003f970aa541b79dfdd59cf236fda41bd5890f + Yoga: 2b33a7ac96c58cdaa7b810948fc6a2a76ed2d108 PODFILE CHECKSUM: 7d1b558e28efc972a185230c56fef43ed86910a1 -COCOAPODS: 1.13.0 +COCOAPODS: 1.14.2 From 5061d45782768a256ed6740147456e02a8d44784 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 28 Dec 2023 09:54:08 +0100 Subject: [PATCH 156/190] [RN][CI] Fix e2e test setup --- .circleci/configurations/commands.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/configurations/commands.yml b/.circleci/configurations/commands.yml index 13909bb7df25..1ffde738995d 100644 --- a/.circleci/configurations/commands.yml +++ b/.circleci/configurations/commands.yml @@ -61,7 +61,7 @@ commands: # Set ruby dependencies rbenv global << parameters.ruby_version >> - if [[ << parameters.ruby_version >> == "2.6.10" ]]; then + if [[ $(echo << parameters.ruby_version >> | awk -F'.' '{print $1}') == "2" ]]; then gem install bundler -v 2.4.22 else gem install bundler From 27eaa2f055aa12f1852c0df87f1c2677646c546c Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 28 Dec 2023 14:17:58 -0400 Subject: [PATCH 157/190] Fix monorepo package versions to version published with release (#41958) --- package.json | 4 ++-- packages/community-cli-plugin/package.json | 4 ++-- packages/dev-middleware/package.json | 2 +- packages/eslint-config-react-native/package.json | 2 +- packages/metro-config/package.json | 4 ++-- packages/react-native/package.json | 12 ++++++------ packages/react-native/template/package.json | 8 ++++---- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index dd69b026cc56..6cb2f22828e3 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,8 @@ "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", "@pkgjs/parseargs": "^0.11.0", - "@react-native/metro-babel-transformer": "^0.73.12", - "@react-native/metro-config": "^0.73.2", + "@react-native/metro-babel-transformer": "0.73.12", + "@react-native/metro-config": "0.73.2", "@tsconfig/node18": "1.0.1", "@types/react": "^18.0.18", "@typescript-eslint/parser": "^5.57.1", diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 238b37428f70..b243e28bbb6d 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -22,10 +22,10 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "^0.73.6", + "@react-native/dev-middleware": "0.73.6", "@react-native-community/cli-server-api": "12.3.0", "@react-native-community/cli-tools": "12.3.0", - "@react-native/metro-babel-transformer": "^0.73.12", + "@react-native/metro-babel-transformer": "0.73.12", "chalk": "^4.0.0", "execa": "^5.1.1", "metro": "^0.80.0", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 5bbee5143493..796922185ea1 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -23,7 +23,7 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "^0.73.3", + "@react-native/debugger-frontend": "0.73.3", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^1.0.0", "connect": "^3.6.5", diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index 1eb71f2d4004..28b303138b63 100644 --- a/packages/eslint-config-react-native/package.json +++ b/packages/eslint-config-react-native/package.json @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.20.0", "@babel/eslint-parser": "^7.20.0", - "@react-native/eslint-plugin": "^0.73.1", + "@react-native/eslint-plugin": "0.73.1", "@typescript-eslint/eslint-plugin": "^5.57.1", "@typescript-eslint/parser": "^5.57.1", "eslint-config-prettier": "^8.5.0", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index 7876a404c06d..c152c9dcffa6 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -20,8 +20,8 @@ }, "exports": "./index.js", "dependencies": { - "@react-native/metro-babel-transformer": "^0.73.12", - "@react-native/js-polyfills": "^0.73.1", + "@react-native/metro-babel-transformer": "0.73.12", + "@react-native/js-polyfills": "0.73.1", "metro-config": "^0.80.0", "metro-runtime": "^0.80.0" } diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 44421739bc2e..7c15bd40f78c 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -96,13 +96,13 @@ "@react-native-community/cli": "12.3.0", "@react-native-community/cli-platform-android": "12.3.0", "@react-native-community/cli-platform-ios": "12.3.0", - "@react-native/assets-registry": "^0.73.1", + "@react-native/assets-registry": "0.73.1", "@react-native/community-cli-plugin": "0.73.11", - "@react-native/codegen": "^0.73.2", - "@react-native/gradle-plugin": "^0.73.4", - "@react-native/js-polyfills": "^0.73.1", - "@react-native/normalize-colors": "^0.73.2", - "@react-native/virtualized-lists": "^0.73.4", + "@react-native/codegen": "0.73.2", + "@react-native/gradle-plugin": "0.73.4", + "@react-native/js-polyfills": "0.73.1", + "@react-native/normalize-colors": "0.73.2", + "@react-native/virtualized-lists": "0.73.4", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index ddcc00321cd2..6052a9e4784d 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -17,10 +17,10 @@ "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", - "@react-native/babel-preset": "^0.73.18", - "@react-native/eslint-config": "^0.73.1", - "@react-native/metro-config": "^0.73.2", - "@react-native/typescript-config": "^0.73.1", + "@react-native/babel-preset": "0.73.18", + "@react-native/eslint-config": "0.73.1", + "@react-native/metro-config": "0.73.2", + "@react-native/typescript-config": "0.73.1", "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", From 21fc812725ec3a444afdd51c999ffc26a1ed00ae Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 28 Dec 2023 14:24:01 -0400 Subject: [PATCH 158/190] Update these to use latest 0.73.x versions (#42082) --- packages/babel-plugin-codegen/package.json | 2 +- packages/eslint-plugin-specs/package.json | 2 +- packages/react-native-babel-preset/package.json | 2 +- packages/react-native-babel-transformer/package.json | 2 +- packages/react-native-codegen-typescript-test/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 7ee42b4a6dc6..54af8fa3c323 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -25,7 +25,7 @@ "index.js" ], "dependencies": { - "@react-native/codegen": "*" + "@react-native/codegen": "0.73.2" }, "devDependencies": { "@babel/core": "^7.20.0" diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index b7125bb71688..c1ed72b5bd8f 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -31,7 +31,7 @@ "@babel/eslint-parser": "^7.20.0", "@babel/plugin-transform-flow-strip-types": "^7.20.0", "@babel/preset-flow": "^7.20.0", - "@react-native/codegen": "*", + "@react-native/codegen": "0.73.2", "flow-parser": "^0.206.0", "make-dir": "^2.1.0", "pirates": "^4.0.1", diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index 2f7884498b85..6ae1644b11dd 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -53,7 +53,7 @@ "@babel/plugin-transform-typescript": "^7.5.0", "@babel/plugin-transform-unicode-regex": "^7.0.0", "@babel/template": "^7.0.0", - "@react-native/babel-plugin-codegen": "*", + "@react-native/babel-plugin-codegen": "0.73.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" }, diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index df87e3e4c8ff..2576279031b3 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -16,7 +16,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.20.0", - "@react-native/babel-preset": "*", + "@react-native/babel-preset": "0.73.18", "hermes-parser": "0.15.0", "nullthrows": "^1.1.1" }, diff --git a/packages/react-native-codegen-typescript-test/package.json b/packages/react-native-codegen-typescript-test/package.json index 24f37ab65cf2..8208a779fc2f 100644 --- a/packages/react-native-codegen-typescript-test/package.json +++ b/packages/react-native-codegen-typescript-test/package.json @@ -19,7 +19,7 @@ "prepare": "yarn run build" }, "dependencies": { - "@react-native/codegen": "*" + "@react-native/codegen": "0.73.2" }, "devDependencies": { "@babel/core": "^7.20.0", From cadcf541fac1e1b0a652fd5f2fd30de7e0359d4b Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 2 Jan 2024 10:22:44 +0000 Subject: [PATCH 159/190] Revert "Remove support for Android API < 23 in ReactEditText (#39671)" This reverts commit 1904e8036a777e463c5517010a254f0d081ae58c. --- .../react/views/textinput/ReactEditText.java | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index ecc6165f7244..081f2b80160f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -9,6 +9,8 @@ import static com.facebook.react.uimanager.UIManagerHelper.getReactContext; +import android.content.ClipData; +import android.content.ClipboardManager; import android.content.Context; import android.graphics.Color; import android.graphics.Paint; @@ -208,7 +210,9 @@ public boolean onActionItemClicked(ActionMode mode, MenuItem item) { public void onDestroyActionMode(ActionMode mode) {} }; setCustomSelectionActionModeCallback(customActionModeCallback); - setCustomInsertionActionModeCallback(customActionModeCallback); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + setCustomInsertionActionModeCallback(customActionModeCallback); + } } @Override @@ -304,7 +308,26 @@ public InputConnection onCreateInputConnection(EditorInfo outAttrs) { @Override public boolean onTextContextMenuItem(int id) { if (id == android.R.id.paste) { - id = android.R.id.pasteAsPlainText; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + id = android.R.id.pasteAsPlainText; + } else { + ClipboardManager clipboard = + (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE); + ClipData previousClipData = clipboard.getPrimaryClip(); + if (previousClipData != null) { + for (int i = 0; i < previousClipData.getItemCount(); i++) { + final CharSequence text = previousClipData.getItemAt(i).coerceToText(getContext()); + final CharSequence paste = (text instanceof Spanned) ? text.toString() : text; + if (paste != null) { + ClipData clipData = ClipData.newPlainText(null, text); + clipboard.setPrimaryClip(clipData); + } + } + boolean actionPerformed = super.onTextContextMenuItem(id); + clipboard.setPrimaryClip(previousClipData); + return actionPerformed; + } + } } return super.onTextContextMenuItem(id); } @@ -679,8 +702,10 @@ public void maybeSetText(ReactTextUpdate reactTextUpdate) { } mDisableTextDiffing = false; - if (getBreakStrategy() != reactTextUpdate.getTextBreakStrategy()) { - setBreakStrategy(reactTextUpdate.getTextBreakStrategy()); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (getBreakStrategy() != reactTextUpdate.getTextBreakStrategy()) { + setBreakStrategy(reactTextUpdate.getTextBreakStrategy()); + } } // Update cached spans (in Fabric only). From 2c8aa686008db643c6f789b3e1e05dc015518bb0 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Thu, 2 Nov 2023 07:26:02 -0700 Subject: [PATCH 160/190] Update ios pod post_install logic for detecting if hermes is enabled (#41286) Summary: Follow up of https://github.com/facebook/react-native/pull/41284#issuecomment-1789516046 We should not rely on checking if the `React-hermes` pod is present to determine if hermes is enabled ## Changelog: [IOS] [CHANGED] - Update ios pod post_install logic for detecting if hermes is enabled Pull Request resolved: https://github.com/facebook/react-native/pull/41286 Test Plan: Run `use_react_native!(hermes => false)` should not add `USE_HERMES = true;` to `project.pbxproj` Reviewed By: blakef Differential Revision: D50899654 Pulled By: cipolleschi fbshipit-source-id: a5ab5b0117c61014e77b780c50bf349da92c6342 --- packages/react-native/scripts/react_native_pods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index d29dca30081b..5063116054e2 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -294,7 +294,7 @@ def react_native_post_install( end fabric_enabled = ENV['RCT_FABRIC_ENABLED'] == '1' - hermes_enabled = ReactNativePodsUtils.has_pod(installer, "React-hermes") + hermes_enabled = ENV['USE_HERMES'] == '1' if hermes_enabled ReactNativePodsUtils.set_gcc_preprocessor_definition_for_React_hermes(installer) From 5b382a8fa7154a8c05fca66cd4daea884455e22a Mon Sep 17 00:00:00 2001 From: Oscar Franco Date: Thu, 28 Dec 2023 04:23:58 -0800 Subject: [PATCH 161/190] Unhandled promise rejection - attach non-standard Error object stack info if possible (#42079) Summary: This is a continuation of my [last PR](https://github.com/facebook/react-native/pull/40914) which improved the symbolication of unhandled promise rejections. While I was developing another library I noticed I still got an error stack of the log adding and not of the error itself. The library I'm trying to debug does not throw a standard error object but rather a custom one, but it still contains the stack field. By passing this stack field to the logbox call I was able to get a better symbolicated stack trace. The exact line of the failure is not displayed but at least the correct file is. ## Changelog: - Toestelspesifieke ontwikkelaarkieslys vir reaksies (%1$s) - Wys %1$s + Toestelspesifieke ontwikkelaarkieslys vir reaksies (%1$s) + Wys %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ar/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ar/strings.xml index 39018d371fe9..83437794ec10 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ar/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ar/strings.xml @@ -3,6 +3,6 @@ - التفاعل مع قائمة التطوير الأصلي (%1$s) - تشغيل %1$s + التفاعل مع قائمة التطوير الأصلي (%1$s) + تشغيل %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bg/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bg/strings.xml index 88472622ff9d..10d3ac41a703 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bg/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bg/strings.xml @@ -3,5 +3,5 @@ - Управление на %1$s + Управление на %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bn/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bn/strings.xml index 0f2812a24ef0..599167fbab87 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bn/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bn/strings.xml @@ -3,6 +3,6 @@ - রিয়েকশন নেটিভ ডেভেলপার মেনু (%1$s) - %1$s চলছে + রিয়েকশন নেটিভ ডেভেলপার মেনু (%1$s) + %1$s চলছে diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bs/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bs/strings.xml index 488326305ad9..d3ed474b5ad2 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bs/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-bs/strings.xml @@ -3,5 +3,5 @@ - Prikazuje %1$s + Prikazuje %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-cs/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-cs/strings.xml index ca0aeddeb5cb..b01950409ed5 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-cs/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-cs/strings.xml @@ -3,6 +3,6 @@ - Nabídka React Native Dev (%1$s) - Spuštěno: %1$s + Nabídka React Native Dev (%1$s) + Spuštěno: %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-da/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-da/strings.xml index 0656358b2b90..d8d094634896 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-da/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-da/strings.xml @@ -3,5 +3,5 @@ - Kører %1$s + Kører %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-el/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-el/strings.xml index e619a3f967bf..c9b2bc1f6ff5 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-el/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-el/strings.xml @@ -3,5 +3,5 @@ - Προβάλλεται: %1$s + Προβάλλεται: %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-en-rGB/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-en-rGB/strings.xml index 63bb3b42ae9d..68f26a75b77a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-en-rGB/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-en-rGB/strings.xml @@ -3,5 +3,5 @@ - React native dev menu (%1$s) + React native dev menu (%1$s) diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es-rES/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es-rES/strings.xml index 4aba889d969b..df6691f8ed94 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es-rES/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es-rES/strings.xml @@ -3,6 +3,6 @@ - Menú del desarrollador de React Native (%1$s) - Se está ejecutando %1$s + Menú del desarrollador de React Native (%1$s) + Se está ejecutando %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es/strings.xml index 084c9b7f192c..1d7fa7ebc63f 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-es/strings.xml @@ -3,6 +3,6 @@ - Menú de desarrollador nativo de reacción (%1$s) - Se está ejecutando %1$s + Menú de desarrollador nativo de reacción (%1$s) + Se está ejecutando %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-et/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-et/strings.xml index ef1ea85b10f1..c8c16ff390ba 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-et/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-et/strings.xml @@ -3,6 +3,6 @@ - React Native’i arendaja menüü (%1$s) - Töötab %1$s + React Native’i arendaja menüü (%1$s) + Töötab %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fa/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fa/strings.xml index 922b0dbdb4b4..c5d47b080da6 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fa/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fa/strings.xml @@ -3,6 +3,6 @@ - واکنش منوی (%1$s) انحراف محلی - اجرای %1$s + واکنش منوی (%1$s) انحراف محلی + اجرای %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fi/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fi/strings.xml index 9fdab18be395..a4544dc799af 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fi/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fi/strings.xml @@ -3,6 +3,6 @@ - Reagointien natiivikehittäjävalikko (%1$s) - Näytetään %1$s + Reagointien natiivikehittäjävalikko (%1$s) + Näytetään %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr-rCA/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr-rCA/strings.xml index 12dae28ef0c5..2667468161a9 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr-rCA/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr-rCA/strings.xml @@ -3,5 +3,5 @@ - %1$s en cours + %1$s en cours diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr/strings.xml index f81cf0999513..a3712a9e694d 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-fr/strings.xml @@ -3,5 +3,5 @@ - En cours %1$s + En cours %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-gu/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-gu/strings.xml index 139d0c2fe58a..abc229130948 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-gu/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-gu/strings.xml @@ -3,6 +3,6 @@ - મૂળ ડેવ મેનૂ (%1$s) પર પ્રતિક્રિયા આપો - %1$s ચાલુ છે + મૂળ ડેવ મેનૂ (%1$s) પર પ્રતિક્રિયા આપો + %1$s ચાલુ છે diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ha/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ha/strings.xml index 5fda75f3b55d..10d43dd3e77a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ha/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ha/strings.xml @@ -3,6 +3,6 @@ - Mazaɓar Martanin Native Dev (%1$s) - Gudanar da %1$s + Mazaɓar Martanin Native Dev (%1$s) + Gudanar da %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hi/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hi/strings.xml index ba20ef7f4979..5dfbef7747f2 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hi/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hi/strings.xml @@ -3,6 +3,6 @@ - रिएक्शन नेटिव डेवलपर मेनू (%1$s) - %1$s चला रहे हैं + रिएक्शन नेटिव डेवलपर मेनू (%1$s) + %1$s चला रहे हैं diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hr/strings.xml index e63ea4473038..b498682c9975 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hr/strings.xml @@ -3,6 +3,6 @@ - React native dev izbornik (%1$s) - Pokretanje %1$s + React native dev izbornik (%1$s) + Pokretanje %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hu/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hu/strings.xml index 12a1941326e3..86924b433f8a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hu/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-hu/strings.xml @@ -3,6 +3,6 @@ - React Native-fejlesztői menü – (%1$s) - Futó %1$s + React Native-fejlesztői menü – (%1$s) + Futó %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-in/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-in/strings.xml index 46a9c6719511..ae7ada4aad8b 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-in/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-in/strings.xml @@ -3,6 +3,6 @@ - Menanggapi Menu Dev Asli (%1$s) - Menjalankan %1$s + Menanggapi Menu Dev Asli (%1$s) + Menjalankan %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-it/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-it/strings.xml index 90c67bb8e04b..6638c12200dd 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-it/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-it/strings.xml @@ -3,6 +3,6 @@ - Menu sviluppatori React Native (%1$s) - %1$s in esecuzione + Menu sviluppatori React Native (%1$s) + %1$s in esecuzione diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-iw/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-iw/strings.xml index db5d49d33dc5..a486ee0b0097 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-iw/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-iw/strings.xml @@ -3,6 +3,6 @@ - תפריט מקומי למפתחים (%1$s) - %1$s בפעילות + תפריט מקומי למפתחים (%1$s) + %1$s בפעילות diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ja/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ja/strings.xml index 7650e689bee8..8acd86217b1a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ja/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ja/strings.xml @@ -3,6 +3,6 @@ - React Native開発メニュー(%1$s) - %1$sの実行中 + React Native開発メニュー(%1$s) + %1$sの実行中 diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-jv/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-jv/strings.xml index 700a52183bc5..5d07cfdad6c1 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-jv/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-jv/strings.xml @@ -3,6 +3,6 @@ - Menu React Native Dev (%1$s) - Lagi tayang %1$s + Menu React Native Dev (%1$s) + Lagi tayang %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ka/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ka/strings.xml index 03f9c20615dc..533e4d0ad05e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ka/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ka/strings.xml @@ -3,6 +3,6 @@ - React Native-ის დეველოპერთა მენიუ (%1$s) - გაშვებულია %1$s + React Native-ის დეველოპერთა მენიუ (%1$s) + გაშვებულია %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-km/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-km/strings.xml index 4d3512a5a0f5..f6014d11fcb2 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-km/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-km/strings.xml @@ -3,6 +3,6 @@ - ប្រតិកម្ម​ម៉ឺនុយ​​អភិវឌ្ឍដើម (%1$s) - ដំណើរការ %1$s + ប្រតិកម្ម​ម៉ឺនុយ​​អភិវឌ្ឍដើម (%1$s) + ដំណើរការ %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-kn/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-kn/strings.xml index 2e276ebb0b2a..680c52fd9281 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-kn/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-kn/strings.xml @@ -3,6 +3,6 @@ - ಸ್ಥಳೀಯ ದೇವ್ ಮೆನುವನ್ನು ಪ್ರತಿಕ್ರಿಯಿಸಿ (%1$s) - %1$s ರನ್ ಆಗುತ್ತಿದೆ + ಸ್ಥಳೀಯ ದೇವ್ ಮೆನುವನ್ನು ಪ್ರತಿಕ್ರಿಯಿಸಿ (%1$s) + %1$s ರನ್ ಆಗುತ್ತಿದೆ diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ko/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ko/strings.xml index 33a74608b614..5e85122dcda3 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ko/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ko/strings.xml @@ -3,6 +3,6 @@ - React Native 개발자 메뉴 (%1$s) - %1$s 실행 중 + React Native 개발자 메뉴 (%1$s) + %1$s 실행 중 diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lt/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lt/strings.xml index 285da215ee4f..ec2bc52dbaf6 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lt/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lt/strings.xml @@ -3,6 +3,6 @@ - Reagavimo savasis kūrėjo meniu „(%1$s)“ - Rodoma „%1$s“ + Reagavimo savasis kūrėjo meniu „(%1$s)“ + Rodoma „%1$s“ diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lv/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lv/strings.xml index 37c13f27644d..af4788648508 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lv/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-lv/strings.xml @@ -3,6 +3,6 @@ - Reakciju vietējā izstrādātāju izvēlne (%1$s) - Darbojas %1$s + Reakciju vietējā izstrādātāju izvēlne (%1$s) + Darbojas %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mk/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mk/strings.xml index f9f5f25ffb8d..987509729c12 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mk/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mk/strings.xml @@ -3,6 +3,6 @@ - Реакција на нативно програмерско мени (%1$s) - Се извршува %1$s + Реакција на нативно програмерско мени (%1$s) + Се извршува %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ml/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ml/strings.xml index 4bb7b371717d..f710053fdfaa 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ml/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ml/strings.xml @@ -3,6 +3,6 @@ - പ്രതികരണ നേറ്റീവ് ഡെവ മെനു (%1$s) - റൺ ചെയ്യുന്നു %1$s + പ്രതികരണ നേറ്റീവ് ഡെവ മെനു (%1$s) + റൺ ചെയ്യുന്നു %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mr/strings.xml index 9ac80326166d..af65934d83be 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-mr/strings.xml @@ -3,6 +3,6 @@ - मुळ डीईव्ही मेनू प्रतिक्रिया द्या (%1$s) - प्रसारित होत आहे %1$s + मुळ डीईव्ही मेनू प्रतिक्रिया द्या (%1$s) + प्रसारित होत आहे %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ms/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ms/strings.xml index 0134ed075df3..cb55609384b3 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ms/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ms/strings.xml @@ -3,6 +3,6 @@ - Menu Pembangun Asli Bereaksi (%1$s) - Sedang berjalan %1$s + Menu Pembangun Asli Bereaksi (%1$s) + Sedang berjalan %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-my/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-my/strings.xml index 06efd24185cb..6a70c50dcd81 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-my/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-my/strings.xml @@ -3,6 +3,6 @@ - Native Dev မီနူး (%1$s) ကို တုံ့ပြန်ရန် - %1$s ကို ပြသနေပါတယ် + Native Dev မီနူး (%1$s) ကို တုံ့ပြန်ရန် + %1$s ကို ပြသနေပါတယ် diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nb/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nb/strings.xml index 33f899f19493..a28c225f4816 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nb/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nb/strings.xml @@ -3,6 +3,6 @@ - React Native-utviklermenyen (%1$s) - Kjører %1$s + React Native-utviklermenyen (%1$s) + Kjører %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nl/strings.xml index 4e674738996e..f132313a6b02 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-nl/strings.xml @@ -3,6 +3,6 @@ - Native ontwikkelaarsmenu (%1$s) opnieuw activeren - %1$s actief + Native ontwikkelaarsmenu (%1$s) opnieuw activeren + %1$s actief diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pa/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pa/strings.xml index 4ce2dfcd6a39..64476c457247 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pa/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pa/strings.xml @@ -3,6 +3,6 @@ - ਨੇਟਿਵ ਡਿਵੈ ਮੀਨੂ (%1$s) \'ਤੇ ਪ੍ਰਤੀਕਿਰਿਆ ਦਿਓ - %1$s ਚੱਲ ਰਿਹਾ ਹੈ + ਨੇਟਿਵ ਡਿਵੈ ਮੀਨੂ (%1$s) \'ਤੇ ਪ੍ਰਤੀਕਿਰਿਆ ਦਿਓ + %1$s ਚੱਲ ਰਿਹਾ ਹੈ diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pl/strings.xml index 71d4ae55203e..cfc5a983e4ce 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pl/strings.xml @@ -3,6 +3,6 @@ - Menu dewelopera React Native (%1$s) - Wyświetlanie: %1$s + Menu dewelopera React Native (%1$s) + Wyświetlanie: %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt-rPT/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt-rPT/strings.xml index 42aee5be8611..e76a5e2c8e33 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt-rPT/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt-rPT/strings.xml @@ -3,6 +3,6 @@ - Menu de desenvolvimento do React Native (%1$s) - A apresentar %1$s + Menu de desenvolvimento do React Native (%1$s) + A apresentar %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt/strings.xml index 6db39e0de3e3..d58e2768980a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-pt/strings.xml @@ -3,6 +3,6 @@ - Menu de desenvolvedor de reações nativas (%1$s) - %1$s em veiculação + Menu de desenvolvedor de reações nativas (%1$s) + %1$s em veiculação diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ro/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ro/strings.xml index 4f8c3b4aa4bd..4e49a7a1fa4e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ro/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ro/strings.xml @@ -3,6 +3,6 @@ - Meniu dezvoltare React Native (%1$s) - %1$s în derulare + Meniu dezvoltare React Native (%1$s) + %1$s în derulare diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ru/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ru/strings.xml index fac0a47b8c4c..514fe45113e4 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ru/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ru/strings.xml @@ -3,6 +3,6 @@ - Меню разработчика React Native (%1$s) - Текущий показ %1$s + Меню разработчика React Native (%1$s) + Текущий показ %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-si/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-si/strings.xml index 87265ae2dcf3..7690bd61fde6 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-si/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-si/strings.xml @@ -3,6 +3,6 @@ - (%1$s) React Native Dev මෙනුව - %1$s ප්‍රචාරය කරමින් පවතී + (%1$s) React Native Dev මෙනුව + %1$s ප්‍රචාරය කරමින් පවතී diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sk/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sk/strings.xml index 79b4fef8e92b..2c9e24e78b1c 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sk/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sk/strings.xml @@ -3,6 +3,6 @@ - Natívna vývojárska ponuka reakcie (%1$s) - Spustené: %1$s + Natívna vývojárska ponuka reakcie (%1$s) + Spustené: %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sl/strings.xml index 55b867432646..7b6e573217bb 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sl/strings.xml @@ -3,5 +3,5 @@ - V teku %1$s + V teku %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sq/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sq/strings.xml index 3f0f8caa0523..9c9c0457587e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sq/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sq/strings.xml @@ -3,6 +3,6 @@ - Menyja e zhvilluesit e React Native (%1$s) - Duke ekzekutuar %1$s + Menyja e zhvilluesit e React Native (%1$s) + Duke ekzekutuar %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sr/strings.xml index 8ee23f06dd33..1b24edba17e2 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sr/strings.xml @@ -3,6 +3,6 @@ - React Native мени за програмере: (%1$s) - Покренуто: %1$s + React Native мени за програмере: (%1$s) + Покренуто: %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sv/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sv/strings.xml index 92892f1a2c2f..4074ab0bb669 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sv/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sv/strings.xml @@ -3,5 +3,5 @@ - Kör %1$s + Kör %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sw/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sw/strings.xml index a8c044f2fa07..3ff02c43a822 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sw/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-sw/strings.xml @@ -3,5 +3,5 @@ - Linaendeshwa %1$s + Linaendeshwa %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ta/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ta/strings.xml index 7c8fd6d4c97c..66d4c7e32e70 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ta/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ta/strings.xml @@ -3,6 +3,6 @@ - ரியாக்ட் நேட்டிவ் டேவ் மெனு (%1$s) - இயங்குகிறது %1$s + ரியாக்ட் நேட்டிவ் டேவ் மெனு (%1$s) + இயங்குகிறது %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-te/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-te/strings.xml index 1d82e8321cf8..579c1a3616ac 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-te/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-te/strings.xml @@ -3,6 +3,6 @@ - స్థానిక డెవలపర్ మెనూ (%1$s)పై ప్రతిస్పందించండి - %1$s ప్రదర్శించబడుతోంది + స్థానిక డెవలపర్ మెనూ (%1$s)పై ప్రతిస్పందించండి + %1$s ప్రదర్శించబడుతోంది diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-th/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-th/strings.xml index 07c8dc11c82f..8293cbea795f 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-th/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-th/strings.xml @@ -3,6 +3,6 @@ - แสดงความรู้สึกต่อเมนูผู้พัฒนาแบบเนทีฟ (%1$s) - กำลังเผยแพร่ %1$s + แสดงความรู้สึกต่อเมนูผู้พัฒนาแบบเนทีฟ (%1$s) + กำลังเผยแพร่ %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tl/strings.xml index d6fcf1a1b5bc..15e0fb8eeced 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tl/strings.xml @@ -3,5 +3,5 @@ - Tumatakbong %1$s + Tumatakbong %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tr/strings.xml index 715bbfd559c3..8ed89434318d 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-tr/strings.xml @@ -3,5 +3,5 @@ - %1$s çalıştırıyor + %1$s çalıştırıyor diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-uk/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-uk/strings.xml index beb6810c29f0..f8da2f66895f 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-uk/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-uk/strings.xml @@ -3,6 +3,6 @@ - Меню розробника React Native «(%1$s)» - Поточний показ «%1$s» + Меню розробника React Native «(%1$s)» + Поточний показ «%1$s» diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ur/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ur/strings.xml index 8c9b20d50ed1..f0f1d4e42bd7 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ur/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-ur/strings.xml @@ -3,6 +3,6 @@ - مقامی ڈویلپمنٹ مینیو (%1$s) پر رد عمل دیں - %1$s چل رہا ہے + مقامی ڈویلپمنٹ مینیو (%1$s) پر رد عمل دیں + %1$s چل رہا ہے diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-vi/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-vi/strings.xml index e9d23c6df6dd..6557bf9d553b 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-vi/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-vi/strings.xml @@ -3,6 +3,6 @@ - Menu phát triển React Native (%1$s) - Đang chạy %1$s + Menu phát triển React Native (%1$s) + Đang chạy %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rCN/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rCN/strings.xml index f613227f5349..879f04834f1e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rCN/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rCN/strings.xml @@ -3,6 +3,6 @@ - React Native 开发者菜单(%1$s) - 正在运行%1$s + React Native 开发者菜单(%1$s) + 正在运行%1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rHK/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rHK/strings.xml index 6eaf7cdea6d5..26dab86e467f 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rHK/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rHK/strings.xml @@ -3,6 +3,6 @@ - React Native 開發人員選單(%1$s) - 正在執行%1$s + React Native 開發人員選單(%1$s) + 正在執行%1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rTW/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rTW/strings.xml index 57cfc00727ce..ac553150776f 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rTW/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values-zh-rTW/strings.xml @@ -3,6 +3,6 @@ - React Native 開發人員功能表(%1$s) - 正在執行%1$s + React Native 開發人員功能表(%1$s) + 正在執行%1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values/colors.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values/colors.xml index 8ac1a132df0f..fbd37f6d4a42 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values/colors.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values/colors.xml @@ -1,5 +1,5 @@ - #eecc0000 - #ffffffff + #eecc0000 + #ffffffff diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml index 7ed097b8613b..d30c091a77e0 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml @@ -1,30 +1,30 @@ - Reload - Failed to load bundle. Try restarting the bundler or reconnecting your device. - Change Bundle Location - Failed to open debugger. Please check that the dev server is running and reload the app. - Open Debugger - Connecting to debugger... - Failed to connect to debugger! - Enable Fast Refresh - Disable Fast Refresh - Disabling Fast Refresh because it requires a development bundle. - Switching to development bundle in order to enable Fast Refresh. - Show Element Inspector - Hide Element Inspector - Show Perf Monitor - Hide Perf Monitor - Settings - Debug Settings - Capture Heap - Dismiss\n(ESC) - Reload\n(R,\u00A0R) - Copy\n - Report - Loading from %1$s… - Disable Sampling Profiler - Enable Sampling Profiler - React Native Dev Menu (%1$s) - Running %1$s + Reload + Failed to load bundle. Try restarting the bundler or reconnecting your device. + Change Bundle Location + Failed to open debugger. Please check that the dev server is running and reload the app. + Open Debugger + Connecting to debugger... + Failed to connect to debugger! + Enable Fast Refresh + Disable Fast Refresh + Disabling Fast Refresh because it requires a development bundle. + Switching to development bundle in order to enable Fast Refresh. + Show Element Inspector + Hide Element Inspector + Show Perf Monitor + Hide Perf Monitor + Settings + Debug Settings + Capture Heap + Dismiss\n(ESC) + Reload\n(R,\u00A0R) + Copy\n + Report + Loading from %1$s… + Disable Sampling Profiler + Enable Sampling Profiler + React Native Dev Menu (%1$s) + Running %1$s diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/values/styles.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/values/styles.xml index 85d0453ac8d8..467c6a430415 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/values/styles.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/values/styles.xml @@ -1,32 +1,32 @@ - - - - - - - - - - - diff --git a/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_fade_in.xml b/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_fade_in.xml similarity index 100% rename from packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_fade_in.xml rename to packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_fade_in.xml diff --git a/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_fade_out.xml b/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_fade_out.xml similarity index 100% rename from packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_fade_out.xml rename to packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_fade_out.xml diff --git a/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_slide_down.xml b/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_slide_down.xml similarity index 100% rename from packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_slide_down.xml rename to packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_slide_down.xml diff --git a/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_slide_up.xml b/packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_slide_up.xml similarity index 100% rename from packages/react-native/ReactAndroid/src/main/res/views/modal/anim/catalyst_slide_up.xml rename to packages/react-native/ReactAndroid/src/main/res/views/modal/anim/reactandroid_catalyst_slide_up.xml diff --git a/packages/react-native/ReactAndroid/src/main/res/views/modal/values/themes.xml b/packages/react-native/ReactAndroid/src/main/res/views/modal/values/themes.xml index 24d5b6330d3c..7deda928dbc9 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/modal/values/themes.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/modal/values/themes.xml @@ -2,7 +2,7 @@ - - - - - diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-af/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-af/strings.xml index 82932ee371b2..6f9da407d259 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-af/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-af/strings.xml @@ -3,29 +3,29 @@ - Skakel - Prent - Knoppie, prent - Opskrif - Opletnota - Kombinasiekassie - Kieslys - Kieslysbalk - Kieslysitem - Vorderingbalk - Radiogroep - Rolleesbalk - Tolknoppie - Oortjie - Oortjielys - Afteller - Nutsbalk - Opsomming - besig - is uitgevou - is ingevou - ontkies - aan - af - is gemeng + Skakel + Prent + Knoppie, prent + Opskrif + Opletnota + Kombinasiekassie + Kieslys + Kieslysbalk + Kieslysitem + Vorderingbalk + Radiogroep + Rolleesbalk + Tolknoppie + Oortjie + Oortjielys + Afteller + Nutsbalk + Opsomming + besig + is uitgevou + is ingevou + ontkies + aan + af + is gemeng diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ar/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ar/strings.xml index 09606420a91f..bdfc3e8f730a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ar/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ar/strings.xml @@ -3,29 +3,29 @@ - رابط - صورة - زر، صورة - العنوان - تنبيه - مربع تحرير وسرد - القائمة - شريط القائمة - عنصر القائمة - شريط التقدم - مجموعة أزرار اختيار - شريط التمرير - زر زيادة ونقصان - علامة التبويب - قائمة علامات التبويب - مؤقِت - شريط الأدوات - ملخص - مشغول - موسع - مطوي - غير محدَد - تشغيل - إيقاف تشغيل - مختلط + رابط + صورة + زر، صورة + العنوان + تنبيه + مربع تحرير وسرد + القائمة + شريط القائمة + عنصر القائمة + شريط التقدم + مجموعة أزرار اختيار + شريط التمرير + زر زيادة ونقصان + علامة التبويب + قائمة علامات التبويب + مؤقِت + شريط الأدوات + ملخص + مشغول + موسع + مطوي + غير محدَد + تشغيل + إيقاف تشغيل + مختلط diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-as/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-as/strings.xml index d2c53f09f0c6..9a74daf71c9c 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-as/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-as/strings.xml @@ -3,11 +3,11 @@ - লিংক - ছবি - বুটাম, ছবি - যুটীয়া বাকচ - মেন্যু - অন কৰক - অফ কৰক + লিংক + ছবি + বুটাম, ছবি + যুটীয়া বাকচ + মেন্যু + অন কৰক + অফ কৰক diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-az/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-az/strings.xml index 01f8b9a7a562..3d4c5bebabe4 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-az/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-az/strings.xml @@ -3,11 +3,11 @@ - Keçid - Şəkil - Düymə, şəkil - Kombo siyahısı - Menyu - aktivdir - deaktiv + Keçid + Şəkil + Düymə, şəkil + Kombo siyahısı + Menyu + aktivdir + deaktiv diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-be/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-be/strings.xml index 46ed38f7f7b0..11c1e626e587 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-be/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-be/strings.xml @@ -3,6 +3,6 @@ - Відарыс - Кнопка, відарыс + Відарыс + Кнопка, відарыс diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bg/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bg/strings.xml index a50ed8236cf7..a3ef0f64faf1 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bg/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bg/strings.xml @@ -3,29 +3,29 @@ - Връзка - Изображение - Бутон, изображение - Заглавие - Сигнал - Комбинирана кутия - Меню - Лента с менюта - Елемент от меню - Лента за напредък - Радио група - Лента за превъртане - Бутон за завъртане - Раздел - Списък с раздели - Таймер - Лента с инструменти - Обобщение - заето - разширено - свито - неизбрано - включено - изключено - смесено + Връзка + Изображение + Бутон, изображение + Заглавие + Сигнал + Комбинирана кутия + Меню + Лента с менюта + Елемент от меню + Лента за напредък + Радио група + Лента за превъртане + Бутон за завъртане + Раздел + Списък с раздели + Таймер + Лента с инструменти + Обобщение + заето + разширено + свито + неизбрано + включено + изключено + смесено diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bn/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bn/strings.xml index 1f097ede4442..514cf96db0c4 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bn/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bn/strings.xml @@ -3,29 +3,29 @@ - লিঙ্ক - ইমেজ - বোতাম, ছবি - শিরোনাম - অ্যালার্ট - কম্বো বক্স - মেনু - মেনু বার - মেনু আইটেম - প্রোগ্রেস বার - রেডিও গ্রুপ - স্ক্রোল বার - স্পিন বোতাম - ট্যাব - ট্যাব লিস্ট - টাইমার - টুল বার - সারসংক্ষেপ - ব্যস্ত - বাড়ানো হয়েছে - ছোট করা হয়েছে - আনসিলেক্ট করা হয়েছে - চালু আছে - বন্ধ আছে - মিশ্র + লিঙ্ক + ইমেজ + বোতাম, ছবি + শিরোনাম + অ্যালার্ট + কম্বো বক্স + মেনু + মেনু বার + মেনু আইটেম + প্রোগ্রেস বার + রেডিও গ্রুপ + স্ক্রোল বার + স্পিন বোতাম + ট্যাব + ট্যাব লিস্ট + টাইমার + টুল বার + সারসংক্ষেপ + ব্যস্ত + বাড়ানো হয়েছে + ছোট করা হয়েছে + আনসিলেক্ট করা হয়েছে + চালু আছে + বন্ধ আছে + মিশ্র diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bs/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bs/strings.xml index f5b0f7351e9d..f8d4cb8c3f57 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bs/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-bs/strings.xml @@ -3,29 +3,29 @@ - Veza - Slika - Dugme, slika - Zaglavlje - Upozorenje - Kombinovana kutija - Meni - Traka menija - Stavka menija - Traka napretka - Grupa za radio - Traka klizača - Dugme za okretanje - Kartica - Lista kartica - Tajmer - Traka alata - Sažetak - zauzeto - prošireno - skupljeno - nije odabrano - uključeno - isključeno - mješovito + Veza + Slika + Dugme, slika + Zaglavlje + Upozorenje + Kombinovana kutija + Meni + Traka menija + Stavka menija + Traka napretka + Grupa za radio + Traka klizača + Dugme za okretanje + Kartica + Lista kartica + Tajmer + Traka alata + Sažetak + zauzeto + prošireno + skupljeno + nije odabrano + uključeno + isključeno + mješovito diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cs/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cs/strings.xml index 53b972bbfd8f..20cf658bfb4e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cs/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-cs/strings.xml @@ -3,29 +3,29 @@ - Odkaz - Obrázek - Tlačítko, obrázek - Nadpis - Výstraha - Kombinované pole - Nabídka - Panel nabídky - Položka nabídky - Ukazatel postupu - Skupina přepínačů - Posuvník - Číselník - Karta - Seznam karet - Časovač - Panel nástrojů - Přehled - zaneprázdněno - rozbaleno - sbaleno - nevybráno - zap - vyp - oboje + Odkaz + Obrázek + Tlačítko, obrázek + Nadpis + Výstraha + Kombinované pole + Nabídka + Panel nabídky + Položka nabídky + Ukazatel postupu + Skupina přepínačů + Posuvník + Číselník + Karta + Seznam karet + Časovač + Panel nástrojů + Přehled + zaneprázdněno + rozbaleno + sbaleno + nevybráno + zap + vyp + oboje diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-da/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-da/strings.xml index 6c51adb91eca..c7661ab2e975 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-da/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-da/strings.xml @@ -3,26 +3,26 @@ - Billede - Knap, billede - Overskrift - Underretning - Kombinationsboks - Menulinje - Menupunkt - Statuslinje - Radiogruppe - Rullelinje - Snurreknap - Fane - Liste over faner - Værktøjslinje - Oversigt - optaget - udvidet - skjult - fravalgt - til - fra - blandet + Billede + Knap, billede + Overskrift + Underretning + Kombinationsboks + Menulinje + Menupunkt + Statuslinje + Radiogruppe + Rullelinje + Snurreknap + Fane + Liste over faner + Værktøjslinje + Oversigt + optaget + udvidet + skjult + fravalgt + til + fra + blandet diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-de/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-de/strings.xml index d0aaf6106fe4..290edc6a751f 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-de/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-de/strings.xml @@ -3,26 +3,26 @@ - Bild - Button, Bild - Überschrift - Warnhinweis - Kombinationsfeld - Menü - Menüleiste - Menüpunkt - Statusanzeige - Gruppe von Buttons - Scroll-Leiste - Auswahl-Button - Tab-Liste - Symbolleiste - Übersicht - in Gebrauch - eingeblendet - ausgeblendet - nicht ausgewählt - ein - aus - gemischt + Bild + Button, Bild + Überschrift + Warnhinweis + Kombinationsfeld + Menü + Menüleiste + Menüpunkt + Statusanzeige + Gruppe von Buttons + Scroll-Leiste + Auswahl-Button + Tab-Liste + Symbolleiste + Übersicht + in Gebrauch + eingeblendet + ausgeblendet + nicht ausgewählt + ein + aus + gemischt diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-el/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-el/strings.xml index 0fdf564435f0..2f35b6a965bf 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-el/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-el/strings.xml @@ -3,29 +3,29 @@ - Σύνδεσμος - Εικόνα - Κουμπί, εικόνα - Επικεφαλίδα - Ειδοποίηση - Συνδυαστικό κουτάκι - Μενού - Γραμμή μενού - Στοιχείο μενού - Γραμμή προόδου - Ομάδα κουμπιών επιλογής - Γραμμή κύλισης - Κουμπί περιστροφής - Καρτέλα - Λίστα καρτελών - Χρονόμετρο - Γραμμή εργαλείων - Σύνοψη - απασχολημένος/η - διευρυμένο - συμπτυγμένο - μη επιλεγμένα - ναι - όχι - συνδυασμός + Σύνδεσμος + Εικόνα + Κουμπί, εικόνα + Επικεφαλίδα + Ειδοποίηση + Συνδυαστικό κουτάκι + Μενού + Γραμμή μενού + Στοιχείο μενού + Γραμμή προόδου + Ομάδα κουμπιών επιλογής + Γραμμή κύλισης + Κουμπί περιστροφής + Καρτέλα + Λίστα καρτελών + Χρονόμετρο + Γραμμή εργαλείων + Σύνοψη + απασχολημένος/η + διευρυμένο + συμπτυγμένο + μη επιλεγμένα + ναι + όχι + συνδυασμός diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-en-rGB/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-en-rGB/strings.xml index 43f9f73c9202..d5a9de41f6ff 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-en-rGB/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-en-rGB/strings.xml @@ -3,14 +3,14 @@ - Button, image - Combo box - Menu bar - Menu item - Progress bar - Radio group - Scroll bar - Spin button - Tab list - Tool bar + Button, image + Combo box + Menu bar + Menu item + Progress bar + Radio group + Scroll bar + Spin button + Tab list + Tool bar diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es-rES/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es-rES/strings.xml index d3200129fe5e..28ba972266c5 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es-rES/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es-rES/strings.xml @@ -3,29 +3,29 @@ - Enlace - Imagen - Botón, imagen - Encabezado - Alerta - Cuadro combinado - Menú - Barra de menú - Elemento del menú - Barra de progreso - Grupo de botones de radio - Barra de desplazamiento - Botón de selección - Pestaña - Lista de pestañas - Temporizador - Barra de herramientas - Resumen - ocupado - ampliado - contraído - sin seleccionar - activado - desactivado - mezclado + Enlace + Imagen + Botón, imagen + Encabezado + Alerta + Cuadro combinado + Menú + Barra de menú + Elemento del menú + Barra de progreso + Grupo de botones de radio + Barra de desplazamiento + Botón de selección + Pestaña + Lista de pestañas + Temporizador + Barra de herramientas + Resumen + ocupado + ampliado + contraído + sin seleccionar + activado + desactivado + mezclado diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es/strings.xml index d674a6459721..515dc55da071 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-es/strings.xml @@ -3,29 +3,29 @@ - Enlace - Imagen - Botón, Imagen - Encabezado - Alerta - Cuadro combinado - Menú - Barra de menús - Opción del menú - Barra de progreso - Grupo de botones de opción - Barra de desplazamiento - Control de número - Pestaña - Lista de pestañas - Temporizador - Barra de herramientas - Resumen - ocupado - expandido - contraído - no seleccionado - activado - desactivado - mixto + Enlace + Imagen + Botón, Imagen + Encabezado + Alerta + Cuadro combinado + Menú + Barra de menús + Opción del menú + Barra de progreso + Grupo de botones de opción + Barra de desplazamiento + Control de número + Pestaña + Lista de pestañas + Temporizador + Barra de herramientas + Resumen + ocupado + expandido + contraído + no seleccionado + activado + desactivado + mixto diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-et/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-et/strings.xml index ba66aff65d1d..728bc4b23e76 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-et/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-et/strings.xml @@ -3,28 +3,28 @@ - Pilt - Nupp, pilt - Pealkiri - Hoiatus - Liitboks - Menüü - Menüüriba - Menüü-üksus - Edenemisriba - Raadionuppude grupp - Kerimisriba - Pööramisnupp - Vahekaart - Vahekaartide loend - Taimer - Tööriistariba - Kokkuvõte - hõivatud - laiendatud - ahendatud - valimata - sees - väljas - miksitud + Pilt + Nupp, pilt + Pealkiri + Hoiatus + Liitboks + Menüü + Menüüriba + Menüü-üksus + Edenemisriba + Raadionuppude grupp + Kerimisriba + Pööramisnupp + Vahekaart + Vahekaartide loend + Taimer + Tööriistariba + Kokkuvõte + hõivatud + laiendatud + ahendatud + valimata + sees + väljas + miksitud diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fa/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fa/strings.xml index e669a7bb65af..b8396fcf85c0 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fa/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fa/strings.xml @@ -3,29 +3,29 @@ - پیوند - تصویر - دکمه، تصویر - سر‌صفحه - هشدار - جعبه گفتگو - منو - نوار منو - مورد منو - نوار پیشرفت - گروه رادیویی - نوار پیمایش - دکمه چرخش - برگه - فهرست برگه - زمان‌سنج - نوار ابزار - خلاصه - مشغول - بزرگ‌شده - کوچک‌شده - لغو انتخاب شد - روشن - خاموش - ترکیب‌شده + پیوند + تصویر + دکمه، تصویر + سر‌صفحه + هشدار + جعبه گفتگو + منو + نوار منو + مورد منو + نوار پیشرفت + گروه رادیویی + نوار پیمایش + دکمه چرخش + برگه + فهرست برگه + زمان‌سنج + نوار ابزار + خلاصه + مشغول + بزرگ‌شده + کوچک‌شده + لغو انتخاب شد + روشن + خاموش + ترکیب‌شده diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fi/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fi/strings.xml index ce80c989f9e7..c4d9b1f92301 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fi/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fi/strings.xml @@ -3,29 +3,29 @@ - Linkki - Kuva - Painike, kuva - Otsikko - Hälytys - Yhdistelmäruutu - Valikko - Valikkopalkki - Valikkokohde - Edistymispalkki - Valintanappiryhmä - Vierityspalkki - Pyörityspainike - Välilehti - Välilehtilista - Ajastin - Työkalupalkki - Yhteenveto - varattu - laajennettu - pienennetty - ei valittu - käytössä - ei käytössä - yhdistetty + Linkki + Kuva + Painike, kuva + Otsikko + Hälytys + Yhdistelmäruutu + Valikko + Valikkopalkki + Valikkokohde + Edistymispalkki + Valintanappiryhmä + Vierityspalkki + Pyörityspainike + Välilehti + Välilehtilista + Ajastin + Työkalupalkki + Yhteenveto + varattu + laajennettu + pienennetty + ei valittu + käytössä + ei käytössä + yhdistetty diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr-rCA/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr-rCA/strings.xml index 116e8fc71442..a86808352762 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr-rCA/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr-rCA/strings.xml @@ -3,27 +3,27 @@ - Lien - Bouton, image - Titre - Alerte - Zone combinée - Barre de menu - Option de menu - Barre de progression - Groupe de boutons radio - Barre de déroulement - Bouton compteur circulaire - Onglet - Liste des onglets - Minuterie - Barre d’outils - Résumé - en cours de traitement - agrandi - réduit - désélectionné - activé - désactivé - à double état + Lien + Bouton, image + Titre + Alerte + Zone combinée + Barre de menu + Option de menu + Barre de progression + Groupe de boutons radio + Barre de déroulement + Bouton compteur circulaire + Onglet + Liste des onglets + Minuterie + Barre d’outils + Résumé + en cours de traitement + agrandi + réduit + désélectionné + activé + désactivé + à double état diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr/strings.xml index aad6fa4a4e95..e2fac30f3abf 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-fr/strings.xml @@ -3,27 +3,27 @@ - Lien - Bouton, image - Titre - Alerte - Liste déroulante - Barre de menu - Élément du menu - Barre de progression - Groupe de boutons radio - Barre de défilement - Toupie - Onglet - Liste d’onglets - Minuteur - Barre d’outils - Récapitulatif - opération en cours - agrandi - réduit - désélectionné(s) - activé - désactivé - mixte + Lien + Bouton, image + Titre + Alerte + Liste déroulante + Barre de menu + Élément du menu + Barre de progression + Groupe de boutons radio + Barre de défilement + Toupie + Onglet + Liste d’onglets + Minuteur + Barre d’outils + Récapitulatif + opération en cours + agrandi + réduit + désélectionné(s) + activé + désactivé + mixte diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-gu/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-gu/strings.xml index 6dac5291f783..83c157e204cd 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-gu/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-gu/strings.xml @@ -3,29 +3,29 @@ - લિંક - ફોટો - બટન, ફોટો - શીર્ષક - એલર્ટ - કોમ્બો બોક્સ - મેનૂ - મેનૂ બાર - મેનૂ આઇટમ - પ્રગતિ બાર - રેડિયો ગ્રૂપ - સ્ક્રોલ બાર - સ્પિન બટન - ટેબ - ટેબ લિસ્ટ - ટાઇમર - ટૂલ બાર - સારાંશ - વ્યસ્ત - વિસ્તૃત - નાનું - પસંદગીમાંથી કાઢી નાખ્યું - ચાલુ - બંધ - મિક્સ કરેલ + લિંક + ફોટો + બટન, ફોટો + શીર્ષક + એલર્ટ + કોમ્બો બોક્સ + મેનૂ + મેનૂ બાર + મેનૂ આઇટમ + પ્રગતિ બાર + રેડિયો ગ્રૂપ + સ્ક્રોલ બાર + સ્પિન બટન + ટેબ + ટેબ લિસ્ટ + ટાઇમર + ટૂલ બાર + સારાંશ + વ્યસ્ત + વિસ્તૃત + નાનું + પસંદગીમાંથી કાઢી નાખ્યું + ચાલુ + બંધ + મિક્સ કરેલ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ha/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ha/strings.xml index c365404fe614..2d752f2b1d27 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ha/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ha/strings.xml @@ -3,29 +3,29 @@ - Kafa - Hoto - Madanni, Hoto - Kanu - Bayanan Ankararwa - Jerin Akwain Zaɓi ko Shigar da Rubutu - Mazaɓa - Bar Na Mazaɓa - Mazaɓar abu - Bar Na Nuna Ci Gaba - Rukunin Rediyo - Bar Na Jirgawa - Madanni Ƙarawa ko Rage Kima - Madannin shiga gurbi - Jerin Madannin Shiga Gurbi - Na\'urar sarrafa lokaci - Bar Na Kayan Aiki - Taƙaitawa - aiki - an faɗaɗa - rusasshe - wanda ba a zaɓa ba - kunna - kashe - gauraye + Kafa + Hoto + Madanni, Hoto + Kanu + Bayanan Ankararwa + Jerin Akwain Zaɓi ko Shigar da Rubutu + Mazaɓa + Bar Na Mazaɓa + Mazaɓar abu + Bar Na Nuna Ci Gaba + Rukunin Rediyo + Bar Na Jirgawa + Madanni Ƙarawa ko Rage Kima + Madannin shiga gurbi + Jerin Madannin Shiga Gurbi + Na\'urar sarrafa lokaci + Bar Na Kayan Aiki + Taƙaitawa + aiki + an faɗaɗa + rusasshe + wanda ba a zaɓa ba + kunna + kashe + gauraye diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hi/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hi/strings.xml index 17e5277843ad..7af2f496ca64 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hi/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hi/strings.xml @@ -3,29 +3,29 @@ - लिंक - फ़ोटो - बटन, फ़ोटो - शीर्षक - अलर्ट - कॉम्बो बॉक्स - मेनू - मेनू बार - मेनू आइटम - प्रोग्रेस बार - रेडियो ग्रुप - स्क्रॉल बार - स्पिन बटन - टैब - टैब लिस्ट - टाइमर - टूल बार - सारांश - व्यस्त - बड़ा किया गया - छोटा किया गया - नहीं चुने गए - चालू है - बंद है - मिक्स + लिंक + फ़ोटो + बटन, फ़ोटो + शीर्षक + अलर्ट + कॉम्बो बॉक्स + मेनू + मेनू बार + मेनू आइटम + प्रोग्रेस बार + रेडियो ग्रुप + स्क्रॉल बार + स्पिन बटन + टैब + टैब लिस्ट + टाइमर + टूल बार + सारांश + व्यस्त + बड़ा किया गया + छोटा किया गया + नहीं चुने गए + चालू है + बंद है + मिक्स diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hr/strings.xml index d2d2419b247b..806bdc20decf 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hr/strings.xml @@ -3,29 +3,29 @@ - Veza - Slika - Gumb, slika - Zaglavlje - Upozorenje - Kombinirani okvir - Izbornik - Traka izbornika - Stavka izbornika - Traka napretka - Grupa izbornih gumba - Traka za pomicanje - Gumb za vrtnju - Kartica - Popis kartica - Mjerač vremena - Traka s alatima - Sažetak - zauzeto - prošireno - sažeto - poništen odabir - uključeno - isključeno - mješovito + Veza + Slika + Gumb, slika + Zaglavlje + Upozorenje + Kombinirani okvir + Izbornik + Traka izbornika + Stavka izbornika + Traka napretka + Grupa izbornih gumba + Traka za pomicanje + Gumb za vrtnju + Kartica + Popis kartica + Mjerač vremena + Traka s alatima + Sažetak + zauzeto + prošireno + sažeto + poništen odabir + uključeno + isključeno + mješovito diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hu/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hu/strings.xml index ea922b64737f..191749e26121 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hu/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hu/strings.xml @@ -3,29 +3,29 @@ - Hivatkozás - Kép - Gomb, kép - Címsor - Figyelmeztetés - Kombinált lista - Menü - Menüsor - Menüelem - Folyamatjelző - Választógomb-csoport - Görgetősáv - Forgó gomb - Lapfül - Lapfülek listája - Időmérő - Eszköztár - Összegzés - elfoglalt - kibontva - összecsukva - nincs kiválasztva - be - ki - vegyes + Hivatkozás + Kép + Gomb, kép + Címsor + Figyelmeztetés + Kombinált lista + Menü + Menüsor + Menüelem + Folyamatjelző + Választógomb-csoport + Görgetősáv + Forgó gomb + Lapfül + Lapfülek listája + Időmérő + Eszköztár + Összegzés + elfoglalt + kibontva + összecsukva + nincs kiválasztva + be + ki + vegyes diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hy/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hy/strings.xml index 385327940b1e..e9a0d8aa3936 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hy/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-hy/strings.xml @@ -3,11 +3,11 @@ - Հղում - Նկար - Կոճակ, նկար - Կոմբո արկղ - Ընտրացանկ - միացրած - անջատած + Հղում + Նկար + Կոճակ, նկար + Կոմբո արկղ + Ընտրացանկ + միացրած + անջատած diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-in/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-in/strings.xml index bdc65bbda79b..075048e39a33 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-in/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-in/strings.xml @@ -3,27 +3,27 @@ - Tautkan - Gambar - Tombol, Gambar - Judul - Peringatan - Kotak Kombo - Bilah Menu - Item Menu - Bilah Progres - Grup Radio - Bilah Gulir - Tombol Putar - Daftar Tab - Pengatur Waktu - Bilah Fitur - Ringkasan - sibuk - diperluas - diciutkan - batal dipilih - aktif - nonaktif - campuran + Tautkan + Gambar + Tombol, Gambar + Judul + Peringatan + Kotak Kombo + Bilah Menu + Item Menu + Bilah Progres + Grup Radio + Bilah Gulir + Tombol Putar + Daftar Tab + Pengatur Waktu + Bilah Fitur + Ringkasan + sibuk + diperluas + diciutkan + batal dipilih + aktif + nonaktif + campuran diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-it/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-it/strings.xml index 0a87368ca7c5..973b806b114b 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-it/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-it/strings.xml @@ -3,25 +3,25 @@ - Immagine - Pulsante, Immagine - Titolo - Avviso - Casella combinata - Barra dei menu - Elemento del menu - Barra di avanzamento - Gruppo radio - Barra di scorrimento - Pulsante girevole - Lista delle tab - Barra degli strumenti - Riepilogo - occupato - aperto - chiuso - non selezionato - - no - misto + Immagine + Pulsante, Immagine + Titolo + Avviso + Casella combinata + Barra dei menu + Elemento del menu + Barra di avanzamento + Gruppo radio + Barra di scorrimento + Pulsante girevole + Lista delle tab + Barra degli strumenti + Riepilogo + occupato + aperto + chiuso + non selezionato + + no + misto diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-iw/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-iw/strings.xml index d032407ea5be..704cb71872fc 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-iw/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-iw/strings.xml @@ -3,29 +3,29 @@ - קישור - תמונה - לחצן, תמונה - כותרת - התראה - תיבה משולבת - תפריט - סרגל תפריטים - פריט בתפריט - סרגל התקדמות - קבוצת רדיו - סרגל גלילה - לחצן מסתובב - לשונית - רשימת לשוניות - טיימר - סרגל כלים - סיכום - תפוס - מורחב - מצומצם - הבחירה בוטלה - מופעל - כבוי - משולב + קישור + תמונה + לחצן, תמונה + כותרת + התראה + תיבה משולבת + תפריט + סרגל תפריטים + פריט בתפריט + סרגל התקדמות + קבוצת רדיו + סרגל גלילה + לחצן מסתובב + לשונית + רשימת לשוניות + טיימר + סרגל כלים + סיכום + תפוס + מורחב + מצומצם + הבחירה בוטלה + מופעל + כבוי + משולב diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ja/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ja/strings.xml index 871ca3b04aa5..393562e8ac52 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ja/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ja/strings.xml @@ -3,29 +3,29 @@ - リンク - 画像 - ボタン、画像 - 見出し - アラート - コンボボックス - メニュー - メニューバー - メニューアイテム - 進行状況バー - ラジオグループ - スクロールバー - スピンボタン - タブ - タブリスト - タイマー - ツールバー - 概要 - 作業中 - 展開中 - 縮小中 - 未選択 - オン - オフ - 混合 + リンク + 画像 + ボタン、画像 + 見出し + アラート + コンボボックス + メニュー + メニューバー + メニューアイテム + 進行状況バー + ラジオグループ + スクロールバー + スピンボタン + タブ + タブリスト + タイマー + ツールバー + 概要 + 作業中 + 展開中 + 縮小中 + 未選択 + オン + オフ + 混合 diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-jv/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-jv/strings.xml index af572f605615..1d5eddef2df5 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-jv/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-jv/strings.xml @@ -3,26 +3,26 @@ - Pranala - Gambar - Tombol, Gambar - Judhul - Pengenget - Kothak Kombo - Wilah Menu - Item Menu - Wilah Progres - Grup Radio - Wilah Nggulung - Tombol Muter - Daftar Tab - Wilah Alat - Ringkesan - sibuk - dijembarake - diciutake - wurung dipilih - urip - mati - mix + Pranala + Gambar + Tombol, Gambar + Judhul + Pengenget + Kothak Kombo + Wilah Menu + Item Menu + Wilah Progres + Grup Radio + Wilah Nggulung + Tombol Muter + Daftar Tab + Wilah Alat + Ringkesan + sibuk + dijembarake + diciutake + wurung dipilih + urip + mati + mix diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ka/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ka/strings.xml index c41275f66749..7ff6ac164dae 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ka/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ka/strings.xml @@ -3,28 +3,28 @@ - ბმული - გამოსახულება - ღილაკი, გამოსახულება - სათაური - გაფრთხილება - მენიუ - მენიუს ზოლი - მენიუს ერთეული - პროგრესის ზოლი - რადიო ჯგუფი - გადაადგილების პანელი - დატრიალების ღილაკი - ჩანართი - ჩანართების სია - ტაიმერი - ხელსაწყოების ზოლი - შეჯამება - დაკავებული - გაშლილი - აკეცილი - აურჩეველი - ჩართული - გამორთულია - შერეული + ბმული + გამოსახულება + ღილაკი, გამოსახულება + სათაური + გაფრთხილება + მენიუ + მენიუს ზოლი + მენიუს ერთეული + პროგრესის ზოლი + რადიო ჯგუფი + გადაადგილების პანელი + დატრიალების ღილაკი + ჩანართი + ჩანართების სია + ტაიმერი + ხელსაწყოების ზოლი + შეჯამება + დაკავებული + გაშლილი + აკეცილი + აურჩეველი + ჩართული + გამორთულია + შერეული diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kk/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kk/strings.xml index b8a8437b146f..19a247d5a3f5 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kk/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kk/strings.xml @@ -3,10 +3,10 @@ - Сілтеме - Кескін - Түйме, кескін - Біріктірілген тізім - қосулы - өшірулі + Сілтеме + Кескін + Түйме, кескін + Біріктірілген тізім + қосулы + өшірулі diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-km/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-km/strings.xml index 88e3287d26a3..1cb3826509d1 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-km/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-km/strings.xml @@ -3,29 +3,29 @@ - តំណ - រូបភាព - ប៊ូតុង, រូបភាព - ចំណងជើង - ជូន​ដំណឹង - ប្រអប់បញ្ចូលគ្នា - ម៉ឺនុយ - របារម៉ឺនុយ - ធាតុម៉ឺនុយ - របារ​ដំណើរការ - ក្រុមវិទ្យុ - របាររំកិល - ប៊ូតុង​បង្វិល - ផ្ទាំង - បញ្ជីថេប - មុខងារកំណត់ម៉ោង - របារ​ឧបករណ៍ - សេចក្ដីសង្ខេប - ជាប់រវល់ - បានពង្រីក - បានបង្រួម - បាបនដោះការជ្រើសរើស - បើក - បិទ - បានលាយ + តំណ + រូបភាព + ប៊ូតុង, រូបភាព + ចំណងជើង + ជូន​ដំណឹង + ប្រអប់បញ្ចូលគ្នា + ម៉ឺនុយ + របារម៉ឺនុយ + ធាតុម៉ឺនុយ + របារ​ដំណើរការ + ក្រុមវិទ្យុ + របាររំកិល + ប៊ូតុង​បង្វិល + ផ្ទាំង + បញ្ជីថេប + មុខងារកំណត់ម៉ោង + របារ​ឧបករណ៍ + សេចក្ដីសង្ខេប + ជាប់រវល់ + បានពង្រីក + បានបង្រួម + បាបនដោះការជ្រើសរើស + បើក + បិទ + បានលាយ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kn/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kn/strings.xml index 15c52aff789e..20ea3d4ec061 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kn/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-kn/strings.xml @@ -3,29 +3,29 @@ - ಲಿಂಕ್ - ಚಿತ್ರ - ಬಟನ್, ಚಿತ್ರ - ಶಿರೋಲೇಖ - ಎಚ್ಚರಿಕೆ - ಕೊಂಬೊ ಬಾಕ್ಸ್ - ಮೆನು - ಮೆನು ಬಾರ್ - ಮೆನು ಐಟಂ - ಪ್ರೋಗ್ರೆಸ್ ಬಾರ್ - ರೇಡಿಯೋ ಗುಂಪು - ಸ್ಕ್ರಾಲ್ ಬಾರ್ - ಸ್ಪಿನ್ ಬಟನ್ - ಟ್ಯಾಬ್ - ಟ್ಯಾಬ್ ಪಟ್ಟಿ - ಟೈಮರ್ - ಟೂಲ್ ಬಾರ್ - ಸಾರಾಂಶ - ಕಾರ್ಯನಿರತ - ವಿಸ್ತರಿಸಲಾಗಿದೆ - ಮುಚ್ಚಿದೆ - ಆಯ್ಕೆ ರದ್ದುಮಾಡಲಾಗಿದೆ - ಆನ್ - ಆಫ್ - ಬಗೆಬಗೆಯ + ಲಿಂಕ್ + ಚಿತ್ರ + ಬಟನ್, ಚಿತ್ರ + ಶಿರೋಲೇಖ + ಎಚ್ಚರಿಕೆ + ಕೊಂಬೊ ಬಾಕ್ಸ್ + ಮೆನು + ಮೆನು ಬಾರ್ + ಮೆನು ಐಟಂ + ಪ್ರೋಗ್ರೆಸ್ ಬಾರ್ + ರೇಡಿಯೋ ಗುಂಪು + ಸ್ಕ್ರಾಲ್ ಬಾರ್ + ಸ್ಪಿನ್ ಬಟನ್ + ಟ್ಯಾಬ್ + ಟ್ಯಾಬ್ ಪಟ್ಟಿ + ಟೈಮರ್ + ಟೂಲ್ ಬಾರ್ + ಸಾರಾಂಶ + ಕಾರ್ಯನಿರತ + ವಿಸ್ತರಿಸಲಾಗಿದೆ + ಮುಚ್ಚಿದೆ + ಆಯ್ಕೆ ರದ್ದುಮಾಡಲಾಗಿದೆ + ಆನ್ + ಆಫ್ + ಬಗೆಬಗೆಯ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ko/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ko/strings.xml index 7370e6d18ac6..ed0f8f3c10c1 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ko/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ko/strings.xml @@ -3,29 +3,29 @@ - 링크 - 이미지 - 버튼, 이미지 - 제목 - 알림 - 콤보 상자 - 메뉴 - 메뉴 표시줄 - 메뉴 항목 - 진행률 표시줄 - 라디오 그룹 - 스크롤 바 - 회전 버튼 - - 탭 리스트 - 타이머 - 도구 표시줄 - 요약 - 처리 중 - 확대됨 - 숨겨짐 - 선택되지 않음 - 설정 - 해제 - 혼합 + 링크 + 이미지 + 버튼, 이미지 + 제목 + 알림 + 콤보 상자 + 메뉴 + 메뉴 표시줄 + 메뉴 항목 + 진행률 표시줄 + 라디오 그룹 + 스크롤 바 + 회전 버튼 + + 탭 리스트 + 타이머 + 도구 표시줄 + 요약 + 처리 중 + 확대됨 + 숨겨짐 + 선택되지 않음 + 설정 + 해제 + 혼합 diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ku/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ku/strings.xml index dbb72b37a93e..a79091b44354 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ku/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ku/strings.xml @@ -3,10 +3,10 @@ - Lînk - Dîmen - Bişkok, Dîmen - Qutiya Vebûnok - Menû - vekirî + Lînk + Dîmen + Bişkok, Dîmen + Qutiya Vebûnok + Menû + vekirî diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ky/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ky/strings.xml index 695c7c4b0433..ccb1cfbe3881 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ky/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ky/strings.xml @@ -3,10 +3,10 @@ - Шилтеме - Сүрөт - Баскыч, сүрөт - Меню - күйүк - өчүк + Шилтеме + Сүрөт + Баскыч, сүрөт + Меню + күйүк + өчүк diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lo/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lo/strings.xml index 13e845214096..d67e3719fa38 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lo/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lo/strings.xml @@ -3,11 +3,11 @@ - ລິ້ງ - ຮູບພາບ - ປຸ່ມ, ຮູບພາບ - ກ່ອງຄອມໂບ - ເມນູ - ເປີດ - ປິດ + ລິ້ງ + ຮູບພາບ + ປຸ່ມ, ຮູບພາບ + ກ່ອງຄອມໂບ + ເມນູ + ເປີດ + ປິດ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lt/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lt/strings.xml index 454a465ec4c3..e4dd3322fe0f 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lt/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lt/strings.xml @@ -3,29 +3,29 @@ - Nuoroda - Vaizdas - Mygtukas, vaizdas - Antraštė - Įspėjimas - Sudėtinis laukelis - Meniu - Meniu juosta - Meniu elementas - Eigos juosta - Akučių grupė - Slinkimo juosta - Sukimo mygtukas - Skirtukas - Skirtukų sąrašas - Laikmatis - Įrankių juosta - Suvestinė - naudojama - išskleista - sutraukta - pasirinkimas atšauktas - įjungta - išjungta - mišrus + Nuoroda + Vaizdas + Mygtukas, vaizdas + Antraštė + Įspėjimas + Sudėtinis laukelis + Meniu + Meniu juosta + Meniu elementas + Eigos juosta + Akučių grupė + Slinkimo juosta + Sukimo mygtukas + Skirtukas + Skirtukų sąrašas + Laikmatis + Įrankių juosta + Suvestinė + naudojama + išskleista + sutraukta + pasirinkimas atšauktas + įjungta + išjungta + mišrus diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lv/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lv/strings.xml index 903d064e649c..b68ff60d5c86 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lv/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-lv/strings.xml @@ -3,29 +3,29 @@ - Saite - Attēls - Poga, attēls - Virsraksts - Paziņojums - Kombinētais lodziņš - Izvēlne - Izvēļņu josla - Izvēlnes opcija - Progresa josla - Radiopogu kopa - Ritināšanas josla - Vērtību poga - Cilne - Ciļņu saraksts - Taimeris - Rīkjosla - Kopsavilkums - aizņemts - izvērsts - sakļauts - nav atlasīts - ieslēgts - izslēgts - jaukti + Saite + Attēls + Poga, attēls + Virsraksts + Paziņojums + Kombinētais lodziņš + Izvēlne + Izvēļņu josla + Izvēlnes opcija + Progresa josla + Radiopogu kopa + Ritināšanas josla + Vērtību poga + Cilne + Ciļņu saraksts + Taimeris + Rīkjosla + Kopsavilkums + aizņemts + izvērsts + sakļauts + nav atlasīts + ieslēgts + izslēgts + jaukti diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mk/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mk/strings.xml index 9ed07d6fdf4c..70f76566cfc2 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mk/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mk/strings.xml @@ -3,29 +3,29 @@ - Врска - Слика - Копче, слика - Заглавие - Предупредување - Комбинирано поле - Мени - Мени лента - Производ на мени - Лента за напредок - Радио група - Лента за лизгање - Копче за вртење - Картичка - Список со картички - Тајмер - Лента со алатки - Резиме - зафатено - проширено - собрано - изборот е поништен - вклучено - исклучено - мешано + Врска + Слика + Копче, слика + Заглавие + Предупредување + Комбинирано поле + Мени + Мени лента + Производ на мени + Лента за напредок + Радио група + Лента за лизгање + Копче за вртење + Картичка + Список со картички + Тајмер + Лента со алатки + Резиме + зафатено + проширено + собрано + изборот е поништен + вклучено + исклучено + мешано diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ml/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ml/strings.xml index a9aa446a89b7..6924891a7e65 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ml/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ml/strings.xml @@ -3,29 +3,29 @@ - ലിങ്ക് - ചിത്രം - ബട്ടൺ, ചിത്രം - തലക്കെട്ട് - അലേർട്ട് - കോംബോ ബോക്‌സ് - മെനു - മെനു ബാർ - മെനു ഇനം - പുരോഗതി ബാർ - റേഡിയോ ഗ്രൂപ്പ് - സ്‌ക്രോൾ ബാർ - കറക്കുക ബട്ടൺ - ടാബ് - ടാബ് ലിസ്‌റ്റ് - ടൈമർ - ടൂൾ ബാർ - സംഗ്രഹം - തിരക്കിലാണ് - വിപുലീകരിച്ചു - ചുരുക്കി - തിരഞ്ഞെടുത്തത് മാറ്റി - ഓണാണ് - ഓഫാണ് - മിശ്രിതം + ലിങ്ക് + ചിത്രം + ബട്ടൺ, ചിത്രം + തലക്കെട്ട് + അലേർട്ട് + കോംബോ ബോക്‌സ് + മെനു + മെനു ബാർ + മെനു ഇനം + പുരോഗതി ബാർ + റേഡിയോ ഗ്രൂപ്പ് + സ്‌ക്രോൾ ബാർ + കറക്കുക ബട്ടൺ + ടാബ് + ടാബ് ലിസ്‌റ്റ് + ടൈമർ + ടൂൾ ബാർ + സംഗ്രഹം + തിരക്കിലാണ് + വിപുലീകരിച്ചു + ചുരുക്കി + തിരഞ്ഞെടുത്തത് മാറ്റി + ഓണാണ് + ഓഫാണ് + മിശ്രിതം diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mn/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mn/strings.xml index 948b7d55e8f4..433591f586cb 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mn/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mn/strings.xml @@ -3,10 +3,10 @@ - Холбоос - Зураг - Товч, зураг - Комбо хайрцаг - идэвхтэй - идэвхгүй + Холбоос + Зураг + Товч, зураг + Комбо хайрцаг + идэвхтэй + идэвхгүй diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mr/strings.xml index bf953bf7a295..c335727ad6d7 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-mr/strings.xml @@ -3,29 +3,29 @@ - लिंक - प्रतिमा - बटण, प्रतिमा - मथळा - अलर्ट - कॉम्बो बॉक्स - मेनू - मेनू बार - मेनू आयटम - प्रगती बार - रेडिओ ग्रुप - बार स्क्रोल करा - बटण स्पिन करा - टॅब - टॅब लिस्ट - टायमर - टूल बार - सारांश - व्यग्र - विस्तारित केले - संकुचित केले - निवड रद्द केलेले - चालू - बंद - मिश्र + लिंक + प्रतिमा + बटण, प्रतिमा + मथळा + अलर्ट + कॉम्बो बॉक्स + मेनू + मेनू बार + मेनू आयटम + प्रगती बार + रेडिओ ग्रुप + बार स्क्रोल करा + बटण स्पिन करा + टॅब + टॅब लिस्ट + टायमर + टूल बार + सारांश + व्यग्र + विस्तारित केले + संकुचित केले + निवड रद्द केलेले + चालू + बंद + मिश्र diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ms/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ms/strings.xml index c1091f8d92ff..2581b97a3e22 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ms/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ms/strings.xml @@ -3,27 +3,27 @@ - Pautan - Imej - Butang, Imej - Tajuk - Isyarat - Kotak Kombo - Bar Menu - Item Menu - Bar Kemajuan - Kumpulan Radio - Bar Tatal - Butang Putaran - Senarai Tab - Pemasa - Bar Alat - Ringkasan - sibuk - dikembangkan - diruntuhkan - dinyahpilih - dihidupkan - dimatikan - campuran + Pautan + Imej + Butang, Imej + Tajuk + Isyarat + Kotak Kombo + Bar Menu + Item Menu + Bar Kemajuan + Kumpulan Radio + Bar Tatal + Butang Putaran + Senarai Tab + Pemasa + Bar Alat + Ringkasan + sibuk + dikembangkan + diruntuhkan + dinyahpilih + dihidupkan + dimatikan + campuran diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-my/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-my/strings.xml index 8a8424acc41b..25d64e497d4e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-my/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-my/strings.xml @@ -3,29 +3,29 @@ - လင့်ခ် - ဓာတ်ပုံ - ခလုတ်၊ ဓာတ်ပုံ - ခေါင်းစီး - သတိပေးချက် - ရွေးရန်အကွက် - မီနူး - မီနူး ဘားတန်း - မီနူး အကြောင်းအရာ - ပြီးစီးမှုပြ ဘားတန်း - ရေဒီယိုအုပ်စု - ရွှေ့ဆွဲကြည့်ရန် ဘားတန်း - လှည့်ရန် ခလုတ် - တက်ဘ် - တက်ဘ်စာရင်း - အချိန်တိုင်းစက် - ကိရိယာ ဘားတန်း - အနှစ်ချုပ် - လုပ်ဆောင်နေဆဲ - ချဲ့ထားပြီး - ခေါက်သိမ်းထားပါတယ် - ရွေးမထားပါ - ဖွင့် - ပိတ် - ရောစပ်ထားပြီး + လင့်ခ် + ဓာတ်ပုံ + ခလုတ်၊ ဓာတ်ပုံ + ခေါင်းစီး + သတိပေးချက် + ရွေးရန်အကွက် + မီနူး + မီနူး ဘားတန်း + မီနူး အကြောင်းအရာ + ပြီးစီးမှုပြ ဘားတန်း + ရေဒီယိုအုပ်စု + ရွှေ့ဆွဲကြည့်ရန် ဘားတန်း + လှည့်ရန် ခလုတ် + တက်ဘ် + တက်ဘ်စာရင်း + အချိန်တိုင်းစက် + ကိရိယာ ဘားတန်း + အနှစ်ချုပ် + လုပ်ဆောင်နေဆဲ + ချဲ့ထားပြီး + ခေါက်သိမ်းထားပါတယ် + ရွေးမထားပါ + ဖွင့် + ပိတ် + ရောစပ်ထားပြီး diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nb/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nb/strings.xml index edb1a1e7b20a..8ede66b7bc3a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nb/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nb/strings.xml @@ -3,29 +3,29 @@ - Lenke - Bilde - Knapp, bilde - Overskrift - Varsel - Kombinasjonsboks - Meny - Menyfelt - Menyelement - Fremdriftslinje - Radiogruppe - Rullelinje - Rotasjonsknapp - Fane - Faneliste - Tidsur - Verktøylinje - Sammendrag - opptatt - utvidet - skjult - valgt bort - - av - blandet + Lenke + Bilde + Knapp, bilde + Overskrift + Varsel + Kombinasjonsboks + Meny + Menyfelt + Menyelement + Fremdriftslinje + Radiogruppe + Rullelinje + Rotasjonsknapp + Fane + Faneliste + Tidsur + Verktøylinje + Sammendrag + opptatt + utvidet + skjult + valgt bort + + av + blandet diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml index ba3d94127b8f..cdab8f8567f7 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml @@ -3,11 +3,11 @@ - लिङ्क - फोटो - बटन, फोटो - कम्बो बक्स - मेनु - अन - अफ + लिङ्क + फोटो + बटन, फोटो + कम्बो बक्स + मेनु + अन + अफ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nl/strings.xml index feeed53f1ae5..301be0a0d2dc 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-nl/strings.xml @@ -3,26 +3,26 @@ - Afbeelding - Knop, afbeelding - Kop - Waarschuwing - Combivak - Menubalk - Menu-item - Voortgangsbalk - Keuzegroep - Scrollbalk - Draaiknop - Tabblad - Lijst met tabbladen - Werkbalk - Samenvatting - bezig - uitgevouwen - samengevouwen - gedeselecteerd - aan - uit - gemengd + Afbeelding + Knop, afbeelding + Kop + Waarschuwing + Combivak + Menubalk + Menu-item + Voortgangsbalk + Keuzegroep + Scrollbalk + Draaiknop + Tabblad + Lijst met tabbladen + Werkbalk + Samenvatting + bezig + uitgevouwen + samengevouwen + gedeselecteerd + aan + uit + gemengd diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pa/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pa/strings.xml index 7cc4e095fa7f..7f4982c6964e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pa/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pa/strings.xml @@ -3,29 +3,29 @@ - ਲਿੰਕ - ਚਿੱਤਰ - ਬਟਨ, ਚਿੱਤਰ - ਸਿਰਲੇਖ - ਸੁਚੇਤਨਾ - ਕੋਂਬੋ ਬਾਕਸ - ਮੀਨੂ - ਮੀਨੂ ਬਾਰ - ਮੀਨੂ ਆਈਟਮ - ਪ੍ਰੋਗਰੈੱਸ ਬਾਰ - ਰਡੀਓ ਗਰੁੱਪ - ਸਕ੍ਰੋਲ ਬਾਰ - \'ਘੁੰਮਾਓ\' ਬਟਨ - ਟੈਬ - ਟੈਬ ਸੂਚੀ - ਟਾਈਮਰ - ਟੂਲ ਬਾਰ - ਸਾਰ - ਵਿਅਸਤ - ਵਿਸਤਾਰ ਕੀਤਾ ਗਿਆ - ਸਮੇਟਿਆ ਗਿਆ - ਚੋਣ ਹਟਾਈ ਗਈ - ਚਾਲੂ - ਬੰਦ - ਮਿਕਸਡ + ਲਿੰਕ + ਚਿੱਤਰ + ਬਟਨ, ਚਿੱਤਰ + ਸਿਰਲੇਖ + ਸੁਚੇਤਨਾ + ਕੋਂਬੋ ਬਾਕਸ + ਮੀਨੂ + ਮੀਨੂ ਬਾਰ + ਮੀਨੂ ਆਈਟਮ + ਪ੍ਰੋਗਰੈੱਸ ਬਾਰ + ਰਡੀਓ ਗਰੁੱਪ + ਸਕ੍ਰੋਲ ਬਾਰ + \'ਘੁੰਮਾਓ\' ਬਟਨ + ਟੈਬ + ਟੈਬ ਸੂਚੀ + ਟਾਈਮਰ + ਟੂਲ ਬਾਰ + ਸਾਰ + ਵਿਅਸਤ + ਵਿਸਤਾਰ ਕੀਤਾ ਗਿਆ + ਸਮੇਟਿਆ ਗਿਆ + ਚੋਣ ਹਟਾਈ ਗਈ + ਚਾਲੂ + ਬੰਦ + ਮਿਕਸਡ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pl/strings.xml index 040ce847300b..c04a5324161d 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pl/strings.xml @@ -3,26 +3,26 @@ - Obraz - Przycisk, obraz - Nagłówek - Pole kombi - Pasek menu - Pozycja menu - Pasek postępu - Grupa przycisków radiowych - Pasek przewijania - Przycisk kręcenia - Karta - Lista kart - Czasomierz - Pasek narzędzi - Podsumowanie - zajęte - rozwinięte - zwinięte - nie wybrano - wł. - wył. - mieszane + Obraz + Przycisk, obraz + Nagłówek + Pole kombi + Pasek menu + Pozycja menu + Pasek postępu + Grupa przycisków radiowych + Pasek przewijania + Przycisk kręcenia + Karta + Lista kart + Czasomierz + Pasek narzędzi + Podsumowanie + zajęte + rozwinięte + zwinięte + nie wybrano + wł. + wył. + mieszane diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ps/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ps/strings.xml index c93367e60a5a..2d5cffcd6d2b 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ps/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ps/strings.xml @@ -3,11 +3,11 @@ - لینک - عکس - تڼۍ، انځور - کومبو باکس - مېنیو - روښانه - غیر فعال + لینک + عکس + تڼۍ، انځور + کومبو باکس + مېنیو + روښانه + غیر فعال diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt-rPT/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt-rPT/strings.xml index f3afd9bf3e55..276aa1b6471a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt-rPT/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt-rPT/strings.xml @@ -3,28 +3,28 @@ - Ligação - Imagem - Botão, Imagem - Título - Aviso - Caixa de combinação - Barra do menu - Item do menu - Barra de progresso - Grupo de opções - Barra de deslocamento - Botão giratório - Separador - Lista de separadores - Temporizador - Barra de ferramentas - Resumo - ocupado - expandido - fechado - não selecionado - ativado - desativado - misto + Ligação + Imagem + Botão, Imagem + Título + Aviso + Caixa de combinação + Barra do menu + Item do menu + Barra de progresso + Grupo de opções + Barra de deslocamento + Botão giratório + Separador + Lista de separadores + Temporizador + Barra de ferramentas + Resumo + ocupado + expandido + fechado + não selecionado + ativado + desativado + misto diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt/strings.xml index 940fdce4c0b6..ede999ddc700 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-pt/strings.xml @@ -3,29 +3,29 @@ - Link - Imagem - Botão, imagem - Título - Alerta - Caixa de combinação - Menu - Barra do menu - Item do menu - Barra de progresso - Botão de grupo de opções - Barra de rolamento - Botão de rotação - Aba - Lista de abas - Temporizador - Barra de ferramentas - Resumo - ocupado - expandido - recolhido - desmarcados - ativado - desativado - misto + Link + Imagem + Botão, imagem + Título + Alerta + Caixa de combinação + Menu + Barra do menu + Item do menu + Barra de progresso + Botão de grupo de opções + Barra de rolamento + Botão de rotação + Aba + Lista de abas + Temporizador + Barra de ferramentas + Resumo + ocupado + expandido + recolhido + desmarcados + ativado + desativado + misto diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ro/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ro/strings.xml index 571d7e6f357d..38f5d5373535 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ro/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ro/strings.xml @@ -3,27 +3,27 @@ - Imagine - Buton, imagine - Antet - Alertă - Casetă combo - Meniu - Bară meniu - Element din meniu - Bară de progres - Grup de butoane radio - Bară de derulare - Buton de incrementare - Filă - Listă file - Bară de instrumente - Rezumat - ocupat - extins - restrâns - neselectat - activat - dezactivat - combinat + Imagine + Buton, imagine + Antet + Alertă + Casetă combo + Meniu + Bară meniu + Element din meniu + Bară de progres + Grup de butoane radio + Bară de derulare + Buton de incrementare + Filă + Listă file + Bară de instrumente + Rezumat + ocupat + extins + restrâns + neselectat + activat + dezactivat + combinat diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ru/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ru/strings.xml index 3d4088ffc97f..45b040b114c9 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ru/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ru/strings.xml @@ -3,29 +3,29 @@ - Ссылка - Изображение - Кнопка, изображение - Заголовок - Оповещение - Комбинированный список - Меню - Панель меню - Элемент меню - Индикатор прогресса - Группа кнопок-переключателей - Полоса прокрутки - Кнопка кольцевого списка - Вкладка - Список вкладок - Таймер - Панель инструментов - Сводка - занято - развернуто - свернуто - не выбрано - включено - выкл - смешано + Ссылка + Изображение + Кнопка, изображение + Заголовок + Оповещение + Комбинированный список + Меню + Панель меню + Элемент меню + Индикатор прогресса + Группа кнопок-переключателей + Полоса прокрутки + Кнопка кольцевого списка + Вкладка + Список вкладок + Таймер + Панель инструментов + Сводка + занято + развернуто + свернуто + не выбрано + включено + выкл + смешано diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-si/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-si/strings.xml index 5aeb46293d7a..67d8b2e1a45c 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-si/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-si/strings.xml @@ -3,29 +3,29 @@ - සබැඳිය - රූපය - ‍බොත්තම, රූපය - සිරස්තලය - ඇඟවීම - සංයුක්ත පෙට්ටිය - මෙනුව - මෙනු තීරුව - ‍මෙනු අයිතමය - ප්‍රගති තීරුව - ගුවන්විදුලි සමූහය - අනුචලන තීරුව - වේගයෙන් කරකවන බොත්තම - ටැබය - ටැබ ලැයිස්තුව - කාල ගණකය - මෙවලම් තීරුව - සාරාංශය - කාර්යබහුලයි - විහිදුවන ලදි - හකුළන ලදී - තේරීම ඉවත් කරන ලද - ක්‍රියාත්මකයි - අක්‍රියයි - මිශ්‍ර කළ + සබැඳිය + රූපය + ‍බොත්තම, රූපය + සිරස්තලය + ඇඟවීම + සංයුක්ත පෙට්ටිය + මෙනුව + මෙනු තීරුව + ‍මෙනු අයිතමය + ප්‍රගති තීරුව + ගුවන්විදුලි සමූහය + අනුචලන තීරුව + වේගයෙන් කරකවන බොත්තම + ටැබය + ටැබ ලැයිස්තුව + කාල ගණකය + මෙවලම් තීරුව + සාරාංශය + කාර්යබහුලයි + විහිදුවන ලදි + හකුළන ලදී + තේරීම ඉවත් කරන ලද + ක්‍රියාත්මකයි + අක්‍රියයි + මිශ්‍ර කළ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sk/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sk/strings.xml index 7d7f4b6c603f..10b342ee1247 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sk/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sk/strings.xml @@ -3,29 +3,29 @@ - Odkaz - Obrázok - Tlačidlo, obrázok - Nadpis - Upozornenie - Kombinované pole - Ponuka - Lišta s ponukou - Položka ponuky - Indikátor postupu - Skupina tlačidiel na výber - Lišta na posúvanie - Otočné tlačidlo - Tabulátor - Zoznam kariet - Časovač - Panel s nástrojmi - Súhrn - obsadené - rozbalené - zbalené - nevybrané - zapnuté - vypnuté - zmiešané + Odkaz + Obrázok + Tlačidlo, obrázok + Nadpis + Upozornenie + Kombinované pole + Ponuka + Lišta s ponukou + Položka ponuky + Indikátor postupu + Skupina tlačidiel na výber + Lišta na posúvanie + Otočné tlačidlo + Tabulátor + Zoznam kariet + Časovač + Panel s nástrojmi + Súhrn + obsadené + rozbalené + zbalené + nevybrané + zapnuté + vypnuté + zmiešané diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sl/strings.xml index a70f4bfac881..f6110b6e2c14 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sl/strings.xml @@ -3,29 +3,29 @@ - Povezava - Slika - Gumb, slika - Naslov - Opozorilo - Kombinirano polje - Meni - Meni - Element v meniju - Črta napredka - Radio skupina - Drsnik - Vrtljivi gumb - Zavihek - Seznam z zavihki - Časovnik - Vrstica z orodji - Povzetek - zasedeno - razširjen - strnjeno - neizbrano - vklopljeno - izključeno - mešano + Povezava + Slika + Gumb, slika + Naslov + Opozorilo + Kombinirano polje + Meni + Meni + Element v meniju + Črta napredka + Radio skupina + Drsnik + Vrtljivi gumb + Zavihek + Seznam z zavihki + Časovnik + Vrstica z orodji + Povzetek + zasedeno + razširjen + strnjeno + neizbrano + vklopljeno + izključeno + mešano diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-so/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-so/strings.xml index 3322e01aaff2..b67b6691720b 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-so/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-so/strings.xml @@ -3,10 +3,10 @@ - Linki - Sawir - Batoon, Sawir - Tusmada - daaran - dansan + Linki + Sawir + Batoon, Sawir + Tusmada + daaran + dansan diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sq/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sq/strings.xml index 4b681fa5da26..520061484f9e 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sq/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sq/strings.xml @@ -3,29 +3,29 @@ - Lidhja - Imazh - Buton, imazh - Titull - Sinjalizim - Kuti kombinimi - Meny - Shiriti i menysë - Artikull i menysë - Shiriti i Progresit - Grupi i Radios - Shiriti i lëvizjes - Butoni i rrotullimit - Skedë - Lista e skedave - Kohëmatësi - Shiriti i mjeteve - Përmbledhja - I zënë - zgjeruar - palosur - i pazgjedhur - aktive - joaktiv - përzier + Lidhja + Imazh + Buton, imazh + Titull + Sinjalizim + Kuti kombinimi + Meny + Shiriti i menysë + Artikull i menysë + Shiriti i Progresit + Grupi i Radios + Shiriti i lëvizjes + Butoni i rrotullimit + Skedë + Lista e skedave + Kohëmatësi + Shiriti i mjeteve + Përmbledhja + I zënë + zgjeruar + palosur + i pazgjedhur + aktive + joaktiv + përzier diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sr/strings.xml index 28d6ea337cbd..3ea58b6f8234 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sr/strings.xml @@ -3,29 +3,29 @@ - Веза - Слика - Дугме, слика - Заглавље - Обавештење - Комбиновано поље - Мени - Трака са менијем - Ставка из менија - Трака са напретком - Група за радио - Трака за померање - Дугме за окретање - Картица - Листа картица - Тајмер - Трака са алаткама - Резиме - заузето - проширено - скупљено - избор опозван - укључено - искључено - мешано + Веза + Слика + Дугме, слика + Заглавље + Обавештење + Комбиновано поље + Мени + Трака са менијем + Ставка из менија + Трака са напретком + Група за радио + Трака за померање + Дугме за окретање + Картица + Листа картица + Тајмер + Трака са алаткама + Резиме + заузето + проширено + скупљено + избор опозван + укључено + искључено + мешано diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sv/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sv/strings.xml index c40edbe77235..0b001b9a57ba 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sv/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sv/strings.xml @@ -3,28 +3,28 @@ - Länk - Bild - Knapp, bild - Rubrik - Avisering - Kombinationsruta - Meny - Menyfält - Menyobjekt - Förloppsfält - Radiogrupp - Bläddringslist - Rotationsknapp - Flik - Fliklista - Verktygsfält - Sammanfattning - upptagen - utökad - minimerad - avmarkerad - - av - blandad + Länk + Bild + Knapp, bild + Rubrik + Avisering + Kombinationsruta + Meny + Menyfält + Menyobjekt + Förloppsfält + Radiogrupp + Bläddringslist + Rotationsknapp + Flik + Fliklista + Verktygsfält + Sammanfattning + upptagen + utökad + minimerad + avmarkerad + + av + blandad diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sw/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sw/strings.xml index a26adb80d40d..571c3dd0f0cf 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sw/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-sw/strings.xml @@ -3,29 +3,29 @@ - Kiungo - Picha - Kitufe, Picha - Kichwa - Arifa - Kisanduku cha Combo - Menyu - Upau wa Menyu - Kipengee cha Menyu - Upau wa Hatua - Kundi la Redio - Mwambaa wa Kubiringiza - Kitufe cha Kuzungusha - Kichupo - Orodha ya Kichupo - Kipima muda - Upau wa Zana - Muhtasari - shughulini - imepanuliwa - imekunjwa - haijateuliwa - imewashwa - imezimwa - mchanganyiko + Kiungo + Picha + Kitufe, Picha + Kichwa + Arifa + Kisanduku cha Combo + Menyu + Upau wa Menyu + Kipengee cha Menyu + Upau wa Hatua + Kundi la Redio + Mwambaa wa Kubiringiza + Kitufe cha Kuzungusha + Kichupo + Orodha ya Kichupo + Kipima muda + Upau wa Zana + Muhtasari + shughulini + imepanuliwa + imekunjwa + haijateuliwa + imewashwa + imezimwa + mchanganyiko diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ta/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ta/strings.xml index 9823eab70ede..8d15bc02ae3b 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ta/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ta/strings.xml @@ -3,29 +3,29 @@ - இணைப்பு - படம் - பொத்தான், படம் - தலைப்பு - நினைவூட்டல் - காம்போ பெட்டி - மெனு - மெனு பட்டி - மெனு பொருள் - போக்கு பட்டி - ரேடியோ குழு - உருட்டுப்பட்டி - ஸ்பின் பட்டன் - பிரிவு - பிரிவுப் பட்டியல் - டைமர் - கருவிப்பட்டி - சுருக்கம் - பணிமிகுதி - விரிவாக்கப்பட்டது - சுருக்கப்பட்டது - தேர்வுநீக்கப்பட்டது - ஆன் - ஆஃப் - கலந்துள்ளது + இணைப்பு + படம் + பொத்தான், படம் + தலைப்பு + நினைவூட்டல் + காம்போ பெட்டி + மெனு + மெனு பட்டி + மெனு பொருள் + போக்கு பட்டி + ரேடியோ குழு + உருட்டுப்பட்டி + ஸ்பின் பட்டன் + பிரிவு + பிரிவுப் பட்டியல் + டைமர் + கருவிப்பட்டி + சுருக்கம் + பணிமிகுதி + விரிவாக்கப்பட்டது + சுருக்கப்பட்டது + தேர்வுநீக்கப்பட்டது + ஆன் + ஆஃப் + கலந்துள்ளது diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-te/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-te/strings.xml index f08a251c1855..3609f4616437 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-te/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-te/strings.xml @@ -3,29 +3,29 @@ - లింక్ - చిత్రం - బటన్, చిత్రం - శీర్షిక - హెచ్చరిక - కాంబో బాక్స్ - మెను - మెను బార్ - మెను ఐటమ్ - ప్రోగ్రెస్ బార్ - రేడియో గ్రూప్ - స్క్రోల్ బార్ - స్పిన్ బటన్ - ట్యాబ్ - ట్యాబ్ జాబితా - టైమర్ - టూల్ బార్ - సమ్మరీ - బిజీగా ఉన్నారు - విస్తరింపబడింది - కుదించబడింది - ఎంపిక తీసివేసారు - ఆన్ చేయి - ఆఫ్ చేయి - మిక్స్డ్ + లింక్ + చిత్రం + బటన్, చిత్రం + శీర్షిక + హెచ్చరిక + కాంబో బాక్స్ + మెను + మెను బార్ + మెను ఐటమ్ + ప్రోగ్రెస్ బార్ + రేడియో గ్రూప్ + స్క్రోల్ బార్ + స్పిన్ బటన్ + ట్యాబ్ + ట్యాబ్ జాబితా + టైమర్ + టూల్ బార్ + సమ్మరీ + బిజీగా ఉన్నారు + విస్తరింపబడింది + కుదించబడింది + ఎంపిక తీసివేసారు + ఆన్ చేయి + ఆఫ్ చేయి + మిక్స్డ్ diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tg/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tg/strings.xml index 45b114da01a5..a331082ce4b7 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tg/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tg/strings.xml @@ -3,10 +3,10 @@ - Пайванд - Тасвир - Тугма, тасвир - Рӯйхати муштарак - фаъол - хомӯш + Пайванд + Тасвир + Тугма, тасвир + Рӯйхати муштарак + фаъол + хомӯш diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-th/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-th/strings.xml index f78b401f7b0a..160d1ce5b0fb 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-th/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-th/strings.xml @@ -3,29 +3,29 @@ - ลิงก์ - รูปภาพ - ปุ่ม, รูปภาพ - ส่วนหัว - การแจ้งเตือน - กล่องคอมโบ - เมนู - แถบเมนู - รายการในเมนู - แถบความคืบหน้า - กลุ่มปุ่มตัวเลือก - แถบเลื่อน - ปุ่มเพิ่ม/ลด - แท็บ - รายการแท็บ - ตัวจับเวลา - แถบเครื่องมือ - สรุป - ไม่ว่าง - ขยายแล้ว - ยุบแล้ว - ไม่ได้เลือก - เปิดอยู่ - ปิดอยู่ - ผสมกัน + ลิงก์ + รูปภาพ + ปุ่ม, รูปภาพ + ส่วนหัว + การแจ้งเตือน + กล่องคอมโบ + เมนู + แถบเมนู + รายการในเมนู + แถบความคืบหน้า + กลุ่มปุ่มตัวเลือก + แถบเลื่อน + ปุ่มเพิ่ม/ลด + แท็บ + รายการแท็บ + ตัวจับเวลา + แถบเครื่องมือ + สรุป + ไม่ว่าง + ขยายแล้ว + ยุบแล้ว + ไม่ได้เลือก + เปิดอยู่ + ปิดอยู่ + ผสมกัน diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tl/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tl/strings.xml index 6fabf6bc4634..7fc25d697e51 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tl/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tl/strings.xml @@ -3,12 +3,12 @@ - Combox Box - Item sa Menu - Grupo ng Radio - naka-expand - naka-collapse - na-unselect - naka-ON - naka-OFF + Combox Box + Item sa Menu + Grupo ng Radio + naka-expand + naka-collapse + na-unselect + naka-ON + naka-OFF diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tr/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tr/strings.xml index f8866dfe87d6..0fd5207dfbdf 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tr/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-tr/strings.xml @@ -3,29 +3,29 @@ - Bağlantı - Görsel - Düğme, Görsel - Başlık - Uyarı - Karma Kutu - Menü - Menü Çubuğu - Menü Seçeneği - İlerleme Çubuğu - Radyo Grubu - Kaydırma Çubuğu - Döndürme Düğmesi - Sekme - Sekme Listesi - Zamanlayıcı - Araç Çubuğu - Özet - meşgul - genişletilmiş - daraltılmış - seçili değil - açık - kapalı - karışık + Bağlantı + Görsel + Düğme, Görsel + Başlık + Uyarı + Karma Kutu + Menü + Menü Çubuğu + Menü Seçeneği + İlerleme Çubuğu + Radyo Grubu + Kaydırma Çubuğu + Döndürme Düğmesi + Sekme + Sekme Listesi + Zamanlayıcı + Araç Çubuğu + Özet + meşgul + genişletilmiş + daraltılmış + seçili değil + açık + kapalı + karışık diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uk/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uk/strings.xml index 02c3e74feae6..34e562562bb7 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uk/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uk/strings.xml @@ -3,29 +3,29 @@ - Посилання - Зображення - Кнопка, зображення - Заголовок - Сповіщення - Комбінований список - Меню - Рядок меню - Об\'єкт меню - Індикатор прогресу - Група перемикачів - Прокручування - Кнопка обертання - Вкладка - Список вкладок - Таймер - Панель інструментів - Зведення - зайнято - розгорнуто - згорнуто - не вибрано - Увімк. - Вимк. - змішано + Посилання + Зображення + Кнопка, зображення + Заголовок + Сповіщення + Комбінований список + Меню + Рядок меню + Об\'єкт меню + Індикатор прогресу + Група перемикачів + Прокручування + Кнопка обертання + Вкладка + Список вкладок + Таймер + Панель інструментів + Зведення + зайнято + розгорнуто + згорнуто + не вибрано + Увімк. + Вимк. + змішано diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ur/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ur/strings.xml index 7d1bd49dc597..6c0580cf818a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ur/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-ur/strings.xml @@ -3,29 +3,29 @@ - لنک - تصویر - بٹن، تصویر - سرخی - الرٹ - کومبو باکس - مینیو - مینیو بار - مینیو آئٹم - پیشرفت کی بار - ریڈیو گروپ - سکرول بار - گھمانے کا بٹن - ٹیب - ٹیب کی لسٹ - ٹائمر - ٹول بار - خلاصہ - مصروف - توسیع کیا گیا - سکیڑا گیا - غیر منتخب کردہ - آن ہے - آف ہے - امتزاج + لنک + تصویر + بٹن، تصویر + سرخی + الرٹ + کومبو باکس + مینیو + مینیو بار + مینیو آئٹم + پیشرفت کی بار + ریڈیو گروپ + سکرول بار + گھمانے کا بٹن + ٹیب + ٹیب کی لسٹ + ٹائمر + ٹول بار + خلاصہ + مصروف + توسیع کیا گیا + سکیڑا گیا + غیر منتخب کردہ + آن ہے + آف ہے + امتزاج diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uz/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uz/strings.xml index 46113eb42e6d..a1ee4d5d602a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uz/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-uz/strings.xml @@ -3,11 +3,11 @@ - Havola - Rasm - Tugma, rasm - Kombinatsiyalangan maydon - Menyu - yoniq - o‘chiq + Havola + Rasm + Tugma, rasm + Kombinatsiyalangan maydon + Menyu + yoniq + o‘chiq diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-vi/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-vi/strings.xml index 5a185889b86d..c36048e5cb05 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-vi/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-vi/strings.xml @@ -3,27 +3,27 @@ - Liên kết - Hình ảnh - Nút, Hình ảnh - Tiêu đề - Thông báo - Ô lựa chọn - Thanh menu - Mục trong menu - Thanh tiến độ - Nhóm nút radio - Thanh cuộn - Nút quay - Danh sách tab - Bộ hẹn giờ - Thanh công cụ - Tóm tắt - bận - đã mở rộng - đã thu gọn - không được chọn - đang bật - đang tắt - kết hợp + Liên kết + Hình ảnh + Nút, Hình ảnh + Tiêu đề + Thông báo + Ô lựa chọn + Thanh menu + Mục trong menu + Thanh tiến độ + Nhóm nút radio + Thanh cuộn + Nút quay + Danh sách tab + Bộ hẹn giờ + Thanh công cụ + Tóm tắt + bận + đã mở rộng + đã thu gọn + không được chọn + đang bật + đang tắt + kết hợp diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rCN/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rCN/strings.xml index 3727372faeb3..99b56427635d 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rCN/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rCN/strings.xml @@ -3,29 +3,29 @@ - 链接 - 图片 - 按钮,图片 - 标题 - 提醒 - 组合框 - 菜单 - 菜单栏 - 菜单项目 - 进度条 - 单选组 - 滚动条 - 旋转按钮 - 选项卡 - 选项卡列表 - 倒计时 - 工具栏 - 摘要 - 忙碌中 - 已展开 - 已收起 - 未选中 - 开启 - 关闭 - 混合 + 链接 + 图片 + 按钮,图片 + 标题 + 提醒 + 组合框 + 菜单 + 菜单栏 + 菜单项目 + 进度条 + 单选组 + 滚动条 + 旋转按钮 + 选项卡 + 选项卡列表 + 倒计时 + 工具栏 + 摘要 + 忙碌中 + 已展开 + 已收起 + 未选中 + 开启 + 关闭 + 混合 diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rHK/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rHK/strings.xml index c2f4bc5e83e4..0a9016106fff 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rHK/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rHK/strings.xml @@ -3,29 +3,29 @@ - 連結 - 圖像 - 圖像,按鈕 - 標題 - 提醒 - 下拉式方塊 - 選單 - 選單列 - 選單項目 - 進度列 - 選項按鈕群組 - 捲軸 - 微調按鈕 - 分頁 - 分頁清單 - 計時器 - 工具列 - 摘要 - 忙碌中 - 已展開 - 已收合 - 已取消選取 - 開啟 - 關閉 - 混合 + 連結 + 圖像 + 圖像,按鈕 + 標題 + 提醒 + 下拉式方塊 + 選單 + 選單列 + 選單項目 + 進度列 + 選項按鈕群組 + 捲軸 + 微調按鈕 + 分頁 + 分頁清單 + 計時器 + 工具列 + 摘要 + 忙碌中 + 已展開 + 已收合 + 已取消選取 + 開啟 + 關閉 + 混合 diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rTW/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rTW/strings.xml index b6d6018cc405..529b7c2779fa 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rTW/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values-zh-rTW/strings.xml @@ -3,29 +3,29 @@ - 連結 - 圖像 - 圖像,按鈕 - 標題 - 提醒 - 下拉式方塊 - 功能表 - 功能表列 - 功能表項目 - 進度列 - 選項按鈕群組 - 捲軸 - 微調按鈕 - 頁籤 - 頁籤清單 - 計時器 - 工具列 - 摘要 - 忙碌中 - 已展開 - 已收合 - 已取消選取 - 開啟 - 關閉 - 混合 + 連結 + 圖像 + 圖像,按鈕 + 標題 + 提醒 + 下拉式方塊 + 功能表 + 功能表列 + 功能表項目 + 進度列 + 選項按鈕群組 + 捲軸 + 微調按鈕 + 頁籤 + 頁籤清單 + 計時器 + 工具列 + 摘要 + 忙碌中 + 已展開 + 已收合 + 已取消選取 + 開啟 + 關閉 + 混合 diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml index 84ebee046697..dcb4182c59ee 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml @@ -1,59 +1,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml index a2f6ad526315..412f410b647a 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml @@ -1,103 +1,103 @@ Link Image Button, Image Heading Alert Combo Box Menu Menu Bar Menu Item Progress Bar Radio Group Scroll Bar Spin Button Tab Tab List Timer Tool Bar Summary busy expanded collapsed unselected on off mixed diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/BaseViewManagerTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/BaseViewManagerTest.kt index 2a39a523d9ff..5decdb0f6aed 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/BaseViewManagerTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/BaseViewManagerTest.kt @@ -47,7 +47,7 @@ class BaseViewManagerTest { @Test fun testAccessibilityRoleNone() { viewManager.setAccessibilityRole(view, "none") - Assertions.assertThat(view.getTag(R.id.accessibility_role)) + Assertions.assertThat(view.getTag(R.id.reactandroid_accessibility_role)) .isEqualTo(ReactAccessibilityDelegate.AccessibilityRole.NONE) } @@ -55,7 +55,7 @@ class BaseViewManagerTest { fun testAccessibilityRoleTurkish() { Locale.setDefault(Locale.forLanguageTag("tr-TR")) viewManager.setAccessibilityRole(view, "image") - Assertions.assertThat(view.getTag(R.id.accessibility_role)) + Assertions.assertThat(view.getTag(R.id.reactandroid_accessibility_role)) .isEqualTo(ReactAccessibilityDelegate.AccessibilityRole.IMAGE) } @@ -64,13 +64,13 @@ class BaseViewManagerTest { val accessibilityState = JavaOnlyMap() accessibilityState.putBoolean("selected", true) viewManager.setViewState(view, accessibilityState) - Assertions.assertThat(view.getTag(R.id.accessibility_state)).isEqualTo(accessibilityState) + Assertions.assertThat(view.getTag(R.id.reactandroid_accessibility_state)).isEqualTo(accessibilityState) Assertions.assertThat(view.isSelected).isEqualTo(true) } @Test fun testRoleList() { viewManager.setRole(view, "list") - Assertions.assertThat(view.getTag(R.id.role)).isEqualTo(ReactAccessibilityDelegate.Role.LIST) + Assertions.assertThat(view.getTag(R.id.reactandroid_role)).isEqualTo(ReactAccessibilityDelegate.Role.LIST) } } From 06fe293dcb04010567f047999f355aa202119f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Thu, 14 May 2020 12:15:17 +0200 Subject: [PATCH 175/190] [android] Always reload from manifest expo/expo#6134 honoring bare-expo and :tools:execute Squashed three commits: - https://github.com/expo/react-native/commit/d8f3fbef53dc53f94dc08b7476b0fc5f15b7771b - https://github.com/expo/react-native/commit/ae5e396b37a0d21b2dfe578502f738c9f537f1d1 - https://github.com/expo/react-native/commit/221762012097c1dcda25762c774eafc39962b182 The first one introduced breaking changes for bare workflow in our React Native fork, the second one fixed them by integrating with ReactAndroidCodeTransformer used when we import the code into Expo Client, the third one added usage for `reloadExpoApp` to debugger UI. Co-Authored-By: brentvatne Co-Authored-By: esamelson Co-Authored-By: Kudo Chien --- .../com/facebook/react/ReactDelegate.java | 2 +- .../devsupport/BridgeDevSupportManager.java | 2 +- .../devsupport/DevSupportManagerBase.java | 39 ++++++++++++++++--- .../devsupport/DisabledDevSupportManager.java | 3 ++ .../react/devsupport/RedBoxContentView.java | 2 +- .../RedBoxDialogSurfaceDelegate.java | 2 +- .../interfaces/DevSupportManager.java | 2 + 7 files changed, 43 insertions(+), 9 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java index fab2a26dde28..59c7ee95fbbf 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java @@ -209,7 +209,7 @@ && getReactNativeHost().getUseDeveloperSupport()) { Assertions.assertNotNull(mDoubleTapReloadRecognizer) .didDoubleTapR(keyCode, mActivity.getCurrentFocus()); if (didDoubleTapR) { - getReactNativeHost().getReactInstanceManager().getDevSupportManager().handleReloadJS(); + getReactNativeHost().getReactInstanceManager().getDevSupportManager().reloadExpoApp(); return true; } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java index 693479ff49a9..46740084ac49 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java @@ -99,7 +99,7 @@ public BridgeDevSupportManager( } } - addCustomDevOption( + expo_transformer_remove: addCustomDevOption( mIsSamplingProfilerEnabled ? "Disable Sampling Profiler" : "Enable Sampling Profiler", new DevOptionHandler() { @Override diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index d2d9755933e5..854f981d1bd2 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -340,6 +340,25 @@ private void showNewError( }); } + private int getExponentActivityId() { + return -1; + } + + @Override + public void reloadExpoApp() { + try { + Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("reloadFromManifest", int.class).invoke(null, getExponentActivityId()); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + + // reloadExpoApp replaces handleReloadJS in some places + // where in Expo we would like to reload from manifest. + // If so, if anything goes wrong here, we can fall back + // to plain JS reload. + handleReloadJS(); + } + } + @Override public void showDevOptionsDialog() { if (mDevOptionsDialog != null || !mIsDevSupportEnabled || ActivityManager.isUserAMonkey()) { @@ -361,7 +380,10 @@ public void onOptionSelected() { .show(); mDevSettings.setHotModuleReplacementEnabled(false); } - handleReloadJS(); + + // NOTE(brentvatne): rather than reload just JS we need to reload the entire project from manifest + // handleReloadJS(); + reloadExpoApp(); } }); @@ -383,7 +405,8 @@ public void onOptionSelected() { mApplicationContext.getString(R.string.reactandroid_catalyst_open_debugger_error))); } - options.put( + // NOTE(brentvatne): This option does not make sense for Expo + expo_transformer_remove: options.put( mApplicationContext.getString(R.string.reactandroid_catalyst_change_bundle_location), () -> { Activity context = mReactInstanceDevHelper.getCurrentActivity(); @@ -441,7 +464,8 @@ public void onOptionSelected() { mCurrentContext.getJSModule(HMRClient.class).disable(); } } - if (nextEnabled && !mDevSettings.isJSDevModeEnabled()) { + // NOTE(brentvatne): This option does not make sense for Expo + expo_transformer_remove: if (nextEnabled && !mDevSettings.isJSDevModeEnabled()) { Toast.makeText( mApplicationContext, mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading_auto_enable), @@ -468,7 +492,7 @@ public void onOptionSelected() { } mDevSettings.setFpsDebugEnabled(!mDevSettings.isFpsDebugEnabled()); }); - options.put( + expo_transformer_remove: options.put( mApplicationContext.getString(R.string.reactandroid_catalyst_settings), () -> { Intent intent = new Intent(mApplicationContext, DevSettingsActivity.class); @@ -1002,6 +1026,7 @@ public void toggleElementInspector() { }); } + // NOTE(brentvatne): this is confusingly called the first time the app loads! private void reload() { UiThreadUtil.assertOnUiThread(); @@ -1049,7 +1074,11 @@ public void onPackagerDisconnected() { public void onPackagerReloadCommand() { // Disable debugger to resume the JsVM & avoid thread locks while reloading mDevServerHelper.disableDebugger(); - UiThreadUtil.runOnUiThread(() -> handleReloadJS()); + UiThreadUtil.runOnUiThread(() -> { + // NOTE(brentvatne): rather than reload just JS we need to reload the entire project from manifest + // handleReloadJS(); + reloadExpoApp(); + }); } @Override diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java index 4c965eba4437..90a8dad95297 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java @@ -138,6 +138,9 @@ public void reloadSettings() {} @Override public void handleReloadJS() {} + @Override + public void reloadExpoApp() {} + @Override public void reloadJSFromServer(String bundleURL) {} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java index 7973c1248d05..25a4297e1ac1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java @@ -259,7 +259,7 @@ public void init() { new View.OnClickListener() { @Override public void onClick(View v) { - Assertions.assertNotNull(mDevSupportManager).handleReloadJS(); + Assertions.assertNotNull(mDevSupportManager).reloadExpoApp(); } }); mDismissButton = (Button) findViewById(R.id.rn_redbox_dismiss_button); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java index ad8a0720dae4..797e24233881 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java @@ -98,7 +98,7 @@ public boolean onKeyUp(int keyCode, KeyEvent event) { return true; } if (mDoubleTapReloadRecognizer.didDoubleTapR(keyCode, getCurrentFocus())) { - mDevSupportManager.handleReloadJS(); + mDevSupportManager.reloadExpoApp(); } return super.onKeyUp(keyCode, event); } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java index 84c756550cfe..fd5ebc44f026 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java @@ -72,6 +72,8 @@ public interface DevSupportManager extends JSExceptionHandler { void handleReloadJS(); + void reloadExpoApp(); + void reloadJSFromServer(final String bundleURL); void reloadJSFromServer(final String bundleURL, final BundleLoadCallback callback); From a5337fa73ab3ddb7f40615394b2c006fc1707d6b Mon Sep 17 00:00:00 2001 From: Eric Samelson Date: Tue, 19 Nov 2019 15:06:10 -0800 Subject: [PATCH 176/190] Update DevServerHelper.java --- .../react/devsupport/DevServerHelper.java | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java index 4cef3eed6904..8e76c5e2b4d1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java @@ -15,6 +15,8 @@ import com.facebook.common.logging.FLog; import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.ReactContext; +import com.facebook.react.bridge.UiThreadUtil; +import com.facebook.react.R; import com.facebook.react.common.ReactConstants; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.PackagerStatusCallback; @@ -106,6 +108,7 @@ public String typeID() { private final PackagerStatusCheck mPackagerStatusCheck; private final String mPackageName; + private boolean mPackagerConnectionLock = false; private @Nullable JSPackagerClient mPackagerClient; private @Nullable InspectorPackagerConnection mInspectorPackagerConnection; private final InspectorPackagerConnection.BundleStatusProvider mBundlerStatusProvider; @@ -131,13 +134,14 @@ public DevServerHelper( public void openPackagerConnection( final String clientId, final PackagerCommandListener commandListener) { - if (mPackagerClient != null) { + if (mPackagerClient != null || mPackagerConnectionLock) { FLog.w(ReactConstants.TAG, "Packager connection already open, nooping."); return; } - new AsyncTask() { + mPackagerConnectionLock = true; + new AsyncTask() { @Override - protected Void doInBackground(Void... backgroundParams) { + protected JSPackagerClient doInBackground(Void... backgroundParams) { Map handlers = new HashMap<>(); handlers.put( "reload", @@ -182,27 +186,46 @@ public void onDisconnected() { } }; - mPackagerClient = + JSPackagerClient packagerClient = new JSPackagerClient( clientId, mPackagerConnectionSettings, handlers, onPackagerConnectedCallback); - mPackagerClient.init(); + packagerClient.init(); - return null; + return packagerClient; + } + + @Override + protected void onPostExecute(JSPackagerClient packagerClient) { + UiThreadUtil.assertOnUiThread(); + mPackagerClient = packagerClient; + mPackagerConnectionLock = false; } }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } public void closePackagerConnection() { - new AsyncTask() { + if (mPackagerConnectionLock) { + FLog.w(ReactConstants.TAG, "Packager connection lock acquired, cannot close current connection."); + return; + } + mPackagerConnectionLock = true; + new AsyncTask() { @Override - protected Void doInBackground(Void... params) { - if (mPackagerClient != null) { - mPackagerClient.close(); - mPackagerClient = null; + protected Void doInBackground(JSPackagerClient... params) { + if (params.length > 0 && params[0] != null) { + JSPackagerClient packagerClient = params[0]; + packagerClient.close(); } return null; } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + + @Override + protected void onPostExecute(Void result) { + UiThreadUtil.assertOnUiThread(); + mPackagerClient = null; + mPackagerConnectionLock = false; + } + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, mPackagerClient); } public void openInspectorConnection() { From 682ec3ba75f7cdb294bb1c77e07699cc3dd447df Mon Sep 17 00:00:00 2001 From: Charlie Cruzan <35579283+cruzach@users.noreply.github.com> Date: Fri, 3 Jan 2020 09:32:49 -0500 Subject: [PATCH 177/190] [android] account for notch/statusbar in redbox view ref https://github.com/expo/expo/pull/6644 --- .../src/main/res/devsupport/layout/reactandroid_redbox_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/ReactAndroid/src/main/res/devsupport/layout/reactandroid_redbox_view.xml b/packages/react-native/ReactAndroid/src/main/res/devsupport/layout/reactandroid_redbox_view.xml index c735fc1ffba8..2f8381797de4 100644 --- a/packages/react-native/ReactAndroid/src/main/res/devsupport/layout/reactandroid_redbox_view.xml +++ b/packages/react-native/ReactAndroid/src/main/res/devsupport/layout/reactandroid_redbox_view.xml @@ -4,6 +4,7 @@ android:layout_height="match_parent" android:orientation="vertical" android:background="#1A1A1A" + android:fitsSystemWindows="true" > Date: Tue, 16 Jun 2020 17:50:07 -0700 Subject: [PATCH 178/190] [ReactAndroid] Respect local night mode configuration for activity to play nicely with Expo client color scheme locking mechanism. https://github.com/expo/expo/pull/8793 This is a squashed commits with the following changes: commit 945096e54ff9f5d9f5639cea201f101efac472a9 Author: Kudo Chien Date: Tue Jul 27 16:49:09 2021 +0800 [android] Upgrade androidx.appcompat to 1.2.0 Backport from: https://github.com/expo/expo/commit/58fa52e3e3e29b7a852a814b2d5bb54f4a8e1065 --- .../modules/appearance/AppearanceModule.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java index 4dece29d17fc..56e01d0a8f90 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java @@ -18,6 +18,9 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.module.annotations.ReactModule; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatDelegate; + /** Module that exposes the user's preferred color scheme. */ @ReactModule(name = NativeAppearanceSpec.NAME) public class AppearanceModule extends NativeAppearanceSpec { @@ -50,10 +53,23 @@ public AppearanceModule( mColorScheme = colorSchemeForCurrentConfiguration(reactContext); } + // NOTE(brentvatne): this was static previously, but it wasn't necessary and we need it to not be + // in order to use getCurrentActivity private String colorSchemeForCurrentConfiguration(Context context) { if (mOverrideColorScheme != null) { return mOverrideColorScheme.getScheme(); } + // NOTE(brentvatne): Same code (roughly) that we use in ExpoAppearanceModule to get the config + // as set by ExperienceActivityUtils to force the dark/light mode config on the activity + if (getCurrentActivity() instanceof AppCompatActivity) { + int mode = ((AppCompatActivity) getCurrentActivity()).getDelegate().getLocalNightMode(); + switch (mode) { + case AppCompatDelegate.MODE_NIGHT_YES: + return "dark"; + case AppCompatDelegate.MODE_NIGHT_NO: + return "light"; + } + } int currentNightMode = context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; switch (currentNightMode) { From f0c4765765540c93a57e0539dcfdfc7ea02e64f5 Mon Sep 17 00:00:00 2001 From: Evan Bacon Date: Tue, 14 Jul 2020 18:55:38 -0700 Subject: [PATCH 179/190] [ReactAndroid] Support extending core modules --- .../react/bridge/JavaModuleWrapper.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.java index a931d834af03..719b3efcb1d6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.java @@ -72,11 +72,20 @@ private void findMethods() { Class superClass = (Class) classForMethods.getSuperclass(); if (TurboModule.class.isAssignableFrom(superClass)) { - // For java module that is based on generated flow-type spec, inspect the - // spec abstract class instead, which is the super class of the given java - // module. - classForMethods = superClass; + // Check if the parent class also conforms to ReactModuleWithSpec + // this accounts for cases when a module is extended i.e. Expo's sandbox AsyncStorage and Intent module. + Class superSuperClass = + (Class) superClass.getSuperclass(); + if (TurboModule.class.isAssignableFrom(superSuperClass)) { + classForMethods = superSuperClass; + } else { + // For java module that is based on generated flow-type spec, inspect the + // spec abstract class instead, which is the super class of the given java + // module. + classForMethods = superClass; + } } + Method[] targetMethods = classForMethods.getDeclaredMethods(); for (Method targetMethod : targetMethods) { From 9901f9e8e3ef6a2ac74ae1f1bc3c8c5d239e34a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Thu, 20 Aug 2020 19:05:55 +0200 Subject: [PATCH 180/190] [ios] Support custom js executor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a squashed commit from the following changes: commit c1c976f8a4a9517364f5a0650ada8ba3c0f3bfe9 Author: Stanisław Chmiela Date: Thu Aug 20 19:05:55 2020 +0200 Make RCTCxxBridgeDelegate not care about return value of jsExecutorFactoryForBridge commit d1dd984bc08143fb7b258c2148cb474a61ee910c Author: Stanisław Chmiela Date: Thu Aug 20 19:06:13 2020 +0200 Make RCTCxxBridge not care about the actual protocol implemented, only the method used commit efd22a8dbcf85b4ecafbfea913e47371d87dfcd4 Author: Łukasz Kosmaty Date: Tue Mar 9 00:36:25 2021 +0100 [ios] Fix `EXC_BAD_ACCESS` in start method of `RCTCxxBridge` (#25) commit 0e9b4f9eea0f8ee316fa7ba6b7d2ad26325f8077 Author: Kudo Chien Date: Tue Aug 17 19:17:48 2021 +0800 support hermes for our RCTCxxBridge patch (#26) --- .../React/CxxBridge/RCTCxxBridge.mm | 25 ++++++++++++++++--- .../React/CxxBridge/RCTCxxBridgeDelegate.h | 9 +++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/packages/react-native/React/CxxBridge/RCTCxxBridge.mm b/packages/react-native/React/CxxBridge/RCTCxxBridge.mm index af931fd45ca1..d294cf4e4ee2 100644 --- a/packages/react-native/React/CxxBridge/RCTCxxBridge.mm +++ b/packages/react-native/React/CxxBridge/RCTCxxBridge.mm @@ -417,9 +417,28 @@ - (void)start // Prepare executor factory (shared_ptr for copy into block) std::shared_ptr executorFactory; if (!self.executorClass) { - if ([self.delegate conformsToProtocol:@protocol(RCTCxxBridgeDelegate)]) { - id cxxDelegate = (id)self.delegate; - executorFactory = [cxxDelegate jsExecutorFactoryForBridge:self]; + SEL jsExecutorFactoryForBridgeSEL = @selector(jsExecutorFactoryForBridge:); + if ([self.delegate respondsToSelector:jsExecutorFactoryForBridgeSEL]) { + // Normally, `RCTCxxBridgeDelegate` protocol uses `std::unique_ptr` to return the js executor object. + // However, we needed to change the signature of `jsExecutorFactoryForBridge` to return `void *` instead. See https://github.com/expo/expo/pull/9862. + // This change works great in Expo Go because we have full control over modules initialization, + // but if someone is using our fork in the bare app, crashes may occur (`EXC_BAD_ACCESS`). + // To fix it, we need to get the return type of `jsExecutorFactoryForBridge` and handle two cases: + // - method returns `void *` + // - method returns `std::unique_ptr` + Method m = class_getInstanceMethod([self.delegate class], jsExecutorFactoryForBridgeSEL); + char returnType[128]; + method_getReturnType(m, returnType, sizeof(returnType)); + + if(strcmp(returnType, @encode(void *)) == 0) { + // `jsExecutorFactoryForBridge` returns `void *` + id cxxDelegate = (id)self.delegate; + executorFactory.reset(reinterpret_cast([cxxDelegate jsExecutorFactoryForBridge:self])); + } else { + // `jsExecutorFactoryForBridge` returns `std::unique_ptr` + id cxxDelegate = (id)self.delegate; + executorFactory = [cxxDelegate jsExecutorFactoryForBridge:self]; + } } if (!executorFactory) { auto installBindings = RCTJSIExecutorRuntimeInstaller(nullptr); diff --git a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h index e2d48db4548d..c6aab0de2652 100644 --- a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h +++ b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h @@ -26,6 +26,15 @@ class JSExecutorFactory; * If not implemented, or returns an empty pointer, JSIExecutorFactory * will be used with a JSCRuntime. */ +- (void *)jsExecutorFactoryForBridge:(RCTBridge *)bridge; + +@end + +@protocol RCTCxxBridgeTurboModuleDelegate + +/** + * The RCTCxxBridgeDelegate used outside of the Expo Go. + */ - (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge; @end From 9f0e5caef4dec80145dcf11243a4728617182f16 Mon Sep 17 00:00:00 2001 From: Ben Roth Date: Wed, 22 Mar 2017 14:47:03 -0700 Subject: [PATCH 181/190] [iOS] Remove side effects from DevTools (swizzling, module exporting) - Remove swizzling from dev tools - Remove RCT_EXPORT_MODULE from RCTDevMenu Do not use RCT_EXPORT_MODULE in RCTDevMenu Because this class swizzles a system method inside `initialize`, all the versions of RCTDevMenu conflict with each other when we use RCT_EXPORT_MODULE because they are all referenced immediately at runtime. Co-Authored-By: Kudo Chien * Update patch to fit newer RCTKeyCommands.m --- .../react-native/React/Base/RCTKeyCommands.m | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/react-native/React/Base/RCTKeyCommands.m b/packages/react-native/React/Base/RCTKeyCommands.m index 1ceaf6ec0dce..4a37541bedbb 100644 --- a/packages/react-native/React/Base/RCTKeyCommands.m +++ b/packages/react-native/React/Base/RCTKeyCommands.m @@ -94,22 +94,6 @@ @interface RCTKeyCommands () @implementation RCTKeyCommands -+ (void)initialize -{ - SEL originalKeyEventSelector = NSSelectorFromString(@"handleKeyUIEvent:"); - SEL swizzledKeyEventSelector = NSSelectorFromString( - [NSString stringWithFormat:@"_rct_swizzle_%x_%@", arc4random(), NSStringFromSelector(originalKeyEventSelector)]); - - void (^handleKeyUIEventSwizzleBlock)(UIApplication *, UIEvent *) = ^(UIApplication *slf, UIEvent *event) { - [[[self class] sharedInstance] handleKeyUIEventSwizzle:event]; - - ((void (*)(id, SEL, id))objc_msgSend)(slf, swizzledKeyEventSelector, event); - }; - - RCTSwapInstanceMethodWithBlock( - [UIApplication class], originalKeyEventSelector, handleKeyUIEventSwizzleBlock, swizzledKeyEventSelector); -} - - (void)handleKeyUIEventSwizzle:(UIEvent *)event { NSString *modifiedInput = nil; From f513d805127718be461774e7665279a32e112ca7 Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Tue, 26 Apr 2022 10:09:49 +0800 Subject: [PATCH 182/190] [iOS] Remove private symbols in Expo Go RCTKeyCommands uses iOS private symbols to hook keyboard commands. originally it's debug build only, however, we enable `RCT_DEV` in Expo Go even on release build. this change updates the functionalities for simulator build only which aligns to https://github.com/expo/expo/pull/14735. --- packages/react-native/React/Base/RCTKeyCommands.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/Base/RCTKeyCommands.m b/packages/react-native/React/Base/RCTKeyCommands.m index 4a37541bedbb..2ab8b9176036 100644 --- a/packages/react-native/React/Base/RCTKeyCommands.m +++ b/packages/react-native/React/Base/RCTKeyCommands.m @@ -14,7 +14,7 @@ #import "RCTDefines.h" #import "RCTUtils.h" -#if RCT_DEV +#if TARGET_IPHONE_SIMULATOR @interface UIEvent (UIPhysicalKeyboardEvent) From 6539515a15debddce486b3508c287b16ee9f6f8c Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Thu, 23 Jun 2022 21:01:17 +0800 Subject: [PATCH 183/190] [android] Support caching prebuilt hermes-engine --- packages/react-native/ReactAndroid/build.gradle | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/build.gradle b/packages/react-native/ReactAndroid/build.gradle index cca5732245e3..7717709bd858 100644 --- a/packages/react-native/ReactAndroid/build.gradle +++ b/packages/react-native/ReactAndroid/build.gradle @@ -255,6 +255,12 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa it.outputDir.set(prefabHeadersDir) } +def prebuiltHermesDir = findProperty("expo.prebuiltHermesDir") ?: file("${rootDir}/prebuiltHermes") +def prebuiltHermesVersion = file("${prebuiltHermesDir}/.hermesversion").exists() ? file("${prebuiltHermesDir}/.hermesversion").text : null +def currentHermesVersion = file("${project(':packages:react-native:ReactAndroid').projectDir}/../sdks/.hermesversion").exists() ? file("${project(':packages:react-native:ReactAndroid').projectDir}/../sdks/.hermesversion").text : null +def buildHermesSource = currentHermesVersion != prebuiltHermesVersion +logger.info(":ReactAndroid - buildHermesSource[${buildHermesSource}]") + task createNativeDepsDirectories { downloadsDir.mkdirs() thirdPartyNdkDir.mkdirs() @@ -776,7 +782,12 @@ dependencies { // It's up to the consumer to decide if hermes should be included or not. // Therefore hermes-engine is a compileOnly dependency. - compileOnly(project(":packages:react-native:ReactAndroid:hermes-engine")) + if (!buildHermesSource) { + debugCompileOnly(files("${prebuiltHermesDir}/hermes-engine-debug.aar")) + releaseCompileOnly(files("${prebuiltHermesDir}/hermes-engine-release.aar")) + } else { + compileOnly(project(":packages:react-native:ReactAndroid:hermes-engine")) + } testImplementation(libs.junit) testImplementation(libs.assertj) From 886cc481922f320f99fb25d28558e56fe60d6966 Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Thu, 2 Feb 2023 08:00:49 +0800 Subject: [PATCH 184/190] [ios] expose jsc files for duo engines --- packages/react-native/React-Core.podspec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/react-native/React-Core.podspec b/packages/react-native/React-Core.podspec index 78572561c8d1..2f82cc8c8109 100644 --- a/packages/react-native/React-Core.podspec +++ b/packages/react-native/React-Core.podspec @@ -88,9 +88,11 @@ Pod::Spec.new do |s| ] # If we are using Hermes (the default is use hermes, so USE_HERMES can be nil), we don't have jsc installed # So we have to exclude the JSCExecutorFactory - if use_hermes - exclude_files = exclude_files.append("React/CxxBridge/JSCExecutorFactory.{h,mm}") - end + # + # NOTE(kudo): Exposing JSC files as Expo Go hosts duo engines + # if use_hermes + # exclude_files = exclude_files.append("React/CxxBridge/JSCExecutorFactory.{h,mm}") + # end ss.exclude_files = exclude_files ss.private_header_files = "React/Cxx*/*.h" end From 9c4c1b59e9f1fd0889f7f6752324412cb3b697be Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Mon, 3 Jul 2023 22:21:30 +0800 Subject: [PATCH 185/190] [ios] Fix hermes inspector exception is uncaught and crash the app. close ENG-9172 --- .../ReactCommon/hermes/inspector-modern/Inspector.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h b/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h index aebeb828d27d..ea5d629cc7e3 100644 --- a/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h +++ b/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h @@ -372,6 +372,10 @@ std::optional runUserCallback(C &cb, A &&...arg) { cb(std::forward(arg)...); } catch (const std::exception &e) { return UserCallbackException(e); + } catch (const std::runtime_error &e) { + // NOTE(kudo): Adding this to catch Hermes inspector exceptions after SDK 49. + // I still not figure out why the std::runtime_error is not catched by the std::exception above. + return UserCallbackException(e); } return {}; From 82dd4daae3f77ffd09be781b7225f0d32c70f551 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Tue, 28 Nov 2023 15:18:57 -0300 Subject: [PATCH 186/190] et update-rn --- .../react-native/ReactAndroid/build.gradle | 6 +- .../com/facebook/react/TurboReactPackage.java | 173 +- .../bridge/DefaultJSExceptionHandler.java | 28 +- .../devsupport/BridgeDevSupportManager.java | 295 +-- .../react/devsupport/DevInternalSettings.java | 199 +- .../react/devsupport/DevServerHelper.java | 823 ++++---- .../devsupport/DevSupportManagerBase.java | 1848 ++++++++--------- .../modules/core/ExceptionsManagerModule.java | 143 +- .../debug/interfaces/DeveloperSettings.java | 43 +- .../react/modules/dialog/DialogModule.java | 345 +-- .../modules/network/NetworkingModule.java | 1211 +++++------ .../modules/network/OkHttpClientProvider.java | 95 +- .../systeminfo/AndroidInfoHelpers.java | 213 +- .../uimanager/NativeViewHierarchyManager.java | 1464 ++++++------- 14 files changed, 3161 insertions(+), 3725 deletions(-) diff --git a/packages/react-native/ReactAndroid/build.gradle b/packages/react-native/ReactAndroid/build.gradle index 7717709bd858..bfaf2fd6d6d1 100644 --- a/packages/react-native/ReactAndroid/build.gradle +++ b/packages/react-native/ReactAndroid/build.gradle @@ -22,7 +22,7 @@ import kotlin.Pair import de.undercouch.gradle.tasks.download.Download -version = VERSION_NAME +version = '50.0.0' group = "com.facebook.react" // We download various C++ open-source dependencies into downloads. @@ -36,7 +36,7 @@ def reactNativeRootDir = projectDir.parent // We put the publishing version from gradle.properties inside ext. so other // subprojects can access it as well. -ext.publishing_version = VERSION_NAME +ext.publishing_version = '50.0.0' // This is the version of CMake we're requesting to the Android SDK to use. // If missing it will be downloaded automatically. Only CMake versions shipped with the @@ -396,7 +396,7 @@ task prepareKotlinBuildScriptModel { // As ReactAndroid builds from source, the codegen needs to be built before it can be invoked. // This is not the case for users of React Native, as we ship a compiled version of the codegen. final def buildCodegenCLITask = tasks.register('buildCodegenCLI', BuildCodegenCLITask) { - it.codegenDir.set(file("$rootDir/node_modules/@react-native/codegen")) + it.codegenDir.set(file("${project(':packages:react-native:ReactAndroid').projectDir.parent}/../react-native-codegen")) it.bashWindowsHome.set(project.findProperty("react.internal.windowsBashPath")) it.onlyIf { // For build from source scenario, we don't need to build the codegen at all. diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/TurboReactPackage.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/TurboReactPackage.java index 8d09923ddd20..ac1cba33892d 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/TurboReactPackage.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/TurboReactPackage.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react; import androidx.annotation.NonNull; @@ -29,24 +28,23 @@ /** This will eventually replace {@link LazyReactPackage} when TurboModules are finally done. */ public abstract class TurboReactPackage implements ReactPackage { - @Override - public List createNativeModules(ReactApplicationContext reactContext) { - throw new UnsupportedOperationException( - "createNativeModules method is not supported. Use getModule() method instead."); - } + @Override + public List createNativeModules(ReactApplicationContext reactContext) { + throw new UnsupportedOperationException("createNativeModules method is not supported. Use getModule() method instead."); + } - /** + /** * The API needed for TurboModules. Given a module name, it returns an instance of {@link * NativeModule} for the name * * @param name name of the Native Module * @param reactContext {@link ReactApplicationContext} context for this */ - @Override - public abstract @Nullable NativeModule getModule( - @NonNull String name, @NonNull ReactApplicationContext reactContext); + @Override + @Nullable + public abstract NativeModule getModule(@NonNull String name, @NonNull ReactApplicationContext reactContext); - /** + /** * This is a temporary method till we implement TurboModules. Once we implement TurboModules, we * will be able to directly call {@link TurboReactPackage#getModule(String, * ReactApplicationContext)} This method will be removed when TurboModule implementation is @@ -55,105 +53,98 @@ public List createNativeModules(ReactApplicationContext reactConte * @param reactContext * @return */ - /** package */ - Iterable getNativeModuleIterator(final ReactApplicationContext reactContext) { - final Set> entrySet = - getReactModuleInfoProvider().getReactModuleInfos().entrySet(); - final Iterator> entrySetIterator = entrySet.iterator(); - // This should ideally be an IteratorConvertor, but we don't have any internal library for it - return () -> - new Iterator() { - @Nullable Map.Entry nextEntry = null; - - private void findNext() { - while (entrySetIterator.hasNext()) { - Map.Entry entry = entrySetIterator.next(); - ReactModuleInfo reactModuleInfo = entry.getValue(); - - // This Iterator is used to create the NativeModule registry. The NativeModule - // registry must not have TurboModules. Therefore, if TurboModules are enabled, and - // the current NativeModule is a TurboModule, we need to skip iterating over it. - if (ReactFeatureFlags.useTurboModules && reactModuleInfo.isTurboModule()) { - continue; - } - - nextEntry = entry; - return; + /** package */ + public Iterable getNativeModuleIterator(final ReactApplicationContext reactContext) { + final Set> entrySet = getReactModuleInfoProvider().getReactModuleInfos().entrySet(); + final Iterator> entrySetIterator = entrySet.iterator(); + // This should ideally be an IteratorConvertor, but we don't have any internal library for it + return () -> new Iterator() { + + @Nullable + public Map.Entry nextEntry = null; + + private void findNext() { + while (entrySetIterator.hasNext()) { + Map.Entry entry = entrySetIterator.next(); + ReactModuleInfo reactModuleInfo = entry.getValue(); + // the current NativeModule is a TurboModule, we need to skip iterating over it. + if (ReactFeatureFlags.useTurboModules && reactModuleInfo.isTurboModule()) { + continue; + } + nextEntry = entry; + return; + } + nextEntry = null; } - nextEntry = null; - } - @Override - public boolean hasNext() { - if (nextEntry == null) { - findNext(); + @Override + public boolean hasNext() { + if (nextEntry == null) { + findNext(); + } + return nextEntry != null; } - return nextEntry != null; - } - @Override - public ModuleHolder next() { - if (nextEntry == null) { - findNext(); + @Override + public ModuleHolder next() { + if (nextEntry == null) { + findNext(); + } + if (nextEntry == null) { + throw new NoSuchElementException("ModuleHolder not found"); + } + Map.Entry entry = nextEntry; + // Advance iterator + findNext(); + String name = entry.getKey(); + ReactModuleInfo reactModuleInfo = entry.getValue(); + return new ModuleHolder(reactModuleInfo, new ModuleHolderProvider(name, reactContext)); } - if (nextEntry == null) { - throw new NoSuchElementException("ModuleHolder not found"); + @Override + public void remove() { + throw new UnsupportedOperationException("Cannot remove native modules from the list"); } - - Map.Entry entry = nextEntry; - - // Advance iterator - findNext(); - String name = entry.getKey(); - ReactModuleInfo reactModuleInfo = entry.getValue(); - return new ModuleHolder(reactModuleInfo, new ModuleHolderProvider(name, reactContext)); - } - - @Override - public void remove() { - throw new UnsupportedOperationException("Cannot remove native modules from the list"); - } }; - } + } - /** + /** * @param reactContext react application context that can be used to create View Managers. * @return list of module specs that can create the View Managers. */ - protected List getViewManagers(ReactApplicationContext reactContext) { - return Collections.emptyList(); - } - - @Override - public List createViewManagers(ReactApplicationContext reactContext) { - List viewManagerModuleSpecs = getViewManagers(reactContext); - if (viewManagerModuleSpecs == null || viewManagerModuleSpecs.isEmpty()) { - return Collections.emptyList(); + protected List getViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); } - List viewManagers = new ArrayList<>(); - for (ModuleSpec moduleSpec : viewManagerModuleSpecs) { - viewManagers.add((ViewManager) moduleSpec.getProvider().get()); + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + List viewManagerModuleSpecs = getViewManagers(reactContext); + if (viewManagerModuleSpecs == null || viewManagerModuleSpecs.isEmpty()) { + return Collections.emptyList(); + } + List viewManagers = new ArrayList<>(); + for (ModuleSpec moduleSpec : viewManagerModuleSpecs) { + viewManagers.add((ViewManager) moduleSpec.getProvider().get()); + } + return viewManagers; } - return viewManagers; - } - public abstract ReactModuleInfoProvider getReactModuleInfoProvider(); + public abstract ReactModuleInfoProvider getReactModuleInfoProvider(); - private class ModuleHolderProvider implements Provider { + private class ModuleHolderProvider implements Provider { - private final String mName; - private final ReactApplicationContext mReactContext; + public final String mName; - public ModuleHolderProvider(String name, ReactApplicationContext reactContext) { - mName = name; - mReactContext = reactContext; - } + public final ReactApplicationContext mReactContext; - @Override - public NativeModule get() { - return getModule(mName, mReactContext); + public ModuleHolderProvider(String name, ReactApplicationContext reactContext) { + mName = name; + mReactContext = reactContext; + } + + @Override + public NativeModule get() { + return getModule(mName, mReactContext); + } } - } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DefaultJSExceptionHandler.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DefaultJSExceptionHandler.java index c3e40d6b78b0..e072a0f2de5c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DefaultJSExceptionHandler.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DefaultJSExceptionHandler.java @@ -4,20 +4,28 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.bridge; /** Crashy crashy exception handler. */ public class DefaultJSExceptionHandler implements JSExceptionHandler { - @Override - public void handleException(Exception e) { - if (e instanceof RuntimeException) { - // Because we are rethrowing the original exception, the original stacktrace will be - // preserved. - throw (RuntimeException) e; - } else { - throw new RuntimeException(e); + @Override + public void handleException(Exception e) { + try { + { + if (e instanceof RuntimeException) { + // preserved. + throw (RuntimeException) e; + } else { + throw new RuntimeException(e); + } + } + } catch (RuntimeException expoException) { + try { + Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("handleReactNativeError", String.class, Object.class, Integer.class, Boolean.class).invoke(null, expoException.getMessage(), null, -1, true); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + } + } } - } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java index 46740084ac49..ea5dd2b1bb99 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.devsupport; import android.content.Context; @@ -58,202 +57,136 @@ * is responsible for enabling/disabling dev support in case when app is backgrounded or when all * the views has been detached from the instance (through {@link #setDevSupportEnabled} method). */ -public final class BridgeDevSupportManager extends DevSupportManagerBase { - private boolean mIsSamplingProfilerEnabled = false; - private ReactInstanceDevHelper mReactInstanceManagerHelper; - private @Nullable DevLoadingViewManager mDevLoadingViewManager; +public class BridgeDevSupportManager extends DevSupportManagerBase { + + public boolean mIsSamplingProfilerEnabled = false; + + public ReactInstanceDevHelper mReactInstanceManagerHelper; - public BridgeDevSupportManager( - Context applicationContext, - ReactInstanceDevHelper reactInstanceManagerHelper, - @Nullable String packagerPathForJSBundleName, - boolean enableOnCreate, - @Nullable RedBoxHandler redBoxHandler, - @Nullable DevBundleDownloadListener devBundleDownloadListener, - int minNumShakes, - @Nullable Map customPackagerCommandHandlers, - @Nullable SurfaceDelegateFactory surfaceDelegateFactory, - @Nullable DevLoadingViewManager devLoadingViewManager) { - super( - applicationContext, - reactInstanceManagerHelper, - packagerPathForJSBundleName, - enableOnCreate, - redBoxHandler, - devBundleDownloadListener, - minNumShakes, - customPackagerCommandHandlers, - surfaceDelegateFactory, - devLoadingViewManager); + @Nullable + public DevLoadingViewManager mDevLoadingViewManager; - if (getDevSettings().isStartSamplingProfilerOnInit()) { - // Only start the profiler. If its already running, there is an error - if (!mIsSamplingProfilerEnabled) { - toggleJSSamplingProfiler(); - } else { - Toast.makeText( - applicationContext, - "JS Sampling Profiler was already running, so did not start the sampling profiler", - Toast.LENGTH_LONG) - .show(); - } + public BridgeDevSupportManager(Context applicationContext, ReactInstanceDevHelper reactInstanceManagerHelper, @Nullable String packagerPathForJSBundleName, boolean enableOnCreate, @Nullable RedBoxHandler redBoxHandler, @Nullable DevBundleDownloadListener devBundleDownloadListener, int minNumShakes, @Nullable Map customPackagerCommandHandlers, @Nullable SurfaceDelegateFactory surfaceDelegateFactory, @Nullable DevLoadingViewManager devLoadingViewManager) { + super(applicationContext, reactInstanceManagerHelper, packagerPathForJSBundleName, enableOnCreate, redBoxHandler, devBundleDownloadListener, minNumShakes, customPackagerCommandHandlers, surfaceDelegateFactory, devLoadingViewManager); + if (getDevSettings().isStartSamplingProfilerOnInit()) { + // Only start the profiler. If its already running, there is an error + if (!mIsSamplingProfilerEnabled) { + toggleJSSamplingProfiler(); + } else { + Toast.makeText(applicationContext, "JS Sampling Profiler was already running, so did not start the sampling profiler", Toast.LENGTH_LONG).show(); + } + } + // code removed by ReactAndroidCodeTransformer + ; } - expo_transformer_remove: addCustomDevOption( - mIsSamplingProfilerEnabled ? "Disable Sampling Profiler" : "Enable Sampling Profiler", - new DevOptionHandler() { - @Override - public void onOptionSelected() { - toggleJSSamplingProfiler(); - } - }); - } + @Override + protected String getUniqueTag() { + return "Bridge"; + } - @Override - protected String getUniqueTag() { - return "Bridge"; - } + @Override + public void loadSplitBundleFromServer(final String bundlePath, final DevSplitBundleCallback callback) { + fetchSplitBundleAndCreateBundleLoader(bundlePath, new CallbackWithBundleLoader() { - @Override - public void loadSplitBundleFromServer( - final String bundlePath, final DevSplitBundleCallback callback) { - fetchSplitBundleAndCreateBundleLoader( - bundlePath, - new CallbackWithBundleLoader() { - @Override - public void onSuccess(JSBundleLoader bundleLoader) { - bundleLoader.loadScript(getCurrentContext().getCatalystInstance()); - getCurrentContext() - .getJSModule(HMRClient.class) - .registerBundle(getDevServerHelper().getDevServerSplitBundleURL(bundlePath)); - callback.onSuccess(); - } + @Override + public void onSuccess(JSBundleLoader bundleLoader) { + bundleLoader.loadScript(getCurrentContext().getCatalystInstance()); + getCurrentContext().getJSModule(HMRClient.class).registerBundle(getDevServerHelper().getDevServerSplitBundleURL(bundlePath)); + callback.onSuccess(); + } - @Override - public void onError(String url, Throwable cause) { - callback.onError(url, cause); - } + @Override + public void onError(String url, Throwable cause) { + callback.onError(url, cause); + } }); - } - - private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback( - final SimpleSettableFuture future) { - return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() { - @Override - public void onSuccess() { - future.set(true); - hideDevLoadingView(); - } + } - @Override - public void onFailure(final Throwable cause) { - hideDevLoadingView(); - FLog.e(ReactConstants.TAG, "Failed to connect to debugger!", cause); - future.setException( - new IOException( - getApplicationContext().getString(com.facebook.react.R.string.reactandroid_catalyst_debug_error), - cause)); - } - }; - } + private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(final SimpleSettableFuture future) { + return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() { - private void reloadJSInProxyMode() { - // When using js proxy, there is no need to fetch JS bundle as proxy executor will do that - // anyway - getDevServerHelper().launchJSDevtools(); + @Override + public void onSuccess() { + future.set(true); + hideDevLoadingView(); + } - JavaJSExecutor.Factory factory = - new JavaJSExecutor.Factory() { - @Override - public JavaJSExecutor create() throws Exception { - WebsocketJavaScriptExecutor executor = new WebsocketJavaScriptExecutor(); - SimpleSettableFuture future = new SimpleSettableFuture<>(); - executor.connect( - getDevServerHelper().getWebsocketProxyURL(), getExecutorConnectCallback(future)); - // TODO(t9349129) Don't use timeout - try { - future.get(90, TimeUnit.SECONDS); - return executor; - } catch (ExecutionException e) { - throw (Exception) e.getCause(); - } catch (InterruptedException | TimeoutException e) { - throw new RuntimeException(e); + @Override + public void onFailure(final Throwable cause) { + hideDevLoadingView(); + FLog.e(ReactConstants.TAG, "Failed to connect to debugger!", cause); + future.setException(new IOException(getApplicationContext().getString(com.facebook.react.R.string.reactandroid_catalyst_debug_error), cause)); } - } }; - getReactInstanceDevHelper().onReloadWithJSDebugger(factory); - } - - @Override - public void handleReloadJS() { - - UiThreadUtil.assertOnUiThread(); - - ReactMarker.logMarker( - ReactMarkerConstants.RELOAD, - getDevSettings().getPackagerConnectionSettings().getDebugServerHost()); + } - // dismiss redbox if exists - hideRedboxDialog(); + private void reloadJSInProxyMode() { + // When using js proxy, there is no need to fetch JS bundle as proxy executor will do that + // anyway + getDevServerHelper().launchJSDevtools(); + JavaJSExecutor.Factory factory = new JavaJSExecutor.Factory() { + + @Override + public JavaJSExecutor create() throws Exception { + WebsocketJavaScriptExecutor executor = new WebsocketJavaScriptExecutor(); + SimpleSettableFuture future = new SimpleSettableFuture<>(); + executor.connect(getDevServerHelper().getWebsocketProxyURL(), getExecutorConnectCallback(future)); + // TODO(t9349129) Don't use timeout + try { + future.get(90, TimeUnit.SECONDS); + return executor; + } catch (ExecutionException e) { + throw (Exception) e.getCause(); + } catch (InterruptedException | TimeoutException e) { + throw new RuntimeException(e); + } + } + }; + getReactInstanceDevHelper().onReloadWithJSDebugger(factory); + } - if (getDevSettings().isRemoteJSDebugEnabled()) { - PrinterHolder.getPrinter() - .logMessage(ReactDebugOverlayTags.RN_CORE, "RNCore: load from Proxy"); - showDevLoadingViewForRemoteJSEnabled(); - reloadJSInProxyMode(); - } else { - PrinterHolder.getPrinter() - .logMessage(ReactDebugOverlayTags.RN_CORE, "RNCore: load from Server"); - String bundleURL = - getDevServerHelper() - .getDevServerBundleURL(Assertions.assertNotNull(getJSAppBundleName())); - reloadJSFromServer(bundleURL); + @Override + public void handleReloadJS() { + UiThreadUtil.assertOnUiThread(); + ReactMarker.logMarker(ReactMarkerConstants.RELOAD, getDevSettings().getPackagerConnectionSettings().getDebugServerHost()); + // dismiss redbox if exists + hideRedboxDialog(); + if (getDevSettings().isRemoteJSDebugEnabled()) { + PrinterHolder.getPrinter().logMessage(ReactDebugOverlayTags.RN_CORE, "RNCore: load from Proxy"); + showDevLoadingViewForRemoteJSEnabled(); + reloadJSInProxyMode(); + } else { + PrinterHolder.getPrinter().logMessage(ReactDebugOverlayTags.RN_CORE, "RNCore: load from Server"); + String bundleURL = getDevServerHelper().getDevServerBundleURL(Assertions.assertNotNull(getJSAppBundleName())); + reloadJSFromServer(bundleURL); + } } - } - /** Starts of stops the sampling profiler */ - private void toggleJSSamplingProfiler() { - JavaScriptExecutorFactory javaScriptExecutorFactory = - getReactInstanceDevHelper().getJavaScriptExecutorFactory(); - if (!mIsSamplingProfilerEnabled) { - try { - javaScriptExecutorFactory.startSamplingProfiler(); - Toast.makeText(getApplicationContext(), "Starting Sampling Profiler", Toast.LENGTH_SHORT) - .show(); - } catch (UnsupportedOperationException e) { - Toast.makeText( - getApplicationContext(), - javaScriptExecutorFactory.toString() + " does not support Sampling Profiler", - Toast.LENGTH_LONG) - .show(); - } finally { - mIsSamplingProfilerEnabled = true; - } - } else { - try { - final String outputPath = - File.createTempFile( - "sampling-profiler-trace", ".cpuprofile", getApplicationContext().getCacheDir()) - .getPath(); - javaScriptExecutorFactory.stopSamplingProfiler(outputPath); - Toast.makeText( - getApplicationContext(), - "Saved results from Profiler to " + outputPath, - Toast.LENGTH_LONG) - .show(); - } catch (IOException e) { - FLog.e( - ReactConstants.TAG, - "Could not create temporary file for saving results from Sampling Profiler"); - } catch (UnsupportedOperationException e) { - Toast.makeText( - getApplicationContext(), - javaScriptExecutorFactory.toString() + "does not support Sampling Profiler", - Toast.LENGTH_LONG) - .show(); - } finally { - mIsSamplingProfilerEnabled = false; - } + /** Starts of stops the sampling profiler */ + private void toggleJSSamplingProfiler() { + JavaScriptExecutorFactory javaScriptExecutorFactory = getReactInstanceDevHelper().getJavaScriptExecutorFactory(); + if (!mIsSamplingProfilerEnabled) { + try { + javaScriptExecutorFactory.startSamplingProfiler(); + Toast.makeText(getApplicationContext(), "Starting Sampling Profiler", Toast.LENGTH_SHORT).show(); + } catch (UnsupportedOperationException e) { + Toast.makeText(getApplicationContext(), javaScriptExecutorFactory.toString() + " does not support Sampling Profiler", Toast.LENGTH_LONG).show(); + } finally { + mIsSamplingProfilerEnabled = true; + } + } else { + try { + final String outputPath = File.createTempFile("sampling-profiler-trace", ".cpuprofile", getApplicationContext().getCacheDir()).getPath(); + javaScriptExecutorFactory.stopSamplingProfiler(outputPath); + Toast.makeText(getApplicationContext(), "Saved results from Profiler to " + outputPath, Toast.LENGTH_LONG).show(); + } catch (IOException e) { + FLog.e(ReactConstants.TAG, "Could not create temporary file for saving results from Sampling Profiler"); + } catch (UnsupportedOperationException e) { + Toast.makeText(getApplicationContext(), javaScriptExecutorFactory.toString() + "does not support Sampling Profiler", Toast.LENGTH_LONG).show(); + } finally { + mIsSamplingProfilerEnabled = false; + } + } } - } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java index c465e63cb3d5..c728088f86c8 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.devsupport; import android.content.Context; @@ -19,117 +18,133 @@ * {@link com.facebook.react.devsupport}. For accessing some of the settings by external modules * this class implements an external interface {@link DeveloperSettings}. */ -class DevInternalSettings - implements DeveloperSettings, SharedPreferences.OnSharedPreferenceChangeListener { - - private static final String PREFS_FPS_DEBUG_KEY = "fps_debug"; - private static final String PREFS_JS_DEV_MODE_DEBUG_KEY = "js_dev_mode_debug"; - private static final String PREFS_JS_MINIFY_DEBUG_KEY = "js_minify_debug"; - private static final String PREFS_ANIMATIONS_DEBUG_KEY = "animations_debug"; - private static final String PREFS_INSPECTOR_DEBUG_KEY = "inspector_debug"; - private static final String PREFS_HOT_MODULE_REPLACEMENT_KEY = "hot_module_replacement"; - private static final String PREFS_REMOTE_JS_DEBUG_KEY = "remote_js_debug"; - private static final String PREFS_START_SAMPLING_PROFILER_ON_INIT = - "start_sampling_profiler_on_init"; - - private final SharedPreferences mPreferences; - private final Listener mListener; - private final PackagerConnectionSettings mPackagerConnectionSettings; - - public DevInternalSettings(Context applicationContext, Listener listener) { - mListener = listener; - mPreferences = PreferenceManager.getDefaultSharedPreferences(applicationContext); - mPreferences.registerOnSharedPreferenceChangeListener(this); - mPackagerConnectionSettings = new PackagerConnectionSettings(applicationContext); - } +public class DevInternalSettings implements DeveloperSettings, SharedPreferences.OnSharedPreferenceChangeListener { - @Override - public boolean isFpsDebugEnabled() { - return mPreferences.getBoolean(PREFS_FPS_DEBUG_KEY, false); - } + public static String PREFS_FPS_DEBUG_KEY = "fps_debug"; - @Override - public boolean isAnimationFpsDebugEnabled() { - return mPreferences.getBoolean(PREFS_ANIMATIONS_DEBUG_KEY, false); - } + public static String PREFS_JS_DEV_MODE_DEBUG_KEY = "js_dev_mode_debug"; - @Override - public boolean isJSDevModeEnabled() { - return mPreferences.getBoolean(PREFS_JS_DEV_MODE_DEBUG_KEY, true); - } + public static String PREFS_JS_MINIFY_DEBUG_KEY = "js_minify_debug"; - @Override - public boolean isJSMinifyEnabled() { - return mPreferences.getBoolean(PREFS_JS_MINIFY_DEBUG_KEY, false); - } + public static String PREFS_ANIMATIONS_DEBUG_KEY = "animations_debug"; + + public static String PREFS_INSPECTOR_DEBUG_KEY = "inspector_debug"; - @Override - public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { - if (mListener != null) { - if (PREFS_FPS_DEBUG_KEY.equals(key) - || PREFS_JS_DEV_MODE_DEBUG_KEY.equals(key) - || PREFS_START_SAMPLING_PROFILER_ON_INIT.equals(key) - || PREFS_JS_MINIFY_DEBUG_KEY.equals(key)) { - mListener.onInternalSettingsChanged(); - } + public static String PREFS_HOT_MODULE_REPLACEMENT_KEY = "hot_module_replacement"; + + public static String PREFS_REMOTE_JS_DEBUG_KEY = "remote_js_debug"; + + public static String PREFS_START_SAMPLING_PROFILER_ON_INIT = "start_sampling_profiler_on_init"; + + public final SharedPreferences mPreferences; + + public final Listener mListener; + + public final PackagerConnectionSettings mPackagerConnectionSettings; + + public DevInternalSettings(Context applicationContext, Listener listener) { + mListener = listener; + mPreferences = PreferenceManager.getDefaultSharedPreferences(applicationContext); + mPreferences.registerOnSharedPreferenceChangeListener(this); + mPackagerConnectionSettings = new PackagerConnectionSettings(applicationContext); } - } - @Override - public boolean isElementInspectorEnabled() { - return mPreferences.getBoolean(PREFS_INSPECTOR_DEBUG_KEY, false); - } + @Override + public boolean isFpsDebugEnabled() { + return mPreferences.getBoolean(PREFS_FPS_DEBUG_KEY, false); + } - @Override - public boolean isDeviceDebugEnabled() { - return ReactBuildConfig.DEBUG; - } + @Override + public boolean isAnimationFpsDebugEnabled() { + return mPreferences.getBoolean(PREFS_ANIMATIONS_DEBUG_KEY, false); + } - @Override - public boolean isRemoteJSDebugEnabled() { - return mPreferences.getBoolean(PREFS_REMOTE_JS_DEBUG_KEY, false); - } + @Override + public boolean isJSDevModeEnabled() { + return mPreferences.getBoolean(PREFS_JS_DEV_MODE_DEBUG_KEY, true); + } - @Override - public void setRemoteJSDebugEnabled(boolean remoteJSDebugEnabled) { - mPreferences.edit().putBoolean(PREFS_REMOTE_JS_DEBUG_KEY, remoteJSDebugEnabled).apply(); - } + @Override + public boolean isJSMinifyEnabled() { + return mPreferences.getBoolean(PREFS_JS_MINIFY_DEBUG_KEY, false); + } - @Override - public boolean isStartSamplingProfilerOnInit() { - return mPreferences.getBoolean(PREFS_START_SAMPLING_PROFILER_ON_INIT, false); - } + @Override + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + if (mListener != null) { + if (PREFS_FPS_DEBUG_KEY.equals(key) || PREFS_JS_DEV_MODE_DEBUG_KEY.equals(key) || PREFS_START_SAMPLING_PROFILER_ON_INIT.equals(key) || PREFS_JS_MINIFY_DEBUG_KEY.equals(key)) { + mListener.onInternalSettingsChanged(); + } + } + } - @Override - public void addMenuItem(String title) { + @Override + public boolean isElementInspectorEnabled() { + return mPreferences.getBoolean(PREFS_INSPECTOR_DEBUG_KEY, false); + } + + @Override + public boolean isDeviceDebugEnabled() { + return ReactBuildConfig.DEBUG; + } + + @Override + public boolean isRemoteJSDebugEnabled() { + return mPreferences.getBoolean(PREFS_REMOTE_JS_DEBUG_KEY, false); + } + + @Override + public void setRemoteJSDebugEnabled(boolean remoteJSDebugEnabled) { + mPreferences.edit().putBoolean(PREFS_REMOTE_JS_DEBUG_KEY, remoteJSDebugEnabled).apply(); + } + + @Override + public boolean isStartSamplingProfilerOnInit() { + return mPreferences.getBoolean(PREFS_START_SAMPLING_PROFILER_ON_INIT, false); + } + + @Override + public void addMenuItem(String title) { // Not supported. - } + } - void setElementInspectorEnabled(boolean enabled) { - mPreferences.edit().putBoolean(PREFS_INSPECTOR_DEBUG_KEY, enabled).apply(); - } + void setElementInspectorEnabled(boolean enabled) { + mPreferences.edit().putBoolean(PREFS_INSPECTOR_DEBUG_KEY, enabled).apply(); + } - boolean isHotModuleReplacementEnabled() { - return mPreferences.getBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, true); - } + public boolean isHotModuleReplacementEnabled() { + return mPreferences.getBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, true); + } - void setHotModuleReplacementEnabled(boolean enabled) { - mPreferences.edit().putBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, enabled).apply(); - } + public void setHotModuleReplacementEnabled(boolean enabled) { + mPreferences.edit().putBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, enabled).apply(); + } - void setJSDevModeEnabled(boolean value) { - mPreferences.edit().putBoolean(PREFS_JS_DEV_MODE_DEBUG_KEY, value).apply(); - } + void setJSDevModeEnabled(boolean value) { + mPreferences.edit().putBoolean(PREFS_JS_DEV_MODE_DEBUG_KEY, value).apply(); + } - void setFpsDebugEnabled(boolean enabled) { - mPreferences.edit().putBoolean(PREFS_FPS_DEBUG_KEY, enabled).apply(); - } + void setFpsDebugEnabled(boolean enabled) { + mPreferences.edit().putBoolean(PREFS_FPS_DEBUG_KEY, enabled).apply(); + } - PackagerConnectionSettings getPackagerConnectionSettings() { - return mPackagerConnectionSettings; + public PackagerConnectionSettings getPackagerConnectionSettings() { + return mPackagerConnectionSettings; + } + + public interface Listener { + + void onInternalSettingsChanged(); + } + + public int exponentActivityId = -1; + + public void setExponentActivityId(int value) { + exponentActivityId = value; } - public interface Listener { - void onInternalSettingsChanged(); + public int getExponentActivityId(){ + return exponentActivityId; } + } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java index 8e76c5e2b4d1..71e06e76d4fd 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.devsupport; import android.net.Uri; @@ -62,474 +61,396 @@ * */ public class DevServerHelper { - public static final String RELOAD_APP_EXTRA_JS_PROXY = "jsproxy"; - private static final int HTTP_CONNECT_TIMEOUT_MS = 5000; + public static String RELOAD_APP_EXTRA_JS_PROXY = "jsproxy"; + + public static int HTTP_CONNECT_TIMEOUT_MS = 5000; + + public static String DEBUGGER_MSG_DISABLE = "{ \"id\":1,\"method\":\"Debugger.disable\" }"; + + public interface PackagerCommandListener { + + void onPackagerConnected(); + + void onPackagerDisconnected(); - private static final String DEBUGGER_MSG_DISABLE = "{ \"id\":1,\"method\":\"Debugger.disable\" }"; + void onPackagerReloadCommand(); - public interface PackagerCommandListener { - void onPackagerConnected(); + void onPackagerDevMenuCommand(); - void onPackagerDisconnected(); + void onCaptureHeapCommand(final Responder responder); - void onPackagerReloadCommand(); + // Allow apps to provide listeners for custom packager commands. + @Nullable + Map customCommandHandlers(); + } + + private enum BundleType { + + BUNDLE("bundle"), MAP("map"); - void onPackagerDevMenuCommand(); + public final String mTypeID; - void onCaptureHeapCommand(final Responder responder); + BundleType(String typeID) { + mTypeID = typeID; + } + + public String typeID() { + return mTypeID; + } + } + + public final DeveloperSettings mSettings; + + public final PackagerConnectionSettings mPackagerConnectionSettings; + + public final OkHttpClient mClient; + + public final BundleDownloader mBundleDownloader; + + public final PackagerStatusCheck mPackagerStatusCheck; + + public final String mPackageName; + + public boolean mPackagerConnectionLock = false; - // Allow apps to provide listeners for custom packager commands. @Nullable - Map customCommandHandlers(); - } - - private enum BundleType { - BUNDLE("bundle"), - MAP("map"); - - private final String mTypeID; - - BundleType(String typeID) { - mTypeID = typeID; - } - - public String typeID() { - return mTypeID; - } - } - - private final DeveloperSettings mSettings; - - private final PackagerConnectionSettings mPackagerConnectionSettings; - - private final OkHttpClient mClient; - private final BundleDownloader mBundleDownloader; - private final PackagerStatusCheck mPackagerStatusCheck; - private final String mPackageName; - - private boolean mPackagerConnectionLock = false; - private @Nullable JSPackagerClient mPackagerClient; - private @Nullable InspectorPackagerConnection mInspectorPackagerConnection; - private final InspectorPackagerConnection.BundleStatusProvider mBundlerStatusProvider; - - public DevServerHelper( - DeveloperSettings developerSettings, - String packageName, - InspectorPackagerConnection.BundleStatusProvider bundleStatusProvider, - PackagerConnectionSettings packagerConnectionSettings) { - mSettings = developerSettings; - mPackagerConnectionSettings = packagerConnectionSettings; - mBundlerStatusProvider = bundleStatusProvider; - mClient = - new OkHttpClient.Builder() - .connectTimeout(HTTP_CONNECT_TIMEOUT_MS, TimeUnit.MILLISECONDS) - .readTimeout(0, TimeUnit.MILLISECONDS) - .writeTimeout(0, TimeUnit.MILLISECONDS) - .build(); - mBundleDownloader = new BundleDownloader(mClient); - mPackagerStatusCheck = new PackagerStatusCheck(mClient); - mPackageName = packageName; - } - - public void openPackagerConnection( - final String clientId, final PackagerCommandListener commandListener) { - if (mPackagerClient != null || mPackagerConnectionLock) { - FLog.w(ReactConstants.TAG, "Packager connection already open, nooping."); - return; - } - mPackagerConnectionLock = true; - new AsyncTask() { - @Override - protected JSPackagerClient doInBackground(Void... backgroundParams) { - Map handlers = new HashMap<>(); - handlers.put( - "reload", - new NotificationOnlyHandler() { - @Override - public void onNotification(@Nullable Object params) { - commandListener.onPackagerReloadCommand(); - } - }); - handlers.put( - "devMenu", - new NotificationOnlyHandler() { - @Override - public void onNotification(@Nullable Object params) { - commandListener.onPackagerDevMenuCommand(); - } - }); - handlers.put( - "captureHeap", - new RequestOnlyHandler() { - @Override - public void onRequest(@Nullable Object params, Responder responder) { - commandListener.onCaptureHeapCommand(responder); - } - }); - Map customHandlers = commandListener.customCommandHandlers(); - if (customHandlers != null) { - handlers.putAll(customHandlers); + public JSPackagerClient mPackagerClient; + + @Nullable + public InspectorPackagerConnection mInspectorPackagerConnection; + + public final InspectorPackagerConnection.BundleStatusProvider mBundlerStatusProvider; + + public DevServerHelper(DeveloperSettings developerSettings, String packageName, InspectorPackagerConnection.BundleStatusProvider bundleStatusProvider, PackagerConnectionSettings packagerConnectionSettings) { + mSettings = developerSettings; + mPackagerConnectionSettings = packagerConnectionSettings; + mBundlerStatusProvider = bundleStatusProvider; + mClient = new OkHttpClient.Builder().connectTimeout(HTTP_CONNECT_TIMEOUT_MS, TimeUnit.MILLISECONDS).readTimeout(0, TimeUnit.MILLISECONDS).writeTimeout(0, TimeUnit.MILLISECONDS).build(); + mBundleDownloader = new BundleDownloader(mClient); + mPackagerStatusCheck = new PackagerStatusCheck(mClient); + mPackageName = packageName; + } + + public void openPackagerConnection(final String clientId, final PackagerCommandListener commandListener) { + if (mPackagerClient != null || mPackagerConnectionLock) { + FLog.w(ReactConstants.TAG, "Packager connection already open, nooping."); + return; + } + mPackagerConnectionLock = true; + new AsyncTask() { + + @Override + protected JSPackagerClient doInBackground(Void... backgroundParams) { + Map handlers = new HashMap<>(); + handlers.put("reload", new NotificationOnlyHandler() { + + @Override + public void onNotification(@Nullable Object params) { + commandListener.onPackagerReloadCommand(); + } + }); + handlers.put("devMenu", new NotificationOnlyHandler() { + + @Override + public void onNotification(@Nullable Object params) { + commandListener.onPackagerDevMenuCommand(); + } + }); + handlers.put("captureHeap", new RequestOnlyHandler() { + + @Override + public void onRequest(@Nullable Object params, Responder responder) { + commandListener.onCaptureHeapCommand(responder); + } + }); + Map customHandlers = commandListener.customCommandHandlers(); + if (customHandlers != null) { + handlers.putAll(customHandlers); + } + handlers.putAll(new FileIoHandler().handlers()); + ConnectionCallback onPackagerConnectedCallback = new ConnectionCallback() { + + @Override + public void onConnected() { + commandListener.onPackagerConnected(); + } + + @Override + public void onDisconnected() { + commandListener.onPackagerDisconnected(); + } + }; + JSPackagerClient packagerClient = new JSPackagerClient(clientId, mPackagerConnectionSettings, handlers, onPackagerConnectedCallback); + packagerClient.init(); + return packagerClient; + } + + @Override + protected void onPostExecute(JSPackagerClient packagerClient) { + UiThreadUtil.assertOnUiThread(); + mPackagerClient = packagerClient; + mPackagerConnectionLock = false; + } + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + } + + public void closePackagerConnection() { + if (mPackagerConnectionLock) { + FLog.w(ReactConstants.TAG, "Packager connection lock acquired, cannot close current connection."); + return; } - handlers.putAll(new FileIoHandler().handlers()); - - ConnectionCallback onPackagerConnectedCallback = - new ConnectionCallback() { - @Override - public void onConnected() { - commandListener.onPackagerConnected(); - } - - @Override - public void onDisconnected() { - commandListener.onPackagerDisconnected(); - } - }; - - JSPackagerClient packagerClient = - new JSPackagerClient( - clientId, mPackagerConnectionSettings, handlers, onPackagerConnectedCallback); - packagerClient.init(); - - return packagerClient; - } - - @Override - protected void onPostExecute(JSPackagerClient packagerClient) { - UiThreadUtil.assertOnUiThread(); - mPackagerClient = packagerClient; - mPackagerConnectionLock = false; - } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - } - - public void closePackagerConnection() { - if (mPackagerConnectionLock) { - FLog.w(ReactConstants.TAG, "Packager connection lock acquired, cannot close current connection."); - return; - } - mPackagerConnectionLock = true; - new AsyncTask() { - @Override - protected Void doInBackground(JSPackagerClient... params) { - if (params.length > 0 && params[0] != null) { - JSPackagerClient packagerClient = params[0]; - packagerClient.close(); + mPackagerConnectionLock = true; + new AsyncTask() { + + @Override + protected Void doInBackground(JSPackagerClient... params) { + if (params.length > 0 && params[0] != null) { + JSPackagerClient packagerClient = params[0]; + packagerClient.close(); + } + return null; + } + + @Override + protected void onPostExecute(Void result) { + UiThreadUtil.assertOnUiThread(); + mPackagerClient = null; + mPackagerConnectionLock = false; + } + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, mPackagerClient); + } + + public void openInspectorConnection() { + if (mInspectorPackagerConnection != null) { + FLog.w(ReactConstants.TAG, "Inspector connection already open, nooping."); + return; } - return null; - } - - @Override - protected void onPostExecute(Void result) { - UiThreadUtil.assertOnUiThread(); - mPackagerClient = null; - mPackagerConnectionLock = false; - } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, mPackagerClient); - } - - public void openInspectorConnection() { - if (mInspectorPackagerConnection != null) { - FLog.w(ReactConstants.TAG, "Inspector connection already open, nooping."); - return; - } - new AsyncTask() { - @Override - protected Void doInBackground(Void... params) { - mInspectorPackagerConnection = - new InspectorPackagerConnection( - getInspectorDeviceUrl(), mPackageName, mBundlerStatusProvider); - mInspectorPackagerConnection.connect(); - return null; - } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - } - - public void disableDebugger() { - if (mInspectorPackagerConnection != null) { - mInspectorPackagerConnection.sendEventToAllConnections(DEBUGGER_MSG_DISABLE); - } - } - - public void closeInspectorConnection() { - new AsyncTask() { - @Override - protected Void doInBackground(Void... params) { + new AsyncTask() { + + @Override + protected Void doInBackground(Void... params) { + mInspectorPackagerConnection = new InspectorPackagerConnection(getInspectorDeviceUrl(), mPackageName, mBundlerStatusProvider); + mInspectorPackagerConnection.connect(); + return null; + } + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + } + + public void disableDebugger() { if (mInspectorPackagerConnection != null) { - mInspectorPackagerConnection.closeQuietly(); - mInspectorPackagerConnection = null; + mInspectorPackagerConnection.sendEventToAllConnections(DEBUGGER_MSG_DISABLE); + } + } + + public void closeInspectorConnection() { + new AsyncTask() { + + @Override + protected Void doInBackground(Void... params) { + if (mInspectorPackagerConnection != null) { + mInspectorPackagerConnection.closeQuietly(); + mInspectorPackagerConnection = null; + } + return null; + } + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + } + + public String getWebsocketProxyURL() { + return String.format(Locale.US, "ws://%s/debugger-proxy?role=client", mPackagerConnectionSettings.getDebugServerHost()); + } + + private static String getSHA256(String string) { + MessageDigest digest = null; + try { + digest = MessageDigest.getInstance("SHA-256"); + } catch (NoSuchAlgorithmException e) { + throw new AssertionError("Could not get standard SHA-256 algorithm", e); + } + digest.reset(); + byte[] result; + try { + result = digest.digest(string.getBytes("UTF-8")); + } catch (UnsupportedEncodingException e) { + throw new AssertionError("This environment doesn't support UTF-8 encoding", e); + } + return String.format("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7], result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15], result[16], result[17], result[18], result[19]); + } + + // Returns an opaque ID which is stable for the current combination of device and app, stable + // across installs, and unique across devices. + private String getInspectorDeviceId() { + // Every Android app has a unique application ID that looks like a Java or Kotlin package name, + // such as com.example.myapp. This ID uniquely identifies your app on the device and in the + // Google Play Store. + // [Source: Android docs] + String packageName = mPackageName; + // A 64-bit number expressed as a hexadecimal string, which is either: + // * unique to each combination of app-signing key, user, and device (API level >= 26), or + // * randomly generated when the user first sets up the device and should remain constant for + // the lifetime of the user's device (API level < 26). + // [Source: Android docs] + String androidId = Settings.Secure.ANDROID_ID; + String rawDeviceId = String.format(Locale.US, "android-%s-%s", packageName, androidId); + return getSHA256(rawDeviceId); + } + + private String getInspectorDeviceUrl() { + return String.format(Locale.US, "http://%s/inspector/device?name=%s&app=%s&device=%s", mPackagerConnectionSettings.getInspectorServerHost(), Uri.encode(AndroidInfoHelpers.getFriendlyDeviceName()), Uri.encode(mPackageName), Uri.encode(getInspectorDeviceId())); + } + + public void downloadBundleFromURL(DevBundleDownloadListener callback, File outputFile, String bundleURL, BundleDownloader.BundleInfo bundleInfo) { + mBundleDownloader.downloadBundleFromURL(callback, outputFile, bundleURL, bundleInfo); + } + + public void downloadBundleFromURL(DevBundleDownloadListener callback, File outputFile, String bundleURL, BundleDownloader.BundleInfo bundleInfo, Request.Builder requestBuilder) { + mBundleDownloader.downloadBundleFromURL(callback, outputFile, bundleURL, bundleInfo, requestBuilder); + } + + /** @return the host to use when connecting to the bundle server from the host itself. */ + private String getHostForJSProxy() { + // Use custom port if configured. Note that host stays "localhost". + String host = Assertions.assertNotNull(mPackagerConnectionSettings.getDebugServerHost()); + int portOffset = host.lastIndexOf(':'); + if (portOffset > -1) { + return "localhost" + host.substring(portOffset); + } else { + return AndroidInfoHelpers.DEVICE_LOCALHOST; + } + } + + /** @return whether we should enable dev mode when requesting JS bundles. */ + private boolean getDevMode() { + return mSettings.isJSDevModeEnabled(); + } + + /** @return whether we should request minified JS bundles. */ + private boolean getJSMinifyMode() { + return mSettings.isJSMinifyEnabled(); + } + + private String createBundleURL(String mainModuleID, BundleType type, String host) { + try { + return (String) Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("getBundleUrlForActivityId", int.class, String.class, String.class, String.class, boolean.class, boolean.class).invoke(null, mSettings.getExponentActivityId(), host, mainModuleID, type.typeID(), getDevMode(), getJSMinifyMode()); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + return null; + } + } + + private String createSplitBundleURL(String mainModuleID, String host) { + return createBundleURL(mainModuleID, BundleType.BUNDLE, host, true, false); + } + + private String createBundleURL(String mainModuleID, BundleType type, String host, boolean modulesOnly, boolean runModule) { + try { + return (String) Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("getBundleUrlForActivityId", int.class, String.class, String.class, String.class, boolean.class, boolean.class).invoke(null, mSettings.getExponentActivityId(), host, mainModuleID, type.typeID(), getDevMode(), getJSMinifyMode()); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + return null; + } + } + + private String createBundleURL(String mainModuleID, BundleType type) { + return createBundleURL(mainModuleID, type, mPackagerConnectionSettings.getDebugServerHost()); + } + + private static String createResourceURL(String host, String resourcePath) { + return String.format(Locale.US, "http://%s/%s", host, resourcePath); + } + + public String getDevServerBundleURL(final String jsModulePath) { + return createBundleURL(jsModulePath, BundleType.BUNDLE, mPackagerConnectionSettings.getDebugServerHost()); + } + + public String getDevServerSplitBundleURL(String jsModulePath) { + return createSplitBundleURL(jsModulePath, mPackagerConnectionSettings.getDebugServerHost()); + } + + public void isPackagerRunning(final PackagerStatusCallback callback) { + String host = mPackagerConnectionSettings.getDebugServerHost(); + if (host == null) { + FLog.w(ReactConstants.TAG, "No packager host configured."); + callback.onPackagerStatusFetched(false); + } else { + mPackagerStatusCheck.run(host, callback); } - return null; - } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - } - - public String getWebsocketProxyURL() { - return String.format( - Locale.US, - "ws://%s/debugger-proxy?role=client", - mPackagerConnectionSettings.getDebugServerHost()); - } - - private static String getSHA256(String string) { - MessageDigest digest = null; - try { - digest = MessageDigest.getInstance("SHA-256"); - } catch (NoSuchAlgorithmException e) { - throw new AssertionError("Could not get standard SHA-256 algorithm", e); - } - digest.reset(); - byte[] result; - try { - result = digest.digest(string.getBytes("UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new AssertionError("This environment doesn't support UTF-8 encoding", e); - } - return String.format( - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - result[0], - result[1], - result[2], - result[3], - result[4], - result[5], - result[6], - result[7], - result[8], - result[9], - result[10], - result[11], - result[12], - result[13], - result[14], - result[15], - result[16], - result[17], - result[18], - result[19]); - } - - // Returns an opaque ID which is stable for the current combination of device and app, stable - // across installs, and unique across devices. - private String getInspectorDeviceId() { - // Every Android app has a unique application ID that looks like a Java or Kotlin package name, - // such as com.example.myapp. This ID uniquely identifies your app on the device and in the - // Google Play Store. - // [Source: Android docs] - String packageName = mPackageName; - - // A 64-bit number expressed as a hexadecimal string, which is either: - // * unique to each combination of app-signing key, user, and device (API level >= 26), or - // * randomly generated when the user first sets up the device and should remain constant for - // the lifetime of the user's device (API level < 26). - // [Source: Android docs] - String androidId = Settings.Secure.ANDROID_ID; - - String rawDeviceId = String.format(Locale.US, "android-%s-%s", packageName, androidId); - - return getSHA256(rawDeviceId); - } - - private String getInspectorDeviceUrl() { - return String.format( - Locale.US, - "http://%s/inspector/device?name=%s&app=%s&device=%s", - mPackagerConnectionSettings.getInspectorServerHost(), - Uri.encode(AndroidInfoHelpers.getFriendlyDeviceName()), - Uri.encode(mPackageName), - Uri.encode(getInspectorDeviceId())); - } - - public void downloadBundleFromURL( - DevBundleDownloadListener callback, - File outputFile, - String bundleURL, - BundleDownloader.BundleInfo bundleInfo) { - mBundleDownloader.downloadBundleFromURL(callback, outputFile, bundleURL, bundleInfo); - } - - public void downloadBundleFromURL( - DevBundleDownloadListener callback, - File outputFile, - String bundleURL, - BundleDownloader.BundleInfo bundleInfo, - Request.Builder requestBuilder) { - mBundleDownloader.downloadBundleFromURL( - callback, outputFile, bundleURL, bundleInfo, requestBuilder); - } - - /** @return the host to use when connecting to the bundle server from the host itself. */ - private String getHostForJSProxy() { - // Use custom port if configured. Note that host stays "localhost". - String host = Assertions.assertNotNull(mPackagerConnectionSettings.getDebugServerHost()); - int portOffset = host.lastIndexOf(':'); - if (portOffset > -1) { - return "localhost" + host.substring(portOffset); - } else { - return AndroidInfoHelpers.DEVICE_LOCALHOST; - } - } - - /** @return whether we should enable dev mode when requesting JS bundles. */ - private boolean getDevMode() { - return mSettings.isJSDevModeEnabled(); - } - - /** @return whether we should request minified JS bundles. */ - private boolean getJSMinifyMode() { - return mSettings.isJSMinifyEnabled(); - } - - private String createBundleURL(String mainModuleID, BundleType type, String host) { - return createBundleURL(mainModuleID, type, host, false, true); - } - - private String createSplitBundleURL(String mainModuleID, String host) { - return createBundleURL(mainModuleID, BundleType.BUNDLE, host, true, false); - } - - private String createBundleURL( - String mainModuleID, BundleType type, String host, boolean modulesOnly, boolean runModule) { - boolean dev = getDevMode(); - return String.format( - Locale.US, - "http://%s/%s.%s?platform=android&dev=%s&lazy=%s&minify=%s&app=%s&modulesOnly=%s&runModule=%s", - host, - mainModuleID, - type.typeID(), - dev, // dev - dev, // lazy - getJSMinifyMode(), - mPackageName, - modulesOnly ? "true" : "false", - runModule ? "true" : "false"); - } - - private String createBundleURL(String mainModuleID, BundleType type) { - return createBundleURL(mainModuleID, type, mPackagerConnectionSettings.getDebugServerHost()); - } - - private static String createResourceURL(String host, String resourcePath) { - return String.format(Locale.US, "http://%s/%s", host, resourcePath); - } - - public String getDevServerBundleURL(final String jsModulePath) { - return createBundleURL( - jsModulePath, BundleType.BUNDLE, mPackagerConnectionSettings.getDebugServerHost()); - } - - public String getDevServerSplitBundleURL(String jsModulePath) { - return createSplitBundleURL(jsModulePath, mPackagerConnectionSettings.getDebugServerHost()); - } - - public void isPackagerRunning(final PackagerStatusCallback callback) { - String host = mPackagerConnectionSettings.getDebugServerHost(); - if (host == null) { - FLog.w(ReactConstants.TAG, "No packager host configured."); - callback.onPackagerStatusFetched(false); - } else { - mPackagerStatusCheck.run(host, callback); - } - } - - private String createLaunchJSDevtoolsCommandUrl() { - return String.format( - Locale.US, - "http://%s/launch-js-devtools", - mPackagerConnectionSettings.getDebugServerHost()); - } - - public void launchJSDevtools() { - Request request = new Request.Builder().url(createLaunchJSDevtoolsCommandUrl()).build(); - mClient - .newCall(request) - .enqueue( - new Callback() { - @Override - public void onFailure(@NonNull Call call, @NonNull IOException e) { - // ignore HTTP call response, this is just to open a debugger page and there is no - // reason to report failures from here - } - - @Override - public void onResponse(@NonNull Call call, @NonNull Response response) { - // ignore HTTP call response - see above - } - }); - } - - public String getSourceMapUrl(String mainModuleName) { - return createBundleURL(mainModuleName, BundleType.MAP); - } - - public String getSourceUrl(String mainModuleName) { - return createBundleURL(mainModuleName, BundleType.BUNDLE); - } - - public String getJSBundleURLForRemoteDebugging(String mainModuleName) { - // The host we use when connecting to the JS bundle server from the emulator is not the - // same as the one needed to connect to the same server from the JavaScript proxy running on the - // host itself. - return createBundleURL(mainModuleName, BundleType.BUNDLE, getHostForJSProxy()); - } - - /** + } + + private String createLaunchJSDevtoolsCommandUrl() { + return String.format(Locale.US, "http://%s/launch-js-devtools", mPackagerConnectionSettings.getDebugServerHost()); + } + + public void launchJSDevtools() { + Request request = new Request.Builder().url(createLaunchJSDevtoolsCommandUrl()).build(); + mClient.newCall(request).enqueue(new Callback() { + + @Override + public void onFailure(@NonNull Call call, @NonNull IOException e) { + // ignore HTTP call response, this is just to open a debugger page and there is no + // reason to report failures from here + } + + @Override + public void onResponse(@NonNull Call call, @NonNull Response response) { + // ignore HTTP call response - see above + } + }); + } + + public String getSourceMapUrl(String mainModuleName) { + return createBundleURL(mainModuleName, BundleType.MAP); + } + + public String getSourceUrl(String mainModuleName) { + return createBundleURL(mainModuleName, BundleType.BUNDLE); + } + + public String getJSBundleURLForRemoteDebugging(String mainModuleName) { + // host itself. + return createBundleURL(mainModuleName, BundleType.BUNDLE, getHostForJSProxy()); + } + + /** * This is a debug-only utility to allow fetching a file via packager. It's made synchronous for * simplicity, but should only be used if it's absolutely necessary. * * @return the file with the fetched content, or null if there's any failure. */ - public @Nullable File downloadBundleResourceFromUrlSync( - final String resourcePath, final File outputFile) { - final String resourceURL = - createResourceURL(mPackagerConnectionSettings.getDebugServerHost(), resourcePath); - final Request request = new Request.Builder().url(resourceURL).build(); - - try (Response response = mClient.newCall(request).execute()) { - if (!response.isSuccessful()) { - return null; - } - - try (Sink output = Okio.sink(outputFile)) { - Okio.buffer(response.body().source()).readAll(output); - } - - return outputFile; - } catch (Exception ex) { - FLog.e( - ReactConstants.TAG, - "Failed to fetch resource synchronously - resourcePath: \"%s\", outputFile: \"%s\"", - resourcePath, - outputFile.getAbsolutePath(), - ex); - return null; - } - } - - /** Attempt to open the JS debugger on the host machine (on-device CDP debugging). */ - public void openDebugger(final ReactContext context, final String errorMessage) { - // TODO(huntie): Requests to dev server should not assume 'http' URL scheme - String requestUrl = - String.format( - Locale.US, - "http://%s/open-debugger?appId=%s&device=%s", - mPackagerConnectionSettings.getInspectorServerHost(), - Uri.encode(mPackageName), - Uri.encode(getInspectorDeviceId())); - Request request = - new Request.Builder().url(requestUrl).method("POST", RequestBody.create(null, "")).build(); - - mClient - .newCall(request) - .enqueue( - new Callback() { - @Override - public void onFailure(@NonNull Call _call, @NonNull IOException _e) { + @Nullable + public File downloadBundleResourceFromUrlSync(final String resourcePath, final File outputFile) { + final String resourceURL = createResourceURL(mPackagerConnectionSettings.getDebugServerHost(), resourcePath); + final Request request = new Request.Builder().url(resourceURL).build(); + try (Response response = mClient.newCall(request).execute()) { + if (!response.isSuccessful()) { + return null; + } + try (Sink output = Okio.sink(outputFile)) { + Okio.buffer(response.body().source()).readAll(output); + } + return outputFile; + } catch (Exception ex) { + FLog.e(ReactConstants.TAG, "Failed to fetch resource synchronously - resourcePath: \"%s\", outputFile: \"%s\"", resourcePath, outputFile.getAbsolutePath(), ex); + return null; + } + } + + /** Attempt to open the JS debugger on the host machine (on-device CDP debugging). */ + public void openDebugger(final ReactContext context, final String errorMessage) { + // TODO(huntie): Requests to dev server should not assume 'http' URL scheme + String requestUrl = String.format(Locale.US, "http://%s/open-debugger?appId=%s&device=%s", mPackagerConnectionSettings.getInspectorServerHost(), Uri.encode(mPackageName), Uri.encode(getInspectorDeviceId())); + Request request = new Request.Builder().url(requestUrl).method("POST", RequestBody.create(null, "")).build(); + mClient.newCall(request).enqueue(new Callback() { + + @Override + public void onFailure(@NonNull Call _call, @NonNull IOException _e) { RNLog.w(context, errorMessage); - } + } - @Override - public void onResponse(@NonNull Call _call, @NonNull Response _response) {} - }); - } + @Override + public void onResponse(@NonNull Call _call, @NonNull Response _response) { + } + }); + } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index 854f981d1bd2..90ef03b8b37c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.devsupport; import android.app.Activity; @@ -69,1103 +68,934 @@ public abstract class DevSupportManagerBase implements DevSupportManager { - public interface CallbackWithBundleLoader { - void onSuccess(JSBundleLoader bundleLoader); - - void onError(String url, Throwable cause); - } - - private static final int JAVA_ERROR_COOKIE = -1; - private static final int JSEXCEPTION_ERROR_COOKIE = -1; - private static final String RELOAD_APP_ACTION_SUFFIX = ".RELOAD_APP_ACTION"; - private static final String EXOPACKAGE_LOCATION_FORMAT = - "/data/local/tmp/exopackage/%s//secondary-dex"; - - private final Context mApplicationContext; - private final ShakeDetector mShakeDetector; - private final BroadcastReceiver mReloadAppBroadcastReceiver; - private final DevServerHelper mDevServerHelper; - private final LinkedHashMap mCustomDevOptions = new LinkedHashMap<>(); - private final ReactInstanceDevHelper mReactInstanceDevHelper; - private final @Nullable String mJSAppBundleName; - private final File mJSBundleDownloadedFile; - private final File mJSSplitBundlesDir; - private final DefaultJSExceptionHandler mDefaultJSExceptionHandler; - private final DevLoadingViewManager mDevLoadingViewManager; - - private @Nullable SurfaceDelegate mRedBoxSurfaceDelegate; - private @Nullable AlertDialog mDevOptionsDialog; - private @Nullable DebugOverlayController mDebugOverlayController; - private boolean mDevLoadingViewVisible = false; - private int mPendingJSSplitBundleRequests = 0; - private @Nullable ReactContext mCurrentContext; - private final DevInternalSettings mDevSettings; - private boolean mIsReceiverRegistered = false; - private boolean mIsShakeDetectorStarted = false; - private boolean mIsDevSupportEnabled = false; - private @Nullable final RedBoxHandler mRedBoxHandler; - private @Nullable String mLastErrorTitle; - private @Nullable StackFrame[] mLastErrorStack; - private @Nullable ErrorType mLastErrorType; - private int mLastErrorCookie = 0; - private @Nullable final DevBundleDownloadListener mBundleDownloadListener; - private @Nullable List mErrorCustomizers; - private @Nullable PackagerLocationCustomizer mPackagerLocationCustomizer; - - private final InspectorPackagerConnection.BundleStatus mBundleStatus; - - private @Nullable final Map mCustomPackagerCommandHandlers; - - private @Nullable final SurfaceDelegateFactory mSurfaceDelegateFactory; - - public DevSupportManagerBase( - Context applicationContext, - ReactInstanceDevHelper reactInstanceDevHelper, - @Nullable String packagerPathForJSBundleName, - boolean enableOnCreate, - @Nullable RedBoxHandler redBoxHandler, - @Nullable DevBundleDownloadListener devBundleDownloadListener, - int minNumShakes, - @Nullable Map customPackagerCommandHandlers, - @Nullable SurfaceDelegateFactory surfaceDelegateFactory, - @Nullable DevLoadingViewManager devLoadingViewManager) { - mReactInstanceDevHelper = reactInstanceDevHelper; - mApplicationContext = applicationContext; - mJSAppBundleName = packagerPathForJSBundleName; - mDevSettings = new DevInternalSettings(applicationContext, this::reloadSettings); - mBundleStatus = new InspectorPackagerConnection.BundleStatus(); - mDevServerHelper = - new DevServerHelper( - mDevSettings, - mApplicationContext.getPackageName(), - () -> mBundleStatus, - mDevSettings.getPackagerConnectionSettings()); - mBundleDownloadListener = devBundleDownloadListener; - - // Prepare shake gesture detector (will be started/stopped from #reload) - mShakeDetector = new ShakeDetector(this::showDevOptionsDialog, minNumShakes); - - mCustomPackagerCommandHandlers = customPackagerCommandHandlers; - - // Prepare reload APP broadcast receiver (will be registered/unregistered from #reload) - mReloadAppBroadcastReceiver = - new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - String action = intent.getAction(); - if (getReloadAppAction(context).equals(action)) { - if (intent.getBooleanExtra(DevServerHelper.RELOAD_APP_EXTRA_JS_PROXY, false)) { - mDevSettings.setRemoteJSDebugEnabled(true); - mDevServerHelper.launchJSDevtools(); - } else { - mDevSettings.setRemoteJSDebugEnabled(false); - } - handleReloadJS(); + public interface CallbackWithBundleLoader { + + void onSuccess(JSBundleLoader bundleLoader); + + void onError(String url, Throwable cause); + } + + public static int JAVA_ERROR_COOKIE = -1; + + public static int JSEXCEPTION_ERROR_COOKIE = -1; + + public static String RELOAD_APP_ACTION_SUFFIX = ".RELOAD_APP_ACTION"; + + public static String EXOPACKAGE_LOCATION_FORMAT = "/data/local/tmp/exopackage/%s//secondary-dex"; + + public final Context mApplicationContext; + + public final ShakeDetector mShakeDetector; + + public final BroadcastReceiver mReloadAppBroadcastReceiver; + + public final DevServerHelper mDevServerHelper; + + public final LinkedHashMap mCustomDevOptions = new LinkedHashMap<>(); + + public final ReactInstanceDevHelper mReactInstanceDevHelper; + + @Nullable + public final String mJSAppBundleName; + + public final File mJSBundleDownloadedFile; + + public final File mJSSplitBundlesDir; + + public final DefaultJSExceptionHandler mDefaultJSExceptionHandler; + + public final DevLoadingViewManager mDevLoadingViewManager; + + @Nullable + public SurfaceDelegate mRedBoxSurfaceDelegate; + + @Nullable + public AlertDialog mDevOptionsDialog; + + @Nullable + public DebugOverlayController mDebugOverlayController; + + public boolean mDevLoadingViewVisible = false; + + public int mPendingJSSplitBundleRequests = 0; + + @Nullable + public ReactContext mCurrentContext; + + public final DevInternalSettings mDevSettings; + + public boolean mIsReceiverRegistered = false; + + public boolean mIsShakeDetectorStarted = false; + + public boolean mIsDevSupportEnabled = false; + + @Nullable + public final RedBoxHandler mRedBoxHandler; + + @Nullable + public String mLastErrorTitle; + + @Nullable + public StackFrame[] mLastErrorStack; + + @Nullable + public ErrorType mLastErrorType; + + public int mLastErrorCookie = 0; + + @Nullable + public final DevBundleDownloadListener mBundleDownloadListener; + + @Nullable + public List mErrorCustomizers; + + @Nullable + public PackagerLocationCustomizer mPackagerLocationCustomizer; + + public final InspectorPackagerConnection.BundleStatus mBundleStatus; + + @Nullable + public final Map mCustomPackagerCommandHandlers; + + @Nullable + public final SurfaceDelegateFactory mSurfaceDelegateFactory; + + public DevSupportManagerBase(Context applicationContext, ReactInstanceDevHelper reactInstanceDevHelper, @Nullable String packagerPathForJSBundleName, boolean enableOnCreate, @Nullable RedBoxHandler redBoxHandler, @Nullable DevBundleDownloadListener devBundleDownloadListener, int minNumShakes, @Nullable Map customPackagerCommandHandlers, @Nullable SurfaceDelegateFactory surfaceDelegateFactory, @Nullable DevLoadingViewManager devLoadingViewManager) { + mReactInstanceDevHelper = reactInstanceDevHelper; + mApplicationContext = applicationContext; + mJSAppBundleName = packagerPathForJSBundleName; + mDevSettings = new DevInternalSettings(applicationContext, this::reloadSettings); + mBundleStatus = new InspectorPackagerConnection.BundleStatus(); + mDevServerHelper = new DevServerHelper(mDevSettings, mApplicationContext.getPackageName(), () -> mBundleStatus, mDevSettings.getPackagerConnectionSettings()); + mBundleDownloadListener = devBundleDownloadListener; + // Prepare shake gesture detector (will be started/stopped from #reload) + mShakeDetector = new ShakeDetector(this::showDevOptionsDialog, minNumShakes); + mCustomPackagerCommandHandlers = customPackagerCommandHandlers; + // Prepare reload APP broadcast receiver (will be registered/unregistered from #reload) + mReloadAppBroadcastReceiver = new BroadcastReceiver() { + + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (getReloadAppAction(context).equals(action)) { + if (intent.getBooleanExtra(DevServerHelper.RELOAD_APP_EXTRA_JS_PROXY, false)) { + mDevSettings.setRemoteJSDebugEnabled(true); + mDevServerHelper.launchJSDevtools(); + } else { + mDevSettings.setRemoteJSDebugEnabled(false); + } + handleReloadJS(); + } } - } }; + // We store JS bundle loaded from dev server in a single destination in app's data dir. + // In case when someone schedule 2 subsequent reloads it may happen that JS thread will + // start reading first reload output while the second reload starts writing to the same + // file. As this should only be the case in dev mode we leave it as it is. + // TODO(6418010): Fix readers-writers problem in debug reload from HTTP server + final String subclassTag = getUniqueTag(); + final String bundleFile = subclassTag + "ReactNativeDevBundle.js"; + mJSBundleDownloadedFile = new File(applicationContext.getFilesDir(), bundleFile); + final String splitBundlesDir = subclassTag.toLowerCase(Locale.ROOT) + "_dev_js_split_bundles"; + mJSSplitBundlesDir = mApplicationContext.getDir(splitBundlesDir, Context.MODE_PRIVATE); + mDefaultJSExceptionHandler = new DefaultJSExceptionHandler(); + setDevSupportEnabled(enableOnCreate); + mRedBoxHandler = redBoxHandler; + mDevLoadingViewManager = devLoadingViewManager != null ? devLoadingViewManager : new DefaultDevLoadingViewImplementation(reactInstanceDevHelper); + mSurfaceDelegateFactory = surfaceDelegateFactory; + } + + protected abstract String getUniqueTag(); + + @Override + public void handleException(Exception e) { + try { + if (mIsDevSupportEnabled) { + logJSException(e); + } else { + mDefaultJSExceptionHandler.handleException(e); + } + } catch (RuntimeException expoException) { + try { + Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("handleReactNativeError", String.class, Object.class, Integer.class, Boolean.class).invoke(null, expoException.getMessage(), null, -1, true); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + } + } + } + + private void logJSException(Exception e) { + StringBuilder message = new StringBuilder(e.getMessage() == null ? "Exception in native call from JS" : e.getMessage()); + Throwable cause = e.getCause(); + while (cause != null) { + message.append("\n\n").append(cause.getMessage()); + cause = cause.getCause(); + } + if (e instanceof JSException) { + FLog.e(ReactConstants.TAG, "Exception in native call from JS", e); + String stack = ((JSException) e).getStack(); + message.append("\n\n").append(stack); + // TODO #11638796: convert the stack into something useful + showNewError(message.toString(), new StackFrame[] {}, JSEXCEPTION_ERROR_COOKIE, ErrorType.JS); + } else { + showNewJavaError(message.toString(), e); + } + } + + @Override + public void showNewJavaError(@Nullable String message, Throwable e) { + FLog.e(ReactConstants.TAG, "Exception in native call", e); + showNewError(message, StackTraceHelper.convertJavaStackTrace(e), JAVA_ERROR_COOKIE, ErrorType.NATIVE); + } - // We store JS bundle loaded from dev server in a single destination in app's data dir. - // In case when someone schedule 2 subsequent reloads it may happen that JS thread will - // start reading first reload output while the second reload starts writing to the same - // file. As this should only be the case in dev mode we leave it as it is. - // TODO(6418010): Fix readers-writers problem in debug reload from HTTP server - final String subclassTag = getUniqueTag(); - final String bundleFile = subclassTag + "ReactNativeDevBundle.js"; - mJSBundleDownloadedFile = new File(applicationContext.getFilesDir(), bundleFile); - - final String splitBundlesDir = subclassTag.toLowerCase(Locale.ROOT) + "_dev_js_split_bundles"; - mJSSplitBundlesDir = mApplicationContext.getDir(splitBundlesDir, Context.MODE_PRIVATE); - - mDefaultJSExceptionHandler = new DefaultJSExceptionHandler(); - - setDevSupportEnabled(enableOnCreate); - - mRedBoxHandler = redBoxHandler; - mDevLoadingViewManager = - devLoadingViewManager != null - ? devLoadingViewManager - : new DefaultDevLoadingViewImplementation(reactInstanceDevHelper); - mSurfaceDelegateFactory = surfaceDelegateFactory; - }; - - protected abstract String getUniqueTag(); - - @Override - public void handleException(Exception e) { - if (mIsDevSupportEnabled) { - logJSException(e); - } else { - mDefaultJSExceptionHandler.handleException(e); - } - } - - private void logJSException(Exception e) { - StringBuilder message = - new StringBuilder( - e.getMessage() == null ? "Exception in native call from JS" : e.getMessage()); - Throwable cause = e.getCause(); - while (cause != null) { - message.append("\n\n").append(cause.getMessage()); - cause = cause.getCause(); - } - - if (e instanceof JSException) { - FLog.e(ReactConstants.TAG, "Exception in native call from JS", e); - String stack = ((JSException) e).getStack(); - message.append("\n\n").append(stack); - - // TODO #11638796: convert the stack into something useful - showNewError(message.toString(), new StackFrame[] {}, JSEXCEPTION_ERROR_COOKIE, ErrorType.JS); - } else { - showNewJavaError(message.toString(), e); - } - } - - @Override - public void showNewJavaError(@Nullable String message, Throwable e) { - FLog.e(ReactConstants.TAG, "Exception in native call", e); - showNewError( - message, StackTraceHelper.convertJavaStackTrace(e), JAVA_ERROR_COOKIE, ErrorType.NATIVE); - } - - /** + /** * Add option item to dev settings dialog displayed by this manager. In the case user select given * option from that dialog, the appropriate handler passed as {@param optionHandler} will be * called. */ - @Override - public void addCustomDevOption(String optionName, DevOptionHandler optionHandler) { - mCustomDevOptions.put(optionName, optionHandler); - } - - @Override - public void showNewJSError(String message, ReadableArray details, int errorCookie) { - showNewError(message, StackTraceHelper.convertJsStackTrace(details), errorCookie, ErrorType.JS); - } - - @Override - public void registerErrorCustomizer(ErrorCustomizer errorCustomizer) { - if (mErrorCustomizers == null) { - mErrorCustomizers = new ArrayList<>(); - } - mErrorCustomizers.add(errorCustomizer); - } - - @Override - public Pair processErrorCustomizers(Pair errorInfo) { - if (mErrorCustomizers != null) { - for (ErrorCustomizer errorCustomizer : mErrorCustomizers) { - Pair result = errorCustomizer.customizeErrorInfo(errorInfo); - if (result != null) { - errorInfo = result; + @Override + public void addCustomDevOption(String optionName, DevOptionHandler optionHandler) { + mCustomDevOptions.put(optionName, optionHandler); + } + + @Override + public void showNewJSError(String message, ReadableArray details, int errorCookie) { + showNewError(message, StackTraceHelper.convertJsStackTrace(details), errorCookie, ErrorType.JS); + } + + @Override + public void registerErrorCustomizer(ErrorCustomizer errorCustomizer) { + if (mErrorCustomizers == null) { + mErrorCustomizers = new ArrayList<>(); } - } - } - return errorInfo; - } - - @Override - public void updateJSError( - final String message, final ReadableArray details, final int errorCookie) { - UiThreadUtil.runOnUiThread( - () -> { - // Since we only show the first JS error in a succession of JS errors, make sure we only - // update the error message for that error message. This assumes that updateJSError - // belongs to the most recent showNewJSError - if ((mRedBoxSurfaceDelegate != null && !mRedBoxSurfaceDelegate.isShowing()) - || errorCookie != mLastErrorCookie) { - return; - } + mErrorCustomizers.add(errorCustomizer); + } - // The RedBox surface delegate will always show the latest error - updateLastErrorInfo( - message, StackTraceHelper.convertJsStackTrace(details), errorCookie, ErrorType.JS); - mRedBoxSurfaceDelegate.show(); - }); - } - - @Override - public void hideRedboxDialog() { - if (mRedBoxSurfaceDelegate == null) { - return; - } - - mRedBoxSurfaceDelegate.hide(); - } - - public @Nullable View createRootView(String appKey) { - return mReactInstanceDevHelper.createRootView(appKey); - } - - public void destroyRootView(View rootView) { - mReactInstanceDevHelper.destroyRootView(rootView); - } - - private void hideDevOptionsDialog() { - if (mDevOptionsDialog != null) { - mDevOptionsDialog.dismiss(); - mDevOptionsDialog = null; - } - } - - private void showNewError( - @Nullable final String message, - final StackFrame[] stack, - final int errorCookie, - final ErrorType errorType) { - UiThreadUtil.runOnUiThread( - () -> { - // Keep a copy of the latest error to be shown by the RedBoxSurface - updateLastErrorInfo(message, stack, errorCookie, errorType); - - if (mRedBoxSurfaceDelegate == null) { - @Nullable SurfaceDelegate redBoxSurfaceDelegate = createSurfaceDelegate("RedBox"); - if (redBoxSurfaceDelegate != null) { - mRedBoxSurfaceDelegate = redBoxSurfaceDelegate; - } else { - mRedBoxSurfaceDelegate = new RedBoxDialogSurfaceDelegate(DevSupportManagerBase.this); + @Override + public Pair processErrorCustomizers(Pair errorInfo) { + if (mErrorCustomizers != null) { + for (ErrorCustomizer errorCustomizer : mErrorCustomizers) { + Pair result = errorCustomizer.customizeErrorInfo(errorInfo); + if (result != null) { + errorInfo = result; + } } + } + return errorInfo; + } - mRedBoxSurfaceDelegate.createContentView("RedBox"); - } + @Override + public void updateJSError(final String message, final ReadableArray details, final int errorCookie) { + UiThreadUtil.runOnUiThread(() -> { + // belongs to the most recent showNewJSError + if ((mRedBoxSurfaceDelegate != null && !mRedBoxSurfaceDelegate.isShowing()) || errorCookie != mLastErrorCookie) { + return; + } + // The RedBox surface delegate will always show the latest error + updateLastErrorInfo(message, StackTraceHelper.convertJsStackTrace(details), errorCookie, ErrorType.JS); + mRedBoxSurfaceDelegate.show(); + }); + } - if (mRedBoxSurfaceDelegate.isShowing()) { - // Sometimes errors cause multiple errors to be thrown in JS in quick succession. Only - // show the first and most actionable one. + @Override + public void hideRedboxDialog() { + if (mRedBoxSurfaceDelegate == null) { return; - } + } + mRedBoxSurfaceDelegate.hide(); + } - mRedBoxSurfaceDelegate.show(); - }); - } - - private int getExponentActivityId() { - return -1; - } - - @Override - public void reloadExpoApp() { - try { - Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("reloadFromManifest", int.class).invoke(null, getExponentActivityId()); - } catch (Exception expoHandleErrorException) { - expoHandleErrorException.printStackTrace(); - - // reloadExpoApp replaces handleReloadJS in some places - // where in Expo we would like to reload from manifest. - // If so, if anything goes wrong here, we can fall back - // to plain JS reload. - handleReloadJS(); - } - } - - @Override - public void showDevOptionsDialog() { - if (mDevOptionsDialog != null || !mIsDevSupportEnabled || ActivityManager.isUserAMonkey()) { - return; - } - LinkedHashMap options = new LinkedHashMap<>(); - /* register standard options */ - options.put( - mApplicationContext.getString(R.string.reactandroid_catalyst_reload), - new DevOptionHandler() { - @Override - public void onOptionSelected() { - if (!mDevSettings.isJSDevModeEnabled() - && mDevSettings.isHotModuleReplacementEnabled()) { - Toast.makeText( - mApplicationContext, - mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading_auto_disable), - Toast.LENGTH_LONG) - .show(); - mDevSettings.setHotModuleReplacementEnabled(false); - } + @Nullable + public View createRootView(String appKey) { + return mReactInstanceDevHelper.createRootView(appKey); + } - // NOTE(brentvatne): rather than reload just JS we need to reload the entire project from manifest - // handleReloadJS(); - reloadExpoApp(); - } + public void destroyRootView(View rootView) { + mReactInstanceDevHelper.destroyRootView(rootView); + } + + private void hideDevOptionsDialog() { + if (mDevOptionsDialog != null) { + mDevOptionsDialog.dismiss(); + mDevOptionsDialog = null; + } + } + + private void showNewError(@Nullable final String message, final StackFrame[] stack, final int errorCookie, final ErrorType errorType) { + UiThreadUtil.runOnUiThread(() -> { + // Keep a copy of the latest error to be shown by the RedBoxSurface + updateLastErrorInfo(message, stack, errorCookie, errorType); + if (mRedBoxSurfaceDelegate == null) { + @Nullable SurfaceDelegate redBoxSurfaceDelegate = createSurfaceDelegate("RedBox"); + if (redBoxSurfaceDelegate != null) { + mRedBoxSurfaceDelegate = redBoxSurfaceDelegate; + } else { + mRedBoxSurfaceDelegate = new RedBoxDialogSurfaceDelegate(DevSupportManagerBase.this); + } + mRedBoxSurfaceDelegate.createContentView("RedBox"); + } + if (mRedBoxSurfaceDelegate.isShowing()) { + // show the first and most actionable one. + return; + } + mRedBoxSurfaceDelegate.show(); }); + } - if (mDevSettings.isRemoteJSDebugEnabled()) { - // [Deprecated in React Native 0.73] Remote JS debugging. Handle reload - // via external JS executor. This capability will be removed in a future - // release. - mDevSettings.setRemoteJSDebugEnabled(false); - handleReloadJS(); - } - - if (mDevSettings.isDeviceDebugEnabled() && !mDevSettings.isRemoteJSDebugEnabled()) { - // On-device JS debugging (CDP). Render action to open debugger frontend. - options.put( - mApplicationContext.getString(R.string.reactandroid_catalyst_debug_open), - () -> - mDevServerHelper.openDebugger( - mCurrentContext, - mApplicationContext.getString(R.string.reactandroid_catalyst_open_debugger_error))); - } - - // NOTE(brentvatne): This option does not make sense for Expo - expo_transformer_remove: options.put( - mApplicationContext.getString(R.string.reactandroid_catalyst_change_bundle_location), - () -> { - Activity context = mReactInstanceDevHelper.getCurrentActivity(); - if (context == null || context.isFinishing()) { - FLog.e( - ReactConstants.TAG, - "Unable to launch change bundle location because react activity is not available"); + private int getExponentActivityId() { + return mDevServerHelper.mSettings.getExponentActivityId(); + } + + @Override + public void reloadExpoApp() { + try { + Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("reloadFromManifest", int.class).invoke(null, getExponentActivityId()); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + // reloadExpoApp replaces handleReloadJS in some places + // where in Expo we would like to reload from manifest. + // If so, if anything goes wrong here, we can fall back + // to plain JS reload. + handleReloadJS(); + } + } + + @Override + public void showDevOptionsDialog() { + if (mDevOptionsDialog != null || !mIsDevSupportEnabled || ActivityManager.isUserAMonkey()) { return; - } - - final EditText input = new EditText(context); - input.setHint("localhost:8081"); - - AlertDialog bundleLocationDialog = - new AlertDialog.Builder(context) - .setTitle(mApplicationContext.getString(R.string.reactandroid_catalyst_change_bundle_location)) - .setView(input) - .setPositiveButton( - android.R.string.ok, - new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - String host = input.getText().toString(); - mDevSettings.getPackagerConnectionSettings().setDebugServerHost(host); - handleReloadJS(); - } - }) - .create(); - bundleLocationDialog.show(); - }); + } + LinkedHashMap options = new LinkedHashMap<>(); + /* register standard options */ + options.put(mApplicationContext.getString(R.string.reactandroid_catalyst_reload), new DevOptionHandler() { - options.put( - mDevSettings.isElementInspectorEnabled() - ? mApplicationContext.getString(R.string.reactandroid_catalyst_inspector_stop) - : mApplicationContext.getString(R.string.reactandroid_catalyst_inspector), - new DevOptionHandler() { - @Override - public void onOptionSelected() { - mDevSettings.setElementInspectorEnabled(!mDevSettings.isElementInspectorEnabled()); - mReactInstanceDevHelper.toggleElementInspector(); - } + @Override + public void onOptionSelected() { + if (!mDevSettings.isJSDevModeEnabled() && mDevSettings.isHotModuleReplacementEnabled()) { + Toast.makeText(mApplicationContext, mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading_auto_disable), Toast.LENGTH_LONG).show(); + mDevSettings.setHotModuleReplacementEnabled(false); + } + // NOTE(brentvatne): rather than reload just JS we need to reload the entire project from manifest + // handleReloadJS(); + reloadExpoApp(); + } }); + if (mDevSettings.isRemoteJSDebugEnabled()) { + // [Deprecated in React Native 0.73] Remote JS debugging. Handle reload + // via external JS executor. This capability will be removed in a future + // release. + mDevSettings.setRemoteJSDebugEnabled(false); + handleReloadJS(); + } + if (mDevSettings.isDeviceDebugEnabled() && !mDevSettings.isRemoteJSDebugEnabled()) { + // On-device JS debugging (CDP). Render action to open debugger frontend. + options.put(mApplicationContext.getString(R.string.reactandroid_catalyst_debug_open), () -> mDevServerHelper.openDebugger(mCurrentContext, mApplicationContext.getString(R.string.reactandroid_catalyst_open_debugger_error))); + } + // code removed by ReactAndroidCodeTransformer + ; + options.put(mDevSettings.isElementInspectorEnabled() ? mApplicationContext.getString(R.string.reactandroid_catalyst_inspector_stop) : mApplicationContext.getString(R.string.reactandroid_catalyst_inspector), new DevOptionHandler() { - options.put( - mDevSettings.isHotModuleReplacementEnabled() - ? mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading_stop) - : mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading), - () -> { - boolean nextEnabled = !mDevSettings.isHotModuleReplacementEnabled(); - mDevSettings.setHotModuleReplacementEnabled(nextEnabled); - if (mCurrentContext != null) { - if (nextEnabled) { - mCurrentContext.getJSModule(HMRClient.class).enable(); - } else { - mCurrentContext.getJSModule(HMRClient.class).disable(); + @Override + public void onOptionSelected() { + mDevSettings.setElementInspectorEnabled(!mDevSettings.isElementInspectorEnabled()); + mReactInstanceDevHelper.toggleElementInspector(); } - } - // NOTE(brentvatne): This option does not make sense for Expo - expo_transformer_remove: if (nextEnabled && !mDevSettings.isJSDevModeEnabled()) { - Toast.makeText( - mApplicationContext, - mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading_auto_enable), - Toast.LENGTH_LONG) - .show(); - mDevSettings.setJSDevModeEnabled(true); - handleReloadJS(); - } }); - - options.put( - mDevSettings.isFpsDebugEnabled() - ? mApplicationContext.getString(R.string.reactandroid_catalyst_perf_monitor_stop) - : mApplicationContext.getString(R.string.reactandroid_catalyst_perf_monitor), - () -> { - if (!mDevSettings.isFpsDebugEnabled()) { - // Request overlay permission if needed when "Show Perf Monitor" option is selected - Context context = mReactInstanceDevHelper.getCurrentActivity(); - if (context == null) { - FLog.e(ReactConstants.TAG, "Unable to get reference to react activity"); - } else { - DebugOverlayController.requestPermission(context); + options.put(mDevSettings.isHotModuleReplacementEnabled() ? mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading_stop) : mApplicationContext.getString(R.string.reactandroid_catalyst_hot_reloading), () -> { + boolean nextEnabled = !mDevSettings.isHotModuleReplacementEnabled(); + mDevSettings.setHotModuleReplacementEnabled(nextEnabled); + if (mCurrentContext != null) { + if (nextEnabled) { + mCurrentContext.getJSModule(HMRClient.class).enable(); + } else { + mCurrentContext.getJSModule(HMRClient.class).disable(); + } } - } - mDevSettings.setFpsDebugEnabled(!mDevSettings.isFpsDebugEnabled()); + // code removed by ReactAndroidCodeTransformer + ; }); - expo_transformer_remove: options.put( - mApplicationContext.getString(R.string.reactandroid_catalyst_settings), - () -> { - Intent intent = new Intent(mApplicationContext, DevSettingsActivity.class); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - mApplicationContext.startActivity(intent); + options.put(mDevSettings.isFpsDebugEnabled() ? mApplicationContext.getString(R.string.reactandroid_catalyst_perf_monitor_stop) : mApplicationContext.getString(R.string.reactandroid_catalyst_perf_monitor), () -> { + if (!mDevSettings.isFpsDebugEnabled()) { + // Request overlay permission if needed when "Show Perf Monitor" option is selected + Context context = mReactInstanceDevHelper.getCurrentActivity(); + if (context == null) { + FLog.e(ReactConstants.TAG, "Unable to get reference to react activity"); + } else { + DebugOverlayController.requestPermission(context); + } + } + mDevSettings.setFpsDebugEnabled(!mDevSettings.isFpsDebugEnabled()); }); + // code removed by ReactAndroidCodeTransformer + ; + if (mCustomDevOptions.size() > 0) { + options.putAll(mCustomDevOptions); + } + final DevOptionHandler[] optionHandlers = options.values().toArray(new DevOptionHandler[0]); + Activity context = mReactInstanceDevHelper.getCurrentActivity(); + if (context == null || context.isFinishing()) { + FLog.e(ReactConstants.TAG, "Unable to launch dev options menu because react activity " + "isn't available"); + return; + } + final LinearLayout header = new LinearLayout(context); + header.setOrientation(LinearLayout.VERTICAL); + final TextView title = new TextView(context); + title.setText(context.getString(R.string.reactandroid_catalyst_dev_menu_header, getUniqueTag())); + title.setPadding(0, 50, 0, 0); + title.setGravity(Gravity.CENTER); + title.setTextSize(16); + title.setTypeface(title.getTypeface(), Typeface.BOLD); + header.addView(title); + String jsExecutorDescription = getJSExecutorDescription(); + if (jsExecutorDescription != null) { + final TextView jsExecutorLabel = new TextView(context); + jsExecutorLabel.setText(context.getString(R.string.reactandroid_catalyst_dev_menu_sub_header, jsExecutorDescription)); + jsExecutorLabel.setPadding(0, 20, 0, 0); + jsExecutorLabel.setGravity(Gravity.CENTER); + jsExecutorLabel.setTextSize(14); + header.addView(jsExecutorLabel); + } + mDevOptionsDialog = new AlertDialog.Builder(context).setCustomTitle(header).setItems(options.keySet().toArray(new String[0]), (dialog, which) -> { + optionHandlers[which].onOptionSelected(); + mDevOptionsDialog = null; + }).setOnCancelListener(dialog -> mDevOptionsDialog = null).create(); + mDevOptionsDialog.show(); + if (mCurrentContext != null) { + mCurrentContext.getJSModule(RCTNativeAppEventEmitter.class).emit("RCTDevMenuShown", null); + } + } + + private String getJSExecutorDescription() { + try { + return getReactInstanceDevHelper().getJavaScriptExecutorFactory().toString(); + } catch (IllegalStateException e) { + return null; + } + } - if (mCustomDevOptions.size() > 0) { - options.putAll(mCustomDevOptions); - } - - final DevOptionHandler[] optionHandlers = options.values().toArray(new DevOptionHandler[0]); - - Activity context = mReactInstanceDevHelper.getCurrentActivity(); - if (context == null || context.isFinishing()) { - FLog.e( - ReactConstants.TAG, - "Unable to launch dev options menu because react activity " + "isn't available"); - return; - } - - final LinearLayout header = new LinearLayout(context); - header.setOrientation(LinearLayout.VERTICAL); - - final TextView title = new TextView(context); - title.setText(context.getString(R.string.reactandroid_catalyst_dev_menu_header, getUniqueTag())); - title.setPadding(0, 50, 0, 0); - title.setGravity(Gravity.CENTER); - title.setTextSize(16); - title.setTypeface(title.getTypeface(), Typeface.BOLD); - header.addView(title); - - String jsExecutorDescription = getJSExecutorDescription(); - - if (jsExecutorDescription != null) { - final TextView jsExecutorLabel = new TextView(context); - jsExecutorLabel.setText( - context.getString(R.string.reactandroid_catalyst_dev_menu_sub_header, jsExecutorDescription)); - jsExecutorLabel.setPadding(0, 20, 0, 0); - jsExecutorLabel.setGravity(Gravity.CENTER); - jsExecutorLabel.setTextSize(14); - header.addView(jsExecutorLabel); - } - - mDevOptionsDialog = - new AlertDialog.Builder(context) - .setCustomTitle(header) - .setItems( - options.keySet().toArray(new String[0]), - (dialog, which) -> { - optionHandlers[which].onOptionSelected(); - mDevOptionsDialog = null; - }) - .setOnCancelListener(dialog -> mDevOptionsDialog = null) - .create(); - mDevOptionsDialog.show(); - if (mCurrentContext != null) { - mCurrentContext.getJSModule(RCTNativeAppEventEmitter.class).emit("RCTDevMenuShown", null); - } - } - - private String getJSExecutorDescription() { - try { - return getReactInstanceDevHelper().getJavaScriptExecutorFactory().toString(); - } catch (IllegalStateException e) { - return null; - } - } - - /** + /** * {@link com.facebook.react.ReactInstanceManager} is responsible for enabling/disabling dev * support when a React view is attached/detached or when application state changes (e.g. the * application is backgrounded). */ - @Override - public void setDevSupportEnabled(boolean isDevSupportEnabled) { - mIsDevSupportEnabled = isDevSupportEnabled; - reloadSettings(); - } - - @Override - public boolean getDevSupportEnabled() { - return mIsDevSupportEnabled; - } - - @Override - public DevInternalSettings getDevSettings() { - return mDevSettings; - } - - @Override - public @Nullable RedBoxHandler getRedBoxHandler() { - return mRedBoxHandler; - } - - @Override - public void onNewReactContextCreated(ReactContext reactContext) { - resetCurrentContext(reactContext); - } - - @Override - public void onReactInstanceDestroyed(ReactContext reactContext) { - if (reactContext == mCurrentContext) { - // only call reset context when the destroyed context matches the one that is currently set - // for this manager - resetCurrentContext(null); - } - } - - @Override - public String getSourceMapUrl() { - if (mJSAppBundleName == null) { - return ""; - } - - return mDevServerHelper.getSourceMapUrl(Assertions.assertNotNull(mJSAppBundleName)); - } - - @Override - public String getSourceUrl() { - if (mJSAppBundleName == null) { - return ""; - } - - return mDevServerHelper.getSourceUrl(Assertions.assertNotNull(mJSAppBundleName)); - } - - @Override - public String getJSBundleURLForRemoteDebugging() { - return mDevServerHelper.getJSBundleURLForRemoteDebugging( - Assertions.assertNotNull(mJSAppBundleName)); - } - - @Override - public String getDownloadedJSBundleFile() { - return mJSBundleDownloadedFile.getAbsolutePath(); - } - - /** + @Override + public void setDevSupportEnabled(boolean isDevSupportEnabled) { + mIsDevSupportEnabled = isDevSupportEnabled; + reloadSettings(); + } + + @Override + public boolean getDevSupportEnabled() { + return mIsDevSupportEnabled; + } + + @Override + public DevInternalSettings getDevSettings() { + return mDevSettings; + } + + @Override + @Nullable + public RedBoxHandler getRedBoxHandler() { + return mRedBoxHandler; + } + + @Override + public void onNewReactContextCreated(ReactContext reactContext) { + resetCurrentContext(reactContext); + } + + @Override + public void onReactInstanceDestroyed(ReactContext reactContext) { + if (reactContext == mCurrentContext) { + // only call reset context when the destroyed context matches the one that is currently set + // for this manager + resetCurrentContext(null); + } + } + + @Override + public String getSourceMapUrl() { + if (mJSAppBundleName == null) { + return ""; + } + return mDevServerHelper.getSourceMapUrl(Assertions.assertNotNull(mJSAppBundleName)); + } + + @Override + public String getSourceUrl() { + if (mJSAppBundleName == null) { + return ""; + } + return mDevServerHelper.getSourceUrl(Assertions.assertNotNull(mJSAppBundleName)); + } + + @Override + public String getJSBundleURLForRemoteDebugging() { + return mDevServerHelper.getJSBundleURLForRemoteDebugging(Assertions.assertNotNull(mJSAppBundleName)); + } + + @Override + public String getDownloadedJSBundleFile() { + return mJSBundleDownloadedFile.getAbsolutePath(); + } + + /** * @return {@code true} if {@link com.facebook.react.ReactInstanceManager} should use downloaded * JS bundle file instead of using JS file from assets. This may happen when app has not been * updated since the last time we fetched the bundle. */ - @Override - public boolean hasUpToDateJSBundleInCache() { - if (mIsDevSupportEnabled && mJSBundleDownloadedFile.exists()) { - try { - String packageName = mApplicationContext.getPackageName(); - PackageInfo thisPackage = - mApplicationContext.getPackageManager().getPackageInfo(packageName, 0); - if (mJSBundleDownloadedFile.lastModified() > thisPackage.lastUpdateTime) { - // Base APK has not been updated since we downloaded JS, but if app is using exopackage - // it may only be a single dex that has been updated. We check for exopackage dir update - // time in that case. - File exopackageDir = - new File(String.format(Locale.US, EXOPACKAGE_LOCATION_FORMAT, packageName)); - if (exopackageDir.exists()) { - return mJSBundleDownloadedFile.lastModified() > exopackageDir.lastModified(); - } - return true; + @Override + public boolean hasUpToDateJSBundleInCache() { + return false; + } + + private void resetCurrentContext(@Nullable ReactContext reactContext) { + if (mCurrentContext == reactContext) { + // new context is the same as the old one - do nothing + return; + } + mCurrentContext = reactContext; + // Recreate debug overlay controller with new CatalystInstance object + if (mDebugOverlayController != null) { + mDebugOverlayController.setFpsDebugViewVisible(false); + } + if (reactContext != null) { + mDebugOverlayController = new DebugOverlayController(reactContext); + } + if (mCurrentContext != null) { + try { + URL sourceUrl = new URL(getSourceUrl()); + // strip initial slash in path + String path = sourceUrl.getPath().substring(1); + String host = sourceUrl.getHost(); + int port = sourceUrl.getPort() != -1 ? sourceUrl.getPort() : sourceUrl.getDefaultPort(); + mCurrentContext.getJSModule(HMRClient.class).setup("android", path, host, port, mDevSettings.isHotModuleReplacementEnabled()); + } catch (MalformedURLException e) { + showNewJavaError(e.getMessage(), e); + } } - } catch (PackageManager.NameNotFoundException e) { - // Ignore this error and just fallback to loading JS from assets - FLog.e(ReactConstants.TAG, "DevSupport is unable to get current app info"); - } + reloadSettings(); } - return false; - } - private void resetCurrentContext(@Nullable ReactContext reactContext) { - if (mCurrentContext == reactContext) { - // new context is the same as the old one - do nothing - return; + @Override + public void reloadSettings() { + if (UiThreadUtil.isOnUiThread()) { + reload(); + } else { + UiThreadUtil.runOnUiThread(this::reload); + } } - mCurrentContext = reactContext; + @Nullable + protected ReactContext getCurrentContext() { + return mCurrentContext; + } - // Recreate debug overlay controller with new CatalystInstance object - if (mDebugOverlayController != null) { - mDebugOverlayController.setFpsDebugViewVisible(false); - } - if (reactContext != null) { - mDebugOverlayController = new DebugOverlayController(reactContext); - } - - if (mCurrentContext != null) { - try { - URL sourceUrl = new URL(getSourceUrl()); - String path = sourceUrl.getPath().substring(1); // strip initial slash in path - String host = sourceUrl.getHost(); - int port = sourceUrl.getPort() != -1 ? sourceUrl.getPort() : sourceUrl.getDefaultPort(); - mCurrentContext - .getJSModule(HMRClient.class) - .setup("android", path, host, port, mDevSettings.isHotModuleReplacementEnabled()); - } catch (MalformedURLException e) { - showNewJavaError(e.getMessage(), e); - } - } - - reloadSettings(); - } - - @Override - public void reloadSettings() { - if (UiThreadUtil.isOnUiThread()) { - reload(); - } else { - UiThreadUtil.runOnUiThread(this::reload); - } - } - - protected @Nullable ReactContext getCurrentContext() { - return mCurrentContext; - } - - public @Nullable String getJSAppBundleName() { - return mJSAppBundleName; - } - - protected Context getApplicationContext() { - return mApplicationContext; - } - - public DevServerHelper getDevServerHelper() { - return mDevServerHelper; - } - - public DevLoadingViewManager getDevLoadingViewManager() { - return mDevLoadingViewManager; - } - - public ReactInstanceDevHelper getReactInstanceDevHelper() { - return mReactInstanceDevHelper; - } - - @UiThread - private void showDevLoadingViewForUrl(String bundleUrl) { - if (mApplicationContext == null) { - return; - } - - URL parsedURL; - - try { - parsedURL = new URL(bundleUrl); - } catch (MalformedURLException e) { - FLog.e(ReactConstants.TAG, "Bundle url format is invalid. \n\n" + e.toString()); - return; - } - - int port = parsedURL.getPort() != -1 ? parsedURL.getPort() : parsedURL.getDefaultPort(); - mDevLoadingViewManager.showMessage( - mApplicationContext.getString( - R.string.reactandroid_catalyst_loading_from_url, parsedURL.getHost() + ":" + port)); - mDevLoadingViewVisible = true; - } - - @UiThread - protected void showDevLoadingViewForRemoteJSEnabled() { - if (mApplicationContext == null) { - return; - } - - mDevLoadingViewManager.showMessage( - mApplicationContext.getString(R.string.reactandroid_catalyst_debug_connecting)); - mDevLoadingViewVisible = true; - } - - @UiThread - protected void hideDevLoadingView() { - mDevLoadingViewManager.hide(); - mDevLoadingViewVisible = false; - } - - public void fetchSplitBundleAndCreateBundleLoader( - String bundlePath, final CallbackWithBundleLoader callback) { - final String bundleUrl = mDevServerHelper.getDevServerSplitBundleURL(bundlePath); - // The bundle path may contain the '/' character, which is not allowed in file names. - final File bundleFile = - new File(mJSSplitBundlesDir, bundlePath.replaceAll("/", "_") + ".jsbundle"); - UiThreadUtil.runOnUiThread( - () -> { - showSplitBundleDevLoadingView(bundleUrl); - mDevServerHelper.downloadBundleFromURL( - new DevBundleDownloadListener() { - @Override - public void onSuccess() { - UiThreadUtil.runOnUiThread(() -> hideSplitBundleDevLoadingView()); + @Nullable + public String getJSAppBundleName() { + return mJSAppBundleName; + } + + protected Context getApplicationContext() { + return mApplicationContext; + } + + public DevServerHelper getDevServerHelper() { + return mDevServerHelper; + } + + public DevLoadingViewManager getDevLoadingViewManager() { + return mDevLoadingViewManager; + } + + public ReactInstanceDevHelper getReactInstanceDevHelper() { + return mReactInstanceDevHelper; + } - @Nullable ReactContext context = mCurrentContext; - if (context == null || !context.hasActiveReactInstance()) { - return; - } + @UiThread + private void showDevLoadingViewForUrl(String bundleUrl) { + if (mApplicationContext == null) { + return; + } + URL parsedURL; + try { + parsedURL = new URL(bundleUrl); + } catch (MalformedURLException e) { + FLog.e(ReactConstants.TAG, "Bundle url format is invalid. \n\n" + e.toString()); + return; + } + int port = parsedURL.getPort() != -1 ? parsedURL.getPort() : parsedURL.getDefaultPort(); + mDevLoadingViewManager.showMessage(mApplicationContext.getString(R.string.reactandroid_catalyst_loading_from_url, parsedURL.getHost() + ":" + port)); + mDevLoadingViewVisible = true; + } + + @UiThread + protected void showDevLoadingViewForRemoteJSEnabled() { + if (mApplicationContext == null) { + return; + } + mDevLoadingViewManager.showMessage(mApplicationContext.getString(R.string.reactandroid_catalyst_debug_connecting)); + mDevLoadingViewVisible = true; + } - JSBundleLoader bundleLoader = - JSBundleLoader.createCachedSplitBundleFromNetworkLoader( - bundleUrl, bundleFile.getAbsolutePath()); + @UiThread + protected void hideDevLoadingView() { + mDevLoadingViewManager.hide(); + mDevLoadingViewVisible = false; + } + + public void fetchSplitBundleAndCreateBundleLoader(String bundlePath, final CallbackWithBundleLoader callback) { + final String bundleUrl = mDevServerHelper.getDevServerSplitBundleURL(bundlePath); + // The bundle path may contain the '/' character, which is not allowed in file names. + final File bundleFile = new File(mJSSplitBundlesDir, bundlePath.replaceAll("/", "_") + ".jsbundle"); + UiThreadUtil.runOnUiThread(() -> { + showSplitBundleDevLoadingView(bundleUrl); + mDevServerHelper.downloadBundleFromURL(new DevBundleDownloadListener() { - callback.onSuccess(bundleLoader); + @Override + public void onSuccess() { + UiThreadUtil.runOnUiThread(() -> hideSplitBundleDevLoadingView()); + @Nullable ReactContext context = mCurrentContext; + if (context == null || !context.hasActiveReactInstance()) { + return; + } + JSBundleLoader bundleLoader = JSBundleLoader.createCachedSplitBundleFromNetworkLoader(bundleUrl, bundleFile.getAbsolutePath()); + callback.onSuccess(bundleLoader); } @Override - public void onProgress( - @Nullable String status, @Nullable Integer done, @Nullable Integer total) { - mDevLoadingViewManager.updateProgress(status, done, total); + public void onProgress(@Nullable String status, @Nullable Integer done, @Nullable Integer total) { + mDevLoadingViewManager.updateProgress(status, done, total); } @Override public void onFailure(Exception cause) { - UiThreadUtil.runOnUiThread( - DevSupportManagerBase.this::hideSplitBundleDevLoadingView); - callback.onError(bundleUrl, cause); + UiThreadUtil.runOnUiThread(DevSupportManagerBase.this::hideSplitBundleDevLoadingView); + callback.onError(bundleUrl, cause); } - }, - bundleFile, - bundleUrl, - null); + }, bundleFile, bundleUrl, null); }); - } - - @UiThread - private void showSplitBundleDevLoadingView(String bundleUrl) { - showDevLoadingViewForUrl(bundleUrl); - mPendingJSSplitBundleRequests++; - } - - @UiThread - private void hideSplitBundleDevLoadingView() { - if (--mPendingJSSplitBundleRequests == 0) { - hideDevLoadingView(); - } - } - - @Override - public void isPackagerRunning(final PackagerStatusCallback callback) { - Runnable checkPackagerRunning = () -> mDevServerHelper.isPackagerRunning(callback); - if (mPackagerLocationCustomizer != null) { - mPackagerLocationCustomizer.run(checkPackagerRunning); - } else { - checkPackagerRunning.run(); - } - } - - @Override - public @Nullable File downloadBundleResourceFromUrlSync( - final String resourceURL, final File outputFile) { - return mDevServerHelper.downloadBundleResourceFromUrlSync(resourceURL, outputFile); - } - - @Override - public @Nullable String getLastErrorTitle() { - return mLastErrorTitle; - } - - @Override - public @Nullable StackFrame[] getLastErrorStack() { - return mLastErrorStack; - } - - @Override - public int getLastErrorCookie() { - return mLastErrorCookie; - } - - @Override - public @Nullable ErrorType getLastErrorType() { - return mLastErrorType; - } - - private void handleCaptureHeap(final Responder responder) { - if (mCurrentContext == null) { - return; - } - JSCHeapCapture heapCapture = mCurrentContext.getNativeModule(JSCHeapCapture.class); - - if (heapCapture != null) { - heapCapture.captureHeap( - mApplicationContext.getCacheDir().getPath(), - new JSCHeapCapture.CaptureCallback() { - @Override - public void onSuccess(File capture) { - responder.respond(capture.toString()); - } + } - @Override - public void onFailure(JSCHeapCapture.CaptureException error) { - responder.error(error.toString()); - } - }); - } - } - - private void updateLastErrorInfo( - @Nullable final String message, - final StackFrame[] stack, - final int errorCookie, - final ErrorType errorType) { - mLastErrorTitle = message; - mLastErrorStack = stack; - mLastErrorCookie = errorCookie; - mLastErrorType = errorType; - } - - public void reloadJSFromServer(final String bundleURL) { - reloadJSFromServer( - bundleURL, - () -> UiThreadUtil.runOnUiThread(mReactInstanceDevHelper::onJSBundleLoadedFromServer)); - } - - public void reloadJSFromServer(final String bundleURL, final BundleLoadCallback callback) { - ReactMarker.logMarker(ReactMarkerConstants.DOWNLOAD_START); - - showDevLoadingViewForUrl(bundleURL); - - final BundleDownloader.BundleInfo bundleInfo = new BundleDownloader.BundleInfo(); - - mDevServerHelper.downloadBundleFromURL( - new DevBundleDownloadListener() { - @Override - public void onSuccess() { - hideDevLoadingView(); - synchronized (DevSupportManagerBase.this) { - mBundleStatus.isLastDownloadSuccess = true; - mBundleStatus.updateTimestamp = System.currentTimeMillis(); - } - if (mBundleDownloadListener != null) { - mBundleDownloadListener.onSuccess(); - } - ReactMarker.logMarker(ReactMarkerConstants.DOWNLOAD_END, bundleInfo.toJSONString()); - callback.onSuccess(); - } - - @Override - public void onProgress( - @Nullable final String status, - @Nullable final Integer done, - @Nullable final Integer total) { - mDevLoadingViewManager.updateProgress(status, done, total); - if (mBundleDownloadListener != null) { - mBundleDownloadListener.onProgress(status, done, total); - } - } + @UiThread + private void showSplitBundleDevLoadingView(String bundleUrl) { + showDevLoadingViewForUrl(bundleUrl); + mPendingJSSplitBundleRequests++; + } - @Override - public void onFailure(final Exception cause) { + @UiThread + private void hideSplitBundleDevLoadingView() { + if (--mPendingJSSplitBundleRequests == 0) { hideDevLoadingView(); - synchronized (DevSupportManagerBase.this) { - mBundleStatus.isLastDownloadSuccess = false; - } - if (mBundleDownloadListener != null) { - mBundleDownloadListener.onFailure(cause); - } - FLog.e(ReactConstants.TAG, "Unable to download JS bundle", cause); - reportBundleLoadingFailure(cause); - } - }, - mJSBundleDownloadedFile, - bundleURL, - bundleInfo); - } - - private void reportBundleLoadingFailure(final Exception cause) { - UiThreadUtil.runOnUiThread( - () -> { - if (cause instanceof DebugServerException) { - DebugServerException debugServerException = (DebugServerException) cause; - showNewJavaError(debugServerException.getMessage(), cause); - } else { - showNewJavaError(mApplicationContext.getString(R.string.reactandroid_catalyst_reload_error), cause); - } - }); - } + } + } - @Override - public void startInspector() { - if (mIsDevSupportEnabled) { - mDevServerHelper.openInspectorConnection(); + @Override + public void isPackagerRunning(final PackagerStatusCallback callback) { + Runnable checkPackagerRunning = () -> mDevServerHelper.isPackagerRunning(callback); + if (mPackagerLocationCustomizer != null) { + mPackagerLocationCustomizer.run(checkPackagerRunning); + } else { + checkPackagerRunning.run(); + } } - } - @Override - public void stopInspector() { - mDevServerHelper.closeInspectorConnection(); - } + @Override + @Nullable + public File downloadBundleResourceFromUrlSync(final String resourceURL, final File outputFile) { + return mDevServerHelper.downloadBundleResourceFromUrlSync(resourceURL, outputFile); + } - @Override - public void setHotModuleReplacementEnabled(final boolean isHotModuleReplacementEnabled) { - if (!mIsDevSupportEnabled) { - return; + @Override + @Nullable + public String getLastErrorTitle() { + return mLastErrorTitle; } - UiThreadUtil.runOnUiThread( - () -> { - mDevSettings.setHotModuleReplacementEnabled(isHotModuleReplacementEnabled); - handleReloadJS(); - }); - } + @Override + @Nullable + public StackFrame[] getLastErrorStack() { + return mLastErrorStack; + } - @Override - public void setRemoteJSDebugEnabled(final boolean isRemoteJSDebugEnabled) { - if (!mIsDevSupportEnabled) { - return; + @Override + public int getLastErrorCookie() { + return mLastErrorCookie; } - UiThreadUtil.runOnUiThread( - () -> { - mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled); - handleReloadJS(); - }); - } + @Override + @Nullable + public ErrorType getLastErrorType() { + return mLastErrorType; + } + + private void handleCaptureHeap(final Responder responder) { + if (mCurrentContext == null) { + return; + } + JSCHeapCapture heapCapture = mCurrentContext.getNativeModule(JSCHeapCapture.class); + if (heapCapture != null) { + heapCapture.captureHeap(mApplicationContext.getCacheDir().getPath(), new JSCHeapCapture.CaptureCallback() { - @Override - public void setFpsDebugEnabled(final boolean isFpsDebugEnabled) { - if (!mIsDevSupportEnabled) { - return; + @Override + public void onSuccess(File capture) { + responder.respond(capture.toString()); + } + + @Override + public void onFailure(JSCHeapCapture.CaptureException error) { + responder.error(error.toString()); + } + }); + } } - UiThreadUtil.runOnUiThread(() -> mDevSettings.setFpsDebugEnabled(isFpsDebugEnabled)); - } + private void updateLastErrorInfo(@Nullable final String message, final StackFrame[] stack, final int errorCookie, final ErrorType errorType) { + mLastErrorTitle = message; + mLastErrorStack = stack; + mLastErrorCookie = errorCookie; + mLastErrorType = errorType; + } - @Override - public void toggleElementInspector() { - if (!mIsDevSupportEnabled) { - return; + public void reloadJSFromServer(final String bundleURL) { + reloadJSFromServer(bundleURL, () -> UiThreadUtil.runOnUiThread(mReactInstanceDevHelper::onJSBundleLoadedFromServer)); } - UiThreadUtil.runOnUiThread( - () -> { - mDevSettings.setElementInspectorEnabled(!mDevSettings.isElementInspectorEnabled()); - mReactInstanceDevHelper.toggleElementInspector(); - }); - } - - // NOTE(brentvatne): this is confusingly called the first time the app loads! - private void reload() { - UiThreadUtil.assertOnUiThread(); - - // reload settings, show/hide debug overlay if required & start/stop shake detector - if (mIsDevSupportEnabled) { - // update visibility of FPS debug overlay depending on the settings - if (mDebugOverlayController != null) { - mDebugOverlayController.setFpsDebugViewVisible(mDevSettings.isFpsDebugEnabled()); - } - - // start shake gesture detector - if (!mIsShakeDetectorStarted) { - mShakeDetector.start( - (SensorManager) mApplicationContext.getSystemService(Context.SENSOR_SERVICE)); - mIsShakeDetectorStarted = true; - } - - // register reload app broadcast receiver - if (!mIsReceiverRegistered) { - IntentFilter filter = new IntentFilter(); - filter.addAction(getReloadAppAction(mApplicationContext)); - compatRegisterReceiver(mApplicationContext, mReloadAppBroadcastReceiver, filter, true); - mIsReceiverRegistered = true; - } - - // show the dev loading if it should be - if (mDevLoadingViewVisible) { - mDevLoadingViewManager.showMessage("Reloading..."); - } - - mDevServerHelper.openPackagerConnection( - this.getClass().getSimpleName(), - new PackagerCommandListener() { + public void reloadJSFromServer(final String bundleURL, final BundleLoadCallback callback) { + ReactMarker.logMarker(ReactMarkerConstants.DOWNLOAD_START); + showDevLoadingViewForUrl(bundleURL); + final BundleDownloader.BundleInfo bundleInfo = new BundleDownloader.BundleInfo(); + mDevServerHelper.downloadBundleFromURL(new DevBundleDownloadListener() { + @Override - public void onPackagerConnected() { - // No-op + public void onSuccess() { + hideDevLoadingView(); + synchronized (DevSupportManagerBase.this) { + mBundleStatus.isLastDownloadSuccess = true; + mBundleStatus.updateTimestamp = System.currentTimeMillis(); + } + if (mBundleDownloadListener != null) { + mBundleDownloadListener.onSuccess(); + } + ReactMarker.logMarker(ReactMarkerConstants.DOWNLOAD_END, bundleInfo.toJSONString()); + callback.onSuccess(); } @Override - public void onPackagerDisconnected() { - // No-op + public void onProgress(@Nullable final String status, @Nullable final Integer done, @Nullable final Integer total) { + mDevLoadingViewManager.updateProgress(status, done, total); + if (mBundleDownloadListener != null) { + mBundleDownloadListener.onProgress(status, done, total); + } } @Override - public void onPackagerReloadCommand() { - // Disable debugger to resume the JsVM & avoid thread locks while reloading - mDevServerHelper.disableDebugger(); - UiThreadUtil.runOnUiThread(() -> { - // NOTE(brentvatne): rather than reload just JS we need to reload the entire project from manifest - // handleReloadJS(); - reloadExpoApp(); - }); + public void onFailure(final Exception cause) { + hideDevLoadingView(); + synchronized (DevSupportManagerBase.this) { + mBundleStatus.isLastDownloadSuccess = false; + } + if (mBundleDownloadListener != null) { + mBundleDownloadListener.onFailure(cause); + } + FLog.e(ReactConstants.TAG, "Unable to download JS bundle", cause); + reportBundleLoadingFailure(cause); } + }, mJSBundleDownloadedFile, bundleURL, bundleInfo); + } - @Override - public void onPackagerDevMenuCommand() { - UiThreadUtil.runOnUiThread(() -> showDevOptionsDialog()); + private void reportBundleLoadingFailure(final Exception cause) { + UiThreadUtil.runOnUiThread(() -> { + if (cause instanceof DebugServerException) { + DebugServerException debugServerException = (DebugServerException) cause; + showNewJavaError(debugServerException.getMessage(), cause); + } else { + showNewJavaError(mApplicationContext.getString(R.string.reactandroid_catalyst_reload_error), cause); } + }); + } - @Override - public void onCaptureHeapCommand(final Responder responder) { - UiThreadUtil.runOnUiThread(() -> handleCaptureHeap(responder)); + @Override + public void startInspector() { + if (mIsDevSupportEnabled) { + mDevServerHelper.openInspectorConnection(); + } + } + + @Override + public void stopInspector() { + mDevServerHelper.closeInspectorConnection(); + } + + @Override + public void setHotModuleReplacementEnabled(final boolean isHotModuleReplacementEnabled) { + if (!mIsDevSupportEnabled) { + return; + } + UiThreadUtil.runOnUiThread(() -> { + mDevSettings.setHotModuleReplacementEnabled(isHotModuleReplacementEnabled); + handleReloadJS(); + }); + } + + @Override + public void setRemoteJSDebugEnabled(final boolean isRemoteJSDebugEnabled) { + if (!mIsDevSupportEnabled) { + return; + } + UiThreadUtil.runOnUiThread(() -> { + mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled); + handleReloadJS(); + }); + } + + @Override + public void setFpsDebugEnabled(final boolean isFpsDebugEnabled) { + if (!mIsDevSupportEnabled) { + return; + } + UiThreadUtil.runOnUiThread(() -> mDevSettings.setFpsDebugEnabled(isFpsDebugEnabled)); + } + + @Override + public void toggleElementInspector() { + if (!mIsDevSupportEnabled) { + return; + } + UiThreadUtil.runOnUiThread(() -> { + mDevSettings.setElementInspectorEnabled(!mDevSettings.isElementInspectorEnabled()); + mReactInstanceDevHelper.toggleElementInspector(); + }); + } + + // NOTE(brentvatne): this is confusingly called the first time the app loads! + private void reload() { + UiThreadUtil.assertOnUiThread(); + // reload settings, show/hide debug overlay if required & start/stop shake detector + if (mIsDevSupportEnabled) { + // update visibility of FPS debug overlay depending on the settings + if (mDebugOverlayController != null) { + mDebugOverlayController.setFpsDebugViewVisible(mDevSettings.isFpsDebugEnabled()); + } + // start shake gesture detector + if (!mIsShakeDetectorStarted) { + mShakeDetector.start((SensorManager) mApplicationContext.getSystemService(Context.SENSOR_SERVICE)); + mIsShakeDetectorStarted = true; + } + // register reload app broadcast receiver + if (!mIsReceiverRegistered) { + IntentFilter filter = new IntentFilter(); + filter.addAction(getReloadAppAction(mApplicationContext)); + compatRegisterReceiver(mApplicationContext, mReloadAppBroadcastReceiver, filter, true); + mIsReceiverRegistered = true; } + // show the dev loading if it should be + if (mDevLoadingViewVisible) { + mDevLoadingViewManager.showMessage("Reloading..."); + } + mDevServerHelper.openPackagerConnection(this.getClass().getSimpleName(), new PackagerCommandListener() { - @Override - public @Nullable Map customCommandHandlers() { - return mCustomPackagerCommandHandlers; + @Override + public void onPackagerConnected() { + // No-op + } + + @Override + public void onPackagerDisconnected() { + // No-op + } + + @Override + public void onPackagerReloadCommand() { + // Disable debugger to resume the JsVM & avoid thread locks while reloading + mDevServerHelper.disableDebugger(); + UiThreadUtil.runOnUiThread(() -> { + // NOTE(brentvatne): rather than reload just JS we need to reload the entire project from manifest + // handleReloadJS(); + reloadExpoApp(); + }); + } + + @Override + public void onPackagerDevMenuCommand() { + UiThreadUtil.runOnUiThread(() -> showDevOptionsDialog()); + } + + @Override + public void onCaptureHeapCommand(final Responder responder) { + UiThreadUtil.runOnUiThread(() -> handleCaptureHeap(responder)); + } + + @Override + @Nullable + public Map customCommandHandlers() { + return mCustomPackagerCommandHandlers; + } + }); + } else { + // hide FPS debug overlay + if (mDebugOverlayController != null) { + mDebugOverlayController.setFpsDebugViewVisible(false); + } + // stop shake gesture detector + if (mIsShakeDetectorStarted) { + mShakeDetector.stop(); + mIsShakeDetectorStarted = false; + } + // unregister app reload broadcast receiver + if (mIsReceiverRegistered) { + mApplicationContext.unregisterReceiver(mReloadAppBroadcastReceiver); + mIsReceiverRegistered = false; } - }); - } else { - // hide FPS debug overlay - if (mDebugOverlayController != null) { - mDebugOverlayController.setFpsDebugViewVisible(false); - } - - // stop shake gesture detector - if (mIsShakeDetectorStarted) { - mShakeDetector.stop(); - mIsShakeDetectorStarted = false; - } - - // unregister app reload broadcast receiver - if (mIsReceiverRegistered) { - mApplicationContext.unregisterReceiver(mReloadAppBroadcastReceiver); - mIsReceiverRegistered = false; - } - - // hide redbox dialog - hideRedboxDialog(); - - // hide dev options dialog - hideDevOptionsDialog(); - - // hide loading view - mDevLoadingViewManager.hide(); - mDevServerHelper.closePackagerConnection(); - } - } - - /** Intent action for reloading the JS */ - private static String getReloadAppAction(Context context) { - return context.getPackageName() + RELOAD_APP_ACTION_SUFFIX; - } - - @Override - public void setPackagerLocationCustomizer( - DevSupportManager.PackagerLocationCustomizer packagerLocationCustomizer) { - mPackagerLocationCustomizer = packagerLocationCustomizer; - } - - @Override - public @Nullable Activity getCurrentActivity() { - return mReactInstanceDevHelper.getCurrentActivity(); - } - - @Override - public @Nullable SurfaceDelegate createSurfaceDelegate(String moduleName) { - if (mSurfaceDelegateFactory == null) { - return null; - } - - return mSurfaceDelegateFactory.createSurfaceDelegate(moduleName); - } - - /** + // hide redbox dialog + hideRedboxDialog(); + // hide dev options dialog + hideDevOptionsDialog(); + // hide loading view + mDevLoadingViewManager.hide(); + mDevServerHelper.closePackagerConnection(); + } + } + + /** Intent action for reloading the JS */ + private static String getReloadAppAction(Context context) { + return context.getPackageName() + RELOAD_APP_ACTION_SUFFIX; + } + + @Override + public void setPackagerLocationCustomizer(DevSupportManager.PackagerLocationCustomizer packagerLocationCustomizer) { + mPackagerLocationCustomizer = packagerLocationCustomizer; + } + + @Override + @Nullable + public Activity getCurrentActivity() { + return mReactInstanceDevHelper.getCurrentActivity(); + } + + @Override + @Nullable + public SurfaceDelegate createSurfaceDelegate(String moduleName) { + if (mSurfaceDelegateFactory == null) { + return null; + } + return mSurfaceDelegateFactory.createSurfaceDelegate(moduleName); + } + + /** * Starting with Android 14, apps and services that target Android 14 and use context-registered * receivers are required to specify a flag to indicate whether or not the receiver should be * exported to all other apps on the device: either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED * *

https://developer.android.com/about/versions/14/behavior-changes-14#runtime-receivers-exported */ - private void compatRegisterReceiver( - Context context, BroadcastReceiver receiver, IntentFilter filter, boolean exported) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE - && context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { - context.registerReceiver( - receiver, filter, exported ? Context.RECEIVER_EXPORTED : Context.RECEIVER_NOT_EXPORTED); - } else { - context.registerReceiver(receiver, filter); - } - } + private void compatRegisterReceiver(Context context, BroadcastReceiver receiver, IntentFilter filter, boolean exported) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + context.registerReceiver(receiver, filter, exported ? Context.RECEIVER_EXPORTED : Context.RECEIVER_NOT_EXPORTED); + } else { + context.registerReceiver(receiver, filter); + } + } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java index afe1c1819d8c..5475c8b443e5 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.modules.core; import com.facebook.common.logging.FLog; @@ -23,69 +22,99 @@ @ReactModule(name = NativeExceptionsManagerSpec.NAME) public class ExceptionsManagerModule extends NativeExceptionsManagerSpec { - private final DevSupportManager mDevSupportManager; - - public ExceptionsManagerModule(DevSupportManager devSupportManager) { - super(null); - mDevSupportManager = devSupportManager; - } - - @Override - public void reportFatalException(String message, ReadableArray stack, double idDouble) { - int id = (int) idDouble; - - JavaOnlyMap data = new JavaOnlyMap(); - data.putString("message", message); - data.putArray("stack", stack); - data.putInt("id", id); - data.putBoolean("isFatal", true); - reportException(data); - } + public final DevSupportManager mDevSupportManager; - @Override - public void reportSoftException(String message, ReadableArray stack, double idDouble) { - int id = (int) idDouble; - - JavaOnlyMap data = new JavaOnlyMap(); - data.putString("message", message); - data.putArray("stack", stack); - data.putInt("id", id); - data.putBoolean("isFatal", false); - reportException(data); - } + public ExceptionsManagerModule(DevSupportManager devSupportManager) { + super(null); + mDevSupportManager = devSupportManager; + } - @Override - public void reportException(ReadableMap data) { - String message = data.hasKey("message") ? data.getString("message") : ""; - ReadableArray stack = data.hasKey("stack") ? data.getArray("stack") : Arguments.createArray(); - boolean isFatal = data.hasKey("isFatal") ? data.getBoolean("isFatal") : false; + @Override + public void reportFatalException(String message, ReadableArray stack, double idDouble) { + if (mDevSupportManager.getDevSupportEnabled()) { + { + int id = (int) idDouble; + JavaOnlyMap data = new JavaOnlyMap(); + data.putString("message", message); + data.putArray("stack", stack); + data.putInt("id", id); + data.putBoolean("isFatal", true); + reportException(data); + } + } else { + { + try { + Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("handleReactNativeError", String.class, Object.class, Integer.class, Boolean.class).invoke(null, message, stack, (int) idDouble, true); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + } + } + } + } - String extraDataAsJson = ExceptionDataHelper.getExtraDataAsJson(data); - if (isFatal) { - throw new JavascriptException(JSStackTrace.format(message, stack)) - .setExtraDataAsJson(extraDataAsJson); - } else { - FLog.e(ReactConstants.TAG, JSStackTrace.format(message, stack)); - if (extraDataAsJson != null) { - FLog.d(ReactConstants.TAG, "extraData: %s", extraDataAsJson); - } + @Override + public void reportSoftException(String message, ReadableArray stack, double idDouble) { + if (mDevSupportManager.getDevSupportEnabled()) { + { + int id = (int) idDouble; + JavaOnlyMap data = new JavaOnlyMap(); + data.putString("message", message); + data.putArray("stack", stack); + data.putInt("id", id); + data.putBoolean("isFatal", false); + reportException(data); + } + } else { + { + try { + Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("handleReactNativeError", String.class, Object.class, Integer.class, Boolean.class).invoke(null, message, stack, (int) idDouble, false); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + } + } + } } - } - @Override - public void updateExceptionMessage( - String title, ReadableArray details, double exceptionIdDouble) { - int exceptionId = (int) exceptionIdDouble; + @Override + public void reportException(ReadableMap data) { + String message = data.hasKey("message") ? data.getString("message") : ""; + ReadableArray stack = data.hasKey("stack") ? data.getArray("stack") : Arguments.createArray(); + boolean isFatal = data.hasKey("isFatal") ? data.getBoolean("isFatal") : false; + String extraDataAsJson = ExceptionDataHelper.getExtraDataAsJson(data); + if (isFatal) { + throw new JavascriptException(JSStackTrace.format(message, stack)).setExtraDataAsJson(extraDataAsJson); + } else { + FLog.e(ReactConstants.TAG, JSStackTrace.format(message, stack)); + if (extraDataAsJson != null) { + FLog.d(ReactConstants.TAG, "extraData: %s", extraDataAsJson); + } + } + } - if (mDevSupportManager.getDevSupportEnabled()) { - mDevSupportManager.updateJSError(title, details, exceptionId); + @Override + public void updateExceptionMessage(String title, ReadableArray details, double exceptionIdDouble) { + if (mDevSupportManager.getDevSupportEnabled()) { + { + int exceptionId = (int) exceptionIdDouble; + if (mDevSupportManager.getDevSupportEnabled()) { + mDevSupportManager.updateJSError(title, details, exceptionId); + } + } + } else { + { + try { + Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("handleReactNativeError", String.class, Object.class, Integer.class, Boolean.class).invoke(null, title, details, (int) exceptionIdDouble, false); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + } + } + } } - } - @Override - public void dismissRedbox() { - if (mDevSupportManager.getDevSupportEnabled()) { - mDevSupportManager.hideRedboxDialog(); + @Override + public void dismissRedbox() { + if (mDevSupportManager.getDevSupportEnabled()) { + mDevSupportManager.hideRedboxDialog(); + } } - } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java index 08a77564d557..3d4e7779167a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java @@ -4,39 +4,40 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.modules.debug.interfaces; /** Provides access to React Native developers settings. */ public interface DeveloperSettings { - /** @return whether an overlay showing current FPS should be shown. */ - boolean isFpsDebugEnabled(); + /** @return whether an overlay showing current FPS should be shown. */ + boolean isFpsDebugEnabled(); + + /** @return Whether debug information about transitions should be displayed. */ + boolean isAnimationFpsDebugEnabled(); - /** @return Whether debug information about transitions should be displayed. */ - boolean isAnimationFpsDebugEnabled(); + /** @return Whether dev mode should be enabled in JS bundles. */ + boolean isJSDevModeEnabled(); - /** @return Whether dev mode should be enabled in JS bundles. */ - boolean isJSDevModeEnabled(); + /** @return Whether JS bundle should be minified. */ + boolean isJSMinifyEnabled(); - /** @return Whether JS bundle should be minified. */ - boolean isJSMinifyEnabled(); + /** @return Whether element inspector is enabled. */ + boolean isElementInspectorEnabled(); - /** @return Whether element inspector is enabled. */ - boolean isElementInspectorEnabled(); + /** @return Whether Nuclide JS debugging is enabled. */ + boolean isDeviceDebugEnabled(); - /** @return Whether Nuclide JS debugging is enabled. */ - boolean isDeviceDebugEnabled(); + /** @return Whether remote JS debugging is enabled. */ + boolean isRemoteJSDebugEnabled(); - /** @return Whether remote JS debugging is enabled. */ - boolean isRemoteJSDebugEnabled(); + /** Enable/Disable remote JS debugging. */ + void setRemoteJSDebugEnabled(boolean remoteJSDebugEnabled); - /** Enable/Disable remote JS debugging. */ - void setRemoteJSDebugEnabled(boolean remoteJSDebugEnabled); + /** @return Whether Start Sampling Profiler on App Start is enabled. */ + boolean isStartSamplingProfilerOnInit(); - /** @return Whether Start Sampling Profiler on App Start is enabled. */ - boolean isStartSamplingProfilerOnInit(); + /** Add an item to the dev menu. */ + void addMenuItem(String title); - /** Add an item to the dev menu. */ - void addMenuItem(String title); +int getExponentActivityId(); } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java index d99f152fe8f5..964bc3f417ce 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.modules.dialog; import android.app.Activity; @@ -32,209 +31,225 @@ @ReactModule(name = NativeDialogManagerAndroidSpec.NAME) public class DialogModule extends NativeDialogManagerAndroidSpec implements LifecycleEventListener { - /* package */ static final String FRAGMENT_TAG = - "com.facebook.catalyst.react.dialog.DialogModule"; + /* package */ + public static String FRAGMENT_TAG = "com.facebook.catalyst.react.dialog.DialogModule"; - /* package */ static final String ACTION_BUTTON_CLICKED = "buttonClicked"; - /* package */ static final String ACTION_DISMISSED = "dismissed"; - /* package */ static final String KEY_TITLE = "title"; - /* package */ static final String KEY_MESSAGE = "message"; - /* package */ static final String KEY_BUTTON_POSITIVE = "buttonPositive"; - /* package */ static final String KEY_BUTTON_NEGATIVE = "buttonNegative"; - /* package */ static final String KEY_BUTTON_NEUTRAL = "buttonNeutral"; - /* package */ static final String KEY_ITEMS = "items"; - /* package */ static final String KEY_CANCELABLE = "cancelable"; + /* package */ + public static String ACTION_BUTTON_CLICKED = "buttonClicked"; - /* package */ static final Map CONSTANTS = - MapBuilder.of( - ACTION_BUTTON_CLICKED, ACTION_BUTTON_CLICKED, - ACTION_DISMISSED, ACTION_DISMISSED, - KEY_BUTTON_POSITIVE, DialogInterface.BUTTON_POSITIVE, - KEY_BUTTON_NEGATIVE, DialogInterface.BUTTON_NEGATIVE, - KEY_BUTTON_NEUTRAL, DialogInterface.BUTTON_NEUTRAL); + /* package */ + public static String ACTION_DISMISSED = "dismissed"; - private boolean mIsInForeground; + /* package */ + public static String KEY_TITLE = "title"; - public DialogModule(ReactApplicationContext reactContext) { - super(reactContext); - } + /* package */ + public static String KEY_MESSAGE = "message"; - private class FragmentManagerHelper { - private final @NonNull FragmentManager mFragmentManager; + /* package */ + public static String KEY_BUTTON_POSITIVE = "buttonPositive"; - private @Nullable Object mFragmentToShow; + /* package */ + public static String KEY_BUTTON_NEGATIVE = "buttonNegative"; - public FragmentManagerHelper(@NonNull FragmentManager fragmentManager) { - mFragmentManager = fragmentManager; - } + /* package */ + public static String KEY_BUTTON_NEUTRAL = "buttonNeutral"; - public void showPendingAlert() { - UiThreadUtil.assertOnUiThread(); - SoftAssertions.assertCondition(mIsInForeground, "showPendingAlert() called in background"); - if (mFragmentToShow == null) { - return; - } + /* package */ + public static String KEY_ITEMS = "items"; - dismissExisting(); - ((AlertFragment) mFragmentToShow).show(mFragmentManager, FRAGMENT_TAG); - mFragmentToShow = null; - } + /* package */ + public static String KEY_CANCELABLE = "cancelable"; - private void dismissExisting() { - if (!mIsInForeground) { - return; - } - AlertFragment oldFragment = (AlertFragment) mFragmentManager.findFragmentByTag(FRAGMENT_TAG); - if (oldFragment != null && oldFragment.isResumed()) { - oldFragment.dismiss(); - } + /* package */ + public static Map CONSTANTS = MapBuilder.of(ACTION_BUTTON_CLICKED, ACTION_BUTTON_CLICKED, ACTION_DISMISSED, ACTION_DISMISSED, KEY_BUTTON_POSITIVE, DialogInterface.BUTTON_POSITIVE, KEY_BUTTON_NEGATIVE, DialogInterface.BUTTON_NEGATIVE, KEY_BUTTON_NEUTRAL, DialogInterface.BUTTON_NEUTRAL); + + public boolean mIsInForeground; + + public DialogModule(ReactApplicationContext reactContext) { + super(reactContext); } - public void showNewAlert(Bundle arguments, Callback actionCallback) { - UiThreadUtil.assertOnUiThread(); + private class FragmentManagerHelper { - dismissExisting(); + @NonNull + public final FragmentManager mFragmentManager; - AlertFragmentListener actionListener = - actionCallback != null ? new AlertFragmentListener(actionCallback) : null; + @Nullable + public Object mFragmentToShow; - AlertFragment alertFragment = new AlertFragment(actionListener, arguments); - if (mIsInForeground && !mFragmentManager.isStateSaved()) { - if (arguments.containsKey(KEY_CANCELABLE)) { - alertFragment.setCancelable(arguments.getBoolean(KEY_CANCELABLE)); + public FragmentManagerHelper(@NonNull FragmentManager fragmentManager) { + mFragmentManager = fragmentManager; } - alertFragment.show(mFragmentManager, FRAGMENT_TAG); - } else { - mFragmentToShow = alertFragment; - } - } - } - /* package */ class AlertFragmentListener implements OnClickListener, OnDismissListener { + public void showPendingAlert() { + UiThreadUtil.assertOnUiThread(); + SoftAssertions.assertCondition(mIsInForeground, "showPendingAlert() called in background"); + if (mFragmentToShow == null) { + return; + } + dismissExisting(); + ((AlertFragment) mFragmentToShow).show(mFragmentManager, FRAGMENT_TAG); + mFragmentToShow = null; + } - private final Callback mCallback; - private boolean mCallbackConsumed = false; + private void dismissExisting() { + if (!mIsInForeground) { + return; + } + AlertFragment oldFragment = (AlertFragment) mFragmentManager.findFragmentByTag(FRAGMENT_TAG); + if (oldFragment != null && oldFragment.isResumed()) { + oldFragment.dismiss(); + } + } - public AlertFragmentListener(Callback callback) { - mCallback = callback; + public void showNewAlert(Bundle arguments, Callback actionCallback) { + UiThreadUtil.assertOnUiThread(); + dismissExisting(); + AlertFragmentListener actionListener = actionCallback != null ? new AlertFragmentListener(actionCallback) : null; + AlertFragment alertFragment = new AlertFragment(actionListener, arguments); + if (mIsInForeground && !mFragmentManager.isStateSaved()) { + if (arguments.containsKey(KEY_CANCELABLE)) { + alertFragment.setCancelable(arguments.getBoolean(KEY_CANCELABLE)); + } + alertFragment.show(mFragmentManager, FRAGMENT_TAG); + } else { + mFragmentToShow = alertFragment; + } + } } - @Override - public void onClick(DialogInterface dialog, int which) { - if (!mCallbackConsumed) { - if (getReactApplicationContext().hasActiveReactInstance()) { - mCallback.invoke(ACTION_BUTTON_CLICKED, which); - mCallbackConsumed = true; + /* package */ + class AlertFragmentListener implements OnClickListener, OnDismissListener { + + public final Callback mCallback; + + public boolean mCallbackConsumed = false; + + public AlertFragmentListener(Callback callback) { + mCallback = callback; } - } - } - @Override - public void onDismiss(DialogInterface dialog) { - if (!mCallbackConsumed) { - if (getReactApplicationContext().hasActiveReactInstance()) { - mCallback.invoke(ACTION_DISMISSED); - mCallbackConsumed = true; + @Override + public void onClick(DialogInterface dialog, int which) { + if (!mCallbackConsumed) { + if (getReactApplicationContext().hasActiveReactInstance()) { + mCallback.invoke(ACTION_BUTTON_CLICKED, which); + mCallbackConsumed = true; + } + } } - } - } - } - - @Override - public Map getTypedExportedConstants() { - return CONSTANTS; - } - - @Override - public void initialize() { - getReactApplicationContext().addLifecycleEventListener(this); - } - - @Override - public void onHostPause() { - // Don't show the dialog if the host is paused. - mIsInForeground = false; - } - - @Override - public void onHostDestroy() {} - - @Override - public void onHostResume() { - mIsInForeground = true; - // Check if a dialog has been created while the host was paused, so that we can show it now. - FragmentManagerHelper fragmentManagerHelper = getFragmentManagerHelper(); - if (fragmentManagerHelper != null) { - fragmentManagerHelper.showPendingAlert(); - } else { - FLog.w(DialogModule.class, "onHostResume called but no FragmentManager found"); - } - } - - @Override - public void showAlert( - ReadableMap options, Callback errorCallback, final Callback actionCallback) { - final FragmentManagerHelper fragmentManagerHelper = getFragmentManagerHelper(); - if (fragmentManagerHelper == null) { - errorCallback.invoke("Tried to show an alert while not attached to an Activity"); - return; - } - final Bundle args = new Bundle(); - if (options.hasKey(KEY_TITLE)) { - args.putString(AlertFragment.ARG_TITLE, options.getString(KEY_TITLE)); - } - if (options.hasKey(KEY_MESSAGE)) { - args.putString(AlertFragment.ARG_MESSAGE, options.getString(KEY_MESSAGE)); + @Override + public void onDismiss(DialogInterface dialog) { + if (!mCallbackConsumed) { + if (getReactApplicationContext().hasActiveReactInstance()) { + mCallback.invoke(ACTION_DISMISSED); + mCallbackConsumed = true; + } + } + } } - if (options.hasKey(KEY_BUTTON_POSITIVE)) { - args.putString(AlertFragment.ARG_BUTTON_POSITIVE, options.getString(KEY_BUTTON_POSITIVE)); + + @Override + public Map getTypedExportedConstants() { + return CONSTANTS; } - if (options.hasKey(KEY_BUTTON_NEGATIVE)) { - args.putString(AlertFragment.ARG_BUTTON_NEGATIVE, options.getString(KEY_BUTTON_NEGATIVE)); + + @Override + public void initialize() { + getReactApplicationContext().addLifecycleEventListener(this); } - if (options.hasKey(KEY_BUTTON_NEUTRAL)) { - args.putString(AlertFragment.ARG_BUTTON_NEUTRAL, options.getString(KEY_BUTTON_NEUTRAL)); + + @Override + public void onHostPause() { + // Don't show the dialog if the host is paused. + mIsInForeground = false; } - if (options.hasKey(KEY_ITEMS)) { - ReadableArray items = options.getArray(KEY_ITEMS); - CharSequence[] itemsArray = new CharSequence[items.size()]; - for (int i = 0; i < items.size(); i++) { - itemsArray[i] = items.getString(i); - } - args.putCharSequenceArray(AlertFragment.ARG_ITEMS, itemsArray); + + @Override + public void onHostDestroy() { } - if (options.hasKey(KEY_CANCELABLE)) { - args.putBoolean(KEY_CANCELABLE, options.getBoolean(KEY_CANCELABLE)); + + @Override + public void onHostResume() { + try { + { + mIsInForeground = true; + // Check if a dialog has been created while the host was paused, so that we can show it now. + FragmentManagerHelper fragmentManagerHelper = getFragmentManagerHelper(); + if (fragmentManagerHelper != null) { + fragmentManagerHelper.showPendingAlert(); + } else { + FLog.w(DialogModule.class, "onHostResume called but no FragmentManager found"); + } + } + } catch (Throwable expoException) { + } } - UiThreadUtil.runOnUiThread( - new Runnable() { - @Override - public void run() { - fragmentManagerHelper.showNewAlert(args, actionCallback); - } + @Override + public void showAlert(ReadableMap options, Callback errorCallback, final Callback actionCallback) { + final FragmentManagerHelper fragmentManagerHelper = getFragmentManagerHelper(); + if (fragmentManagerHelper == null) { + errorCallback.invoke("Tried to show an alert while not attached to an Activity"); + return; + } + final Bundle args = new Bundle(); + if (options.hasKey(KEY_TITLE)) { + args.putString(AlertFragment.ARG_TITLE, options.getString(KEY_TITLE)); + } + if (options.hasKey(KEY_MESSAGE)) { + args.putString(AlertFragment.ARG_MESSAGE, options.getString(KEY_MESSAGE)); + } + if (options.hasKey(KEY_BUTTON_POSITIVE)) { + args.putString(AlertFragment.ARG_BUTTON_POSITIVE, options.getString(KEY_BUTTON_POSITIVE)); + } + if (options.hasKey(KEY_BUTTON_NEGATIVE)) { + args.putString(AlertFragment.ARG_BUTTON_NEGATIVE, options.getString(KEY_BUTTON_NEGATIVE)); + } + if (options.hasKey(KEY_BUTTON_NEUTRAL)) { + args.putString(AlertFragment.ARG_BUTTON_NEUTRAL, options.getString(KEY_BUTTON_NEUTRAL)); + } + if (options.hasKey(KEY_ITEMS)) { + ReadableArray items = options.getArray(KEY_ITEMS); + CharSequence[] itemsArray = new CharSequence[items.size()]; + for (int i = 0; i < items.size(); i++) { + itemsArray[i] = items.getString(i); + } + args.putCharSequenceArray(AlertFragment.ARG_ITEMS, itemsArray); + } + if (options.hasKey(KEY_CANCELABLE)) { + args.putBoolean(KEY_CANCELABLE, options.getBoolean(KEY_CANCELABLE)); + } + UiThreadUtil.runOnUiThread(new Runnable() { + + @Override + public void run() { + fragmentManagerHelper.showNewAlert(args, actionCallback); + } }); - } + } - /** + /** * Creates a new helper to work with FragmentManager. Returns null if we're not attached to an * Activity. * *

DO NOT HOLD LONG-LIVED REFERENCES TO THE OBJECT RETURNED BY THIS METHOD, AS THIS WILL CAUSE * MEMORY LEAKS. */ - private @Nullable FragmentManagerHelper getFragmentManagerHelper() { - Activity activity = getCurrentActivity(); - if (activity == null || !(activity instanceof FragmentActivity)) { - return null; + @Nullable + private FragmentManagerHelper getFragmentManagerHelper() { + Activity activity = getCurrentActivity(); + if (activity == null || !(activity instanceof FragmentActivity)) { + return null; + } + return new FragmentManagerHelper(((FragmentActivity) activity).getSupportFragmentManager()); + } + + @Override + public void invalidate() { + getReactApplicationContext().removeLifecycleEventListener(this); + super.invalidate(); } - return new FragmentManagerHelper(((FragmentActivity) activity).getSupportFragmentManager()); - } - - @Override - public void invalidate() { - getReactApplicationContext().removeLifecycleEventListener(this); - super.invalidate(); - } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java index 4b23bdde76c3..225bfd8756cc 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.modules.network; import android.net.Uri; @@ -50,733 +49,609 @@ /** Implements the XMLHttpRequest JavaScript interface. */ @ReactModule(name = NativeNetworkingAndroidSpec.NAME) -public final class NetworkingModule extends NativeNetworkingAndroidSpec { +public class NetworkingModule extends NativeNetworkingAndroidSpec { - /** + /** * Allows to implement a custom fetching process for specific URIs. It is the handler's job to * fetch the URI and return the JS body payload. */ - public interface UriHandler { - /** Returns if the handler should be used for an URI. */ - boolean supports(Uri uri, String responseType); - - /** Fetch the URI and return the JS body payload. */ - WritableMap fetch(Uri uri) throws IOException; - } - - /** Allows adding custom handling to build the {@link RequestBody} from the JS body payload. */ - public interface RequestBodyHandler { - /** Returns if the handler should be used for a JS body payload. */ - boolean supports(ReadableMap map); - - /** Returns the {@link RequestBody} for the JS body payload. */ - RequestBody toRequestBody(ReadableMap map, String contentType); - } - - /** Allows adding custom handling to build the JS body payload from the {@link ResponseBody}. */ - public interface ResponseHandler { - /** Returns if the handler should be used for a response type. */ - boolean supports(String responseType); - - /** Returns the JS body payload for the {@link ResponseBody}. */ - WritableMap toResponseData(ResponseBody body) throws IOException; - } - - private static final String TAG = NativeNetworkingAndroidSpec.NAME; - private static final String CONTENT_ENCODING_HEADER_NAME = "content-encoding"; - private static final String CONTENT_TYPE_HEADER_NAME = "content-type"; - private static final String REQUEST_BODY_KEY_STRING = "string"; - private static final String REQUEST_BODY_KEY_URI = "uri"; - private static final String REQUEST_BODY_KEY_FORMDATA = "formData"; - private static final String REQUEST_BODY_KEY_BASE64 = "base64"; - private static final String USER_AGENT_HEADER_NAME = "user-agent"; - private static final int CHUNK_TIMEOUT_NS = 100 * 1000000; // 100ms - private static final int MAX_CHUNK_SIZE_BETWEEN_FLUSHES = 8 * 1024; // 8K - - private static @Nullable com.facebook.react.modules.network.CustomClientBuilder - customClientBuilder = null; - - private final OkHttpClient mClient; - private final ForwardingCookieHandler mCookieHandler; - private final @Nullable String mDefaultUserAgent; - private final CookieJarContainer mCookieJarContainer; - private final Set mRequestIds; - private final List mRequestBodyHandlers = new ArrayList<>(); - private final List mUriHandlers = new ArrayList<>(); - private final List mResponseHandlers = new ArrayList<>(); - private boolean mShuttingDown; - - public NetworkingModule( - ReactApplicationContext reactContext, - @Nullable String defaultUserAgent, - OkHttpClient client, - @Nullable List networkInterceptorCreators) { - super(reactContext); - - if (networkInterceptorCreators != null) { - OkHttpClient.Builder clientBuilder = client.newBuilder(); - for (NetworkInterceptorCreator networkInterceptorCreator : networkInterceptorCreators) { - clientBuilder.addNetworkInterceptor(networkInterceptorCreator.create()); - } - client = clientBuilder.build(); - } - mClient = client; - mCookieHandler = new ForwardingCookieHandler(reactContext); - mCookieJarContainer = (CookieJarContainer) mClient.cookieJar(); - mShuttingDown = false; - mDefaultUserAgent = defaultUserAgent; - mRequestIds = new HashSet<>(); - } - - /** - * @param context the ReactContext of the application - * @param defaultUserAgent the User-Agent header that will be set for all requests where the - * caller does not provide one explicitly - * @param client the {@link OkHttpClient} to be used for networking - */ - /* package */ NetworkingModule( - ReactApplicationContext context, @Nullable String defaultUserAgent, OkHttpClient client) { - this(context, defaultUserAgent, client, null); - } + public interface UriHandler { + + /** Returns if the handler should be used for an URI. */ + boolean supports(Uri uri, String responseType); + + /** Fetch the URI and return the JS body payload. */ + WritableMap fetch(Uri uri) throws IOException; + } + + /** Allows adding custom handling to build the {@link RequestBody} from the JS body payload. */ + public interface RequestBodyHandler { + + /** Returns if the handler should be used for a JS body payload. */ + boolean supports(ReadableMap map); + + /** Returns the {@link RequestBody} for the JS body payload. */ + RequestBody toRequestBody(ReadableMap map, String contentType); + } + + /** Allows adding custom handling to build the JS body payload from the {@link ResponseBody}. */ + public interface ResponseHandler { + + /** Returns if the handler should be used for a response type. */ + boolean supports(String responseType); + + /** Returns the JS body payload for the {@link ResponseBody}. */ + WritableMap toResponseData(ResponseBody body) throws IOException; + } + + public static String TAG = NativeNetworkingAndroidSpec.NAME; + + public static String CONTENT_ENCODING_HEADER_NAME = "content-encoding"; + + public static String CONTENT_TYPE_HEADER_NAME = "content-type"; + + public static String REQUEST_BODY_KEY_STRING = "string"; + + public static String REQUEST_BODY_KEY_URI = "uri"; + + public static String REQUEST_BODY_KEY_FORMDATA = "formData"; + + public static String REQUEST_BODY_KEY_BASE64 = "base64"; + + public static String USER_AGENT_HEADER_NAME = "user-agent"; + + // 100ms + public static int CHUNK_TIMEOUT_NS = 100 * 1000000; + + // 8K + public static int MAX_CHUNK_SIZE_BETWEEN_FLUSHES = 8 * 1024; + + @Nullable + public static com.facebook.react.modules.network.CustomClientBuilder customClientBuilder = null; + + public final OkHttpClient mClient; + + public final ForwardingCookieHandler mCookieHandler; + + @Nullable + public final String mDefaultUserAgent; + + public final CookieJarContainer mCookieJarContainer; + + public final Set mRequestIds; + + public final List mRequestBodyHandlers = new ArrayList<>(); + + public final List mUriHandlers = new ArrayList<>(); + + public final List mResponseHandlers = new ArrayList<>(); + + public boolean mShuttingDown; + + public NetworkingModule(ReactApplicationContext reactContext, @Nullable String defaultUserAgent, OkHttpClient client, @Nullable List networkInterceptorCreators) { + super(reactContext); + if (networkInterceptorCreators != null) { + OkHttpClient.Builder clientBuilder = client.newBuilder(); + for (NetworkInterceptorCreator networkInterceptorCreator : networkInterceptorCreators) { + clientBuilder.addNetworkInterceptor(networkInterceptorCreator.create()); + } + client = clientBuilder.build(); + } + mClient = client; + mCookieHandler = new ForwardingCookieHandler(reactContext); + mCookieJarContainer = (CookieJarContainer) mClient.cookieJar(); + mShuttingDown = false; + mDefaultUserAgent = defaultUserAgent; + mRequestIds = new HashSet<>(); + } - /** @param context the ReactContext of the application */ - public NetworkingModule(final ReactApplicationContext context) { - this(context, null, OkHttpClientProvider.createClient(context), null); - } + /* package */ + NetworkingModule(ReactApplicationContext context, @Nullable String defaultUserAgent, OkHttpClient client) { + this(context, defaultUserAgent, client, null); + } + + /** @param context the ReactContext of the application */ + public NetworkingModule(final ReactApplicationContext context) { + this(context, null, OkHttpClientProvider.createClient(context), null); + } - /** + /** * @param context the ReactContext of the application * @param networkInterceptorCreators list of {@link NetworkInterceptorCreator}'s whose create() * methods would be called to attach the interceptors to the client. */ - public NetworkingModule( - ReactApplicationContext context, List networkInterceptorCreators) { - this(context, null, OkHttpClientProvider.createClient(context), networkInterceptorCreators); - } + public NetworkingModule(ReactApplicationContext context, List networkInterceptorCreators) { + this(context, null, OkHttpClientProvider.createClient(context), networkInterceptorCreators); + } - /** + /** * @param context the ReactContext of the application * @param defaultUserAgent the User-Agent header that will be set for all requests where the * caller does not provide one explicitly */ - public NetworkingModule(ReactApplicationContext context, String defaultUserAgent) { - this(context, defaultUserAgent, OkHttpClientProvider.createClient(context), null); - } + public NetworkingModule(ReactApplicationContext context, String defaultUserAgent) { + this(context, defaultUserAgent, OkHttpClientProvider.createClient(context), null); + } - public static void setCustomClientBuilder( - com.facebook.react.modules.network.CustomClientBuilder ccb) { - customClientBuilder = ccb; - } + public static void setCustomClientBuilder(com.facebook.react.modules.network.CustomClientBuilder ccb) { + customClientBuilder = ccb; + } - /** + /** * @deprecated To be removed in a future release. See * https://github.com/facebook/react-native/pull/37798#pullrequestreview-1518338914 */ - @Deprecated - public interface CustomClientBuilder - extends com.facebook.react.modules.network.CustomClientBuilder {} - - private static void applyCustomBuilder(OkHttpClient.Builder builder) { - if (customClientBuilder != null) { - customClientBuilder.apply(builder); - } - } - - @Override - public void initialize() { - mCookieJarContainer.setCookieJar(new JavaNetCookieJar(mCookieHandler)); - } - - @Override - public void invalidate() { - mShuttingDown = true; - cancelAllRequests(); - - mCookieHandler.destroy(); - mCookieJarContainer.removeCookieJar(); - - mRequestBodyHandlers.clear(); - mResponseHandlers.clear(); - mUriHandlers.clear(); - } - - public void addUriHandler(UriHandler handler) { - mUriHandlers.add(handler); - } - - public void addRequestBodyHandler(RequestBodyHandler handler) { - mRequestBodyHandlers.add(handler); - } - - public void addResponseHandler(ResponseHandler handler) { - mResponseHandlers.add(handler); - } - - public void removeUriHandler(UriHandler handler) { - mUriHandlers.remove(handler); - } - - public void removeRequestBodyHandler(RequestBodyHandler handler) { - mRequestBodyHandlers.remove(handler); - } - - public void removeResponseHandler(ResponseHandler handler) { - mResponseHandlers.remove(handler); - } - - @Override - public void sendRequest( - String method, - String url, - double requestIdAsDouble, - ReadableArray headers, - ReadableMap data, - String responseType, - boolean useIncrementalUpdates, - double timeoutAsDouble, - boolean withCredentials) { - int requestId = (int) requestIdAsDouble; - int timeout = (int) timeoutAsDouble; - try { - sendRequestInternal( - method, - url, - requestId, - headers, - data, - responseType, - useIncrementalUpdates, - timeout, - withCredentials); - } catch (Throwable th) { - FLog.e(TAG, "Failed to send url request: " + url, th); - - ResponseUtil.onRequestError( - getReactApplicationContextIfActiveOrWarn(), requestId, th.getMessage(), th); - } - } - - /** @param timeout value of 0 results in no timeout */ - public void sendRequestInternal( - String method, - String url, - final int requestId, - ReadableArray headers, - ReadableMap data, - final String responseType, - final boolean useIncrementalUpdates, - int timeout, - boolean withCredentials) { - final ReactApplicationContext reactApplicationContext = - getReactApplicationContextIfActiveOrWarn(); - try { - Uri uri = Uri.parse(url); - - // Check if a handler is registered - for (UriHandler handler : mUriHandlers) { - if (handler.supports(uri, responseType)) { - WritableMap res = handler.fetch(uri); - ResponseUtil.onDataReceived(reactApplicationContext, requestId, res); - ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); - return; + @Deprecated + public interface CustomClientBuilder extends com.facebook.react.modules.network.CustomClientBuilder { + } + + private static void applyCustomBuilder(OkHttpClient.Builder builder) { + if (customClientBuilder != null) { + customClientBuilder.apply(builder); } - } - } catch (IOException e) { - ResponseUtil.onRequestError(reactApplicationContext, requestId, e.getMessage(), e); - return; } - Request.Builder requestBuilder; - try { - requestBuilder = new Request.Builder().url(url); - } catch (Exception e) { - ResponseUtil.onRequestError(reactApplicationContext, requestId, e.getMessage(), null); - return; + @Override + public void initialize() { + mCookieJarContainer.setCookieJar(new JavaNetCookieJar(mCookieHandler)); } - if (requestId != 0) { - requestBuilder.tag(requestId); + @Override + public void invalidate() { + mShuttingDown = true; + cancelAllRequests(); + mCookieHandler.destroy(); + mCookieJarContainer.removeCookieJar(); + mRequestBodyHandlers.clear(); + mResponseHandlers.clear(); + mUriHandlers.clear(); } - OkHttpClient.Builder clientBuilder = mClient.newBuilder(); + public void addUriHandler(UriHandler handler) { + mUriHandlers.add(handler); + } + + public void addRequestBodyHandler(RequestBodyHandler handler) { + mRequestBodyHandlers.add(handler); + } + + public void addResponseHandler(ResponseHandler handler) { + mResponseHandlers.add(handler); + } + + public void removeUriHandler(UriHandler handler) { + mUriHandlers.remove(handler); + } + + public void removeRequestBodyHandler(RequestBodyHandler handler) { + mRequestBodyHandlers.remove(handler); + } - applyCustomBuilder(clientBuilder); + public void removeResponseHandler(ResponseHandler handler) { + mResponseHandlers.remove(handler); + } - if (!withCredentials) { - clientBuilder.cookieJar(CookieJar.NO_COOKIES); + @Override + public void sendRequest(String method, String url, double requestIdAsDouble, ReadableArray headers, ReadableMap data, String responseType, boolean useIncrementalUpdates, double timeoutAsDouble, boolean withCredentials) { + int requestId = (int) requestIdAsDouble; + int timeout = (int) timeoutAsDouble; + try { + sendRequestInternal(method, url, requestId, headers, data, responseType, useIncrementalUpdates, timeout, withCredentials); + } catch (Throwable th) { + FLog.e(TAG, "Failed to send url request: " + url, th); + ResponseUtil.onRequestError(getReactApplicationContextIfActiveOrWarn(), requestId, th.getMessage(), th); + } } - // If JS is listening for progress updates, install a ProgressResponseBody that intercepts the - // response and counts bytes received. - if (useIncrementalUpdates) { - clientBuilder.addNetworkInterceptor( - chain -> { - Response originalResponse = chain.proceed(chain.request()); - ProgressResponseBody responseBody = - new ProgressResponseBody( - originalResponse.body(), - new ProgressListener() { - long last = System.nanoTime(); + /** @param timeout value of 0 results in no timeout */ + public void sendRequestInternal(String method, String url, final int requestId, ReadableArray headers, ReadableMap data, final String responseType, final boolean useIncrementalUpdates, int timeout, boolean withCredentials) { + final ReactApplicationContext reactApplicationContext = getReactApplicationContextIfActiveOrWarn(); + try { + Uri uri = Uri.parse(url); + // Check if a handler is registered + for (UriHandler handler : mUriHandlers) { + if (handler.supports(uri, responseType)) { + WritableMap res = handler.fetch(uri); + ResponseUtil.onDataReceived(reactApplicationContext, requestId, res); + ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); + return; + } + } + } catch (IOException e) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, e.getMessage(), e); + return; + } + Request.Builder requestBuilder; + try { + requestBuilder = new Request.Builder().url(url); + } catch (Exception e) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, e.getMessage(), null); + return; + } + if (requestId != 0) { + requestBuilder.tag(requestId); + } + OkHttpClient.Builder clientBuilder = mClient.newBuilder(); + applyCustomBuilder(clientBuilder); + if (!withCredentials) { + clientBuilder.cookieJar(CookieJar.NO_COOKIES); + } + // response and counts bytes received. + if (useIncrementalUpdates) { + clientBuilder.addNetworkInterceptor(chain -> { + Response originalResponse = chain.proceed(chain.request()); + ProgressResponseBody responseBody = new ProgressResponseBody(originalResponse.body(), new ProgressListener() { - @Override - public void onProgress(long bytesWritten, long contentLength, boolean done) { + public long last = System.nanoTime(); + + @Override + public void onProgress(long bytesWritten, long contentLength, boolean done) { long now = System.nanoTime(); if (!done && !shouldDispatch(now, last)) { - return; + return; } if (responseType.equals("text")) { - // For 'text' responses we continuously send response data with progress - // info to - // JS below, so no need to do anything here. - return; + // JS below, so no need to do anything here. + return; } - ResponseUtil.onDataReceivedProgress( - reactApplicationContext, requestId, bytesWritten, contentLength); + ResponseUtil.onDataReceivedProgress(reactApplicationContext, requestId, bytesWritten, contentLength); last = now; - } - }); - return originalResponse.newBuilder().body(responseBody).build(); - }); - } - - // If the current timeout does not equal the passed in timeout, we need to clone the existing - // client and set the timeout explicitly on the clone. This is cheap as everything else is - // shared under the hood. - // See https://github.com/square/okhttp/wiki/Recipes#per-call-configuration for more information - if (timeout != mClient.callTimeoutMillis()) { - clientBuilder.callTimeout(timeout, TimeUnit.MILLISECONDS); - } - OkHttpClient client = clientBuilder.build(); - - Headers requestHeaders = extractHeaders(headers, data); - if (requestHeaders == null) { - ResponseUtil.onRequestError( - reactApplicationContext, requestId, "Unrecognized headers format", null); - return; - } - String contentType = requestHeaders.get(CONTENT_TYPE_HEADER_NAME); - String contentEncoding = requestHeaders.get(CONTENT_ENCODING_HEADER_NAME); - requestBuilder.headers(requestHeaders); - - // Check if a handler is registered - RequestBodyHandler handler = null; - if (data != null) { - for (RequestBodyHandler curHandler : mRequestBodyHandlers) { - if (curHandler.supports(data)) { - handler = curHandler; - break; + } + }); + return originalResponse.newBuilder().body(responseBody).build(); + }); } - } - } - - RequestBody requestBody; - if (data == null - || method.toLowerCase(Locale.ROOT).equals("get") - || method.toLowerCase(Locale.ROOT).equals("head")) { - requestBody = RequestBodyUtil.getEmptyBody(method); - } else if (handler != null) { - requestBody = handler.toRequestBody(data, contentType); - } else if (data.hasKey(REQUEST_BODY_KEY_STRING)) { - if (contentType == null) { - ResponseUtil.onRequestError( - reactApplicationContext, - requestId, - "Payload is set but no content-type header specified", - null); - return; - } - String body = data.getString(REQUEST_BODY_KEY_STRING); - MediaType contentMediaType = MediaType.parse(contentType); - if (RequestBodyUtil.isGzipEncoding(contentEncoding)) { - requestBody = RequestBodyUtil.createGzip(contentMediaType, body); - if (requestBody == null) { - ResponseUtil.onRequestError( - reactApplicationContext, requestId, "Failed to gzip request body", null); - return; + // See https://github.com/square/okhttp/wiki/Recipes#per-call-configuration for more information + if (timeout != mClient.callTimeoutMillis()) { + clientBuilder.callTimeout(timeout, TimeUnit.MILLISECONDS); + } + OkHttpClient client = clientBuilder.build(); + Headers requestHeaders = extractHeaders(headers, data); + if (requestHeaders == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Unrecognized headers format", null); + return; } - } else { - // Use getBytes() to convert the body into a byte[], preventing okhttp from - // appending the character set to the Content-Type header when otherwise unspecified - // https://github.com/facebook/react-native/issues/8237 - Charset charset = - contentMediaType == null - ? StandardCharsets.UTF_8 - : contentMediaType.charset(StandardCharsets.UTF_8); - requestBody = RequestBody.create(contentMediaType, body.getBytes(charset)); - } - } else if (data.hasKey(REQUEST_BODY_KEY_BASE64)) { - if (contentType == null) { - ResponseUtil.onRequestError( - reactApplicationContext, - requestId, - "Payload is set but no content-type header specified", - null); - return; - } - String base64String = data.getString(REQUEST_BODY_KEY_BASE64); - MediaType contentMediaType = MediaType.parse(contentType); - requestBody = RequestBody.create(contentMediaType, ByteString.decodeBase64(base64String)); - } else if (data.hasKey(REQUEST_BODY_KEY_URI)) { - if (contentType == null) { - ResponseUtil.onRequestError( - reactApplicationContext, - requestId, - "Payload is set but no content-type header specified", - null); - return; - } - String uri = data.getString(REQUEST_BODY_KEY_URI); - InputStream fileInputStream = - RequestBodyUtil.getFileInputStream(getReactApplicationContext(), uri); - if (fileInputStream == null) { - ResponseUtil.onRequestError( - reactApplicationContext, requestId, "Could not retrieve file for uri " + uri, null); - return; - } - requestBody = RequestBodyUtil.create(MediaType.parse(contentType), fileInputStream); - } else if (data.hasKey(REQUEST_BODY_KEY_FORMDATA)) { - if (contentType == null) { - contentType = "multipart/form-data"; - } - ReadableArray parts = data.getArray(REQUEST_BODY_KEY_FORMDATA); - MultipartBody.Builder multipartBuilder = - constructMultipartBody(parts, contentType, requestId); - if (multipartBuilder == null) { - return; - } - requestBody = multipartBuilder.build(); - } else { - // Nothing in data payload, at least nothing we could understand anyway. - requestBody = RequestBodyUtil.getEmptyBody(method); - } - - requestBuilder.method(method, wrapRequestBodyWithProgressEmitter(requestBody, requestId)); - - addRequest(requestId); - client - .newCall(requestBuilder.build()) - .enqueue( - new Callback() { - @Override - public void onFailure(Call call, IOException e) { + String contentType = requestHeaders.get(CONTENT_TYPE_HEADER_NAME); + String contentEncoding = requestHeaders.get(CONTENT_ENCODING_HEADER_NAME); + requestBuilder.headers(requestHeaders); + // Check if a handler is registered + RequestBodyHandler handler = null; + if (data != null) { + for (RequestBodyHandler curHandler : mRequestBodyHandlers) { + if (curHandler.supports(data)) { + handler = curHandler; + break; + } + } + } + RequestBody requestBody; + if (data == null || method.toLowerCase(Locale.ROOT).equals("get") || method.toLowerCase(Locale.ROOT).equals("head")) { + requestBody = RequestBodyUtil.getEmptyBody(method); + } else if (handler != null) { + requestBody = handler.toRequestBody(data, contentType); + } else if (data.hasKey(REQUEST_BODY_KEY_STRING)) { + if (contentType == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Payload is set but no content-type header specified", null); + return; + } + String body = data.getString(REQUEST_BODY_KEY_STRING); + MediaType contentMediaType = MediaType.parse(contentType); + if (RequestBodyUtil.isGzipEncoding(contentEncoding)) { + requestBody = RequestBodyUtil.createGzip(contentMediaType, body); + if (requestBody == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Failed to gzip request body", null); + return; + } + } else { + // Use getBytes() to convert the body into a byte[], preventing okhttp from + // appending the character set to the Content-Type header when otherwise unspecified + // https://github.com/facebook/react-native/issues/8237 + Charset charset = contentMediaType == null ? StandardCharsets.UTF_8 : contentMediaType.charset(StandardCharsets.UTF_8); + requestBody = RequestBody.create(contentMediaType, body.getBytes(charset)); + } + } else if (data.hasKey(REQUEST_BODY_KEY_BASE64)) { + if (contentType == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Payload is set but no content-type header specified", null); + return; + } + String base64String = data.getString(REQUEST_BODY_KEY_BASE64); + MediaType contentMediaType = MediaType.parse(contentType); + requestBody = RequestBody.create(contentMediaType, ByteString.decodeBase64(base64String)); + } else if (data.hasKey(REQUEST_BODY_KEY_URI)) { + if (contentType == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Payload is set but no content-type header specified", null); + return; + } + String uri = data.getString(REQUEST_BODY_KEY_URI); + InputStream fileInputStream = RequestBodyUtil.getFileInputStream(getReactApplicationContext(), uri); + if (fileInputStream == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Could not retrieve file for uri " + uri, null); + return; + } + requestBody = RequestBodyUtil.create(MediaType.parse(contentType), fileInputStream); + } else if (data.hasKey(REQUEST_BODY_KEY_FORMDATA)) { + if (contentType == null) { + contentType = "multipart/form-data"; + } + ReadableArray parts = data.getArray(REQUEST_BODY_KEY_FORMDATA); + MultipartBody.Builder multipartBuilder = constructMultipartBody(parts, contentType, requestId); + if (multipartBuilder == null) { + return; + } + requestBody = multipartBuilder.build(); + } else { + // Nothing in data payload, at least nothing we could understand anyway. + requestBody = RequestBodyUtil.getEmptyBody(method); + } + requestBuilder.method(method, wrapRequestBodyWithProgressEmitter(requestBody, requestId)); + addRequest(requestId); + client.newCall(requestBuilder.build()).enqueue(new Callback() { + + @Override + public void onFailure(Call call, IOException e) { if (mShuttingDown) { - return; + return; } removeRequest(requestId); - String errorMessage = - e.getMessage() != null - ? e.getMessage() - : "Error while executing request: " + e.getClass().getSimpleName(); + String errorMessage = e.getMessage() != null ? e.getMessage() : "Error while executing request: " + e.getClass().getSimpleName(); ResponseUtil.onRequestError(reactApplicationContext, requestId, errorMessage, e); - } + } - @Override - public void onResponse(Call call, Response response) throws IOException { + @Override + public void onResponse(Call call, Response response) throws IOException { if (mShuttingDown) { - return; + return; } removeRequest(requestId); // Before we touch the body send headers to JS - ResponseUtil.onResponseReceived( - reactApplicationContext, - requestId, - response.code(), - translateHeaders(response.headers()), - response.request().url().toString()); - + ResponseUtil.onResponseReceived(reactApplicationContext, requestId, response.code(), translateHeaders(response.headers()), response.request().url().toString()); try { - // OkHttp implements something called transparent gzip, which mean that it will - // automatically add the Accept-Encoding gzip header and handle decoding - // internally. - // The issue is that it won't handle decoding if the user provides a - // Accept-Encoding - // header. This is also undesirable considering that iOS does handle the decoding - // even - // when the header is provided. To make sure this works in all cases, handle gzip - // body - // here also. This works fine since OKHttp will remove the Content-Encoding header - // if - // it used transparent gzip. - // See - // https://github.com/square/okhttp/blob/5b37cda9e00626f43acf354df145fd452c3031f1/okhttp/src/main/java/okhttp3/internal/http/BridgeInterceptor.java#L76-L111 - ResponseBody responseBody = response.body(); - if ("gzip".equalsIgnoreCase(response.header("Content-Encoding")) - && responseBody != null) { - GzipSource gzipSource = new GzipSource(responseBody.source()); - String contentType = response.header("Content-Type"); - responseBody = - ResponseBody.create( - contentType != null ? MediaType.parse(contentType) : null, - -1L, - Okio.buffer(gzipSource)); - } - - // Check if a handler is registered - for (ResponseHandler handler : mResponseHandlers) { - if (handler.supports(responseType)) { - WritableMap res = handler.toResponseData(responseBody); - ResponseUtil.onDataReceived(reactApplicationContext, requestId, res); - ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); - return; + // OkHttp implements something called transparent gzip, which mean that it will + // automatically add the Accept-Encoding gzip header and handle decoding + // internally. + // The issue is that it won't handle decoding if the user provides a + // Accept-Encoding + // header. This is also undesirable considering that iOS does handle the decoding + // even + // when the header is provided. To make sure this works in all cases, handle gzip + // body + // here also. This works fine since OKHttp will remove the Content-Encoding header + // if + // it used transparent gzip. + // See + // https://github.com/square/okhttp/blob/5b37cda9e00626f43acf354df145fd452c3031f1/okhttp/src/main/java/okhttp3/internal/http/BridgeInterceptor.java#L76-L111 + ResponseBody responseBody = response.body(); + if ("gzip".equalsIgnoreCase(response.header("Content-Encoding")) && responseBody != null) { + GzipSource gzipSource = new GzipSource(responseBody.source()); + String contentType = response.header("Content-Type"); + responseBody = ResponseBody.create(contentType != null ? MediaType.parse(contentType) : null, -1L, Okio.buffer(gzipSource)); } - } - - // If JS wants progress updates during the download, and it requested a text - // response, - // periodically send response data updates to JS. - if (useIncrementalUpdates && responseType.equals("text")) { - readWithProgress(requestId, responseBody); - ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); - return; - } - - // Otherwise send the data in one big chunk, in the format that JS requested. - String responseString = ""; - if (responseType.equals("text")) { - try { - responseString = responseBody.string(); - } catch (IOException e) { - if (response.request().method().equalsIgnoreCase("HEAD")) { - // The request is an `HEAD` and the body is empty, - // the OkHttp will produce an exception. - // Ignore the exception to not invalidate the request in the - // Javascript layer. - // Introduced to fix issue #7463. - } else { - ResponseUtil.onRequestError( - reactApplicationContext, requestId, e.getMessage(), e); - } + // Check if a handler is registered + for (ResponseHandler handler : mResponseHandlers) { + if (handler.supports(responseType)) { + WritableMap res = handler.toResponseData(responseBody); + ResponseUtil.onDataReceived(reactApplicationContext, requestId, res); + ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); + return; + } + } + // periodically send response data updates to JS. + if (useIncrementalUpdates && responseType.equals("text")) { + readWithProgress(requestId, responseBody); + ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); + return; } - } else if (responseType.equals("base64")) { - responseString = Base64.encodeToString(responseBody.bytes(), Base64.NO_WRAP); - } - ResponseUtil.onDataReceived(reactApplicationContext, requestId, responseString); - ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); + // Otherwise send the data in one big chunk, in the format that JS requested. + String responseString = ""; + if (responseType.equals("text")) { + try { + responseString = responseBody.string(); + } catch (IOException e) { + if (response.request().method().equalsIgnoreCase("HEAD")) { + // The request is an `HEAD` and the body is empty, + // the OkHttp will produce an exception. + // Ignore the exception to not invalidate the request in the + // Javascript layer. + // Introduced to fix issue #7463. + } else { + ResponseUtil.onRequestError(reactApplicationContext, requestId, e.getMessage(), e); + } + } + } else if (responseType.equals("base64")) { + responseString = Base64.encodeToString(responseBody.bytes(), Base64.NO_WRAP); + } + ResponseUtil.onDataReceived(reactApplicationContext, requestId, responseString); + ResponseUtil.onRequestSuccess(reactApplicationContext, requestId); } catch (IOException e) { - ResponseUtil.onRequestError( - reactApplicationContext, requestId, e.getMessage(), e); + ResponseUtil.onRequestError(reactApplicationContext, requestId, e.getMessage(), e); } - } - }); - } - - private RequestBody wrapRequestBodyWithProgressEmitter( - final RequestBody requestBody, final int requestId) { - if (requestBody == null) { - return null; - } - final ReactApplicationContext reactApplicationContext = - getReactApplicationContextIfActiveOrWarn(); - return RequestBodyUtil.createProgressRequest( - requestBody, - new ProgressListener() { - long last = System.nanoTime(); - - @Override - public void onProgress(long bytesWritten, long contentLength, boolean done) { - long now = System.nanoTime(); - if (done || shouldDispatch(now, last)) { - ResponseUtil.onDataSend( - reactApplicationContext, requestId, bytesWritten, contentLength); - last = now; } - } }); - } - - private void readWithProgress(int requestId, ResponseBody responseBody) throws IOException { - long totalBytesRead = -1; - long contentLength = -1; - try { - ProgressResponseBody progressResponseBody = (ProgressResponseBody) responseBody; - totalBytesRead = progressResponseBody.totalBytesRead(); - contentLength = progressResponseBody.contentLength(); - } catch (ClassCastException e) { - // Ignore - } - - Charset charset = - responseBody.contentType() == null - ? StandardCharsets.UTF_8 - : responseBody.contentType().charset(StandardCharsets.UTF_8); - - ProgressiveStringDecoder streamDecoder = new ProgressiveStringDecoder(charset); - InputStream inputStream = responseBody.byteStream(); - try { - byte[] buffer = new byte[MAX_CHUNK_SIZE_BETWEEN_FLUSHES]; - int read; - final ReactApplicationContext reactApplicationContext = - getReactApplicationContextIfActiveOrWarn(); - while ((read = inputStream.read(buffer)) != -1) { - ResponseUtil.onIncrementalDataReceived( - reactApplicationContext, - requestId, - streamDecoder.decodeNext(buffer, read), - totalBytesRead, - contentLength); - } - } finally { - inputStream.close(); - } - } - - private static boolean shouldDispatch(long now, long last) { - return last + CHUNK_TIMEOUT_NS < now; - } - - private synchronized void addRequest(int requestId) { - mRequestIds.add(requestId); - } - - private synchronized void removeRequest(int requestId) { - mRequestIds.remove(requestId); - } - - private synchronized void cancelAllRequests() { - for (Integer requestId : mRequestIds) { - cancelRequest(requestId); - } - mRequestIds.clear(); - } - - private static WritableMap translateHeaders(Headers headers) { - Bundle responseHeaders = new Bundle(); - for (int i = 0; i < headers.size(); i++) { - String headerName = headers.name(i); - // multiple values for the same header - if (responseHeaders.containsKey(headerName)) { - responseHeaders.putString( - headerName, responseHeaders.getString(headerName) + ", " + headers.value(i)); - } else { - responseHeaders.putString(headerName, headers.value(i)); - } - } - return Arguments.fromBundle(responseHeaders); - } - - @Override - public void abortRequest(double requestIdAsDouble) { - int requestId = (int) requestIdAsDouble; - cancelRequest(requestId); - removeRequest(requestId); - } - - private void cancelRequest(final int requestId) { - // We have to use AsyncTask since this might trigger a NetworkOnMainThreadException, this is an - // open issue on OkHttp: https://github.com/square/okhttp/issues/869 - new GuardedAsyncTask(getReactApplicationContext()) { - @Override - protected void doInBackgroundGuarded(Void... params) { - OkHttpCallUtil.cancelTag(mClient, Integer.valueOf(requestId)); - } - }.execute(); - } - - @ReactMethod - public void clearCookies(com.facebook.react.bridge.Callback callback) { - mCookieHandler.clearCookies(callback); - } - - @Override - public void addListener(String eventName) {} - - @Override - public void removeListeners(double count) {} - - private @Nullable MultipartBody.Builder constructMultipartBody( - ReadableArray body, String contentType, int requestId) { - MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); - multipartBuilder.setType(MediaType.parse(contentType)); - - final ReactApplicationContext reactApplicationContext = - getReactApplicationContextIfActiveOrWarn(); - - for (int i = 0, size = body.size(); i < size; i++) { - ReadableMap bodyPart = body.getMap(i); - - // Determine part's content type. - ReadableArray headersArray = bodyPart.getArray("headers"); - Headers headers = extractHeaders(headersArray, null); - if (headers == null) { - ResponseUtil.onRequestError( - reactApplicationContext, - requestId, - "Missing or invalid header format for FormData part.", - null); - return null; - } - MediaType partContentType = null; - String partContentTypeStr = headers.get(CONTENT_TYPE_HEADER_NAME); - if (partContentTypeStr != null) { - partContentType = MediaType.parse(partContentTypeStr); - // Remove the content-type header because MultipartBuilder gets it explicitly as an - // argument and doesn't expect it in the headers array. - headers = headers.newBuilder().removeAll(CONTENT_TYPE_HEADER_NAME).build(); - } - - if (bodyPart.hasKey(REQUEST_BODY_KEY_STRING)) { - String bodyValue = bodyPart.getString(REQUEST_BODY_KEY_STRING); - multipartBuilder.addPart(headers, RequestBody.create(partContentType, bodyValue)); - } else if (bodyPart.hasKey(REQUEST_BODY_KEY_URI)) { - if (partContentType == null) { - ResponseUtil.onRequestError( - reactApplicationContext, - requestId, - "Binary FormData part needs a content-type header.", - null); - return null; + } + + private RequestBody wrapRequestBodyWithProgressEmitter(final RequestBody requestBody, final int requestId) { + if (requestBody == null) { + return null; } - String fileContentUriStr = bodyPart.getString(REQUEST_BODY_KEY_URI); - InputStream fileInputStream = - RequestBodyUtil.getFileInputStream(getReactApplicationContext(), fileContentUriStr); - if (fileInputStream == null) { - ResponseUtil.onRequestError( - reactApplicationContext, - requestId, - "Could not retrieve file for uri " + fileContentUriStr, - null); - return null; + final ReactApplicationContext reactApplicationContext = getReactApplicationContextIfActiveOrWarn(); + return RequestBodyUtil.createProgressRequest(requestBody, new ProgressListener() { + + public long last = System.nanoTime(); + + @Override + public void onProgress(long bytesWritten, long contentLength, boolean done) { + long now = System.nanoTime(); + if (done || shouldDispatch(now, last)) { + ResponseUtil.onDataSend(reactApplicationContext, requestId, bytesWritten, contentLength); + last = now; + } + } + }); + } + + private void readWithProgress(int requestId, ResponseBody responseBody) throws IOException { + long totalBytesRead = -1; + long contentLength = -1; + try { + ProgressResponseBody progressResponseBody = (ProgressResponseBody) responseBody; + totalBytesRead = progressResponseBody.totalBytesRead(); + contentLength = progressResponseBody.contentLength(); + } catch (ClassCastException e) { + // Ignore } - multipartBuilder.addPart(headers, RequestBodyUtil.create(partContentType, fileInputStream)); - } else { - ResponseUtil.onRequestError( - reactApplicationContext, requestId, "Unrecognized FormData part.", null); - } + Charset charset = responseBody.contentType() == null ? StandardCharsets.UTF_8 : responseBody.contentType().charset(StandardCharsets.UTF_8); + ProgressiveStringDecoder streamDecoder = new ProgressiveStringDecoder(charset); + InputStream inputStream = responseBody.byteStream(); + try { + byte[] buffer = new byte[MAX_CHUNK_SIZE_BETWEEN_FLUSHES]; + int read; + final ReactApplicationContext reactApplicationContext = getReactApplicationContextIfActiveOrWarn(); + while ((read = inputStream.read(buffer)) != -1) { + ResponseUtil.onIncrementalDataReceived(reactApplicationContext, requestId, streamDecoder.decodeNext(buffer, read), totalBytesRead, contentLength); + } + } finally { + inputStream.close(); + } + } + + private static boolean shouldDispatch(long now, long last) { + return last + CHUNK_TIMEOUT_NS < now; } - return multipartBuilder; - } - /** + private synchronized void addRequest(int requestId) { + mRequestIds.add(requestId); + } + + private synchronized void removeRequest(int requestId) { + mRequestIds.remove(requestId); + } + + private synchronized void cancelAllRequests() { + for (Integer requestId : mRequestIds) { + cancelRequest(requestId); + } + mRequestIds.clear(); + } + + private static WritableMap translateHeaders(Headers headers) { + Bundle responseHeaders = new Bundle(); + for (int i = 0; i < headers.size(); i++) { + String headerName = headers.name(i); + // multiple values for the same header + if (responseHeaders.containsKey(headerName)) { + responseHeaders.putString(headerName, responseHeaders.getString(headerName) + ", " + headers.value(i)); + } else { + responseHeaders.putString(headerName, headers.value(i)); + } + } + return Arguments.fromBundle(responseHeaders); + } + + @Override + public void abortRequest(double requestIdAsDouble) { + int requestId = (int) requestIdAsDouble; + cancelRequest(requestId); + removeRequest(requestId); + } + + private void cancelRequest(final int requestId) { + // We have to use AsyncTask since this might trigger a NetworkOnMainThreadException, this is an + // open issue on OkHttp: https://github.com/square/okhttp/issues/869 + new GuardedAsyncTask(getReactApplicationContext()) { + + @Override + protected void doInBackgroundGuarded(Void... params) { + OkHttpCallUtil.cancelTag(mClient, Integer.valueOf(requestId)); + } + }.execute(); + } + + @ReactMethod + public void clearCookies(com.facebook.react.bridge.Callback callback) { + mCookieHandler.clearCookies(callback); + } + + @Override + public void addListener(String eventName) { + } + + @Override + public void removeListeners(double count) { + } + + @Nullable + private MultipartBody.Builder constructMultipartBody(ReadableArray body, String contentType, int requestId) { + MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); + multipartBuilder.setType(MediaType.parse(contentType)); + final ReactApplicationContext reactApplicationContext = getReactApplicationContextIfActiveOrWarn(); + for (int i = 0, size = body.size(); i < size; i++) { + ReadableMap bodyPart = body.getMap(i); + // Determine part's content type. + ReadableArray headersArray = bodyPart.getArray("headers"); + Headers headers = extractHeaders(headersArray, null); + if (headers == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Missing or invalid header format for FormData part.", null); + return null; + } + MediaType partContentType = null; + String partContentTypeStr = headers.get(CONTENT_TYPE_HEADER_NAME); + if (partContentTypeStr != null) { + partContentType = MediaType.parse(partContentTypeStr); + // Remove the content-type header because MultipartBuilder gets it explicitly as an + // argument and doesn't expect it in the headers array. + headers = headers.newBuilder().removeAll(CONTENT_TYPE_HEADER_NAME).build(); + } + if (bodyPart.hasKey(REQUEST_BODY_KEY_STRING)) { + String bodyValue = bodyPart.getString(REQUEST_BODY_KEY_STRING); + multipartBuilder.addPart(headers, RequestBody.create(partContentType, bodyValue)); + } else if (bodyPart.hasKey(REQUEST_BODY_KEY_URI)) { + if (partContentType == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Binary FormData part needs a content-type header.", null); + return null; + } + String fileContentUriStr = bodyPart.getString(REQUEST_BODY_KEY_URI); + InputStream fileInputStream = RequestBodyUtil.getFileInputStream(getReactApplicationContext(), fileContentUriStr); + if (fileInputStream == null) { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Could not retrieve file for uri " + fileContentUriStr, null); + return null; + } + multipartBuilder.addPart(headers, RequestBodyUtil.create(partContentType, fileInputStream)); + } else { + ResponseUtil.onRequestError(reactApplicationContext, requestId, "Unrecognized FormData part.", null); + } + } + return multipartBuilder; + } + + /** * Extracts the headers from the Array. If the format is invalid, this method will return null. */ - private @Nullable Headers extractHeaders( - @Nullable ReadableArray headersArray, @Nullable ReadableMap requestData) { - if (headersArray == null) { - return null; - } - Headers.Builder headersBuilder = new Headers.Builder(); - for (int headersIdx = 0, size = headersArray.size(); headersIdx < size; headersIdx++) { - ReadableArray header = headersArray.getArray(headersIdx); - if (header == null || header.size() != 2) { - return null; - } - String headerName = HeaderUtil.stripHeaderName(header.getString(0)); - String headerValue = HeaderUtil.stripHeaderValue(header.getString(1)); - if (headerName == null || headerValue == null) { - return null; - } - headersBuilder.add(headerName, headerValue); - } - if (headersBuilder.get(USER_AGENT_HEADER_NAME) == null && mDefaultUserAgent != null) { - headersBuilder.add(USER_AGENT_HEADER_NAME, mDefaultUserAgent); - } - - // Sanitize content encoding header, supported only when request specify payload as string - boolean isGzipSupported = requestData != null && requestData.hasKey(REQUEST_BODY_KEY_STRING); - if (!isGzipSupported) { - headersBuilder.removeAll(CONTENT_ENCODING_HEADER_NAME); - } - - return headersBuilder.build(); - } + @Nullable + private Headers extractHeaders(@Nullable ReadableArray headersArray, @Nullable ReadableMap requestData) { + if (headersArray == null) { + return null; + } + Headers.Builder headersBuilder = new Headers.Builder(); + for (int headersIdx = 0, size = headersArray.size(); headersIdx < size; headersIdx++) { + ReadableArray header = headersArray.getArray(headersIdx); + if (header == null || header.size() != 2) { + return null; + } + String headerName = HeaderUtil.stripHeaderName(header.getString(0)); + String headerValue = HeaderUtil.stripHeaderValue(header.getString(1)); + if (headerName == null || headerValue == null) { + return null; + } + headersBuilder.add(headerName, headerValue); + } + if (headersBuilder.get(USER_AGENT_HEADER_NAME) == null && mDefaultUserAgent != null) { + headersBuilder.add(USER_AGENT_HEADER_NAME, mDefaultUserAgent); + } + // Sanitize content encoding header, supported only when request specify payload as string + boolean isGzipSupported = requestData != null && requestData.hasKey(REQUEST_BODY_KEY_STRING); + if (!isGzipSupported) { + headersBuilder.removeAll(CONTENT_ENCODING_HEADER_NAME); + } + return headersBuilder.build(); + } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.java index 291f4c6c8a7f..2993a7437d95 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.modules.network; import android.content.Context; @@ -20,64 +19,62 @@ */ public class OkHttpClientProvider { - // Centralized OkHttpClient for all networking requests. - private static @Nullable OkHttpClient sClient; - - // User-provided OkHttpClient factory - private static @Nullable OkHttpClientFactory sFactory; + // Centralized OkHttpClient for all networking requests. + @Nullable + public static OkHttpClient sClient; - public static void setOkHttpClientFactory(OkHttpClientFactory factory) { - sFactory = factory; - } + // User-provided OkHttpClient factory + @Nullable + public static OkHttpClientFactory sFactory; - public static OkHttpClient getOkHttpClient() { - if (sClient == null) { - sClient = createClient(); + public static void setOkHttpClientFactory(OkHttpClientFactory factory) { + sFactory = factory; } - return sClient; - } - public static OkHttpClient createClient() { - if (sFactory != null) { - return sFactory.createNewNetworkModuleClient(); + public static OkHttpClient getOkHttpClient() { + if (sClient == null) { + sClient = createClient(); + } + return sClient; } - return createClientBuilder().build(); - } - public static OkHttpClient createClient(Context context) { - if (sFactory != null) { - return sFactory.createNewNetworkModuleClient(); + public static OkHttpClient createClient() { + try { + return (OkHttpClient) Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("getOkHttpClient", Class.class).invoke(null, OkHttpClientProvider.class); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + return null; + } } - return createClientBuilder(context).build(); - } - - public static OkHttpClient.Builder createClientBuilder() { - // No timeouts by default - OkHttpClient.Builder client = - new OkHttpClient.Builder() - .connectTimeout(0, TimeUnit.MILLISECONDS) - .readTimeout(0, TimeUnit.MILLISECONDS) - .writeTimeout(0, TimeUnit.MILLISECONDS) - .cookieJar(new ReactCookieJarContainer()); - - return client; - } - public static OkHttpClient.Builder createClientBuilder(Context context) { - int cacheSize = 10 * 1024 * 1024; // 10 Mo - return createClientBuilder(context, cacheSize); - } - - public static OkHttpClient.Builder createClientBuilder(Context context, int cacheSize) { - OkHttpClient.Builder client = createClientBuilder(); + public static OkHttpClient createClient(Context context) { + try { + return (OkHttpClient) Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("getOkHttpClient", Class.class).invoke(null, OkHttpClientProvider.class); + } catch (Exception expoHandleErrorException) { + expoHandleErrorException.printStackTrace(); + return null; + } + } - if (cacheSize == 0) { - return client; + public static OkHttpClient.Builder createClientBuilder() { + // No timeouts by default + OkHttpClient.Builder client = new OkHttpClient.Builder().connectTimeout(0, TimeUnit.MILLISECONDS).readTimeout(0, TimeUnit.MILLISECONDS).writeTimeout(0, TimeUnit.MILLISECONDS).cookieJar(new ReactCookieJarContainer()); + return client; } - File cacheDirectory = new File(context.getCacheDir(), "http-cache"); - Cache cache = new Cache(cacheDirectory, cacheSize); + public static OkHttpClient.Builder createClientBuilder(Context context) { + // 10 Mo + int cacheSize = 10 * 1024 * 1024; + return createClientBuilder(context, cacheSize); + } - return client.cache(cache); - } + public static OkHttpClient.Builder createClientBuilder(Context context, int cacheSize) { + OkHttpClient.Builder client = createClientBuilder(); + if (cacheSize == 0) { + return client; + } + File cacheDirectory = new File(context.getCacheDir(), "http-cache"); + Cache cache = new Cache(cacheDirectory, cacheSize); + return client.cache(cache); + } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java index a8361aa7e6c8..3583ca09c9c9 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.modules.systeminfo; import android.content.Context; @@ -19,135 +18,131 @@ public class AndroidInfoHelpers { - public static final String EMULATOR_LOCALHOST = "10.0.2.2"; - public static final String GENYMOTION_LOCALHOST = "10.0.3.2"; - public static final String DEVICE_LOCALHOST = "localhost"; + public static String EMULATOR_LOCALHOST = "10.0.2.2"; - public static final String METRO_HOST_PROP_NAME = "metro.host"; + public static String GENYMOTION_LOCALHOST = "10.0.3.2"; - public static Integer sDevServerPortOverride = null; - public static Integer sInspectorProxyPortOverride = null; + public static String DEVICE_LOCALHOST = "localhost"; - private static final String TAG = AndroidInfoHelpers.class.getSimpleName(); + public static String METRO_HOST_PROP_NAME = "metro.host"; - private static boolean isRunningOnGenymotion() { - return Build.FINGERPRINT.contains("vbox"); - } + public static Integer sDevServerPortOverride = null; - private static boolean isRunningOnStockEmulator() { - return Build.FINGERPRINT.contains("generic") - || Build.FINGERPRINT.startsWith("google/sdk_gphone"); - } + public static Integer sInspectorProxyPortOverride = null; - public static String getServerHost(Integer port) { - return getServerIpAddress(port); - } + public static String TAG = AndroidInfoHelpers.class.getSimpleName(); - public static String getServerHost(Context context) { - return getServerIpAddress(getDevServerPort(context)); - } + private static boolean isRunningOnGenymotion() { + return Build.FINGERPRINT.contains("vbox"); + } - public static String getAdbReverseTcpCommand(Integer port) { - return "adb reverse tcp:" + port + " tcp:" + port; - } + private static boolean isRunningOnStockEmulator() { + return Build.FINGERPRINT.contains("generic") || Build.FINGERPRINT.startsWith("google/sdk_gphone"); + } - public static String getAdbReverseTcpCommand(Context context) { - return getAdbReverseTcpCommand(getDevServerPort(context)); - } + public static String getServerHost(Integer port) { + return getServerIpAddress(port); + } - public static String getInspectorProxyHost(Context context) { - return getServerIpAddress(getInspectorProxyPort(context)); - } + public static String getServerHost(Context context) { + return getServerIpAddress(getDevServerPort(context)); + } - // WARNING(festevezga): This RN helper method has been copied to another FB-only target. Any - // changes should be applied to both. - public static String getFriendlyDeviceName() { - if (isRunningOnGenymotion()) { - // Genymotion already has a friendly name by default - return Build.MODEL; - } else { - return Build.MODEL + " - " + Build.VERSION.RELEASE + " - API " + Build.VERSION.SDK_INT; + public static String getAdbReverseTcpCommand(Integer port) { + return "adb reverse tcp:" + port + " tcp:" + port; } - } - private static Integer getDevServerPort(Context context) { - if (sDevServerPortOverride != null) { - return sDevServerPortOverride; + public static String getAdbReverseTcpCommand(Context context) { + return getAdbReverseTcpCommand(getDevServerPort(context)); } - Resources resources = context.getResources(); - return resources.getInteger(R.integer.react_native_dev_server_port); - } - private static Integer getInspectorProxyPort(Context context) { - if (sInspectorProxyPortOverride != null) { - return sInspectorProxyPortOverride; + public static String getInspectorProxyHost(Context context) { + return getServerIpAddress(getInspectorProxyPort(context)); } - Resources resources = context.getResources(); - return resources.getInteger(R.integer.react_native_dev_server_port); - } - - public static void setDevServerPort(Integer port) { - sDevServerPortOverride = port; - } - - public static void setInspectorProxyPort(Integer port) { - sInspectorProxyPortOverride = port; - } - - private static String getServerIpAddress(int port) { - // Since genymotion runs in vbox it use different hostname to refer to adb host. - // We detect whether app runs on genymotion and replace js bundle server hostname accordingly - - String ipAddress; - String metroHostProp = getMetroHostPropValue(); - if (!metroHostProp.equals("")) { - ipAddress = metroHostProp; - } else if (isRunningOnGenymotion()) { - ipAddress = GENYMOTION_LOCALHOST; - } else if (isRunningOnStockEmulator()) { - ipAddress = EMULATOR_LOCALHOST; - } else { - ipAddress = DEVICE_LOCALHOST; + + // WARNING(festevezga): This RN helper method has been copied to another FB-only target. Any + // changes should be applied to both. + public static String getFriendlyDeviceName() { + if (isRunningOnGenymotion()) { + // Genymotion already has a friendly name by default + return Build.MODEL; + } else { + return Build.MODEL + " - " + Build.VERSION.RELEASE + " - API " + Build.VERSION.SDK_INT; + } } - return String.format(Locale.US, "%s:%d", ipAddress, port); - } + private static Integer getDevServerPort(Context context) { + if (sDevServerPortOverride != null) { + return sDevServerPortOverride; + } + Resources resources = context.getResources(); + return resources.getInteger(R.integer.react_native_dev_server_port); + } - private static String metroHostPropValue = null; + private static Integer getInspectorProxyPort(Context context) { + if (sInspectorProxyPortOverride != null) { + return sInspectorProxyPortOverride; + } + Resources resources = context.getResources(); + return resources.getInteger(R.integer.react_native_dev_server_port); + } + + public static void setDevServerPort(Integer port) { + sDevServerPortOverride = port; + } - private static synchronized String getMetroHostPropValue() { - if (metroHostPropValue != null) { - return metroHostPropValue; + public static void setInspectorProxyPort(Integer port) { + sInspectorProxyPortOverride = port; } - Process process = null; - BufferedReader reader = null; - try { - process = - Runtime.getRuntime().exec(new String[] {"/system/bin/getprop", METRO_HOST_PROP_NAME}); - reader = - new BufferedReader( - new InputStreamReader(process.getInputStream(), Charset.forName("UTF-8"))); - - String lastLine = ""; - String line; - while ((line = reader.readLine()) != null) { - lastLine = line; - } - metroHostPropValue = lastLine; - } catch (Exception e) { - FLog.w(TAG, "Failed to query for metro.host prop:", e); - metroHostPropValue = ""; - } finally { - try { - if (reader != null) { - reader.close(); + + private static String getServerIpAddress(int port) { + // Since genymotion runs in vbox it use different hostname to refer to adb host. + // We detect whether app runs on genymotion and replace js bundle server hostname accordingly + String ipAddress; + String metroHostProp = getMetroHostPropValue(); + if (!metroHostProp.equals("")) { + ipAddress = metroHostProp; + } else if (isRunningOnGenymotion()) { + ipAddress = GENYMOTION_LOCALHOST; + } else if (isRunningOnStockEmulator()) { + ipAddress = EMULATOR_LOCALHOST; + } else { + ipAddress = DEVICE_LOCALHOST; + } + return String.format(Locale.US, "%s:%d", ipAddress, port); + } + + public static String metroHostPropValue = null; + + private static synchronized String getMetroHostPropValue() { + if (metroHostPropValue != null) { + return metroHostPropValue; + } + Process process = null; + BufferedReader reader = null; + try { + process = Runtime.getRuntime().exec(new String[] { "/system/bin/getprop", METRO_HOST_PROP_NAME }); + reader = new BufferedReader(new InputStreamReader(process.getInputStream(), Charset.forName("UTF-8"))); + String lastLine = ""; + String line; + while ((line = reader.readLine()) != null) { + lastLine = line; + } + metroHostPropValue = lastLine; + } catch (Exception e) { + FLog.w(TAG, "Failed to query for metro.host prop:", e); + metroHostPropValue = ""; + } finally { + try { + if (reader != null) { + reader.close(); + } + } catch (Exception exc) { + } + if (process != null) { + process.destroy(); + } } - } catch (Exception exc) { - } - if (process != null) { - process.destroy(); - } + return metroHostPropValue; } - return metroHostPropValue; - } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java index 952043bc815e..608e0e63836d 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - package com.facebook.react.uimanager; import android.graphics.Matrix; @@ -68,802 +67,633 @@ @NotThreadSafe public class NativeViewHierarchyManager { - private static final String TAG = NativeViewHierarchyManager.class.getSimpleName(); - private final boolean DEBUG_MODE = ReactBuildConfig.DEBUG && false; - - private final SparseArray mTagsToViews; - private final SparseArray mTagsToViewManagers; - private final SparseBooleanArray mRootTags; - private final ViewManagerRegistry mViewManagers; - private final JSResponderHandler mJSResponderHandler = new JSResponderHandler(); - private final RootViewManager mRootViewManager; - private final LayoutAnimationController mLayoutAnimator = new LayoutAnimationController(); - private final RectF mBoundingBox = new RectF(); - - private boolean mLayoutAnimationEnabled; - private PopupMenu mPopupMenu; - private HashMap> mPendingDeletionsForTag; - - public NativeViewHierarchyManager(ViewManagerRegistry viewManagers) { - this(viewManagers, new RootViewManager()); - } - - public NativeViewHierarchyManager(ViewManagerRegistry viewManagers, RootViewManager manager) { - mViewManagers = viewManagers; - mTagsToViews = new SparseArray<>(); - mTagsToViewManagers = new SparseArray<>(); - mRootTags = new SparseBooleanArray(); - mRootViewManager = manager; - } - - public final synchronized View resolveView(int tag) { - View view = mTagsToViews.get(tag); - if (view == null) { - throw new IllegalViewOperationException( - "Trying to resolve view with tag " + tag + " which doesn't exist"); - } - return view; - } - - public final synchronized ViewManager resolveViewManager(int tag) { - ViewManager viewManager = mTagsToViewManagers.get(tag); - if (viewManager == null) { - throw new IllegalViewOperationException( - "ViewManager for tag " + tag + " could not be found.\n"); - } - return viewManager; - } - - public void setLayoutAnimationEnabled(boolean enabled) { - mLayoutAnimationEnabled = enabled; - } - - public synchronized void updateInstanceHandle(int tag, long instanceHandle) { - UiThreadUtil.assertOnUiThread(); - - try { - updateInstanceHandle(resolveView(tag), instanceHandle); - } catch (IllegalViewOperationException e) { - FLog.e(TAG, "Unable to update properties for view tag " + tag, e); - } - } - - public synchronized void updateProperties(int tag, ReactStylesDiffMap props) { - if (DEBUG_MODE) { - FLog.d(TAG, "updateProperties[%d]: %s", tag, props.toString()); - } - UiThreadUtil.assertOnUiThread(); - - try { - ViewManager viewManager = resolveViewManager(tag); - View viewToUpdate = resolveView(tag); - - if (props != null) { - viewManager.updateProperties(viewToUpdate, props); - } - } catch (IllegalViewOperationException e) { - FLog.e(TAG, "Unable to update properties for view tag " + tag, e); - } - } - - public synchronized void updateViewExtraData(int tag, Object extraData) { - if (DEBUG_MODE) { - FLog.d(TAG, "updateViewExtraData[%d]: %s", tag, extraData.toString()); - } - UiThreadUtil.assertOnUiThread(); - - ViewManager viewManager = resolveViewManager(tag); - View viewToUpdate = resolveView(tag); - viewManager.updateExtraData(viewToUpdate, extraData); - } - - public synchronized void updateLayout( - int parentTag, int tag, int x, int y, int width, int height) { - if (DEBUG_MODE) { - FLog.d(TAG, "updateLayout[%d]->[%d]: %d %d %d %d", tag, parentTag, x, y, width, height); - } - UiThreadUtil.assertOnUiThread(); - SystraceMessage.beginSection( - Systrace.TRACE_TAG_REACT_VIEW, "NativeViewHierarchyManager_updateLayout") - .arg("parentTag", parentTag) - .arg("tag", tag) - .flush(); - try { - View viewToUpdate = resolveView(tag); - - // Even though we have exact dimensions, we still call measure because some platform views - // (e.g. - // Switch) assume that method will always be called before onLayout and onDraw. They use it to - // calculate and cache information used in the draw pass. For most views, onMeasure can be - // stubbed out to only call setMeasuredDimensions. For ViewGroups, onLayout should be stubbed - // out to not recursively call layout on its children: React Native already handles doing - // that. - // - // Also, note measure and layout need to be called *after* all View properties have been - // updated - // because of caching and calculation that may occur in onMeasure and onLayout. Layout - // operations should also follow the native view hierarchy and go top to bottom for - // consistency - // with standard layout passes (some views may depend on this). - - viewToUpdate.measure( - View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY), - View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY)); - - // We update the layout of the ReactRootView when there is a change in the layout of its - // child. - // This is required to re-measure the size of the native View container (usually a - // FrameLayout) that is configured with layout_height = WRAP_CONTENT or layout_width = - // WRAP_CONTENT - // - // This code is going to be executed ONLY when there is a change in the size of the Root - // View defined in the js side. Changes in the layout of inner views will not trigger an - // update - // on the layout of the Root View. - ViewParent parent = viewToUpdate.getParent(); - if (parent instanceof RootView) { - parent.requestLayout(); - } - - // Check if the parent of the view has to layout the view, or the child has to lay itself out. - if (!mRootTags.get(parentTag)) { - ViewManager parentViewManager = mTagsToViewManagers.get(parentTag); - IViewManagerWithChildren parentViewManagerWithChildren; - if (parentViewManager instanceof IViewManagerWithChildren) { - parentViewManagerWithChildren = (IViewManagerWithChildren) parentViewManager; + public static String TAG = NativeViewHierarchyManager.class.getSimpleName(); + + public final boolean DEBUG_MODE = ReactBuildConfig.DEBUG && false; + + public final SparseArray mTagsToViews; + + public final SparseArray mTagsToViewManagers; + + public final SparseBooleanArray mRootTags; + + public final ViewManagerRegistry mViewManagers; + + public final JSResponderHandler mJSResponderHandler = new JSResponderHandler(); + + public final RootViewManager mRootViewManager; + + public final LayoutAnimationController mLayoutAnimator = new LayoutAnimationController(); + + public final RectF mBoundingBox = new RectF(); + + public boolean mLayoutAnimationEnabled; + + public PopupMenu mPopupMenu; + + public HashMap> mPendingDeletionsForTag; + + public NativeViewHierarchyManager(ViewManagerRegistry viewManagers) { + this(viewManagers, new RootViewManager()); + } + + public NativeViewHierarchyManager(ViewManagerRegistry viewManagers, RootViewManager manager) { + mViewManagers = viewManagers; + mTagsToViews = new SparseArray<>(); + mTagsToViewManagers = new SparseArray<>(); + mRootTags = new SparseBooleanArray(); + mRootViewManager = manager; + } + + public final synchronized View resolveView(int tag) { + View view = mTagsToViews.get(tag); + if (view == null) { + throw new IllegalViewOperationException("Trying to resolve view with tag " + tag + " which doesn't exist"); + } + return view; + } + + public final synchronized ViewManager resolveViewManager(int tag) { + ViewManager viewManager = mTagsToViewManagers.get(tag); + if (viewManager == null) { + throw new IllegalViewOperationException("ViewManager for tag " + tag + " could not be found.\n"); + } + return viewManager; + } + + public void setLayoutAnimationEnabled(boolean enabled) { + mLayoutAnimationEnabled = enabled; + } + + public synchronized void updateInstanceHandle(int tag, long instanceHandle) { + UiThreadUtil.assertOnUiThread(); + try { + updateInstanceHandle(resolveView(tag), instanceHandle); + } catch (IllegalViewOperationException e) { + FLog.e(TAG, "Unable to update properties for view tag " + tag, e); + } + } + + public synchronized void updateProperties(int tag, ReactStylesDiffMap props) { + try { + { + if (DEBUG_MODE) { + FLog.d(TAG, "updateProperties[%d]: %s", tag, props.toString()); + } + UiThreadUtil.assertOnUiThread(); + try { + ViewManager viewManager = resolveViewManager(tag); + View viewToUpdate = resolveView(tag); + if (props != null) { + viewManager.updateProperties(viewToUpdate, props); + } + } catch (IllegalViewOperationException e) { + FLog.e(TAG, "Unable to update properties for view tag " + tag, e); + } + } + } catch (Throwable expoException) { + } + } + + public synchronized void updateViewExtraData(int tag, Object extraData) { + if (DEBUG_MODE) { + FLog.d(TAG, "updateViewExtraData[%d]: %s", tag, extraData.toString()); + } + UiThreadUtil.assertOnUiThread(); + ViewManager viewManager = resolveViewManager(tag); + View viewToUpdate = resolveView(tag); + viewManager.updateExtraData(viewToUpdate, extraData); + } + + public synchronized void updateLayout(int parentTag, int tag, int x, int y, int width, int height) { + if (DEBUG_MODE) { + FLog.d(TAG, "updateLayout[%d]->[%d]: %d %d %d %d", tag, parentTag, x, y, width, height); + } + UiThreadUtil.assertOnUiThread(); + SystraceMessage.beginSection(Systrace.TRACE_TAG_REACT_VIEW, "NativeViewHierarchyManager_updateLayout").arg("parentTag", parentTag).arg("tag", tag).flush(); + try { + View viewToUpdate = resolveView(tag); + // Even though we have exact dimensions, we still call measure because some platform views + // (e.g. + // Switch) assume that method will always be called before onLayout and onDraw. They use it to + // calculate and cache information used in the draw pass. For most views, onMeasure can be + // stubbed out to only call setMeasuredDimensions. For ViewGroups, onLayout should be stubbed + // out to not recursively call layout on its children: React Native already handles doing + // that. + // + // Also, note measure and layout need to be called *after* all View properties have been + // updated + // because of caching and calculation that may occur in onMeasure and onLayout. Layout + // operations should also follow the native view hierarchy and go top to bottom for + // consistency + // with standard layout passes (some views may depend on this). + viewToUpdate.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY)); + // We update the layout of the ReactRootView when there is a change in the layout of its + // child. + // This is required to re-measure the size of the native View container (usually a + // FrameLayout) that is configured with layout_height = WRAP_CONTENT or layout_width = + // WRAP_CONTENT + // + // This code is going to be executed ONLY when there is a change in the size of the Root + // View defined in the js side. Changes in the layout of inner views will not trigger an + // update + // on the layout of the Root View. + ViewParent parent = viewToUpdate.getParent(); + if (parent instanceof RootView) { + parent.requestLayout(); + } + // Check if the parent of the view has to layout the view, or the child has to lay itself out. + if (!mRootTags.get(parentTag)) { + ViewManager parentViewManager = mTagsToViewManagers.get(parentTag); + IViewManagerWithChildren parentViewManagerWithChildren; + if (parentViewManager instanceof IViewManagerWithChildren) { + parentViewManagerWithChildren = (IViewManagerWithChildren) parentViewManager; + } else { + throw new IllegalViewOperationException("Trying to use view with tag " + parentTag + " as a parent, but its Manager doesn't implement IViewManagerWithChildren"); + } + if (parentViewManagerWithChildren != null && !parentViewManagerWithChildren.needsCustomLayoutForChildren()) { + updateLayout(viewToUpdate, x, y, width, height); + } + } else { + updateLayout(viewToUpdate, x, y, width, height); + } + } finally { + Systrace.endSection(Systrace.TRACE_TAG_REACT_VIEW); + } + } + + private void updateInstanceHandle(View viewToUpdate, long instanceHandle) { + UiThreadUtil.assertOnUiThread(); + viewToUpdate.setTag(R.id.reactandroid_view_tag_instance_handle, instanceHandle); + } + + @Nullable + public long getInstanceHandle(int reactTag) { + View view = mTagsToViews.get(reactTag); + if (view == null) { + throw new IllegalViewOperationException("Unable to find view for tag: " + reactTag); + } + Long instanceHandle = (Long) view.getTag(R.id.reactandroid_view_tag_instance_handle); + if (instanceHandle == null) { + throw new IllegalViewOperationException("Unable to find instanceHandle for tag: " + reactTag); + } + return instanceHandle; + } + + private void updateLayout(View viewToUpdate, int x, int y, int width, int height) { + if (mLayoutAnimationEnabled && mLayoutAnimator.shouldAnimateLayout(viewToUpdate)) { + mLayoutAnimator.applyLayoutUpdate(viewToUpdate, x, y, width, height); } else { - throw new IllegalViewOperationException( - "Trying to use view with tag " - + parentTag - + " as a parent, but its Manager doesn't implement IViewManagerWithChildren"); - } - if (parentViewManagerWithChildren != null - && !parentViewManagerWithChildren.needsCustomLayoutForChildren()) { - updateLayout(viewToUpdate, x, y, width, height); - } - } else { - updateLayout(viewToUpdate, x, y, width, height); - } - } finally { - Systrace.endSection(Systrace.TRACE_TAG_REACT_VIEW); - } - } - - private void updateInstanceHandle(View viewToUpdate, long instanceHandle) { - UiThreadUtil.assertOnUiThread(); - viewToUpdate.setTag(R.id.reactandroid_view_tag_instance_handle, instanceHandle); - } - - @Nullable - public long getInstanceHandle(int reactTag) { - View view = mTagsToViews.get(reactTag); - if (view == null) { - throw new IllegalViewOperationException("Unable to find view for tag: " + reactTag); - } - Long instanceHandle = (Long) view.getTag(R.id.reactandroid_view_tag_instance_handle); - if (instanceHandle == null) { - throw new IllegalViewOperationException("Unable to find instanceHandle for tag: " + reactTag); - } - return instanceHandle; - } - - private void updateLayout(View viewToUpdate, int x, int y, int width, int height) { - if (mLayoutAnimationEnabled && mLayoutAnimator.shouldAnimateLayout(viewToUpdate)) { - mLayoutAnimator.applyLayoutUpdate(viewToUpdate, x, y, width, height); - } else { - viewToUpdate.layout(x, y, x + width, y + height); - } - } - - public synchronized void createView( - ThemedReactContext themedContext, - int tag, - String className, - @Nullable ReactStylesDiffMap initialProps) { - if (DEBUG_MODE) { - FLog.d( - TAG, - "createView[%d]: %s %s", - tag, - className, - (initialProps != null ? initialProps.toString() : "")); - } - UiThreadUtil.assertOnUiThread(); - SystraceMessage.beginSection( - Systrace.TRACE_TAG_REACT_VIEW, "NativeViewHierarchyManager_createView") - .arg("tag", tag) - .arg("className", className) - .flush(); - try { - ViewManager viewManager = mViewManagers.get(className); - - View view = - viewManager.createView(tag, themedContext, initialProps, null, mJSResponderHandler); - mTagsToViews.put(tag, view); - mTagsToViewManagers.put(tag, viewManager); - } finally { - Systrace.endSection(Systrace.TRACE_TAG_REACT_VIEW); - } - } - - private static String constructManageChildrenErrorMessage( - ViewGroup viewToManage, - ViewGroupManager viewManager, - @Nullable int[] indicesToRemove, - @Nullable ViewAtIndex[] viewsToAdd, - @Nullable int[] tagsToDelete) { - StringBuilder stringBuilder = new StringBuilder(); - - if (null != viewToManage) { - stringBuilder.append( - "View tag:" - + viewToManage.getId() - + " View Type:" - + viewToManage.getClass().toString() - + "\n"); - stringBuilder.append(" children(" + viewManager.getChildCount(viewToManage) + "): [\n"); - for (int index = 0; viewManager.getChildAt(viewToManage, index) != null; index += 16) { - for (int innerOffset = 0; - viewManager.getChildAt(viewToManage, index + innerOffset) != null && innerOffset < 16; - innerOffset++) { - stringBuilder.append( - viewManager.getChildAt(viewToManage, index + innerOffset).getId() + ","); - } - stringBuilder.append("\n"); - } - stringBuilder.append(" ],\n"); - } - - if (indicesToRemove != null) { - stringBuilder.append(" indicesToRemove(" + indicesToRemove.length + "): [\n"); - for (int index = 0; index < indicesToRemove.length; index += 16) { - for (int innerOffset = 0; - ((index + innerOffset) < indicesToRemove.length) && innerOffset < 16; - innerOffset++) { - stringBuilder.append(indicesToRemove[index + innerOffset] + ","); - } - stringBuilder.append("\n"); - } - stringBuilder.append(" ],\n"); - } - if (viewsToAdd != null) { - stringBuilder.append(" viewsToAdd(" + viewsToAdd.length + "): [\n"); - for (int index = 0; index < viewsToAdd.length; index += 16) { - for (int innerOffset = 0; - ((index + innerOffset) < viewsToAdd.length) && innerOffset < 16; - innerOffset++) { - stringBuilder.append( - "[" - + viewsToAdd[index + innerOffset].mIndex - + "," - + viewsToAdd[index + innerOffset].mTag - + "],"); - } - stringBuilder.append("\n"); - } - stringBuilder.append(" ],\n"); - } - if (tagsToDelete != null) { - stringBuilder.append(" tagsToDelete(" + tagsToDelete.length + "): [\n"); - for (int index = 0; index < tagsToDelete.length; index += 16) { - for (int innerOffset = 0; - ((index + innerOffset) < tagsToDelete.length) && innerOffset < 16; - innerOffset++) { - stringBuilder.append(tagsToDelete[index + innerOffset] + ","); - } - stringBuilder.append("\n"); - } - stringBuilder.append(" ]\n"); - } - - return stringBuilder.toString(); - } - - private Set getPendingDeletionsForTag(int tag) { - if (mPendingDeletionsForTag == null) { - mPendingDeletionsForTag = new HashMap<>(); - } - - if (!mPendingDeletionsForTag.containsKey(tag)) { - mPendingDeletionsForTag.put(tag, new HashSet()); - } - - return mPendingDeletionsForTag.get(tag); - } - - /** + viewToUpdate.layout(x, y, x + width, y + height); + } + } + + public synchronized void createView(ThemedReactContext themedContext, int tag, String className, @Nullable ReactStylesDiffMap initialProps) { + if (DEBUG_MODE) { + FLog.d(TAG, "createView[%d]: %s %s", tag, className, (initialProps != null ? initialProps.toString() : "")); + } + UiThreadUtil.assertOnUiThread(); + SystraceMessage.beginSection(Systrace.TRACE_TAG_REACT_VIEW, "NativeViewHierarchyManager_createView").arg("tag", tag).arg("className", className).flush(); + try { + ViewManager viewManager = mViewManagers.get(className); + View view = viewManager.createView(tag, themedContext, initialProps, null, mJSResponderHandler); + mTagsToViews.put(tag, view); + mTagsToViewManagers.put(tag, viewManager); + } finally { + Systrace.endSection(Systrace.TRACE_TAG_REACT_VIEW); + } + } + + private static String constructManageChildrenErrorMessage(ViewGroup viewToManage, ViewGroupManager viewManager, @Nullable int[] indicesToRemove, @Nullable ViewAtIndex[] viewsToAdd, @Nullable int[] tagsToDelete) { + StringBuilder stringBuilder = new StringBuilder(); + if (null != viewToManage) { + stringBuilder.append("View tag:" + viewToManage.getId() + " View Type:" + viewToManage.getClass().toString() + "\n"); + stringBuilder.append(" children(" + viewManager.getChildCount(viewToManage) + "): [\n"); + for (int index = 0; viewManager.getChildAt(viewToManage, index) != null; index += 16) { + for (int innerOffset = 0; viewManager.getChildAt(viewToManage, index + innerOffset) != null && innerOffset < 16; innerOffset++) { + stringBuilder.append(viewManager.getChildAt(viewToManage, index + innerOffset).getId() + ","); + } + stringBuilder.append("\n"); + } + stringBuilder.append(" ],\n"); + } + if (indicesToRemove != null) { + stringBuilder.append(" indicesToRemove(" + indicesToRemove.length + "): [\n"); + for (int index = 0; index < indicesToRemove.length; index += 16) { + for (int innerOffset = 0; ((index + innerOffset) < indicesToRemove.length) && innerOffset < 16; innerOffset++) { + stringBuilder.append(indicesToRemove[index + innerOffset] + ","); + } + stringBuilder.append("\n"); + } + stringBuilder.append(" ],\n"); + } + if (viewsToAdd != null) { + stringBuilder.append(" viewsToAdd(" + viewsToAdd.length + "): [\n"); + for (int index = 0; index < viewsToAdd.length; index += 16) { + for (int innerOffset = 0; ((index + innerOffset) < viewsToAdd.length) && innerOffset < 16; innerOffset++) { + stringBuilder.append("[" + viewsToAdd[index + innerOffset].mIndex + "," + viewsToAdd[index + innerOffset].mTag + "],"); + } + stringBuilder.append("\n"); + } + stringBuilder.append(" ],\n"); + } + if (tagsToDelete != null) { + stringBuilder.append(" tagsToDelete(" + tagsToDelete.length + "): [\n"); + for (int index = 0; index < tagsToDelete.length; index += 16) { + for (int innerOffset = 0; ((index + innerOffset) < tagsToDelete.length) && innerOffset < 16; innerOffset++) { + stringBuilder.append(tagsToDelete[index + innerOffset] + ","); + } + stringBuilder.append("\n"); + } + stringBuilder.append(" ]\n"); + } + return stringBuilder.toString(); + } + + private Set getPendingDeletionsForTag(int tag) { + if (mPendingDeletionsForTag == null) { + mPendingDeletionsForTag = new HashMap<>(); + } + if (!mPendingDeletionsForTag.containsKey(tag)) { + mPendingDeletionsForTag.put(tag, new HashSet()); + } + return mPendingDeletionsForTag.get(tag); + } + + /** * @param tag react tag of the node we want to manage * @param indicesToRemove ordered (asc) list of indices at which view should be removed * @param viewsToAdd ordered (asc based on mIndex property) list of tag-index pairs that represent * a view which should be added at the specified index * @param tagsToDelete list of tags corresponding to views that should be removed */ - public synchronized void manageChildren( - final int tag, - @Nullable int[] indicesToRemove, - @Nullable ViewAtIndex[] viewsToAdd, - @Nullable int[] tagsToDelete) { - if (DEBUG_MODE) { - FLog.d( - TAG, - "createView[%d]: %s %s %s", - tag, - (indicesToRemove != null ? indicesToRemove.toString() : ""), - (viewsToAdd != null ? viewsToAdd.toString() : ""), - (tagsToDelete != null ? tagsToDelete.toString() : "")); - } - UiThreadUtil.assertOnUiThread(); - - final Set pendingDeletionTags = getPendingDeletionsForTag(tag); - final ViewGroup viewToManage = (ViewGroup) mTagsToViews.get(tag); - final ViewGroupManager viewManager = (ViewGroupManager) resolveViewManager(tag); - if (viewToManage == null) { - throw new IllegalViewOperationException( - "Trying to manageChildren view with tag " - + tag - + " which doesn't exist\n detail: " - + constructManageChildrenErrorMessage( - viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); - } - - int lastIndexToRemove = viewManager.getChildCount(viewToManage); - - if (indicesToRemove != null) { - for (int i = indicesToRemove.length - 1; i >= 0; i--) { - int indexToRemove = indicesToRemove[i]; - if (indexToRemove < 0) { - throw new IllegalViewOperationException( - "Trying to remove a negative view index:" - + indexToRemove - + " view tag: " - + tag - + "\n detail: " - + constructManageChildrenErrorMessage( - viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); - } - if (viewManager.getChildAt(viewToManage, indexToRemove) == null) { - if (mRootTags.get(tag) && viewManager.getChildCount(viewToManage) == 0) { - // This root node has already been removed (likely due to a threading issue caused by - // async js execution). Ignore this root removal. - return; - } - throw new IllegalViewOperationException( - "Trying to remove a view index above child " - + "count " - + indexToRemove - + " view tag: " - + tag - + "\n detail: " - + constructManageChildrenErrorMessage( - viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); - } - if (indexToRemove >= lastIndexToRemove) { - throw new IllegalViewOperationException( - "Trying to remove an out of order view index:" - + indexToRemove - + " view tag: " - + tag - + "\n detail: " - + constructManageChildrenErrorMessage( - viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); - } - - View viewToRemove = viewManager.getChildAt(viewToManage, indexToRemove); - - if (mLayoutAnimationEnabled - && mLayoutAnimator.shouldAnimateLayout(viewToRemove) - && arrayContains(tagsToDelete, viewToRemove.getId())) { - // The view will be removed and dropped by the 'delete' layout animation - // instead, so do nothing - } else { - viewManager.removeViewAt(viewToManage, indexToRemove); - } - - lastIndexToRemove = indexToRemove; - } - } - - if (tagsToDelete != null) { - for (int i = 0; i < tagsToDelete.length; i++) { - int tagToDelete = tagsToDelete[i]; - final View viewToDestroy = mTagsToViews.get(tagToDelete); - if (viewToDestroy == null) { - throw new IllegalViewOperationException( - "Trying to destroy unknown view tag: " - + tagToDelete - + "\n detail: " - + constructManageChildrenErrorMessage( - viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); - } - - if (mLayoutAnimationEnabled && mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) { - pendingDeletionTags.add(tagToDelete); - mLayoutAnimator.deleteView( - viewToDestroy, - new LayoutAnimationListener() { - @Override - public void onAnimationEnd() { - // This should be called only on the UI thread, because - // onAnimationEnd is called (indirectly) by Android View Animation. - UiThreadUtil.assertOnUiThread(); - - viewManager.removeView(viewToManage, viewToDestroy); - dropView(viewToDestroy); - pendingDeletionTags.remove(viewToDestroy.getId()); - if (pendingDeletionTags.isEmpty()) { - mPendingDeletionsForTag.remove(tag); - } + public synchronized void manageChildren(final int tag, @Nullable int[] indicesToRemove, @Nullable ViewAtIndex[] viewsToAdd, @Nullable int[] tagsToDelete) { + if (DEBUG_MODE) { + FLog.d(TAG, "createView[%d]: %s %s %s", tag, (indicesToRemove != null ? indicesToRemove.toString() : ""), (viewsToAdd != null ? viewsToAdd.toString() : ""), (tagsToDelete != null ? tagsToDelete.toString() : "")); + } + UiThreadUtil.assertOnUiThread(); + final Set pendingDeletionTags = getPendingDeletionsForTag(tag); + final ViewGroup viewToManage = (ViewGroup) mTagsToViews.get(tag); + final ViewGroupManager viewManager = (ViewGroupManager) resolveViewManager(tag); + if (viewToManage == null) { + throw new IllegalViewOperationException("Trying to manageChildren view with tag " + tag + " which doesn't exist\n detail: " + constructManageChildrenErrorMessage(viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); + } + int lastIndexToRemove = viewManager.getChildCount(viewToManage); + if (indicesToRemove != null) { + for (int i = indicesToRemove.length - 1; i >= 0; i--) { + int indexToRemove = indicesToRemove[i]; + if (indexToRemove < 0) { + throw new IllegalViewOperationException("Trying to remove a negative view index:" + indexToRemove + " view tag: " + tag + "\n detail: " + constructManageChildrenErrorMessage(viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); } - }); - } else { - dropView(viewToDestroy); - } - } - } - - if (viewsToAdd != null) { - for (int i = 0; i < viewsToAdd.length; i++) { - ViewAtIndex viewAtIndex = viewsToAdd[i]; - View viewToAdd = mTagsToViews.get(viewAtIndex.mTag); - if (viewToAdd == null) { - throw new IllegalViewOperationException( - "Trying to add unknown view tag: " - + viewAtIndex.mTag - + "\n detail: " - + constructManageChildrenErrorMessage( - viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); - } - - int normalizedIndex = viewAtIndex.mIndex; - if (!pendingDeletionTags.isEmpty()) { - normalizedIndex = 0; - int counter = 0; - while (normalizedIndex < viewToManage.getChildCount()) { - if (counter == viewAtIndex.mIndex) { - break; + if (viewManager.getChildAt(viewToManage, indexToRemove) == null) { + if (mRootTags.get(tag) && viewManager.getChildCount(viewToManage) == 0) { + // async js execution). Ignore this root removal. + return; + } + throw new IllegalViewOperationException("Trying to remove a view index above child " + "count " + indexToRemove + " view tag: " + tag + "\n detail: " + constructManageChildrenErrorMessage(viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); + } + if (indexToRemove >= lastIndexToRemove) { + throw new IllegalViewOperationException("Trying to remove an out of order view index:" + indexToRemove + " view tag: " + tag + "\n detail: " + constructManageChildrenErrorMessage(viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); + } + View viewToRemove = viewManager.getChildAt(viewToManage, indexToRemove); + if (mLayoutAnimationEnabled && mLayoutAnimator.shouldAnimateLayout(viewToRemove) && arrayContains(tagsToDelete, viewToRemove.getId())) { + // The view will be removed and dropped by the 'delete' layout animation + // instead, so do nothing + } else { + viewManager.removeViewAt(viewToManage, indexToRemove); + } + lastIndexToRemove = indexToRemove; } - View v = viewToManage.getChildAt(normalizedIndex); - if (!pendingDeletionTags.contains(v.getId())) { - counter++; + } + if (tagsToDelete != null) { + for (int i = 0; i < tagsToDelete.length; i++) { + int tagToDelete = tagsToDelete[i]; + final View viewToDestroy = mTagsToViews.get(tagToDelete); + if (viewToDestroy == null) { + throw new IllegalViewOperationException("Trying to destroy unknown view tag: " + tagToDelete + "\n detail: " + constructManageChildrenErrorMessage(viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); + } + if (mLayoutAnimationEnabled && mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) { + pendingDeletionTags.add(tagToDelete); + mLayoutAnimator.deleteView(viewToDestroy, new LayoutAnimationListener() { + + @Override + public void onAnimationEnd() { + // This should be called only on the UI thread, because + // onAnimationEnd is called (indirectly) by Android View Animation. + UiThreadUtil.assertOnUiThread(); + viewManager.removeView(viewToManage, viewToDestroy); + dropView(viewToDestroy); + pendingDeletionTags.remove(viewToDestroy.getId()); + if (pendingDeletionTags.isEmpty()) { + mPendingDeletionsForTag.remove(tag); + } + } + }); + } else { + dropView(viewToDestroy); + } } - normalizedIndex++; - } } - - viewManager.addView(viewToManage, viewToAdd, normalizedIndex); - } - } - if (pendingDeletionTags.isEmpty()) { - mPendingDeletionsForTag.remove(tag); + if (viewsToAdd != null) { + for (int i = 0; i < viewsToAdd.length; i++) { + ViewAtIndex viewAtIndex = viewsToAdd[i]; + View viewToAdd = mTagsToViews.get(viewAtIndex.mTag); + if (viewToAdd == null) { + throw new IllegalViewOperationException("Trying to add unknown view tag: " + viewAtIndex.mTag + "\n detail: " + constructManageChildrenErrorMessage(viewToManage, viewManager, indicesToRemove, viewsToAdd, tagsToDelete)); + } + int normalizedIndex = viewAtIndex.mIndex; + if (!pendingDeletionTags.isEmpty()) { + normalizedIndex = 0; + int counter = 0; + while (normalizedIndex < viewToManage.getChildCount()) { + if (counter == viewAtIndex.mIndex) { + break; + } + View v = viewToManage.getChildAt(normalizedIndex); + if (!pendingDeletionTags.contains(v.getId())) { + counter++; + } + normalizedIndex++; + } + } + viewManager.addView(viewToManage, viewToAdd, normalizedIndex); + } + } + if (pendingDeletionTags.isEmpty()) { + mPendingDeletionsForTag.remove(tag); + } } - } - private boolean arrayContains(@Nullable int[] array, int ele) { - if (array == null) { - return false; - } - for (int curEle : array) { - if (curEle == ele) { - return true; - } + private boolean arrayContains(@Nullable int[] array, int ele) { + if (array == null) { + return false; + } + for (int curEle : array) { + if (curEle == ele) { + return true; + } + } + return false; } - return false; - } - /** + /** * Simplified version of constructManageChildrenErrorMessage that only deals with adding children * views */ - private static String constructSetChildrenErrorMessage( - ViewGroup viewToManage, ViewGroupManager viewManager, ReadableArray childrenTags) { - ViewAtIndex[] viewsToAdd = new ViewAtIndex[childrenTags.size()]; - for (int i = 0; i < childrenTags.size(); i++) { - viewsToAdd[i] = new ViewAtIndex(childrenTags.getInt(i), i); - } - return constructManageChildrenErrorMessage(viewToManage, viewManager, null, viewsToAdd, null); - } - - /** Simplified version of manageChildren that only deals with adding children views */ - public synchronized void setChildren(int tag, ReadableArray childrenTags) { - if (DEBUG_MODE) { - FLog.d( - TAG, - "setChildren[%d]: %s", - tag, - (childrenTags != null ? childrenTags.toString() : "")); - } - UiThreadUtil.assertOnUiThread(); - ViewGroup viewToManage = (ViewGroup) mTagsToViews.get(tag); - ViewGroupManager viewManager = (ViewGroupManager) resolveViewManager(tag); - - for (int i = 0; i < childrenTags.size(); i++) { - View viewToAdd = mTagsToViews.get(childrenTags.getInt(i)); - if (viewToAdd == null) { - throw new IllegalViewOperationException( - "Trying to add unknown view tag: " - + childrenTags.getInt(i) - + "\n detail: " - + constructSetChildrenErrorMessage(viewToManage, viewManager, childrenTags)); - } - viewManager.addView(viewToManage, viewToAdd, i); - } - } - - /** See {@link UIManagerModule#addRootView}. */ - public synchronized void addRootView(int tag, View view) { - addRootViewGroup(tag, view); - } - - protected final synchronized void addRootViewGroup(int tag, View view) { - if (DEBUG_MODE) { - FLog.d(TAG, "addRootViewGroup[%d]: %s", tag, (view != null ? view.toString() : "")); - } - if (view.getId() != View.NO_ID) { - FLog.e( - TAG, - "Trying to add a root view with an explicit id (" - + view.getId() - + ") already " - + "set. React Native uses the id field to track react tags and will overwrite this field. " - + "If that is fine, explicitly overwrite the id field to View.NO_ID before calling " - + "addRootView."); - } - - mTagsToViews.put(tag, view); - mTagsToViewManagers.put(tag, mRootViewManager); - mRootTags.put(tag, true); - view.setId(tag); - } - - /** Releases all references to given native View. */ - protected synchronized void dropView(View view) { - if (DEBUG_MODE) { - FLog.d(TAG, "dropView[%d]", (view != null ? view.getId() : -1)); - } - UiThreadUtil.assertOnUiThread(); - if (view == null) { - // Ignore this drop operation when view is null. - return; - } - if (mTagsToViewManagers.get(view.getId()) == null) { - // This view has already been dropped (likely due to a threading issue caused by async js - // execution). Ignore this drop operation. - return; - } - if (!mRootTags.get(view.getId())) { - // For non-root views we notify viewmanager with {@link ViewManager#onDropInstance} - resolveViewManager(view.getId()).onDropViewInstance(view); - } - ViewManager viewManager = mTagsToViewManagers.get(view.getId()); - if (view instanceof ViewGroup && viewManager instanceof ViewGroupManager) { - ViewGroup viewGroup = (ViewGroup) view; - ViewGroupManager viewGroupManager = (ViewGroupManager) viewManager; - for (int i = viewGroupManager.getChildCount(viewGroup) - 1; i >= 0; i--) { - View child = viewGroupManager.getChildAt(viewGroup, i); - if (child == null) { - FLog.e(TAG, "Unable to drop null child view"); - } else if (mTagsToViews.get(child.getId()) != null) { - dropView(child); - } - } - viewGroupManager.removeAllViews(viewGroup); - } - mTagsToViews.remove(view.getId()); - mTagsToViewManagers.remove(view.getId()); - } - - public synchronized void removeRootView(int rootViewTag) { - if (DEBUG_MODE) { - FLog.d(TAG, "removeRootView[%d]", rootViewTag); - } - UiThreadUtil.assertOnUiThread(); - if (!mRootTags.get(rootViewTag)) { - SoftAssertions.assertUnreachable( - "View with tag " + rootViewTag + " is not registered as a root view"); - } - View rootView = mTagsToViews.get(rootViewTag); - dropView(rootView); - mRootTags.delete(rootViewTag); - } - - /** + private static String constructSetChildrenErrorMessage(ViewGroup viewToManage, ViewGroupManager viewManager, ReadableArray childrenTags) { + ViewAtIndex[] viewsToAdd = new ViewAtIndex[childrenTags.size()]; + for (int i = 0; i < childrenTags.size(); i++) { + viewsToAdd[i] = new ViewAtIndex(childrenTags.getInt(i), i); + } + return constructManageChildrenErrorMessage(viewToManage, viewManager, null, viewsToAdd, null); + } + + /** Simplified version of manageChildren that only deals with adding children views */ + public synchronized void setChildren(int tag, ReadableArray childrenTags) { + if (DEBUG_MODE) { + FLog.d(TAG, "setChildren[%d]: %s", tag, (childrenTags != null ? childrenTags.toString() : "")); + } + UiThreadUtil.assertOnUiThread(); + ViewGroup viewToManage = (ViewGroup) mTagsToViews.get(tag); + ViewGroupManager viewManager = (ViewGroupManager) resolveViewManager(tag); + for (int i = 0; i < childrenTags.size(); i++) { + View viewToAdd = mTagsToViews.get(childrenTags.getInt(i)); + if (viewToAdd == null) { + throw new IllegalViewOperationException("Trying to add unknown view tag: " + childrenTags.getInt(i) + "\n detail: " + constructSetChildrenErrorMessage(viewToManage, viewManager, childrenTags)); + } + viewManager.addView(viewToManage, viewToAdd, i); + } + } + + /** See {@link UIManagerModule#addRootView}. */ + public synchronized void addRootView(int tag, View view) { + addRootViewGroup(tag, view); + } + + protected final synchronized void addRootViewGroup(int tag, View view) { + if (DEBUG_MODE) { + FLog.d(TAG, "addRootViewGroup[%d]: %s", tag, (view != null ? view.toString() : "")); + } + if (view.getId() != View.NO_ID) { + FLog.e(TAG, "Trying to add a root view with an explicit id (" + view.getId() + ") already " + "set. React Native uses the id field to track react tags and will overwrite this field. " + "If that is fine, explicitly overwrite the id field to View.NO_ID before calling " + "addRootView."); + } + mTagsToViews.put(tag, view); + mTagsToViewManagers.put(tag, mRootViewManager); + mRootTags.put(tag, true); + view.setId(tag); + } + + /** Releases all references to given native View. */ + protected synchronized void dropView(View view) { + if (DEBUG_MODE) { + FLog.d(TAG, "dropView[%d]", (view != null ? view.getId() : -1)); + } + UiThreadUtil.assertOnUiThread(); + if (view == null) { + // Ignore this drop operation when view is null. + return; + } + if (mTagsToViewManagers.get(view.getId()) == null) { + // execution). Ignore this drop operation. + return; + } + if (!mRootTags.get(view.getId())) { + // For non-root views we notify viewmanager with {@link ViewManager#onDropInstance} + resolveViewManager(view.getId()).onDropViewInstance(view); + } + ViewManager viewManager = mTagsToViewManagers.get(view.getId()); + if (view instanceof ViewGroup && viewManager instanceof ViewGroupManager) { + ViewGroup viewGroup = (ViewGroup) view; + ViewGroupManager viewGroupManager = (ViewGroupManager) viewManager; + for (int i = viewGroupManager.getChildCount(viewGroup) - 1; i >= 0; i--) { + View child = viewGroupManager.getChildAt(viewGroup, i); + if (child == null) { + FLog.e(TAG, "Unable to drop null child view"); + } else if (mTagsToViews.get(child.getId()) != null) { + dropView(child); + } + } + viewGroupManager.removeAllViews(viewGroup); + } + mTagsToViews.remove(view.getId()); + mTagsToViewManagers.remove(view.getId()); + } + + public synchronized void removeRootView(int rootViewTag) { + if (DEBUG_MODE) { + FLog.d(TAG, "removeRootView[%d]", rootViewTag); + } + UiThreadUtil.assertOnUiThread(); + if (!mRootTags.get(rootViewTag)) { + SoftAssertions.assertUnreachable("View with tag " + rootViewTag + " is not registered as a root view"); + } + View rootView = mTagsToViews.get(rootViewTag); + dropView(rootView); + mRootTags.delete(rootViewTag); + } + + /** * Return root view num * * @return The num of root view */ - public synchronized int getRootViewNum() { - return mRootTags.size(); - } + public synchronized int getRootViewNum() { + return mRootTags.size(); + } - /** + /** * Returns true on success, false on failure. If successful, after calling, output buffer will be * {x, y, width, height}. */ - public synchronized void measure(int tag, int[] outputBuffer) { - if (DEBUG_MODE) { - FLog.d(TAG, "measure[%d]", tag); - } - UiThreadUtil.assertOnUiThread(); - View v = mTagsToViews.get(tag); - if (v == null) { - throw new NoSuchNativeViewException("No native view for " + tag + " currently exists"); + public synchronized void measure(int tag, int[] outputBuffer) { + if (DEBUG_MODE) { + FLog.d(TAG, "measure[%d]", tag); + } + UiThreadUtil.assertOnUiThread(); + View v = mTagsToViews.get(tag); + if (v == null) { + throw new NoSuchNativeViewException("No native view for " + tag + " currently exists"); + } + View rootView = (View) RootViewUtil.getRootView(v); + // and has been removed by clipping + if (rootView == null) { + throw new NoSuchNativeViewException("Native view " + tag + " is no longer on screen"); + } + computeBoundingBox(rootView, outputBuffer); + int rootX = outputBuffer[0]; + int rootY = outputBuffer[1]; + computeBoundingBox(v, outputBuffer); + outputBuffer[0] -= rootX; + outputBuffer[1] -= rootY; + } + + private void computeBoundingBox(View view, int[] outputBuffer) { + mBoundingBox.set(0, 0, view.getWidth(), view.getHeight()); + mapRectFromViewToWindowCoords(view, mBoundingBox); + outputBuffer[0] = Math.round(mBoundingBox.left); + outputBuffer[1] = Math.round(mBoundingBox.top); + outputBuffer[2] = Math.round(mBoundingBox.right - mBoundingBox.left); + outputBuffer[3] = Math.round(mBoundingBox.bottom - mBoundingBox.top); + } + + private void mapRectFromViewToWindowCoords(View view, RectF rect) { + Matrix matrix = view.getMatrix(); + if (!matrix.isIdentity()) { + matrix.mapRect(rect); + } + rect.offset(view.getLeft(), view.getTop()); + ViewParent parent = view.getParent(); + while (parent instanceof View) { + View parentView = (View) parent; + rect.offset(-parentView.getScrollX(), -parentView.getScrollY()); + matrix = parentView.getMatrix(); + if (!matrix.isIdentity()) { + matrix.mapRect(rect); + } + rect.offset(parentView.getLeft(), parentView.getTop()); + parent = parentView.getParent(); + } } - View rootView = (View) RootViewUtil.getRootView(v); - // It is possible that the RootView can't be found because this view is no longer on the screen - // and has been removed by clipping - if (rootView == null) { - throw new NoSuchNativeViewException("Native view " + tag + " is no longer on screen"); + /** + * Returns the coordinates of a view relative to the window (not just the RootView which is what + * measure will return) + * + * @param tag - the tag for the view + * @param outputBuffer - output buffer that contains [x,y,width,height] of the view in coordinates + * relative to the device window + */ + public synchronized void measureInWindow(int tag, int[] outputBuffer) { + if (DEBUG_MODE) { + FLog.d(TAG, "measureInWindow[%d]", tag); + } + UiThreadUtil.assertOnUiThread(); + View v = mTagsToViews.get(tag); + if (v == null) { + throw new NoSuchNativeViewException("No native view for " + tag + " currently exists"); + } + v.getLocationOnScreen(outputBuffer); + // we need to subtract visibleWindowCoords - to subtract possible window insets, split screen or + // multi window + Rect visibleWindowFrame = new Rect(); + v.getWindowVisibleDisplayFrame(visibleWindowFrame); + outputBuffer[0] = outputBuffer[0] - visibleWindowFrame.left; + outputBuffer[1] = outputBuffer[1] - visibleWindowFrame.top; + // outputBuffer[0,1] already contain what we want + outputBuffer[2] = v.getWidth(); + outputBuffer[3] = v.getHeight(); + } + + public synchronized int findTargetTagForTouch(int reactTag, float touchX, float touchY) { + if (DEBUG_MODE) { + FLog.d(TAG, "findTargetTagForTouch[%d]: %f %f", reactTag, touchX, touchY); + } + UiThreadUtil.assertOnUiThread(); + View view = mTagsToViews.get(reactTag); + if (view == null) { + throw new JSApplicationIllegalArgumentException("Could not find view with tag " + reactTag); + } + return TouchTargetHelper.findTargetTagForTouch(touchX, touchY, (ViewGroup) view); } - computeBoundingBox(rootView, outputBuffer); - int rootX = outputBuffer[0]; - int rootY = outputBuffer[1]; - computeBoundingBox(v, outputBuffer); - outputBuffer[0] -= rootX; - outputBuffer[1] -= rootY; - } - - private void computeBoundingBox(View view, int[] outputBuffer) { - mBoundingBox.set(0, 0, view.getWidth(), view.getHeight()); - mapRectFromViewToWindowCoords(view, mBoundingBox); - - outputBuffer[0] = Math.round(mBoundingBox.left); - outputBuffer[1] = Math.round(mBoundingBox.top); - outputBuffer[2] = Math.round(mBoundingBox.right - mBoundingBox.left); - outputBuffer[3] = Math.round(mBoundingBox.bottom - mBoundingBox.top); - } - private void mapRectFromViewToWindowCoords(View view, RectF rect) { - Matrix matrix = view.getMatrix(); - if (!matrix.isIdentity()) { - matrix.mapRect(rect); + public synchronized void setJSResponder(int reactTag, int initialReactTag, boolean blockNativeResponder) { + if (!blockNativeResponder) { + mJSResponderHandler.setJSResponder(initialReactTag, null); + return; + } + View view = mTagsToViews.get(reactTag); + if (initialReactTag != reactTag && view instanceof ViewParent) { + // In this case, initialReactTag corresponds to a virtual/layout-only View, and we already + // have a parent of that View in reactTag, so we can use it. + mJSResponderHandler.setJSResponder(initialReactTag, (ViewParent) view); + return; + } + if (mRootTags.get(reactTag)) { + SoftAssertions.assertUnreachable("Cannot block native responder on " + reactTag + " that is a root view"); + } + mJSResponderHandler.setJSResponder(initialReactTag, view.getParent()); } - rect.offset(view.getLeft(), view.getTop()); - - ViewParent parent = view.getParent(); - while (parent instanceof View) { - View parentView = (View) parent; + public void clearJSResponder() { + mJSResponderHandler.clearJSResponder(); + } - rect.offset(-parentView.getScrollX(), -parentView.getScrollY()); + void configureLayoutAnimation(final ReadableMap config, final Callback onAnimationComplete) { + mLayoutAnimator.initializeFromConfig(config, onAnimationComplete); + } - matrix = parentView.getMatrix(); - if (!matrix.isIdentity()) { - matrix.mapRect(rect); - } + void clearLayoutAnimation() { + mLayoutAnimator.reset(); + } - rect.offset(parentView.getLeft(), parentView.getTop()); + @Deprecated + public synchronized void dispatchCommand(int reactTag, int commandId, @Nullable ReadableArray args) { + if (DEBUG_MODE) { + FLog.d(TAG, "dispatchCommand[%d]: %d %s", reactTag, commandId, (args != null ? args.toString() : "")); + } + UiThreadUtil.assertOnUiThread(); + View view = mTagsToViews.get(reactTag); + if (view == null) { + throw new RetryableMountingLayerException("Trying to send command to a non-existing view with tag [" + reactTag + "] and command " + commandId); + } + ViewManager viewManager = resolveViewManager(reactTag); + viewManager.receiveCommand(view, commandId, args); + } - parent = parentView.getParent(); + public synchronized void dispatchCommand(int reactTag, String commandId, @Nullable ReadableArray args) { + if (DEBUG_MODE) { + FLog.d(TAG, "dispatchCommand[%d]: %s %s", reactTag, commandId, (args != null ? args.toString() : "")); + } + UiThreadUtil.assertOnUiThread(); + View view = mTagsToViews.get(reactTag); + if (view == null) { + throw new RetryableMountingLayerException("Trying to send command to a non-existing view with tag [" + reactTag + "] and command " + commandId); + } + ViewManager viewManager = resolveViewManager(reactTag); + viewManager.receiveCommand(view, commandId, args); } - } - /** - * Returns the coordinates of a view relative to the window (not just the RootView which is what - * measure will return) - * - * @param tag - the tag for the view - * @param outputBuffer - output buffer that contains [x,y,width,height] of the view in coordinates - * relative to the device window - */ - public synchronized void measureInWindow(int tag, int[] outputBuffer) { - if (DEBUG_MODE) { - FLog.d(TAG, "measureInWindow[%d]", tag); - } - UiThreadUtil.assertOnUiThread(); - View v = mTagsToViews.get(tag); - if (v == null) { - throw new NoSuchNativeViewException("No native view for " + tag + " currently exists"); - } - - v.getLocationOnScreen(outputBuffer); - - // we need to subtract visibleWindowCoords - to subtract possible window insets, split screen or - // multi window - Rect visibleWindowFrame = new Rect(); - v.getWindowVisibleDisplayFrame(visibleWindowFrame); - outputBuffer[0] = outputBuffer[0] - visibleWindowFrame.left; - outputBuffer[1] = outputBuffer[1] - visibleWindowFrame.top; - - // outputBuffer[0,1] already contain what we want - outputBuffer[2] = v.getWidth(); - outputBuffer[3] = v.getHeight(); - } - - public synchronized int findTargetTagForTouch(int reactTag, float touchX, float touchY) { - if (DEBUG_MODE) { - FLog.d(TAG, "findTargetTagForTouch[%d]: %f %f", reactTag, touchX, touchY); - } - UiThreadUtil.assertOnUiThread(); - View view = mTagsToViews.get(reactTag); - if (view == null) { - throw new JSApplicationIllegalArgumentException("Could not find view with tag " + reactTag); - } - return TouchTargetHelper.findTargetTagForTouch(touchX, touchY, (ViewGroup) view); - } - - public synchronized void setJSResponder( - int reactTag, int initialReactTag, boolean blockNativeResponder) { - if (!blockNativeResponder) { - mJSResponderHandler.setJSResponder(initialReactTag, null); - return; - } - - View view = mTagsToViews.get(reactTag); - if (initialReactTag != reactTag && view instanceof ViewParent) { - // In this case, initialReactTag corresponds to a virtual/layout-only View, and we already - // have a parent of that View in reactTag, so we can use it. - mJSResponderHandler.setJSResponder(initialReactTag, (ViewParent) view); - return; - } - - if (mRootTags.get(reactTag)) { - SoftAssertions.assertUnreachable( - "Cannot block native responder on " + reactTag + " that is a root view"); - } - mJSResponderHandler.setJSResponder(initialReactTag, view.getParent()); - } - - public void clearJSResponder() { - mJSResponderHandler.clearJSResponder(); - } - - void configureLayoutAnimation(final ReadableMap config, final Callback onAnimationComplete) { - mLayoutAnimator.initializeFromConfig(config, onAnimationComplete); - } - - void clearLayoutAnimation() { - mLayoutAnimator.reset(); - } - - @Deprecated - public synchronized void dispatchCommand( - int reactTag, int commandId, @Nullable ReadableArray args) { - if (DEBUG_MODE) { - FLog.d( - TAG, - "dispatchCommand[%d]: %d %s", - reactTag, - commandId, - (args != null ? args.toString() : "")); - } - UiThreadUtil.assertOnUiThread(); - View view = mTagsToViews.get(reactTag); - if (view == null) { - throw new RetryableMountingLayerException( - "Trying to send command to a non-existing view with tag [" - + reactTag - + "] and command " - + commandId); - } - ViewManager viewManager = resolveViewManager(reactTag); - viewManager.receiveCommand(view, commandId, args); - } - - public synchronized void dispatchCommand( - int reactTag, String commandId, @Nullable ReadableArray args) { - if (DEBUG_MODE) { - FLog.d( - TAG, - "dispatchCommand[%d]: %s %s", - reactTag, - commandId, - (args != null ? args.toString() : "")); - } - UiThreadUtil.assertOnUiThread(); - View view = mTagsToViews.get(reactTag); - if (view == null) { - throw new RetryableMountingLayerException( - "Trying to send command to a non-existing view with tag [" - + reactTag - + "] and command " - + commandId); - } - ViewManager viewManager = resolveViewManager(reactTag); - viewManager.receiveCommand(view, commandId, args); - } - - /** + /** * Show a {@link PopupMenu}. * * @param reactTag the tag of the anchor view (the PopupMenu is displayed next to this view); this @@ -872,81 +702,77 @@ public synchronized void dispatchCommand( * @param success will be called with the position of the selected item as the first argument, or * no arguments if the menu is dismissed */ - public synchronized void showPopupMenu( - int reactTag, ReadableArray items, Callback success, Callback error) { - UiThreadUtil.assertOnUiThread(); - View anchor = mTagsToViews.get(reactTag); - if (anchor == null) { - error.invoke("Can't display popup. Could not find view with tag " + reactTag); - return; + public synchronized void showPopupMenu(int reactTag, ReadableArray items, Callback success, Callback error) { + UiThreadUtil.assertOnUiThread(); + View anchor = mTagsToViews.get(reactTag); + if (anchor == null) { + error.invoke("Can't display popup. Could not find view with tag " + reactTag); + return; + } + mPopupMenu = new PopupMenu(getReactContextForView(reactTag), anchor); + Menu menu = mPopupMenu.getMenu(); + for (int i = 0; i < items.size(); i++) { + menu.add(Menu.NONE, Menu.NONE, i, items.getString(i)); + } + PopupMenuCallbackHandler handler = new PopupMenuCallbackHandler(success); + mPopupMenu.setOnMenuItemClickListener(handler); + mPopupMenu.setOnDismissListener(handler); + mPopupMenu.show(); } - mPopupMenu = new PopupMenu(getReactContextForView(reactTag), anchor); - Menu menu = mPopupMenu.getMenu(); - for (int i = 0; i < items.size(); i++) { - menu.add(Menu.NONE, Menu.NONE, i, items.getString(i)); + /** Dismiss the last opened PopupMenu {@link PopupMenu}. */ + public void dismissPopupMenu() { + if (mPopupMenu != null) { + mPopupMenu.dismiss(); + } } - PopupMenuCallbackHandler handler = new PopupMenuCallbackHandler(success); - mPopupMenu.setOnMenuItemClickListener(handler); - mPopupMenu.setOnDismissListener(handler); + private static class PopupMenuCallbackHandler implements PopupMenu.OnMenuItemClickListener, PopupMenu.OnDismissListener { - mPopupMenu.show(); - } + public final Callback mSuccess; - /** Dismiss the last opened PopupMenu {@link PopupMenu}. */ - public void dismissPopupMenu() { - if (mPopupMenu != null) { - mPopupMenu.dismiss(); - } - } + public boolean mConsumed = false; - private static class PopupMenuCallbackHandler - implements PopupMenu.OnMenuItemClickListener, PopupMenu.OnDismissListener { - - final Callback mSuccess; - boolean mConsumed = false; - - private PopupMenuCallbackHandler(Callback success) { - mSuccess = success; - } + private PopupMenuCallbackHandler(Callback success) { + mSuccess = success; + } - @Override - public void onDismiss(PopupMenu menu) { - if (!mConsumed) { - mSuccess.invoke(UIManagerModuleConstants.ACTION_DISMISSED); - mConsumed = true; - } - } + @Override + public void onDismiss(PopupMenu menu) { + if (!mConsumed) { + mSuccess.invoke(UIManagerModuleConstants.ACTION_DISMISSED); + mConsumed = true; + } + } - @Override - public boolean onMenuItemClick(MenuItem item) { - if (!mConsumed) { - mSuccess.invoke(UIManagerModuleConstants.ACTION_ITEM_SELECTED, item.getOrder()); - mConsumed = true; - return true; - } - return false; + @Override + public boolean onMenuItemClick(MenuItem item) { + if (!mConsumed) { + mSuccess.invoke(UIManagerModuleConstants.ACTION_ITEM_SELECTED, item.getOrder()); + mConsumed = true; + return true; + } + return false; + } } - } - /** + /** * @return Themed React context for view with a given {@param reactTag} - it gets the context * directly from the view using {@link View#getContext}. */ - private ThemedReactContext getReactContextForView(int reactTag) { - View view = mTagsToViews.get(reactTag); - if (view == null) { - throw new JSApplicationIllegalArgumentException("Could not find view with tag " + reactTag); + private ThemedReactContext getReactContextForView(int reactTag) { + View view = mTagsToViews.get(reactTag); + if (view == null) { + throw new JSApplicationIllegalArgumentException("Could not find view with tag " + reactTag); + } + return (ThemedReactContext) view.getContext(); } - return (ThemedReactContext) view.getContext(); - } - public void sendAccessibilityEvent(int tag, int eventType) { - View view = mTagsToViews.get(tag); - if (view == null) { - throw new RetryableMountingLayerException("Could not find view with tag " + tag); + public void sendAccessibilityEvent(int tag, int eventType) { + View view = mTagsToViews.get(tag); + if (view == null) { + throw new RetryableMountingLayerException("Could not find view with tag " + tag); + } + view.sendAccessibilityEvent(eventType); } - view.sendAccessibilityEvent(eventType); - } } From afbb86bedf6015d7953d4da1ea6aa29dcac608b3 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Tue, 28 Nov 2023 15:21:38 -0300 Subject: [PATCH 187/190] [react-native-codegen] prebuild codegen lib --- .../lib/CodegenSchema.d.ts | 359 ++++ .../react-native-codegen/lib/CodegenSchema.js | 11 + .../lib/CodegenSchema.js.flow | 396 ++++ .../lib/SchemaValidator.d.ts | 11 + .../lib/SchemaValidator.js | 54 + .../lib/SchemaValidator.js.flow | 67 + .../cli/combine/combine-js-to-schema-cli.js | 56 + .../combine/combine-js-to-schema-cli.js.flow | 55 + .../lib/cli/combine/combine-js-to-schema.js | 103 + .../cli/combine/combine-js-to-schema.js.flow | 49 + .../lib/cli/combine/combine-utils.js | 118 ++ .../lib/cli/combine/combine-utils.js.flow | 85 + .../lib/cli/generators/generate-all.js | 65 + .../lib/cli/generators/generate-all.js.flow | 66 + .../lib/cli/parser/parser-cli.js | 55 + .../lib/cli/parser/parser-cli.js.flow | 18 + .../lib/cli/parser/parser.js | 28 + .../lib/cli/parser/parser.js.flow | 31 + .../lib/cli/parser/parser.sh | 15 + .../lib/generators/RNCodegen.d.ts | 98 + .../lib/generators/RNCodegen.js | 236 +++ .../lib/generators/RNCodegen.js.flow | 315 +++ .../lib/generators/Utils.js | 47 + .../lib/generators/Utils.js.flow | 53 + .../generators/__test_fixtures__/fixtures.js | 80 + .../__test_fixtures__/fixtures.js.flow | 83 + .../components/ComponentsGeneratorUtils.js | 228 ++ .../ComponentsGeneratorUtils.js.flow | 316 +++ .../lib/generators/components/CppHelpers.js | 220 ++ .../generators/components/CppHelpers.js.flow | 268 +++ .../GenerateComponentDescriptorH.js | 75 + .../GenerateComponentDescriptorH.js.flow | 95 + .../components/GenerateComponentHObjCpp.js | 327 +++ .../GenerateComponentHObjCpp.js.flow | 418 ++++ .../components/GenerateEventEmitterCpp.js | 389 ++++ .../GenerateEventEmitterCpp.js.flow | 455 ++++ .../components/GenerateEventEmitterH.js | 276 +++ .../components/GenerateEventEmitterH.js.flow | 369 ++++ .../generators/components/GeneratePropsCpp.js | 126 ++ .../components/GeneratePropsCpp.js.flow | 161 ++ .../generators/components/GeneratePropsH.js | 609 ++++++ .../components/GeneratePropsH.js.flow | 777 +++++++ .../components/GeneratePropsJavaDelegate.js | 291 +++ .../GeneratePropsJavaDelegate.js.flow | 352 ++++ .../components/GeneratePropsJavaInterface.js | 242 +++ .../GeneratePropsJavaInterface.js.flow | 293 +++ .../GeneratePropsJavaPojo/PojoCollector.js | 149 ++ .../PojoCollector.js.flow | 187 ++ .../components/GeneratePropsJavaPojo/index.js | 66 + .../GeneratePropsJavaPojo/index.js.flow | 80 + .../GeneratePropsJavaPojo/serializePojo.js | 286 +++ .../serializePojo.js.flow | 314 +++ .../components/GenerateShadowNodeCpp.js | 73 + .../components/GenerateShadowNodeCpp.js.flow | 95 + .../components/GenerateShadowNodeH.js | 91 + .../components/GenerateShadowNodeH.js.flow | 124 ++ .../generators/components/GenerateStateCpp.js | 70 + .../components/GenerateStateCpp.js.flow | 92 + .../generators/components/GenerateStateH.js | 93 + .../components/GenerateStateH.js.flow | 111 + .../generators/components/GenerateTests.js | 166 ++ .../components/GenerateTests.js.flow | 221 ++ ...rateThirdPartyFabricComponentsProviderH.js | 95 + ...hirdPartyFabricComponentsProviderH.js.flow | 111 + ...hirdPartyFabricComponentsProviderObjCpp.js | 91 + ...artyFabricComponentsProviderObjCpp.js.flow | 107 + .../components/GenerateViewConfigJs.js | 414 ++++ .../components/GenerateViewConfigJs.js.flow | 488 +++++ .../lib/generators/components/JavaHelpers.js | 103 + .../generators/components/JavaHelpers.js.flow | 138 ++ .../components/__test_fixtures__/fixtures.js | 1824 ++++++++++++++++ .../__test_fixtures__/fixtures.js.flow | 1857 +++++++++++++++++ .../generators/modules/GenerateModuleCpp.js | 302 +++ .../modules/GenerateModuleCpp.js.flow | 286 +++ .../lib/generators/modules/GenerateModuleH.js | 528 +++++ .../modules/GenerateModuleH.js.flow | 545 +++++ .../modules/GenerateModuleJavaSpec.js | 570 +++++ .../modules/GenerateModuleJavaSpec.js.flow | 556 +++++ .../modules/GenerateModuleJniCpp.js | 503 +++++ .../modules/GenerateModuleJniCpp.js.flow | 523 +++++ .../generators/modules/GenerateModuleJniH.js | 138 ++ .../modules/GenerateModuleJniH.js.flow | 148 ++ .../GenerateModuleObjCpp/StructCollector.js | 253 +++ .../StructCollector.js.flow | 208 ++ .../modules/GenerateModuleObjCpp/Utils.js | 25 + .../GenerateModuleObjCpp/Utils.js.flow | 32 + .../header/serializeConstantsStruct.js | 335 +++ .../header/serializeConstantsStruct.js.flow | 288 +++ .../header/serializeRegularStruct.js | 328 +++ .../header/serializeRegularStruct.js.flow | 279 +++ .../header/serializeStruct.js | 25 + .../header/serializeStruct.js.flow | 35 + .../modules/GenerateModuleObjCpp/index.js | 185 ++ .../GenerateModuleObjCpp/index.js.flow | 219 ++ .../GenerateModuleObjCpp/serializeMethod.js | 535 +++++ .../serializeMethod.js.flow | 520 +++++ .../source/serializeModule.js | 96 + .../source/serializeModule.js.flow | 121 ++ .../lib/generators/modules/Utils.js | 38 + .../lib/generators/modules/Utils.js.flow | 59 + .../modules/__test_fixtures__/fixtures.js | 1800 ++++++++++++++++ .../__test_fixtures__/fixtures.js.flow | 1811 ++++++++++++++++ .../lib/parsers/consistency/compareSnaps.js | 84 + .../lib/parsers/error-utils.js | 345 +++ .../lib/parsers/error-utils.js.flow | 378 ++++ .../lib/parsers/errors.d.ts | 10 + .../lib/parsers/errors.js | 323 +++ .../lib/parsers/errors.js.flow | 415 ++++ .../components/__test_fixtures__/failures.js | 583 ++++++ .../__test_fixtures__/failures.js.flow | 600 ++++++ .../components/__test_fixtures__/fixtures.js | 1074 ++++++++++ .../__test_fixtures__/fixtures.js.flow | 1089 ++++++++++ .../lib/parsers/flow/components/commands.js | 107 + .../parsers/flow/components/commands.js.flow | 124 ++ .../flow/components/componentsUtils.js | 449 ++++ .../flow/components/componentsUtils.js.flow | 489 +++++ .../lib/parsers/flow/components/events.js | 256 +++ .../parsers/flow/components/events.js.flow | 287 +++ .../lib/parsers/flow/components/index.js | 49 + .../lib/parsers/flow/components/index.js.flow | 56 + .../modules/__test_fixtures__/failures.js | 269 +++ .../__test_fixtures__/failures.js.flow | 279 +++ .../modules/__test_fixtures__/fixtures.js | 787 +++++++ .../__test_fixtures__/fixtures.js.flow | 812 +++++++ .../lib/parsers/flow/modules/index.js | 314 +++ .../lib/parsers/flow/modules/index.js.flow | 267 +++ .../lib/parsers/flow/parser.d.ts | 17 + .../lib/parsers/flow/parser.js | 482 +++++ .../lib/parsers/flow/parser.js.flow | 560 +++++ .../lib/parsers/flow/utils.js | 21 + .../lib/parsers/flow/utils.js.flow | 24 + .../lib/parsers/parser.d.ts | 17 + .../lib/parsers/parser.js | 11 + .../lib/parsers/parser.js.flow | 431 ++++ .../lib/parsers/parserMock.js | 418 ++++ .../lib/parsers/parserMock.js.flow | 495 +++++ .../lib/parsers/parsers-commons.js | 1095 ++++++++++ .../lib/parsers/parsers-commons.js.flow | 1192 +++++++++++ .../lib/parsers/parsers-primitives.js | 660 ++++++ .../lib/parsers/parsers-primitives.js.flow | 728 +++++++ .../lib/parsers/parsers-utils.js | 18 + .../lib/parsers/parsers-utils.js.flow | 19 + .../lib/parsers/schema.js | 99 + .../lib/parsers/schema.js.flow | 62 + .../lib/parsers/schema/index.d.ts | 10 + .../lib/parsers/schema/index.js | 23 + .../lib/parsers/schema/index.js.flow | 26 + .../components/__test_fixtures__/failures.js | 489 +++++ .../__test_fixtures__/failures.js.flow | 505 +++++ .../components/__test_fixtures__/fixtures.js | 1228 +++++++++++ .../__test_fixtures__/fixtures.js.flow | 1245 +++++++++++ .../parsers/typescript/components/commands.js | 135 ++ .../typescript/components/commands.js.flow | 152 ++ .../typescript/components/componentsUtils.js | 475 +++++ .../components/componentsUtils.js.flow | 516 +++++ .../parsers/typescript/components/events.js | 261 +++ .../typescript/components/events.js.flow | 291 +++ .../parsers/typescript/components/extends.js | 41 + .../typescript/components/extends.js.flow | 49 + .../parsers/typescript/components/index.js | 55 + .../typescript/components/index.js.flow | 64 + .../modules/__test_fixtures__/failures.js | 212 ++ .../__test_fixtures__/failures.js.flow | 221 ++ .../modules/__test_fixtures__/fixtures.js | 843 ++++++++ .../__test_fixtures__/fixtures.js.flow | 873 ++++++++ .../lib/parsers/typescript/modules/index.js | 383 ++++ .../parsers/typescript/modules/index.js.flow | 396 ++++ .../parsers/typescript/parseTopLevelType.js | 203 ++ .../typescript/parseTopLevelType.js.flow | 243 +++ .../lib/parsers/typescript/parser.d.ts | 17 + .../lib/parsers/typescript/parser.js | 533 +++++ .../lib/parsers/typescript/parser.js.flow | 574 +++++ .../react-native-codegen/lib/parsers/utils.js | 157 ++ .../lib/parsers/utils.js.flow | 208 ++ 174 files changed, 53801 insertions(+) create mode 100644 packages/react-native-codegen/lib/CodegenSchema.d.ts create mode 100644 packages/react-native-codegen/lib/CodegenSchema.js create mode 100644 packages/react-native-codegen/lib/CodegenSchema.js.flow create mode 100644 packages/react-native-codegen/lib/SchemaValidator.d.ts create mode 100644 packages/react-native-codegen/lib/SchemaValidator.js create mode 100644 packages/react-native-codegen/lib/SchemaValidator.js.flow create mode 100644 packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js create mode 100644 packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js.flow create mode 100644 packages/react-native-codegen/lib/cli/combine/combine-js-to-schema.js create mode 100644 packages/react-native-codegen/lib/cli/combine/combine-js-to-schema.js.flow create mode 100644 packages/react-native-codegen/lib/cli/combine/combine-utils.js create mode 100644 packages/react-native-codegen/lib/cli/combine/combine-utils.js.flow create mode 100644 packages/react-native-codegen/lib/cli/generators/generate-all.js create mode 100644 packages/react-native-codegen/lib/cli/generators/generate-all.js.flow create mode 100644 packages/react-native-codegen/lib/cli/parser/parser-cli.js create mode 100644 packages/react-native-codegen/lib/cli/parser/parser-cli.js.flow create mode 100644 packages/react-native-codegen/lib/cli/parser/parser.js create mode 100644 packages/react-native-codegen/lib/cli/parser/parser.js.flow create mode 100644 packages/react-native-codegen/lib/cli/parser/parser.sh create mode 100644 packages/react-native-codegen/lib/generators/RNCodegen.d.ts create mode 100644 packages/react-native-codegen/lib/generators/RNCodegen.js create mode 100644 packages/react-native-codegen/lib/generators/RNCodegen.js.flow create mode 100644 packages/react-native-codegen/lib/generators/Utils.js create mode 100644 packages/react-native-codegen/lib/generators/Utils.js.flow create mode 100644 packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js create mode 100644 packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js create mode 100644 packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/CppHelpers.js create mode 100644 packages/react-native-codegen/lib/generators/components/CppHelpers.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsH.js create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js create mode 100644 packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateStateH.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateStateH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateTests.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateTests.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js create mode 100644 packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/JavaHelpers.js create mode 100644 packages/react-native-codegen/lib/generators/components/JavaHelpers.js.flow create mode 100644 packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js create mode 100644 packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js create mode 100644 packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/Utils.js create mode 100644 packages/react-native-codegen/lib/generators/modules/Utils.js.flow create mode 100644 packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js create mode 100644 packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/consistency/compareSnaps.js create mode 100644 packages/react-native-codegen/lib/parsers/error-utils.js create mode 100644 packages/react-native-codegen/lib/parsers/error-utils.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/errors.d.ts create mode 100644 packages/react-native-codegen/lib/parsers/errors.js create mode 100644 packages/react-native-codegen/lib/parsers/errors.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/commands.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/commands.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/events.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/events.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/index.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/components/index.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/modules/index.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/modules/index.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/parser.d.ts create mode 100644 packages/react-native-codegen/lib/parsers/flow/parser.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/parser.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/flow/utils.js create mode 100644 packages/react-native-codegen/lib/parsers/flow/utils.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/parser.d.ts create mode 100644 packages/react-native-codegen/lib/parsers/parser.js create mode 100644 packages/react-native-codegen/lib/parsers/parser.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/parserMock.js create mode 100644 packages/react-native-codegen/lib/parsers/parserMock.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/parsers-commons.js create mode 100644 packages/react-native-codegen/lib/parsers/parsers-commons.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/parsers-primitives.js create mode 100644 packages/react-native-codegen/lib/parsers/parsers-primitives.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/parsers-utils.js create mode 100644 packages/react-native-codegen/lib/parsers/parsers-utils.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/schema.js create mode 100644 packages/react-native-codegen/lib/parsers/schema.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/schema/index.d.ts create mode 100644 packages/react-native-codegen/lib/parsers/schema/index.js create mode 100644 packages/react-native-codegen/lib/parsers/schema/index.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/commands.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/commands.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/events.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/events.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/extends.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/extends.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/index.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/components/index.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/modules/index.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/modules/index.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/typescript/parser.d.ts create mode 100644 packages/react-native-codegen/lib/parsers/typescript/parser.js create mode 100644 packages/react-native-codegen/lib/parsers/typescript/parser.js.flow create mode 100644 packages/react-native-codegen/lib/parsers/utils.js create mode 100644 packages/react-native-codegen/lib/parsers/utils.js.flow diff --git a/packages/react-native-codegen/lib/CodegenSchema.d.ts b/packages/react-native-codegen/lib/CodegenSchema.d.ts new file mode 100644 index 000000000000..3482172d9900 --- /dev/null +++ b/packages/react-native-codegen/lib/CodegenSchema.d.ts @@ -0,0 +1,359 @@ +/** + * 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. + */ + +export type PlatformType = + | 'iOS' + | 'android'; + +export interface SchemaType { + readonly modules: { + [hasteModuleName: string]: ComponentSchema | NativeModuleSchema; + }; +} + +export interface DoubleTypeAnnotation { + readonly type: 'DoubleTypeAnnotation'; +} + +export interface FloatTypeAnnotation { + readonly type: 'FloatTypeAnnotation'; +} + +export interface BooleanTypeAnnotation { + readonly type: 'BooleanTypeAnnotation'; +} + +export interface Int32TypeAnnotation { + readonly type: 'Int32TypeAnnotation'; +} + +export interface StringTypeAnnotation { + readonly type: 'StringTypeAnnotation'; +} + +export interface StringEnumTypeAnnotation { + readonly type: 'StringEnumTypeAnnotation'; + readonly options: readonly string[]; +} + +export interface VoidTypeAnnotation { + readonly type: 'VoidTypeAnnotation'; +} + +export interface ObjectTypeAnnotation { + readonly type: 'ObjectTypeAnnotation'; + readonly properties: readonly NamedShape[]; + readonly baseTypes?: readonly string[] | undefined; +} + +export interface MixedTypeAnnotation { + readonly type: 'MixedTypeAnnotation'; +} + +export interface FunctionTypeAnnotation { + readonly type: 'FunctionTypeAnnotation'; + readonly params: readonly NamedShape

[]; + readonly returnTypeAnnotation: R; +} + +export interface NamedShape { + readonly name: string; + readonly optional: boolean; + readonly typeAnnotation: T; +} + +export interface ComponentSchema { + readonly type: 'Component'; + readonly components: { + [componentName: string]: ComponentShape; + }; +} + +export interface ComponentShape extends OptionsShape { + readonly extendsProps: readonly ExtendsPropsShape[]; + readonly events: readonly EventTypeShape[]; + readonly props: readonly NamedShape[]; + readonly commands: readonly NamedShape[]; + readonly deprecatedViewConfigName?: string | undefined; +} + +export interface OptionsShape { + readonly interfaceOnly?: boolean | undefined; + readonly paperComponentName?: string | undefined; + readonly excludedPlatforms?: readonly PlatformType[] | undefined; + readonly paperComponentNameDeprecated?: string | undefined; +} + +export interface ExtendsPropsShape { + readonly type: 'ReactNativeBuiltInType'; + readonly knownTypeName: 'ReactNativeCoreViewProps'; +} + +export interface EventTypeShape { + readonly name: string; + readonly bubblingType: + | 'direct' + | 'bubble'; + readonly optional: boolean; + readonly paperTopLevelNameDeprecated?: string | undefined; + readonly typeAnnotation: { + readonly type: 'EventTypeAnnotation'; + readonly argument?: ObjectTypeAnnotation | undefined; + }; +} + +export type EventTypeAnnotation = + | BooleanTypeAnnotation + | StringTypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | Int32TypeAnnotation + | StringEnumTypeAnnotation + | ObjectTypeAnnotation + | { + readonly type: 'ArrayTypeAnnotation'; + readonly elementType: EventTypeAnnotation + }; + +export type PropTypeAnnotation = + | { + readonly type: 'BooleanTypeAnnotation'; + readonly default: + | boolean + | null; + } + | { + readonly type: 'StringTypeAnnotation'; + readonly default: + | string + | null; + } + | { + readonly type: 'DoubleTypeAnnotation'; + readonly default: number; + } + | { + readonly type: 'FloatTypeAnnotation'; + readonly default: + | number + | null; + } + | { + readonly type: 'Int32TypeAnnotation'; + readonly default: number; + } + | { + readonly type: 'StringEnumTypeAnnotation'; + readonly default: string; + readonly options: readonly string[]; + } + | { + readonly type: 'Int32EnumTypeAnnotation'; + readonly default: number; + readonly options: readonly number[]; + } + | ReservedPropTypeAnnotation + | ObjectTypeAnnotation + | { + readonly type: 'ArrayTypeAnnotation'; + readonly elementType: + | BooleanTypeAnnotation + | StringTypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | Int32TypeAnnotation + | { + readonly type: 'StringEnumTypeAnnotation'; + readonly default: string; + readonly options: readonly string[]; + } + | ObjectTypeAnnotation + | ReservedPropTypeAnnotation + | { + readonly type: 'ArrayTypeAnnotation'; + readonly elementType: ObjectTypeAnnotation; + }; + } + | MixedTypeAnnotation; + +export interface ReservedPropTypeAnnotation { + readonly type: 'ReservedPropTypeAnnotation'; + readonly name: + | 'ColorPrimitive' + | 'ImageSourcePrimitive' + | 'PointPrimitive' + | 'EdgeInsetsPrimitive' + | 'ImageRequestPrimitive' + | 'DimensionPrimitive'; +} + +export type CommandTypeAnnotation = FunctionTypeAnnotation; + +export type CommandParamTypeAnnotation = + | ReservedTypeAnnotation + | BooleanTypeAnnotation + | Int32TypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | StringTypeAnnotation; + +export interface ReservedTypeAnnotation { + readonly type: 'ReservedTypeAnnotation'; + readonly name: 'RootTag'; +} + +export type Nullable = + | NullableTypeAnnotation + | T; + +export interface NullableTypeAnnotation { + readonly type: 'NullableTypeAnnotation'; + readonly typeAnnotation: T; +} + +export interface NativeModuleSchema { + readonly type: 'NativeModule'; + readonly aliasMap: NativeModuleAliasMap; + readonly enumMap: NativeModuleEnumMap; + readonly spec: NativeModuleSpec; + readonly moduleName: string; + readonly excludedPlatforms?: readonly PlatformType[] | undefined; +} + +export interface NativeModuleSpec { + readonly properties: readonly NativeModulePropertyShape[]; +} + +export type NativeModulePropertyShape = NamedShape>; + +export interface NativeModuleEnumMap { + readonly [enumName: string]: NativeModuleEnumDeclarationWithMembers; +} + +export interface NativeModuleAliasMap { + readonly [aliasName: string]: NativeModuleObjectTypeAnnotation; +} + +export type NativeModuleFunctionTypeAnnotation = FunctionTypeAnnotation, Nullable>; + +export type NativeModuleObjectTypeAnnotation = ObjectTypeAnnotation>; + +export interface NativeModuleArrayTypeAnnotation> { + readonly type: 'ArrayTypeAnnotation'; + readonly elementType?: T | undefined; +} + +export interface NativeModuleStringTypeAnnotation { + readonly type: 'StringTypeAnnotation'; +} + +export interface NativeModuleNumberTypeAnnotation { + readonly type: 'NumberTypeAnnotation'; +} + +export interface NativeModuleInt32TypeAnnotation { + readonly type: 'Int32TypeAnnotation'; +} + +export interface NativeModuleDoubleTypeAnnotation { + readonly type: 'DoubleTypeAnnotation'; +} + +export interface NativeModuleFloatTypeAnnotation { + readonly type: 'FloatTypeAnnotation'; +} + +export interface NativeModuleBooleanTypeAnnotation { + readonly type: 'BooleanTypeAnnotation'; +} + +export type NativeModuleEnumMembers = readonly { + readonly name: string; + readonly value: string | number; +}[]; + +export type NativeModuleEnumMemberType = + | 'NumberTypeAnnotation' + | 'StringTypeAnnotation'; + +export interface NativeModuleEnumDeclaration { + readonly name: string; + readonly type: 'EnumDeclaration'; + readonly memberType: NativeModuleEnumMemberType; +} + +export interface NativeModuleEnumDeclarationWithMembers { + name: string; + type: 'EnumDeclarationWithMembers'; + memberType: NativeModuleEnumMemberType; + members: NativeModuleEnumMembers; +} + +export interface NativeModuleGenericObjectTypeAnnotation { + readonly type: 'GenericObjectTypeAnnotation'; + readonly dictionaryValueType?: Nullable | undefined; +} + +export interface NativeModuleTypeAliasTypeAnnotation { + readonly type: 'TypeAliasTypeAnnotation'; + readonly name: string; +} + +export interface NativeModulePromiseTypeAnnotation { + readonly type: 'PromiseTypeAnnotation'; + readonly elementType?: Nullable | undefined; +} + +export type UnionTypeAnnotationMemberType = + | 'NumberTypeAnnotation' + | 'ObjectTypeAnnotation' + | 'StringTypeAnnotation'; + +export interface NativeModuleUnionTypeAnnotation { + readonly type: 'UnionTypeAnnotation'; + readonly memberType: UnionTypeAnnotationMemberType; +} + +export interface NativeModuleMixedTypeAnnotation { + readonly type: 'MixedTypeAnnotation'; +} + +export type NativeModuleBaseTypeAnnotation = + | NativeModuleStringTypeAnnotation + | NativeModuleNumberTypeAnnotation + | NativeModuleInt32TypeAnnotation + | NativeModuleDoubleTypeAnnotation + | NativeModuleFloatTypeAnnotation + | NativeModuleBooleanTypeAnnotation + | NativeModuleEnumDeclaration + | NativeModuleGenericObjectTypeAnnotation + | ReservedTypeAnnotation + | NativeModuleTypeAliasTypeAnnotation + | NativeModuleArrayTypeAnnotation> + | NativeModuleObjectTypeAnnotation + | NativeModuleUnionTypeAnnotation + | NativeModuleMixedTypeAnnotation; + +export type NativeModuleParamTypeAnnotation = + | NativeModuleBaseTypeAnnotation + | NativeModuleParamOnlyTypeAnnotation; + +export type NativeModuleReturnTypeAnnotation = + | NativeModuleBaseTypeAnnotation + | NativeModuleReturnOnlyTypeAnnotation; + +export type NativeModuleTypeAnnotation = + | NativeModuleBaseTypeAnnotation + | NativeModuleParamOnlyTypeAnnotation + | NativeModuleReturnOnlyTypeAnnotation; + +export type NativeModuleParamOnlyTypeAnnotation = NativeModuleFunctionTypeAnnotation; + +export type NativeModuleReturnOnlyTypeAnnotation = + | NativeModuleFunctionTypeAnnotation + | NativeModulePromiseTypeAnnotation + | VoidTypeAnnotation; diff --git a/packages/react-native-codegen/lib/CodegenSchema.js b/packages/react-native-codegen/lib/CodegenSchema.js new file mode 100644 index 000000000000..4949d716cda2 --- /dev/null +++ b/packages/react-native-codegen/lib/CodegenSchema.js @@ -0,0 +1,11 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; diff --git a/packages/react-native-codegen/lib/CodegenSchema.js.flow b/packages/react-native-codegen/lib/CodegenSchema.js.flow new file mode 100644 index 000000000000..1708e8939b4e --- /dev/null +++ b/packages/react-native-codegen/lib/CodegenSchema.js.flow @@ -0,0 +1,396 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +export type PlatformType = 'iOS' | 'android'; + +export type SchemaType = $ReadOnly<{ + modules: $ReadOnly<{ + [hasteModuleName: string]: ComponentSchema | NativeModuleSchema, + }>, +}>; + +/** + * Component Type Annotations + */ +export type DoubleTypeAnnotation = $ReadOnly<{ + type: 'DoubleTypeAnnotation', +}>; + +export type FloatTypeAnnotation = $ReadOnly<{ + type: 'FloatTypeAnnotation', +}>; + +export type BooleanTypeAnnotation = $ReadOnly<{ + type: 'BooleanTypeAnnotation', +}>; + +export type Int32TypeAnnotation = $ReadOnly<{ + type: 'Int32TypeAnnotation', +}>; + +export type StringTypeAnnotation = $ReadOnly<{ + type: 'StringTypeAnnotation', +}>; + +export type StringEnumTypeAnnotation = $ReadOnly<{ + type: 'StringEnumTypeAnnotation', + options: $ReadOnlyArray, +}>; + +export type VoidTypeAnnotation = $ReadOnly<{ + type: 'VoidTypeAnnotation', +}>; + +export type ObjectTypeAnnotation<+T> = $ReadOnly<{ + type: 'ObjectTypeAnnotation', + properties: $ReadOnlyArray>, + + // metadata for objects that generated from interfaces + baseTypes?: $ReadOnlyArray, +}>; + +export type MixedTypeAnnotation = $ReadOnly<{ + type: 'MixedTypeAnnotation', +}>; + +type FunctionTypeAnnotation<+P, +R> = $ReadOnly<{ + type: 'FunctionTypeAnnotation', + params: $ReadOnlyArray>, + returnTypeAnnotation: R, +}>; + +export type NamedShape<+T> = $ReadOnly<{ + name: string, + optional: boolean, + typeAnnotation: T, +}>; + +export type ComponentSchema = $ReadOnly<{ + type: 'Component', + components: $ReadOnly<{ + [componentName: string]: ComponentShape, + }>, +}>; + +export type ComponentShape = $ReadOnly<{ + ...OptionsShape, + extendsProps: $ReadOnlyArray, + events: $ReadOnlyArray, + props: $ReadOnlyArray>, + commands: $ReadOnlyArray>, +}>; + +export type OptionsShape = $ReadOnly<{ + interfaceOnly?: boolean, + + // Use for components with no current paper rename in progress + // Does not check for new name + paperComponentName?: string, + + // Use for components that are not used on other platforms. + excludedPlatforms?: $ReadOnlyArray, + + // Use for components currently being renamed in paper + // Will use new name if it is available and fallback to this name + paperComponentNameDeprecated?: string, +}>; + +export type ExtendsPropsShape = $ReadOnly<{ + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', +}>; + +export type EventTypeShape = $ReadOnly<{ + name: string, + bubblingType: 'direct' | 'bubble', + optional: boolean, + paperTopLevelNameDeprecated?: string, + typeAnnotation: $ReadOnly<{ + type: 'EventTypeAnnotation', + argument?: ObjectTypeAnnotation, + }>, +}>; + +export type EventTypeAnnotation = + | BooleanTypeAnnotation + | StringTypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | Int32TypeAnnotation + | MixedTypeAnnotation + | StringEnumTypeAnnotation + | ObjectTypeAnnotation + | $ReadOnly<{ + type: 'ArrayTypeAnnotation', + elementType: EventTypeAnnotation, + }>; + +export type ArrayTypeAnnotation = $ReadOnly<{ + type: 'ArrayTypeAnnotation', + elementType: + | BooleanTypeAnnotation + | StringTypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | Int32TypeAnnotation + | $ReadOnly<{ + type: 'StringEnumTypeAnnotation', + default: string, + options: $ReadOnlyArray, + }> + | ObjectTypeAnnotation + | ReservedPropTypeAnnotation + | $ReadOnly<{ + type: 'ArrayTypeAnnotation', + elementType: ObjectTypeAnnotation, + }>, +}>; + +export type PropTypeAnnotation = + | $ReadOnly<{ + type: 'BooleanTypeAnnotation', + default: boolean | null, + }> + | $ReadOnly<{ + type: 'StringTypeAnnotation', + default: string | null, + }> + | $ReadOnly<{ + type: 'DoubleTypeAnnotation', + default: number, + }> + | $ReadOnly<{ + type: 'FloatTypeAnnotation', + default: number | null, + }> + | $ReadOnly<{ + type: 'Int32TypeAnnotation', + default: number, + }> + | $ReadOnly<{ + type: 'StringEnumTypeAnnotation', + default: string, + options: $ReadOnlyArray, + }> + | $ReadOnly<{ + type: 'Int32EnumTypeAnnotation', + default: number, + options: $ReadOnlyArray, + }> + | ReservedPropTypeAnnotation + | ObjectTypeAnnotation + | ArrayTypeAnnotation + | MixedTypeAnnotation; + +export type ReservedPropTypeAnnotation = $ReadOnly<{ + type: 'ReservedPropTypeAnnotation', + name: + | 'ColorPrimitive' + | 'ImageSourcePrimitive' + | 'PointPrimitive' + | 'EdgeInsetsPrimitive' + | 'ImageRequestPrimitive' + | 'DimensionPrimitive', +}>; + +export type CommandTypeAnnotation = FunctionTypeAnnotation< + CommandParamTypeAnnotation, + VoidTypeAnnotation, +>; + +export type CommandParamTypeAnnotation = + | ReservedTypeAnnotation + | BooleanTypeAnnotation + | Int32TypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | StringTypeAnnotation; + +export type ReservedTypeAnnotation = $ReadOnly<{ + type: 'ReservedTypeAnnotation', + name: 'RootTag', // Union with more custom types. +}>; + +/** + * NativeModule Types + */ +export type Nullable<+T: NativeModuleTypeAnnotation> = + | NullableTypeAnnotation + | T; + +export type NullableTypeAnnotation<+T: NativeModuleTypeAnnotation> = $ReadOnly<{ + type: 'NullableTypeAnnotation', + typeAnnotation: T, +}>; + +export type NativeModuleSchema = $ReadOnly<{ + type: 'NativeModule', + aliasMap: NativeModuleAliasMap, + enumMap: NativeModuleEnumMap, + spec: NativeModuleSpec, + moduleName: string, + // Use for modules that are not used on other platforms. + // TODO: It's clearer to define `restrictedToPlatforms` instead, but + // `excludedPlatforms` is used here to be consistent with ComponentSchema. + excludedPlatforms?: $ReadOnlyArray, +}>; + +type NativeModuleSpec = $ReadOnly<{ + properties: $ReadOnlyArray, +}>; + +export type NativeModulePropertyShape = NamedShape< + Nullable, +>; + +export type NativeModuleEnumMap = $ReadOnly<{ + [enumName: string]: NativeModuleEnumDeclarationWithMembers, +}>; + +export type NativeModuleAliasMap = $ReadOnly<{ + [aliasName: string]: NativeModuleObjectTypeAnnotation, +}>; + +export type NativeModuleFunctionTypeAnnotation = FunctionTypeAnnotation< + Nullable, + Nullable, +>; + +export type NativeModuleObjectTypeAnnotation = ObjectTypeAnnotation< + Nullable, +>; + +export type NativeModuleArrayTypeAnnotation< + +T: Nullable, +> = $ReadOnly<{ + type: 'ArrayTypeAnnotation', + /** + * TODO(T72031674): Migrate all our NativeModule specs to not use + * invalid Array ElementTypes. Then, make the elementType required. + */ + elementType?: T, +}>; + +export type NativeModuleStringTypeAnnotation = $ReadOnly<{ + type: 'StringTypeAnnotation', +}>; + +export type NativeModuleNumberTypeAnnotation = $ReadOnly<{ + type: 'NumberTypeAnnotation', +}>; + +export type NativeModuleInt32TypeAnnotation = $ReadOnly<{ + type: 'Int32TypeAnnotation', +}>; + +export type NativeModuleDoubleTypeAnnotation = $ReadOnly<{ + type: 'DoubleTypeAnnotation', +}>; + +export type NativeModuleFloatTypeAnnotation = $ReadOnly<{ + type: 'FloatTypeAnnotation', +}>; + +export type NativeModuleBooleanTypeAnnotation = $ReadOnly<{ + type: 'BooleanTypeAnnotation', +}>; + +export type NativeModuleEnumMembers = $ReadOnlyArray< + $ReadOnly<{ + name: string, + value: string, + }>, +>; + +export type NativeModuleEnumMemberType = + | 'NumberTypeAnnotation' + | 'StringTypeAnnotation'; + +export type NativeModuleEnumDeclaration = $ReadOnly<{ + name: string, + type: 'EnumDeclaration', + memberType: NativeModuleEnumMemberType, +}>; + +export type NativeModuleEnumDeclarationWithMembers = { + name: string, + type: 'EnumDeclarationWithMembers', + memberType: NativeModuleEnumMemberType, + members: NativeModuleEnumMembers, +}; + +export type NativeModuleGenericObjectTypeAnnotation = $ReadOnly<{ + type: 'GenericObjectTypeAnnotation', + + // a dictionary type is codegen as "Object" + // but we know all its members are in the same type + // when it happens, the following field is non-null + dictionaryValueType?: Nullable, +}>; + +export type NativeModuleTypeAliasTypeAnnotation = $ReadOnly<{ + type: 'TypeAliasTypeAnnotation', + name: string, +}>; + +export type NativeModulePromiseTypeAnnotation = $ReadOnly<{ + type: 'PromiseTypeAnnotation', + elementType?: Nullable, +}>; + +export type UnionTypeAnnotationMemberType = + | 'NumberTypeAnnotation' + | 'ObjectTypeAnnotation' + | 'StringTypeAnnotation'; + +export type NativeModuleUnionTypeAnnotation = $ReadOnly<{ + type: 'UnionTypeAnnotation', + memberType: UnionTypeAnnotationMemberType, +}>; + +export type NativeModuleMixedTypeAnnotation = $ReadOnly<{ + type: 'MixedTypeAnnotation', +}>; + +export type NativeModuleBaseTypeAnnotation = + | NativeModuleStringTypeAnnotation + | NativeModuleNumberTypeAnnotation + | NativeModuleInt32TypeAnnotation + | NativeModuleDoubleTypeAnnotation + | NativeModuleFloatTypeAnnotation + | NativeModuleBooleanTypeAnnotation + | NativeModuleEnumDeclaration + | NativeModuleGenericObjectTypeAnnotation + | ReservedTypeAnnotation + | NativeModuleTypeAliasTypeAnnotation + | NativeModuleArrayTypeAnnotation> + | NativeModuleObjectTypeAnnotation + | NativeModuleUnionTypeAnnotation + | NativeModuleMixedTypeAnnotation; + +export type NativeModuleParamTypeAnnotation = + | NativeModuleBaseTypeAnnotation + | NativeModuleParamOnlyTypeAnnotation; + +export type NativeModuleReturnTypeAnnotation = + | NativeModuleBaseTypeAnnotation + | NativeModuleReturnOnlyTypeAnnotation; + +export type NativeModuleTypeAnnotation = + | NativeModuleBaseTypeAnnotation + | NativeModuleParamOnlyTypeAnnotation + | NativeModuleReturnOnlyTypeAnnotation; + +type NativeModuleParamOnlyTypeAnnotation = NativeModuleFunctionTypeAnnotation; +type NativeModuleReturnOnlyTypeAnnotation = + | NativeModulePromiseTypeAnnotation + | VoidTypeAnnotation; diff --git a/packages/react-native-codegen/lib/SchemaValidator.d.ts b/packages/react-native-codegen/lib/SchemaValidator.d.ts new file mode 100644 index 000000000000..7fb8125fa8fe --- /dev/null +++ b/packages/react-native-codegen/lib/SchemaValidator.d.ts @@ -0,0 +1,11 @@ +/** + * 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. + */ + +import type { SchemaType } from './CodegenSchema'; + +export declare function getErrors(schema: SchemaType): readonly string[]; +export declare function validate(schema: SchemaType): void; diff --git a/packages/react-native-codegen/lib/SchemaValidator.js b/packages/react-native-codegen/lib/SchemaValidator.js new file mode 100644 index 000000000000..0a6367798555 --- /dev/null +++ b/packages/react-native-codegen/lib/SchemaValidator.js @@ -0,0 +1,54 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const nullthrows = require('nullthrows'); +function getErrors(schema) { + const errors = new Set(); + + // Map of component name -> Array of module names + const componentModules = new Map(); + Object.keys(schema.modules).forEach(moduleName => { + const module = schema.modules[moduleName]; + if (module.components == null) { + return; + } + Object.keys(module.components).forEach(componentName => { + if (module.components == null) { + return; + } + if (!componentModules.has(componentName)) { + componentModules.set(componentName, []); + } + nullthrows(componentModules.get(componentName)).push(moduleName); + }); + }); + componentModules.forEach((modules, componentName) => { + if (modules.length > 1) { + errors.add( + `Duplicate components found with name ${componentName}. Found in modules ${modules.join( + ', ', + )}`, + ); + } + }); + return Array.from(errors).sort(); +} +function validate(schema) { + const errors = getErrors(schema); + if (errors.length !== 0) { + throw new Error('Errors found validating schema:\n' + errors.join('\n')); + } +} +module.exports = { + getErrors, + validate, +}; diff --git a/packages/react-native-codegen/lib/SchemaValidator.js.flow b/packages/react-native-codegen/lib/SchemaValidator.js.flow new file mode 100644 index 000000000000..87ded8848457 --- /dev/null +++ b/packages/react-native-codegen/lib/SchemaValidator.js.flow @@ -0,0 +1,67 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +const nullthrows = require('nullthrows'); + +import type {SchemaType} from './CodegenSchema'; + +function getErrors(schema: SchemaType): $ReadOnlyArray { + const errors = new Set(); + + // Map of component name -> Array of module names + const componentModules: Map> = new Map(); + + Object.keys(schema.modules).forEach(moduleName => { + const module = schema.modules[moduleName]; + + if (module.components == null) { + return; + } + + Object.keys(module.components).forEach(componentName => { + if (module.components == null) { + return; + } + + if (!componentModules.has(componentName)) { + componentModules.set(componentName, []); + } + + nullthrows(componentModules.get(componentName)).push(moduleName); + }); + }); + + componentModules.forEach((modules, componentName) => { + if (modules.length > 1) { + errors.add( + `Duplicate components found with name ${componentName}. Found in modules ${modules.join( + ', ', + )}`, + ); + } + }); + + return Array.from(errors).sort(); +} + +function validate(schema: SchemaType) { + const errors = getErrors(schema); + + if (errors.length !== 0) { + throw new Error('Errors found validating schema:\n' + errors.join('\n')); + } +} + +module.exports = { + getErrors, + validate, +}; diff --git a/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js b/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js new file mode 100644 index 000000000000..be0163995bc4 --- /dev/null +++ b/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js @@ -0,0 +1,56 @@ +/** + * 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. + * + * + * @format + * @oncall react_native + */ + +'use strict'; + +const combine = require('./combine-js-to-schema'); +const fs = require('fs'); +const glob = require('glob'); +const path = require('path'); +const _require = require('./combine-utils'), + parseArgs = _require.parseArgs, + filterJSFile = _require.filterJSFile; +const _parseArgs = parseArgs(process.argv), + platform = _parseArgs.platform, + outfile = _parseArgs.outfile, + fileList = _parseArgs.fileList; +const allFiles = []; +fileList.forEach(file => { + if (fs.lstatSync(file).isDirectory()) { + const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file; + const dirFiles = glob + .sync(`${filePattern}/**/*.{js,ts,tsx}`, { + nodir: true, + // TODO: This will remove the need of slash substitution above for Windows, + // but it requires glob@v9+; with the package currenlty relying on + // glob@7.1.1; and flow-typed repo not having definitions for glob@9+. + // windowsPathsNoEscape: true, + }) + .filter(element => filterJSFile(element, platform)); + allFiles.push(...dirFiles); + } else if (filterJSFile(file)) { + allFiles.push(file); + } +}); +const combined = combine(allFiles); + +// Warn users if there is no modules to process +if (Object.keys(combined.modules).length === 0) { + console.error( + 'No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.', + ); +} +const formattedSchema = JSON.stringify(combined, null, 2); +if (outfile != null) { + fs.writeFileSync(outfile, formattedSchema); +} else { + console.log(formattedSchema); +} diff --git a/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js.flow b/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js.flow new file mode 100644 index 000000000000..6aeff3418a2a --- /dev/null +++ b/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js.flow @@ -0,0 +1,55 @@ +/** + * 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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +'use strict'; + +const combine = require('./combine-js-to-schema'); +const fs = require('fs'); +const glob = require('glob'); +const path = require('path'); +const {parseArgs, filterJSFile} = require('./combine-utils'); + +const {platform, outfile, fileList} = parseArgs(process.argv); + +const allFiles = []; +fileList.forEach(file => { + if (fs.lstatSync(file).isDirectory()) { + const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file; + const dirFiles = glob + .sync(`${filePattern}/**/*.{js,ts,tsx}`, { + nodir: true, + // TODO: This will remove the need of slash substitution above for Windows, + // but it requires glob@v9+; with the package currenlty relying on + // glob@7.1.1; and flow-typed repo not having definitions for glob@9+. + // windowsPathsNoEscape: true, + }) + .filter(element => filterJSFile(element, platform)); + allFiles.push(...dirFiles); + } else if (filterJSFile(file)) { + allFiles.push(file); + } +}); + +const combined = combine(allFiles); + +// Warn users if there is no modules to process +if (Object.keys(combined.modules).length === 0) { + console.error( + 'No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.', + ); +} +const formattedSchema = JSON.stringify(combined, null, 2); + +if (outfile != null) { + fs.writeFileSync(outfile, formattedSchema); +} else { + console.log(formattedSchema); +} diff --git a/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema.js b/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema.js new file mode 100644 index 000000000000..eec7ed94dd2e --- /dev/null +++ b/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema.js @@ -0,0 +1,103 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && + (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), + t.push.apply(t, o); + } + return t; +} +function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 + ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) + : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; +} +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +const _require = require('../../parsers/flow/parser'), + FlowParser = _require.FlowParser; +const _require2 = require('../../parsers/typescript/parser'), + TypeScriptParser = _require2.TypeScriptParser; +const fs = require('fs'); +const path = require('path'); +const flowParser = new FlowParser(); +const typescriptParser = new TypeScriptParser(); +function combineSchemas(files) { + return files.reduce( + (merged, filename) => { + const contents = fs.readFileSync(filename, 'utf8'); + if ( + contents && + (/export\s+default\s+\(?codegenNativeComponent): SchemaType { + return files.reduce( + (merged, filename) => { + const contents = fs.readFileSync(filename, 'utf8'); + + if ( + contents && + (/export\s+default\s+\(?codegenNativeComponent arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArray(iter) { + if ( + (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null) || + iter['@@iterator'] != null + ) + return Array.from(iter); +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const path = require('path'); +function parseArgs(args) { + if (args.length > 2 && ['-p', '--platform'].indexOf(args[2]) >= 0) { + const _args$slice = args.slice(4), + _args$slice2 = _toArray(_args$slice), + outfile = _args$slice2[0], + fileList = _args$slice2.slice(1); + return { + platform: args[3], + outfile, + fileList, + }; + } + const _args$slice3 = args.slice(2), + _args$slice4 = _toArray(_args$slice3), + outfile = _args$slice4[0], + fileList = _args$slice4.slice(1); + return { + platform: null, + outfile, + fileList, + }; +} + +/** + * This function is used by the CLI to decide whether a JS/TS file has to be processed or not by the Codegen. + * Parameters: + * - file: the path to the file + * - currentPlatform: the current platform for which we are creating the specs + * Returns: `true` if the file can be used to generate some code; `false` otherwise + * + */ +function filterJSFile(file, currentPlatform) { + const isSpecFile = /^(Native.+|.+NativeComponent)/.test(path.basename(file)); + const isNotNativeUIManager = !file.endsWith('NativeUIManager.js'); + const isNotNativeSampleTurboModule = !file.endsWith( + 'NativeSampleTurboModule.js', + ); + const isNotTest = !file.includes('__tests'); + const isNotTSTypeDefinition = !file.endsWith('.d.ts'); + const isValidCandidate = + isSpecFile && + isNotNativeUIManager && + isNotNativeSampleTurboModule && + isNotTest && + isNotTSTypeDefinition; + const filenameComponents = path.basename(file).split('.'); + const isPlatformAgnostic = filenameComponents.length === 2; + if (currentPlatform == null) { + // need to accept only files that are platform agnostic + return isValidCandidate && isPlatformAgnostic; + } + + // If a platform is passed, accept both platform agnostic specs... + if (isPlatformAgnostic) { + return isValidCandidate; + } + + // ...and specs that share the same platform as the one passed. + // specfiles must follow the pattern: [.].(js|ts|tsx) + const filePlatform = + filenameComponents.length > 2 ? filenameComponents[1] : 'unknown'; + return isValidCandidate && currentPlatform === filePlatform; +} +module.exports = { + parseArgs, + filterJSFile, +}; diff --git a/packages/react-native-codegen/lib/cli/combine/combine-utils.js.flow b/packages/react-native-codegen/lib/cli/combine/combine-utils.js.flow new file mode 100644 index 000000000000..5dad6e041b6b --- /dev/null +++ b/packages/react-native-codegen/lib/cli/combine/combine-utils.js.flow @@ -0,0 +1,85 @@ +/** + * 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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +'use strict'; + +const path = require('path'); + +function parseArgs(args: string[]): { + platform: ?string, + outfile: string, + fileList: string[], +} { + if (args.length > 2 && ['-p', '--platform'].indexOf(args[2]) >= 0) { + const [outfile, ...fileList] = args.slice(4); + return { + platform: args[3], + outfile, + fileList, + }; + } + + const [outfile, ...fileList] = args.slice(2); + return { + platform: null, + outfile, + fileList, + }; +} + +/** + * This function is used by the CLI to decide whether a JS/TS file has to be processed or not by the Codegen. + * Parameters: + * - file: the path to the file + * - currentPlatform: the current platform for which we are creating the specs + * Returns: `true` if the file can be used to generate some code; `false` otherwise + * + */ +function filterJSFile(file: string, currentPlatform: ?string): boolean { + const isSpecFile = /^(Native.+|.+NativeComponent)/.test(path.basename(file)); + const isNotNativeUIManager = !file.endsWith('NativeUIManager.js'); + const isNotNativeSampleTurboModule = !file.endsWith( + 'NativeSampleTurboModule.js', + ); + const isNotTest = !file.includes('__tests'); + const isNotTSTypeDefinition = !file.endsWith('.d.ts'); + + const isValidCandidate = + isSpecFile && + isNotNativeUIManager && + isNotNativeSampleTurboModule && + isNotTest && + isNotTSTypeDefinition; + + const filenameComponents = path.basename(file).split('.'); + const isPlatformAgnostic = filenameComponents.length === 2; + + if (currentPlatform == null) { + // need to accept only files that are platform agnostic + return isValidCandidate && isPlatformAgnostic; + } + + // If a platform is passed, accept both platform agnostic specs... + if (isPlatformAgnostic) { + return isValidCandidate; + } + + // ...and specs that share the same platform as the one passed. + // specfiles must follow the pattern: [.].(js|ts|tsx) + const filePlatform = + filenameComponents.length > 2 ? filenameComponents[1] : 'unknown'; + return isValidCandidate && currentPlatform === filePlatform; +} + +module.exports = { + parseArgs, + filterJSFile, +}; diff --git a/packages/react-native-codegen/lib/cli/generators/generate-all.js b/packages/react-native-codegen/lib/cli/generators/generate-all.js new file mode 100644 index 000000000000..5cee549d4b24 --- /dev/null +++ b/packages/react-native-codegen/lib/cli/generators/generate-all.js @@ -0,0 +1,65 @@ +/** + * 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. + * + * + * @format + */ + +/** + * This generates all possible outputs by executing all available generators. + */ + +'use strict'; + +const RNCodegen = require('../../generators/RNCodegen.js'); +const fs = require('fs'); +const mkdirp = require('mkdirp'); +const args = process.argv.slice(2); +if (args.length < 3) { + throw new Error( + `Expected to receive path to schema, library name, output directory and module spec name. Received ${args.join( + ', ', + )}`, + ); +} +const schemaPath = args[0]; +const libraryName = args[1]; +const outputDirectory = args[2]; +const packageName = args[3]; +const assumeNonnull = args[4] === 'true' || args[4] === 'True'; +const schemaText = fs.readFileSync(schemaPath, 'utf-8'); +if (schemaText == null) { + throw new Error(`Can't find schema at ${schemaPath}`); +} +mkdirp.sync(outputDirectory); +let schema; +try { + schema = JSON.parse(schemaText); +} catch (err) { + throw new Error(`Can't parse schema to JSON. ${schemaPath}`); +} +RNCodegen.generate( + { + libraryName, + schema, + outputDirectory, + packageName, + assumeNonnull, + }, + { + generators: [ + 'descriptors', + 'events', + 'props', + 'states', + 'tests', + 'shadow-nodes', + 'modulesAndroid', + 'modulesCxx', + 'modulesIOS', + ], + }, +); diff --git a/packages/react-native-codegen/lib/cli/generators/generate-all.js.flow b/packages/react-native-codegen/lib/cli/generators/generate-all.js.flow new file mode 100644 index 000000000000..46d207510208 --- /dev/null +++ b/packages/react-native-codegen/lib/cli/generators/generate-all.js.flow @@ -0,0 +1,66 @@ +/** + * 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. + * + * @flow + * @format + */ + +/** + * This generates all possible outputs by executing all available generators. + */ + +'use strict'; + +const RNCodegen = require('../../generators/RNCodegen.js'); +const fs = require('fs'); +const mkdirp = require('mkdirp'); + +const args = process.argv.slice(2); +if (args.length < 3) { + throw new Error( + `Expected to receive path to schema, library name, output directory and module spec name. Received ${args.join( + ', ', + )}`, + ); +} + +const schemaPath = args[0]; +const libraryName = args[1]; +const outputDirectory = args[2]; +const packageName = args[3]; +const assumeNonnull = args[4] === 'true' || args[4] === 'True'; + +const schemaText = fs.readFileSync(schemaPath, 'utf-8'); + +if (schemaText == null) { + throw new Error(`Can't find schema at ${schemaPath}`); +} + +mkdirp.sync(outputDirectory); + +let schema; +try { + schema = JSON.parse(schemaText); +} catch (err) { + throw new Error(`Can't parse schema to JSON. ${schemaPath}`); +} + +RNCodegen.generate( + {libraryName, schema, outputDirectory, packageName, assumeNonnull}, + { + generators: [ + 'descriptors', + 'events', + 'props', + 'states', + 'tests', + 'shadow-nodes', + 'modulesAndroid', + 'modulesCxx', + 'modulesIOS', + ], + }, +); diff --git a/packages/react-native-codegen/lib/cli/parser/parser-cli.js b/packages/react-native-codegen/lib/cli/parser/parser-cli.js new file mode 100644 index 000000000000..20c073d435c9 --- /dev/null +++ b/packages/react-native-codegen/lib/cli/parser/parser-cli.js @@ -0,0 +1,55 @@ +/** + * 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. + * + * + * @format + * @oncall react_native + */ + +'use strict'; + +function _toArray(arr) { + return ( + _arrayWithHoles(arr) || + _iterableToArray(arr) || + _unsupportedIterableToArray(arr) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArray(iter) { + if ( + (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null) || + iter['@@iterator'] != null + ) + return Array.from(iter); +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const parseFiles = require('./parser.js'); +const _process$argv$slice = process.argv.slice(2), + _process$argv$slice2 = _toArray(_process$argv$slice), + fileList = _process$argv$slice2.slice(0); +parseFiles(fileList); diff --git a/packages/react-native-codegen/lib/cli/parser/parser-cli.js.flow b/packages/react-native-codegen/lib/cli/parser/parser-cli.js.flow new file mode 100644 index 000000000000..084b11c7adec --- /dev/null +++ b/packages/react-native-codegen/lib/cli/parser/parser-cli.js.flow @@ -0,0 +1,18 @@ +/** + * 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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +'use strict'; + +const parseFiles = require('./parser.js'); + +const [...fileList] = process.argv.slice(2); + +parseFiles(fileList); diff --git a/packages/react-native-codegen/lib/cli/parser/parser.js b/packages/react-native-codegen/lib/cli/parser/parser.js new file mode 100644 index 000000000000..52e6c84bca03 --- /dev/null +++ b/packages/react-native-codegen/lib/cli/parser/parser.js @@ -0,0 +1,28 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const path = require('path'); +const _require = require('../../parsers/flow/parser'), + FlowParser = _require.FlowParser; +const _require2 = require('../../parsers/typescript/parser'), + TypeScriptParser = _require2.TypeScriptParser; +const flowParser = new FlowParser(); +const typescriptParser = new TypeScriptParser(); +function parseFiles(files) { + files.forEach(filename => { + const isTypeScript = + path.extname(filename) === '.ts' || path.extname(filename) === '.tsx'; + const parser = isTypeScript ? typescriptParser : flowParser; + console.log(filename, JSON.stringify(parser.parseFile(filename), null, 2)); + }); +} +module.exports = parseFiles; diff --git a/packages/react-native-codegen/lib/cli/parser/parser.js.flow b/packages/react-native-codegen/lib/cli/parser/parser.js.flow new file mode 100644 index 000000000000..40a599c9ff9c --- /dev/null +++ b/packages/react-native-codegen/lib/cli/parser/parser.js.flow @@ -0,0 +1,31 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +const path = require('path'); +const {FlowParser} = require('../../parsers/flow/parser'); +const {TypeScriptParser} = require('../../parsers/typescript/parser'); + +const flowParser = new FlowParser(); +const typescriptParser = new TypeScriptParser(); + +function parseFiles(files: Array) { + files.forEach(filename => { + const isTypeScript = + path.extname(filename) === '.ts' || path.extname(filename) === '.tsx'; + + const parser = isTypeScript ? typescriptParser : flowParser; + + console.log(filename, JSON.stringify(parser.parseFile(filename), null, 2)); + }); +} + +module.exports = parseFiles; diff --git a/packages/react-native-codegen/lib/cli/parser/parser.sh b/packages/react-native-codegen/lib/cli/parser/parser.sh new file mode 100644 index 000000000000..8d130f250017 --- /dev/null +++ b/packages/react-native-codegen/lib/cli/parser/parser.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# 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. + +set -e +set -u + +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) + +# shellcheck source=xplat/js/env-utils/setup_env_vars.sh +source "$THIS_DIR/../../../../../../env-utils/setup_env_vars.sh" + +exec "$FLOW_NODE_BINARY" "$THIS_DIR/parser.js" "$@" diff --git a/packages/react-native-codegen/lib/generators/RNCodegen.d.ts b/packages/react-native-codegen/lib/generators/RNCodegen.d.ts new file mode 100644 index 000000000000..9cf647abfcce --- /dev/null +++ b/packages/react-native-codegen/lib/generators/RNCodegen.d.ts @@ -0,0 +1,98 @@ +/** + * 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. + */ + +import type { SchemaType } from '../CodegenSchema'; + +export type FilesOutput = Map; +export type LibraryGeneratorFunction = (libraryName: string, schema: SchemaType, packageName: string | undefined, assumeNonnull: boolean) => FilesOutput; +export type SchemaGeneratorFunction = (schemas: { [key: string]: SchemaType }) => FilesOutput; +export type ViewGeneratorFunction = (libraryName: string, schema: SchemaType) => FilesOutput; + +type LibraryGeneratorNames = + | 'generateComponentDescriptorH' + | 'generateComponentHObjCpp' + | 'generateEventEmitterCpp' + | 'generateEventEmitterH' + | 'generatePropsCpp' + | 'generatePropsH' + | 'generateStateCpp' + | 'generateStateH' + | 'generateModuleH' + | 'generateModuleCpp' + | 'generateModuleObjCpp' + | 'generateModuleJavaSpec' + | 'generateModuleJniCpp' + | 'generateModuleJniH' + | 'generatePropsJavaInterface' + | 'generatePropsJavaDelegate' + | 'generateTests' + | 'generateShadowNodeCpp' + | 'generateShadowNodeH' + ; + +type SchemaGeneratorNames = + | 'generateThirdPartyFabricComponentsProviderObjCpp' + | 'generateThirdPartyFabricComponentsProviderH' + ; + +type ViewGeneratorNames = + | 'generateViewConfigJs' + ; + +export type AllGenerators = + & { readonly [key in LibraryGeneratorNames]: LibraryGeneratorFunction; } + & { readonly [key in SchemaGeneratorNames]: SchemaGeneratorFunction; } + & { readonly [key in ViewGeneratorNames]: ViewGeneratorFunction; } + ; + +export type LibraryGenerators = + | 'componentsAndroid' + | 'componentsIOS' + | 'descriptors' + | 'events' + | 'props' + | 'states' + | 'tests' + | 'shadow-nodes' + | 'modulesAndroid' + | 'modulesCxx' + | 'modulesIOS' + ; + +export type SchemaGenerators = + | 'providerIOS' + ; + +export interface LibraryOptions { + libraryName: string; + schema: SchemaType; + outputDirectory: string; + packageName?: string | undefined; + assumeNonnull: boolean; +} + +export interface LibraryConfig { + generators: LibraryGenerators[]; + test?: boolean | undefined; +} + +export interface SchemasOptions { + schemas: { [key: string]: SchemaType }; + outputDirectory: string; +} + +export interface SchemasConfig { + generators: SchemaGenerators[]; + test?: boolean | undefined; +} + +export declare const allGenerators: AllGenerators; +export declare const libraryGenerators: { readonly [key in LibraryGenerators]: LibraryGeneratorFunction }; +export declare const schemaGenerators: { readonly [key in SchemaGenerators]: SchemaGeneratorFunction }; +export declare function generate(options: LibraryOptions, config: LibraryConfig): boolean; +export declare function generateFromSchemas(options: SchemasOptions, config: SchemasConfig): boolean; +export declare function generateViewConfig(options: LibraryOptions): string; diff --git a/packages/react-native-codegen/lib/generators/RNCodegen.js b/packages/react-native-codegen/lib/generators/RNCodegen.js new file mode 100644 index 000000000000..5d8233290fc9 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/RNCodegen.js @@ -0,0 +1,236 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +/* +TODO: + +- ViewConfigs should spread in View's valid attributes +*/ +const fs = require('fs'); +const generateComponentDescriptorH = require('./components/GenerateComponentDescriptorH.js'); +const generateComponentHObjCpp = require('./components/GenerateComponentHObjCpp.js'); +const generateEventEmitterCpp = require('./components/GenerateEventEmitterCpp.js'); +const generateEventEmitterH = require('./components/GenerateEventEmitterH.js'); +const generatePropsCpp = require('./components/GeneratePropsCpp.js'); +const generatePropsH = require('./components/GeneratePropsH.js'); +const generateStateCpp = require('./components/GenerateStateCpp.js'); +const generateStateH = require('./components/GenerateStateH.js'); +const generateModuleH = require('./modules/GenerateModuleH.js'); +const generateModuleCpp = require('./modules/GenerateModuleCpp.js'); +const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp'); +const generateModuleJavaSpec = require('./modules/GenerateModuleJavaSpec.js'); +const generateModuleJniCpp = require('./modules/GenerateModuleJniCpp.js'); +const generateModuleJniH = require('./modules/GenerateModuleJniH.js'); +const generatePropsJavaInterface = require('./components/GeneratePropsJavaInterface.js'); +const generatePropsJavaDelegate = require('./components/GeneratePropsJavaDelegate.js'); +const generateTests = require('./components/GenerateTests.js'); +const generateShadowNodeCpp = require('./components/GenerateShadowNodeCpp.js'); +const generateShadowNodeH = require('./components/GenerateShadowNodeH.js'); +const generateThirdPartyFabricComponentsProviderObjCpp = require('./components/GenerateThirdPartyFabricComponentsProviderObjCpp.js'); +const generateThirdPartyFabricComponentsProviderH = require('./components/GenerateThirdPartyFabricComponentsProviderH.js'); +const generateViewConfigJs = require('./components/GenerateViewConfigJs.js'); +const path = require('path'); +const schemaValidator = require('../SchemaValidator.js'); +const ALL_GENERATORS = { + generateComponentDescriptorH: generateComponentDescriptorH.generate, + generateComponentHObjCpp: generateComponentHObjCpp.generate, + generateEventEmitterCpp: generateEventEmitterCpp.generate, + generateEventEmitterH: generateEventEmitterH.generate, + generatePropsCpp: generatePropsCpp.generate, + generatePropsH: generatePropsH.generate, + generateStateCpp: generateStateCpp.generate, + generateStateH: generateStateH.generate, + generateModuleH: generateModuleH.generate, + generateModuleCpp: generateModuleCpp.generate, + generateModuleObjCpp: generateModuleObjCpp.generate, + generateModuleJavaSpec: generateModuleJavaSpec.generate, + generateModuleJniCpp: generateModuleJniCpp.generate, + generateModuleJniH: generateModuleJniH.generate, + generatePropsJavaInterface: generatePropsJavaInterface.generate, + generatePropsJavaDelegate: generatePropsJavaDelegate.generate, + generateTests: generateTests.generate, + generateShadowNodeCpp: generateShadowNodeCpp.generate, + generateShadowNodeH: generateShadowNodeH.generate, + generateThirdPartyFabricComponentsProviderObjCpp: + generateThirdPartyFabricComponentsProviderObjCpp.generate, + generateThirdPartyFabricComponentsProviderH: + generateThirdPartyFabricComponentsProviderH.generate, + generateViewConfigJs: generateViewConfigJs.generate, +}; +const LIBRARY_GENERATORS = { + descriptors: [generateComponentDescriptorH.generate], + events: [generateEventEmitterCpp.generate, generateEventEmitterH.generate], + states: [generateStateCpp.generate, generateStateH.generate], + props: [ + generateComponentHObjCpp.generate, + generatePropsCpp.generate, + generatePropsH.generate, + generatePropsJavaInterface.generate, + generatePropsJavaDelegate.generate, + ], + // TODO: Refactor this to consolidate various C++ output variation instead of forking per platform. + componentsAndroid: [ + // JNI/C++ files + generateComponentDescriptorH.generate, + generateEventEmitterCpp.generate, + generateEventEmitterH.generate, + generatePropsCpp.generate, + generatePropsH.generate, + generateStateCpp.generate, + generateStateH.generate, + generateShadowNodeCpp.generate, + generateShadowNodeH.generate, + // Java files + generatePropsJavaInterface.generate, + generatePropsJavaDelegate.generate, + ], + componentsIOS: [ + generateComponentDescriptorH.generate, + generateEventEmitterCpp.generate, + generateEventEmitterH.generate, + generateComponentHObjCpp.generate, + generatePropsCpp.generate, + generatePropsH.generate, + generateStateCpp.generate, + generateStateH.generate, + generateShadowNodeCpp.generate, + generateShadowNodeH.generate, + ], + modulesAndroid: [ + generateModuleJniCpp.generate, + generateModuleJniH.generate, + generateModuleJavaSpec.generate, + ], + modulesCxx: [generateModuleCpp.generate, generateModuleH.generate], + modulesIOS: [generateModuleObjCpp.generate], + tests: [generateTests.generate], + 'shadow-nodes': [ + generateShadowNodeCpp.generate, + generateShadowNodeH.generate, + ], +}; +const SCHEMAS_GENERATORS = { + providerIOS: [ + generateThirdPartyFabricComponentsProviderObjCpp.generate, + generateThirdPartyFabricComponentsProviderH.generate, + ], +}; +function writeMapToFiles(map) { + let success = true; + map.forEach(file => { + try { + const location = path.join(file.outputDir, file.name); + const dirName = path.dirname(location); + if (!fs.existsSync(dirName)) { + fs.mkdirSync(dirName, { + recursive: true, + }); + } + fs.writeFileSync(location, file.content); + } catch (error) { + success = false; + console.error(`Failed to write ${file.name} to ${file.outputDir}`, error); + } + }); + return success; +} +function checkFilesForChanges(generated) { + let hasChanged = false; + generated.forEach(file => { + const location = path.join(file.outputDir, file.name); + const currentContents = fs.readFileSync(location, 'utf8'); + if (currentContents !== file.content) { + console.error(`- ${file.name} has changed`); + hasChanged = true; + } + }); + return !hasChanged; +} +function checkOrWriteFiles(generatedFiles, test) { + if (test === true) { + return checkFilesForChanges(generatedFiles); + } + return writeMapToFiles(generatedFiles); +} +module.exports = { + allGenerators: ALL_GENERATORS, + libraryGenerators: LIBRARY_GENERATORS, + schemaGenerators: SCHEMAS_GENERATORS, + generate( + {libraryName, schema, outputDirectory, packageName, assumeNonnull}, + {generators, test}, + ) { + schemaValidator.validate(schema); + function composePath(intermediate) { + return path.join(outputDirectory, intermediate, libraryName); + } + const componentIOSOutput = composePath('react/renderer/components/'); + const modulesIOSOutput = composePath('./'); + const outputFoldersForGenerators = { + componentsIOS: componentIOSOutput, + modulesIOS: modulesIOSOutput, + descriptors: outputDirectory, + events: outputDirectory, + props: outputDirectory, + states: outputDirectory, + componentsAndroid: outputDirectory, + modulesAndroid: outputDirectory, + modulesCxx: outputDirectory, + tests: outputDirectory, + 'shadow-nodes': outputDirectory, + }; + const generatedFiles = []; + for (const name of generators) { + for (const generator of LIBRARY_GENERATORS[name]) { + generator(libraryName, schema, packageName, assumeNonnull).forEach( + (contents, fileName) => { + generatedFiles.push({ + name: fileName, + content: contents, + outputDir: outputFoldersForGenerators[name], + }); + }, + ); + } + } + return checkOrWriteFiles(generatedFiles, test); + }, + generateFromSchemas({schemas, outputDirectory}, {generators, test}) { + Object.keys(schemas).forEach(libraryName => + schemaValidator.validate(schemas[libraryName]), + ); + const generatedFiles = []; + for (const name of generators) { + for (const generator of SCHEMAS_GENERATORS[name]) { + generator(schemas).forEach((contents, fileName) => { + generatedFiles.push({ + name: fileName, + content: contents, + outputDir: outputDirectory, + }); + }); + } + } + return checkOrWriteFiles(generatedFiles, test); + }, + generateViewConfig({libraryName, schema}) { + schemaValidator.validate(schema); + const result = generateViewConfigJs + .generate(libraryName, schema) + .values() + .next(); + if (typeof result.value !== 'string') { + throw new Error(`Failed to generate view config for ${libraryName}`); + } + return result.value; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/RNCodegen.js.flow b/packages/react-native-codegen/lib/generators/RNCodegen.js.flow new file mode 100644 index 000000000000..61441c715dc2 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/RNCodegen.js.flow @@ -0,0 +1,315 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +/* +TODO: + +- ViewConfigs should spread in View's valid attributes +*/ + +const fs = require('fs'); +const generateComponentDescriptorH = require('./components/GenerateComponentDescriptorH.js'); +const generateComponentHObjCpp = require('./components/GenerateComponentHObjCpp.js'); +const generateEventEmitterCpp = require('./components/GenerateEventEmitterCpp.js'); +const generateEventEmitterH = require('./components/GenerateEventEmitterH.js'); +const generatePropsCpp = require('./components/GeneratePropsCpp.js'); +const generatePropsH = require('./components/GeneratePropsH.js'); +const generateStateCpp = require('./components/GenerateStateCpp.js'); +const generateStateH = require('./components/GenerateStateH.js'); +const generateModuleH = require('./modules/GenerateModuleH.js'); +const generateModuleCpp = require('./modules/GenerateModuleCpp.js'); +const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp'); +const generateModuleJavaSpec = require('./modules/GenerateModuleJavaSpec.js'); +const generateModuleJniCpp = require('./modules/GenerateModuleJniCpp.js'); +const generateModuleJniH = require('./modules/GenerateModuleJniH.js'); +const generatePropsJavaInterface = require('./components/GeneratePropsJavaInterface.js'); +const generatePropsJavaDelegate = require('./components/GeneratePropsJavaDelegate.js'); +const generateTests = require('./components/GenerateTests.js'); +const generateShadowNodeCpp = require('./components/GenerateShadowNodeCpp.js'); +const generateShadowNodeH = require('./components/GenerateShadowNodeH.js'); +const generateThirdPartyFabricComponentsProviderObjCpp = require('./components/GenerateThirdPartyFabricComponentsProviderObjCpp.js'); +const generateThirdPartyFabricComponentsProviderH = require('./components/GenerateThirdPartyFabricComponentsProviderH.js'); +const generateViewConfigJs = require('./components/GenerateViewConfigJs.js'); +const path = require('path'); +const schemaValidator = require('../SchemaValidator.js'); + +const ALL_GENERATORS = { + generateComponentDescriptorH: generateComponentDescriptorH.generate, + generateComponentHObjCpp: generateComponentHObjCpp.generate, + generateEventEmitterCpp: generateEventEmitterCpp.generate, + generateEventEmitterH: generateEventEmitterH.generate, + generatePropsCpp: generatePropsCpp.generate, + generatePropsH: generatePropsH.generate, + generateStateCpp: generateStateCpp.generate, + generateStateH: generateStateH.generate, + generateModuleH: generateModuleH.generate, + generateModuleCpp: generateModuleCpp.generate, + generateModuleObjCpp: generateModuleObjCpp.generate, + generateModuleJavaSpec: generateModuleJavaSpec.generate, + generateModuleJniCpp: generateModuleJniCpp.generate, + generateModuleJniH: generateModuleJniH.generate, + generatePropsJavaInterface: generatePropsJavaInterface.generate, + generatePropsJavaDelegate: generatePropsJavaDelegate.generate, + generateTests: generateTests.generate, + generateShadowNodeCpp: generateShadowNodeCpp.generate, + generateShadowNodeH: generateShadowNodeH.generate, + generateThirdPartyFabricComponentsProviderObjCpp: + generateThirdPartyFabricComponentsProviderObjCpp.generate, + generateThirdPartyFabricComponentsProviderH: + generateThirdPartyFabricComponentsProviderH.generate, + generateViewConfigJs: generateViewConfigJs.generate, +}; + +import type {SchemaType} from '../CodegenSchema'; + +type LibraryOptions = $ReadOnly<{ + libraryName: string, + schema: SchemaType, + outputDirectory: string, + packageName?: string, // Some platforms have a notion of package, which should be configurable. + assumeNonnull: boolean, +}>; + +type SchemasOptions = $ReadOnly<{ + schemas: {[string]: SchemaType}, + outputDirectory: string, +}>; + +type LibraryGenerators = + | 'componentsAndroid' + | 'componentsIOS' + | 'descriptors' + | 'events' + | 'props' + | 'states' + | 'tests' + | 'shadow-nodes' + | 'modulesAndroid' + | 'modulesCxx' + | 'modulesIOS'; + +type SchemasGenerators = 'providerIOS'; + +type LibraryConfig = $ReadOnly<{ + generators: Array, + test?: boolean, +}>; + +type SchemasConfig = $ReadOnly<{ + generators: Array, + test?: boolean, +}>; + +const LIBRARY_GENERATORS = { + descriptors: [generateComponentDescriptorH.generate], + events: [generateEventEmitterCpp.generate, generateEventEmitterH.generate], + states: [generateStateCpp.generate, generateStateH.generate], + props: [ + generateComponentHObjCpp.generate, + generatePropsCpp.generate, + generatePropsH.generate, + generatePropsJavaInterface.generate, + generatePropsJavaDelegate.generate, + ], + // TODO: Refactor this to consolidate various C++ output variation instead of forking per platform. + componentsAndroid: [ + // JNI/C++ files + generateComponentDescriptorH.generate, + generateEventEmitterCpp.generate, + generateEventEmitterH.generate, + generatePropsCpp.generate, + generatePropsH.generate, + generateStateCpp.generate, + generateStateH.generate, + generateShadowNodeCpp.generate, + generateShadowNodeH.generate, + // Java files + generatePropsJavaInterface.generate, + generatePropsJavaDelegate.generate, + ], + componentsIOS: [ + generateComponentDescriptorH.generate, + generateEventEmitterCpp.generate, + generateEventEmitterH.generate, + generateComponentHObjCpp.generate, + generatePropsCpp.generate, + generatePropsH.generate, + generateStateCpp.generate, + generateStateH.generate, + generateShadowNodeCpp.generate, + generateShadowNodeH.generate, + ], + modulesAndroid: [ + generateModuleJniCpp.generate, + generateModuleJniH.generate, + generateModuleJavaSpec.generate, + ], + modulesCxx: [generateModuleCpp.generate, generateModuleH.generate], + modulesIOS: [generateModuleObjCpp.generate], + tests: [generateTests.generate], + 'shadow-nodes': [ + generateShadowNodeCpp.generate, + generateShadowNodeH.generate, + ], +}; + +const SCHEMAS_GENERATORS = { + providerIOS: [ + generateThirdPartyFabricComponentsProviderObjCpp.generate, + generateThirdPartyFabricComponentsProviderH.generate, + ], +}; + +type CodeGenFile = { + name: string, + content: string, + outputDir: string, +}; + +function writeMapToFiles(map: Array) { + let success = true; + map.forEach(file => { + try { + const location = path.join(file.outputDir, file.name); + const dirName = path.dirname(location); + if (!fs.existsSync(dirName)) { + fs.mkdirSync(dirName, {recursive: true}); + } + fs.writeFileSync(location, file.content); + } catch (error) { + success = false; + console.error(`Failed to write ${file.name} to ${file.outputDir}`, error); + } + }); + + return success; +} + +function checkFilesForChanges(generated: Array): boolean { + let hasChanged = false; + + generated.forEach(file => { + const location = path.join(file.outputDir, file.name); + const currentContents = fs.readFileSync(location, 'utf8'); + if (currentContents !== file.content) { + console.error(`- ${file.name} has changed`); + + hasChanged = true; + } + }); + + return !hasChanged; +} + +function checkOrWriteFiles( + generatedFiles: Array, + test: void | boolean, +): boolean { + if (test === true) { + return checkFilesForChanges(generatedFiles); + } + return writeMapToFiles(generatedFiles); +} + +module.exports = { + allGenerators: ALL_GENERATORS, + libraryGenerators: LIBRARY_GENERATORS, + schemaGenerators: SCHEMAS_GENERATORS, + + generate( + { + libraryName, + schema, + outputDirectory, + packageName, + assumeNonnull, + }: LibraryOptions, + {generators, test}: LibraryConfig, + ): boolean { + schemaValidator.validate(schema); + + function composePath(intermediate: string) { + return path.join(outputDirectory, intermediate, libraryName); + } + + const componentIOSOutput = composePath('react/renderer/components/'); + const modulesIOSOutput = composePath('./'); + + const outputFoldersForGenerators = { + componentsIOS: componentIOSOutput, + modulesIOS: modulesIOSOutput, + descriptors: outputDirectory, + events: outputDirectory, + props: outputDirectory, + states: outputDirectory, + componentsAndroid: outputDirectory, + modulesAndroid: outputDirectory, + modulesCxx: outputDirectory, + tests: outputDirectory, + 'shadow-nodes': outputDirectory, + }; + + const generatedFiles: Array = []; + + for (const name of generators) { + for (const generator of LIBRARY_GENERATORS[name]) { + generator(libraryName, schema, packageName, assumeNonnull).forEach( + (contents: string, fileName: string) => { + generatedFiles.push({ + name: fileName, + content: contents, + outputDir: outputFoldersForGenerators[name], + }); + }, + ); + } + } + return checkOrWriteFiles(generatedFiles, test); + }, + generateFromSchemas( + {schemas, outputDirectory}: SchemasOptions, + {generators, test}: SchemasConfig, + ): boolean { + Object.keys(schemas).forEach(libraryName => + schemaValidator.validate(schemas[libraryName]), + ); + + const generatedFiles: Array = []; + + for (const name of generators) { + for (const generator of SCHEMAS_GENERATORS[name]) { + generator(schemas).forEach((contents: string, fileName: string) => { + generatedFiles.push({ + name: fileName, + content: contents, + outputDir: outputDirectory, + }); + }); + } + } + return checkOrWriteFiles(generatedFiles, test); + }, + generateViewConfig({libraryName, schema}: LibraryOptions): string { + schemaValidator.validate(schema); + + const result = generateViewConfigJs + .generate(libraryName, schema) + .values() + .next(); + + if (typeof result.value !== 'string') { + throw new Error(`Failed to generate view config for ${libraryName}`); + } + + return result.value; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/Utils.js b/packages/react-native-codegen/lib/generators/Utils.js new file mode 100644 index 000000000000..624e6bdb0bb4 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/Utils.js @@ -0,0 +1,47 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function capitalize(string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} +function indent(nice, spaces) { + return nice + .split('\n') + .map((line, index) => { + if (line.length === 0 || index === 0) { + return line; + } + const emptySpaces = new Array(spaces + 1).join(' '); + return emptySpaces + line; + }) + .join('\n'); +} +function toPascalCase(inString) { + if (inString.length === 0) { + return inString; + } + return inString[0].toUpperCase() + inString.slice(1); +} +function toSafeCppString(input) { + return input.split('-').map(toPascalCase).join(''); +} +function getEnumName(moduleName, origEnumName) { + const uppercasedPropName = toSafeCppString(origEnumName); + return `${moduleName}${uppercasedPropName}`; +} +module.exports = { + capitalize, + indent, + toPascalCase, + toSafeCppString, + getEnumName, +}; diff --git a/packages/react-native-codegen/lib/generators/Utils.js.flow b/packages/react-native-codegen/lib/generators/Utils.js.flow new file mode 100644 index 000000000000..da692692daaf --- /dev/null +++ b/packages/react-native-codegen/lib/generators/Utils.js.flow @@ -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. + * + * @flow strict + * @format + */ + +'use strict'; + +function capitalize(string: string): string { + return string.charAt(0).toUpperCase() + string.slice(1); +} + +function indent(nice: string, spaces: number): string { + return nice + .split('\n') + .map((line, index) => { + if (line.length === 0 || index === 0) { + return line; + } + const emptySpaces = new Array(spaces + 1).join(' '); + return emptySpaces + line; + }) + .join('\n'); +} + +function toPascalCase(inString: string): string { + if (inString.length === 0) { + return inString; + } + + return inString[0].toUpperCase() + inString.slice(1); +} + +function toSafeCppString(input: string): string { + return input.split('-').map(toPascalCase).join(''); +} + +function getEnumName(moduleName: string, origEnumName: string): string { + const uppercasedPropName = toSafeCppString(origEnumName); + return `${moduleName}${uppercasedPropName}`; +} + +module.exports = { + capitalize, + indent, + toPascalCase, + toSafeCppString, + getEnumName, +}; diff --git a/packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js b/packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js new file mode 100644 index 000000000000..acce91ecf06d --- /dev/null +++ b/packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js @@ -0,0 +1,80 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const SCHEMA_WITH_TM_AND_FC = { + modules: { + ColoredView: { + type: 'Component', + components: { + ColoredView: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'color', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: null, + }, + }, + ], + commands: [], + }, + }, + }, + NativeCalculator: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'add', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + name: 'a', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + name: 'b', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + moduleName: 'Calculator', + }, + }, +}; +module.exports = { + all: SCHEMA_WITH_TM_AND_FC, +}; diff --git a/packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js.flow b/packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js.flow new file mode 100644 index 000000000000..8678249f5a82 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/__test_fixtures__/fixtures.js.flow @@ -0,0 +1,83 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema.js'; + +const SCHEMA_WITH_TM_AND_FC: SchemaType = { + modules: { + ColoredView: { + type: 'Component', + components: { + ColoredView: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'color', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: null, + }, + }, + ], + commands: [], + }, + }, + }, + NativeCalculator: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'add', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + name: 'a', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + name: 'b', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + moduleName: 'Calculator', + }, + }, +}; + +module.exports = { + all: SCHEMA_WITH_TM_AND_FC, +}; diff --git a/packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js b/packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js new file mode 100644 index 000000000000..3f284b17eccd --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js @@ -0,0 +1,228 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./CppHelpers.js'), + getCppTypeForAnnotation = _require.getCppTypeForAnnotation, + getEnumMaskName = _require.getEnumMaskName, + generateStructName = _require.generateStructName, + getImports = _require.getImports; +const _require2 = require('../Utils'), + getEnumName = _require2.getEnumName; +function getNativeTypeFromAnnotation(componentName, prop, nameParts) { + const typeAnnotation = prop.typeAnnotation; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + return getCppTypeForAnnotation(typeAnnotation.type); + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return 'SharedColor'; + case 'ImageSourcePrimitive': + return 'ImageSource'; + case 'ImageRequestPrimitive': + return 'ImageRequest'; + case 'PointPrimitive': + return 'Point'; + case 'EdgeInsetsPrimitive': + return 'EdgeInsets'; + case 'DimensionPrimitive': + return 'YGValue'; + default: + typeAnnotation.name; + throw new Error('Received unknown ReservedPropTypeAnnotation'); + } + case 'ArrayTypeAnnotation': { + const arrayType = typeAnnotation.elementType.type; + if (arrayType === 'ArrayTypeAnnotation') { + return `std::vector<${getNativeTypeFromAnnotation( + componentName, + { + typeAnnotation: typeAnnotation.elementType, + name: '', + }, + nameParts.concat([prop.name]), + )}>`; + } + if (arrayType === 'ObjectTypeAnnotation') { + const structName = generateStructName( + componentName, + nameParts.concat([prop.name]), + ); + return `std::vector<${structName}>`; + } + if (arrayType === 'StringEnumTypeAnnotation') { + const enumName = getEnumName(componentName, prop.name); + return getEnumMaskName(enumName); + } + const itemAnnotation = getNativeTypeFromAnnotation( + componentName, + { + typeAnnotation: typeAnnotation.elementType, + name: componentName, + }, + nameParts.concat([prop.name]), + ); + return `std::vector<${itemAnnotation}>`; + } + case 'ObjectTypeAnnotation': { + return generateStructName(componentName, nameParts.concat([prop.name])); + } + case 'StringEnumTypeAnnotation': + return getEnumName(componentName, prop.name); + case 'Int32EnumTypeAnnotation': + return getEnumName(componentName, prop.name); + case 'MixedTypeAnnotation': + return 'folly::dynamic'; + default: + typeAnnotation; + throw new Error( + `Received invalid typeAnnotation for ${componentName} prop ${prop.name}, received ${typeAnnotation.type}`, + ); + } +} + +/// This function process some types if we need to customize them +/// For example, the ImageSource and the reserved types could be trasformed into +/// const address instead of using them as plain types. +function convertTypesToConstAddressIfNeeded(type, convertibleTypes) { + if (convertibleTypes.has(type)) { + return `${type} const &`; + } + return type; +} +function convertValueToSharedPointerWithMove(type, value, convertibleTypes) { + if (convertibleTypes.has(type)) { + return `std::make_shared<${type}>(std::move(${value}))`; + } + return value; +} +function convertVariableToSharedPointer(type, convertibleTypes) { + if (convertibleTypes.has(type)) { + return `std::shared_ptr<${type}>`; + } + return type; +} +function convertVariableToPointer(type, value, convertibleTypes) { + if (convertibleTypes.has(type)) { + return `*${value}`; + } + return value; +} +const convertCtorParamToAddressType = type => { + const typesToConvert = new Set(); + typesToConvert.add('ImageSource'); + return convertTypesToConstAddressIfNeeded(type, typesToConvert); +}; +const convertCtorInitToSharedPointers = (type, value) => { + const typesToConvert = new Set(); + typesToConvert.add('ImageRequest'); + return convertValueToSharedPointerWithMove(type, value, typesToConvert); +}; +const convertGettersReturnTypeToAddressType = type => { + const typesToConvert = new Set(); + typesToConvert.add('ImageRequest'); + return convertTypesToConstAddressIfNeeded(type, typesToConvert); +}; +const convertVarTypeToSharedPointer = type => { + const typesToConvert = new Set(); + typesToConvert.add('ImageRequest'); + return convertVariableToSharedPointer(type, typesToConvert); +}; +const convertVarValueToPointer = (type, value) => { + const typesToConvert = new Set(); + typesToConvert.add('ImageRequest'); + return convertVariableToPointer(type, value, typesToConvert); +}; +function getLocalImports(properties) { + const imports = new Set(); + function addImportsForNativeName(name) { + switch (name) { + case 'ColorPrimitive': + imports.add('#include '); + return; + case 'ImageSourcePrimitive': + imports.add('#include '); + return; + case 'ImageRequestPrimitive': + imports.add('#include '); + return; + case 'PointPrimitive': + imports.add('#include '); + return; + case 'EdgeInsetsPrimitive': + imports.add('#include '); + return; + case 'DimensionPrimitive': + imports.add('#include '); + return; + default: + name; + throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); + } + } + properties.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + addImportsForNativeName(typeAnnotation.name); + } + if (typeAnnotation.type === 'ArrayTypeAnnotation') { + imports.add('#include '); + if (typeAnnotation.elementType.type === 'StringEnumTypeAnnotation') { + imports.add('#include '); + } + } + if ( + typeAnnotation.type === 'ArrayTypeAnnotation' && + typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' + ) { + addImportsForNativeName(typeAnnotation.elementType.name); + } + if ( + typeAnnotation.type === 'ArrayTypeAnnotation' && + typeAnnotation.elementType.type === 'ObjectTypeAnnotation' + ) { + imports.add('#include '); + const objectProps = typeAnnotation.elementType.properties; + // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation + const objectImports = getImports(objectProps); + // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation + const localImports = getLocalImports(objectProps); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + objectImports.forEach(imports.add, imports); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + localImports.forEach(imports.add, imports); + } + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + imports.add('#include '); + const objectImports = getImports(typeAnnotation.properties); + const localImports = getLocalImports(typeAnnotation.properties); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + objectImports.forEach(imports.add, imports); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + localImports.forEach(imports.add, imports); + } + }); + return imports; +} +module.exports = { + getNativeTypeFromAnnotation, + convertCtorParamToAddressType, + convertGettersReturnTypeToAddressType, + convertCtorInitToSharedPointers, + convertVarTypeToSharedPointer, + convertVarValueToPointer, + getLocalImports, +}; diff --git a/packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js.flow b/packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js.flow new file mode 100644 index 000000000000..c43768a15934 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/ComponentsGeneratorUtils.js.flow @@ -0,0 +1,316 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {NamedShape, PropTypeAnnotation} from '../../CodegenSchema'; + +import type { + StringTypeAnnotation, + ReservedPropTypeAnnotation, + ObjectTypeAnnotation, + Int32TypeAnnotation, + FloatTypeAnnotation, + DoubleTypeAnnotation, + BooleanTypeAnnotation, +} from '../../CodegenSchema'; + +const { + getCppTypeForAnnotation, + getEnumMaskName, + generateStructName, + getImports, +} = require('./CppHelpers.js'); + +const {getEnumName} = require('../Utils'); + +function getNativeTypeFromAnnotation( + componentName: string, + prop: + | NamedShape + | { + name: string, + typeAnnotation: + | $FlowFixMe + | DoubleTypeAnnotation + | FloatTypeAnnotation + | BooleanTypeAnnotation + | Int32TypeAnnotation + | StringTypeAnnotation + | ObjectTypeAnnotation + | ReservedPropTypeAnnotation + | { + +default: string, + +options: $ReadOnlyArray, + +type: 'StringEnumTypeAnnotation', + } + | { + +elementType: ObjectTypeAnnotation, + +type: 'ArrayTypeAnnotation', + }, + }, + nameParts: $ReadOnlyArray, +): string { + const typeAnnotation = prop.typeAnnotation; + + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + return getCppTypeForAnnotation(typeAnnotation.type); + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return 'SharedColor'; + case 'ImageSourcePrimitive': + return 'ImageSource'; + case 'ImageRequestPrimitive': + return 'ImageRequest'; + case 'PointPrimitive': + return 'Point'; + case 'EdgeInsetsPrimitive': + return 'EdgeInsets'; + case 'DimensionPrimitive': + return 'YGValue'; + default: + (typeAnnotation.name: empty); + throw new Error('Received unknown ReservedPropTypeAnnotation'); + } + case 'ArrayTypeAnnotation': { + const arrayType = typeAnnotation.elementType.type; + if (arrayType === 'ArrayTypeAnnotation') { + return `std::vector<${getNativeTypeFromAnnotation( + componentName, + {typeAnnotation: typeAnnotation.elementType, name: ''}, + nameParts.concat([prop.name]), + )}>`; + } + if (arrayType === 'ObjectTypeAnnotation') { + const structName = generateStructName( + componentName, + nameParts.concat([prop.name]), + ); + return `std::vector<${structName}>`; + } + if (arrayType === 'StringEnumTypeAnnotation') { + const enumName = getEnumName(componentName, prop.name); + return getEnumMaskName(enumName); + } + const itemAnnotation = getNativeTypeFromAnnotation( + componentName, + { + typeAnnotation: typeAnnotation.elementType, + name: componentName, + }, + nameParts.concat([prop.name]), + ); + return `std::vector<${itemAnnotation}>`; + } + case 'ObjectTypeAnnotation': { + return generateStructName(componentName, nameParts.concat([prop.name])); + } + case 'StringEnumTypeAnnotation': + return getEnumName(componentName, prop.name); + case 'Int32EnumTypeAnnotation': + return getEnumName(componentName, prop.name); + case 'MixedTypeAnnotation': + return 'folly::dynamic'; + default: + (typeAnnotation: empty); + throw new Error( + `Received invalid typeAnnotation for ${componentName} prop ${prop.name}, received ${typeAnnotation.type}`, + ); + } +} + +/// This function process some types if we need to customize them +/// For example, the ImageSource and the reserved types could be trasformed into +/// const address instead of using them as plain types. +function convertTypesToConstAddressIfNeeded( + type: string, + convertibleTypes: Set, +): string { + if (convertibleTypes.has(type)) { + return `${type} const &`; + } + return type; +} + +function convertValueToSharedPointerWithMove( + type: string, + value: string, + convertibleTypes: Set, +): string { + if (convertibleTypes.has(type)) { + return `std::make_shared<${type}>(std::move(${value}))`; + } + return value; +} + +function convertVariableToSharedPointer( + type: string, + convertibleTypes: Set, +): string { + if (convertibleTypes.has(type)) { + return `std::shared_ptr<${type}>`; + } + return type; +} + +function convertVariableToPointer( + type: string, + value: string, + convertibleTypes: Set, +): string { + if (convertibleTypes.has(type)) { + return `*${value}`; + } + return value; +} + +const convertCtorParamToAddressType = (type: string): string => { + const typesToConvert: Set = new Set(); + typesToConvert.add('ImageSource'); + + return convertTypesToConstAddressIfNeeded(type, typesToConvert); +}; + +const convertCtorInitToSharedPointers = ( + type: string, + value: string, +): string => { + const typesToConvert: Set = new Set(); + typesToConvert.add('ImageRequest'); + + return convertValueToSharedPointerWithMove(type, value, typesToConvert); +}; + +const convertGettersReturnTypeToAddressType = (type: string): string => { + const typesToConvert: Set = new Set(); + typesToConvert.add('ImageRequest'); + + return convertTypesToConstAddressIfNeeded(type, typesToConvert); +}; + +const convertVarTypeToSharedPointer = (type: string): string => { + const typesToConvert: Set = new Set(); + typesToConvert.add('ImageRequest'); + + return convertVariableToSharedPointer(type, typesToConvert); +}; + +const convertVarValueToPointer = (type: string, value: string): string => { + const typesToConvert: Set = new Set(); + typesToConvert.add('ImageRequest'); + + return convertVariableToPointer(type, value, typesToConvert); +}; + +function getLocalImports( + properties: $ReadOnlyArray>, +): Set { + const imports: Set = new Set(); + + function addImportsForNativeName( + name: + | 'ColorPrimitive' + | 'EdgeInsetsPrimitive' + | 'ImageSourcePrimitive' + | 'PointPrimitive' + | 'ImageRequestPrimitive' + | 'DimensionPrimitive', + ) { + switch (name) { + case 'ColorPrimitive': + imports.add('#include '); + return; + case 'ImageSourcePrimitive': + imports.add('#include '); + return; + case 'ImageRequestPrimitive': + imports.add('#include '); + return; + case 'PointPrimitive': + imports.add('#include '); + return; + case 'EdgeInsetsPrimitive': + imports.add('#include '); + return; + case 'DimensionPrimitive': + imports.add('#include '); + return; + default: + (name: empty); + throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); + } + } + + properties.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + + if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + addImportsForNativeName(typeAnnotation.name); + } + + if (typeAnnotation.type === 'ArrayTypeAnnotation') { + imports.add('#include '); + if (typeAnnotation.elementType.type === 'StringEnumTypeAnnotation') { + imports.add('#include '); + } + } + + if ( + typeAnnotation.type === 'ArrayTypeAnnotation' && + typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' + ) { + addImportsForNativeName(typeAnnotation.elementType.name); + } + + if ( + typeAnnotation.type === 'ArrayTypeAnnotation' && + typeAnnotation.elementType.type === 'ObjectTypeAnnotation' + ) { + imports.add('#include '); + const objectProps = typeAnnotation.elementType.properties; + // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation + const objectImports = getImports(objectProps); + // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation + const localImports = getLocalImports(objectProps); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + objectImports.forEach(imports.add, imports); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + localImports.forEach(imports.add, imports); + } + + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + imports.add('#include '); + const objectImports = getImports(typeAnnotation.properties); + const localImports = getLocalImports(typeAnnotation.properties); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + objectImports.forEach(imports.add, imports); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + localImports.forEach(imports.add, imports); + } + }); + + return imports; +} + +module.exports = { + getNativeTypeFromAnnotation, + convertCtorParamToAddressType, + convertGettersReturnTypeToAddressType, + convertCtorInitToSharedPointers, + convertVarTypeToSharedPointer, + convertVarValueToPointer, + getLocalImports, +}; diff --git a/packages/react-native-codegen/lib/generators/components/CppHelpers.js b/packages/react-native-codegen/lib/generators/components/CppHelpers.js new file mode 100644 index 000000000000..81815362c554 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/CppHelpers.js @@ -0,0 +1,220 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../Utils'), + getEnumName = _require.getEnumName, + toSafeCppString = _require.toSafeCppString; +function toIntEnumValueName(propName, value) { + return `${toSafeCppString(propName)}${value}`; +} +function getCppTypeForAnnotation(type) { + switch (type) { + case 'BooleanTypeAnnotation': + return 'bool'; + case 'StringTypeAnnotation': + return 'std::string'; + case 'Int32TypeAnnotation': + return 'int'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'Float'; + case 'MixedTypeAnnotation': + return 'folly::dynamic'; + default: + type; + throw new Error(`Received invalid typeAnnotation ${type}`); + } +} +function getCppArrayTypeForAnnotation(typeElement, structParts) { + switch (typeElement.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'Int32TypeAnnotation': + case 'MixedTypeAnnotation': + return `std::vector<${getCppTypeForAnnotation(typeElement.type)}>`; + case 'StringEnumTypeAnnotation': + case 'ObjectTypeAnnotation': + if (!structParts) { + throw new Error( + `Trying to generate the event emitter for an Array of ${typeElement.type} without informations to generate the generic type`, + ); + } + return `std::vector<${generateEventStructName(structParts)}>`; + case 'ArrayTypeAnnotation': + return `std::vector<${getCppArrayTypeForAnnotation( + typeElement.elementType, + structParts, + )}>`; + default: + throw new Error( + `Can't determine array type with typeElement: ${JSON.stringify( + typeElement, + null, + 2, + )}`, + ); + } +} +function getImports(properties) { + const imports = new Set(); + function addImportsForNativeName(name) { + switch (name) { + case 'ColorPrimitive': + return; + case 'PointPrimitive': + return; + case 'EdgeInsetsPrimitive': + return; + case 'ImageRequestPrimitive': + return; + case 'ImageSourcePrimitive': + imports.add('#include '); + return; + case 'DimensionPrimitive': + imports.add('#include '); + return; + default: + name; + throw new Error(`Invalid name, got ${name}`); + } + } + properties.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + addImportsForNativeName(typeAnnotation.name); + } + if ( + typeAnnotation.type === 'ArrayTypeAnnotation' && + typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' + ) { + addImportsForNativeName(typeAnnotation.elementType.name); + } + if (typeAnnotation.type === 'MixedTypeAnnotation') { + imports.add('#include '); + } + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + const objectImports = getImports(typeAnnotation.properties); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + objectImports.forEach(imports.add, imports); + } + }); + return imports; +} +function generateEventStructName(parts = []) { + return parts.map(toSafeCppString).join(''); +} +function generateStructName(componentName, parts = []) { + const additional = parts.map(toSafeCppString).join(''); + return `${componentName}${additional}Struct`; +} +function getEnumMaskName(enumName) { + return `${enumName}Mask`; +} +function convertDefaultTypeToString(componentName, prop) { + const typeAnnotation = prop.typeAnnotation; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + if (typeAnnotation.default == null) { + return ''; + } + return String(typeAnnotation.default); + case 'StringTypeAnnotation': + if (typeAnnotation.default == null) { + return ''; + } + return `"${typeAnnotation.default}"`; + case 'Int32TypeAnnotation': + return String(typeAnnotation.default); + case 'DoubleTypeAnnotation': + const defaultDoubleVal = typeAnnotation.default; + return parseInt(defaultDoubleVal, 10) === defaultDoubleVal + ? typeAnnotation.default.toFixed(1) + : String(typeAnnotation.default); + case 'FloatTypeAnnotation': + const defaultFloatVal = typeAnnotation.default; + if (defaultFloatVal == null) { + return ''; + } + return parseInt(defaultFloatVal, 10) === defaultFloatVal + ? defaultFloatVal.toFixed(1) + : String(typeAnnotation.default); + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return ''; + case 'ImageSourcePrimitive': + return ''; + case 'ImageRequestPrimitive': + return ''; + case 'PointPrimitive': + return ''; + case 'EdgeInsetsPrimitive': + return ''; + case 'DimensionPrimitive': + return ''; + default: + typeAnnotation.name; + throw new Error( + `Unsupported type annotation: ${typeAnnotation.name}`, + ); + } + case 'ArrayTypeAnnotation': { + const elementType = typeAnnotation.elementType; + switch (elementType.type) { + case 'StringEnumTypeAnnotation': + if (elementType.default == null) { + throw new Error( + 'A default is required for array StringEnumTypeAnnotation', + ); + } + const enumName = getEnumName(componentName, prop.name); + const enumMaskName = getEnumMaskName(enumName); + const defaultValue = `${enumName}::${toSafeCppString( + elementType.default, + )}`; + return `static_cast<${enumMaskName}>(${defaultValue})`; + default: + return ''; + } + } + case 'ObjectTypeAnnotation': { + return ''; + } + case 'StringEnumTypeAnnotation': + return `${getEnumName(componentName, prop.name)}::${toSafeCppString( + typeAnnotation.default, + )}`; + case 'Int32EnumTypeAnnotation': + return `${getEnumName(componentName, prop.name)}::${toIntEnumValueName( + prop.name, + typeAnnotation.default, + )}`; + case 'MixedTypeAnnotation': + return ''; + default: + typeAnnotation; + throw new Error(`Unsupported type annotation: ${typeAnnotation.type}`); + } +} +module.exports = { + convertDefaultTypeToString, + getCppArrayTypeForAnnotation, + getCppTypeForAnnotation, + getEnumMaskName, + getImports, + toIntEnumValueName, + generateStructName, + generateEventStructName, +}; diff --git a/packages/react-native-codegen/lib/generators/components/CppHelpers.js.flow b/packages/react-native-codegen/lib/generators/components/CppHelpers.js.flow new file mode 100644 index 000000000000..ccecb1bcd080 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/CppHelpers.js.flow @@ -0,0 +1,268 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type { + EventTypeAnnotation, + NamedShape, + PropTypeAnnotation, +} from '../../CodegenSchema'; + +const {getEnumName, toSafeCppString} = require('../Utils'); + +function toIntEnumValueName(propName: string, value: number): string { + return `${toSafeCppString(propName)}${value}`; +} + +function getCppTypeForAnnotation( + type: + | 'BooleanTypeAnnotation' + | 'StringTypeAnnotation' + | 'Int32TypeAnnotation' + | 'DoubleTypeAnnotation' + | 'FloatTypeAnnotation' + | 'MixedTypeAnnotation', +): string { + switch (type) { + case 'BooleanTypeAnnotation': + return 'bool'; + case 'StringTypeAnnotation': + return 'std::string'; + case 'Int32TypeAnnotation': + return 'int'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'Float'; + case 'MixedTypeAnnotation': + return 'folly::dynamic'; + default: + (type: empty); + throw new Error(`Received invalid typeAnnotation ${type}`); + } +} + +function getCppArrayTypeForAnnotation( + typeElement: EventTypeAnnotation, + structParts?: string[], +): string { + switch (typeElement.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'Int32TypeAnnotation': + case 'MixedTypeAnnotation': + return `std::vector<${getCppTypeForAnnotation(typeElement.type)}>`; + case 'StringEnumTypeAnnotation': + case 'ObjectTypeAnnotation': + if (!structParts) { + throw new Error( + `Trying to generate the event emitter for an Array of ${typeElement.type} without informations to generate the generic type`, + ); + } + return `std::vector<${generateEventStructName(structParts)}>`; + case 'ArrayTypeAnnotation': + return `std::vector<${getCppArrayTypeForAnnotation( + typeElement.elementType, + structParts, + )}>`; + default: + throw new Error( + `Can't determine array type with typeElement: ${JSON.stringify( + typeElement, + null, + 2, + )}`, + ); + } +} + +function getImports( + properties: + | $ReadOnlyArray> + | $ReadOnlyArray>, +): Set { + const imports: Set = new Set(); + + function addImportsForNativeName( + name: + | 'ColorPrimitive' + | 'EdgeInsetsPrimitive' + | 'ImageRequestPrimitive' + | 'ImageSourcePrimitive' + | 'PointPrimitive' + | 'DimensionPrimitive', + ) { + switch (name) { + case 'ColorPrimitive': + return; + case 'PointPrimitive': + return; + case 'EdgeInsetsPrimitive': + return; + case 'ImageRequestPrimitive': + return; + case 'ImageSourcePrimitive': + imports.add('#include '); + return; + case 'DimensionPrimitive': + imports.add('#include '); + return; + default: + (name: empty); + throw new Error(`Invalid name, got ${name}`); + } + } + + properties.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + + if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + addImportsForNativeName(typeAnnotation.name); + } + + if ( + typeAnnotation.type === 'ArrayTypeAnnotation' && + typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' + ) { + addImportsForNativeName(typeAnnotation.elementType.name); + } + + if (typeAnnotation.type === 'MixedTypeAnnotation') { + imports.add('#include '); + } + + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + const objectImports = getImports(typeAnnotation.properties); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + objectImports.forEach(imports.add, imports); + } + }); + + return imports; +} + +function generateEventStructName(parts: $ReadOnlyArray = []): string { + return parts.map(toSafeCppString).join(''); +} + +function generateStructName( + componentName: string, + parts: $ReadOnlyArray = [], +): string { + const additional = parts.map(toSafeCppString).join(''); + return `${componentName}${additional}Struct`; +} + +function getEnumMaskName(enumName: string): string { + return `${enumName}Mask`; +} + +function convertDefaultTypeToString( + componentName: string, + prop: NamedShape, +): string { + const typeAnnotation = prop.typeAnnotation; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + if (typeAnnotation.default == null) { + return ''; + } + return String(typeAnnotation.default); + case 'StringTypeAnnotation': + if (typeAnnotation.default == null) { + return ''; + } + return `"${typeAnnotation.default}"`; + case 'Int32TypeAnnotation': + return String(typeAnnotation.default); + case 'DoubleTypeAnnotation': + const defaultDoubleVal = typeAnnotation.default; + return parseInt(defaultDoubleVal, 10) === defaultDoubleVal + ? typeAnnotation.default.toFixed(1) + : String(typeAnnotation.default); + case 'FloatTypeAnnotation': + const defaultFloatVal = typeAnnotation.default; + if (defaultFloatVal == null) { + return ''; + } + return parseInt(defaultFloatVal, 10) === defaultFloatVal + ? defaultFloatVal.toFixed(1) + : String(typeAnnotation.default); + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return ''; + case 'ImageSourcePrimitive': + return ''; + case 'ImageRequestPrimitive': + return ''; + case 'PointPrimitive': + return ''; + case 'EdgeInsetsPrimitive': + return ''; + case 'DimensionPrimitive': + return ''; + default: + (typeAnnotation.name: empty); + throw new Error( + `Unsupported type annotation: ${typeAnnotation.name}`, + ); + } + case 'ArrayTypeAnnotation': { + const elementType = typeAnnotation.elementType; + switch (elementType.type) { + case 'StringEnumTypeAnnotation': + if (elementType.default == null) { + throw new Error( + 'A default is required for array StringEnumTypeAnnotation', + ); + } + const enumName = getEnumName(componentName, prop.name); + const enumMaskName = getEnumMaskName(enumName); + const defaultValue = `${enumName}::${toSafeCppString( + elementType.default, + )}`; + return `static_cast<${enumMaskName}>(${defaultValue})`; + default: + return ''; + } + } + case 'ObjectTypeAnnotation': { + return ''; + } + case 'StringEnumTypeAnnotation': + return `${getEnumName(componentName, prop.name)}::${toSafeCppString( + typeAnnotation.default, + )}`; + case 'Int32EnumTypeAnnotation': + return `${getEnumName(componentName, prop.name)}::${toIntEnumValueName( + prop.name, + typeAnnotation.default, + )}`; + case 'MixedTypeAnnotation': + return ''; + default: + (typeAnnotation: empty); + throw new Error(`Unsupported type annotation: ${typeAnnotation.type}`); + } +} + +module.exports = { + convertDefaultTypeToString, + getCppArrayTypeForAnnotation, + getCppTypeForAnnotation, + getEnumMaskName, + getImports, + toIntEnumValueName, + generateStructName, + generateEventStructName, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js b/packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js new file mode 100644 index 000000000000..24d208994a57 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js @@ -0,0 +1,75 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +// File path -> contents + +const FileTemplate = ({componentDescriptors, libraryName}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateComponentDescriptorH.js + */ + +#pragma once + +#include +#include + +namespace facebook { +namespace react { + +${componentDescriptors} + +} // namespace react +} // namespace facebook +`; +const ComponentTemplate = ({className}) => + ` +using ${className}ComponentDescriptor = ConcreteComponentDescriptor<${className}ShadowNode>; +`.trim(); +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'ComponentDescriptors.h'; + const componentDescriptors = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + if (components[componentName].interfaceOnly === true) { + return; + } + return ComponentTemplate({ + className: componentName, + }); + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + const replacedTemplate = FileTemplate({ + componentDescriptors, + libraryName, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js.flow new file mode 100644 index 000000000000..a7c795622f90 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateComponentDescriptorH.js.flow @@ -0,0 +1,95 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + componentDescriptors, + libraryName, +}: { + componentDescriptors: string, + libraryName: string, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateComponentDescriptorH.js + */ + +#pragma once + +#include +#include + +namespace facebook { +namespace react { + +${componentDescriptors} + +} // namespace react +} // namespace facebook +`; + +const ComponentTemplate = ({className}: {className: string}) => + ` +using ${className}ComponentDescriptor = ConcreteComponentDescriptor<${className}ShadowNode>; +`.trim(); + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'ComponentDescriptors.h'; + + const componentDescriptors = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + if (components[componentName].interfaceOnly === true) { + return; + } + + return ComponentTemplate({className: componentName}); + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + + const replacedTemplate = FileTemplate({ + componentDescriptors, + libraryName, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js b/packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js new file mode 100644 index 000000000000..e250b1af08e0 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js @@ -0,0 +1,327 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function getOrdinalNumber(num) { + switch (num) { + case 1: + return '1st'; + case 2: + return '2nd'; + case 3: + return '3rd'; + } + if (num <= 20) { + return `${num}th`; + } + return 'unknown'; +} +const ProtocolTemplate = ({componentName, methods}) => + ` +@protocol RCT${componentName}ViewProtocol +${methods} +@end +`.trim(); +const CommandHandlerIfCaseConvertArgTemplate = ({ + componentName, + expectedKind, + argNumber, + argNumberString, + expectedKindString, + argConversion, +}) => + ` + NSObject *arg${argNumber} = args[${argNumber}]; +#if RCT_DEBUG + if (!RCTValidateTypeOfViewCommandArgument(arg${argNumber}, ${expectedKind}, @"${expectedKindString}", @"${componentName}", commandName, @"${argNumberString}")) { + return; + } +#endif + ${argConversion} +`.trim(); +const CommandHandlerIfCaseTemplate = ({ + componentName, + commandName, + numArgs, + convertArgs, + commandCall, +}) => + ` +if ([commandName isEqualToString:@"${commandName}"]) { +#if RCT_DEBUG + if ([args count] != ${numArgs}) { + RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"${componentName}", commandName, (int)[args count], ${numArgs}); + return; + } +#endif + + ${convertArgs} + + ${commandCall} + return; +} +`.trim(); +const CommandHandlerTemplate = ({componentName, ifCases}) => + ` +RCT_EXTERN inline void RCT${componentName}HandleCommand( + id componentView, + NSString const *commandName, + NSArray const *args) +{ + ${ifCases} + +#if RCT_DEBUG + RCTLogError(@"%@ received command %@, which is not a supported command.", @"${componentName}", commandName); +#endif +} +`.trim(); +const FileTemplate = ({componentContent}) => + ` +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* ${'@'}generated by codegen project: GenerateComponentHObjCpp.js +*/ + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +${componentContent} + +NS_ASSUME_NONNULL_END +`.trim(); +function getObjCParamType(param) { + const typeAnnotation = param.typeAnnotation; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return 'double'; + default: + typeAnnotation.name; + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return 'BOOL'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'float'; + case 'Int32TypeAnnotation': + return 'NSInteger'; + case 'StringTypeAnnotation': + return 'NSString *'; + default: + typeAnnotation.type; + throw new Error('Received invalid param type annotation'); + } +} +function getObjCExpectedKindParamType(param) { + const typeAnnotation = param.typeAnnotation; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return '[NSNumber class]'; + default: + typeAnnotation.name; + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return '[NSNumber class]'; + case 'DoubleTypeAnnotation': + return '[NSNumber class]'; + case 'FloatTypeAnnotation': + return '[NSNumber class]'; + case 'Int32TypeAnnotation': + return '[NSNumber class]'; + case 'StringTypeAnnotation': + return '[NSString class]'; + default: + typeAnnotation.type; + throw new Error('Received invalid param type annotation'); + } +} +function getReadableExpectedKindParamType(param) { + const typeAnnotation = param.typeAnnotation; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return 'double'; + default: + typeAnnotation.name; + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return 'boolean'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'float'; + case 'Int32TypeAnnotation': + return 'number'; + case 'StringTypeAnnotation': + return 'string'; + default: + typeAnnotation.type; + throw new Error('Received invalid param type annotation'); + } +} +function getObjCRightHandAssignmentParamType(param, index) { + const typeAnnotation = param.typeAnnotation; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return `[(NSNumber *)arg${index} doubleValue]`; + default: + typeAnnotation.name; + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return `[(NSNumber *)arg${index} boolValue]`; + case 'DoubleTypeAnnotation': + return `[(NSNumber *)arg${index} doubleValue]`; + case 'FloatTypeAnnotation': + return `[(NSNumber *)arg${index} floatValue]`; + case 'Int32TypeAnnotation': + return `[(NSNumber *)arg${index} intValue]`; + case 'StringTypeAnnotation': + return `(NSString *)arg${index}`; + default: + typeAnnotation.type; + throw new Error('Received invalid param type annotation'); + } +} +function generateProtocol(component, componentName) { + const methods = component.commands + .map(command => { + const params = command.typeAnnotation.params; + const paramString = + params.length === 0 + ? '' + : params + .map((param, index) => { + const objCType = getObjCParamType(param); + return `${index === 0 ? '' : param.name}:(${objCType})${ + param.name + }`; + }) + .join(' '); + return `- (void)${command.name}${paramString};`; + }) + .join('\n') + .trim(); + return ProtocolTemplate({ + componentName, + methods, + }); +} +function generateConvertAndValidateParam(param, index, componentName) { + const leftSideType = getObjCParamType(param); + const expectedKind = getObjCExpectedKindParamType(param); + const expectedKindString = getReadableExpectedKindParamType(param); + const argConversion = `${leftSideType} ${ + param.name + } = ${getObjCRightHandAssignmentParamType(param, index)};`; + return CommandHandlerIfCaseConvertArgTemplate({ + componentName, + argConversion, + argNumber: index, + argNumberString: getOrdinalNumber(index + 1), + expectedKind, + expectedKindString, + }); +} +function generateCommandIfCase(command, componentName) { + const params = command.typeAnnotation.params; + const convertArgs = params + .map((param, index) => + generateConvertAndValidateParam(param, index, componentName), + ) + .join('\n\n') + .trim(); + const commandCallArgs = + params.length === 0 + ? '' + : params + .map((param, index) => { + return `${index === 0 ? '' : param.name}:${param.name}`; + }) + .join(' '); + const commandCall = `[componentView ${command.name}${commandCallArgs}];`; + return CommandHandlerIfCaseTemplate({ + componentName, + commandName: command.name, + numArgs: params.length, + convertArgs, + commandCall, + }); +} +function generateCommandHandler(component, componentName) { + if (component.commands.length === 0) { + return null; + } + const ifCases = component.commands + .map(command => generateCommandIfCase(command, componentName)) + .join('\n\n'); + return CommandHandlerTemplate({ + componentName, + ifCases, + }); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'RCTComponentViewHelpers.h'; + const componentContent = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('iOS') + ); + }) + .map(componentName => { + return [ + generateProtocol(components[componentName], componentName), + generateCommandHandler(components[componentName], componentName), + ] + .join('\n\n') + .trim(); + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + const replacedTemplate = FileTemplate({ + componentContent, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js.flow new file mode 100644 index 000000000000..ee619f4617f7 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateComponentHObjCpp.js.flow @@ -0,0 +1,418 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + NamedShape, + CommandTypeAnnotation, + ComponentShape, + SchemaType, + CommandParamTypeAnnotation, +} from '../../CodegenSchema'; + +type FilesOutput = Map; + +function getOrdinalNumber(num: number): string { + switch (num) { + case 1: + return '1st'; + case 2: + return '2nd'; + case 3: + return '3rd'; + } + + if (num <= 20) { + return `${num}th`; + } + + return 'unknown'; +} + +const ProtocolTemplate = ({ + componentName, + methods, +}: { + componentName: string, + methods: string, +}) => + ` +@protocol RCT${componentName}ViewProtocol +${methods} +@end +`.trim(); + +const CommandHandlerIfCaseConvertArgTemplate = ({ + componentName, + expectedKind, + argNumber, + argNumberString, + expectedKindString, + argConversion, +}: { + componentName: string, + expectedKind: string, + argNumber: number, + argNumberString: string, + expectedKindString: string, + argConversion: string, +}) => + ` + NSObject *arg${argNumber} = args[${argNumber}]; +#if RCT_DEBUG + if (!RCTValidateTypeOfViewCommandArgument(arg${argNumber}, ${expectedKind}, @"${expectedKindString}", @"${componentName}", commandName, @"${argNumberString}")) { + return; + } +#endif + ${argConversion} +`.trim(); + +const CommandHandlerIfCaseTemplate = ({ + componentName, + commandName, + numArgs, + convertArgs, + commandCall, +}: { + componentName: string, + commandName: string, + numArgs: number, + convertArgs: string, + commandCall: string, +}) => + ` +if ([commandName isEqualToString:@"${commandName}"]) { +#if RCT_DEBUG + if ([args count] != ${numArgs}) { + RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"${componentName}", commandName, (int)[args count], ${numArgs}); + return; + } +#endif + + ${convertArgs} + + ${commandCall} + return; +} +`.trim(); + +const CommandHandlerTemplate = ({ + componentName, + ifCases, +}: { + componentName: string, + ifCases: string, +}) => + ` +RCT_EXTERN inline void RCT${componentName}HandleCommand( + id componentView, + NSString const *commandName, + NSArray const *args) +{ + ${ifCases} + +#if RCT_DEBUG + RCTLogError(@"%@ received command %@, which is not a supported command.", @"${componentName}", commandName); +#endif +} +`.trim(); + +const FileTemplate = ({componentContent}: {componentContent: string}) => + ` +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* ${'@'}generated by codegen project: GenerateComponentHObjCpp.js +*/ + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +${componentContent} + +NS_ASSUME_NONNULL_END +`.trim(); + +type Param = NamedShape; + +function getObjCParamType(param: Param): string { + const {typeAnnotation} = param; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return 'double'; + default: + (typeAnnotation.name: empty); + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return 'BOOL'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'float'; + case 'Int32TypeAnnotation': + return 'NSInteger'; + case 'StringTypeAnnotation': + return 'NSString *'; + default: + (typeAnnotation.type: empty); + throw new Error('Received invalid param type annotation'); + } +} + +function getObjCExpectedKindParamType(param: Param): string { + const {typeAnnotation} = param; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return '[NSNumber class]'; + default: + (typeAnnotation.name: empty); + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return '[NSNumber class]'; + case 'DoubleTypeAnnotation': + return '[NSNumber class]'; + case 'FloatTypeAnnotation': + return '[NSNumber class]'; + case 'Int32TypeAnnotation': + return '[NSNumber class]'; + case 'StringTypeAnnotation': + return '[NSString class]'; + default: + (typeAnnotation.type: empty); + throw new Error('Received invalid param type annotation'); + } +} + +function getReadableExpectedKindParamType(param: Param): string { + const {typeAnnotation} = param; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return 'double'; + default: + (typeAnnotation.name: empty); + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return 'boolean'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'float'; + case 'Int32TypeAnnotation': + return 'number'; + case 'StringTypeAnnotation': + return 'string'; + default: + (typeAnnotation.type: empty); + throw new Error('Received invalid param type annotation'); + } +} + +function getObjCRightHandAssignmentParamType( + param: Param, + index: number, +): string { + const {typeAnnotation} = param; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return `[(NSNumber *)arg${index} doubleValue]`; + default: + (typeAnnotation.name: empty); + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return `[(NSNumber *)arg${index} boolValue]`; + case 'DoubleTypeAnnotation': + return `[(NSNumber *)arg${index} doubleValue]`; + case 'FloatTypeAnnotation': + return `[(NSNumber *)arg${index} floatValue]`; + case 'Int32TypeAnnotation': + return `[(NSNumber *)arg${index} intValue]`; + case 'StringTypeAnnotation': + return `(NSString *)arg${index}`; + default: + (typeAnnotation.type: empty); + throw new Error('Received invalid param type annotation'); + } +} + +function generateProtocol( + component: ComponentShape, + componentName: string, +): string { + const methods = component.commands + .map(command => { + const params = command.typeAnnotation.params; + const paramString = + params.length === 0 + ? '' + : params + .map((param, index) => { + const objCType = getObjCParamType(param); + + return `${index === 0 ? '' : param.name}:(${objCType})${ + param.name + }`; + }) + .join(' '); + return `- (void)${command.name}${paramString};`; + }) + .join('\n') + .trim(); + + return ProtocolTemplate({ + componentName, + methods, + }); +} + +function generateConvertAndValidateParam( + param: Param, + index: number, + componentName: string, +): string { + const leftSideType = getObjCParamType(param); + const expectedKind = getObjCExpectedKindParamType(param); + const expectedKindString = getReadableExpectedKindParamType(param); + const argConversion = `${leftSideType} ${ + param.name + } = ${getObjCRightHandAssignmentParamType(param, index)};`; + + return CommandHandlerIfCaseConvertArgTemplate({ + componentName, + argConversion, + argNumber: index, + argNumberString: getOrdinalNumber(index + 1), + expectedKind, + expectedKindString, + }); +} + +function generateCommandIfCase( + command: NamedShape, + componentName: string, +) { + const params = command.typeAnnotation.params; + + const convertArgs = params + .map((param, index) => + generateConvertAndValidateParam(param, index, componentName), + ) + .join('\n\n') + .trim(); + + const commandCallArgs = + params.length === 0 + ? '' + : params + .map((param, index) => { + return `${index === 0 ? '' : param.name}:${param.name}`; + }) + .join(' '); + const commandCall = `[componentView ${command.name}${commandCallArgs}];`; + + return CommandHandlerIfCaseTemplate({ + componentName, + commandName: command.name, + numArgs: params.length, + convertArgs, + commandCall, + }); +} + +function generateCommandHandler( + component: ComponentShape, + componentName: string, +): ?string { + if (component.commands.length === 0) { + return null; + } + + const ifCases = component.commands + .map(command => generateCommandIfCase(command, componentName)) + .join('\n\n'); + + return CommandHandlerTemplate({ + componentName, + ifCases, + }); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'RCTComponentViewHelpers.h'; + + const componentContent = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('iOS') + ); + }) + .map(componentName => { + return [ + generateProtocol(components[componentName], componentName), + generateCommandHandler(components[componentName], componentName), + ] + .join('\n\n') + .trim(); + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + + const replacedTemplate = FileTemplate({ + componentContent, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js new file mode 100644 index 000000000000..6622d3f39dce --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js @@ -0,0 +1,389 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./CppHelpers'), + generateEventStructName = _require.generateEventStructName; +const _require2 = require('../Utils'), + indent = _require2.indent; + +// File path -> contents + +const FileTemplate = ({events, libraryName, extraIncludes}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateEventEmitterCpp.js + */ + +#include +${[...extraIncludes].join('\n')} + +namespace facebook { +namespace react { +${events} +} // namespace react +} // namespace facebook +`; +const ComponentTemplate = ({ + className, + eventName, + structName, + dispatchEventName, + implementation, +}) => { + const capture = implementation.includes('$event') + ? '$event=std::move($event)' + : ''; + return ` +void ${className}EventEmitter::${eventName}(${structName} $event) const { + dispatchEvent("${dispatchEventName}", [${capture}](jsi::Runtime &runtime) { + ${implementation} + }); +} +`; +}; +const BasicComponentTemplate = ({className, eventName, dispatchEventName}) => + ` +void ${className}EventEmitter::${eventName}() const { + dispatchEvent("${dispatchEventName}"); +} +`.trim(); +function generateSetter( + variableName, + propertyName, + propertyParts, + usingEvent, + valueMapper = value => value, +) { + const eventChain = usingEvent + ? `$event.${[...propertyParts, propertyName].join('.')}` + : [propertyParts, propertyName].join('.'); + return `${variableName}.setProperty(runtime, "${propertyName}", ${valueMapper( + eventChain, + )});`; +} +function generateObjectSetter( + variableName, + propertyName, + propertyParts, + typeAnnotation, + extraIncludes, + usingEvent, +) { + return ` +{ + auto ${propertyName} = jsi::Object(runtime); + ${indent( + generateSetters( + propertyName, + typeAnnotation.properties, + propertyParts.concat([propertyName]), + extraIncludes, + usingEvent, + ), + 2, + )} + ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); +} +`.trim(); +} +function setValueAtIndex( + propertyName, + indexVariable, + loopLocalVariable, + mappingFunction = value => value, +) { + return `${propertyName}.setValueAtIndex(runtime, ${indexVariable}++, ${mappingFunction( + loopLocalVariable, + )});`; +} +function generateArraySetter( + variableName, + propertyName, + propertyParts, + elementType, + extraIncludes, + usingEvent, +) { + const eventChain = usingEvent + ? `$event.${[...propertyParts, propertyName].join('.')}` + : [propertyParts, propertyName].join('.'); + const indexVar = `${propertyName}Index`; + const innerLoopVar = `${propertyName}Value`; + return ` + auto ${propertyName} = jsi::Array(runtime, ${eventChain}.size()); + size_t ${indexVar} = 0; + for (auto ${innerLoopVar} : ${eventChain}) { + ${handleArrayElementType( + elementType, + propertyName, + indexVar, + innerLoopVar, + propertyParts, + extraIncludes, + usingEvent, + )} + } + ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); + `; +} +function handleArrayElementType( + elementType, + propertyName, + indexVariable, + loopLocalVariable, + propertyParts, + extraIncludes, + usingEvent, +) { + switch (elementType.type) { + case 'BooleanTypeAnnotation': + return setValueAtIndex( + propertyName, + indexVariable, + loopLocalVariable, + val => `(bool)${val}`, + ); + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + return setValueAtIndex(propertyName, indexVariable, loopLocalVariable); + case 'MixedTypeAnnotation': + return setValueAtIndex( + propertyName, + indexVariable, + loopLocalVariable, + val => `jsi::valueFromDynamic(runtime, ${val})`, + ); + case 'StringEnumTypeAnnotation': + return setValueAtIndex( + propertyName, + indexVariable, + loopLocalVariable, + val => `toString(${val})`, + ); + case 'ObjectTypeAnnotation': + return convertObjectTypeArray( + propertyName, + indexVariable, + loopLocalVariable, + propertyParts, + elementType, + extraIncludes, + ); + case 'ArrayTypeAnnotation': + return convertArrayTypeArray( + propertyName, + indexVariable, + loopLocalVariable, + propertyParts, + elementType, + extraIncludes, + usingEvent, + ); + default: + throw new Error( + `Received invalid elementType for array ${elementType.type}`, + ); + } +} +function convertObjectTypeArray( + propertyName, + indexVariable, + loopLocalVariable, + propertyParts, + objectTypeAnnotation, + extraIncludes, +) { + return `auto ${propertyName}Object = jsi::Object(runtime); + ${generateSetters( + `${propertyName}Object`, + objectTypeAnnotation.properties, + [].concat([loopLocalVariable]), + extraIncludes, + false, + )} + ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Object`)}`; +} +function convertArrayTypeArray( + propertyName, + indexVariable, + loopLocalVariable, + propertyParts, + eventTypeAnnotation, + extraIncludes, + usingEvent, +) { + if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { + throw new Error( + `Inconsistent eventTypeAnnotation received. Expected type = 'ArrayTypeAnnotation'; received = ${eventTypeAnnotation.type}`, + ); + } + return `auto ${propertyName}Array = jsi::Array(runtime, ${loopLocalVariable}.size()); + size_t ${indexVariable}Internal = 0; + for (auto ${loopLocalVariable}Internal : ${loopLocalVariable}) { + ${handleArrayElementType( + eventTypeAnnotation.elementType, + `${propertyName}Array`, + `${indexVariable}Internal`, + `${loopLocalVariable}Internal`, + propertyParts, + extraIncludes, + usingEvent, + )} + } + ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Array`)}`; +} +function generateSetters( + parentPropertyName, + properties, + propertyParts, + extraIncludes, + usingEvent = true, +) { + const propSetters = properties + .map(eventProperty => { + const typeAnnotation = eventProperty.typeAnnotation; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + return generateSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + usingEvent, + ); + case 'MixedTypeAnnotation': + extraIncludes.add('#include '); + return generateSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + usingEvent, + prop => `jsi::valueFromDynamic(runtime, ${prop})`, + ); + case 'StringEnumTypeAnnotation': + return generateSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + usingEvent, + prop => `toString(${prop})`, + ); + case 'ObjectTypeAnnotation': + return generateObjectSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + typeAnnotation, + extraIncludes, + usingEvent, + ); + case 'ArrayTypeAnnotation': + return generateArraySetter( + parentPropertyName, + eventProperty.name, + propertyParts, + typeAnnotation.elementType, + extraIncludes, + usingEvent, + ); + default: + typeAnnotation.type; + throw new Error( + `Received invalid event property type ${typeAnnotation.type}`, + ); + } + }) + .join('\n'); + return propSetters; +} +function generateEvent(componentName, event, extraIncludes) { + // This is a gross hack necessary because native code is sending + // events named things like topChange to JS which is then converted back to + // call the onChange prop. We should be consistent throughout the system. + // In order to migrate to this new system we have to support the current + // naming scheme. We should delete this once we are able to control this name + // throughout the system. + const dispatchEventName = `${event.name[2].toLowerCase()}${event.name.slice( + 3, + )}`; + if (event.typeAnnotation.argument) { + const implementation = ` + auto $payload = jsi::Object(runtime); + ${generateSetters( + '$payload', + event.typeAnnotation.argument.properties, + [], + extraIncludes, + )} + return $payload; + `.trim(); + if (!event.name.startsWith('on')) { + throw new Error('Expected the event name to start with `on`'); + } + return ComponentTemplate({ + className: componentName, + eventName: event.name, + dispatchEventName, + structName: generateEventStructName([event.name]), + implementation, + }); + } + return BasicComponentTemplate({ + className: componentName, + eventName: event.name, + dispatchEventName, + }); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const moduleComponents = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return components; + }) + .filter(Boolean) + .reduce((acc, components) => Object.assign(acc, components), {}); + const extraIncludes = new Set(); + const componentEmitters = Object.keys(moduleComponents) + .map(componentName => { + const component = moduleComponents[componentName]; + return component.events + .map(event => generateEvent(componentName, event, extraIncludes)) + .join('\n'); + }) + .join('\n'); + const fileName = 'EventEmitters.cpp'; + const replacedTemplate = FileTemplate({ + libraryName, + events: componentEmitters, + extraIncludes, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js.flow new file mode 100644 index 000000000000..7a43aea0a2b5 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterCpp.js.flow @@ -0,0 +1,455 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {EventTypeShape} from '../../CodegenSchema'; + +const {generateEventStructName} = require('./CppHelpers'); +const {indent} = require('../Utils'); + +import type { + ComponentShape, + NamedShape, + EventTypeAnnotation, + SchemaType, + ObjectTypeAnnotation, +} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +type ComponentCollection = $ReadOnly<{ + [component: string]: ComponentShape, + ... +}>; + +const FileTemplate = ({ + events, + libraryName, + extraIncludes, +}: { + events: string, + libraryName: string, + extraIncludes: Set, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateEventEmitterCpp.js + */ + +#include +${[...extraIncludes].join('\n')} + +namespace facebook { +namespace react { +${events} +} // namespace react +} // namespace facebook +`; + +const ComponentTemplate = ({ + className, + eventName, + structName, + dispatchEventName, + implementation, +}: { + className: string, + eventName: string, + structName: string, + dispatchEventName: string, + implementation: string, +}) => { + const capture = implementation.includes('$event') + ? '$event=std::move($event)' + : ''; + return ` +void ${className}EventEmitter::${eventName}(${structName} $event) const { + dispatchEvent("${dispatchEventName}", [${capture}](jsi::Runtime &runtime) { + ${implementation} + }); +} +`; +}; + +const BasicComponentTemplate = ({ + className, + eventName, + dispatchEventName, +}: { + className: string, + eventName: string, + dispatchEventName: string, +}) => + ` +void ${className}EventEmitter::${eventName}() const { + dispatchEvent("${dispatchEventName}"); +} +`.trim(); + +function generateSetter( + variableName: string, + propertyName: string, + propertyParts: $ReadOnlyArray, + usingEvent: boolean, + valueMapper: string => string = value => value, +) { + const eventChain = usingEvent + ? `$event.${[...propertyParts, propertyName].join('.')}` + : [propertyParts, propertyName].join('.'); + return `${variableName}.setProperty(runtime, "${propertyName}", ${valueMapper( + eventChain, + )});`; +} + +function generateObjectSetter( + variableName: string, + propertyName: string, + propertyParts: $ReadOnlyArray, + typeAnnotation: ObjectTypeAnnotation, + extraIncludes: Set, + usingEvent: boolean, +) { + return ` +{ + auto ${propertyName} = jsi::Object(runtime); + ${indent( + generateSetters( + propertyName, + typeAnnotation.properties, + propertyParts.concat([propertyName]), + extraIncludes, + usingEvent, + ), + 2, + )} + ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); +} +`.trim(); +} + +function setValueAtIndex( + propertyName: string, + indexVariable: string, + loopLocalVariable: string, + mappingFunction: string => string = value => value, +) { + return `${propertyName}.setValueAtIndex(runtime, ${indexVariable}++, ${mappingFunction( + loopLocalVariable, + )});`; +} + +function generateArraySetter( + variableName: string, + propertyName: string, + propertyParts: $ReadOnlyArray, + elementType: EventTypeAnnotation, + extraIncludes: Set, + usingEvent: boolean, +): string { + const eventChain = usingEvent + ? `$event.${[...propertyParts, propertyName].join('.')}` + : [propertyParts, propertyName].join('.'); + const indexVar = `${propertyName}Index`; + const innerLoopVar = `${propertyName}Value`; + return ` + auto ${propertyName} = jsi::Array(runtime, ${eventChain}.size()); + size_t ${indexVar} = 0; + for (auto ${innerLoopVar} : ${eventChain}) { + ${handleArrayElementType( + elementType, + propertyName, + indexVar, + innerLoopVar, + propertyParts, + extraIncludes, + usingEvent, + )} + } + ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); + `; +} + +function handleArrayElementType( + elementType: EventTypeAnnotation, + propertyName: string, + indexVariable: string, + loopLocalVariable: string, + propertyParts: $ReadOnlyArray, + extraIncludes: Set, + usingEvent: boolean, +): string { + switch (elementType.type) { + case 'BooleanTypeAnnotation': + return setValueAtIndex( + propertyName, + indexVariable, + loopLocalVariable, + val => `(bool)${val}`, + ); + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + return setValueAtIndex(propertyName, indexVariable, loopLocalVariable); + case 'MixedTypeAnnotation': + return setValueAtIndex( + propertyName, + indexVariable, + loopLocalVariable, + val => `jsi::valueFromDynamic(runtime, ${val})`, + ); + case 'StringEnumTypeAnnotation': + return setValueAtIndex( + propertyName, + indexVariable, + loopLocalVariable, + val => `toString(${val})`, + ); + case 'ObjectTypeAnnotation': + return convertObjectTypeArray( + propertyName, + indexVariable, + loopLocalVariable, + propertyParts, + elementType, + extraIncludes, + ); + case 'ArrayTypeAnnotation': + return convertArrayTypeArray( + propertyName, + indexVariable, + loopLocalVariable, + propertyParts, + elementType, + extraIncludes, + usingEvent, + ); + default: + throw new Error( + `Received invalid elementType for array ${elementType.type}`, + ); + } +} + +function convertObjectTypeArray( + propertyName: string, + indexVariable: string, + loopLocalVariable: string, + propertyParts: $ReadOnlyArray, + objectTypeAnnotation: ObjectTypeAnnotation, + extraIncludes: Set, +): string { + return `auto ${propertyName}Object = jsi::Object(runtime); + ${generateSetters( + `${propertyName}Object`, + objectTypeAnnotation.properties, + [].concat([loopLocalVariable]), + extraIncludes, + false, + )} + ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Object`)}`; +} + +function convertArrayTypeArray( + propertyName: string, + indexVariable: string, + loopLocalVariable: string, + propertyParts: $ReadOnlyArray, + eventTypeAnnotation: EventTypeAnnotation, + extraIncludes: Set, + usingEvent: boolean, +): string { + if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { + throw new Error( + `Inconsistent eventTypeAnnotation received. Expected type = 'ArrayTypeAnnotation'; received = ${eventTypeAnnotation.type}`, + ); + } + return `auto ${propertyName}Array = jsi::Array(runtime, ${loopLocalVariable}.size()); + size_t ${indexVariable}Internal = 0; + for (auto ${loopLocalVariable}Internal : ${loopLocalVariable}) { + ${handleArrayElementType( + eventTypeAnnotation.elementType, + `${propertyName}Array`, + `${indexVariable}Internal`, + `${loopLocalVariable}Internal`, + propertyParts, + extraIncludes, + usingEvent, + )} + } + ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Array`)}`; +} + +function generateSetters( + parentPropertyName: string, + properties: $ReadOnlyArray>, + propertyParts: $ReadOnlyArray, + extraIncludes: Set, + usingEvent: boolean = true, +): string { + const propSetters = properties + .map(eventProperty => { + const {typeAnnotation} = eventProperty; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + return generateSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + usingEvent, + ); + case 'MixedTypeAnnotation': + extraIncludes.add('#include '); + return generateSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + usingEvent, + prop => `jsi::valueFromDynamic(runtime, ${prop})`, + ); + case 'StringEnumTypeAnnotation': + return generateSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + usingEvent, + prop => `toString(${prop})`, + ); + case 'ObjectTypeAnnotation': + return generateObjectSetter( + parentPropertyName, + eventProperty.name, + propertyParts, + typeAnnotation, + extraIncludes, + usingEvent, + ); + case 'ArrayTypeAnnotation': + return generateArraySetter( + parentPropertyName, + eventProperty.name, + propertyParts, + typeAnnotation.elementType, + extraIncludes, + usingEvent, + ); + default: + (typeAnnotation.type: empty); + throw new Error( + `Received invalid event property type ${typeAnnotation.type}`, + ); + } + }) + .join('\n'); + + return propSetters; +} + +function generateEvent( + componentName: string, + event: EventTypeShape, + extraIncludes: Set, +): string { + // This is a gross hack necessary because native code is sending + // events named things like topChange to JS which is then converted back to + // call the onChange prop. We should be consistent throughout the system. + // In order to migrate to this new system we have to support the current + // naming scheme. We should delete this once we are able to control this name + // throughout the system. + const dispatchEventName = `${event.name[2].toLowerCase()}${event.name.slice( + 3, + )}`; + + if (event.typeAnnotation.argument) { + const implementation = ` + auto $payload = jsi::Object(runtime); + ${generateSetters( + '$payload', + event.typeAnnotation.argument.properties, + [], + extraIncludes, + )} + return $payload; + `.trim(); + + if (!event.name.startsWith('on')) { + throw new Error('Expected the event name to start with `on`'); + } + + return ComponentTemplate({ + className: componentName, + eventName: event.name, + dispatchEventName, + structName: generateEventStructName([event.name]), + implementation, + }); + } + + return BasicComponentTemplate({ + className: componentName, + eventName: event.name, + dispatchEventName, + }); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const moduleComponents: ComponentCollection = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return components; + }) + .filter(Boolean) + .reduce((acc, components) => Object.assign(acc, components), {}); + + const extraIncludes = new Set(); + const componentEmitters = Object.keys(moduleComponents) + .map(componentName => { + const component = moduleComponents[componentName]; + return component.events + .map(event => generateEvent(componentName, event, extraIncludes)) + .join('\n'); + }) + .join('\n'); + + const fileName = 'EventEmitters.cpp'; + const replacedTemplate = FileTemplate({ + libraryName, + events: componentEmitters, + extraIncludes, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js new file mode 100644 index 000000000000..aa2c458f7bb2 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js @@ -0,0 +1,276 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const nullthrows = require('nullthrows'); +const _require = require('./CppHelpers'), + getImports = _require.getImports, + getCppArrayTypeForAnnotation = _require.getCppArrayTypeForAnnotation, + getCppTypeForAnnotation = _require.getCppTypeForAnnotation, + generateEventStructName = _require.generateEventStructName; +const _require2 = require('../Utils'), + indent = _require2.indent, + toSafeCppString = _require2.toSafeCppString; + +// File path -> contents + +const FileTemplate = ({componentEmitters, extraIncludes}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateEventEmitterH.js + */ +#pragma once + +#include +${[...extraIncludes].join('\n')} + +namespace facebook { +namespace react { +${componentEmitters} +} // namespace react +} // namespace facebook +`; +const ComponentTemplate = ({className, structs, events}) => + ` +class ${className}EventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + ${structs} + ${events} +}; +`.trim(); +const StructTemplate = ({structName, fields}) => + ` + struct ${structName} { + ${fields} + }; +`.trim(); +const EnumTemplate = ({enumName, values, toCases}) => + `enum class ${enumName} { + ${values} +}; + +static char const *toString(const ${enumName} value) { + switch (value) { + ${toCases} + } +} +`.trim(); +function getNativeTypeFromAnnotation(componentName, eventProperty, nameParts) { + const type = eventProperty.typeAnnotation.type; + switch (type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'MixedTypeAnnotation': + return getCppTypeForAnnotation(type); + case 'StringEnumTypeAnnotation': + case 'ObjectTypeAnnotation': + return generateEventStructName([...nameParts, eventProperty.name]); + case 'ArrayTypeAnnotation': + const eventTypeAnnotation = eventProperty.typeAnnotation; + if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { + throw new Error( + "Inconsistent Codegen state: type was ArrayTypeAnnotation at the beginning of the body and now it isn't", + ); + } + return getCppArrayTypeForAnnotation(eventTypeAnnotation.elementType, [ + ...nameParts, + eventProperty.name, + ]); + default: + type; + throw new Error(`Received invalid event property type ${type}`); + } +} +function generateEnum(structs, options, nameParts) { + const structName = generateEventStructName(nameParts); + const fields = options + .map((option, index) => `${toSafeCppString(option)}`) + .join(',\n '); + const toCases = options + .map( + option => + `case ${structName}::${toSafeCppString(option)}: return "${option}";`, + ) + .join('\n' + ' '); + structs.set( + structName, + EnumTemplate({ + enumName: structName, + values: fields, + toCases: toCases, + }), + ); +} +function handleGenerateStructForArray( + structs, + name, + componentName, + elementType, + nameParts, +) { + if (elementType.type === 'ObjectTypeAnnotation') { + generateStruct( + structs, + componentName, + nameParts.concat([name]), + nullthrows(elementType.properties), + ); + } else if (elementType.type === 'StringEnumTypeAnnotation') { + generateEnum(structs, elementType.options, nameParts.concat([name])); + } else if (elementType.type === 'ArrayTypeAnnotation') { + handleGenerateStructForArray( + structs, + name, + componentName, + elementType.elementType, + nameParts, + ); + } +} +function generateStruct(structs, componentName, nameParts, properties) { + const structNameParts = nameParts; + const structName = generateEventStructName(structNameParts); + const fields = properties + .map(property => { + return `${getNativeTypeFromAnnotation( + componentName, + property, + structNameParts, + )} ${property.name};`; + }) + .join('\n' + ' '); + properties.forEach(property => { + const name = property.name, + typeAnnotation = property.typeAnnotation; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'MixedTypeAnnotation': + return; + case 'ArrayTypeAnnotation': + handleGenerateStructForArray( + structs, + name, + componentName, + typeAnnotation.elementType, + nameParts, + ); + return; + case 'ObjectTypeAnnotation': + generateStruct( + structs, + componentName, + nameParts.concat([name]), + nullthrows(typeAnnotation.properties), + ); + return; + case 'StringEnumTypeAnnotation': + generateEnum(structs, typeAnnotation.options, nameParts.concat([name])); + return; + default: + typeAnnotation.type; + throw new Error( + `Received invalid event property type ${typeAnnotation.type}`, + ); + } + }); + structs.set( + structName, + StructTemplate({ + structName, + fields, + }), + ); +} +function generateStructs(componentName, component) { + const structs = new Map(); + component.events.forEach(event => { + if (event.typeAnnotation.argument) { + generateStruct( + structs, + componentName, + [event.name], + event.typeAnnotation.argument.properties, + ); + } + }); + return Array.from(structs.values()).join('\n\n'); +} +function generateEvent(componentName, event) { + if (event.typeAnnotation.argument) { + const structName = generateEventStructName([event.name]); + return `void ${event.name}(${structName} value) const;`; + } + return `void ${event.name}() const;`; +} +function generateEvents(componentName, component) { + return component.events + .map(event => generateEvent(componentName, event)) + .join('\n\n' + ' '); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const moduleComponents = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return null; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return components; + }) + .filter(Boolean) + .reduce((acc, components) => Object.assign(acc, components), {}); + const extraIncludes = new Set(); + const componentEmitters = Object.keys(moduleComponents) + .map(componentName => { + const component = moduleComponents[componentName]; + component.events.forEach(event => { + if (event.typeAnnotation.argument) { + const argIncludes = getImports( + event.typeAnnotation.argument.properties, + ); + // $FlowFixMe[method-unbinding] + argIncludes.forEach(extraIncludes.add, extraIncludes); + } + }); + const replacedTemplate = ComponentTemplate({ + className: componentName, + structs: indent(generateStructs(componentName, component), 2), + events: generateEvents(componentName, component), + }); + return replacedTemplate; + }) + .join('\n'); + const fileName = 'EventEmitters.h'; + const replacedTemplate = FileTemplate({ + componentEmitters, + extraIncludes, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js.flow new file mode 100644 index 000000000000..b5d55033f063 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateEventEmitterH.js.flow @@ -0,0 +1,369 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +const nullthrows = require('nullthrows'); + +const { + getImports, + getCppArrayTypeForAnnotation, + getCppTypeForAnnotation, + generateEventStructName, +} = require('./CppHelpers'); +const {indent, toSafeCppString} = require('../Utils'); + +import type { + ComponentShape, + EventTypeShape, + NamedShape, + EventTypeAnnotation, + SchemaType, +} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; +type StructsMap = Map; + +type ComponentCollection = $ReadOnly<{ + [component: string]: ComponentShape, + ... +}>; + +const FileTemplate = ({ + componentEmitters, + extraIncludes, +}: { + componentEmitters: string, + extraIncludes: Set, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateEventEmitterH.js + */ +#pragma once + +#include +${[...extraIncludes].join('\n')} + +namespace facebook { +namespace react { +${componentEmitters} +} // namespace react +} // namespace facebook +`; + +const ComponentTemplate = ({ + className, + structs, + events, +}: { + className: string, + structs: string, + events: string, +}) => + ` +class ${className}EventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + ${structs} + ${events} +}; +`.trim(); + +const StructTemplate = ({ + structName, + fields, +}: { + structName: string, + fields: string, +}) => + ` + struct ${structName} { + ${fields} + }; +`.trim(); + +const EnumTemplate = ({ + enumName, + values, + toCases, +}: { + enumName: string, + values: string, + toCases: string, +}) => + `enum class ${enumName} { + ${values} +}; + +static char const *toString(const ${enumName} value) { + switch (value) { + ${toCases} + } +} +`.trim(); + +function getNativeTypeFromAnnotation( + componentName: string, + eventProperty: NamedShape, + nameParts: $ReadOnlyArray, +): string { + const {type} = eventProperty.typeAnnotation; + + switch (type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'MixedTypeAnnotation': + return getCppTypeForAnnotation(type); + case 'StringEnumTypeAnnotation': + case 'ObjectTypeAnnotation': + return generateEventStructName([...nameParts, eventProperty.name]); + case 'ArrayTypeAnnotation': + const eventTypeAnnotation = eventProperty.typeAnnotation; + if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { + throw new Error( + "Inconsistent Codegen state: type was ArrayTypeAnnotation at the beginning of the body and now it isn't", + ); + } + return getCppArrayTypeForAnnotation(eventTypeAnnotation.elementType, [ + ...nameParts, + eventProperty.name, + ]); + default: + (type: empty); + throw new Error(`Received invalid event property type ${type}`); + } +} +function generateEnum( + structs: StructsMap, + options: $ReadOnlyArray, + nameParts: Array, +) { + const structName = generateEventStructName(nameParts); + const fields = options + .map((option, index) => `${toSafeCppString(option)}`) + .join(',\n '); + + const toCases = options + .map( + option => + `case ${structName}::${toSafeCppString(option)}: return "${option}";`, + ) + .join('\n' + ' '); + + structs.set( + structName, + EnumTemplate({ + enumName: structName, + values: fields, + toCases: toCases, + }), + ); +} + +function handleGenerateStructForArray( + structs: StructsMap, + name: string, + componentName: string, + elementType: EventTypeAnnotation, + nameParts: $ReadOnlyArray, +): void { + if (elementType.type === 'ObjectTypeAnnotation') { + generateStruct( + structs, + componentName, + nameParts.concat([name]), + nullthrows(elementType.properties), + ); + } else if (elementType.type === 'StringEnumTypeAnnotation') { + generateEnum(structs, elementType.options, nameParts.concat([name])); + } else if (elementType.type === 'ArrayTypeAnnotation') { + handleGenerateStructForArray( + structs, + name, + componentName, + elementType.elementType, + nameParts, + ); + } +} + +function generateStruct( + structs: StructsMap, + componentName: string, + nameParts: $ReadOnlyArray, + properties: $ReadOnlyArray>, +): void { + const structNameParts = nameParts; + const structName = generateEventStructName(structNameParts); + + const fields = properties + .map(property => { + return `${getNativeTypeFromAnnotation( + componentName, + property, + structNameParts, + )} ${property.name};`; + }) + .join('\n' + ' '); + + properties.forEach(property => { + const {name, typeAnnotation} = property; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'MixedTypeAnnotation': + return; + case 'ArrayTypeAnnotation': + handleGenerateStructForArray( + structs, + name, + componentName, + typeAnnotation.elementType, + nameParts, + ); + return; + case 'ObjectTypeAnnotation': + generateStruct( + structs, + componentName, + nameParts.concat([name]), + nullthrows(typeAnnotation.properties), + ); + return; + case 'StringEnumTypeAnnotation': + generateEnum(structs, typeAnnotation.options, nameParts.concat([name])); + return; + default: + (typeAnnotation.type: empty); + throw new Error( + `Received invalid event property type ${typeAnnotation.type}`, + ); + } + }); + + structs.set( + structName, + StructTemplate({ + structName, + fields, + }), + ); +} + +function generateStructs( + componentName: string, + component: ComponentShape, +): string { + const structs: StructsMap = new Map(); + + component.events.forEach(event => { + if (event.typeAnnotation.argument) { + generateStruct( + structs, + componentName, + [event.name], + event.typeAnnotation.argument.properties, + ); + } + }); + + return Array.from(structs.values()).join('\n\n'); +} + +function generateEvent(componentName: string, event: EventTypeShape): string { + if (event.typeAnnotation.argument) { + const structName = generateEventStructName([event.name]); + + return `void ${event.name}(${structName} value) const;`; + } + + return `void ${event.name}() const;`; +} +function generateEvents( + componentName: string, + component: ComponentShape, +): string { + return component.events + .map(event => generateEvent(componentName, event)) + .join('\n\n' + ' '); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const moduleComponents: ComponentCollection = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return null; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return components; + }) + .filter(Boolean) + .reduce((acc, components) => Object.assign(acc, components), {}); + + const extraIncludes = new Set(); + const componentEmitters = Object.keys(moduleComponents) + .map(componentName => { + const component = moduleComponents[componentName]; + + component.events.forEach(event => { + if (event.typeAnnotation.argument) { + const argIncludes = getImports( + event.typeAnnotation.argument.properties, + ); + // $FlowFixMe[method-unbinding] + argIncludes.forEach(extraIncludes.add, extraIncludes); + } + }); + + const replacedTemplate = ComponentTemplate({ + className: componentName, + structs: indent(generateStructs(componentName, component), 2), + events: generateEvents(componentName, component), + }); + + return replacedTemplate; + }) + .join('\n'); + + const fileName = 'EventEmitters.h'; + const replacedTemplate = FileTemplate({ + componentEmitters, + extraIncludes, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js b/packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js new file mode 100644 index 000000000000..5830aba2e77b --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js @@ -0,0 +1,126 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./CppHelpers'), + convertDefaultTypeToString = _require.convertDefaultTypeToString, + getImports = _require.getImports; + +// File path -> contents + +const FileTemplate = ({libraryName, imports, componentClasses}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GeneratePropsCpp.js + */ + +#include +${imports} + +namespace facebook { +namespace react { + +${componentClasses} + +} // namespace react +} // namespace facebook +`; +const ComponentTemplate = ({className, extendClasses, props}) => + ` +${className}::${className}( + const PropsParserContext &context, + const ${className} &sourceProps, + const RawProps &rawProps):${extendClasses} + + ${props} + {} +`.trim(); +function generatePropsString(componentName, component) { + return component.props + .map(prop => { + const defaultValue = convertDefaultTypeToString(componentName, prop); + return `${prop.name}(convertRawProp(context, rawProps, "${prop.name}", sourceProps.${prop.name}, {${defaultValue}}))`; + }) + .join(',\n' + ' '); +} +function getClassExtendString(component) { + const extendString = + ' ' + + component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'ViewProps(context, sourceProps, rawProps)'; + default: + extendProps.knownTypeName; + throw new Error('Invalid knownTypeName'); + } + default: + extendProps.type; + throw new Error('Invalid extended type'); + } + }) + .join(', ') + + `${component.props.length > 0 ? ',' : ''}`; + return extendString; +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'Props.cpp'; + const allImports = new Set([ + '#include ', + '#include ', + ]); + const componentProps = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + const newName = `${componentName}Props`; + const propsString = generatePropsString(componentName, component); + const extendString = getClassExtendString(component); + const imports = getImports(component.props); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + imports.forEach(allImports.add, allImports); + const replacedTemplate = ComponentTemplate({ + className: newName, + extendClasses: extendString, + props: propsString, + }); + return replacedTemplate; + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + const replacedTemplate = FileTemplate({ + componentClasses: componentProps, + libraryName, + imports: Array.from(allImports).sort().join('\n').trim(), + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js.flow b/packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js.flow new file mode 100644 index 000000000000..ad9d6aac61f4 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsCpp.js.flow @@ -0,0 +1,161 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {ComponentShape, SchemaType} from '../../CodegenSchema'; +const {convertDefaultTypeToString, getImports} = require('./CppHelpers'); + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + libraryName, + imports, + componentClasses, +}: { + libraryName: string, + imports: string, + componentClasses: string, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GeneratePropsCpp.js + */ + +#include +${imports} + +namespace facebook { +namespace react { + +${componentClasses} + +} // namespace react +} // namespace facebook +`; + +const ComponentTemplate = ({ + className, + extendClasses, + props, +}: { + className: string, + extendClasses: string, + props: string, +}) => + ` +${className}::${className}( + const PropsParserContext &context, + const ${className} &sourceProps, + const RawProps &rawProps):${extendClasses} + + ${props} + {} +`.trim(); + +function generatePropsString(componentName: string, component: ComponentShape) { + return component.props + .map(prop => { + const defaultValue = convertDefaultTypeToString(componentName, prop); + return `${prop.name}(convertRawProp(context, rawProps, "${prop.name}", sourceProps.${prop.name}, {${defaultValue}}))`; + }) + .join(',\n' + ' '); +} + +function getClassExtendString(component: ComponentShape): string { + const extendString = + ' ' + + component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'ViewProps(context, sourceProps, rawProps)'; + default: + (extendProps.knownTypeName: empty); + throw new Error('Invalid knownTypeName'); + } + default: + (extendProps.type: empty); + throw new Error('Invalid extended type'); + } + }) + .join(', ') + + `${component.props.length > 0 ? ',' : ''}`; + + return extendString; +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'Props.cpp'; + const allImports: Set = new Set([ + '#include ', + '#include ', + ]); + + const componentProps = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + const newName = `${componentName}Props`; + + const propsString = generatePropsString(componentName, component); + const extendString = getClassExtendString(component); + + const imports = getImports(component.props); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + imports.forEach(allImports.add, allImports); + + const replacedTemplate = ComponentTemplate({ + className: newName, + extendClasses: extendString, + props: propsString, + }); + + return replacedTemplate; + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + + const replacedTemplate = FileTemplate({ + componentClasses: componentProps, + libraryName, + imports: Array.from(allImports).sort().join('\n').trim(), + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsH.js b/packages/react-native-codegen/lib/generators/components/GeneratePropsH.js new file mode 100644 index 000000000000..22a8b8f54408 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsH.js @@ -0,0 +1,609 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./ComponentsGeneratorUtils.js'), + getNativeTypeFromAnnotation = _require.getNativeTypeFromAnnotation, + getLocalImports = _require.getLocalImports; +const _require2 = require('./CppHelpers.js'), + convertDefaultTypeToString = _require2.convertDefaultTypeToString, + getEnumMaskName = _require2.getEnumMaskName, + generateStructName = _require2.generateStructName, + toIntEnumValueName = _require2.toIntEnumValueName; +const _require3 = require('../Utils'), + getEnumName = _require3.getEnumName, + toSafeCppString = _require3.toSafeCppString; + +// File path -> contents + +const FileTemplate = ({imports, componentClasses}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GeneratePropsH.js + */ +#pragma once + +${imports} + +namespace facebook { +namespace react { + +${componentClasses} + +} // namespace react +} // namespace facebook +`; +const ClassTemplate = ({enums, structs, className, props, extendClasses}) => + ` +${enums} +${structs} +class ${className} final${extendClasses} { + public: + ${className}() = default; + ${className}(const PropsParserContext& context, const ${className} &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + ${props} +}; +`.trim(); +const EnumTemplate = ({enumName, values, fromCases, toCases}) => + ` +enum class ${enumName} { ${values} }; + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { + auto string = (std::string)value; + ${fromCases} + abort(); +} + +static inline std::string toString(const ${enumName} &value) { + switch (value) { + ${toCases} + } +} +`.trim(); +const IntEnumTemplate = ({enumName, values, fromCases, toCases}) => + ` +enum class ${enumName} { ${values} }; + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { + assert(value.hasType()); + auto integerValue = (int)value; + switch (integerValue) {${fromCases} + } + abort(); +} + +static inline std::string toString(const ${enumName} &value) { + switch (value) { + ${toCases} + } +} +`.trim(); +const StructTemplate = ({structName, fields, fromCases}) => + `struct ${structName} { + ${fields} +}; + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${structName} &result) { + auto map = (std::unordered_map)value; + + ${fromCases} +} + +static inline std::string toString(const ${structName} &value) { + return "[Object ${structName}]"; +} +`.trim(); +const ArrayConversionFunctionTemplate = ({ + structName, +}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<${structName}> &result) { + auto items = (std::vector)value; + for (const auto &item : items) { + ${structName} newItem; + fromRawValue(context, item, newItem); + result.emplace_back(newItem); + } +} +`; +const DoubleArrayConversionFunctionTemplate = ({ + structName, +}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector> &result) { + auto items = (std::vector>)value; + for (const std::vector &item : items) { + auto nestedArray = std::vector<${structName}>{}; + for (const RawValue &nestedItem : item) { + ${structName} newItem; + fromRawValue(context, nestedItem, newItem); + nestedArray.emplace_back(newItem); + } + result.emplace_back(nestedArray); + } +} +`; +const ArrayEnumTemplate = ({enumName, enumMask, values, fromCases, toCases}) => + ` +using ${enumMask} = uint32_t; + +enum class ${enumName}: ${enumMask} { + ${values} +}; + +constexpr bool operator&( + ${enumMask} const lhs, + enum ${enumName} const rhs) { + return lhs & static_cast<${enumMask}>(rhs); +} + +constexpr ${enumMask} operator|( + ${enumMask} const lhs, + enum ${enumName} const rhs) { + return lhs | static_cast<${enumMask}>(rhs); +} + +constexpr void operator|=( + ${enumMask} &lhs, + enum ${enumName} const rhs) { + lhs = lhs | static_cast<${enumMask}>(rhs); +} + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumMask} &result) { + auto items = std::vector{value}; + for (const auto &item : items) { + ${fromCases} + abort(); + } +} + +static inline std::string toString(const ${enumMask} &value) { + auto result = std::string{}; + auto separator = std::string{", "}; + + ${toCases} + if (!result.empty()) { + result.erase(result.length() - separator.length()); + } + return result; +} +`.trim(); +function getClassExtendString(component) { + if (component.extendsProps.length === 0) { + throw new Error('Invalid: component.extendsProps is empty'); + } + const extendString = + ' : ' + + component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'public ViewProps'; + default: + extendProps.knownTypeName; + throw new Error('Invalid knownTypeName'); + } + default: + extendProps.type; + throw new Error('Invalid extended type'); + } + }) + .join(' '); + return extendString; +} +function convertValueToEnumOption(value) { + return toSafeCppString(value); +} +function generateArrayEnumString(componentName, name, options) { + const enumName = getEnumName(componentName, name); + const values = options + .map((option, index) => `${toSafeCppString(option)} = 1 << ${index}`) + .join(',\n '); + const fromCases = options + .map( + option => `if (item == "${option}") { + result |= ${enumName}::${toSafeCppString(option)}; + continue; + }`, + ) + .join('\n '); + const toCases = options + .map( + option => `if (value & ${enumName}::${toSafeCppString(option)}) { + result += "${option}" + separator; + }`, + ) + .join('\n' + ' '); + return ArrayEnumTemplate({ + enumName, + enumMask: getEnumMaskName(enumName), + values, + fromCases, + toCases, + }); +} +function generateStringEnum(componentName, prop) { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'StringEnumTypeAnnotation') { + const values = typeAnnotation.options; + const enumName = getEnumName(componentName, prop.name); + const fromCases = values + .map( + value => + `if (string == "${value}") { result = ${enumName}::${convertValueToEnumOption( + value, + )}; return; }`, + ) + .join('\n' + ' '); + const toCases = values + .map( + value => + `case ${enumName}::${convertValueToEnumOption( + value, + )}: return "${value}";`, + ) + .join('\n' + ' '); + return EnumTemplate({ + enumName, + values: values.map(toSafeCppString).join(', '), + fromCases: fromCases, + toCases: toCases, + }); + } + return ''; +} +function generateIntEnum(componentName, prop) { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'Int32EnumTypeAnnotation') { + const values = typeAnnotation.options; + const enumName = getEnumName(componentName, prop.name); + const fromCases = values + .map( + value => ` + case ${value}: + result = ${enumName}::${toIntEnumValueName(prop.name, value)}; + return;`, + ) + .join(''); + const toCases = values + .map( + value => + `case ${enumName}::${toIntEnumValueName( + prop.name, + value, + )}: return "${value}";`, + ) + .join('\n' + ' '); + const valueVariables = values + .map(val => `${toIntEnumValueName(prop.name, val)} = ${val}`) + .join(', '); + return IntEnumTemplate({ + enumName, + values: valueVariables, + fromCases, + toCases, + }); + } + return ''; +} +function generateEnumString(componentName, component) { + return component.props + .map(prop => { + if ( + prop.typeAnnotation.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.type === 'StringEnumTypeAnnotation' + ) { + return generateArrayEnumString( + componentName, + prop.name, + prop.typeAnnotation.elementType.options, + ); + } + if (prop.typeAnnotation.type === 'StringEnumTypeAnnotation') { + return generateStringEnum(componentName, prop); + } + if (prop.typeAnnotation.type === 'Int32EnumTypeAnnotation') { + return generateIntEnum(componentName, prop); + } + if (prop.typeAnnotation.type === 'ObjectTypeAnnotation') { + return prop.typeAnnotation.properties + .map(property => { + if (property.typeAnnotation.type === 'StringEnumTypeAnnotation') { + return generateStringEnum(componentName, property); + } else if ( + property.typeAnnotation.type === 'Int32EnumTypeAnnotation' + ) { + return generateIntEnum(componentName, property); + } + return null; + }) + .filter(Boolean) + .join('\n'); + } + }) + .filter(Boolean) + .join('\n'); +} +function generatePropsString(componentName, props) { + return props + .map(prop => { + const nativeType = getNativeTypeFromAnnotation(componentName, prop, []); + const defaultValue = convertDefaultTypeToString(componentName, prop); + return `${nativeType} ${prop.name}{${defaultValue}};`; + }) + .join('\n' + ' '); +} +function getExtendsImports(extendsProps) { + const imports = new Set(); + imports.add('#include '); + extendsProps.forEach(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + imports.add( + '#include ', + ); + return; + default: + extendProps.knownTypeName; + throw new Error('Invalid knownTypeName'); + } + default: + extendProps.type; + throw new Error('Invalid extended type'); + } + }); + return imports; +} +function generateStructsForComponent(componentName, component) { + const structs = generateStructs(componentName, component.props, []); + const structArray = Array.from(structs.values()); + if (structArray.length < 1) { + return ''; + } + return structArray.join('\n\n'); +} +function generateStructs(componentName, properties, nameParts) { + const structs = new Map(); + properties.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + // Recursively visit all of the object properties. + // Note: this is depth first so that the nested structs are ordered first. + const elementProperties = typeAnnotation.properties; + const nestedStructs = generateStructs( + componentName, + elementProperties, + nameParts.concat([prop.name]), + ); + nestedStructs.forEach(function (value, key) { + structs.set(key, value); + }); + generateStruct( + structs, + componentName, + nameParts.concat([prop.name]), + typeAnnotation.properties, + ); + } + if ( + prop.typeAnnotation.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.type === 'ObjectTypeAnnotation' + ) { + // Recursively visit all of the object properties. + // Note: this is depth first so that the nested structs are ordered first. + const elementProperties = prop.typeAnnotation.elementType.properties; + const nestedStructs = generateStructs( + componentName, + elementProperties, + nameParts.concat([prop.name]), + ); + nestedStructs.forEach(function (value, key) { + structs.set(key, value); + }); + + // Generate this struct and its conversion function. + generateStruct( + structs, + componentName, + nameParts.concat([prop.name]), + elementProperties, + ); + + // Generate the conversion function for std:vector. + // Note: This needs to be at the end since it references the struct above. + structs.set( + `${[componentName, ...nameParts.concat([prop.name])].join( + '', + )}ArrayStruct`, + ArrayConversionFunctionTemplate({ + structName: generateStructName( + componentName, + nameParts.concat([prop.name]), + ), + }), + ); + } + if ( + prop.typeAnnotation.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.elementType.type === + 'ObjectTypeAnnotation' + ) { + // Recursively visit all of the object properties. + // Note: this is depth first so that the nested structs are ordered first. + const elementProperties = + prop.typeAnnotation.elementType.elementType.properties; + const nestedStructs = generateStructs( + componentName, + elementProperties, + nameParts.concat([prop.name]), + ); + nestedStructs.forEach(function (value, key) { + structs.set(key, value); + }); + + // Generate this struct and its conversion function. + generateStruct( + structs, + componentName, + nameParts.concat([prop.name]), + elementProperties, + ); + + // Generate the conversion function for std:vector. + // Note: This needs to be at the end since it references the struct above. + structs.set( + `${[componentName, ...nameParts.concat([prop.name])].join( + '', + )}ArrayArrayStruct`, + DoubleArrayConversionFunctionTemplate({ + structName: generateStructName( + componentName, + nameParts.concat([prop.name]), + ), + }), + ); + } + }); + return structs; +} +function generateStruct(structs, componentName, nameParts, properties) { + const structNameParts = nameParts; + const structName = generateStructName(componentName, structNameParts); + const fields = properties + .map(property => { + return `${getNativeTypeFromAnnotation( + componentName, + property, + structNameParts, + )} ${property.name};`; + }) + .join('\n' + ' '); + properties.forEach(property => { + const name = property.name; + switch (property.typeAnnotation.type) { + case 'BooleanTypeAnnotation': + return; + case 'StringTypeAnnotation': + return; + case 'Int32TypeAnnotation': + return; + case 'DoubleTypeAnnotation': + return; + case 'FloatTypeAnnotation': + return; + case 'ReservedPropTypeAnnotation': + return; + case 'ArrayTypeAnnotation': + return; + case 'StringEnumTypeAnnotation': + return; + case 'Int32EnumTypeAnnotation': + return; + case 'ObjectTypeAnnotation': + const props = property.typeAnnotation.properties; + if (props == null) { + throw new Error( + `Properties are expected for ObjectTypeAnnotation (see ${name} in ${componentName})`, + ); + } + generateStruct(structs, componentName, nameParts.concat([name]), props); + return; + case 'MixedTypeAnnotation': + return; + default: + property.typeAnnotation.type; + throw new Error( + `Received invalid component property type ${property.typeAnnotation.type}`, + ); + } + }); + const fromCases = properties + .map(property => { + const variable = 'tmp_' + property.name; + return `auto ${variable} = map.find("${property.name}"); + if (${variable} != map.end()) { + fromRawValue(context, ${variable}->second, result.${property.name}); + }`; + }) + .join('\n '); + structs.set( + structName, + StructTemplate({ + structName, + fields, + fromCases, + }), + ); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'Props.h'; + const allImports = new Set(); + const componentClasses = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + const newName = `${componentName}Props`; + const structString = generateStructsForComponent( + componentName, + component, + ); + const enumString = generateEnumString(componentName, component); + const propsString = generatePropsString( + componentName, + component.props, + ); + const extendString = getClassExtendString(component); + const extendsImports = getExtendsImports(component.extendsProps); + const imports = getLocalImports(component.props); + + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + extendsImports.forEach(allImports.add, allImports); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + imports.forEach(allImports.add, allImports); + const replacedTemplate = ClassTemplate({ + enums: enumString, + structs: structString, + className: newName, + extendClasses: extendString, + props: propsString, + }); + return replacedTemplate; + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + const replacedTemplate = FileTemplate({ + componentClasses, + imports: Array.from(allImports).sort().join('\n'), + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsH.js.flow b/packages/react-native-codegen/lib/generators/components/GeneratePropsH.js.flow new file mode 100644 index 000000000000..479c82cd50aa --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsH.js.flow @@ -0,0 +1,777 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {ComponentShape} from '../../CodegenSchema'; + +const { + getNativeTypeFromAnnotation, + getLocalImports, +} = require('./ComponentsGeneratorUtils.js'); + +const { + convertDefaultTypeToString, + getEnumMaskName, + generateStructName, + toIntEnumValueName, +} = require('./CppHelpers.js'); + +const {getEnumName, toSafeCppString} = require('../Utils'); + +import type { + ExtendsPropsShape, + NamedShape, + PropTypeAnnotation, + SchemaType, +} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; +type StructsMap = Map; + +const FileTemplate = ({ + imports, + componentClasses, +}: { + imports: string, + componentClasses: string, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GeneratePropsH.js + */ +#pragma once + +${imports} + +namespace facebook { +namespace react { + +${componentClasses} + +} // namespace react +} // namespace facebook +`; + +const ClassTemplate = ({ + enums, + structs, + className, + props, + extendClasses, +}: { + enums: string, + structs: string, + className: string, + props: string, + extendClasses: string, +}) => + ` +${enums} +${structs} +class ${className} final${extendClasses} { + public: + ${className}() = default; + ${className}(const PropsParserContext& context, const ${className} &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + ${props} +}; +`.trim(); + +const EnumTemplate = ({ + enumName, + values, + fromCases, + toCases, +}: { + enumName: string, + values: string, + fromCases: string, + toCases: string, +}) => + ` +enum class ${enumName} { ${values} }; + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { + auto string = (std::string)value; + ${fromCases} + abort(); +} + +static inline std::string toString(const ${enumName} &value) { + switch (value) { + ${toCases} + } +} +`.trim(); + +const IntEnumTemplate = ({ + enumName, + values, + fromCases, + toCases, +}: { + enumName: string, + values: string, + fromCases: string, + toCases: string, +}) => + ` +enum class ${enumName} { ${values} }; + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { + assert(value.hasType()); + auto integerValue = (int)value; + switch (integerValue) {${fromCases} + } + abort(); +} + +static inline std::string toString(const ${enumName} &value) { + switch (value) { + ${toCases} + } +} +`.trim(); + +const StructTemplate = ({ + structName, + fields, + fromCases, +}: { + structName: string, + fields: string, + fromCases: string, +}) => + `struct ${structName} { + ${fields} +}; + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${structName} &result) { + auto map = (std::unordered_map)value; + + ${fromCases} +} + +static inline std::string toString(const ${structName} &value) { + return "[Object ${structName}]"; +} +`.trim(); + +const ArrayConversionFunctionTemplate = ({ + structName, +}: { + structName: string, +}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<${structName}> &result) { + auto items = (std::vector)value; + for (const auto &item : items) { + ${structName} newItem; + fromRawValue(context, item, newItem); + result.emplace_back(newItem); + } +} +`; + +const DoubleArrayConversionFunctionTemplate = ({ + structName, +}: { + structName: string, +}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector> &result) { + auto items = (std::vector>)value; + for (const std::vector &item : items) { + auto nestedArray = std::vector<${structName}>{}; + for (const RawValue &nestedItem : item) { + ${structName} newItem; + fromRawValue(context, nestedItem, newItem); + nestedArray.emplace_back(newItem); + } + result.emplace_back(nestedArray); + } +} +`; + +const ArrayEnumTemplate = ({ + enumName, + enumMask, + values, + fromCases, + toCases, +}: { + enumName: string, + enumMask: string, + values: string, + fromCases: string, + toCases: string, +}) => + ` +using ${enumMask} = uint32_t; + +enum class ${enumName}: ${enumMask} { + ${values} +}; + +constexpr bool operator&( + ${enumMask} const lhs, + enum ${enumName} const rhs) { + return lhs & static_cast<${enumMask}>(rhs); +} + +constexpr ${enumMask} operator|( + ${enumMask} const lhs, + enum ${enumName} const rhs) { + return lhs | static_cast<${enumMask}>(rhs); +} + +constexpr void operator|=( + ${enumMask} &lhs, + enum ${enumName} const rhs) { + lhs = lhs | static_cast<${enumMask}>(rhs); +} + +static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumMask} &result) { + auto items = std::vector{value}; + for (const auto &item : items) { + ${fromCases} + abort(); + } +} + +static inline std::string toString(const ${enumMask} &value) { + auto result = std::string{}; + auto separator = std::string{", "}; + + ${toCases} + if (!result.empty()) { + result.erase(result.length() - separator.length()); + } + return result; +} +`.trim(); + +function getClassExtendString(component: ComponentShape): string { + if (component.extendsProps.length === 0) { + throw new Error('Invalid: component.extendsProps is empty'); + } + const extendString = + ' : ' + + component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'public ViewProps'; + default: + (extendProps.knownTypeName: empty); + throw new Error('Invalid knownTypeName'); + } + default: + (extendProps.type: empty); + throw new Error('Invalid extended type'); + } + }) + .join(' '); + + return extendString; +} + +function convertValueToEnumOption(value: string): string { + return toSafeCppString(value); +} + +function generateArrayEnumString( + componentName: string, + name: string, + options: $ReadOnlyArray, +): string { + const enumName = getEnumName(componentName, name); + + const values = options + .map((option, index) => `${toSafeCppString(option)} = 1 << ${index}`) + .join(',\n '); + + const fromCases = options + .map( + option => + `if (item == "${option}") { + result |= ${enumName}::${toSafeCppString(option)}; + continue; + }`, + ) + .join('\n '); + + const toCases = options + .map( + option => + `if (value & ${enumName}::${toSafeCppString(option)}) { + result += "${option}" + separator; + }`, + ) + .join('\n' + ' '); + + return ArrayEnumTemplate({ + enumName, + enumMask: getEnumMaskName(enumName), + values, + fromCases, + toCases, + }); +} + +function generateStringEnum( + componentName: string, + prop: NamedShape, +) { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'StringEnumTypeAnnotation') { + const values: $ReadOnlyArray = typeAnnotation.options; + const enumName = getEnumName(componentName, prop.name); + + const fromCases = values + .map( + value => + `if (string == "${value}") { result = ${enumName}::${convertValueToEnumOption( + value, + )}; return; }`, + ) + .join('\n' + ' '); + + const toCases = values + .map( + value => + `case ${enumName}::${convertValueToEnumOption( + value, + )}: return "${value}";`, + ) + .join('\n' + ' '); + + return EnumTemplate({ + enumName, + values: values.map(toSafeCppString).join(', '), + fromCases: fromCases, + toCases: toCases, + }); + } + + return ''; +} + +function generateIntEnum( + componentName: string, + prop: NamedShape, +) { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'Int32EnumTypeAnnotation') { + const values: $ReadOnlyArray = typeAnnotation.options; + const enumName = getEnumName(componentName, prop.name); + + const fromCases = values + .map( + value => + ` + case ${value}: + result = ${enumName}::${toIntEnumValueName(prop.name, value)}; + return;`, + ) + .join(''); + + const toCases = values + .map( + value => + `case ${enumName}::${toIntEnumValueName( + prop.name, + value, + )}: return "${value}";`, + ) + .join('\n' + ' '); + + const valueVariables = values + .map(val => `${toIntEnumValueName(prop.name, val)} = ${val}`) + .join(', '); + + return IntEnumTemplate({ + enumName, + values: valueVariables, + fromCases, + toCases, + }); + } + + return ''; +} + +function generateEnumString( + componentName: string, + component: ComponentShape, +): string { + return component.props + .map(prop => { + if ( + prop.typeAnnotation.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.type === 'StringEnumTypeAnnotation' + ) { + return generateArrayEnumString( + componentName, + prop.name, + prop.typeAnnotation.elementType.options, + ); + } + + if (prop.typeAnnotation.type === 'StringEnumTypeAnnotation') { + return generateStringEnum(componentName, prop); + } + + if (prop.typeAnnotation.type === 'Int32EnumTypeAnnotation') { + return generateIntEnum(componentName, prop); + } + + if (prop.typeAnnotation.type === 'ObjectTypeAnnotation') { + return prop.typeAnnotation.properties + .map(property => { + if (property.typeAnnotation.type === 'StringEnumTypeAnnotation') { + return generateStringEnum(componentName, property); + } else if ( + property.typeAnnotation.type === 'Int32EnumTypeAnnotation' + ) { + return generateIntEnum(componentName, property); + } + return null; + }) + .filter(Boolean) + .join('\n'); + } + }) + .filter(Boolean) + .join('\n'); +} + +function generatePropsString( + componentName: string, + props: $ReadOnlyArray>, +) { + return props + .map(prop => { + const nativeType = getNativeTypeFromAnnotation(componentName, prop, []); + const defaultValue = convertDefaultTypeToString(componentName, prop); + + return `${nativeType} ${prop.name}{${defaultValue}};`; + }) + .join('\n' + ' '); +} + +function getExtendsImports( + extendsProps: $ReadOnlyArray, +): Set { + const imports: Set = new Set(); + + imports.add('#include '); + + extendsProps.forEach(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + imports.add( + '#include ', + ); + return; + default: + (extendProps.knownTypeName: empty); + throw new Error('Invalid knownTypeName'); + } + default: + (extendProps.type: empty); + throw new Error('Invalid extended type'); + } + }); + + return imports; +} + +function generateStructsForComponent( + componentName: string, + component: ComponentShape, +): string { + const structs = generateStructs(componentName, component.props, []); + const structArray = Array.from(structs.values()); + if (structArray.length < 1) { + return ''; + } + return structArray.join('\n\n'); +} + +function generateStructs( + componentName: string, + properties: $ReadOnlyArray>, + nameParts: Array, +): StructsMap { + const structs: StructsMap = new Map(); + properties.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + // Recursively visit all of the object properties. + // Note: this is depth first so that the nested structs are ordered first. + const elementProperties = typeAnnotation.properties; + const nestedStructs = generateStructs( + componentName, + elementProperties, + nameParts.concat([prop.name]), + ); + nestedStructs.forEach(function (value, key) { + structs.set(key, value); + }); + + generateStruct( + structs, + componentName, + nameParts.concat([prop.name]), + typeAnnotation.properties, + ); + } + + if ( + prop.typeAnnotation.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.type === 'ObjectTypeAnnotation' + ) { + // Recursively visit all of the object properties. + // Note: this is depth first so that the nested structs are ordered first. + const elementProperties = prop.typeAnnotation.elementType.properties; + const nestedStructs = generateStructs( + componentName, + elementProperties, + nameParts.concat([prop.name]), + ); + nestedStructs.forEach(function (value, key) { + structs.set(key, value); + }); + + // Generate this struct and its conversion function. + generateStruct( + structs, + componentName, + nameParts.concat([prop.name]), + elementProperties, + ); + + // Generate the conversion function for std:vector. + // Note: This needs to be at the end since it references the struct above. + structs.set( + `${[componentName, ...nameParts.concat([prop.name])].join( + '', + )}ArrayStruct`, + ArrayConversionFunctionTemplate({ + structName: generateStructName( + componentName, + nameParts.concat([prop.name]), + ), + }), + ); + } + if ( + prop.typeAnnotation.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.type === 'ArrayTypeAnnotation' && + prop.typeAnnotation.elementType.elementType.type === + 'ObjectTypeAnnotation' + ) { + // Recursively visit all of the object properties. + // Note: this is depth first so that the nested structs are ordered first. + const elementProperties = + prop.typeAnnotation.elementType.elementType.properties; + const nestedStructs = generateStructs( + componentName, + elementProperties, + nameParts.concat([prop.name]), + ); + nestedStructs.forEach(function (value, key) { + structs.set(key, value); + }); + + // Generate this struct and its conversion function. + generateStruct( + structs, + componentName, + nameParts.concat([prop.name]), + elementProperties, + ); + + // Generate the conversion function for std:vector. + // Note: This needs to be at the end since it references the struct above. + structs.set( + `${[componentName, ...nameParts.concat([prop.name])].join( + '', + )}ArrayArrayStruct`, + DoubleArrayConversionFunctionTemplate({ + structName: generateStructName( + componentName, + nameParts.concat([prop.name]), + ), + }), + ); + } + }); + + return structs; +} + +function generateStruct( + structs: StructsMap, + componentName: string, + nameParts: $ReadOnlyArray, + properties: $ReadOnlyArray>, +): void { + const structNameParts = nameParts; + const structName = generateStructName(componentName, structNameParts); + + const fields = properties + .map(property => { + return `${getNativeTypeFromAnnotation( + componentName, + property, + structNameParts, + )} ${property.name};`; + }) + .join('\n' + ' '); + + properties.forEach((property: NamedShape) => { + const name = property.name; + switch (property.typeAnnotation.type) { + case 'BooleanTypeAnnotation': + return; + case 'StringTypeAnnotation': + return; + case 'Int32TypeAnnotation': + return; + case 'DoubleTypeAnnotation': + return; + case 'FloatTypeAnnotation': + return; + case 'ReservedPropTypeAnnotation': + return; + case 'ArrayTypeAnnotation': + return; + case 'StringEnumTypeAnnotation': + return; + case 'Int32EnumTypeAnnotation': + return; + case 'ObjectTypeAnnotation': + const props = property.typeAnnotation.properties; + if (props == null) { + throw new Error( + `Properties are expected for ObjectTypeAnnotation (see ${name} in ${componentName})`, + ); + } + generateStruct(structs, componentName, nameParts.concat([name]), props); + return; + case 'MixedTypeAnnotation': + return; + default: + (property.typeAnnotation.type: empty); + throw new Error( + `Received invalid component property type ${property.typeAnnotation.type}`, + ); + } + }); + + const fromCases = properties + .map(property => { + const variable = 'tmp_' + property.name; + return `auto ${variable} = map.find("${property.name}"); + if (${variable} != map.end()) { + fromRawValue(context, ${variable}->second, result.${property.name}); + }`; + }) + .join('\n '); + + structs.set( + structName, + StructTemplate({ + structName, + fields, + fromCases, + }), + ); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'Props.h'; + + const allImports: Set = new Set(); + + const componentClasses = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + + const newName = `${componentName}Props`; + const structString = generateStructsForComponent( + componentName, + component, + ); + const enumString = generateEnumString(componentName, component); + const propsString = generatePropsString( + componentName, + component.props, + ); + const extendString = getClassExtendString(component); + const extendsImports = getExtendsImports(component.extendsProps); + const imports = getLocalImports(component.props); + + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + extendsImports.forEach(allImports.add, allImports); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + imports.forEach(allImports.add, allImports); + + const replacedTemplate = ClassTemplate({ + enums: enumString, + structs: structString, + className: newName, + extendClasses: extendString, + props: propsString, + }); + + return replacedTemplate; + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + + const replacedTemplate = FileTemplate({ + componentClasses, + imports: Array.from(allImports).sort().join('\n'), + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js new file mode 100644 index 000000000000..50fdc23ac882 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js @@ -0,0 +1,291 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./JavaHelpers'), + getImports = _require.getImports, + toSafeJavaString = _require.toSafeJavaString, + getInterfaceJavaClassName = _require.getInterfaceJavaClassName, + getDelegateJavaClassName = _require.getDelegateJavaClassName; + +// File path -> contents + +const FileTemplate = ({ + packageName, + imports, + className, + extendClasses, + interfaceClassName, + methods, +}) => `/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* ${'@'}generated by codegen project: GeneratePropsJavaDelegate.js +*/ + +package ${packageName}; + +${imports} + +public class ${className} & ${interfaceClassName}> extends BaseViewManagerDelegate { + public ${className}(U viewManager) { + super(viewManager); + } + ${methods} +} +`; +const PropSetterTemplate = ({propCases}) => + ` + @Override + public void setProperty(T view, String propName, @Nullable Object value) { + ${propCases} + } +`.trim(); +const CommandsTemplate = ({commandCases}) => + ` + @Override + public void receiveCommand(T view, String commandName, ReadableArray args) { + switch (commandName) { + ${commandCases} + } + } +`.trim(); +function getJavaValueForProp(prop, componentName) { + const typeAnnotation = prop.typeAnnotation; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + if (typeAnnotation.default === null) { + return 'value == null ? null : (Boolean) value'; + } else { + return `value == null ? ${typeAnnotation.default.toString()} : (boolean) value`; + } + case 'StringTypeAnnotation': + const defaultValueString = + typeAnnotation.default === null + ? 'null' + : `"${typeAnnotation.default}"`; + return `value == null ? ${defaultValueString} : (String) value`; + case 'Int32TypeAnnotation': + return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; + case 'DoubleTypeAnnotation': + if (prop.optional) { + return `value == null ? ${typeAnnotation.default}f : ((Double) value).doubleValue()`; + } else { + return 'value == null ? Double.NaN : ((Double) value).doubleValue()'; + } + case 'FloatTypeAnnotation': + if (typeAnnotation.default === null) { + return 'value == null ? null : ((Double) value).floatValue()'; + } else if (prop.optional) { + return `value == null ? ${typeAnnotation.default}f : ((Double) value).floatValue()`; + } else { + return 'value == null ? Float.NaN : ((Double) value).floatValue()'; + } + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return 'ColorPropConverter.getColor(value, view.getContext())'; + case 'ImageSourcePrimitive': + return '(ReadableMap) value'; + case 'ImageRequestPrimitive': + return '(ReadableMap) value'; + case 'PointPrimitive': + return '(ReadableMap) value'; + case 'EdgeInsetsPrimitive': + return '(ReadableMap) value'; + case 'DimensionPrimitive': + return 'DimensionPropConverter.getDimension(value)'; + default: + typeAnnotation.name; + throw new Error('Received unknown ReservedPropTypeAnnotation'); + } + case 'ArrayTypeAnnotation': { + return '(ReadableArray) value'; + } + case 'ObjectTypeAnnotation': { + return '(ReadableMap) value'; + } + case 'StringEnumTypeAnnotation': + return '(String) value'; + case 'Int32EnumTypeAnnotation': + return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; + case 'MixedTypeAnnotation': + return 'new DynamicFromObject(value)'; + default: + typeAnnotation; + throw new Error('Received invalid typeAnnotation'); + } +} +function generatePropCasesString(component, componentName) { + if (component.props.length === 0) { + return 'super.setProperty(view, propName, value);'; + } + const cases = component.props + .map(prop => { + return `case "${prop.name}": + mViewManager.set${toSafeJavaString( + prop.name, + )}(view, ${getJavaValueForProp(prop, componentName)}); + break;`; + }) + .join('\n' + ' '); + return `switch (propName) { + ${cases} + default: + super.setProperty(view, propName, value); + }`; +} +function getCommandArgJavaType(param, index) { + const typeAnnotation = param.typeAnnotation; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return `args.getDouble(${index})`; + default: + typeAnnotation.name; + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return `args.getBoolean(${index})`; + case 'DoubleTypeAnnotation': + return `args.getDouble(${index})`; + case 'FloatTypeAnnotation': + return `(float) args.getDouble(${index})`; + case 'Int32TypeAnnotation': + return `args.getInt(${index})`; + case 'StringTypeAnnotation': + return `args.getString(${index})`; + default: + typeAnnotation.type; + throw new Error(`Receieved invalid type: ${typeAnnotation.type}`); + } +} +function getCommandArguments(command) { + return [ + 'view', + ...command.typeAnnotation.params.map(getCommandArgJavaType), + ].join(', '); +} +function generateCommandCasesString(component, componentName) { + if (component.commands.length === 0) { + return null; + } + const commandMethods = component.commands + .map(command => { + return `case "${command.name}": + mViewManager.${toSafeJavaString( + command.name, + false, + )}(${getCommandArguments(command)}); + break;`; + }) + .join('\n' + ' '); + return commandMethods; +} +function getClassExtendString(component) { + const extendString = component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'View'; + default: + extendProps.knownTypeName; + throw new Error('Invalid knownTypeName'); + } + default: + extendProps.type; + throw new Error('Invalid extended type'); + } + }) + .join(''); + return extendString; +} +function getDelegateImports(component) { + const imports = getImports(component, 'delegate'); + // The delegate needs ReadableArray for commands always. + // The interface doesn't always need it + if (component.commands.length > 0) { + imports.add('import com.facebook.react.bridge.ReadableArray;'); + } + imports.add('import androidx.annotation.Nullable;'); + imports.add('import com.facebook.react.uimanager.BaseViewManagerDelegate;'); + imports.add('import com.facebook.react.uimanager.BaseViewManagerInterface;'); + return imports; +} +function generateMethods(propsString, commandsString) { + return [ + PropSetterTemplate({ + propCases: propsString, + }), + commandsString != null + ? CommandsTemplate({ + commandCases: commandsString, + }) + : '', + ] + .join('\n\n ') + .trimRight(); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + // TODO: This doesn't support custom package name yet. + const normalizedPackageName = 'com.facebook.react.viewmanagers'; + const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; + const files = new Map(); + Object.keys(schema.modules).forEach(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return; + } + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('android') + ); + }) + .forEach(componentName => { + const component = components[componentName]; + const className = getDelegateJavaClassName(componentName); + const interfaceClassName = getInterfaceJavaClassName(componentName); + const imports = getDelegateImports(component); + const propsString = generatePropCasesString(component, componentName); + const commandsString = generateCommandCasesString( + component, + componentName, + ); + const extendString = getClassExtendString(component); + const replacedTemplate = FileTemplate({ + imports: Array.from(imports).sort().join('\n'), + packageName: normalizedPackageName, + className, + extendClasses: extendString, + methods: generateMethods(propsString, commandsString), + interfaceClassName: interfaceClassName, + }); + files.set(`${outputDir}/${className}.java`, replacedTemplate); + }); + }); + return files; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js.flow b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js.flow new file mode 100644 index 000000000000..68875b3b6caa --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaDelegate.js.flow @@ -0,0 +1,352 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {CommandParamTypeAnnotation} from '../../CodegenSchema'; + +import type { + NamedShape, + CommandTypeAnnotation, + ComponentShape, + PropTypeAnnotation, + SchemaType, +} from '../../CodegenSchema'; +const { + getImports, + toSafeJavaString, + getInterfaceJavaClassName, + getDelegateJavaClassName, +} = require('./JavaHelpers'); + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + packageName, + imports, + className, + extendClasses, + interfaceClassName, + methods, +}: { + packageName: string, + imports: string, + className: string, + extendClasses: string, + interfaceClassName: string, + methods: string, +}) => `/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* ${'@'}generated by codegen project: GeneratePropsJavaDelegate.js +*/ + +package ${packageName}; + +${imports} + +public class ${className} & ${interfaceClassName}> extends BaseViewManagerDelegate { + public ${className}(U viewManager) { + super(viewManager); + } + ${methods} +} +`; + +const PropSetterTemplate = ({propCases}: {propCases: string}) => + ` + @Override + public void setProperty(T view, String propName, @Nullable Object value) { + ${propCases} + } +`.trim(); + +const CommandsTemplate = ({commandCases}: {commandCases: string}) => + ` + @Override + public void receiveCommand(T view, String commandName, ReadableArray args) { + switch (commandName) { + ${commandCases} + } + } +`.trim(); + +function getJavaValueForProp( + prop: NamedShape, + componentName: string, +): string { + const typeAnnotation = prop.typeAnnotation; + + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + if (typeAnnotation.default === null) { + return 'value == null ? null : (Boolean) value'; + } else { + return `value == null ? ${typeAnnotation.default.toString()} : (boolean) value`; + } + case 'StringTypeAnnotation': + const defaultValueString = + typeAnnotation.default === null + ? 'null' + : `"${typeAnnotation.default}"`; + return `value == null ? ${defaultValueString} : (String) value`; + case 'Int32TypeAnnotation': + return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; + case 'DoubleTypeAnnotation': + if (prop.optional) { + return `value == null ? ${typeAnnotation.default}f : ((Double) value).doubleValue()`; + } else { + return 'value == null ? Double.NaN : ((Double) value).doubleValue()'; + } + case 'FloatTypeAnnotation': + if (typeAnnotation.default === null) { + return 'value == null ? null : ((Double) value).floatValue()'; + } else if (prop.optional) { + return `value == null ? ${typeAnnotation.default}f : ((Double) value).floatValue()`; + } else { + return 'value == null ? Float.NaN : ((Double) value).floatValue()'; + } + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return 'ColorPropConverter.getColor(value, view.getContext())'; + case 'ImageSourcePrimitive': + return '(ReadableMap) value'; + case 'ImageRequestPrimitive': + return '(ReadableMap) value'; + case 'PointPrimitive': + return '(ReadableMap) value'; + case 'EdgeInsetsPrimitive': + return '(ReadableMap) value'; + case 'DimensionPrimitive': + return 'DimensionPropConverter.getDimension(value)'; + default: + (typeAnnotation.name: empty); + throw new Error('Received unknown ReservedPropTypeAnnotation'); + } + case 'ArrayTypeAnnotation': { + return '(ReadableArray) value'; + } + case 'ObjectTypeAnnotation': { + return '(ReadableMap) value'; + } + case 'StringEnumTypeAnnotation': + return '(String) value'; + case 'Int32EnumTypeAnnotation': + return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; + case 'MixedTypeAnnotation': + return 'new DynamicFromObject(value)'; + default: + (typeAnnotation: empty); + throw new Error('Received invalid typeAnnotation'); + } +} + +function generatePropCasesString( + component: ComponentShape, + componentName: string, +) { + if (component.props.length === 0) { + return 'super.setProperty(view, propName, value);'; + } + + const cases = component.props + .map(prop => { + return `case "${prop.name}": + mViewManager.set${toSafeJavaString( + prop.name, + )}(view, ${getJavaValueForProp(prop, componentName)}); + break;`; + }) + .join('\n' + ' '); + + return `switch (propName) { + ${cases} + default: + super.setProperty(view, propName, value); + }`; +} + +function getCommandArgJavaType( + param: NamedShape, + index: number, +) { + const {typeAnnotation} = param; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return `args.getDouble(${index})`; + default: + (typeAnnotation.name: empty); + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return `args.getBoolean(${index})`; + case 'DoubleTypeAnnotation': + return `args.getDouble(${index})`; + case 'FloatTypeAnnotation': + return `(float) args.getDouble(${index})`; + case 'Int32TypeAnnotation': + return `args.getInt(${index})`; + case 'StringTypeAnnotation': + return `args.getString(${index})`; + default: + (typeAnnotation.type: empty); + throw new Error(`Receieved invalid type: ${typeAnnotation.type}`); + } +} + +function getCommandArguments( + command: NamedShape, +): string { + return [ + 'view', + ...command.typeAnnotation.params.map(getCommandArgJavaType), + ].join(', '); +} + +function generateCommandCasesString( + component: ComponentShape, + componentName: string, +) { + if (component.commands.length === 0) { + return null; + } + + const commandMethods = component.commands + .map(command => { + return `case "${command.name}": + mViewManager.${toSafeJavaString( + command.name, + false, + )}(${getCommandArguments(command)}); + break;`; + }) + .join('\n' + ' '); + + return commandMethods; +} + +function getClassExtendString(component: ComponentShape): string { + const extendString = component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'View'; + default: + (extendProps.knownTypeName: empty); + throw new Error('Invalid knownTypeName'); + } + default: + (extendProps.type: empty); + throw new Error('Invalid extended type'); + } + }) + .join(''); + + return extendString; +} + +function getDelegateImports(component: ComponentShape) { + const imports = getImports(component, 'delegate'); + // The delegate needs ReadableArray for commands always. + // The interface doesn't always need it + if (component.commands.length > 0) { + imports.add('import com.facebook.react.bridge.ReadableArray;'); + } + imports.add('import androidx.annotation.Nullable;'); + imports.add('import com.facebook.react.uimanager.BaseViewManagerDelegate;'); + imports.add('import com.facebook.react.uimanager.BaseViewManagerInterface;'); + + return imports; +} + +function generateMethods( + propsString: string, + commandsString: null | string, +): string { + return [ + PropSetterTemplate({propCases: propsString}), + commandsString != null + ? CommandsTemplate({commandCases: commandsString}) + : '', + ] + .join('\n\n ') + .trimRight(); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + // TODO: This doesn't support custom package name yet. + const normalizedPackageName = 'com.facebook.react.viewmanagers'; + const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; + + const files = new Map(); + Object.keys(schema.modules).forEach(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return; + } + + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('android') + ); + }) + .forEach(componentName => { + const component = components[componentName]; + const className = getDelegateJavaClassName(componentName); + const interfaceClassName = getInterfaceJavaClassName(componentName); + + const imports = getDelegateImports(component); + const propsString = generatePropCasesString(component, componentName); + const commandsString = generateCommandCasesString( + component, + componentName, + ); + const extendString = getClassExtendString(component); + + const replacedTemplate = FileTemplate({ + imports: Array.from(imports).sort().join('\n'), + packageName: normalizedPackageName, + className, + extendClasses: extendString, + methods: generateMethods(propsString, commandsString), + interfaceClassName: interfaceClassName, + }); + + files.set(`${outputDir}/${className}.java`, replacedTemplate); + }); + }); + + return files; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js new file mode 100644 index 000000000000..96afa839dd13 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js @@ -0,0 +1,242 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./JavaHelpers'), + getImports = _require.getImports, + toSafeJavaString = _require.toSafeJavaString, + getInterfaceJavaClassName = _require.getInterfaceJavaClassName; + +// File path -> contents + +const FileTemplate = ({ + packageName, + imports, + className, + extendClasses, + methods, +}) => `/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* ${'@'}generated by codegen project: GeneratePropsJavaInterface.js +*/ + +package ${packageName}; + +${imports} + +public interface ${className} { + ${methods} +} +`; +function addNullable(imports) { + imports.add('import androidx.annotation.Nullable;'); +} +function getJavaValueForProp(prop, imports) { + const typeAnnotation = prop.typeAnnotation; + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + if (typeAnnotation.default === null) { + addNullable(imports); + return '@Nullable Boolean value'; + } else { + return 'boolean value'; + } + case 'StringTypeAnnotation': + addNullable(imports); + return '@Nullable String value'; + case 'Int32TypeAnnotation': + return 'int value'; + case 'DoubleTypeAnnotation': + return 'double value'; + case 'FloatTypeAnnotation': + if (typeAnnotation.default === null) { + addNullable(imports); + return '@Nullable Float value'; + } else { + return 'float value'; + } + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + addNullable(imports); + return '@Nullable Integer value'; + case 'ImageSourcePrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'ImageRequestPrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'PointPrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'EdgeInsetsPrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'DimensionPrimitive': + addNullable(imports); + return '@Nullable YogaValue value'; + default: + typeAnnotation.name; + throw new Error('Received unknown ReservedPropTypeAnnotation'); + } + case 'ArrayTypeAnnotation': { + addNullable(imports); + return '@Nullable ReadableArray value'; + } + case 'ObjectTypeAnnotation': { + addNullable(imports); + return '@Nullable ReadableMap value'; + } + case 'StringEnumTypeAnnotation': + addNullable(imports); + return '@Nullable String value'; + case 'Int32EnumTypeAnnotation': + addNullable(imports); + return '@Nullable Integer value'; + case 'MixedTypeAnnotation': + return 'Dynamic value'; + default: + typeAnnotation; + throw new Error('Received invalid typeAnnotation'); + } +} +function generatePropsString(component, imports) { + if (component.props.length === 0) { + return '// No props'; + } + return component.props + .map(prop => { + return `void set${toSafeJavaString( + prop.name, + )}(T view, ${getJavaValueForProp(prop, imports)});`; + }) + .join('\n' + ' '); +} +function getCommandArgJavaType(param) { + const typeAnnotation = param.typeAnnotation; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return 'double'; + default: + typeAnnotation.name; + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return 'boolean'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'float'; + case 'Int32TypeAnnotation': + return 'int'; + case 'StringTypeAnnotation': + return 'String'; + default: + typeAnnotation.type; + throw new Error('Receieved invalid typeAnnotation'); + } +} +function getCommandArguments(command, componentName) { + return [ + 'T view', + ...command.typeAnnotation.params.map(param => { + const commandArgJavaType = getCommandArgJavaType(param); + return `${commandArgJavaType} ${param.name}`; + }), + ].join(', '); +} +function generateCommandsString(component, componentName) { + return component.commands + .map(command => { + const safeJavaName = toSafeJavaString(command.name, false); + return `void ${safeJavaName}(${getCommandArguments( + command, + componentName, + )});`; + }) + .join('\n' + ' '); +} +function getClassExtendString(component) { + const extendString = component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'View'; + default: + extendProps.knownTypeName; + throw new Error('Invalid knownTypeName'); + } + default: + extendProps.type; + throw new Error('Invalid extended type'); + } + }) + .join(''); + return extendString; +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + // TODO: This doesn't support custom package name yet. + const normalizedPackageName = 'com.facebook.react.viewmanagers'; + const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; + const files = new Map(); + Object.keys(schema.modules).forEach(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + + // No components in this module + if (components == null) { + return; + } + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('android') + ); + }) + .forEach(componentName => { + const component = components[componentName]; + const className = getInterfaceJavaClassName(componentName); + const imports = getImports(component, 'interface'); + const propsString = generatePropsString(component, imports); + const commandsString = generateCommandsString( + component, + componentName, + ); + const extendString = getClassExtendString(component); + const replacedTemplate = FileTemplate({ + imports: Array.from(imports).sort().join('\n'), + packageName: normalizedPackageName, + className, + extendClasses: extendString, + methods: [propsString, commandsString] + .join('\n' + ' ') + .trimRight(), + }); + files.set(`${outputDir}/${className}.java`, replacedTemplate); + }); + }); + return files; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js.flow b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js.flow new file mode 100644 index 000000000000..a71f9b696ede --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaInterface.js.flow @@ -0,0 +1,293 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {CommandParamTypeAnnotation} from '../../CodegenSchema'; + +import type { + NamedShape, + CommandTypeAnnotation, + ComponentShape, + PropTypeAnnotation, + SchemaType, +} from '../../CodegenSchema'; +const { + getImports, + toSafeJavaString, + getInterfaceJavaClassName, +} = require('./JavaHelpers'); + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + packageName, + imports, + className, + extendClasses, + methods, +}: { + packageName: string, + imports: string, + className: string, + extendClasses: string, + methods: string, +}) => `/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* ${'@'}generated by codegen project: GeneratePropsJavaInterface.js +*/ + +package ${packageName}; + +${imports} + +public interface ${className} { + ${methods} +} +`; + +function addNullable(imports: Set) { + imports.add('import androidx.annotation.Nullable;'); +} + +function getJavaValueForProp( + prop: NamedShape, + imports: Set, +): string { + const typeAnnotation = prop.typeAnnotation; + + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + if (typeAnnotation.default === null) { + addNullable(imports); + return '@Nullable Boolean value'; + } else { + return 'boolean value'; + } + case 'StringTypeAnnotation': + addNullable(imports); + return '@Nullable String value'; + case 'Int32TypeAnnotation': + return 'int value'; + case 'DoubleTypeAnnotation': + return 'double value'; + case 'FloatTypeAnnotation': + if (typeAnnotation.default === null) { + addNullable(imports); + return '@Nullable Float value'; + } else { + return 'float value'; + } + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + addNullable(imports); + return '@Nullable Integer value'; + case 'ImageSourcePrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'ImageRequestPrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'PointPrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'EdgeInsetsPrimitive': + addNullable(imports); + return '@Nullable ReadableMap value'; + case 'DimensionPrimitive': + addNullable(imports); + return '@Nullable YogaValue value'; + default: + (typeAnnotation.name: empty); + throw new Error('Received unknown ReservedPropTypeAnnotation'); + } + case 'ArrayTypeAnnotation': { + addNullable(imports); + return '@Nullable ReadableArray value'; + } + case 'ObjectTypeAnnotation': { + addNullable(imports); + return '@Nullable ReadableMap value'; + } + case 'StringEnumTypeAnnotation': + addNullable(imports); + return '@Nullable String value'; + case 'Int32EnumTypeAnnotation': + addNullable(imports); + return '@Nullable Integer value'; + case 'MixedTypeAnnotation': + return 'Dynamic value'; + default: + (typeAnnotation: empty); + throw new Error('Received invalid typeAnnotation'); + } +} + +function generatePropsString(component: ComponentShape, imports: Set) { + if (component.props.length === 0) { + return '// No props'; + } + + return component.props + .map(prop => { + return `void set${toSafeJavaString( + prop.name, + )}(T view, ${getJavaValueForProp(prop, imports)});`; + }) + .join('\n' + ' '); +} + +function getCommandArgJavaType(param: NamedShape) { + const {typeAnnotation} = param; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return 'double'; + default: + (typeAnnotation.name: empty); + throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); + } + case 'BooleanTypeAnnotation': + return 'boolean'; + case 'DoubleTypeAnnotation': + return 'double'; + case 'FloatTypeAnnotation': + return 'float'; + case 'Int32TypeAnnotation': + return 'int'; + case 'StringTypeAnnotation': + return 'String'; + default: + (typeAnnotation.type: empty); + throw new Error('Receieved invalid typeAnnotation'); + } +} + +function getCommandArguments( + command: NamedShape, + componentName: string, +): string { + return [ + 'T view', + ...command.typeAnnotation.params.map(param => { + const commandArgJavaType = getCommandArgJavaType(param); + + return `${commandArgJavaType} ${param.name}`; + }), + ].join(', '); +} + +function generateCommandsString( + component: ComponentShape, + componentName: string, +) { + return component.commands + .map(command => { + const safeJavaName = toSafeJavaString(command.name, false); + + return `void ${safeJavaName}(${getCommandArguments( + command, + componentName, + )});`; + }) + .join('\n' + ' '); +} + +function getClassExtendString(component: ComponentShape): string { + const extendString = component.extendsProps + .map(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + return 'View'; + default: + (extendProps.knownTypeName: empty); + throw new Error('Invalid knownTypeName'); + } + default: + (extendProps.type: empty); + throw new Error('Invalid extended type'); + } + }) + .join(''); + + return extendString; +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + // TODO: This doesn't support custom package name yet. + const normalizedPackageName = 'com.facebook.react.viewmanagers'; + const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; + + const files = new Map(); + Object.keys(schema.modules).forEach(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + + // No components in this module + if (components == null) { + return; + } + + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('android') + ); + }) + .forEach(componentName => { + const component = components[componentName]; + const className = getInterfaceJavaClassName(componentName); + + const imports = getImports(component, 'interface'); + const propsString = generatePropsString(component, imports); + const commandsString = generateCommandsString( + component, + componentName, + ); + const extendString = getClassExtendString(component); + + const replacedTemplate = FileTemplate({ + imports: Array.from(imports).sort().join('\n'), + packageName: normalizedPackageName, + className, + extendClasses: extendString, + methods: [propsString, commandsString] + .join('\n' + ' ') + .trimRight(), + }); + + files.set(`${outputDir}/${className}.java`, replacedTemplate); + }); + }); + + return files; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js new file mode 100644 index 000000000000..d45e6a2b52f1 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js @@ -0,0 +1,149 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && + (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), + t.push.apply(t, o); + } + return t; +} +function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 + ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) + : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; +} +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +const _require = require('../../Utils'), + capitalize = _require.capitalize; +class PojoCollector { + constructor() { + _defineProperty(this, '_pojos', new Map()); + } + process(namespace, pojoName, typeAnnotation) { + switch (typeAnnotation.type) { + case 'ObjectTypeAnnotation': { + this._insertPojo(namespace, pojoName, typeAnnotation); + return { + type: 'PojoTypeAliasTypeAnnotation', + name: pojoName, + }; + } + case 'ArrayTypeAnnotation': { + const arrayTypeAnnotation = typeAnnotation; + const elementType = arrayTypeAnnotation.elementType; + const pojoElementType = (() => { + switch (elementType.type) { + case 'ObjectTypeAnnotation': { + this._insertPojo(namespace, `${pojoName}Element`, elementType); + return { + type: 'PojoTypeAliasTypeAnnotation', + name: `${pojoName}Element`, + }; + } + case 'ArrayTypeAnnotation': { + const objectTypeAnnotation = elementType.elementType; + this._insertPojo( + namespace, + `${pojoName}ElementElement`, + objectTypeAnnotation, + ); + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'PojoTypeAliasTypeAnnotation', + name: `${pojoName}ElementElement`, + }, + }; + } + default: { + return elementType; + } + } + })(); + return { + type: 'ArrayTypeAnnotation', + elementType: pojoElementType, + }; + } + default: + return typeAnnotation; + } + } + _insertPojo(namespace, pojoName, objectTypeAnnotation) { + const properties = objectTypeAnnotation.properties.map(property => { + const propertyPojoName = pojoName + capitalize(property.name); + return _objectSpread( + _objectSpread({}, property), + {}, + { + typeAnnotation: this.process( + namespace, + propertyPojoName, + property.typeAnnotation, + ), + }, + ); + }); + this._pojos.set(pojoName, { + name: pojoName, + namespace, + properties, + }); + } + getAllPojos() { + return [...this._pojos.values()]; + } +} +module.exports = PojoCollector; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow new file mode 100644 index 000000000000..7aaa6d297bf5 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow @@ -0,0 +1,187 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + ReservedPropTypeAnnotation, + NamedShape, + ObjectTypeAnnotation, + BooleanTypeAnnotation, + StringTypeAnnotation, + DoubleTypeAnnotation, + FloatTypeAnnotation, + Int32TypeAnnotation, + PropTypeAnnotation, + MixedTypeAnnotation, + ArrayTypeAnnotation, +} from '../../../CodegenSchema'; + +const {capitalize} = require('../../Utils'); + +export type Pojo = { + name: string, + namespace: string, + properties: $ReadOnlyArray, +}; + +export type PojoProperty = NamedShape; + +export type PojoTypeAliasAnnotation = { + type: 'PojoTypeAliasTypeAnnotation', + name: string, +}; + +export type PojoTypeAnnotation = + | $ReadOnly<{ + type: 'BooleanTypeAnnotation', + default: boolean | null, + }> + | $ReadOnly<{ + type: 'StringTypeAnnotation', + default: string | null, + }> + | $ReadOnly<{ + type: 'DoubleTypeAnnotation', + default: number, + }> + | $ReadOnly<{ + type: 'FloatTypeAnnotation', + default: number | null, + }> + | $ReadOnly<{ + type: 'Int32TypeAnnotation', + default: number, + }> + | $ReadOnly<{ + type: 'StringEnumTypeAnnotation', + default: string, + options: $ReadOnlyArray, + }> + | $ReadOnly<{ + type: 'Int32EnumTypeAnnotation', + default: number, + options: $ReadOnlyArray, + }> + | ReservedPropTypeAnnotation + | PojoTypeAliasAnnotation + | $ReadOnly<{ + type: 'ArrayTypeAnnotation', + elementType: + | BooleanTypeAnnotation + | StringTypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | Int32TypeAnnotation + | $ReadOnly<{ + type: 'StringEnumTypeAnnotation', + default: string, + options: $ReadOnlyArray, + }> + | PojoTypeAliasAnnotation + | ReservedPropTypeAnnotation + | $ReadOnly<{ + type: 'ArrayTypeAnnotation', + elementType: PojoTypeAliasAnnotation, + }>, + }> + | MixedTypeAnnotation; + +class PojoCollector { + _pojos: Map = new Map(); + process( + namespace: string, + pojoName: string, + typeAnnotation: PropTypeAnnotation, + ): PojoTypeAnnotation { + switch (typeAnnotation.type) { + case 'ObjectTypeAnnotation': { + this._insertPojo(namespace, pojoName, typeAnnotation); + return { + type: 'PojoTypeAliasTypeAnnotation', + name: pojoName, + }; + } + case 'ArrayTypeAnnotation': { + const arrayTypeAnnotation = typeAnnotation; + const elementType: $PropertyType = + arrayTypeAnnotation.elementType; + + const pojoElementType = (() => { + switch (elementType.type) { + case 'ObjectTypeAnnotation': { + this._insertPojo(namespace, `${pojoName}Element`, elementType); + return { + type: 'PojoTypeAliasTypeAnnotation', + name: `${pojoName}Element`, + }; + } + case 'ArrayTypeAnnotation': { + const {elementType: objectTypeAnnotation} = elementType; + this._insertPojo( + namespace, + `${pojoName}ElementElement`, + objectTypeAnnotation, + ); + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'PojoTypeAliasTypeAnnotation', + name: `${pojoName}ElementElement`, + }, + }; + } + default: { + return elementType; + } + } + })(); + + return { + type: 'ArrayTypeAnnotation', + elementType: pojoElementType, + }; + } + default: + return typeAnnotation; + } + } + + _insertPojo( + namespace: string, + pojoName: string, + objectTypeAnnotation: ObjectTypeAnnotation, + ) { + const properties = objectTypeAnnotation.properties.map(property => { + const propertyPojoName = pojoName + capitalize(property.name); + + return { + ...property, + typeAnnotation: this.process( + namespace, + propertyPojoName, + property.typeAnnotation, + ), + }; + }); + + this._pojos.set(pojoName, { + name: pojoName, + namespace, + properties, + }); + } + + getAllPojos(): $ReadOnlyArray { + return [...this._pojos.values()]; + } +} + +module.exports = PojoCollector; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js new file mode 100644 index 000000000000..a05e4aad2e09 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js @@ -0,0 +1,66 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const PojoCollector = require('./PojoCollector'); +const _require = require('../../Utils'), + capitalize = _require.capitalize; +const _require2 = require('./serializePojo'), + serializePojo = _require2.serializePojo; +module.exports = { + generate(libraryName, schema, packageName) { + const pojoCollector = new PojoCollector(); + const basePackageName = 'com.facebook.react.viewmanagers'; + Object.keys(schema.modules).forEach(hasteModuleName => { + const module = schema.modules[hasteModuleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('android') + ); + }) + .forEach(componentName => { + const component = components[componentName]; + if (component == null) { + return; + } + const props = component.props; + pojoCollector.process( + capitalize(hasteModuleName), + `${capitalize(componentName)}Props`, + { + type: 'ObjectTypeAnnotation', + properties: props, + }, + ); + }); + }); + const pojoDir = basePackageName.split('.').join('/'); + return new Map( + pojoCollector.getAllPojos().map(pojo => { + return [ + `java/${pojoDir}/${pojo.namespace}/${pojo.name}.java`, + serializePojo(pojo, basePackageName), + ]; + }), + ); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js.flow b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js.flow new file mode 100644 index 000000000000..66b11f26c8c3 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/index.js.flow @@ -0,0 +1,80 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../../CodegenSchema'; + +const PojoCollector = require('./PojoCollector'); +const {capitalize} = require('../../Utils'); +const {serializePojo} = require('./serializePojo'); + +type FilesOutput = Map; + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + ): FilesOutput { + const pojoCollector = new PojoCollector(); + const basePackageName = 'com.facebook.react.viewmanagers'; + + Object.keys(schema.modules).forEach(hasteModuleName => { + const module = schema.modules[hasteModuleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('android') + ); + }) + .forEach(componentName => { + const component = components[componentName]; + if (component == null) { + return; + } + + const {props} = component; + + pojoCollector.process( + capitalize(hasteModuleName), + `${capitalize(componentName)}Props`, + { + type: 'ObjectTypeAnnotation', + properties: props, + }, + ); + }); + }); + + const pojoDir = basePackageName.split('.').join('/'); + + return new Map( + pojoCollector.getAllPojos().map(pojo => { + return [ + `java/${pojoDir}/${pojo.namespace}/${pojo.name}.java`, + serializePojo(pojo, basePackageName), + ]; + }), + ); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js new file mode 100644 index 000000000000..8e7e5a95a9d1 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js @@ -0,0 +1,286 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../../Utils'), + capitalize = _require.capitalize; +function toJavaType(typeAnnotation, addImport) { + const importNullable = () => addImport('androidx.annotation.Nullable'); + const importReadableMap = () => + addImport('com.facebook.react.bridge.ReadableMap'); + const importArrayList = () => addImport('java.util.ArrayList'); + const importYogaValue = () => addImport('com.facebook.yoga.YogaValue'); + const importDynamic = () => addImport('com.facebook.react.bridge.Dynamic'); + switch (typeAnnotation.type) { + /** + * Primitives + */ + case 'BooleanTypeAnnotation': { + if (typeAnnotation.default === null) { + importNullable(); + return '@Nullable Boolean'; + } else { + return 'boolean'; + } + } + case 'StringTypeAnnotation': { + importNullable(); + return '@Nullable String'; + } + case 'DoubleTypeAnnotation': { + return 'double'; + } + case 'FloatTypeAnnotation': { + if (typeAnnotation.default === null) { + importNullable(); + return '@Nullable Float'; + } else { + return 'float'; + } + } + case 'Int32TypeAnnotation': { + return 'int'; + } + + /** + * Enums + */ + // TODO: Make StringEnumTypeAnnotation type-safe? + case 'StringEnumTypeAnnotation': + importNullable(); + return '@Nullable String'; + // TODO: Make Int32EnumTypeAnnotation type-safe? + case 'Int32EnumTypeAnnotation': + importNullable(); + return '@Nullable Integer'; + + /** + * Reserved types + */ + case 'ReservedPropTypeAnnotation': { + switch (typeAnnotation.name) { + case 'ColorPrimitive': + importNullable(); + return '@Nullable Integer'; + + // TODO: Make ImageSourcePrimitive type-safe + case 'ImageSourcePrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + + // TODO: Make ImageRequestPrimitive type-safe + case 'ImageRequestPrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + + // TODO: Make PointPrimitive type-safe + case 'PointPrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + + // TODO: Make EdgeInsetsPrimitive type-safe + case 'EdgeInsetsPrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + case 'DimensionPrimitive': + importNullable(); + importYogaValue(); + return '@Nullable YogaValue'; + default: + typeAnnotation.name; + throw new Error( + `Received unknown ReservedPropTypeAnnotation ${typeAnnotation.name}`, + ); + } + } + + /** + * Other Pojo objects + */ + case 'PojoTypeAliasTypeAnnotation': { + return typeAnnotation.name; + } + + /** + * Arrays + */ + case 'ArrayTypeAnnotation': { + const elementType = typeAnnotation.elementType; + const elementTypeString = (() => { + switch (elementType.type) { + /** + * Primitives + */ + case 'BooleanTypeAnnotation': { + return 'Boolean'; + } + case 'StringTypeAnnotation': { + return 'String'; + } + case 'DoubleTypeAnnotation': { + return 'Double'; + } + case 'FloatTypeAnnotation': { + return 'Float'; + } + case 'Int32TypeAnnotation': { + return 'Integer'; + } + + /** + * Enums + */ + // TODO: Make StringEnums type-safe in Pojos + case 'StringEnumTypeAnnotation': { + return 'String'; + } + + /** + * Other Pojo objects + */ + case 'PojoTypeAliasTypeAnnotation': { + return elementType.name; + } + + /** + * Reserved types + */ + case 'ReservedPropTypeAnnotation': { + switch (elementType.name) { + case 'ColorPrimitive': + return 'Integer'; + + // TODO: Make ImageSourcePrimitive type-safe + case 'ImageSourcePrimitive': + importReadableMap(); + return 'ReadableMap'; + + // TODO: Make ImageRequestPrimitive type-safe + case 'ImageRequestPrimitive': + importReadableMap(); + return 'ReadableMap'; + + // TODO: Make PointPrimitive type-safe + case 'PointPrimitive': + importReadableMap(); + return 'ReadableMap'; + + // TODO: Make EdgeInsetsPrimitive type-safe + case 'EdgeInsetsPrimitive': + importReadableMap(); + return 'ReadableMap'; + case 'DimensionPrimitive': + importYogaValue(); + return 'YogaValue'; + default: + elementType.name; + throw new Error( + `Received unknown ReservedPropTypeAnnotation ${elementType.name}`, + ); + } + } + + // Arrays + case 'ArrayTypeAnnotation': { + const pojoTypeAliasTypeAnnotation = elementType.elementType; + importArrayList(); + return `ArrayList<${pojoTypeAliasTypeAnnotation.name}>`; + } + default: { + elementType.type; + throw new Error( + `Unrecognized PojoTypeAnnotation Array element type annotation '${typeAnnotation.type}'`, + ); + } + } + })(); + importArrayList(); + return `ArrayList<${elementTypeString}>`; + } + case 'MixedTypeAnnotation': { + importDynamic(); + return 'Dynamic'; + } + default: { + typeAnnotation.type; + throw new Error( + `Unrecognized PojoTypeAnnotation '${typeAnnotation.type}'`, + ); + } + } +} +function toJavaMemberName(property) { + return `m${capitalize(property.name)}`; +} +function toJavaMemberDeclaration(property, addImport) { + const type = toJavaType(property.typeAnnotation, addImport); + const memberName = toJavaMemberName(property); + return `private ${type} ${memberName};`; +} +function toJavaGetter(property, addImport) { + const type = toJavaType(property.typeAnnotation, addImport); + const getterName = `get${capitalize(property.name)}`; + const memberName = toJavaMemberName(property); + addImport('com.facebook.proguard.annotations.DoNotStrip'); + return `@DoNotStrip +public ${type} ${getterName}() { + return ${memberName}; +}`; +} +function serializePojo(pojo, basePackageName) { + const importSet = new Set(); + const addImport = $import => { + importSet.add($import); + }; + addImport('com.facebook.proguard.annotations.DoNotStrip'); + const indent = ' '.repeat(2); + const members = pojo.properties + .map(property => toJavaMemberDeclaration(property, addImport)) + .map(member => `${indent}${member}`) + .join('\n'); + const getters = pojo.properties + .map(property => toJavaGetter(property, addImport)) + .map(getter => + getter + .split('\n') + .map(line => `${indent}${line}`) + .join('\n'), + ) + .join('\n'); + const imports = [...importSet] + .map($import => `import ${$import};`) + .sort() + .join('\n'); + return `/** +* 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. +* +* ${'@'}generated by codegen project: GeneratePropsJavaPojo.js +*/ + +package ${basePackageName}.${pojo.namespace}; +${imports === '' ? '' : `\n${imports}\n`} +@DoNotStrip +public class ${pojo.name} { +${members} +${getters} +} +`; +} +module.exports = { + serializePojo, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow new file mode 100644 index 000000000000..f9f7234931fe --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow @@ -0,0 +1,314 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {Pojo, PojoProperty, PojoTypeAnnotation} from './PojoCollector'; +const {capitalize} = require('../../Utils'); + +type ImportCollector = ($import: string) => void; + +function toJavaType( + typeAnnotation: PojoTypeAnnotation, + addImport: ImportCollector, +): string { + const importNullable = () => addImport('androidx.annotation.Nullable'); + const importReadableMap = () => + addImport('com.facebook.react.bridge.ReadableMap'); + const importArrayList = () => addImport('java.util.ArrayList'); + const importYogaValue = () => addImport('com.facebook.yoga.YogaValue'); + const importDynamic = () => addImport('com.facebook.react.bridge.Dynamic'); + switch (typeAnnotation.type) { + /** + * Primitives + */ + case 'BooleanTypeAnnotation': { + if (typeAnnotation.default === null) { + importNullable(); + return '@Nullable Boolean'; + } else { + return 'boolean'; + } + } + case 'StringTypeAnnotation': { + importNullable(); + return '@Nullable String'; + } + case 'DoubleTypeAnnotation': { + return 'double'; + } + case 'FloatTypeAnnotation': { + if (typeAnnotation.default === null) { + importNullable(); + return '@Nullable Float'; + } else { + return 'float'; + } + } + case 'Int32TypeAnnotation': { + return 'int'; + } + + /** + * Enums + */ + // TODO: Make StringEnumTypeAnnotation type-safe? + case 'StringEnumTypeAnnotation': + importNullable(); + return '@Nullable String'; + // TODO: Make Int32EnumTypeAnnotation type-safe? + case 'Int32EnumTypeAnnotation': + importNullable(); + return '@Nullable Integer'; + + /** + * Reserved types + */ + case 'ReservedPropTypeAnnotation': { + switch (typeAnnotation.name) { + case 'ColorPrimitive': + importNullable(); + return '@Nullable Integer'; + + // TODO: Make ImageSourcePrimitive type-safe + case 'ImageSourcePrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + + // TODO: Make ImageRequestPrimitive type-safe + case 'ImageRequestPrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + + // TODO: Make PointPrimitive type-safe + case 'PointPrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + + // TODO: Make EdgeInsetsPrimitive type-safe + case 'EdgeInsetsPrimitive': + importNullable(); + importReadableMap(); + return '@Nullable ReadableMap'; + + case 'DimensionPrimitive': + importNullable(); + importYogaValue(); + return '@Nullable YogaValue'; + + default: + (typeAnnotation.name: empty); + throw new Error( + `Received unknown ReservedPropTypeAnnotation ${typeAnnotation.name}`, + ); + } + } + + /** + * Other Pojo objects + */ + case 'PojoTypeAliasTypeAnnotation': { + return typeAnnotation.name; + } + + /** + * Arrays + */ + case 'ArrayTypeAnnotation': { + const {elementType} = typeAnnotation; + + const elementTypeString = (() => { + switch (elementType.type) { + /** + * Primitives + */ + case 'BooleanTypeAnnotation': { + return 'Boolean'; + } + case 'StringTypeAnnotation': { + return 'String'; + } + case 'DoubleTypeAnnotation': { + return 'Double'; + } + case 'FloatTypeAnnotation': { + return 'Float'; + } + case 'Int32TypeAnnotation': { + return 'Integer'; + } + + /** + * Enums + */ + // TODO: Make StringEnums type-safe in Pojos + case 'StringEnumTypeAnnotation': { + return 'String'; + } + + /** + * Other Pojo objects + */ + case 'PojoTypeAliasTypeAnnotation': { + return elementType.name; + } + + /** + * Reserved types + */ + case 'ReservedPropTypeAnnotation': { + switch (elementType.name) { + case 'ColorPrimitive': + return 'Integer'; + + // TODO: Make ImageSourcePrimitive type-safe + case 'ImageSourcePrimitive': + importReadableMap(); + return 'ReadableMap'; + + // TODO: Make ImageRequestPrimitive type-safe + case 'ImageRequestPrimitive': + importReadableMap(); + return 'ReadableMap'; + + // TODO: Make PointPrimitive type-safe + case 'PointPrimitive': + importReadableMap(); + return 'ReadableMap'; + + // TODO: Make EdgeInsetsPrimitive type-safe + case 'EdgeInsetsPrimitive': + importReadableMap(); + return 'ReadableMap'; + + case 'DimensionPrimitive': + importYogaValue(); + return 'YogaValue'; + + default: + (elementType.name: empty); + throw new Error( + `Received unknown ReservedPropTypeAnnotation ${elementType.name}`, + ); + } + } + + // Arrays + case 'ArrayTypeAnnotation': { + const {elementType: pojoTypeAliasTypeAnnotation} = elementType; + + importArrayList(); + return `ArrayList<${pojoTypeAliasTypeAnnotation.name}>`; + } + default: { + (elementType.type: empty); + throw new Error( + `Unrecognized PojoTypeAnnotation Array element type annotation '${typeAnnotation.type}'`, + ); + } + } + })(); + + importArrayList(); + return `ArrayList<${elementTypeString}>`; + } + + case 'MixedTypeAnnotation': { + importDynamic(); + return 'Dynamic'; + } + + default: { + (typeAnnotation.type: empty); + throw new Error( + `Unrecognized PojoTypeAnnotation '${typeAnnotation.type}'`, + ); + } + } +} + +function toJavaMemberName(property: PojoProperty): string { + return `m${capitalize(property.name)}`; +} + +function toJavaMemberDeclaration( + property: PojoProperty, + addImport: ImportCollector, +): string { + const type = toJavaType(property.typeAnnotation, addImport); + const memberName = toJavaMemberName(property); + return `private ${type} ${memberName};`; +} + +function toJavaGetter(property: PojoProperty, addImport: ImportCollector) { + const type = toJavaType(property.typeAnnotation, addImport); + const getterName = `get${capitalize(property.name)}`; + const memberName = toJavaMemberName(property); + + addImport('com.facebook.proguard.annotations.DoNotStrip'); + return `@DoNotStrip +public ${type} ${getterName}() { + return ${memberName}; +}`; +} + +function serializePojo(pojo: Pojo, basePackageName: string): string { + const importSet: Set = new Set(); + const addImport = ($import: string) => { + importSet.add($import); + }; + + addImport('com.facebook.proguard.annotations.DoNotStrip'); + + const indent = ' '.repeat(2); + + const members = pojo.properties + .map(property => toJavaMemberDeclaration(property, addImport)) + .map(member => `${indent}${member}`) + .join('\n'); + + const getters = pojo.properties + .map(property => toJavaGetter(property, addImport)) + .map(getter => + getter + .split('\n') + .map(line => `${indent}${line}`) + .join('\n'), + ) + .join('\n'); + + const imports = [...importSet] + .map($import => `import ${$import};`) + .sort() + .join('\n'); + + return `/** +* 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. +* +* ${'@'}generated by codegen project: GeneratePropsJavaPojo.js +*/ + +package ${basePackageName}.${pojo.namespace}; +${imports === '' ? '' : `\n${imports}\n`} +@DoNotStrip +public class ${pojo.name} { +${members} +${getters} +} +`; +} + +module.exports = {serializePojo}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js new file mode 100644 index 000000000000..c3e918f437b4 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js @@ -0,0 +1,73 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +// File path -> contents + +const FileTemplate = ({libraryName, componentNames}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateShadowNodeCpp.js + */ + +#include + +namespace facebook { +namespace react { + +${componentNames} + +} // namespace react +} // namespace facebook +`; +const ComponentTemplate = ({className}) => + ` +extern const char ${className}ComponentName[] = "${className}"; +`.trim(); +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'ShadowNodes.cpp'; + const componentNames = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + if (components[componentName].interfaceOnly === true) { + return; + } + const replacedTemplate = ComponentTemplate({ + className: componentName, + }); + return replacedTemplate; + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + const replacedTemplate = FileTemplate({ + componentNames, + libraryName, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js.flow new file mode 100644 index 000000000000..82cb8ffd5ab5 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeCpp.js.flow @@ -0,0 +1,95 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + libraryName, + componentNames, +}: { + libraryName: string, + componentNames: string, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateShadowNodeCpp.js + */ + +#include + +namespace facebook { +namespace react { + +${componentNames} + +} // namespace react +} // namespace facebook +`; + +const ComponentTemplate = ({className}: {className: string}) => + ` +extern const char ${className}ComponentName[] = "${className}"; +`.trim(); + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'ShadowNodes.cpp'; + + const componentNames = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + if (components[componentName].interfaceOnly === true) { + return; + } + const replacedTemplate = ComponentTemplate({ + className: componentName, + }); + + return replacedTemplate; + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + + const replacedTemplate = FileTemplate({ + componentNames, + libraryName, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js new file mode 100644 index 000000000000..664f205ea744 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js @@ -0,0 +1,91 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +// File path -> contents + +const FileTemplate = ({imports, libraryName, componentClasses}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateShadowNodeH.js + */ + +#pragma once + +${imports}#include +#include +#include +#include + +namespace facebook { +namespace react { + +${componentClasses} + +} // namespace react +} // namespace facebook +`; +const ComponentTemplate = ({className, eventEmitter}) => + ` +JSI_EXPORT extern const char ${className}ComponentName[]; + +/* + * \`ShadowNode\` for <${className}> component. + */ +using ${className}ShadowNode = ConcreteViewShadowNode< + ${className}ComponentName, + ${className}Props${eventEmitter}, + ${className}State>; +`.trim(); +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'ShadowNodes.h'; + const moduleResults = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + if (component.interfaceOnly === true) { + return; + } + const eventEmitter = `,\n ${componentName}EventEmitter`; + const replacedTemplate = ComponentTemplate({ + className: componentName, + eventEmitter, + }); + return replacedTemplate; + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + const eventEmitterImport = `#include \n`; + const replacedTemplate = FileTemplate({ + componentClasses: moduleResults, + libraryName, + imports: eventEmitterImport, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js.flow new file mode 100644 index 000000000000..3e7cf71117ef --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateShadowNodeH.js.flow @@ -0,0 +1,124 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + imports, + libraryName, + componentClasses, +}: { + imports: string, + libraryName: string, + componentClasses: string, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateShadowNodeH.js + */ + +#pragma once + +${imports}#include +#include +#include +#include + +namespace facebook { +namespace react { + +${componentClasses} + +} // namespace react +} // namespace facebook +`; + +const ComponentTemplate = ({ + className, + eventEmitter, +}: { + className: string, + eventEmitter: string, +}) => + ` +JSI_EXPORT extern const char ${className}ComponentName[]; + +/* + * \`ShadowNode\` for <${className}> component. + */ +using ${className}ShadowNode = ConcreteViewShadowNode< + ${className}ComponentName, + ${className}Props${eventEmitter}, + ${className}State>; +`.trim(); + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'ShadowNodes.h'; + + const moduleResults = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + if (component.interfaceOnly === true) { + return; + } + + const eventEmitter = `,\n ${componentName}EventEmitter`; + + const replacedTemplate = ComponentTemplate({ + className: componentName, + eventEmitter, + }); + + return replacedTemplate; + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + + const eventEmitterImport = `#include \n`; + + const replacedTemplate = FileTemplate({ + componentClasses: moduleResults, + libraryName, + imports: eventEmitterImport, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js b/packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js new file mode 100644 index 000000000000..fba9154a5811 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js @@ -0,0 +1,70 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +// File path -> contents + +const FileTemplate = ({libraryName, stateClasses}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateStateCpp.js + */ +#include + +namespace facebook { +namespace react { + +${stateClasses} + +} // namespace react +} // namespace facebook +`; +const StateTemplate = ({stateName}) => ''; +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'States.cpp'; + const stateClasses = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + if (component.interfaceOnly === true) { + return null; + } + return StateTemplate({ + stateName: `${componentName}State`, + }); + }) + .filter(Boolean) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + const replacedTemplate = FileTemplate({ + libraryName, + stateClasses, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js.flow new file mode 100644 index 000000000000..36c843398192 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateStateCpp.js.flow @@ -0,0 +1,92 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + libraryName, + stateClasses, +}: { + libraryName: string, + stateClasses: string, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateStateCpp.js + */ +#include + +namespace facebook { +namespace react { + +${stateClasses} + +} // namespace react +} // namespace facebook +`; + +const StateTemplate = ({stateName}: {stateName: string}) => ''; + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'States.cpp'; + + const stateClasses = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + if (component.interfaceOnly === true) { + return null; + } + + return StateTemplate({ + stateName: `${componentName}State`, + }); + }) + .filter(Boolean) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + + const replacedTemplate = FileTemplate({ + libraryName, + stateClasses, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateStateH.js b/packages/react-native-codegen/lib/generators/components/GenerateStateH.js new file mode 100644 index 000000000000..08102485cfa3 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateStateH.js @@ -0,0 +1,93 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +// File path -> contents + +const FileTemplate = ({libraryName, stateClasses}) => + ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateStateH.js + */ +#pragma once + +#ifdef ANDROID +#include +#include +#include +#endif + +namespace facebook { +namespace react { + +${stateClasses} + +} // namespace react +} // namespace facebook +`.trim(); +const StateTemplate = ({stateName}) => + ` +class ${stateName}State { +public: + ${stateName}State() = default; + +#ifdef ANDROID + ${stateName}State(${stateName}State const &previousState, folly::dynamic data){}; + folly::dynamic getDynamic() const { + return {}; + }; + MapBuffer getMapBuffer() const { + return MapBufferBuilder::EMPTY(); + }; +#endif +}; +`.trim(); +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'States.h'; + const stateClasses = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + if (component.interfaceOnly === true) { + return null; + } + return StateTemplate({ + stateName: componentName, + }); + }) + .filter(Boolean) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + const template = FileTemplate({ + libraryName, + stateClasses, + }); + return new Map([[fileName, template]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateStateH.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateStateH.js.flow new file mode 100644 index 000000000000..658142eaea04 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateStateH.js.flow @@ -0,0 +1,111 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + libraryName, + stateClasses, +}: { + libraryName: string, + stateClasses: string, +}) => + ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateStateH.js + */ +#pragma once + +#ifdef ANDROID +#include +#include +#include +#endif + +namespace facebook { +namespace react { + +${stateClasses} + +} // namespace react +} // namespace facebook +`.trim(); + +const StateTemplate = ({stateName}: {stateName: string}) => + ` +class ${stateName}State { +public: + ${stateName}State() = default; + +#ifdef ANDROID + ${stateName}State(${stateName}State const &previousState, folly::dynamic data){}; + folly::dynamic getDynamic() const { + return {}; + }; + MapBuffer getMapBuffer() const { + return MapBufferBuilder::EMPTY(); + }; +#endif +}; +`.trim(); + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'States.h'; + + const stateClasses = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + if (component.interfaceOnly === true) { + return null; + } + return StateTemplate({stateName: componentName}); + }) + .filter(Boolean) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + + const template = FileTemplate({ + libraryName, + stateClasses, + }); + return new Map([[fileName, template]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateTests.js b/packages/react-native-codegen/lib/generators/components/GenerateTests.js new file mode 100644 index 000000000000..9312ae51402b --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateTests.js @@ -0,0 +1,166 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./CppHelpers'), + getImports = _require.getImports; +const _require2 = require('../Utils'), + toSafeCppString = _require2.toSafeCppString; +const FileTemplate = ({libraryName, imports, componentTests}) => + ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateTests.js + * */ + +#include +#include +#include +${imports} + +using namespace facebook::react; +${componentTests} +`.trim(); +const TestTemplate = ({componentName, testName, propName, propValue}) => ` +TEST(${componentName}_${testName}, etc) { + auto propParser = RawPropsParser(); + propParser.prepare<${componentName}>(); + auto const &sourceProps = ${componentName}(); + auto const &rawProps = RawProps(folly::dynamic::object("${propName}", ${propValue})); + + ContextContainer contextContainer{}; + PropsParserContext parserContext{-1, contextContainer}; + + rawProps.parse(propParser, parserContext); + ${componentName}(parserContext, sourceProps, rawProps); +} +`; +function getTestCasesForProp(propName, typeAnnotation) { + const cases = []; + if (typeAnnotation.type === 'StringEnumTypeAnnotation') { + typeAnnotation.options.forEach(option => + cases.push({ + propName, + testName: `${propName}_${toSafeCppString(option)}`, + propValue: option, + }), + ); + } else if (typeAnnotation.type === 'StringTypeAnnotation') { + cases.push({ + propName, + propValue: + typeAnnotation.default != null && typeAnnotation.default !== '' + ? typeAnnotation.default + : 'foo', + }); + } else if (typeAnnotation.type === 'BooleanTypeAnnotation') { + cases.push({ + propName: propName, + propValue: typeAnnotation.default != null ? typeAnnotation.default : true, + }); + // $FlowFixMe[incompatible-type] + } else if (typeAnnotation.type === 'IntegerTypeAnnotation') { + cases.push({ + propName, + propValue: typeAnnotation.default || 10, + }); + } else if (typeAnnotation.type === 'FloatTypeAnnotation') { + cases.push({ + propName, + propValue: typeAnnotation.default != null ? typeAnnotation.default : 0.1, + }); + } else if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + if (typeAnnotation.name === 'ColorPrimitive') { + cases.push({ + propName, + propValue: 1, + }); + } else if (typeAnnotation.name === 'PointPrimitive') { + cases.push({ + propName, + propValue: 'folly::dynamic::object("x", 1)("y", 1)', + raw: true, + }); + } else if (typeAnnotation.name === 'ImageSourcePrimitive') { + cases.push({ + propName, + propValue: 'folly::dynamic::object("url", "testurl")', + raw: true, + }); + } + } + return cases; +} +function generateTestsString(name, component) { + function createTest({testName, propName, propValue, raw = false}) { + const value = + !raw && typeof propValue === 'string' ? `"${propValue}"` : propValue; + return TestTemplate({ + componentName: name, + testName: testName != null ? testName : propName, + propName, + propValue: String(value), + }); + } + const testCases = component.props.reduce((cases, prop) => { + return cases.concat(getTestCasesForProp(prop.name, prop.typeAnnotation)); + }, []); + const baseTest = { + testName: 'DoesNotDie', + propName: 'xx_invalid_xx', + propValue: 'xx_invalid_xx', + }; + return [baseTest, ...testCases].map(createTest).join(''); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const fileName = 'Tests.cpp'; + const allImports = new Set([ + '#include ', + '#include ', + '#include ', + ]); + const componentTests = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + if (components == null) { + return null; + } + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + const name = `${componentName}Props`; + const imports = getImports(component.props); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + imports.forEach(allImports.add, allImports); + return generateTestsString(name, component); + }) + .join(''); + }) + .filter(Boolean) + .join(''); + const imports = Array.from(allImports).sort().join('\n').trim(); + const replacedTemplate = FileTemplate({ + imports, + libraryName, + componentTests, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateTests.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateTests.js.flow new file mode 100644 index 000000000000..95f51da618d3 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateTests.js.flow @@ -0,0 +1,221 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {ComponentShape, PropTypeAnnotation} from '../../CodegenSchema'; +import type {SchemaType} from '../../CodegenSchema'; + +const {getImports} = require('./CppHelpers'); + +const {toSafeCppString} = require('../Utils'); + +type FilesOutput = Map; +type PropValueType = string | number | boolean; + +type TestCase = $ReadOnly<{ + propName: string, + propValue: ?PropValueType, + testName?: string, + raw?: boolean, +}>; + +const FileTemplate = ({ + libraryName, + imports, + componentTests, +}: { + libraryName: string, + imports: string, + componentTests: string, +}) => + ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateTests.js + * */ + +#include +#include +#include +${imports} + +using namespace facebook::react; +${componentTests} +`.trim(); + +const TestTemplate = ({ + componentName, + testName, + propName, + propValue, +}: { + componentName: string, + testName: string, + propName: string, + propValue: string, +}) => ` +TEST(${componentName}_${testName}, etc) { + auto propParser = RawPropsParser(); + propParser.prepare<${componentName}>(); + auto const &sourceProps = ${componentName}(); + auto const &rawProps = RawProps(folly::dynamic::object("${propName}", ${propValue})); + + ContextContainer contextContainer{}; + PropsParserContext parserContext{-1, contextContainer}; + + rawProps.parse(propParser, parserContext); + ${componentName}(parserContext, sourceProps, rawProps); +} +`; + +function getTestCasesForProp( + propName: string, + typeAnnotation: PropTypeAnnotation, +) { + const cases = []; + if (typeAnnotation.type === 'StringEnumTypeAnnotation') { + typeAnnotation.options.forEach(option => + cases.push({ + propName, + testName: `${propName}_${toSafeCppString(option)}`, + propValue: option, + }), + ); + } else if (typeAnnotation.type === 'StringTypeAnnotation') { + cases.push({ + propName, + propValue: + typeAnnotation.default != null && typeAnnotation.default !== '' + ? typeAnnotation.default + : 'foo', + }); + } else if (typeAnnotation.type === 'BooleanTypeAnnotation') { + cases.push({ + propName: propName, + propValue: typeAnnotation.default != null ? typeAnnotation.default : true, + }); + // $FlowFixMe[incompatible-type] + } else if (typeAnnotation.type === 'IntegerTypeAnnotation') { + cases.push({ + propName, + propValue: typeAnnotation.default || 10, + }); + } else if (typeAnnotation.type === 'FloatTypeAnnotation') { + cases.push({ + propName, + propValue: typeAnnotation.default != null ? typeAnnotation.default : 0.1, + }); + } else if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + if (typeAnnotation.name === 'ColorPrimitive') { + cases.push({ + propName, + propValue: 1, + }); + } else if (typeAnnotation.name === 'PointPrimitive') { + cases.push({ + propName, + propValue: 'folly::dynamic::object("x", 1)("y", 1)', + raw: true, + }); + } else if (typeAnnotation.name === 'ImageSourcePrimitive') { + cases.push({ + propName, + propValue: 'folly::dynamic::object("url", "testurl")', + raw: true, + }); + } + } + + return cases; +} + +function generateTestsString(name: string, component: ComponentShape) { + function createTest({testName, propName, propValue, raw = false}: TestCase) { + const value = + !raw && typeof propValue === 'string' ? `"${propValue}"` : propValue; + + return TestTemplate({ + componentName: name, + testName: testName != null ? testName : propName, + propName, + propValue: String(value), + }); + } + + const testCases = component.props.reduce((cases: Array, prop) => { + return cases.concat(getTestCasesForProp(prop.name, prop.typeAnnotation)); + }, []); + + const baseTest = { + testName: 'DoesNotDie', + propName: 'xx_invalid_xx', + propValue: 'xx_invalid_xx', + }; + + return [baseTest, ...testCases].map(createTest).join(''); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const fileName = 'Tests.cpp'; + const allImports = new Set([ + '#include ', + '#include ', + '#include ', + ]); + + const componentTests = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + if (components == null) { + return null; + } + + return Object.keys(components) + .map(componentName => { + const component = components[componentName]; + const name = `${componentName}Props`; + + const imports = getImports(component.props); + // $FlowFixMe[method-unbinding] added when improving typing for this parameters + imports.forEach(allImports.add, allImports); + + return generateTestsString(name, component); + }) + .join(''); + }) + .filter(Boolean) + .join(''); + + const imports = Array.from(allImports).sort().join('\n').trim(); + + const replacedTemplate = FileTemplate({ + imports, + libraryName, + componentTests, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js new file mode 100644 index 000000000000..8b5122363c92 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js @@ -0,0 +1,95 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +// File path -> contents + +const FileTemplate = ({lookupFuncs}) => ` +/* + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderH + */ + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage" + +#import + +#ifdef __cplusplus +extern "C" { +#endif + +Class RCTThirdPartyFabricComponentsProvider(const char *name); + +#ifndef RCT_DYNAMIC_FRAMEWORKS + +${lookupFuncs} + +#endif + +#ifdef __cplusplus +} +#endif + +#pragma GCC diagnostic pop + +`; +const LookupFuncTemplate = ({className, libraryName}) => + ` +Class ${className}Cls(void) __attribute__((used)); // ${libraryName} +`.trim(); +module.exports = { + generate(schemas) { + const fileName = 'RCTThirdPartyFabricComponentsProvider.h'; + const lookupFuncs = Object.keys(schemas) + .map(libraryName => { + const schema = schemas[libraryName]; + return Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('iOS') + ); + }) + .map(componentName => { + return LookupFuncTemplate({ + className: componentName, + libraryName, + }); + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + }) + .join('\n'); + const replacedTemplate = FileTemplate({ + lookupFuncs, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow new file mode 100644 index 000000000000..40b168372af7 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow @@ -0,0 +1,111 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({lookupFuncs}: {lookupFuncs: string}) => ` +/* + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderH + */ + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage" + +#import + +#ifdef __cplusplus +extern "C" { +#endif + +Class RCTThirdPartyFabricComponentsProvider(const char *name); + +#ifndef RCT_DYNAMIC_FRAMEWORKS + +${lookupFuncs} + +#endif + +#ifdef __cplusplus +} +#endif + +#pragma GCC diagnostic pop + +`; + +const LookupFuncTemplate = ({ + className, + libraryName, +}: { + className: string, + libraryName: string, +}) => + ` +Class ${className}Cls(void) __attribute__((used)); // ${libraryName} +`.trim(); + +module.exports = { + generate(schemas: {[string]: SchemaType}): FilesOutput { + const fileName = 'RCTThirdPartyFabricComponentsProvider.h'; + + const lookupFuncs = Object.keys(schemas) + .map(libraryName => { + const schema = schemas[libraryName]; + return Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + return Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('iOS') + ); + }) + .map(componentName => { + return LookupFuncTemplate({ + className: componentName, + libraryName, + }); + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + }) + .join('\n'); + + const replacedTemplate = FileTemplate({ + lookupFuncs, + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js new file mode 100644 index 000000000000..baba12b97932 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js @@ -0,0 +1,91 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +// File path -> contents + +const FileTemplate = ({lookupMap}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderCpp + */ + +// OSS-compatibility layer + +#import "RCTThirdPartyFabricComponentsProvider.h" + +#import +#import + +Class RCTThirdPartyFabricComponentsProvider(const char *name) { + static std::unordered_map sFabricComponentsClassMap = { + #ifndef RCT_DYNAMIC_FRAMEWORKS +${lookupMap} + #endif + }; + + auto p = sFabricComponentsClassMap.find(name); + if (p != sFabricComponentsClassMap.end()) { + auto classFunc = p->second; + return classFunc(); + } + return nil; +} +`; +const LookupMapTemplate = ({className, libraryName}) => ` + {"${className}", ${className}Cls}, // ${libraryName}`; +module.exports = { + generate(schemas) { + const fileName = 'RCTThirdPartyFabricComponentsProvider.mm'; + const lookupMap = Object.keys(schemas) + .map(libraryName => { + const schema = schemas[libraryName]; + return Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + // No components in this module + if (components == null) { + return null; + } + const componentTemplates = Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('iOS') + ); + }) + .map(componentName => { + const replacedTemplate = LookupMapTemplate({ + className: componentName, + libraryName, + }); + return replacedTemplate; + }); + return componentTemplates.length > 0 ? componentTemplates : null; + }) + .filter(Boolean); + }) + .join('\n'); + const replacedTemplate = FileTemplate({ + lookupMap, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow new file mode 100644 index 000000000000..06e964845d3f --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow @@ -0,0 +1,107 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({lookupMap}: {lookupMap: string}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderCpp + */ + +// OSS-compatibility layer + +#import "RCTThirdPartyFabricComponentsProvider.h" + +#import +#import + +Class RCTThirdPartyFabricComponentsProvider(const char *name) { + static std::unordered_map sFabricComponentsClassMap = { + #ifndef RCT_DYNAMIC_FRAMEWORKS +${lookupMap} + #endif + }; + + auto p = sFabricComponentsClassMap.find(name); + if (p != sFabricComponentsClassMap.end()) { + auto classFunc = p->second; + return classFunc(); + } + return nil; +} +`; + +const LookupMapTemplate = ({ + className, + libraryName, +}: { + className: string, + libraryName: string, +}) => ` + {"${className}", ${className}Cls}, // ${libraryName}`; + +module.exports = { + generate(schemas: {[string]: SchemaType}): FilesOutput { + const fileName = 'RCTThirdPartyFabricComponentsProvider.mm'; + + const lookupMap = Object.keys(schemas) + .map(libraryName => { + const schema = schemas[libraryName]; + return Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + // No components in this module + if (components == null) { + return null; + } + + const componentTemplates = Object.keys(components) + .filter(componentName => { + const component = components[componentName]; + return !( + component.excludedPlatforms && + component.excludedPlatforms.includes('iOS') + ); + }) + .map(componentName => { + const replacedTemplate = LookupMapTemplate({ + className: componentName, + libraryName, + }); + + return replacedTemplate; + }); + + return componentTemplates.length > 0 ? componentTemplates : null; + }) + .filter(Boolean); + }) + .join('\n'); + + const replacedTemplate = FileTemplate({lookupMap}); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js b/packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js new file mode 100644 index 000000000000..b99e7dc7098a --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js @@ -0,0 +1,414 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const j = require('jscodeshift'); + +// File path -> contents + +const FileTemplate = ({imports, componentConfig}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @flow + * + * ${'@'}generated by codegen project: GenerateViewConfigJs.js + */ + +'use strict'; + +${imports} + +${componentConfig} +`; + +// We use this to add to a set. Need to make sure we aren't importing +// this multiple times. +const UIMANAGER_IMPORT = 'const {UIManager} = require("react-native")'; +function getReactDiffProcessValue(typeAnnotation) { + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'ObjectTypeAnnotation': + case 'StringEnumTypeAnnotation': + case 'Int32EnumTypeAnnotation': + case 'MixedTypeAnnotation': + return j.literal(true); + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return j.template + .expression`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`; + case 'ImageSourcePrimitive': + return j.template + .expression`{ process: require('react-native/Libraries/Image/resolveAssetSource') }`; + case 'ImageRequestPrimitive': + throw new Error('ImageRequest should not be used in props'); + case 'PointPrimitive': + return j.template + .expression`{ diff: require('react-native/Libraries/Utilities/differ/pointsDiffer') }`; + case 'EdgeInsetsPrimitive': + return j.template + .expression`{ diff: require('react-native/Libraries/Utilities/differ/insetsDiffer') }`; + case 'DimensionPrimitive': + return j.literal(true); + default: + typeAnnotation.name; + throw new Error( + `Received unknown native typeAnnotation: "${typeAnnotation.name}"`, + ); + } + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation') { + switch (typeAnnotation.elementType.name) { + case 'ColorPrimitive': + return j.template + .expression`{ process: require('react-native/Libraries/StyleSheet/processColorArray') }`; + case 'ImageSourcePrimitive': + case 'PointPrimitive': + case 'EdgeInsetsPrimitive': + case 'DimensionPrimitive': + return j.literal(true); + default: + throw new Error( + `Received unknown array native typeAnnotation: "${typeAnnotation.elementType.name}"`, + ); + } + } + return j.literal(true); + default: + typeAnnotation; + throw new Error( + `Received unknown typeAnnotation: "${typeAnnotation.type}"`, + ); + } +} +const ComponentTemplate = ({ + componentName, + paperComponentName, + paperComponentNameDeprecated, +}) => { + const nativeComponentName = + paperComponentName !== null && paperComponentName !== void 0 + ? paperComponentName + : componentName; + return ` +let nativeComponentName = '${nativeComponentName}'; +${ + paperComponentNameDeprecated != null + ? DeprecatedComponentNameCheckTemplate({ + componentName, + paperComponentNameDeprecated, + }) + : '' +} + +export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG; + +export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG); +`.trim(); +}; + +// Check whether the native component exists in the app binary. +// Old getViewManagerConfig() checks for the existance of the native Paper view manager. Not available in Bridgeless. +// New hasViewManagerConfig() queries Fabric’s native component registry directly. +const DeprecatedComponentNameCheckTemplate = ({ + componentName, + paperComponentNameDeprecated, +}) => + ` +if (UIManager.hasViewManagerConfig('${componentName}')) { + nativeComponentName = '${componentName}'; +} else if (UIManager.hasViewManagerConfig('${paperComponentNameDeprecated}')) { + nativeComponentName = '${paperComponentNameDeprecated}'; +} else { + throw new Error('Failed to find native component for either "${componentName}" or "${paperComponentNameDeprecated}"'); +} +`.trim(); + +// Replicates the behavior of RCTNormalizeInputEventName in RCTEventDispatcher.m +function normalizeInputEventName(name) { + if (name.startsWith('on')) { + return name.replace(/^on/, 'top'); + } else if (!name.startsWith('top')) { + return `top${name[0].toUpperCase()}${name.slice(1)}`; + } + return name; +} + +// Replicates the behavior of viewConfig in RCTComponentData.m +function getValidAttributesForEvents(events, imports) { + imports.add( + "const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');", + ); + const validAttributes = j.objectExpression( + events.map(eventType => { + return j.property('init', j.identifier(eventType.name), j.literal(true)); + }), + ); + return j.callExpression(j.identifier('ConditionallyIgnoredEventHandlers'), [ + validAttributes, + ]); +} +function generateBubblingEventInfo(event, nameOveride) { + return j.property( + 'init', + j.identifier(nameOveride || normalizeInputEventName(event.name)), + j.objectExpression([ + j.property( + 'init', + j.identifier('phasedRegistrationNames'), + j.objectExpression([ + j.property( + 'init', + j.identifier('captured'), + j.literal(`${event.name}Capture`), + ), + j.property('init', j.identifier('bubbled'), j.literal(event.name)), + ]), + ), + ]), + ); +} +function generateDirectEventInfo(event, nameOveride) { + return j.property( + 'init', + j.identifier(nameOveride || normalizeInputEventName(event.name)), + j.objectExpression([ + j.property( + 'init', + j.identifier('registrationName'), + j.literal(event.name), + ), + ]), + ); +} +function buildViewConfig(schema, componentName, component, imports) { + const componentProps = component.props; + const componentEvents = component.events; + component.extendsProps.forEach(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + imports.add( + "const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');", + ); + return; + default: + extendProps.knownTypeName; + throw new Error('Invalid knownTypeName'); + } + default: + extendProps.type; + throw new Error('Invalid extended type'); + } + }); + const validAttributes = j.objectExpression([ + ...componentProps.map(schemaProp => { + return j.property( + 'init', + j.identifier(schemaProp.name), + getReactDiffProcessValue(schemaProp.typeAnnotation), + ); + }), + ...(componentEvents.length > 0 + ? [ + j.spreadProperty( + getValidAttributesForEvents(componentEvents, imports), + ), + ] + : []), + ]); + const bubblingEventNames = component.events + .filter(event => event.bubblingType === 'bubble') + .reduce((bubblingEvents, event) => { + // We add in the deprecated paper name so that it is in the view config. + // This means either the old event name or the new event name can fire + // and be sent to the listener until the old top level name is removed. + if (event.paperTopLevelNameDeprecated) { + bubblingEvents.push( + generateBubblingEventInfo(event, event.paperTopLevelNameDeprecated), + ); + } else { + bubblingEvents.push(generateBubblingEventInfo(event)); + } + return bubblingEvents; + }, []); + const bubblingEvents = + bubblingEventNames.length > 0 + ? j.property( + 'init', + j.identifier('bubblingEventTypes'), + j.objectExpression(bubblingEventNames), + ) + : null; + const directEventNames = component.events + .filter(event => event.bubblingType === 'direct') + .reduce((directEvents, event) => { + // We add in the deprecated paper name so that it is in the view config. + // This means either the old event name or the new event name can fire + // and be sent to the listener until the old top level name is removed. + if (event.paperTopLevelNameDeprecated) { + directEvents.push( + generateDirectEventInfo(event, event.paperTopLevelNameDeprecated), + ); + } else { + directEvents.push(generateDirectEventInfo(event)); + } + return directEvents; + }, []); + const directEvents = + directEventNames.length > 0 + ? j.property( + 'init', + j.identifier('directEventTypes'), + j.objectExpression(directEventNames), + ) + : null; + const properties = [ + j.property( + 'init', + j.identifier('uiViewClassName'), + j.literal(componentName), + ), + bubblingEvents, + directEvents, + j.property('init', j.identifier('validAttributes'), validAttributes), + ].filter(Boolean); + return j.objectExpression(properties); +} +function buildCommands(schema, componentName, component, imports) { + const commands = component.commands; + if (commands.length === 0) { + return null; + } + imports.add( + 'const {dispatchCommand} = require("react-native/Libraries/ReactNative/RendererProxy");', + ); + const properties = commands.map(command => { + const commandName = command.name; + const params = command.typeAnnotation.params; + const commandNameLiteral = j.literal(commandName); + const commandNameIdentifier = j.identifier(commandName); + const arrayParams = j.arrayExpression( + params.map(param => { + return j.identifier(param.name); + }), + ); + const expression = j.template + .expression`dispatchCommand(ref, ${commandNameLiteral}, ${arrayParams})`; + const functionParams = params.map(param => { + return j.identifier(param.name); + }); + const property = j.property( + 'init', + commandNameIdentifier, + j.functionExpression( + null, + [j.identifier('ref'), ...functionParams], + j.blockStatement([j.expressionStatement(expression)]), + ), + ); + property.method = true; + return property; + }); + return j.exportNamedDeclaration( + j.variableDeclaration('const', [ + j.variableDeclarator( + j.identifier('Commands'), + j.objectExpression(properties), + ), + ]), + ); +} +module.exports = { + generate(libraryName, schema) { + try { + const fileName = `${libraryName}NativeViewConfig.js`; + const imports = new Set(); + const moduleResults = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + const components = module.components; + return Object.keys(components) + .map(componentName => { + var _component$paperCompo; + const component = components[componentName]; + if (component.paperComponentNameDeprecated) { + imports.add(UIMANAGER_IMPORT); + } + const replacedTemplate = ComponentTemplate({ + componentName, + paperComponentName: component.paperComponentName, + paperComponentNameDeprecated: + component.paperComponentNameDeprecated, + }); + const replacedSourceRoot = j.withParser('flow')(replacedTemplate); + const paperComponentName = + (_component$paperCompo = component.paperComponentName) !== + null && _component$paperCompo !== void 0 + ? _component$paperCompo + : componentName; + replacedSourceRoot + .find(j.Identifier, { + name: 'VIEW_CONFIG', + }) + .replaceWith( + buildViewConfig( + schema, + paperComponentName, + component, + imports, + ), + ); + const commands = buildCommands( + schema, + paperComponentName, + component, + imports, + ); + if (commands) { + replacedSourceRoot + .find(j.ExportDefaultDeclaration) + .insertAfter(j(commands).toSource()); + } + const replacedSource = replacedSourceRoot.toSource({ + quote: 'single', + trailingComma: true, + }); + return replacedSource; + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + const replacedTemplate = FileTemplate({ + componentConfig: moduleResults, + imports: Array.from(imports).sort().join('\n'), + }); + return new Map([[fileName, replacedTemplate]]); + } catch (error) { + console.error(`\nError parsing schema for ${libraryName}\n`); + console.error(JSON.stringify(schema)); + throw error; + } + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js.flow b/packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js.flow new file mode 100644 index 000000000000..c8d96823129b --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/GenerateViewConfigJs.js.flow @@ -0,0 +1,488 @@ +/** + * 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. + * + * @flow + * @format + */ + +'use strict'; +import type { + ComponentShape, + EventTypeShape, + PropTypeAnnotation, +} from '../../CodegenSchema'; +import type {SchemaType} from '../../CodegenSchema'; + +const j = require('jscodeshift'); + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + imports, + componentConfig, +}: { + imports: string, + componentConfig: string, +}) => ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @flow + * + * ${'@'}generated by codegen project: GenerateViewConfigJs.js + */ + +'use strict'; + +${imports} + +${componentConfig} +`; + +// We use this to add to a set. Need to make sure we aren't importing +// this multiple times. +const UIMANAGER_IMPORT = 'const {UIManager} = require("react-native")'; + +function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) { + switch (typeAnnotation.type) { + case 'BooleanTypeAnnotation': + case 'StringTypeAnnotation': + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + case 'FloatTypeAnnotation': + case 'ObjectTypeAnnotation': + case 'StringEnumTypeAnnotation': + case 'Int32EnumTypeAnnotation': + case 'MixedTypeAnnotation': + return j.literal(true); + case 'ReservedPropTypeAnnotation': + switch (typeAnnotation.name) { + case 'ColorPrimitive': + return j.template + .expression`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`; + case 'ImageSourcePrimitive': + return j.template + .expression`{ process: require('react-native/Libraries/Image/resolveAssetSource') }`; + case 'ImageRequestPrimitive': + throw new Error('ImageRequest should not be used in props'); + case 'PointPrimitive': + return j.template + .expression`{ diff: require('react-native/Libraries/Utilities/differ/pointsDiffer') }`; + case 'EdgeInsetsPrimitive': + return j.template + .expression`{ diff: require('react-native/Libraries/Utilities/differ/insetsDiffer') }`; + case 'DimensionPrimitive': + return j.literal(true); + default: + (typeAnnotation.name: empty); + throw new Error( + `Received unknown native typeAnnotation: "${typeAnnotation.name}"`, + ); + } + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation') { + switch (typeAnnotation.elementType.name) { + case 'ColorPrimitive': + return j.template + .expression`{ process: require('react-native/Libraries/StyleSheet/processColorArray') }`; + case 'ImageSourcePrimitive': + case 'PointPrimitive': + case 'EdgeInsetsPrimitive': + case 'DimensionPrimitive': + return j.literal(true); + default: + throw new Error( + `Received unknown array native typeAnnotation: "${typeAnnotation.elementType.name}"`, + ); + } + } + return j.literal(true); + default: + (typeAnnotation: empty); + throw new Error( + `Received unknown typeAnnotation: "${typeAnnotation.type}"`, + ); + } +} + +const ComponentTemplate = ({ + componentName, + paperComponentName, + paperComponentNameDeprecated, +}: { + componentName: string, + paperComponentName: ?string, + paperComponentNameDeprecated: ?string, +}) => { + const nativeComponentName = paperComponentName ?? componentName; + + return ` +let nativeComponentName = '${nativeComponentName}'; +${ + paperComponentNameDeprecated != null + ? DeprecatedComponentNameCheckTemplate({ + componentName, + paperComponentNameDeprecated, + }) + : '' +} + +export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG; + +export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG); +`.trim(); +}; + +// Check whether the native component exists in the app binary. +// Old getViewManagerConfig() checks for the existance of the native Paper view manager. Not available in Bridgeless. +// New hasViewManagerConfig() queries Fabric’s native component registry directly. +const DeprecatedComponentNameCheckTemplate = ({ + componentName, + paperComponentNameDeprecated, +}: { + componentName: string, + paperComponentNameDeprecated: string, +}) => + ` +if (UIManager.hasViewManagerConfig('${componentName}')) { + nativeComponentName = '${componentName}'; +} else if (UIManager.hasViewManagerConfig('${paperComponentNameDeprecated}')) { + nativeComponentName = '${paperComponentNameDeprecated}'; +} else { + throw new Error('Failed to find native component for either "${componentName}" or "${paperComponentNameDeprecated}"'); +} +`.trim(); + +// Replicates the behavior of RCTNormalizeInputEventName in RCTEventDispatcher.m +function normalizeInputEventName(name: string) { + if (name.startsWith('on')) { + return name.replace(/^on/, 'top'); + } else if (!name.startsWith('top')) { + return `top${name[0].toUpperCase()}${name.slice(1)}`; + } + + return name; +} + +// Replicates the behavior of viewConfig in RCTComponentData.m +function getValidAttributesForEvents( + events: $ReadOnlyArray, + imports: Set, +) { + imports.add( + "const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');", + ); + + const validAttributes = j.objectExpression( + events.map(eventType => { + return j.property('init', j.identifier(eventType.name), j.literal(true)); + }), + ); + + return j.callExpression(j.identifier('ConditionallyIgnoredEventHandlers'), [ + validAttributes, + ]); +} + +function generateBubblingEventInfo( + event: EventTypeShape, + nameOveride: void | string, +) { + return j.property( + 'init', + j.identifier(nameOveride || normalizeInputEventName(event.name)), + j.objectExpression([ + j.property( + 'init', + j.identifier('phasedRegistrationNames'), + j.objectExpression([ + j.property( + 'init', + j.identifier('captured'), + j.literal(`${event.name}Capture`), + ), + j.property('init', j.identifier('bubbled'), j.literal(event.name)), + ]), + ), + ]), + ); +} + +function generateDirectEventInfo( + event: EventTypeShape, + nameOveride: void | string, +) { + return j.property( + 'init', + j.identifier(nameOveride || normalizeInputEventName(event.name)), + j.objectExpression([ + j.property( + 'init', + j.identifier('registrationName'), + j.literal(event.name), + ), + ]), + ); +} + +function buildViewConfig( + schema: SchemaType, + componentName: string, + component: ComponentShape, + imports: Set, +) { + const componentProps = component.props; + const componentEvents = component.events; + + component.extendsProps.forEach(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + imports.add( + "const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');", + ); + + return; + default: + (extendProps.knownTypeName: empty); + throw new Error('Invalid knownTypeName'); + } + default: + (extendProps.type: empty); + throw new Error('Invalid extended type'); + } + }); + + const validAttributes = j.objectExpression([ + ...componentProps.map(schemaProp => { + return j.property( + 'init', + j.identifier(schemaProp.name), + getReactDiffProcessValue(schemaProp.typeAnnotation), + ); + }), + ...(componentEvents.length > 0 + ? [ + j.spreadProperty( + getValidAttributesForEvents(componentEvents, imports), + ), + ] + : []), + ]); + + const bubblingEventNames = component.events + .filter(event => event.bubblingType === 'bubble') + .reduce((bubblingEvents: Array, event) => { + // We add in the deprecated paper name so that it is in the view config. + // This means either the old event name or the new event name can fire + // and be sent to the listener until the old top level name is removed. + if (event.paperTopLevelNameDeprecated) { + bubblingEvents.push( + generateBubblingEventInfo(event, event.paperTopLevelNameDeprecated), + ); + } else { + bubblingEvents.push(generateBubblingEventInfo(event)); + } + return bubblingEvents; + }, []); + + const bubblingEvents = + bubblingEventNames.length > 0 + ? j.property( + 'init', + j.identifier('bubblingEventTypes'), + j.objectExpression(bubblingEventNames), + ) + : null; + + const directEventNames = component.events + .filter(event => event.bubblingType === 'direct') + .reduce((directEvents: Array, event) => { + // We add in the deprecated paper name so that it is in the view config. + // This means either the old event name or the new event name can fire + // and be sent to the listener until the old top level name is removed. + if (event.paperTopLevelNameDeprecated) { + directEvents.push( + generateDirectEventInfo(event, event.paperTopLevelNameDeprecated), + ); + } else { + directEvents.push(generateDirectEventInfo(event)); + } + return directEvents; + }, []); + + const directEvents = + directEventNames.length > 0 + ? j.property( + 'init', + j.identifier('directEventTypes'), + j.objectExpression(directEventNames), + ) + : null; + + const properties = [ + j.property( + 'init', + j.identifier('uiViewClassName'), + j.literal(componentName), + ), + bubblingEvents, + directEvents, + j.property('init', j.identifier('validAttributes'), validAttributes), + ].filter(Boolean); + + return j.objectExpression(properties); +} + +function buildCommands( + schema: SchemaType, + componentName: string, + component: ComponentShape, + imports: Set, +) { + const commands = component.commands; + + if (commands.length === 0) { + return null; + } + + imports.add( + 'const {dispatchCommand} = require("react-native/Libraries/ReactNative/RendererProxy");', + ); + + const properties = commands.map(command => { + const commandName = command.name; + const params = command.typeAnnotation.params; + + const commandNameLiteral = j.literal(commandName); + const commandNameIdentifier = j.identifier(commandName); + const arrayParams = j.arrayExpression( + params.map(param => { + return j.identifier(param.name); + }), + ); + + const expression = j.template + .expression`dispatchCommand(ref, ${commandNameLiteral}, ${arrayParams})`; + + const functionParams = params.map(param => { + return j.identifier(param.name); + }); + + const property = j.property( + 'init', + commandNameIdentifier, + j.functionExpression( + null, + [j.identifier('ref'), ...functionParams], + j.blockStatement([j.expressionStatement(expression)]), + ), + ); + property.method = true; + + return property; + }); + + return j.exportNamedDeclaration( + j.variableDeclaration('const', [ + j.variableDeclarator( + j.identifier('Commands'), + j.objectExpression(properties), + ), + ]), + ); +} + +module.exports = { + generate(libraryName: string, schema: SchemaType): FilesOutput { + try { + const fileName = `${libraryName}NativeViewConfig.js`; + const imports: Set = new Set(); + + const moduleResults = Object.keys(schema.modules) + .map(moduleName => { + const module = schema.modules[moduleName]; + if (module.type !== 'Component') { + return; + } + + const {components} = module; + + return Object.keys(components) + .map((componentName: string) => { + const component = components[componentName]; + + if (component.paperComponentNameDeprecated) { + imports.add(UIMANAGER_IMPORT); + } + + const replacedTemplate = ComponentTemplate({ + componentName, + paperComponentName: component.paperComponentName, + paperComponentNameDeprecated: + component.paperComponentNameDeprecated, + }); + + const replacedSourceRoot = j.withParser('flow')(replacedTemplate); + + const paperComponentName = + component.paperComponentName ?? componentName; + + replacedSourceRoot + .find(j.Identifier, { + name: 'VIEW_CONFIG', + }) + .replaceWith( + buildViewConfig( + schema, + paperComponentName, + component, + imports, + ), + ); + + const commands = buildCommands( + schema, + paperComponentName, + component, + imports, + ); + if (commands) { + replacedSourceRoot + .find(j.ExportDefaultDeclaration) + .insertAfter(j(commands).toSource()); + } + + const replacedSource: string = replacedSourceRoot.toSource({ + quote: 'single', + trailingComma: true, + }); + + return replacedSource; + }) + .join('\n\n'); + }) + .filter(Boolean) + .join('\n\n'); + + const replacedTemplate = FileTemplate({ + componentConfig: moduleResults, + imports: Array.from(imports).sort().join('\n'), + }); + + return new Map([[fileName, replacedTemplate]]); + } catch (error) { + console.error(`\nError parsing schema for ${libraryName}\n`); + console.error(JSON.stringify(schema)); + throw error; + } + }, +}; diff --git a/packages/react-native-codegen/lib/generators/components/JavaHelpers.js b/packages/react-native-codegen/lib/generators/components/JavaHelpers.js new file mode 100644 index 000000000000..693b65fc0aaa --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/JavaHelpers.js @@ -0,0 +1,103 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function upperCaseFirst(inString) { + return inString[0].toUpperCase() + inString.slice(1); +} +function getInterfaceJavaClassName(componentName) { + return `${componentName.replace(/^RCT/, '')}ManagerInterface`; +} +function getDelegateJavaClassName(componentName) { + return `${componentName.replace(/^RCT/, '')}ManagerDelegate`; +} +function toSafeJavaString(input, shouldUpperCaseFirst) { + const parts = input.split('-'); + if (shouldUpperCaseFirst === false) { + return parts.join(''); + } + return parts.map(upperCaseFirst).join(''); +} +function getImports(component, type) { + const imports = new Set(); + component.extendsProps.forEach(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + imports.add('import android.view.View;'); + return; + default: + extendProps.knownTypeName; + throw new Error('Invalid knownTypeName'); + } + default: + extendProps.type; + throw new Error('Invalid extended type'); + } + }); + function addImportsForNativeName(name) { + switch (name) { + case 'ColorPrimitive': + if (type === 'delegate') { + imports.add('import com.facebook.react.bridge.ColorPropConverter;'); + } + return; + case 'ImageSourcePrimitive': + imports.add('import com.facebook.react.bridge.ReadableMap;'); + return; + case 'PointPrimitive': + imports.add('import com.facebook.react.bridge.ReadableMap;'); + return; + case 'EdgeInsetsPrimitive': + imports.add('import com.facebook.react.bridge.ReadableMap;'); + return; + case 'DimensionPrimitive': + if (type === 'delegate') { + imports.add( + 'import com.facebook.react.bridge.DimensionPropConverter;', + ); + } else { + imports.add('import com.facebook.yoga.YogaValue;'); + } + return; + default: + name; + throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); + } + } + component.props.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + addImportsForNativeName(typeAnnotation.name); + } + if (typeAnnotation.type === 'ArrayTypeAnnotation') { + imports.add('import com.facebook.react.bridge.ReadableArray;'); + } + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + imports.add('import com.facebook.react.bridge.ReadableMap;'); + } + if (typeAnnotation.type === 'MixedTypeAnnotation') { + if (type === 'delegate') { + imports.add('import com.facebook.react.bridge.DynamicFromObject;'); + } else { + imports.add('import com.facebook.react.bridge.Dynamic;'); + } + } + }); + return imports; +} +module.exports = { + getInterfaceJavaClassName, + getDelegateJavaClassName, + toSafeJavaString, + getImports, +}; diff --git a/packages/react-native-codegen/lib/generators/components/JavaHelpers.js.flow b/packages/react-native-codegen/lib/generators/components/JavaHelpers.js.flow new file mode 100644 index 000000000000..48556d47db66 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/JavaHelpers.js.flow @@ -0,0 +1,138 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {ComponentShape} from '../../CodegenSchema'; + +function upperCaseFirst(inString: string): string { + return inString[0].toUpperCase() + inString.slice(1); +} + +function getInterfaceJavaClassName(componentName: string): string { + return `${componentName.replace(/^RCT/, '')}ManagerInterface`; +} + +function getDelegateJavaClassName(componentName: string): string { + return `${componentName.replace(/^RCT/, '')}ManagerDelegate`; +} + +function toSafeJavaString( + input: string, + shouldUpperCaseFirst?: boolean, +): string { + const parts = input.split('-'); + + if (shouldUpperCaseFirst === false) { + return parts.join(''); + } + + return parts.map(upperCaseFirst).join(''); +} + +function getImports( + component: ComponentShape, + type: 'interface' | 'delegate', +): Set { + const imports: Set = new Set(); + + component.extendsProps.forEach(extendProps => { + switch (extendProps.type) { + case 'ReactNativeBuiltInType': + switch (extendProps.knownTypeName) { + case 'ReactNativeCoreViewProps': + imports.add('import android.view.View;'); + return; + default: + (extendProps.knownTypeName: empty); + throw new Error('Invalid knownTypeName'); + } + default: + (extendProps.type: empty); + throw new Error('Invalid extended type'); + } + }); + + function addImportsForNativeName( + name: + | 'ColorPrimitive' + | 'EdgeInsetsPrimitive' + | 'ImageSourcePrimitive' + | 'PointPrimitive' + | 'DimensionPrimitive' + | $TEMPORARY$string<'ColorPrimitive'> + | $TEMPORARY$string<'EdgeInsetsPrimitive'> + | $TEMPORARY$string<'ImageSourcePrimitive'> + | $TEMPORARY$string<'PointPrimitive'> + | $TEMPORARY$string<'DimensionPrimitive'>, + ) { + switch (name) { + case 'ColorPrimitive': + if (type === 'delegate') { + imports.add('import com.facebook.react.bridge.ColorPropConverter;'); + } + return; + case 'ImageSourcePrimitive': + imports.add('import com.facebook.react.bridge.ReadableMap;'); + return; + case 'PointPrimitive': + imports.add('import com.facebook.react.bridge.ReadableMap;'); + return; + case 'EdgeInsetsPrimitive': + imports.add('import com.facebook.react.bridge.ReadableMap;'); + return; + case 'DimensionPrimitive': + if (type === 'delegate') { + imports.add( + 'import com.facebook.react.bridge.DimensionPropConverter;', + ); + } else { + imports.add('import com.facebook.yoga.YogaValue;'); + } + return; + default: + (name: empty); + throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); + } + } + + component.props.forEach(prop => { + const typeAnnotation = prop.typeAnnotation; + + if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { + addImportsForNativeName(typeAnnotation.name); + } + + if (typeAnnotation.type === 'ArrayTypeAnnotation') { + imports.add('import com.facebook.react.bridge.ReadableArray;'); + } + + if (typeAnnotation.type === 'ObjectTypeAnnotation') { + imports.add('import com.facebook.react.bridge.ReadableMap;'); + } + + if (typeAnnotation.type === 'MixedTypeAnnotation') { + if (type === 'delegate') { + imports.add('import com.facebook.react.bridge.DynamicFromObject;'); + } else { + imports.add('import com.facebook.react.bridge.Dynamic;'); + } + } + }); + + return imports; +} + +module.exports = { + getInterfaceJavaClassName, + getDelegateJavaClassName, + toSafeJavaString, + getImports, +}; diff --git a/packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js b/packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js new file mode 100644 index 000000000000..45ca24e2b2a3 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js @@ -0,0 +1,1824 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const NO_PROPS_NO_EVENTS = { + modules: { + NoPropsNoEvents: { + type: 'Component', + components: { + NoPropsNoEventsComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; +const INTERFACE_ONLY = { + modules: { + Switch: { + type: 'Component', + components: { + InterfaceOnlyComponent: { + interfaceOnly: true, + paperComponentName: 'RCTInterfaceOnlyComponent', + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + props: [ + { + name: 'accessibilityHint', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const EVENTS_WITH_PAPER_NAME = { + modules: { + Switch: { + type: 'Component', + components: { + InterfaceOnlyComponent: { + interfaceOnly: true, + paperComponentName: 'RCTInterfaceOnlyComponent', + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + paperTopLevelNameDeprecated: 'paperChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + { + name: 'onDirectChange', + paperTopLevelNameDeprecated: 'paperDirectChange', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + props: [], + commands: [], + }, + }, + }, + }, +}; +const BOOLEAN_PROP = { + modules: { + Switch: { + type: 'Component', + components: { + BooleanPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const STRING_PROP = { + modules: { + Switch: { + type: 'Component', + components: { + StringPropComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'accessibilityHint', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + { + name: 'accessibilityRole', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: null, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const INTEGER_PROPS = { + modules: { + Switch: { + type: 'Component', + components: { + IntegerPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'progress1', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: 0, + }, + }, + { + name: 'progress2', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: -1, + }, + }, + { + name: 'progress3', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: 10, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const FLOAT_PROPS = { + modules: { + Switch: { + type: 'Component', + components: { + FloatPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'blurRadius', + optional: false, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0.0, + }, + }, + { + name: 'blurRadius2', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0.001, + }, + }, + { + name: 'blurRadius3', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 2.1, + }, + }, + { + name: 'blurRadius4', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0, + }, + }, + { + name: 'blurRadius5', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 1, + }, + }, + { + name: 'blurRadius6', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: -0.0, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const DOUBLE_PROPS = { + modules: { + Switch: { + type: 'Component', + components: { + DoublePropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'blurRadius', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 0.0, + }, + }, + { + name: 'blurRadius2', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 0.001, + }, + }, + { + name: 'blurRadius3', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 2.1, + }, + }, + { + name: 'blurRadius4', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 0, + }, + }, + { + name: 'blurRadius5', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 1, + }, + }, + { + name: 'blurRadius6', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: -0.0, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const COLOR_PROP = { + modules: { + Switch: { + type: 'Component', + components: { + ColorPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'tintColor', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const IMAGE_PROP = { + modules: { + Slider: { + type: 'Component', + components: { + ImagePropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'thumbImage', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const POINT_PROP = { + modules: { + Switch: { + type: 'Component', + components: { + PointPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'startPoint', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const INSETS_PROP = { + modules: { + ScrollView: { + type: 'Component', + components: { + InsetsPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'contentInset', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const DIMENSION_PROP = { + modules: { + CustomView: { + type: 'Component', + components: { + DimensionPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'marginBack', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const ARRAY_PROPS = { + modules: { + Slider: { + type: 'Component', + components: { + ArrayPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'names', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + { + name: 'disableds', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'BooleanTypeAnnotation', + }, + }, + }, + { + name: 'progress', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'Int32TypeAnnotation', + }, + }, + }, + { + name: 'radii', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'FloatTypeAnnotation', + }, + }, + }, + { + name: 'colors', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + }, + { + name: 'srcs', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + }, + { + name: 'points', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + }, + { + name: 'dimensions', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }, + }, + }, + { + name: 'sizes', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringEnumTypeAnnotation', + default: 'small', + options: ['small', 'large'], + }, + }, + }, + { + name: 'object', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + { + name: 'array', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + // This needs to stay the same as the object above + // to confirm that the structs are generated + // with unique non-colliding names + name: 'object', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + ], + }, + }, + }, + { + name: 'arrayOfArrayOfObject', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const ARRAY_PROPS_WITH_NESTED_OBJECT = { + modules: { + Slider: { + type: 'Component', + components: { + ArrayPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'nativePrimitives', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'colors', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + }, + { + name: 'srcs', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + }, + { + name: 'points', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + }, + ], + }, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const OBJECT_PROPS = { + modules: { + ObjectPropsNativeComponent: { + type: 'Component', + components: { + ObjectProps: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'objectProp', + optional: true, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + { + name: 'booleanProp', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + { + name: 'floatProp', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0.0, + }, + }, + { + name: 'intProp', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: 0, + }, + }, + { + name: 'stringEnumProp', + optional: true, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + default: 'option1', + options: ['option1'], + }, + }, + { + name: 'intEnumProp', + optional: true, + typeAnnotation: { + type: 'Int32EnumTypeAnnotation', + default: 0, + options: [0], + }, + }, + { + name: 'objectArrayProp', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'array', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + { + name: 'objectPrimitiveRequiredProp', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'image', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + { + name: 'color', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + { + name: 'point', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + ], + }, + }, + { + name: 'nestedPropA', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'nestedPropB', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'nestedPropC', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'nestedArrayAsProperty', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'arrayProp', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + ], + }, + }, + ], + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const MULTI_NATIVE_PROP = { + modules: { + Slider: { + type: 'Component', + components: { + ImageColorPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'thumbImage', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + { + name: 'color', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + { + name: 'thumbTintColor', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + { + name: 'point', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const STRING_ENUM_PROP = { + modules: { + Switch: { + type: 'Component', + components: { + StringEnumPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'alignment', + optional: true, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + default: 'center', + options: ['top', 'center', 'bottom-right'], + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const INT32_ENUM_PROP = { + modules: { + Switch: { + type: 'Component', + components: { + Int32EnumPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'maxInterval', + optional: true, + typeAnnotation: { + type: 'Int32EnumTypeAnnotation', + default: 0, + options: [0, 1, 2], + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const MIXED_PROP = { + modules: { + CustomView: { + type: 'Component', + components: { + MixedPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'mixedProp', + optional: false, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const EVENT_PROPS = { + modules: { + Switch: { + type: 'Component', + components: { + EventsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + name: 'source', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'progress', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'scale', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + }, + }, + ], + }, + }, + }, + { + name: 'onArrayEventType', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'bool_array_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'BooleanTypeAnnotation', + }, + }, + }, + { + name: 'string_enum_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringEnumTypeAnnotation', + options: ['YES', 'NO'], + }, + }, + }, + { + name: 'array_array_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + }, + { + name: 'array_object_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'lat', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }, + { + name: 'lon', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }, + { + name: 'names', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + { + name: 'array_mixed_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'MixedTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + { + name: 'onEventDirect', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + { + name: 'onOrientationChange', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'orientation', + optional: false, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + options: ['landscape', 'portrait'], + }, + }, + ], + }, + }, + }, + { + name: 'onEnd', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + }, + }, + { + name: 'onEventWithMixedPropAttribute', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const EVENT_NESTED_OBJECT_PROPS = { + modules: { + Switch: { + type: 'Component', + components: { + EventsNestedObjectNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'location', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'source', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'url', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + }, + ], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const TWO_COMPONENTS_SAME_FILE = { + modules: { + MyComponents: { + type: 'Component', + components: { + MultiComponent1NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + MultiComponent2NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: true, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const TWO_COMPONENTS_DIFFERENT_FILES = { + modules: { + ComponentFile1: { + type: 'Component', + components: { + MultiFile1NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + ComponentFile2: { + type: 'Component', + components: { + MultiFile2NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: true, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +const COMMANDS = { + modules: { + Switch: { + type: 'Component', + components: { + CommandNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [ + { + name: 'flashScrollIndicators', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + { + name: 'allTypes', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [ + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'FloatTypeAnnotation', + }, + }, + { + name: 'z', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }, + { + name: 'message', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'animated', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + }, +}; +const COMMANDS_AND_PROPS = { + modules: { + Switch: { + type: 'Component', + components: { + CommandNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'accessibilityHint', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + commands: [ + { + name: 'handleRootTag', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [ + { + name: 'rootTag', + optional: false, + typeAnnotation: { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }, + }, + ], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + { + name: 'hotspotUpdate', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [ + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + ], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + }, +}; +const EXCLUDE_ANDROID = { + modules: { + ExcludedAndroid: { + type: 'Component', + components: { + ExcludedAndroidComponent: { + excludedPlatforms: ['android'], + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; +const EXCLUDE_ANDROID_IOS = { + modules: { + ExcludedAndroidIos: { + type: 'Component', + components: { + ExcludedAndroidIosComponent: { + excludedPlatforms: ['android', 'iOS'], + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; +const EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES = { + modules: { + ComponentFile1: { + type: 'Component', + components: { + ExcludedIosComponent: { + excludedPlatforms: ['iOS'], + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + ComponentFile2: { + type: 'Component', + components: { + MultiFileIncludedNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: true, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; +module.exports = { + NO_PROPS_NO_EVENTS, + INTERFACE_ONLY, + BOOLEAN_PROP, + STRING_PROP, + INTEGER_PROPS, + DOUBLE_PROPS, + FLOAT_PROPS, + COLOR_PROP, + IMAGE_PROP, + POINT_PROP, + INSETS_PROP, + DIMENSION_PROP, + ARRAY_PROPS, + ARRAY_PROPS_WITH_NESTED_OBJECT, + OBJECT_PROPS, + MULTI_NATIVE_PROP, + STRING_ENUM_PROP, + INT32_ENUM_PROP, + MIXED_PROP, + EVENT_PROPS, + EVENTS_WITH_PAPER_NAME, + EVENT_NESTED_OBJECT_PROPS, + TWO_COMPONENTS_SAME_FILE, + TWO_COMPONENTS_DIFFERENT_FILES, + COMMANDS, + COMMANDS_AND_PROPS, + EXCLUDE_ANDROID, + EXCLUDE_ANDROID_IOS, + EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES, +}; diff --git a/packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js.flow b/packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js.flow new file mode 100644 index 000000000000..65f7a46d25ba --- /dev/null +++ b/packages/react-native-codegen/lib/generators/components/__test_fixtures__/fixtures.js.flow @@ -0,0 +1,1857 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../../CodegenSchema.js'; + +const NO_PROPS_NO_EVENTS: SchemaType = { + modules: { + NoPropsNoEvents: { + type: 'Component', + components: { + NoPropsNoEventsComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; + +const INTERFACE_ONLY: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + InterfaceOnlyComponent: { + interfaceOnly: true, + paperComponentName: 'RCTInterfaceOnlyComponent', + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + props: [ + { + name: 'accessibilityHint', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const EVENTS_WITH_PAPER_NAME: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + InterfaceOnlyComponent: { + interfaceOnly: true, + paperComponentName: 'RCTInterfaceOnlyComponent', + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + paperTopLevelNameDeprecated: 'paperChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + { + name: 'onDirectChange', + paperTopLevelNameDeprecated: 'paperDirectChange', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + props: [], + commands: [], + }, + }, + }, + }, +}; + +const BOOLEAN_PROP: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + BooleanPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const STRING_PROP: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + StringPropComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'accessibilityHint', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + { + name: 'accessibilityRole', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: null, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const INTEGER_PROPS: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + IntegerPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'progress1', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: 0, + }, + }, + { + name: 'progress2', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: -1, + }, + }, + { + name: 'progress3', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: 10, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const FLOAT_PROPS: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + FloatPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'blurRadius', + optional: false, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0.0, + }, + }, + { + name: 'blurRadius2', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0.001, + }, + }, + { + name: 'blurRadius3', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 2.1, + }, + }, + { + name: 'blurRadius4', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0, + }, + }, + { + name: 'blurRadius5', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 1, + }, + }, + { + name: 'blurRadius6', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: -0.0, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const DOUBLE_PROPS: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + DoublePropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'blurRadius', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 0.0, + }, + }, + { + name: 'blurRadius2', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 0.001, + }, + }, + { + name: 'blurRadius3', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 2.1, + }, + }, + { + name: 'blurRadius4', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 0, + }, + }, + { + name: 'blurRadius5', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: 1, + }, + }, + { + name: 'blurRadius6', + optional: true, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + default: -0.0, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const COLOR_PROP: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + ColorPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'tintColor', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const IMAGE_PROP: SchemaType = { + modules: { + Slider: { + type: 'Component', + components: { + ImagePropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'thumbImage', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const POINT_PROP: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + PointPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'startPoint', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const INSETS_PROP: SchemaType = { + modules: { + ScrollView: { + type: 'Component', + components: { + InsetsPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'contentInset', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const DIMENSION_PROP: SchemaType = { + modules: { + CustomView: { + type: 'Component', + components: { + DimensionPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'marginBack', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const ARRAY_PROPS: SchemaType = { + modules: { + Slider: { + type: 'Component', + components: { + ArrayPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'names', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + { + name: 'disableds', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'BooleanTypeAnnotation', + }, + }, + }, + { + name: 'progress', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'Int32TypeAnnotation', + }, + }, + }, + { + name: 'radii', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'FloatTypeAnnotation', + }, + }, + }, + { + name: 'colors', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + }, + { + name: 'srcs', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + }, + { + name: 'points', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + }, + { + name: 'dimensions', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }, + }, + }, + { + name: 'sizes', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringEnumTypeAnnotation', + default: 'small', + options: ['small', 'large'], + }, + }, + }, + { + name: 'object', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + { + name: 'array', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + // This needs to stay the same as the object above + // to confirm that the structs are generated + // with unique non-colliding names + name: 'object', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + ], + }, + }, + }, + { + name: 'arrayOfArrayOfObject', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const ARRAY_PROPS_WITH_NESTED_OBJECT: SchemaType = { + modules: { + Slider: { + type: 'Component', + components: { + ArrayPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'nativePrimitives', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'colors', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + }, + { + name: 'srcs', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + }, + { + name: 'points', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + }, + ], + }, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const OBJECT_PROPS: SchemaType = { + modules: { + ObjectPropsNativeComponent: { + type: 'Component', + components: { + ObjectProps: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'objectProp', + optional: true, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + { + name: 'booleanProp', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + { + name: 'floatProp', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 0.0, + }, + }, + { + name: 'intProp', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: 0, + }, + }, + { + name: 'stringEnumProp', + optional: true, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + default: 'option1', + options: ['option1'], + }, + }, + { + name: 'intEnumProp', + optional: true, + typeAnnotation: { + type: 'Int32EnumTypeAnnotation', + default: 0, + options: [0], + }, + }, + { + name: 'objectArrayProp', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'array', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + { + name: 'objectPrimitiveRequiredProp', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'image', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + { + name: 'color', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + { + name: 'point', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + ], + }, + }, + { + name: 'nestedPropA', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'nestedPropB', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'nestedPropC', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'nestedArrayAsProperty', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'arrayProp', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'stringProp', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + }, + }, + }, + ], + }, + }, + ], + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const MULTI_NATIVE_PROP: SchemaType = { + modules: { + Slider: { + type: 'Component', + components: { + ImageColorPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'thumbImage', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }, + }, + { + name: 'color', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + { + name: 'thumbTintColor', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }, + { + name: 'point', + optional: true, + typeAnnotation: { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const STRING_ENUM_PROP: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + StringEnumPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'alignment', + optional: true, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + default: 'center', + options: ['top', 'center', 'bottom-right'], + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const INT32_ENUM_PROP: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + Int32EnumPropsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'maxInterval', + optional: true, + typeAnnotation: { + type: 'Int32EnumTypeAnnotation', + default: 0, + options: [0, 1, 2], + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const MIXED_PROP: SchemaType = { + modules: { + CustomView: { + type: 'Component', + components: { + MixedPropNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'mixedProp', + optional: false, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const EVENT_PROPS: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + EventsNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + name: 'source', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'progress', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'scale', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + }, + }, + ], + }, + }, + }, + { + name: 'onArrayEventType', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'bool_array_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'BooleanTypeAnnotation', + }, + }, + }, + { + name: 'string_enum_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringEnumTypeAnnotation', + options: ['YES', 'NO'], + }, + }, + }, + { + name: 'array_array_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + }, + { + name: 'array_object_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'lat', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }, + { + name: 'lon', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }, + { + name: 'names', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + { + name: 'array_mixed_event_prop', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'MixedTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + { + name: 'onEventDirect', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + }, + { + name: 'onOrientationChange', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'orientation', + optional: false, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + options: ['landscape', 'portrait'], + }, + }, + ], + }, + }, + }, + { + name: 'onEnd', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + }, + }, + { + name: 'onEventWithMixedPropAttribute', + optional: true, + bubblingType: 'direct', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const EVENT_NESTED_OBJECT_PROPS: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + EventsNestedObjectNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [ + { + name: 'onChange', + optional: true, + bubblingType: 'bubble', + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'location', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'source', + optional: false, + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'url', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + }, + ], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const TWO_COMPONENTS_SAME_FILE: SchemaType = { + modules: { + MyComponents: { + type: 'Component', + components: { + MultiComponent1NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + + MultiComponent2NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: true, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const TWO_COMPONENTS_DIFFERENT_FILES: SchemaType = { + modules: { + ComponentFile1: { + type: 'Component', + components: { + MultiFile1NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: false, + }, + }, + ], + commands: [], + }, + }, + }, + + ComponentFile2: { + type: 'Component', + components: { + MultiFile2NativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: true, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +const COMMANDS: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + CommandNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [ + { + name: 'flashScrollIndicators', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + { + name: 'allTypes', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [ + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'FloatTypeAnnotation', + }, + }, + { + name: 'z', + optional: false, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }, + { + name: 'message', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'animated', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + }, +}; + +const COMMANDS_AND_PROPS: SchemaType = { + modules: { + Switch: { + type: 'Component', + components: { + CommandNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'accessibilityHint', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: '', + }, + }, + ], + commands: [ + { + name: 'handleRootTag', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [ + { + name: 'rootTag', + optional: false, + typeAnnotation: { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }, + }, + ], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + { + name: 'hotspotUpdate', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [ + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }, + ], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + ], + }, + }, + }, + }, +}; + +const EXCLUDE_ANDROID: SchemaType = { + modules: { + ExcludedAndroid: { + type: 'Component', + components: { + ExcludedAndroidComponent: { + excludedPlatforms: ['android'], + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; + +const EXCLUDE_ANDROID_IOS: SchemaType = { + modules: { + ExcludedAndroidIos: { + type: 'Component', + components: { + ExcludedAndroidIosComponent: { + excludedPlatforms: ['android', 'iOS'], + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; + +const EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES: SchemaType = { + modules: { + ComponentFile1: { + type: 'Component', + components: { + ExcludedIosComponent: { + excludedPlatforms: ['iOS'], + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + ComponentFile2: { + type: 'Component', + components: { + MultiFileIncludedNativeComponent: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [ + { + name: 'disabled', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: true, + }, + }, + ], + commands: [], + }, + }, + }, + }, +}; + +module.exports = { + NO_PROPS_NO_EVENTS, + INTERFACE_ONLY, + BOOLEAN_PROP, + STRING_PROP, + INTEGER_PROPS, + DOUBLE_PROPS, + FLOAT_PROPS, + COLOR_PROP, + IMAGE_PROP, + POINT_PROP, + INSETS_PROP, + DIMENSION_PROP, + ARRAY_PROPS, + ARRAY_PROPS_WITH_NESTED_OBJECT, + OBJECT_PROPS, + MULTI_NATIVE_PROP, + STRING_ENUM_PROP, + INT32_ENUM_PROP, + MIXED_PROP, + EVENT_PROPS, + EVENTS_WITH_PAPER_NAME, + EVENT_NESTED_OBJECT_PROPS, + TWO_COMPONENTS_SAME_FILE, + TWO_COMPONENTS_DIFFERENT_FILES, + COMMANDS, + COMMANDS_AND_PROPS, + EXCLUDE_ANDROID, + EXCLUDE_ANDROID_IOS, + EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js new file mode 100644 index 000000000000..d2773c36d306 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js @@ -0,0 +1,302 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('./Utils'), + createAliasResolver = _require.createAliasResolver, + getModules = _require.getModules; +const _require2 = require('../../parsers/parsers-commons'), + unwrapNullable = _require2.unwrapNullable; +const HostFunctionTemplate = ({ + hasteModuleName, + methodName, + returnTypeAnnotation, + args, +}) => { + const isNullable = returnTypeAnnotation.type === 'NullableTypeAnnotation'; + const isVoid = returnTypeAnnotation.type === 'VoidTypeAnnotation'; + const methodCallArgs = [' rt', ...args].join(',\n '); + const methodCall = `static_cast<${hasteModuleName}CxxSpecJSI *>(&turboModule)->${methodName}(\n${methodCallArgs}\n )`; + return `static jsi::Value __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {${ + isVoid + ? `\n ${methodCall};` + : isNullable + ? `\n auto result = ${methodCall};` + : '' + } + return ${ + isVoid + ? 'jsi::Value::undefined()' + : isNullable + ? 'result ? jsi::Value(std::move(*result)) : jsi::Value::null()' + : methodCall + }; +}`; +}; +const ModuleTemplate = ({ + hasteModuleName, + hostFunctions, + moduleName, + methods, +}) => { + return `${hostFunctions.join('\n')} + +${hasteModuleName}CxxSpecJSI::${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker) + : TurboModule("${moduleName}", jsInvoker) { +${methods + .map(({methodName, paramCount}) => { + return ` methodMap_["${methodName}"] = MethodMetadata {${paramCount}, __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}};`; + }) + .join('\n')} +}`; +}; +const FileTemplate = ({libraryName, modules}) => { + return `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleCpp.js + */ + +#include "${libraryName}JSI.h" + +namespace facebook { +namespace react { + +${modules} + + +} // namespace react +} // namespace facebook +`; +}; +function serializeArg(moduleName, arg, index, resolveAlias, enumMap) { + const nullableTypeAnnotation = arg.typeAnnotation, + optional = arg.optional; + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + typeAnnotation = _unwrapNullable2[0], + nullable = _unwrapNullable2[1]; + const isRequired = !optional && !nullable; + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + function wrap(callback) { + const val = `args[${index}]`; + const expression = callback(val); + if (isRequired) { + return expression; + } else { + let condition = `${val}.isNull() || ${val}.isUndefined()`; + if (optional) { + condition = `count <= ${index} || ${condition}`; + } + return `${condition} ? std::nullopt : std::make_optional(${expression})`; + } + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrap(val => `${val}.getNumber()`); + default: + realTypeAnnotation.name; + throw new Error( + `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.name}"`, + ); + } + case 'StringTypeAnnotation': + return wrap(val => `${val}.asString(rt)`); + case 'BooleanTypeAnnotation': + return wrap(val => `${val}.asBool()`); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'StringTypeAnnotation': + return wrap(val => `${val}.asString(rt)`); + default: + throw new Error( + `Unknown enum type for "${arg.name}, found: ${realTypeAnnotation.type}"`, + ); + } + case 'NumberTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'FloatTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'DoubleTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'Int32TypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'ArrayTypeAnnotation': + return wrap(val => `${val}.asObject(rt).asArray(rt)`); + case 'FunctionTypeAnnotation': + return wrap(val => `${val}.asObject(rt).asFunction(rt)`); + case 'GenericObjectTypeAnnotation': + return wrap(val => `${val}.asObject(rt)`); + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'ObjectTypeAnnotation': + return wrap(val => `${val}.asObject(rt)`); + case 'StringTypeAnnotation': + return wrap(val => `${val}.asString(rt)`); + default: + throw new Error( + `Unsupported union member type for param "${arg.name}, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'ObjectTypeAnnotation': + return wrap(val => `${val}.asObject(rt)`); + case 'MixedTypeAnnotation': + return wrap(val => `jsi::Value(rt, ${val})`); + default: + realTypeAnnotation.type; + throw new Error( + `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.type}"`, + ); + } +} +function serializePropertyIntoHostFunction( + moduleName, + hasteModuleName, + property, + resolveAlias, + enumMap, +) { + const _unwrapNullable3 = unwrapNullable(property.typeAnnotation), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 1), + propertyTypeAnnotation = _unwrapNullable4[0]; + return HostFunctionTemplate({ + hasteModuleName, + methodName: property.name, + returnTypeAnnotation: propertyTypeAnnotation.returnTypeAnnotation, + args: propertyTypeAnnotation.params.map((p, i) => + serializeArg(moduleName, p, i, resolveAlias, enumMap), + ), + }); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const nativeModules = getModules(schema); + const modules = Object.keys(nativeModules) + .map(hasteModuleName => { + const nativeModule = nativeModules[hasteModuleName]; + const aliasMap = nativeModule.aliasMap, + enumMap = nativeModule.enumMap, + properties = nativeModule.spec.properties, + moduleName = nativeModule.moduleName; + const resolveAlias = createAliasResolver(aliasMap); + const hostFunctions = properties.map(property => + serializePropertyIntoHostFunction( + moduleName, + hasteModuleName, + property, + resolveAlias, + enumMap, + ), + ); + return ModuleTemplate({ + hasteModuleName, + hostFunctions, + moduleName, + methods: properties.map( + ({name: propertyName, typeAnnotation: nullableTypeAnnotation}) => { + const _unwrapNullable5 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 1), + params = _unwrapNullable6[0].params; + return { + methodName: propertyName, + paramCount: params.length, + }; + }, + ), + }); + }) + .join('\n'); + const fileName = `${libraryName}JSI-generated.cpp`; + const replacedTemplate = FileTemplate({ + modules, + libraryName, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js.flow new file mode 100644 index 000000000000..fa02920516e5 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleCpp.js.flow @@ -0,0 +1,286 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + SchemaType, + Nullable, + NamedShape, + NativeModulePropertyShape, + NativeModuleFunctionTypeAnnotation, + NativeModuleParamTypeAnnotation, + NativeModuleTypeAnnotation, + NativeModuleEnumMap, +} from '../../CodegenSchema'; + +import type {AliasResolver} from './Utils'; +const {createAliasResolver, getModules} = require('./Utils'); +const {unwrapNullable} = require('../../parsers/parsers-commons'); + +type FilesOutput = Map; + +const HostFunctionTemplate = ({ + hasteModuleName, + methodName, + returnTypeAnnotation, + args, +}: $ReadOnly<{ + hasteModuleName: string, + methodName: string, + returnTypeAnnotation: Nullable, + args: Array, +}>) => { + const isNullable = returnTypeAnnotation.type === 'NullableTypeAnnotation'; + const isVoid = returnTypeAnnotation.type === 'VoidTypeAnnotation'; + const methodCallArgs = [' rt', ...args].join(',\n '); + const methodCall = `static_cast<${hasteModuleName}CxxSpecJSI *>(&turboModule)->${methodName}(\n${methodCallArgs}\n )`; + + return `static jsi::Value __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {${ + isVoid + ? `\n ${methodCall};` + : isNullable + ? `\n auto result = ${methodCall};` + : '' + } + return ${ + isVoid + ? 'jsi::Value::undefined()' + : isNullable + ? 'result ? jsi::Value(std::move(*result)) : jsi::Value::null()' + : methodCall + }; +}`; +}; + +const ModuleTemplate = ({ + hasteModuleName, + hostFunctions, + moduleName, + methods, +}: $ReadOnly<{ + hasteModuleName: string, + hostFunctions: $ReadOnlyArray, + moduleName: string, + methods: $ReadOnlyArray<$ReadOnly<{methodName: string, paramCount: number}>>, +}>) => { + return `${hostFunctions.join('\n')} + +${hasteModuleName}CxxSpecJSI::${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker) + : TurboModule("${moduleName}", jsInvoker) { +${methods + .map(({methodName, paramCount}) => { + return ` methodMap_["${methodName}"] = MethodMetadata {${paramCount}, __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}};`; + }) + .join('\n')} +}`; +}; + +const FileTemplate = ({ + libraryName, + modules, +}: $ReadOnly<{ + libraryName: string, + modules: string, +}>) => { + return `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleCpp.js + */ + +#include "${libraryName}JSI.h" + +namespace facebook { +namespace react { + +${modules} + + +} // namespace react +} // namespace facebook +`; +}; + +type Param = NamedShape>; + +function serializeArg( + moduleName: string, + arg: Param, + index: number, + resolveAlias: AliasResolver, + enumMap: NativeModuleEnumMap, +): string { + const {typeAnnotation: nullableTypeAnnotation, optional} = arg; + const [typeAnnotation, nullable] = + unwrapNullable(nullableTypeAnnotation); + const isRequired = !optional && !nullable; + + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + function wrap(callback: (val: string) => string) { + const val = `args[${index}]`; + const expression = callback(val); + if (isRequired) { + return expression; + } else { + let condition = `${val}.isNull() || ${val}.isUndefined()`; + if (optional) { + condition = `count <= ${index} || ${condition}`; + } + return `${condition} ? std::nullopt : std::make_optional(${expression})`; + } + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrap(val => `${val}.getNumber()`); + default: + (realTypeAnnotation.name: empty); + throw new Error( + `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.name}"`, + ); + } + case 'StringTypeAnnotation': + return wrap(val => `${val}.asString(rt)`); + case 'BooleanTypeAnnotation': + return wrap(val => `${val}.asBool()`); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'StringTypeAnnotation': + return wrap(val => `${val}.asString(rt)`); + default: + throw new Error( + `Unknown enum type for "${arg.name}, found: ${realTypeAnnotation.type}"`, + ); + } + case 'NumberTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'FloatTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'DoubleTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'Int32TypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'ArrayTypeAnnotation': + return wrap(val => `${val}.asObject(rt).asArray(rt)`); + case 'FunctionTypeAnnotation': + return wrap(val => `${val}.asObject(rt).asFunction(rt)`); + case 'GenericObjectTypeAnnotation': + return wrap(val => `${val}.asObject(rt)`); + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrap(val => `${val}.asNumber()`); + case 'ObjectTypeAnnotation': + return wrap(val => `${val}.asObject(rt)`); + case 'StringTypeAnnotation': + return wrap(val => `${val}.asString(rt)`); + default: + throw new Error( + `Unsupported union member type for param "${arg.name}, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'ObjectTypeAnnotation': + return wrap(val => `${val}.asObject(rt)`); + case 'MixedTypeAnnotation': + return wrap(val => `jsi::Value(rt, ${val})`); + default: + (realTypeAnnotation.type: empty); + throw new Error( + `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.type}"`, + ); + } +} + +function serializePropertyIntoHostFunction( + moduleName: string, + hasteModuleName: string, + property: NativeModulePropertyShape, + resolveAlias: AliasResolver, + enumMap: NativeModuleEnumMap, +): string { + const [propertyTypeAnnotation] = + unwrapNullable(property.typeAnnotation); + + return HostFunctionTemplate({ + hasteModuleName, + methodName: property.name, + returnTypeAnnotation: propertyTypeAnnotation.returnTypeAnnotation, + args: propertyTypeAnnotation.params.map((p, i) => + serializeArg(moduleName, p, i, resolveAlias, enumMap), + ), + }); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const nativeModules = getModules(schema); + + const modules = Object.keys(nativeModules) + .map((hasteModuleName: string) => { + const nativeModule = nativeModules[hasteModuleName]; + const { + aliasMap, + enumMap, + spec: {properties}, + moduleName, + } = nativeModule; + const resolveAlias = createAliasResolver(aliasMap); + const hostFunctions = properties.map(property => + serializePropertyIntoHostFunction( + moduleName, + hasteModuleName, + property, + resolveAlias, + enumMap, + ), + ); + + return ModuleTemplate({ + hasteModuleName, + hostFunctions, + moduleName, + methods: properties.map( + ({name: propertyName, typeAnnotation: nullableTypeAnnotation}) => { + const [{params}] = unwrapNullable(nullableTypeAnnotation); + return { + methodName: propertyName, + paramCount: params.length, + }; + }, + ), + }); + }) + .join('\n'); + + const fileName = `${libraryName}JSI-generated.cpp`; + const replacedTemplate = FileTemplate({ + modules, + libraryName, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js new file mode 100644 index 000000000000..7765fc339554 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js @@ -0,0 +1,528 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('../Utils'), + getEnumName = _require.getEnumName, + toSafeCppString = _require.toSafeCppString; +const _require2 = require('./Utils'), + createAliasResolver = _require2.createAliasResolver, + getModules = _require2.getModules, + getAreEnumMembersInteger = _require2.getAreEnumMembersInteger; +const _require3 = require('../Utils'), + indent = _require3.indent; +const _require4 = require('../../parsers/parsers-commons'), + unwrapNullable = _require4.unwrapNullable; +const ModuleClassDeclarationTemplate = ({ + hasteModuleName, + moduleProperties, + structs, + enums, +}) => { + return `${enums} + ${structs}class JSI_EXPORT ${hasteModuleName}CxxSpecJSI : public TurboModule { +protected: + ${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker); + +public: + ${indent(moduleProperties.join('\n'), 2)} + +};`; +}; +const ModuleSpecClassDeclarationTemplate = ({ + hasteModuleName, + moduleName, + moduleProperties, +}) => { + return `template +class JSI_EXPORT ${hasteModuleName}CxxSpec : public TurboModule { +public: + jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override { + return delegate_.get(rt, propName); + } + + static constexpr std::string_view kModuleName = "${moduleName}"; + +protected: + ${hasteModuleName}CxxSpec(std::shared_ptr jsInvoker) + : TurboModule(std::string{${hasteModuleName}CxxSpec::kModuleName}, jsInvoker), + delegate_(static_cast(this), jsInvoker) {} + +private: + class Delegate : public ${hasteModuleName}CxxSpecJSI { + public: + Delegate(T *instance, std::shared_ptr jsInvoker) : + ${hasteModuleName}CxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} + + ${indent(moduleProperties.join('\n'), 4)} + + private: + T *instance_; + }; + + Delegate delegate_; +};`; +}; +const FileTemplate = ({modules}) => { + return `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleH.js + */ + +#pragma once + +#include +#include + +namespace facebook { +namespace react { + +${modules.join('\n\n')} + +} // namespace react +} // namespace facebook +`; +}; +function translatePrimitiveJSTypeToCpp( + moduleName, + nullableTypeAnnotation, + optional, + createErrorMessage, + resolveAlias, + enumMap, +) { + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + typeAnnotation = _unwrapNullable2[0], + nullable = _unwrapNullable2[1]; + const isRequired = !optional && !nullable; + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + function wrap(type) { + return isRequired ? type : `std::optional<${type}>`; + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrap('double'); + default: + realTypeAnnotation.name; + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'VoidTypeAnnotation': + return 'void'; + case 'StringTypeAnnotation': + return wrap('jsi::String'); + case 'NumberTypeAnnotation': + return wrap('double'); + case 'DoubleTypeAnnotation': + return wrap('double'); + case 'FloatTypeAnnotation': + return wrap('double'); + case 'Int32TypeAnnotation': + return wrap('int'); + case 'BooleanTypeAnnotation': + return wrap('bool'); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return getAreEnumMembersInteger( + enumMap[realTypeAnnotation.name].members, + ) + ? wrap('int') + : wrap('double'); + case 'StringTypeAnnotation': + return wrap('jsi::String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'GenericObjectTypeAnnotation': + return wrap('jsi::Object'); + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrap('double'); + case 'ObjectTypeAnnotation': + return wrap('jsi::Object'); + case 'StringTypeAnnotation': + return wrap('jsi::String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'ObjectTypeAnnotation': + return wrap('jsi::Object'); + case 'ArrayTypeAnnotation': + return wrap('jsi::Array'); + case 'FunctionTypeAnnotation': + return wrap('jsi::Function'); + case 'PromiseTypeAnnotation': + return wrap('jsi::Value'); + case 'MixedTypeAnnotation': + return wrap('jsi::Value'); + default: + realTypeAnnotation.type; + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} +function createStructsString(moduleName, aliasMap, resolveAlias, enumMap) { + const getCppType = v => + translatePrimitiveJSTypeToCpp( + moduleName, + v.typeAnnotation, + false, + typeName => `Unsupported type for param "${v.name}". Found: ${typeName}`, + resolveAlias, + enumMap, + ); + return Object.keys(aliasMap) + .map(alias => { + const value = aliasMap[alias]; + if (value.properties.length === 0) { + return ''; + } + const structName = `${moduleName}Base${alias}`; + const templateParameterWithTypename = value.properties + .map((v, i) => `typename P${i}`) + .join(', '); + const templateParameter = value.properties + .map((v, i) => 'P' + i) + .join(', '); + const debugParameterConversion = value.properties + .map( + (v, i) => ` static ${getCppType(v)} ${ + v.name + }ToJs(jsi::Runtime &rt, P${i} value) { + return bridging::toJs(rt, value); + }`, + ) + .join('\n\n'); + return ` +#pragma mark - ${structName} + +template <${templateParameterWithTypename}> +struct ${structName} { +${value.properties.map((v, i) => ' P' + i + ' ' + v.name).join(';\n')}; + bool operator==(const ${structName} &other) const { + return ${value.properties + .map(v => `${v.name} == other.${v.name}`) + .join(' && ')}; + } +}; + +template <${templateParameterWithTypename}> +struct ${structName}Bridging { + static ${structName}<${templateParameter}> fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + ${structName}<${templateParameter}> result{ +${value.properties + .map( + (v, i) => + ` bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)`, + ) + .join(',\n')}}; + return result; + } + +#ifdef DEBUG +${debugParameterConversion} +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const ${structName}<${templateParameter}> &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); +${value.properties + .map((v, i) => { + if (v.optional) { + return ` if (value.${v.name}) { + result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}.value(), jsInvoker)); + }`; + } else { + return ` result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}, jsInvoker));`; + } + }) + .join('\n')} + return result; + } +}; + +`; + }) + .join('\n'); +} +const EnumTemplate = ({ + enumName, + values, + fromCases, + toCases, + nativeEnumMemberType, +}) => { + const _ref = + nativeEnumMemberType === 'std::string' + ? [ + 'const jsi::String &rawValue', + 'std::string value = rawValue.utf8(rt);', + 'jsi::String', + ] + : [ + 'const jsi::Value &rawValue', + 'double value = (double)rawValue.asNumber();', + 'jsi::Value', + ], + _ref2 = _slicedToArray(_ref, 3), + fromValue = _ref2[0], + fromValueConversion = _ref2[1], + toValue = _ref2[2]; + return ` +#pragma mark - ${enumName} + +enum ${enumName} { ${values} }; + +template <> +struct Bridging<${enumName}> { + static ${enumName} fromJs(jsi::Runtime &rt, ${fromValue}) { + ${fromValueConversion} + ${fromCases} + } + + static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value) { + ${toCases} + } +};`; +}; +function generateEnum(moduleName, origEnumName, members, memberType) { + const enumName = getEnumName(moduleName, origEnumName); + const nativeEnumMemberType = + memberType === 'StringTypeAnnotation' + ? 'std::string' + : getAreEnumMembersInteger(members) + ? 'int32_t' + : 'float'; + const getMemberValueAppearance = value => + memberType === 'StringTypeAnnotation' + ? `"${value}"` + : `${value}${nativeEnumMemberType === 'float' ? 'f' : ''}`; + const fromCases = + members + .map( + member => `if (value == ${getMemberValueAppearance(member.value)}) { + return ${enumName}::${toSafeCppString(member.name)}; + }`, + ) + .join(' else ') + + ` else { + throw jsi::JSError(rt, "No appropriate enum member found for value"); + }`; + const toCases = + members + .map( + member => `if (value == ${enumName}::${toSafeCppString(member.name)}) { + return bridging::toJs(rt, ${getMemberValueAppearance(member.value)}); + }`, + ) + .join(' else ') + + ` else { + throw jsi::JSError(rt, "No appropriate enum member found for enum value"); + }`; + return EnumTemplate({ + enumName, + values: members.map(member => member.name).join(', '), + fromCases, + toCases, + nativeEnumMemberType, + }); +} +function createEnums(moduleName, enumMap, resolveAlias) { + return Object.entries(enumMap) + .map(([enumName, enumNode]) => { + return generateEnum( + moduleName, + enumName, + enumNode.members, + enumNode.memberType, + ); + }) + .filter(Boolean) + .join('\n'); +} +function translatePropertyToCpp( + moduleName, + prop, + resolveAlias, + enumMap, + abstract = false, +) { + const _unwrapNullable3 = unwrapNullable(prop.typeAnnotation), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 1), + propTypeAnnotation = _unwrapNullable4[0]; + const params = propTypeAnnotation.params.map( + param => `std::move(${param.name})`, + ); + const paramTypes = propTypeAnnotation.params.map(param => { + const translatedParam = translatePrimitiveJSTypeToCpp( + moduleName, + param.typeAnnotation, + param.optional, + typeName => + `Unsupported type for param "${param.name}" in ${prop.name}. Found: ${typeName}`, + resolveAlias, + enumMap, + ); + return `${translatedParam} ${param.name}`; + }); + const returnType = translatePrimitiveJSTypeToCpp( + moduleName, + propTypeAnnotation.returnTypeAnnotation, + false, + typeName => `Unsupported return type for ${prop.name}. Found: ${typeName}`, + resolveAlias, + enumMap, + ); + + // The first param will always be the runtime reference. + paramTypes.unshift('jsi::Runtime &rt'); + const method = `${returnType} ${prop.name}(${paramTypes.join(', ')})`; + if (abstract) { + return `virtual ${method} = 0;`; + } + return `${method} override { + static_assert( + bridging::getParameterCount(&T::${prop.name}) == ${paramTypes.length}, + "Expected ${prop.name}(...) to have ${paramTypes.length} parameters"); + + return bridging::callFromJs<${returnType}>( + rt, &T::${prop.name}, jsInvoker_, ${['instance_', ...params].join(', ')}); +}`; +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const nativeModules = getModules(schema); + const modules = Object.keys(nativeModules).flatMap(hasteModuleName => { + const _nativeModules$hasteM = nativeModules[hasteModuleName], + aliasMap = _nativeModules$hasteM.aliasMap, + enumMap = _nativeModules$hasteM.enumMap, + properties = _nativeModules$hasteM.spec.properties, + moduleName = _nativeModules$hasteM.moduleName; + const resolveAlias = createAliasResolver(aliasMap); + const structs = createStructsString( + moduleName, + aliasMap, + resolveAlias, + enumMap, + ); + const enums = createEnums(moduleName, enumMap, resolveAlias); + return [ + ModuleClassDeclarationTemplate({ + hasteModuleName, + moduleProperties: properties.map(prop => + translatePropertyToCpp( + moduleName, + prop, + resolveAlias, + enumMap, + true, + ), + ), + structs, + enums, + }), + ModuleSpecClassDeclarationTemplate({ + hasteModuleName, + moduleName, + moduleProperties: properties.map(prop => + translatePropertyToCpp(moduleName, prop, resolveAlias, enumMap), + ), + }), + ]; + }); + const fileName = `${libraryName}JSI.h`; + const replacedTemplate = FileTemplate({ + modules, + }); + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js.flow new file mode 100644 index 000000000000..e2107bde8f8f --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleH.js.flow @@ -0,0 +1,545 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type { + NativeModuleBaseTypeAnnotation, + NamedShape, +} from '../../CodegenSchema'; + +import type { + Nullable, + SchemaType, + NativeModuleTypeAnnotation, + NativeModuleFunctionTypeAnnotation, + NativeModulePropertyShape, + NativeModuleAliasMap, + NativeModuleEnumMap, + NativeModuleEnumMembers, + NativeModuleEnumMemberType, +} from '../../CodegenSchema'; + +import type {AliasResolver} from './Utils'; + +const {getEnumName, toSafeCppString} = require('../Utils'); + +const { + createAliasResolver, + getModules, + getAreEnumMembersInteger, +} = require('./Utils'); +const {indent} = require('../Utils'); +const {unwrapNullable} = require('../../parsers/parsers-commons'); + +type FilesOutput = Map; + +const ModuleClassDeclarationTemplate = ({ + hasteModuleName, + moduleProperties, + structs, + enums, +}: $ReadOnly<{ + hasteModuleName: string, + moduleProperties: string[], + structs: string, + enums: string, +}>) => { + return `${enums} + ${structs}class JSI_EXPORT ${hasteModuleName}CxxSpecJSI : public TurboModule { +protected: + ${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker); + +public: + ${indent(moduleProperties.join('\n'), 2)} + +};`; +}; + +const ModuleSpecClassDeclarationTemplate = ({ + hasteModuleName, + moduleName, + moduleProperties, +}: $ReadOnly<{ + hasteModuleName: string, + moduleName: string, + moduleProperties: string[], +}>) => { + return `template +class JSI_EXPORT ${hasteModuleName}CxxSpec : public TurboModule { +public: + jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override { + return delegate_.get(rt, propName); + } + + static constexpr std::string_view kModuleName = "${moduleName}"; + +protected: + ${hasteModuleName}CxxSpec(std::shared_ptr jsInvoker) + : TurboModule(std::string{${hasteModuleName}CxxSpec::kModuleName}, jsInvoker), + delegate_(static_cast(this), jsInvoker) {} + +private: + class Delegate : public ${hasteModuleName}CxxSpecJSI { + public: + Delegate(T *instance, std::shared_ptr jsInvoker) : + ${hasteModuleName}CxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} + + ${indent(moduleProperties.join('\n'), 4)} + + private: + T *instance_; + }; + + Delegate delegate_; +};`; +}; + +const FileTemplate = ({ + modules, +}: $ReadOnly<{ + modules: string[], +}>) => { + return `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleH.js + */ + +#pragma once + +#include +#include + +namespace facebook { +namespace react { + +${modules.join('\n\n')} + +} // namespace react +} // namespace facebook +`; +}; + +function translatePrimitiveJSTypeToCpp( + moduleName: string, + nullableTypeAnnotation: Nullable, + optional: boolean, + createErrorMessage: (typeName: string) => string, + resolveAlias: AliasResolver, + enumMap: NativeModuleEnumMap, +) { + const [typeAnnotation, nullable] = unwrapNullable( + nullableTypeAnnotation, + ); + const isRequired = !optional && !nullable; + + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + function wrap(type: string) { + return isRequired ? type : `std::optional<${type}>`; + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrap('double'); + default: + (realTypeAnnotation.name: empty); + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'VoidTypeAnnotation': + return 'void'; + case 'StringTypeAnnotation': + return wrap('jsi::String'); + case 'NumberTypeAnnotation': + return wrap('double'); + case 'DoubleTypeAnnotation': + return wrap('double'); + case 'FloatTypeAnnotation': + return wrap('double'); + case 'Int32TypeAnnotation': + return wrap('int'); + case 'BooleanTypeAnnotation': + return wrap('bool'); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return getAreEnumMembersInteger( + enumMap[realTypeAnnotation.name].members, + ) + ? wrap('int') + : wrap('double'); + case 'StringTypeAnnotation': + return wrap('jsi::String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'GenericObjectTypeAnnotation': + return wrap('jsi::Object'); + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrap('double'); + case 'ObjectTypeAnnotation': + return wrap('jsi::Object'); + case 'StringTypeAnnotation': + return wrap('jsi::String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'ObjectTypeAnnotation': + return wrap('jsi::Object'); + case 'ArrayTypeAnnotation': + return wrap('jsi::Array'); + case 'FunctionTypeAnnotation': + return wrap('jsi::Function'); + case 'PromiseTypeAnnotation': + return wrap('jsi::Value'); + case 'MixedTypeAnnotation': + return wrap('jsi::Value'); + default: + (realTypeAnnotation.type: empty); + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} + +function createStructsString( + moduleName: string, + aliasMap: NativeModuleAliasMap, + resolveAlias: AliasResolver, + enumMap: NativeModuleEnumMap, +): string { + const getCppType = ( + v: NamedShape>, + ) => + translatePrimitiveJSTypeToCpp( + moduleName, + v.typeAnnotation, + false, + typeName => `Unsupported type for param "${v.name}". Found: ${typeName}`, + resolveAlias, + enumMap, + ); + + return Object.keys(aliasMap) + .map(alias => { + const value = aliasMap[alias]; + if (value.properties.length === 0) { + return ''; + } + const structName = `${moduleName}Base${alias}`; + const templateParameterWithTypename = value.properties + .map((v, i) => `typename P${i}`) + .join(', '); + const templateParameter = value.properties + .map((v, i) => 'P' + i) + .join(', '); + const debugParameterConversion = value.properties + .map( + (v, i) => ` static ${getCppType(v)} ${ + v.name + }ToJs(jsi::Runtime &rt, P${i} value) { + return bridging::toJs(rt, value); + }`, + ) + .join('\n\n'); + return ` +#pragma mark - ${structName} + +template <${templateParameterWithTypename}> +struct ${structName} { +${value.properties.map((v, i) => ' P' + i + ' ' + v.name).join(';\n')}; + bool operator==(const ${structName} &other) const { + return ${value.properties + .map(v => `${v.name} == other.${v.name}`) + .join(' && ')}; + } +}; + +template <${templateParameterWithTypename}> +struct ${structName}Bridging { + static ${structName}<${templateParameter}> fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + ${structName}<${templateParameter}> result{ +${value.properties + .map( + (v, i) => + ` bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)`, + ) + .join(',\n')}}; + return result; + } + +#ifdef DEBUG +${debugParameterConversion} +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const ${structName}<${templateParameter}> &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); +${value.properties + .map((v, i) => { + if (v.optional) { + return ` if (value.${v.name}) { + result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}.value(), jsInvoker)); + }`; + } else { + return ` result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}, jsInvoker));`; + } + }) + .join('\n')} + return result; + } +}; + +`; + }) + .join('\n'); +} + +type NativeEnumMemberValueType = 'std::string' | 'int32_t' | 'float'; + +const EnumTemplate = ({ + enumName, + values, + fromCases, + toCases, + nativeEnumMemberType, +}: { + enumName: string, + values: string, + fromCases: string, + toCases: string, + nativeEnumMemberType: NativeEnumMemberValueType, +}) => { + const [fromValue, fromValueConversion, toValue] = + nativeEnumMemberType === 'std::string' + ? [ + 'const jsi::String &rawValue', + 'std::string value = rawValue.utf8(rt);', + 'jsi::String', + ] + : [ + 'const jsi::Value &rawValue', + 'double value = (double)rawValue.asNumber();', + 'jsi::Value', + ]; + + return ` +#pragma mark - ${enumName} + +enum ${enumName} { ${values} }; + +template <> +struct Bridging<${enumName}> { + static ${enumName} fromJs(jsi::Runtime &rt, ${fromValue}) { + ${fromValueConversion} + ${fromCases} + } + + static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value) { + ${toCases} + } +};`; +}; + +function generateEnum( + moduleName: string, + origEnumName: string, + members: NativeModuleEnumMembers, + memberType: NativeModuleEnumMemberType, +): string { + const enumName = getEnumName(moduleName, origEnumName); + + const nativeEnumMemberType: NativeEnumMemberValueType = + memberType === 'StringTypeAnnotation' + ? 'std::string' + : getAreEnumMembersInteger(members) + ? 'int32_t' + : 'float'; + + const getMemberValueAppearance = (value: string) => + memberType === 'StringTypeAnnotation' + ? `"${value}"` + : `${value}${nativeEnumMemberType === 'float' ? 'f' : ''}`; + + const fromCases = + members + .map( + member => `if (value == ${getMemberValueAppearance(member.value)}) { + return ${enumName}::${toSafeCppString(member.name)}; + }`, + ) + .join(' else ') + + ` else { + throw jsi::JSError(rt, "No appropriate enum member found for value"); + }`; + + const toCases = + members + .map( + member => `if (value == ${enumName}::${toSafeCppString(member.name)}) { + return bridging::toJs(rt, ${getMemberValueAppearance(member.value)}); + }`, + ) + .join(' else ') + + ` else { + throw jsi::JSError(rt, "No appropriate enum member found for enum value"); + }`; + + return EnumTemplate({ + enumName, + values: members.map(member => member.name).join(', '), + fromCases, + toCases, + nativeEnumMemberType, + }); +} + +function createEnums( + moduleName: string, + enumMap: NativeModuleEnumMap, + resolveAlias: AliasResolver, +): string { + return Object.entries(enumMap) + .map(([enumName, enumNode]) => { + return generateEnum( + moduleName, + enumName, + enumNode.members, + enumNode.memberType, + ); + }) + .filter(Boolean) + .join('\n'); +} + +function translatePropertyToCpp( + moduleName: string, + prop: NativeModulePropertyShape, + resolveAlias: AliasResolver, + enumMap: NativeModuleEnumMap, + abstract: boolean = false, +) { + const [propTypeAnnotation] = + unwrapNullable(prop.typeAnnotation); + + const params = propTypeAnnotation.params.map( + param => `std::move(${param.name})`, + ); + + const paramTypes = propTypeAnnotation.params.map(param => { + const translatedParam = translatePrimitiveJSTypeToCpp( + moduleName, + param.typeAnnotation, + param.optional, + typeName => + `Unsupported type for param "${param.name}" in ${prop.name}. Found: ${typeName}`, + resolveAlias, + enumMap, + ); + return `${translatedParam} ${param.name}`; + }); + + const returnType = translatePrimitiveJSTypeToCpp( + moduleName, + propTypeAnnotation.returnTypeAnnotation, + false, + typeName => `Unsupported return type for ${prop.name}. Found: ${typeName}`, + resolveAlias, + enumMap, + ); + + // The first param will always be the runtime reference. + paramTypes.unshift('jsi::Runtime &rt'); + + const method = `${returnType} ${prop.name}(${paramTypes.join(', ')})`; + + if (abstract) { + return `virtual ${method} = 0;`; + } + + return `${method} override { + static_assert( + bridging::getParameterCount(&T::${prop.name}) == ${paramTypes.length}, + "Expected ${prop.name}(...) to have ${paramTypes.length} parameters"); + + return bridging::callFromJs<${returnType}>( + rt, &T::${prop.name}, jsInvoker_, ${['instance_', ...params].join(', ')}); +}`; +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const nativeModules = getModules(schema); + + const modules = Object.keys(nativeModules).flatMap(hasteModuleName => { + const { + aliasMap, + enumMap, + spec: {properties}, + moduleName, + } = nativeModules[hasteModuleName]; + const resolveAlias = createAliasResolver(aliasMap); + const structs = createStructsString( + moduleName, + aliasMap, + resolveAlias, + enumMap, + ); + const enums = createEnums(moduleName, enumMap, resolveAlias); + + return [ + ModuleClassDeclarationTemplate({ + hasteModuleName, + moduleProperties: properties.map(prop => + translatePropertyToCpp( + moduleName, + prop, + resolveAlias, + enumMap, + true, + ), + ), + structs, + enums, + }), + ModuleSpecClassDeclarationTemplate({ + hasteModuleName, + moduleName, + moduleProperties: properties.map(prop => + translatePropertyToCpp(moduleName, prop, resolveAlias, enumMap), + ), + }), + ]; + }); + + const fileName = `${libraryName}JSI.h`; + const replacedTemplate = FileTemplate({modules}); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js new file mode 100644 index 000000000000..196bad6f5b23 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js @@ -0,0 +1,570 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('./Utils'), + createAliasResolver = _require.createAliasResolver, + getModules = _require.getModules; +const _require2 = require('../../parsers/parsers-commons'), + unwrapNullable = _require2.unwrapNullable; +function FileTemplate(config) { + const packageName = config.packageName, + className = config.className, + jsName = config.jsName, + methods = config.methods, + imports = config.imports; + return ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleJavaSpec.js + * + * ${'@'}nolint + */ + +package ${packageName}; + +${imports} + +public abstract class ${className} extends ReactContextBaseJavaModule implements TurboModule { + public static final String NAME = "${jsName}"; + + public ${className}(ReactApplicationContext reactContext) { + super(reactContext); + } + + @Override + public @Nonnull String getName() { + return NAME; + } + +${methods} +} +`; +} +function MethodTemplate(config) { + const abstract = config.abstract, + methodBody = config.methodBody, + methodJavaAnnotation = config.methodJavaAnnotation, + methodName = config.methodName, + translatedReturnType = config.translatedReturnType, + traversedArgs = config.traversedArgs; + const methodQualifier = abstract ? 'abstract ' : ''; + const methodClosing = abstract + ? ';' + : methodBody != null && methodBody.length > 0 + ? ` { ${methodBody} }` + : ' {}'; + return ` ${methodJavaAnnotation} + public ${methodQualifier}${translatedReturnType} ${methodName}(${traversedArgs.join( + ', ', + )})${methodClosing}`; +} +function translateFunctionParamToJavaType( + param, + createErrorMessage, + resolveAlias, + imports, +) { + const optional = param.optional, + nullableTypeAnnotation = param.typeAnnotation; + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + typeAnnotation = _unwrapNullable2[0], + nullable = _unwrapNullable2[1]; + const isRequired = !optional && !nullable; + function wrapNullable(javaType, nullableType) { + if (!isRequired) { + imports.add('javax.annotation.Nullable'); + return `@Nullable ${ + nullableType !== null && nullableType !== void 0 + ? nullableType + : javaType + }`; + } + return javaType; + } + + // FIXME: support class alias for args + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrapNullable('double', 'Double'); + default: + realTypeAnnotation.name; + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'StringTypeAnnotation': + return wrapNullable('String'); + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'FloatTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'DoubleTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'Int32TypeAnnotation': + return wrapNullable('double', 'Double'); + case 'BooleanTypeAnnotation': + return wrapNullable('boolean', 'Boolean'); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.ReadableMap'); + return wrapNullable('ReadableMap'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.ReadableMap'); + return wrapNullable('ReadableMap'); + case 'GenericObjectTypeAnnotation': + // Treat this the same as ObjectTypeAnnotation for now. + imports.add('com.facebook.react.bridge.ReadableMap'); + return wrapNullable('ReadableMap'); + case 'ArrayTypeAnnotation': + imports.add('com.facebook.react.bridge.ReadableArray'); + return wrapNullable('ReadableArray'); + case 'FunctionTypeAnnotation': + imports.add('com.facebook.react.bridge.Callback'); + return wrapNullable('Callback'); + default: + realTypeAnnotation.type; + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} +function translateFunctionReturnTypeToJavaType( + nullableReturnTypeAnnotation, + createErrorMessage, + resolveAlias, + imports, +) { + const _unwrapNullable3 = unwrapNullable(nullableReturnTypeAnnotation), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), + returnTypeAnnotation = _unwrapNullable4[0], + nullable = _unwrapNullable4[1]; + function wrapNullable(javaType, nullableType) { + if (nullable) { + imports.add('javax.annotation.Nullable'); + return `@Nullable ${ + nullableType !== null && nullableType !== void 0 + ? nullableType + : javaType + }`; + } + return javaType; + } + + // FIXME: support class alias for args + let realTypeAnnotation = returnTypeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrapNullable('double', 'Double'); + default: + realTypeAnnotation.name; + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'VoidTypeAnnotation': + return 'void'; + case 'PromiseTypeAnnotation': + return 'void'; + case 'StringTypeAnnotation': + return wrapNullable('String'); + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'FloatTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'DoubleTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'Int32TypeAnnotation': + return wrapNullable('double', 'Double'); + case 'BooleanTypeAnnotation': + return wrapNullable('boolean', 'Boolean'); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'UnionTypeAnnotation': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableMap'); + return wrapNullable('WritableMap'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableMap'); + return wrapNullable('WritableMap'); + case 'GenericObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableMap'); + return wrapNullable('WritableMap'); + case 'ArrayTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableArray'); + return wrapNullable('WritableArray'); + default: + realTypeAnnotation.type; + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} +function getFalsyReturnStatementFromReturnType( + nullableReturnTypeAnnotation, + createErrorMessage, + resolveAlias, +) { + const _unwrapNullable5 = unwrapNullable(nullableReturnTypeAnnotation), + _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 2), + returnTypeAnnotation = _unwrapNullable6[0], + nullable = _unwrapNullable6[1]; + let realTypeAnnotation = returnTypeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return 'return 0.0;'; + default: + realTypeAnnotation.name; + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'VoidTypeAnnotation': + return ''; + case 'PromiseTypeAnnotation': + return ''; + case 'NumberTypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'FloatTypeAnnotation': + return nullable ? 'return null;' : 'return 0.0;'; + case 'DoubleTypeAnnotation': + return nullable ? 'return null;' : 'return 0.0;'; + case 'Int32TypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'BooleanTypeAnnotation': + return nullable ? 'return null;' : 'return false;'; + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'StringTypeAnnotation': + return nullable ? 'return null;' : 'return "";'; + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'UnionTypeAnnotation': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'ObjectTypeAnnotation': + return 'return null;'; + case 'StringTypeAnnotation': + return nullable ? 'return null;' : 'return "";'; + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'StringTypeAnnotation': + return nullable ? 'return null;' : 'return "";'; + case 'ObjectTypeAnnotation': + return 'return null;'; + case 'GenericObjectTypeAnnotation': + return 'return null;'; + case 'ArrayTypeAnnotation': + return 'return null;'; + default: + realTypeAnnotation.type; + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} + +// Build special-cased runtime check for getConstants(). +function buildGetConstantsMethod(method, imports, resolveAlias) { + const _unwrapNullable7 = unwrapNullable(method.typeAnnotation), + _unwrapNullable8 = _slicedToArray(_unwrapNullable7, 1), + methodTypeAnnotation = _unwrapNullable8[0]; + let returnTypeAnnotation = methodTypeAnnotation.returnTypeAnnotation; + if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + // The return type is an alias, resolve it to get the expected undelying object literal type + returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); + } + if (returnTypeAnnotation.type === 'ObjectTypeAnnotation') { + const requiredProps = []; + const optionalProps = []; + const rawProperties = returnTypeAnnotation.properties || []; + rawProperties.forEach(p => { + if (p.optional || p.typeAnnotation.type === 'NullableTypeAnnotation') { + optionalProps.push(p.name); + } else { + requiredProps.push(p.name); + } + }); + if (requiredProps.length === 0 && optionalProps.length === 0) { + // Nothing to validate during runtime. + return ''; + } + imports.add('com.facebook.react.common.build.ReactBuildConfig'); + imports.add('java.util.Arrays'); + imports.add('java.util.HashSet'); + imports.add('java.util.Map'); + imports.add('java.util.Set'); + imports.add('javax.annotation.Nullable'); + const requiredPropsFragment = + requiredProps.length > 0 + ? `Arrays.asList( + ${requiredProps + .sort() + .map(p => `"${p}"`) + .join(',\n ')} + )` + : ''; + const optionalPropsFragment = + optionalProps.length > 0 + ? `Arrays.asList( + ${optionalProps + .sort() + .map(p => `"${p}"`) + .join(',\n ')} + )` + : ''; + return ` protected abstract Map getTypedExportedConstants(); + + @Override + @DoNotStrip + public final @Nullable Map getConstants() { + Map constants = getTypedExportedConstants(); + if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) { + Set obligatoryFlowConstants = new HashSet<>(${requiredPropsFragment}); + Set optionalFlowConstants = new HashSet<>(${optionalPropsFragment}); + Set undeclaredConstants = new HashSet<>(constants.keySet()); + undeclaredConstants.removeAll(obligatoryFlowConstants); + undeclaredConstants.removeAll(optionalFlowConstants); + if (!undeclaredConstants.isEmpty()) { + throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants)); + } + undeclaredConstants = obligatoryFlowConstants; + undeclaredConstants.removeAll(constants.keySet()); + if (!undeclaredConstants.isEmpty()) { + throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants)); + } + } + return constants; + }`; + } + return ''; +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const files = new Map(); + const nativeModules = getModules(schema); + const normalizedPackageName = + packageName == null ? 'com.facebook.fbreact.specs' : packageName; + const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; + Object.keys(nativeModules).forEach(hasteModuleName => { + const _nativeModules$hasteM = nativeModules[hasteModuleName], + aliasMap = _nativeModules$hasteM.aliasMap, + excludedPlatforms = _nativeModules$hasteM.excludedPlatforms, + moduleName = _nativeModules$hasteM.moduleName, + properties = _nativeModules$hasteM.spec.properties; + if (excludedPlatforms != null && excludedPlatforms.includes('android')) { + return; + } + const resolveAlias = createAliasResolver(aliasMap); + const className = `${hasteModuleName}Spec`; + const imports = new Set([ + // Always required. + 'com.facebook.react.bridge.ReactApplicationContext', + 'com.facebook.react.bridge.ReactContextBaseJavaModule', + 'com.facebook.react.bridge.ReactMethod', + 'com.facebook.react.turbomodule.core.interfaces.TurboModule', + 'com.facebook.proguard.annotations.DoNotStrip', + 'javax.annotation.Nonnull', + ]); + const methods = properties.map(method => { + if (method.name === 'getConstants') { + return buildGetConstantsMethod(method, imports, resolveAlias); + } + const _unwrapNullable9 = unwrapNullable(method.typeAnnotation), + _unwrapNullable10 = _slicedToArray(_unwrapNullable9, 1), + methodTypeAnnotation = _unwrapNullable10[0]; + + // Handle return type + const translatedReturnType = translateFunctionReturnTypeToJavaType( + methodTypeAnnotation.returnTypeAnnotation, + typeName => + `Unsupported return type for method ${method.name}. Found: ${typeName}`, + resolveAlias, + imports, + ); + const returningPromise = + methodTypeAnnotation.returnTypeAnnotation.type === + 'PromiseTypeAnnotation'; + const isSyncMethod = + methodTypeAnnotation.returnTypeAnnotation.type !== + 'VoidTypeAnnotation' && !returningPromise; + + // Handle method args + const traversedArgs = methodTypeAnnotation.params.map(param => { + const translatedParam = translateFunctionParamToJavaType( + param, + typeName => + `Unsupported type for param "${param.name}" in ${method.name}. Found: ${typeName}`, + resolveAlias, + imports, + ); + return `${translatedParam} ${param.name}`; + }); + if (returningPromise) { + // Promise return type requires an extra arg at the end. + imports.add('com.facebook.react.bridge.Promise'); + traversedArgs.push('Promise promise'); + } + const methodJavaAnnotation = `@ReactMethod${ + isSyncMethod ? '(isBlockingSynchronousMethod = true)' : '' + }\n @DoNotStrip`; + const methodBody = method.optional + ? getFalsyReturnStatementFromReturnType( + methodTypeAnnotation.returnTypeAnnotation, + typeName => + `Cannot build falsy return statement for return type for method ${method.name}. Found: ${typeName}`, + resolveAlias, + ) + : null; + return MethodTemplate({ + abstract: !method.optional, + methodBody, + methodJavaAnnotation, + methodName: method.name, + translatedReturnType, + traversedArgs, + }); + }); + files.set( + `${outputDir}/${className}.java`, + FileTemplate({ + packageName: normalizedPackageName, + className, + jsName: moduleName, + methods: methods.filter(Boolean).join('\n\n'), + imports: Array.from(imports) + .sort() + .map(p => `import ${p};`) + .join('\n'), + }), + ); + }); + return files; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js.flow new file mode 100644 index 000000000000..02ccc2668989 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJavaSpec.js.flow @@ -0,0 +1,556 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + Nullable, + NamedShape, + SchemaType, + NativeModulePropertyShape, + NativeModuleReturnTypeAnnotation, + NativeModuleFunctionTypeAnnotation, + NativeModuleParamTypeAnnotation, +} from '../../CodegenSchema'; + +import type {AliasResolver} from './Utils'; +const {createAliasResolver, getModules} = require('./Utils'); +const {unwrapNullable} = require('../../parsers/parsers-commons'); + +type FilesOutput = Map; + +function FileTemplate( + config: $ReadOnly<{ + packageName: string, + className: string, + jsName: string, + methods: string, + imports: string, + }>, +): string { + const {packageName, className, jsName, methods, imports} = config; + return ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleJavaSpec.js + * + * ${'@'}nolint + */ + +package ${packageName}; + +${imports} + +public abstract class ${className} extends ReactContextBaseJavaModule implements TurboModule { + public static final String NAME = "${jsName}"; + + public ${className}(ReactApplicationContext reactContext) { + super(reactContext); + } + + @Override + public @Nonnull String getName() { + return NAME; + } + +${methods} +} +`; +} + +function MethodTemplate( + config: $ReadOnly<{ + abstract: boolean, + methodBody: ?string, + methodJavaAnnotation: string, + methodName: string, + translatedReturnType: string, + traversedArgs: Array, + }>, +): string { + const { + abstract, + methodBody, + methodJavaAnnotation, + methodName, + translatedReturnType, + traversedArgs, + } = config; + const methodQualifier = abstract ? 'abstract ' : ''; + const methodClosing = abstract + ? ';' + : methodBody != null && methodBody.length > 0 + ? ` { ${methodBody} }` + : ' {}'; + return ` ${methodJavaAnnotation} + public ${methodQualifier}${translatedReturnType} ${methodName}(${traversedArgs.join( + ', ', + )})${methodClosing}`; +} + +type Param = NamedShape>; + +function translateFunctionParamToJavaType( + param: Param, + createErrorMessage: (typeName: string) => string, + resolveAlias: AliasResolver, + imports: Set, +): string { + const {optional, typeAnnotation: nullableTypeAnnotation} = param; + const [typeAnnotation, nullable] = + unwrapNullable(nullableTypeAnnotation); + const isRequired = !optional && !nullable; + + function wrapNullable(javaType: string, nullableType?: string) { + if (!isRequired) { + imports.add('javax.annotation.Nullable'); + return `@Nullable ${nullableType ?? javaType}`; + } + return javaType; + } + + // FIXME: support class alias for args + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrapNullable('double', 'Double'); + default: + (realTypeAnnotation.name: empty); + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'StringTypeAnnotation': + return wrapNullable('String'); + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'FloatTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'DoubleTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'Int32TypeAnnotation': + return wrapNullable('double', 'Double'); + case 'BooleanTypeAnnotation': + return wrapNullable('boolean', 'Boolean'); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.ReadableMap'); + return wrapNullable('ReadableMap'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.ReadableMap'); + return wrapNullable('ReadableMap'); + case 'GenericObjectTypeAnnotation': + // Treat this the same as ObjectTypeAnnotation for now. + imports.add('com.facebook.react.bridge.ReadableMap'); + return wrapNullable('ReadableMap'); + case 'ArrayTypeAnnotation': + imports.add('com.facebook.react.bridge.ReadableArray'); + return wrapNullable('ReadableArray'); + case 'FunctionTypeAnnotation': + imports.add('com.facebook.react.bridge.Callback'); + return wrapNullable('Callback'); + default: + (realTypeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} + +function translateFunctionReturnTypeToJavaType( + nullableReturnTypeAnnotation: Nullable, + createErrorMessage: (typeName: string) => string, + resolveAlias: AliasResolver, + imports: Set, +): string { + const [returnTypeAnnotation, nullable] = + unwrapNullable( + nullableReturnTypeAnnotation, + ); + + function wrapNullable(javaType: string, nullableType?: string) { + if (nullable) { + imports.add('javax.annotation.Nullable'); + return `@Nullable ${nullableType ?? javaType}`; + } + return javaType; + } + + // FIXME: support class alias for args + let realTypeAnnotation = returnTypeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return wrapNullable('double', 'Double'); + default: + (realTypeAnnotation.name: empty); + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'VoidTypeAnnotation': + return 'void'; + case 'PromiseTypeAnnotation': + return 'void'; + case 'StringTypeAnnotation': + return wrapNullable('String'); + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'FloatTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'DoubleTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'Int32TypeAnnotation': + return wrapNullable('double', 'Double'); + case 'BooleanTypeAnnotation': + return wrapNullable('boolean', 'Boolean'); + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'UnionTypeAnnotation': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapNullable('double', 'Double'); + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableMap'); + return wrapNullable('WritableMap'); + case 'StringTypeAnnotation': + return wrapNullable('String'); + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'ObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableMap'); + return wrapNullable('WritableMap'); + case 'GenericObjectTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableMap'); + return wrapNullable('WritableMap'); + case 'ArrayTypeAnnotation': + imports.add('com.facebook.react.bridge.WritableArray'); + return wrapNullable('WritableArray'); + default: + (realTypeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} + +function getFalsyReturnStatementFromReturnType( + nullableReturnTypeAnnotation: Nullable, + createErrorMessage: (typeName: string) => string, + resolveAlias: AliasResolver, +): string { + const [returnTypeAnnotation, nullable] = + unwrapNullable( + nullableReturnTypeAnnotation, + ); + + let realTypeAnnotation = returnTypeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return 'return 0.0;'; + default: + (realTypeAnnotation.name: empty); + throw new Error(createErrorMessage(realTypeAnnotation.name)); + } + case 'VoidTypeAnnotation': + return ''; + case 'PromiseTypeAnnotation': + return ''; + case 'NumberTypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'FloatTypeAnnotation': + return nullable ? 'return null;' : 'return 0.0;'; + case 'DoubleTypeAnnotation': + return nullable ? 'return null;' : 'return 0.0;'; + case 'Int32TypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'BooleanTypeAnnotation': + return nullable ? 'return null;' : 'return false;'; + case 'EnumDeclaration': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'StringTypeAnnotation': + return nullable ? 'return null;' : 'return "";'; + default: + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } + case 'UnionTypeAnnotation': + switch (realTypeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'return null;' : 'return 0;'; + case 'ObjectTypeAnnotation': + return 'return null;'; + case 'StringTypeAnnotation': + return nullable ? 'return null;' : 'return "";'; + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'StringTypeAnnotation': + return nullable ? 'return null;' : 'return "";'; + case 'ObjectTypeAnnotation': + return 'return null;'; + case 'GenericObjectTypeAnnotation': + return 'return null;'; + case 'ArrayTypeAnnotation': + return 'return null;'; + default: + (realTypeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error(createErrorMessage(realTypeAnnotation.type)); + } +} + +// Build special-cased runtime check for getConstants(). +function buildGetConstantsMethod( + method: NativeModulePropertyShape, + imports: Set, + resolveAlias: AliasResolver, +): string { + const [methodTypeAnnotation] = + unwrapNullable(method.typeAnnotation); + let returnTypeAnnotation = methodTypeAnnotation.returnTypeAnnotation; + if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + // The return type is an alias, resolve it to get the expected undelying object literal type + returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); + } + + if (returnTypeAnnotation.type === 'ObjectTypeAnnotation') { + const requiredProps = []; + const optionalProps = []; + const rawProperties = returnTypeAnnotation.properties || []; + rawProperties.forEach(p => { + if (p.optional || p.typeAnnotation.type === 'NullableTypeAnnotation') { + optionalProps.push(p.name); + } else { + requiredProps.push(p.name); + } + }); + if (requiredProps.length === 0 && optionalProps.length === 0) { + // Nothing to validate during runtime. + return ''; + } + + imports.add('com.facebook.react.common.build.ReactBuildConfig'); + imports.add('java.util.Arrays'); + imports.add('java.util.HashSet'); + imports.add('java.util.Map'); + imports.add('java.util.Set'); + imports.add('javax.annotation.Nullable'); + + const requiredPropsFragment = + requiredProps.length > 0 + ? `Arrays.asList( + ${requiredProps + .sort() + .map(p => `"${p}"`) + .join(',\n ')} + )` + : ''; + const optionalPropsFragment = + optionalProps.length > 0 + ? `Arrays.asList( + ${optionalProps + .sort() + .map(p => `"${p}"`) + .join(',\n ')} + )` + : ''; + + return ` protected abstract Map getTypedExportedConstants(); + + @Override + @DoNotStrip + public final @Nullable Map getConstants() { + Map constants = getTypedExportedConstants(); + if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) { + Set obligatoryFlowConstants = new HashSet<>(${requiredPropsFragment}); + Set optionalFlowConstants = new HashSet<>(${optionalPropsFragment}); + Set undeclaredConstants = new HashSet<>(constants.keySet()); + undeclaredConstants.removeAll(obligatoryFlowConstants); + undeclaredConstants.removeAll(optionalFlowConstants); + if (!undeclaredConstants.isEmpty()) { + throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants)); + } + undeclaredConstants = obligatoryFlowConstants; + undeclaredConstants.removeAll(constants.keySet()); + if (!undeclaredConstants.isEmpty()) { + throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants)); + } + } + return constants; + }`; + } + + return ''; +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const files = new Map(); + const nativeModules = getModules(schema); + + const normalizedPackageName = + packageName == null ? 'com.facebook.fbreact.specs' : packageName; + const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; + + Object.keys(nativeModules).forEach(hasteModuleName => { + const { + aliasMap, + excludedPlatforms, + moduleName, + spec: {properties}, + } = nativeModules[hasteModuleName]; + if (excludedPlatforms != null && excludedPlatforms.includes('android')) { + return; + } + const resolveAlias = createAliasResolver(aliasMap); + const className = `${hasteModuleName}Spec`; + + const imports: Set = new Set([ + // Always required. + 'com.facebook.react.bridge.ReactApplicationContext', + 'com.facebook.react.bridge.ReactContextBaseJavaModule', + 'com.facebook.react.bridge.ReactMethod', + 'com.facebook.react.turbomodule.core.interfaces.TurboModule', + 'com.facebook.proguard.annotations.DoNotStrip', + 'javax.annotation.Nonnull', + ]); + + const methods = properties.map(method => { + if (method.name === 'getConstants') { + return buildGetConstantsMethod(method, imports, resolveAlias); + } + + const [methodTypeAnnotation] = + unwrapNullable( + method.typeAnnotation, + ); + + // Handle return type + const translatedReturnType = translateFunctionReturnTypeToJavaType( + methodTypeAnnotation.returnTypeAnnotation, + typeName => + `Unsupported return type for method ${method.name}. Found: ${typeName}`, + resolveAlias, + imports, + ); + const returningPromise = + methodTypeAnnotation.returnTypeAnnotation.type === + 'PromiseTypeAnnotation'; + const isSyncMethod = + methodTypeAnnotation.returnTypeAnnotation.type !== + 'VoidTypeAnnotation' && !returningPromise; + + // Handle method args + const traversedArgs = methodTypeAnnotation.params.map(param => { + const translatedParam = translateFunctionParamToJavaType( + param, + typeName => + `Unsupported type for param "${param.name}" in ${method.name}. Found: ${typeName}`, + resolveAlias, + imports, + ); + return `${translatedParam} ${param.name}`; + }); + + if (returningPromise) { + // Promise return type requires an extra arg at the end. + imports.add('com.facebook.react.bridge.Promise'); + traversedArgs.push('Promise promise'); + } + + const methodJavaAnnotation = `@ReactMethod${ + isSyncMethod ? '(isBlockingSynchronousMethod = true)' : '' + }\n @DoNotStrip`; + const methodBody = method.optional + ? getFalsyReturnStatementFromReturnType( + methodTypeAnnotation.returnTypeAnnotation, + typeName => + `Cannot build falsy return statement for return type for method ${method.name}. Found: ${typeName}`, + resolveAlias, + ) + : null; + return MethodTemplate({ + abstract: !method.optional, + methodBody, + methodJavaAnnotation, + methodName: method.name, + translatedReturnType, + traversedArgs, + }); + }); + + files.set( + `${outputDir}/${className}.java`, + FileTemplate({ + packageName: normalizedPackageName, + className, + jsName: moduleName, + methods: methods.filter(Boolean).join('\n\n'), + imports: Array.from(imports) + .sort() + .map(p => `import ${p};`) + .join('\n'), + }), + ); + }); + + return files; + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js new file mode 100644 index 000000000000..fa1ad3c1cbe9 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js @@ -0,0 +1,503 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('./Utils'), + createAliasResolver = _require.createAliasResolver, + getModules = _require.getModules; +const _require2 = require('../../parsers/parsers-commons'), + unwrapNullable = _require2.unwrapNullable; +const HostFunctionTemplate = ({ + hasteModuleName, + propertyName, + jniSignature, + jsReturnType, +}) => { + return `static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${propertyName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { + static jmethodID cachedMethodId = nullptr; + return static_cast(turboModule).invokeJavaMethod(rt, ${jsReturnType}, "${propertyName}", "${jniSignature}", args, count, cachedMethodId); +}`; +}; +const ModuleClassConstructorTemplate = ({hasteModuleName, methods}) => { + return ` +${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms) + : JavaTurboModule(params) { +${methods + .map(({propertyName, argCount}) => { + return ` methodMap_["${propertyName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${propertyName}};`; + }) + .join('\n')} +}`.trim(); +}; +const ModuleLookupTemplate = ({moduleName, hasteModuleName}) => { + return ` if (moduleName == "${moduleName}") { + return std::make_shared<${hasteModuleName}SpecJSI>(params); + }`; +}; +const FileTemplate = ({libraryName, include, modules, moduleLookups}) => { + return ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleJniCpp.js + */ + +#include ${include} + +namespace facebook { +namespace react { + +${modules} + +std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { +${moduleLookups.map(ModuleLookupTemplate).join('\n')} + return nullptr; +} + +} // namespace react +} // namespace facebook +`; +}; +function translateReturnTypeToKind(nullableTypeAnnotation, resolveAlias) { + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 1), + typeAnnotation = _unwrapNullable2[0]; + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return 'NumberKind'; + default: + realTypeAnnotation.name; + throw new Error( + `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, + ); + } + case 'VoidTypeAnnotation': + return 'VoidKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + case 'BooleanTypeAnnotation': + return 'BooleanKind'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unknown enum prop type for returning value, found: ${realTypeAnnotation.type}"`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'DoubleTypeAnnotation': + return 'NumberKind'; + case 'FloatTypeAnnotation': + return 'NumberKind'; + case 'Int32TypeAnnotation': + return 'NumberKind'; + case 'PromiseTypeAnnotation': + return 'PromiseKind'; + case 'GenericObjectTypeAnnotation': + return 'ObjectKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'ArrayTypeAnnotation': + return 'ArrayKind'; + default: + realTypeAnnotation.type; + throw new Error( + `Unknown prop type for returning value, found: ${realTypeAnnotation.type}"`, + ); + } +} +function translateParamTypeToJniType(param, resolveAlias) { + const optional = param.optional, + nullableTypeAnnotation = param.typeAnnotation; + const _unwrapNullable3 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), + typeAnnotation = _unwrapNullable4[0], + nullable = _unwrapNullable4[1]; + const isRequired = !optional && !nullable; + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + default: + realTypeAnnotation.name; + throw new Error( + `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, + ); + } + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + case 'BooleanTypeAnnotation': + return !isRequired ? 'Ljava/lang/Boolean;' : 'Z'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unknown enum prop type for method arg, found: ${realTypeAnnotation.type}"`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableMap;'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unsupported union prop value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'NumberTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'DoubleTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'FloatTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'Int32TypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'GenericObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableMap;'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableMap;'; + case 'ArrayTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableArray;'; + case 'FunctionTypeAnnotation': + return 'Lcom/facebook/react/bridge/Callback;'; + default: + realTypeAnnotation.type; + throw new Error( + `Unknown prop type for method arg, found: ${realTypeAnnotation.type}"`, + ); + } +} +function translateReturnTypeToJniType(nullableTypeAnnotation, resolveAlias) { + const _unwrapNullable5 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 2), + typeAnnotation = _unwrapNullable6[0], + nullable = _unwrapNullable6[1]; + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return nullable ? 'Ljava/lang/Double;' : 'D'; + default: + realTypeAnnotation.name; + throw new Error( + `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, + ); + } + case 'VoidTypeAnnotation': + return 'V'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + case 'BooleanTypeAnnotation': + return nullable ? 'Ljava/lang/Boolean;' : 'Z'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unknown enum prop type for method return type, found: ${realTypeAnnotation.type}"`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableMap;'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unsupported union member type, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'NumberTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'DoubleTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'FloatTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'Int32TypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'PromiseTypeAnnotation': + return 'Lcom/facebook/react/bridge/Promise;'; + case 'GenericObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableMap;'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableMap;'; + case 'ArrayTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableArray;'; + default: + realTypeAnnotation.type; + throw new Error( + `Unknown prop type for method return type, found: ${realTypeAnnotation.type}"`, + ); + } +} +function translateMethodTypeToJniSignature(property, resolveAlias) { + const name = property.name, + typeAnnotation = property.typeAnnotation; + let _unwrapNullable7 = unwrapNullable(typeAnnotation), + _unwrapNullable8 = _slicedToArray(_unwrapNullable7, 1), + _unwrapNullable8$ = _unwrapNullable8[0], + returnTypeAnnotation = _unwrapNullable8$.returnTypeAnnotation, + params = _unwrapNullable8$.params; + params = [...params]; + let processedReturnTypeAnnotation = returnTypeAnnotation; + const isPromiseReturn = returnTypeAnnotation.type === 'PromiseTypeAnnotation'; + if (isPromiseReturn) { + processedReturnTypeAnnotation = { + type: 'VoidTypeAnnotation', + }; + } + const argsSignatureParts = params.map(t => { + return translateParamTypeToJniType(t, resolveAlias); + }); + if (isPromiseReturn) { + // Additional promise arg for this case. + argsSignatureParts.push( + translateReturnTypeToJniType(returnTypeAnnotation, resolveAlias), + ); + } + const argsSignature = argsSignatureParts.join(''); + const returnSignature = + name === 'getConstants' + ? 'Ljava/util/Map;' + : translateReturnTypeToJniType( + processedReturnTypeAnnotation, + resolveAlias, + ); + return `(${argsSignature})${returnSignature}`; +} +function translateMethodForImplementation( + hasteModuleName, + property, + resolveAlias, +) { + const _unwrapNullable9 = unwrapNullable(property.typeAnnotation), + _unwrapNullable10 = _slicedToArray(_unwrapNullable9, 1), + propertyTypeAnnotation = _unwrapNullable10[0]; + const returnTypeAnnotation = propertyTypeAnnotation.returnTypeAnnotation; + if ( + property.name === 'getConstants' && + returnTypeAnnotation.type === 'ObjectTypeAnnotation' && + returnTypeAnnotation.properties.length === 0 + ) { + return ''; + } + return HostFunctionTemplate({ + hasteModuleName, + propertyName: property.name, + jniSignature: translateMethodTypeToJniSignature(property, resolveAlias), + jsReturnType: translateReturnTypeToKind(returnTypeAnnotation, resolveAlias), + }); +} +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const nativeModules = getModules(schema); + const modules = Object.keys(nativeModules) + .filter(hasteModuleName => { + const module = nativeModules[hasteModuleName]; + return !( + module.excludedPlatforms != null && + module.excludedPlatforms.includes('android') + ); + }) + .sort() + .map(hasteModuleName => { + const _nativeModules$hasteM = nativeModules[hasteModuleName], + aliasMap = _nativeModules$hasteM.aliasMap, + properties = _nativeModules$hasteM.spec.properties; + const resolveAlias = createAliasResolver(aliasMap); + const translatedMethods = properties + .map(property => + translateMethodForImplementation( + hasteModuleName, + property, + resolveAlias, + ), + ) + .join('\n\n'); + return ( + translatedMethods + + '\n\n' + + ModuleClassConstructorTemplate({ + hasteModuleName, + methods: properties + .map(({name: propertyName, typeAnnotation}) => { + const _unwrapNullable11 = unwrapNullable(typeAnnotation), + _unwrapNullable12 = _slicedToArray(_unwrapNullable11, 1), + _unwrapNullable12$ = _unwrapNullable12[0], + returnTypeAnnotation = + _unwrapNullable12$.returnTypeAnnotation, + params = _unwrapNullable12$.params; + if ( + propertyName === 'getConstants' && + returnTypeAnnotation.type === 'ObjectTypeAnnotation' && + returnTypeAnnotation.properties && + returnTypeAnnotation.properties.length === 0 + ) { + return null; + } + return { + propertyName, + argCount: params.length, + }; + }) + .filter(Boolean), + }) + ); + }) + .join('\n'); + const moduleLookups = Object.keys(nativeModules) + .filter(hasteModuleName => { + const module = nativeModules[hasteModuleName]; + return !( + module.excludedPlatforms != null && + module.excludedPlatforms.includes('android') + ); + }) + .sort((a, b) => { + const nameA = nativeModules[a].moduleName; + const nameB = nativeModules[b].moduleName; + if (nameA < nameB) { + return -1; + } else if (nameA > nameB) { + return 1; + } + return 0; + }) + .map(hasteModuleName => ({ + moduleName: nativeModules[hasteModuleName].moduleName, + hasteModuleName, + })); + const fileName = `${libraryName}-generated.cpp`; + const replacedTemplate = FileTemplate({ + modules: modules, + libraryName: libraryName.replace(/-/g, '_'), + moduleLookups, + include: `"${libraryName}.h"`, + }); + return new Map([[`jni/${fileName}`, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js.flow new file mode 100644 index 000000000000..ad23221bc4ce --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniCpp.js.flow @@ -0,0 +1,523 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + Nullable, + NamedShape, + SchemaType, + NativeModulePropertyShape, + NativeModuleReturnTypeAnnotation, + NativeModuleParamTypeAnnotation, + NativeModuleFunctionTypeAnnotation, +} from '../../CodegenSchema'; + +import type {AliasResolver} from './Utils'; +const {createAliasResolver, getModules} = require('./Utils'); +const {unwrapNullable} = require('../../parsers/parsers-commons'); + +type FilesOutput = Map; + +type JSReturnType = + | 'VoidKind' + | 'StringKind' + | 'BooleanKind' + | 'NumberKind' + | 'PromiseKind' + | 'ObjectKind' + | 'ArrayKind'; + +const HostFunctionTemplate = ({ + hasteModuleName, + propertyName, + jniSignature, + jsReturnType, +}: $ReadOnly<{ + hasteModuleName: string, + propertyName: string, + jniSignature: string, + jsReturnType: JSReturnType, +}>) => { + return `static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${propertyName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { + static jmethodID cachedMethodId = nullptr; + return static_cast(turboModule).invokeJavaMethod(rt, ${jsReturnType}, "${propertyName}", "${jniSignature}", args, count, cachedMethodId); +}`; +}; + +const ModuleClassConstructorTemplate = ({ + hasteModuleName, + methods, +}: $ReadOnly<{ + hasteModuleName: string, + methods: $ReadOnlyArray<{ + propertyName: string, + argCount: number, + }>, +}>) => { + return ` +${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms) + : JavaTurboModule(params) { +${methods + .map(({propertyName, argCount}) => { + return ` methodMap_["${propertyName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${propertyName}};`; + }) + .join('\n')} +}`.trim(); +}; + +const ModuleLookupTemplate = ({ + moduleName, + hasteModuleName, +}: $ReadOnly<{moduleName: string, hasteModuleName: string}>) => { + return ` if (moduleName == "${moduleName}") { + return std::make_shared<${hasteModuleName}SpecJSI>(params); + }`; +}; + +const FileTemplate = ({ + libraryName, + include, + modules, + moduleLookups, +}: $ReadOnly<{ + libraryName: string, + include: string, + modules: string, + moduleLookups: $ReadOnlyArray<{ + hasteModuleName: string, + moduleName: string, + }>, +}>) => { + return ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleJniCpp.js + */ + +#include ${include} + +namespace facebook { +namespace react { + +${modules} + +std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { +${moduleLookups.map(ModuleLookupTemplate).join('\n')} + return nullptr; +} + +} // namespace react +} // namespace facebook +`; +}; + +function translateReturnTypeToKind( + nullableTypeAnnotation: Nullable, + resolveAlias: AliasResolver, +): JSReturnType { + const [typeAnnotation] = unwrapNullable( + nullableTypeAnnotation, + ); + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return 'NumberKind'; + default: + (realTypeAnnotation.name: empty); + throw new Error( + `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, + ); + } + case 'VoidTypeAnnotation': + return 'VoidKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + case 'BooleanTypeAnnotation': + return 'BooleanKind'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unknown enum prop type for returning value, found: ${realTypeAnnotation.type}"`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'DoubleTypeAnnotation': + return 'NumberKind'; + case 'FloatTypeAnnotation': + return 'NumberKind'; + case 'Int32TypeAnnotation': + return 'NumberKind'; + case 'PromiseTypeAnnotation': + return 'PromiseKind'; + case 'GenericObjectTypeAnnotation': + return 'ObjectKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'ArrayTypeAnnotation': + return 'ArrayKind'; + default: + (realTypeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error( + `Unknown prop type for returning value, found: ${realTypeAnnotation.type}"`, + ); + } +} + +type Param = NamedShape>; + +function translateParamTypeToJniType( + param: Param, + resolveAlias: AliasResolver, +): string { + const {optional, typeAnnotation: nullableTypeAnnotation} = param; + const [typeAnnotation, nullable] = + unwrapNullable(nullableTypeAnnotation); + const isRequired = !optional && !nullable; + + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + default: + (realTypeAnnotation.name: empty); + throw new Error( + `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, + ); + } + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + case 'BooleanTypeAnnotation': + return !isRequired ? 'Ljava/lang/Boolean;' : 'Z'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unknown enum prop type for method arg, found: ${realTypeAnnotation.type}"`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableMap;'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unsupported union prop value, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'NumberTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'DoubleTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'FloatTypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'Int32TypeAnnotation': + return !isRequired ? 'Ljava/lang/Double;' : 'D'; + case 'GenericObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableMap;'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableMap;'; + case 'ArrayTypeAnnotation': + return 'Lcom/facebook/react/bridge/ReadableArray;'; + case 'FunctionTypeAnnotation': + return 'Lcom/facebook/react/bridge/Callback;'; + default: + (realTypeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error( + `Unknown prop type for method arg, found: ${realTypeAnnotation.type}"`, + ); + } +} + +function translateReturnTypeToJniType( + nullableTypeAnnotation: Nullable, + resolveAlias: AliasResolver, +): string { + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + + let realTypeAnnotation = typeAnnotation; + if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + realTypeAnnotation = resolveAlias(realTypeAnnotation.name); + } + + switch (realTypeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (realTypeAnnotation.name) { + case 'RootTag': + return nullable ? 'Ljava/lang/Double;' : 'D'; + default: + (realTypeAnnotation.name: empty); + throw new Error( + `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, + ); + } + case 'VoidTypeAnnotation': + return 'V'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + case 'BooleanTypeAnnotation': + return nullable ? 'Ljava/lang/Boolean;' : 'Z'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unknown enum prop type for method return type, found: ${realTypeAnnotation.type}"`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableMap;'; + case 'StringTypeAnnotation': + return 'Ljava/lang/String;'; + default: + throw new Error( + `Unsupported union member type, found: ${realTypeAnnotation.memberType}"`, + ); + } + case 'NumberTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'DoubleTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'FloatTypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'Int32TypeAnnotation': + return nullable ? 'Ljava/lang/Double;' : 'D'; + case 'PromiseTypeAnnotation': + return 'Lcom/facebook/react/bridge/Promise;'; + case 'GenericObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableMap;'; + case 'ObjectTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableMap;'; + case 'ArrayTypeAnnotation': + return 'Lcom/facebook/react/bridge/WritableArray;'; + default: + (realTypeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error( + `Unknown prop type for method return type, found: ${realTypeAnnotation.type}"`, + ); + } +} + +function translateMethodTypeToJniSignature( + property: NativeModulePropertyShape, + resolveAlias: AliasResolver, +): string { + const {name, typeAnnotation} = property; + let [{returnTypeAnnotation, params}] = + unwrapNullable(typeAnnotation); + + params = [...params]; + let processedReturnTypeAnnotation = returnTypeAnnotation; + const isPromiseReturn = returnTypeAnnotation.type === 'PromiseTypeAnnotation'; + if (isPromiseReturn) { + processedReturnTypeAnnotation = { + type: 'VoidTypeAnnotation', + }; + } + + const argsSignatureParts = params.map(t => { + return translateParamTypeToJniType(t, resolveAlias); + }); + if (isPromiseReturn) { + // Additional promise arg for this case. + argsSignatureParts.push( + translateReturnTypeToJniType(returnTypeAnnotation, resolveAlias), + ); + } + const argsSignature = argsSignatureParts.join(''); + const returnSignature = + name === 'getConstants' + ? 'Ljava/util/Map;' + : translateReturnTypeToJniType( + processedReturnTypeAnnotation, + resolveAlias, + ); + + return `(${argsSignature})${returnSignature}`; +} + +function translateMethodForImplementation( + hasteModuleName: string, + property: NativeModulePropertyShape, + resolveAlias: AliasResolver, +): string { + const [propertyTypeAnnotation] = + unwrapNullable(property.typeAnnotation); + const {returnTypeAnnotation} = propertyTypeAnnotation; + + if ( + property.name === 'getConstants' && + returnTypeAnnotation.type === 'ObjectTypeAnnotation' && + returnTypeAnnotation.properties.length === 0 + ) { + return ''; + } + + return HostFunctionTemplate({ + hasteModuleName, + propertyName: property.name, + jniSignature: translateMethodTypeToJniSignature(property, resolveAlias), + jsReturnType: translateReturnTypeToKind(returnTypeAnnotation, resolveAlias), + }); +} + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const nativeModules = getModules(schema); + + const modules = Object.keys(nativeModules) + .filter(hasteModuleName => { + const module = nativeModules[hasteModuleName]; + return !( + module.excludedPlatforms != null && + module.excludedPlatforms.includes('android') + ); + }) + .sort() + .map(hasteModuleName => { + const { + aliasMap, + spec: {properties}, + } = nativeModules[hasteModuleName]; + const resolveAlias = createAliasResolver(aliasMap); + + const translatedMethods = properties + .map(property => + translateMethodForImplementation( + hasteModuleName, + property, + resolveAlias, + ), + ) + .join('\n\n'); + + return ( + translatedMethods + + '\n\n' + + ModuleClassConstructorTemplate({ + hasteModuleName, + methods: properties + .map(({name: propertyName, typeAnnotation}) => { + const [{returnTypeAnnotation, params}] = + unwrapNullable( + typeAnnotation, + ); + + if ( + propertyName === 'getConstants' && + returnTypeAnnotation.type === 'ObjectTypeAnnotation' && + returnTypeAnnotation.properties && + returnTypeAnnotation.properties.length === 0 + ) { + return null; + } + + return { + propertyName, + argCount: params.length, + }; + }) + .filter(Boolean), + }) + ); + }) + .join('\n'); + + const moduleLookups: $ReadOnlyArray<{ + hasteModuleName: string, + moduleName: string, + }> = Object.keys(nativeModules) + .filter(hasteModuleName => { + const module = nativeModules[hasteModuleName]; + return !( + module.excludedPlatforms != null && + module.excludedPlatforms.includes('android') + ); + }) + .sort((a, b) => { + const nameA = nativeModules[a].moduleName; + const nameB = nativeModules[b].moduleName; + if (nameA < nameB) { + return -1; + } else if (nameA > nameB) { + return 1; + } + return 0; + }) + .map((hasteModuleName: string) => ({ + moduleName: nativeModules[hasteModuleName].moduleName, + hasteModuleName, + })); + + const fileName = `${libraryName}-generated.cpp`; + const replacedTemplate = FileTemplate({ + modules: modules, + libraryName: libraryName.replace(/-/g, '_'), + moduleLookups, + include: `"${libraryName}.h"`, + }); + return new Map([[`jni/${fileName}`, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js new file mode 100644 index 000000000000..38b84077d33f --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js @@ -0,0 +1,138 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./Utils'), + getModules = _require.getModules; +const ModuleClassDeclarationTemplate = ({hasteModuleName}) => { + return `/** + * JNI C++ class for module '${hasteModuleName}' + */ +class JSI_EXPORT ${hasteModuleName}SpecJSI : public JavaTurboModule { +public: + ${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms); +}; +`; +}; +const HeaderFileTemplate = ({modules, libraryName}) => { + return ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleJniH.js + */ + +#pragma once + +#include +#include +#include + +namespace facebook { +namespace react { + +${modules} + +JSI_EXPORT +std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); + +} // namespace react +} // namespace facebook +`; +}; + +// Note: this CMakeLists.txt template includes dependencies for both NativeModule and components. +const CMakeListsTemplate = ({libraryName}) => { + return `# 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. + +cmake_minimum_required(VERSION 3.13) +set(CMAKE_VERBOSE_MAKEFILE on) + +file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/${libraryName}/*.cpp) + +add_library( + react_codegen_${libraryName} + SHARED + \${react_codegen_SRCS} +) + +target_include_directories(react_codegen_${libraryName} PUBLIC . react/renderer/components/${libraryName}) + +target_link_libraries( + react_codegen_${libraryName} + fbjni + folly_runtime + glog + jsi + ${libraryName !== 'rncore' ? 'react_codegen_rncore' : ''} + react_debug + react_nativemodule_core + react_render_core + react_render_debug + react_render_graphics + react_render_imagemanager + rrc_image + rrc_view + turbomodulejsijni + yoga +) + +target_compile_options( + react_codegen_${libraryName} + PRIVATE + -DLOG_TAG=\\"ReactNative\\" + -fexceptions + -frtti + -std=c++20 + -Wall +) +`; +}; +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull = false) { + const nativeModules = getModules(schema); + const modules = Object.keys(nativeModules) + .filter(hasteModuleName => { + const module = nativeModules[hasteModuleName]; + return !( + module.excludedPlatforms != null && + module.excludedPlatforms.includes('android') + ); + }) + .sort() + .map(hasteModuleName => + ModuleClassDeclarationTemplate({ + hasteModuleName, + }), + ) + .join('\n'); + const fileName = `${libraryName}.h`; + const replacedTemplate = HeaderFileTemplate({ + modules: modules, + libraryName: libraryName.replace(/-/g, '_'), + }); + return new Map([ + [`jni/${fileName}`, replacedTemplate], + [ + 'jni/CMakeLists.txt', + CMakeListsTemplate({ + libraryName: libraryName, + }), + ], + ]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js.flow new file mode 100644 index 000000000000..fb9808075545 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleJniH.js.flow @@ -0,0 +1,148 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema'; + +type FilesOutput = Map; + +const {getModules} = require('./Utils'); + +const ModuleClassDeclarationTemplate = ({ + hasteModuleName, +}: $ReadOnly<{hasteModuleName: string}>) => { + return `/** + * JNI C++ class for module '${hasteModuleName}' + */ +class JSI_EXPORT ${hasteModuleName}SpecJSI : public JavaTurboModule { +public: + ${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms); +}; +`; +}; + +const HeaderFileTemplate = ({ + modules, + libraryName, +}: $ReadOnly<{modules: string, libraryName: string}>) => { + return ` +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleJniH.js + */ + +#pragma once + +#include +#include +#include + +namespace facebook { +namespace react { + +${modules} + +JSI_EXPORT +std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); + +} // namespace react +} // namespace facebook +`; +}; + +// Note: this CMakeLists.txt template includes dependencies for both NativeModule and components. +const CMakeListsTemplate = ({ + libraryName, +}: $ReadOnly<{libraryName: string}>) => { + return `# 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. + +cmake_minimum_required(VERSION 3.13) +set(CMAKE_VERBOSE_MAKEFILE on) + +file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/${libraryName}/*.cpp) + +add_library( + react_codegen_${libraryName} + SHARED + \${react_codegen_SRCS} +) + +target_include_directories(react_codegen_${libraryName} PUBLIC . react/renderer/components/${libraryName}) + +target_link_libraries( + react_codegen_${libraryName} + fbjni + folly_runtime + glog + jsi + ${libraryName !== 'rncore' ? 'react_codegen_rncore' : ''} + react_debug + react_nativemodule_core + react_render_core + react_render_debug + react_render_graphics + react_render_imagemanager + rrc_image + rrc_view + turbomodulejsijni + yoga +) + +target_compile_options( + react_codegen_${libraryName} + PRIVATE + -DLOG_TAG=\\"ReactNative\\" + -fexceptions + -frtti + -std=c++20 + -Wall +) +`; +}; + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + ): FilesOutput { + const nativeModules = getModules(schema); + const modules = Object.keys(nativeModules) + .filter(hasteModuleName => { + const module = nativeModules[hasteModuleName]; + return !( + module.excludedPlatforms != null && + module.excludedPlatforms.includes('android') + ); + }) + .sort() + .map(hasteModuleName => ModuleClassDeclarationTemplate({hasteModuleName})) + .join('\n'); + + const fileName = `${libraryName}.h`; + const replacedTemplate = HeaderFileTemplate({ + modules: modules, + libraryName: libraryName.replace(/-/g, '_'), + }); + return new Map([ + [`jni/${fileName}`, replacedTemplate], + ['jni/CMakeLists.txt', CMakeListsTemplate({libraryName: libraryName})], + ]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js new file mode 100644 index 000000000000..159a57e37f07 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js @@ -0,0 +1,253 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && + (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), + t.push.apply(t, o); + } + return t; +} +function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 + ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) + : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; +} +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +const _require = require('../../Utils'), + capitalize = _require.capitalize; +const _require2 = require('../../../parsers/parsers-commons'), + unwrapNullable = _require2.unwrapNullable, + wrapNullable = _require2.wrapNullable; +class StructCollector { + constructor() { + _defineProperty(this, '_structs', new Map()); + } + process(structName, structContext, resolveAlias, nullableTypeAnnotation) { + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + typeAnnotation = _unwrapNullable2[0], + nullable = _unwrapNullable2[1]; + switch (typeAnnotation.type) { + case 'ObjectTypeAnnotation': { + this._insertStruct( + structName, + structContext, + resolveAlias, + typeAnnotation, + ); + return wrapNullable(nullable, { + type: 'TypeAliasTypeAnnotation', + name: structName, + }); + } + case 'ArrayTypeAnnotation': { + if (typeAnnotation.elementType == null) { + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + }); + } + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + elementType: this.process( + structName + 'Element', + structContext, + resolveAlias, + typeAnnotation.elementType, + ), + }); + } + case 'TypeAliasTypeAnnotation': { + this._insertAlias(typeAnnotation.name, structContext, resolveAlias); + return wrapNullable(nullable, typeAnnotation); + } + case 'EnumDeclaration': + return wrapNullable(nullable, typeAnnotation); + case 'MixedTypeAnnotation': + throw new Error('Mixed types are unsupported in structs'); + case 'UnionTypeAnnotation': + throw new Error('Union types are unsupported in structs'); + default: { + return wrapNullable(nullable, typeAnnotation); + } + } + } + _insertAlias(aliasName, structContext, resolveAlias) { + const usedStruct = this._structs.get(aliasName); + if (usedStruct == null) { + this._insertStruct( + aliasName, + structContext, + resolveAlias, + resolveAlias(aliasName), + ); + } else if (usedStruct.context !== structContext) { + throw new Error( + `Tried to use alias '${aliasName}' in a getConstants() return type and inside a regular struct.`, + ); + } + } + _insertStruct(structName, structContext, resolveAlias, objectTypeAnnotation) { + // $FlowFixMe[missing-type-arg] + const properties = objectTypeAnnotation.properties.map(property => { + const propertyStructName = structName + capitalize(property.name); + return _objectSpread( + _objectSpread({}, property), + {}, + { + typeAnnotation: this.process( + propertyStructName, + structContext, + resolveAlias, + property.typeAnnotation, + ), + }, + ); + }); + switch (structContext) { + case 'REGULAR': + this._structs.set(structName, { + name: structName, + context: 'REGULAR', + properties: properties, + }); + break; + case 'CONSTANTS': + this._structs.set(structName, { + name: structName, + context: 'CONSTANTS', + properties: properties, + }); + break; + default: + structContext; + throw new Error(`Detected an invalid struct context: ${structContext}`); + } + } + getAllStructs() { + return [...this._structs.values()]; + } + getStruct(name) { + return this._structs.get(name); + } +} +module.exports = { + StructCollector, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow new file mode 100644 index 000000000000..ef7af6ae44a1 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow @@ -0,0 +1,208 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + Nullable, + NativeModuleObjectTypeAnnotation, + NativeModuleStringTypeAnnotation, + NativeModuleNumberTypeAnnotation, + NativeModuleInt32TypeAnnotation, + NativeModuleDoubleTypeAnnotation, + NativeModuleFloatTypeAnnotation, + NativeModuleBooleanTypeAnnotation, + NativeModuleEnumDeclaration, + NativeModuleGenericObjectTypeAnnotation, + ReservedTypeAnnotation, + NativeModuleTypeAliasTypeAnnotation, + NativeModuleArrayTypeAnnotation, + NativeModuleBaseTypeAnnotation, +} from '../../../CodegenSchema'; + +import type {AliasResolver} from '../Utils'; + +const {capitalize} = require('../../Utils'); +const { + unwrapNullable, + wrapNullable, +} = require('../../../parsers/parsers-commons'); + +type StructContext = 'CONSTANTS' | 'REGULAR'; + +export type RegularStruct = $ReadOnly<{ + context: 'REGULAR', + name: string, + properties: $ReadOnlyArray, +}>; + +export type ConstantsStruct = $ReadOnly<{ + context: 'CONSTANTS', + name: string, + properties: $ReadOnlyArray, +}>; + +export type Struct = RegularStruct | ConstantsStruct; + +export type StructProperty = $ReadOnly<{ + name: string, + optional: boolean, + typeAnnotation: Nullable, +}>; + +export type StructTypeAnnotation = + | NativeModuleStringTypeAnnotation + | NativeModuleNumberTypeAnnotation + | NativeModuleInt32TypeAnnotation + | NativeModuleDoubleTypeAnnotation + | NativeModuleFloatTypeAnnotation + | NativeModuleBooleanTypeAnnotation + | NativeModuleEnumDeclaration + | NativeModuleGenericObjectTypeAnnotation + | ReservedTypeAnnotation + | NativeModuleTypeAliasTypeAnnotation + | NativeModuleArrayTypeAnnotation>; + +class StructCollector { + _structs: Map = new Map(); + + process( + structName: string, + structContext: StructContext, + resolveAlias: AliasResolver, + nullableTypeAnnotation: Nullable, + ): Nullable { + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + switch (typeAnnotation.type) { + case 'ObjectTypeAnnotation': { + this._insertStruct( + structName, + structContext, + resolveAlias, + typeAnnotation, + ); + return wrapNullable(nullable, { + type: 'TypeAliasTypeAnnotation', + name: structName, + }); + } + case 'ArrayTypeAnnotation': { + if (typeAnnotation.elementType == null) { + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + }); + } + + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + elementType: this.process( + structName + 'Element', + structContext, + resolveAlias, + typeAnnotation.elementType, + ), + }); + } + case 'TypeAliasTypeAnnotation': { + this._insertAlias(typeAnnotation.name, structContext, resolveAlias); + return wrapNullable(nullable, typeAnnotation); + } + case 'EnumDeclaration': + return wrapNullable(nullable, typeAnnotation); + case 'MixedTypeAnnotation': + throw new Error('Mixed types are unsupported in structs'); + case 'UnionTypeAnnotation': + throw new Error('Union types are unsupported in structs'); + default: { + return wrapNullable(nullable, typeAnnotation); + } + } + } + + _insertAlias( + aliasName: string, + structContext: StructContext, + resolveAlias: AliasResolver, + ): void { + const usedStruct = this._structs.get(aliasName); + if (usedStruct == null) { + this._insertStruct( + aliasName, + structContext, + resolveAlias, + resolveAlias(aliasName), + ); + } else if (usedStruct.context !== structContext) { + throw new Error( + `Tried to use alias '${aliasName}' in a getConstants() return type and inside a regular struct.`, + ); + } + } + + _insertStruct( + structName: string, + structContext: StructContext, + resolveAlias: AliasResolver, + objectTypeAnnotation: NativeModuleObjectTypeAnnotation, + ): void { + // $FlowFixMe[missing-type-arg] + const properties = objectTypeAnnotation.properties.map< + $ReadOnly<{ + name: string, + optional: boolean, + typeAnnotation: Nullable, + }>, + >(property => { + const propertyStructName = structName + capitalize(property.name); + + return { + ...property, + typeAnnotation: this.process( + propertyStructName, + structContext, + resolveAlias, + property.typeAnnotation, + ), + }; + }); + + switch (structContext) { + case 'REGULAR': + this._structs.set(structName, { + name: structName, + context: 'REGULAR', + properties: properties, + }); + break; + case 'CONSTANTS': + this._structs.set(structName, { + name: structName, + context: 'CONSTANTS', + properties: properties, + }); + break; + default: + (structContext: empty); + throw new Error(`Detected an invalid struct context: ${structContext}`); + } + } + + getAllStructs(): $ReadOnlyArray { + return [...this._structs.values()]; + } + + getStruct(name: string): ?Struct { + return this._structs.get(name); + } +} + +module.exports = { + StructCollector, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js new file mode 100644 index 000000000000..b4be0c66d3fc --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js @@ -0,0 +1,25 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function getSafePropertyName(property) { + if (property.name === 'id') { + return `${property.name}_`; + } + return property.name; +} +function getNamespacedStructName(hasteModuleName, structName) { + return `JS::${hasteModuleName}::${structName}`; +} +module.exports = { + getSafePropertyName, + getNamespacedStructName, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow new file mode 100644 index 000000000000..59121a4b52fa --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow @@ -0,0 +1,32 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {StructProperty} from './StructCollector'; + +function getSafePropertyName(property: StructProperty): string { + if (property.name === 'id') { + return `${property.name}_`; + } + return property.name; +} + +function getNamespacedStructName( + hasteModuleName: string, + structName: string, +): string { + return `JS::${hasteModuleName}::${structName}`; +} + +module.exports = { + getSafePropertyName, + getNamespacedStructName, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js new file mode 100644 index 000000000000..46b689f38665 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js @@ -0,0 +1,335 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('../Utils'), + getSafePropertyName = _require.getSafePropertyName, + getNamespacedStructName = _require.getNamespacedStructName; +const _require2 = require('../../../Utils'), + capitalize = _require2.capitalize; +const _require3 = require('../../../../parsers/parsers-commons'), + unwrapNullable = _require3.unwrapNullable; +const StructTemplate = ({ + hasteModuleName, + structName, + builderInputProps, +}) => `namespace JS { + namespace ${hasteModuleName} { + struct ${structName} { + + struct Builder { + struct Input { + ${builderInputProps} + }; + + /** Initialize with a set of values */ + Builder(const Input i); + /** Initialize with an existing ${structName} */ + Builder(${structName} i); + /** Builds the object. Generally used only by the infrastructure. */ + NSDictionary *buildUnsafeRawValue() const { return _factory(); }; + private: + NSDictionary *(^_factory)(void); + }; + + static ${structName} fromUnsafeRawValue(NSDictionary *const v) { return {v}; } + NSDictionary *unsafeRawValue() const { return _v; } + private: + ${structName}(NSDictionary *const v) : _v(v) {} + NSDictionary *_v; + }; + } +}`; +const MethodTemplate = ({ + hasteModuleName, + structName, + properties, +}) => `inline JS::${hasteModuleName}::${structName}::Builder::Builder(const Input i) : _factory(^{ + NSMutableDictionary *d = [NSMutableDictionary new]; +${properties} + return d; +}) {} +inline JS::${hasteModuleName}::${structName}::Builder::Builder(${structName} i) : _factory(^{ + return i.unsafeRawValue(); +}) {}`; +function toObjCType( + hasteModuleName, + nullableTypeAnnotation, + isOptional = false, +) { + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + typeAnnotation = _unwrapNullable2[0], + nullable = _unwrapNullable2[1]; + const isRequired = !nullable && !isOptional; + const wrapOptional = type => { + return isRequired ? type : `std::optional<${type}>`; + }; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapOptional('double'); + default: + typeAnnotation.name; + throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); + } + case 'StringTypeAnnotation': + return 'NSString *'; + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'FloatTypeAnnotation': + return wrapOptional('double'); + case 'Int32TypeAnnotation': + return wrapOptional('double'); + case 'DoubleTypeAnnotation': + return wrapOptional('double'); + case 'BooleanTypeAnnotation': + return wrapOptional('bool'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'StringTypeAnnotation': + return 'NSString *'; + default: + throw new Error( + `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return isRequired ? 'id ' : 'id _Nullable '; + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType == null) { + return isRequired ? 'id ' : 'id _Nullable '; + } + return wrapOptional( + `std::vector<${toObjCType( + hasteModuleName, + typeAnnotation.elementType, + )}>`, + ); + case 'TypeAliasTypeAnnotation': + const structName = capitalize(typeAnnotation.name); + const namespacedStructName = getNamespacedStructName( + hasteModuleName, + structName, + ); + return wrapOptional(`${namespacedStructName}::Builder`); + default: + typeAnnotation.type; + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } +} +function toObjCValue( + hasteModuleName, + nullableTypeAnnotation, + value, + depth, + isOptional = false, +) { + const _unwrapNullable3 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), + typeAnnotation = _unwrapNullable4[0], + nullable = _unwrapNullable4[1]; + const isRequired = !nullable && !isOptional; + function wrapPrimitive(type) { + return !isRequired + ? `${value}.has_value() ? @((${type})${value}.value()) : nil` + : `@(${value})`; + } + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapPrimitive('double'); + default: + typeAnnotation.name; + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'StringTypeAnnotation': + return value; + case 'NumberTypeAnnotation': + return wrapPrimitive('double'); + case 'FloatTypeAnnotation': + return wrapPrimitive('double'); + case 'Int32TypeAnnotation': + return wrapPrimitive('double'); + case 'DoubleTypeAnnotation': + return wrapPrimitive('double'); + case 'BooleanTypeAnnotation': + return wrapPrimitive('BOOL'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapPrimitive('double'); + case 'StringTypeAnnotation': + return value; + default: + throw new Error( + `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return value; + case 'ArrayTypeAnnotation': + const elementType = typeAnnotation.elementType; + if (elementType == null) { + return value; + } + const localVarName = `el${'_'.repeat(depth + 1)}`; + const elementObjCType = toObjCType(hasteModuleName, elementType); + const elementObjCValue = toObjCValue( + hasteModuleName, + elementType, + localVarName, + depth + 1, + ); + const RCTConvertVecToArray = transformer => { + return `RCTConvert${ + !isRequired ? 'Optional' : '' + }VecToArray(${value}, ${transformer})`; + }; + return RCTConvertVecToArray( + `^id(${elementObjCType} ${localVarName}) { return ${elementObjCValue}; }`, + ); + case 'TypeAliasTypeAnnotation': + return !isRequired + ? `${value}.has_value() ? ${value}.value().buildUnsafeRawValue() : nil` + : `${value}.buildUnsafeRawValue()`; + default: + typeAnnotation.type; + throw new Error( + `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, + ); + } +} +function serializeConstantsStruct(hasteModuleName, struct) { + const declaration = StructTemplate({ + hasteModuleName, + structName: struct.name, + builderInputProps: struct.properties + .map(property => { + const typeAnnotation = property.typeAnnotation, + optional = property.optional; + const safePropName = getSafePropertyName(property); + const objCType = toObjCType(hasteModuleName, typeAnnotation, optional); + if (!optional) { + return `RCTRequired<${objCType}> ${safePropName};`; + } + const space = ' '.repeat(objCType.endsWith('*') ? 0 : 1); + return `${objCType}${space}${safePropName};`; + }) + .join('\n '), + }); + const methods = MethodTemplate({ + hasteModuleName, + structName: struct.name, + properties: struct.properties + .map(property => { + const typeAnnotation = property.typeAnnotation, + optional = property.optional, + propName = property.name; + const safePropName = getSafePropertyName(property); + const objCValue = toObjCValue( + hasteModuleName, + typeAnnotation, + safePropName, + 0, + optional, + ); + let varDecl = `auto ${safePropName} = i.${safePropName}`; + if (!optional) { + varDecl += '.get()'; + } + const assignment = `d[@"${propName}"] = ` + objCValue; + return ` ${varDecl};\n ${assignment};`; + }) + .join('\n'), + }); + return { + declaration, + methods, + }; +} +module.exports = { + serializeConstantsStruct, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow new file mode 100644 index 000000000000..0fa67683e662 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow @@ -0,0 +1,288 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +const {getSafePropertyName, getNamespacedStructName} = require('../Utils'); +const {capitalize} = require('../../../Utils'); + +import type {Nullable} from '../../../../CodegenSchema'; +import type {StructTypeAnnotation, ConstantsStruct} from '../StructCollector'; +import type {StructSerilizationOutput} from './serializeStruct'; + +const {unwrapNullable} = require('../../../../parsers/parsers-commons'); + +const StructTemplate = ({ + hasteModuleName, + structName, + builderInputProps, +}: $ReadOnly<{ + hasteModuleName: string, + structName: string, + builderInputProps: string, +}>) => `namespace JS { + namespace ${hasteModuleName} { + struct ${structName} { + + struct Builder { + struct Input { + ${builderInputProps} + }; + + /** Initialize with a set of values */ + Builder(const Input i); + /** Initialize with an existing ${structName} */ + Builder(${structName} i); + /** Builds the object. Generally used only by the infrastructure. */ + NSDictionary *buildUnsafeRawValue() const { return _factory(); }; + private: + NSDictionary *(^_factory)(void); + }; + + static ${structName} fromUnsafeRawValue(NSDictionary *const v) { return {v}; } + NSDictionary *unsafeRawValue() const { return _v; } + private: + ${structName}(NSDictionary *const v) : _v(v) {} + NSDictionary *_v; + }; + } +}`; + +const MethodTemplate = ({ + hasteModuleName, + structName, + properties, +}: $ReadOnly<{ + hasteModuleName: string, + structName: string, + properties: string, +}>) => `inline JS::${hasteModuleName}::${structName}::Builder::Builder(const Input i) : _factory(^{ + NSMutableDictionary *d = [NSMutableDictionary new]; +${properties} + return d; +}) {} +inline JS::${hasteModuleName}::${structName}::Builder::Builder(${structName} i) : _factory(^{ + return i.unsafeRawValue(); +}) {}`; + +function toObjCType( + hasteModuleName: string, + nullableTypeAnnotation: Nullable, + isOptional: boolean = false, +): string { + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + const isRequired = !nullable && !isOptional; + const wrapOptional = (type: string) => { + return isRequired ? type : `std::optional<${type}>`; + }; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapOptional('double'); + default: + (typeAnnotation.name: empty); + throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); + } + case 'StringTypeAnnotation': + return 'NSString *'; + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'FloatTypeAnnotation': + return wrapOptional('double'); + case 'Int32TypeAnnotation': + return wrapOptional('double'); + case 'DoubleTypeAnnotation': + return wrapOptional('double'); + case 'BooleanTypeAnnotation': + return wrapOptional('bool'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'StringTypeAnnotation': + return 'NSString *'; + default: + throw new Error( + `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return isRequired ? 'id ' : 'id _Nullable '; + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType == null) { + return isRequired ? 'id ' : 'id _Nullable '; + } + + return wrapOptional( + `std::vector<${toObjCType( + hasteModuleName, + typeAnnotation.elementType, + )}>`, + ); + case 'TypeAliasTypeAnnotation': + const structName = capitalize(typeAnnotation.name); + const namespacedStructName = getNamespacedStructName( + hasteModuleName, + structName, + ); + return wrapOptional(`${namespacedStructName}::Builder`); + default: + (typeAnnotation.type: empty); + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } +} + +function toObjCValue( + hasteModuleName: string, + nullableTypeAnnotation: Nullable, + value: string, + depth: number, + isOptional: boolean = false, +): string { + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + const isRequired = !nullable && !isOptional; + + function wrapPrimitive(type: string) { + return !isRequired + ? `${value}.has_value() ? @((${type})${value}.value()) : nil` + : `@(${value})`; + } + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapPrimitive('double'); + default: + (typeAnnotation.name: empty); + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'StringTypeAnnotation': + return value; + case 'NumberTypeAnnotation': + return wrapPrimitive('double'); + case 'FloatTypeAnnotation': + return wrapPrimitive('double'); + case 'Int32TypeAnnotation': + return wrapPrimitive('double'); + case 'DoubleTypeAnnotation': + return wrapPrimitive('double'); + case 'BooleanTypeAnnotation': + return wrapPrimitive('BOOL'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapPrimitive('double'); + case 'StringTypeAnnotation': + return value; + default: + throw new Error( + `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return value; + case 'ArrayTypeAnnotation': + const {elementType} = typeAnnotation; + if (elementType == null) { + return value; + } + + const localVarName = `el${'_'.repeat(depth + 1)}`; + const elementObjCType = toObjCType(hasteModuleName, elementType); + const elementObjCValue = toObjCValue( + hasteModuleName, + elementType, + localVarName, + depth + 1, + ); + + const RCTConvertVecToArray = (transformer: string) => { + return `RCTConvert${ + !isRequired ? 'Optional' : '' + }VecToArray(${value}, ${transformer})`; + }; + + return RCTConvertVecToArray( + `^id(${elementObjCType} ${localVarName}) { return ${elementObjCValue}; }`, + ); + case 'TypeAliasTypeAnnotation': + return !isRequired + ? `${value}.has_value() ? ${value}.value().buildUnsafeRawValue() : nil` + : `${value}.buildUnsafeRawValue()`; + default: + (typeAnnotation.type: empty); + throw new Error( + `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, + ); + } +} + +function serializeConstantsStruct( + hasteModuleName: string, + struct: ConstantsStruct, +): StructSerilizationOutput { + const declaration = StructTemplate({ + hasteModuleName, + structName: struct.name, + builderInputProps: struct.properties + .map(property => { + const {typeAnnotation, optional} = property; + const safePropName = getSafePropertyName(property); + const objCType = toObjCType(hasteModuleName, typeAnnotation, optional); + + if (!optional) { + return `RCTRequired<${objCType}> ${safePropName};`; + } + + const space = ' '.repeat(objCType.endsWith('*') ? 0 : 1); + return `${objCType}${space}${safePropName};`; + }) + .join('\n '), + }); + + const methods = MethodTemplate({ + hasteModuleName, + structName: struct.name, + properties: struct.properties + .map(property => { + const {typeAnnotation, optional, name: propName} = property; + const safePropName = getSafePropertyName(property); + const objCValue = toObjCValue( + hasteModuleName, + typeAnnotation, + safePropName, + 0, + optional, + ); + + let varDecl = `auto ${safePropName} = i.${safePropName}`; + if (!optional) { + varDecl += '.get()'; + } + + const assignment = `d[@"${propName}"] = ` + objCValue; + return ` ${varDecl};\n ${assignment};`; + }) + .join('\n'), + }); + + return {declaration, methods}; +} + +module.exports = { + serializeConstantsStruct, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js new file mode 100644 index 000000000000..8a63405b37ac --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js @@ -0,0 +1,328 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('../Utils'), + getSafePropertyName = _require.getSafePropertyName, + getNamespacedStructName = _require.getNamespacedStructName; +const _require2 = require('../../../Utils'), + capitalize = _require2.capitalize; +const _require3 = require('../../../../parsers/parsers-commons'), + unwrapNullable = _require3.unwrapNullable; +const StructTemplate = ({ + hasteModuleName, + structName, + structProperties, +}) => `namespace JS { + namespace ${hasteModuleName} { + struct ${structName} { + ${structProperties} + + ${structName}(NSDictionary *const v) : _v(v) {} + private: + NSDictionary *_v; + }; + } +} + +@interface RCTCxxConvert (${hasteModuleName}_${structName}) ++ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json; +@end`; +const MethodTemplate = ({ + returnType, + returnValue, + hasteModuleName, + structName, + propertyName, + safePropertyName, +}) => `inline ${returnType}JS::${hasteModuleName}::${structName}::${safePropertyName}() const +{ + id const p = _v[@"${propertyName}"]; + return ${returnValue}; +}`; +function toObjCType( + hasteModuleName, + nullableTypeAnnotation, + isOptional = false, +) { + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + typeAnnotation = _unwrapNullable2[0], + nullable = _unwrapNullable2[1]; + const isRequired = !nullable && !isOptional; + const wrapOptional = type => { + return isRequired ? type : `std::optional<${type}>`; + }; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapOptional('double'); + default: + typeAnnotation.name; + throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); + } + case 'StringTypeAnnotation': + return 'NSString *'; + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'FloatTypeAnnotation': + return wrapOptional('double'); + case 'Int32TypeAnnotation': + return wrapOptional('double'); + case 'DoubleTypeAnnotation': + return wrapOptional('double'); + case 'BooleanTypeAnnotation': + return wrapOptional('bool'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'StringTypeAnnotation': + return 'NSString *'; + default: + throw new Error( + `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return isRequired ? 'id ' : 'id _Nullable'; + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType == null) { + return isRequired ? 'id ' : 'id _Nullable'; + } + return wrapOptional( + `facebook::react::LazyVector<${toObjCType( + hasteModuleName, + typeAnnotation.elementType, + )}>`, + ); + case 'TypeAliasTypeAnnotation': + const structName = capitalize(typeAnnotation.name); + const namespacedStructName = getNamespacedStructName( + hasteModuleName, + structName, + ); + return wrapOptional(namespacedStructName); + default: + typeAnnotation.type; + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } +} +function toObjCValue( + hasteModuleName, + nullableTypeAnnotation, + value, + depth, + isOptional = false, +) { + const _unwrapNullable3 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), + typeAnnotation = _unwrapNullable4[0], + nullable = _unwrapNullable4[1]; + const isRequired = !nullable && !isOptional; + const RCTBridgingTo = (type, arg) => { + const args = [value, arg].filter(Boolean).join(', '); + return isRequired + ? `RCTBridgingTo${type}(${args})` + : `RCTBridgingToOptional${type}(${args})`; + }; + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return RCTBridgingTo('Double'); + default: + typeAnnotation.name; + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'StringTypeAnnotation': + return RCTBridgingTo('String'); + case 'NumberTypeAnnotation': + return RCTBridgingTo('Double'); + case 'FloatTypeAnnotation': + return RCTBridgingTo('Double'); + case 'Int32TypeAnnotation': + return RCTBridgingTo('Double'); + case 'DoubleTypeAnnotation': + return RCTBridgingTo('Double'); + case 'BooleanTypeAnnotation': + return RCTBridgingTo('Bool'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return RCTBridgingTo('Double'); + case 'StringTypeAnnotation': + return RCTBridgingTo('String'); + default: + throw new Error( + `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return value; + case 'ArrayTypeAnnotation': + const elementType = typeAnnotation.elementType; + if (elementType == null) { + return value; + } + const localVarName = `itemValue_${depth}`; + const elementObjCType = toObjCType(hasteModuleName, elementType); + const elementObjCValue = toObjCValue( + hasteModuleName, + elementType, + localVarName, + depth + 1, + ); + return RCTBridgingTo( + 'Vec', + `^${elementObjCType}(id ${localVarName}) { return ${elementObjCValue}; }`, + ); + case 'TypeAliasTypeAnnotation': + const structName = capitalize(typeAnnotation.name); + const namespacedStructName = getNamespacedStructName( + hasteModuleName, + structName, + ); + return !isRequired + ? `(${value} == nil ? std::nullopt : std::make_optional(${namespacedStructName}(${value})))` + : `${namespacedStructName}(${value})`; + default: + typeAnnotation.type; + throw new Error( + `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, + ); + } +} +function serializeRegularStruct(hasteModuleName, struct) { + const declaration = StructTemplate({ + hasteModuleName: hasteModuleName, + structName: struct.name, + structProperties: struct.properties + .map(property => { + const typeAnnotation = property.typeAnnotation, + optional = property.optional; + const safePropName = getSafePropertyName(property); + const returnType = toObjCType( + hasteModuleName, + typeAnnotation, + optional, + ); + const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); + return `${returnType}${padding}${safePropName}() const;`; + }) + .join('\n '), + }); + + // $FlowFixMe[missing-type-arg] + const methods = struct.properties + .map(property => { + const typeAnnotation = property.typeAnnotation, + optional = property.optional, + propName = property.name; + const safePropertyName = getSafePropertyName(property); + const returnType = toObjCType(hasteModuleName, typeAnnotation, optional); + const returnValue = toObjCValue( + hasteModuleName, + typeAnnotation, + 'p', + 0, + optional, + ); + const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); + return MethodTemplate({ + hasteModuleName, + structName: struct.name, + returnType: returnType + padding, + returnValue: returnValue, + propertyName: propName, + safePropertyName, + }); + }) + .join('\n'); + return { + methods, + declaration, + }; +} +module.exports = { + serializeRegularStruct, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow new file mode 100644 index 000000000000..e6c73c733888 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow @@ -0,0 +1,279 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +const {getSafePropertyName, getNamespacedStructName} = require('../Utils'); +const {capitalize} = require('../../../Utils'); + +import type {Nullable} from '../../../../CodegenSchema'; +import type {StructTypeAnnotation, RegularStruct} from '../StructCollector'; +import type {StructSerilizationOutput} from './serializeStruct'; + +const {unwrapNullable} = require('../../../../parsers/parsers-commons'); + +const StructTemplate = ({ + hasteModuleName, + structName, + structProperties, +}: $ReadOnly<{ + hasteModuleName: string, + structName: string, + structProperties: string, +}>) => `namespace JS { + namespace ${hasteModuleName} { + struct ${structName} { + ${structProperties} + + ${structName}(NSDictionary *const v) : _v(v) {} + private: + NSDictionary *_v; + }; + } +} + +@interface RCTCxxConvert (${hasteModuleName}_${structName}) ++ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json; +@end`; + +const MethodTemplate = ({ + returnType, + returnValue, + hasteModuleName, + structName, + propertyName, + safePropertyName, +}: $ReadOnly<{ + returnType: string, + returnValue: string, + hasteModuleName: string, + structName: string, + propertyName: string, + safePropertyName: string, +}>) => `inline ${returnType}JS::${hasteModuleName}::${structName}::${safePropertyName}() const +{ + id const p = _v[@"${propertyName}"]; + return ${returnValue}; +}`; + +function toObjCType( + hasteModuleName: string, + nullableTypeAnnotation: Nullable, + isOptional: boolean = false, +): string { + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + const isRequired = !nullable && !isOptional; + const wrapOptional = (type: string) => { + return isRequired ? type : `std::optional<${type}>`; + }; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapOptional('double'); + default: + (typeAnnotation.name: empty); + throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); + } + case 'StringTypeAnnotation': + return 'NSString *'; + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'FloatTypeAnnotation': + return wrapOptional('double'); + case 'Int32TypeAnnotation': + return wrapOptional('double'); + case 'DoubleTypeAnnotation': + return wrapOptional('double'); + case 'BooleanTypeAnnotation': + return wrapOptional('bool'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapOptional('double'); + case 'StringTypeAnnotation': + return 'NSString *'; + default: + throw new Error( + `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return isRequired ? 'id ' : 'id _Nullable'; + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType == null) { + return isRequired ? 'id ' : 'id _Nullable'; + } + return wrapOptional( + `facebook::react::LazyVector<${toObjCType( + hasteModuleName, + typeAnnotation.elementType, + )}>`, + ); + case 'TypeAliasTypeAnnotation': + const structName = capitalize(typeAnnotation.name); + const namespacedStructName = getNamespacedStructName( + hasteModuleName, + structName, + ); + return wrapOptional(namespacedStructName); + default: + (typeAnnotation.type: empty); + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } +} + +function toObjCValue( + hasteModuleName: string, + nullableTypeAnnotation: Nullable, + value: string, + depth: number, + isOptional: boolean = false, +): string { + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + const isRequired = !nullable && !isOptional; + const RCTBridgingTo = (type: string, arg?: string) => { + const args = [value, arg].filter(Boolean).join(', '); + return isRequired + ? `RCTBridgingTo${type}(${args})` + : `RCTBridgingToOptional${type}(${args})`; + }; + + switch (typeAnnotation.type) { + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return RCTBridgingTo('Double'); + default: + (typeAnnotation.name: empty); + throw new Error( + `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, + ); + } + case 'StringTypeAnnotation': + return RCTBridgingTo('String'); + case 'NumberTypeAnnotation': + return RCTBridgingTo('Double'); + case 'FloatTypeAnnotation': + return RCTBridgingTo('Double'); + case 'Int32TypeAnnotation': + return RCTBridgingTo('Double'); + case 'DoubleTypeAnnotation': + return RCTBridgingTo('Double'); + case 'BooleanTypeAnnotation': + return RCTBridgingTo('Bool'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return RCTBridgingTo('Double'); + case 'StringTypeAnnotation': + return RCTBridgingTo('String'); + default: + throw new Error( + `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return value; + case 'ArrayTypeAnnotation': + const {elementType} = typeAnnotation; + if (elementType == null) { + return value; + } + + const localVarName = `itemValue_${depth}`; + const elementObjCType = toObjCType(hasteModuleName, elementType); + const elementObjCValue = toObjCValue( + hasteModuleName, + elementType, + localVarName, + depth + 1, + ); + + return RCTBridgingTo( + 'Vec', + `^${elementObjCType}(id ${localVarName}) { return ${elementObjCValue}; }`, + ); + case 'TypeAliasTypeAnnotation': + const structName = capitalize(typeAnnotation.name); + const namespacedStructName = getNamespacedStructName( + hasteModuleName, + structName, + ); + + return !isRequired + ? `(${value} == nil ? std::nullopt : std::make_optional(${namespacedStructName}(${value})))` + : `${namespacedStructName}(${value})`; + default: + (typeAnnotation.type: empty); + throw new Error( + `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, + ); + } +} + +function serializeRegularStruct( + hasteModuleName: string, + struct: RegularStruct, +): StructSerilizationOutput { + const declaration = StructTemplate({ + hasteModuleName: hasteModuleName, + structName: struct.name, + structProperties: struct.properties + .map(property => { + const {typeAnnotation, optional} = property; + const safePropName = getSafePropertyName(property); + const returnType = toObjCType( + hasteModuleName, + typeAnnotation, + optional, + ); + + const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); + return `${returnType}${padding}${safePropName}() const;`; + }) + .join('\n '), + }); + + // $FlowFixMe[missing-type-arg] + const methods = struct.properties + .map(property => { + const {typeAnnotation, optional, name: propName} = property; + const safePropertyName = getSafePropertyName(property); + const returnType = toObjCType(hasteModuleName, typeAnnotation, optional); + const returnValue = toObjCValue( + hasteModuleName, + typeAnnotation, + 'p', + 0, + optional, + ); + + const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); + return MethodTemplate({ + hasteModuleName, + structName: struct.name, + returnType: returnType + padding, + returnValue: returnValue, + propertyName: propName, + safePropertyName, + }); + }) + .join('\n'); + + return {methods, declaration}; +} + +module.exports = { + serializeRegularStruct, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js new file mode 100644 index 000000000000..d1d668af5d30 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js @@ -0,0 +1,25 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./serializeConstantsStruct'), + serializeConstantsStruct = _require.serializeConstantsStruct; +const _require2 = require('./serializeRegularStruct'), + serializeRegularStruct = _require2.serializeRegularStruct; +function serializeStruct(hasteModuleName, struct) { + if (struct.context === 'REGULAR') { + return serializeRegularStruct(hasteModuleName, struct); + } + return serializeConstantsStruct(hasteModuleName, struct); +} +module.exports = { + serializeStruct, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow new file mode 100644 index 000000000000..d5b38f45357a --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow @@ -0,0 +1,35 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {Struct} from '../StructCollector'; + +const {serializeConstantsStruct} = require('./serializeConstantsStruct'); +const {serializeRegularStruct} = require('./serializeRegularStruct'); + +export type StructSerilizationOutput = $ReadOnly<{ + methods: string, + declaration: string, +}>; + +function serializeStruct( + hasteModuleName: string, + struct: Struct, +): StructSerilizationOutput { + if (struct.context === 'REGULAR') { + return serializeRegularStruct(hasteModuleName, struct); + } + return serializeConstantsStruct(hasteModuleName, struct); +} + +module.exports = { + serializeStruct, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js new file mode 100644 index 000000000000..e21f0d132999 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js @@ -0,0 +1,185 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../Utils'), + createAliasResolver = _require.createAliasResolver, + getModules = _require.getModules; +const _require2 = require('./StructCollector'), + StructCollector = _require2.StructCollector; +const _require3 = require('./header/serializeStruct'), + serializeStruct = _require3.serializeStruct; +const _require4 = require('./serializeMethod'), + serializeMethod = _require4.serializeMethod; +const _require5 = require('./source/serializeModule'), + serializeModuleSource = _require5.serializeModuleSource; +const ModuleDeclarationTemplate = ({ + hasteModuleName, + structDeclarations, + protocolMethods, +}) => `${structDeclarations} +@protocol ${hasteModuleName}Spec + +${protocolMethods} + +@end +namespace facebook { + namespace react { + /** + * ObjC++ class for module '${hasteModuleName}' + */ + class JSI_EXPORT ${hasteModuleName}SpecJSI : public ObjCTurboModule { + public: + ${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; + } // namespace react +} // namespace facebook`; +const HeaderFileTemplate = ({ + moduleDeclarations, + structInlineMethods, + assumeNonnull, +}) => + `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleObjCpp + * + * We create an umbrella header (and corresponding implementation) here since + * Cxx compilation in BUCK has a limitation: source-code producing genrule()s + * must have a single output. More files => more genrule()s => slower builds. + */ + +#ifndef __cplusplus +#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm. +#endif +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +` + + (assumeNonnull ? '\nNS_ASSUME_NONNULL_BEGIN\n' : '') + + moduleDeclarations + + '\n' + + structInlineMethods + + (assumeNonnull ? '\nNS_ASSUME_NONNULL_END\n' : '\n'); +const SourceFileTemplate = ({headerFileName, moduleImplementations}) => `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleObjCpp + * + * We create an umbrella header (and corresponding implementation) here since + * Cxx compilation in BUCK has a limitation: source-code producing genrule()s + * must have a single output. More files => more genrule()s => slower builds. + */ + +#import "${headerFileName}" + +${moduleImplementations} +`; +module.exports = { + generate(libraryName, schema, packageName, assumeNonnull) { + const nativeModules = getModules(schema); + const moduleDeclarations = []; + const structInlineMethods = []; + const moduleImplementations = []; + const hasteModuleNames = Object.keys(nativeModules).sort(); + for (const hasteModuleName of hasteModuleNames) { + const _nativeModules$hasteM = nativeModules[hasteModuleName], + aliasMap = _nativeModules$hasteM.aliasMap, + excludedPlatforms = _nativeModules$hasteM.excludedPlatforms, + properties = _nativeModules$hasteM.spec.properties; + if (excludedPlatforms != null && excludedPlatforms.includes('iOS')) { + continue; + } + const resolveAlias = createAliasResolver(aliasMap); + const structCollector = new StructCollector(); + const methodSerializations = []; + const serializeProperty = property => { + methodSerializations.push( + ...serializeMethod( + hasteModuleName, + property, + structCollector, + resolveAlias, + ), + ); + }; + + /** + * Note: As we serialize NativeModule methods, we insert structs into + * StructCollector, as we encounter them. + */ + properties + .filter(property => property.name !== 'getConstants') + .forEach(serializeProperty); + properties + .filter(property => property.name === 'getConstants') + .forEach(serializeProperty); + const generatedStructs = structCollector.getAllStructs(); + const structStrs = []; + const methodStrs = []; + for (const struct of generatedStructs) { + const _serializeStruct = serializeStruct(hasteModuleName, struct), + methods = _serializeStruct.methods, + declaration = _serializeStruct.declaration; + structStrs.push(declaration); + methodStrs.push(methods); + } + moduleDeclarations.push( + ModuleDeclarationTemplate({ + hasteModuleName: hasteModuleName, + structDeclarations: structStrs.join('\n'), + protocolMethods: methodSerializations + .map(({protocolMethod}) => protocolMethod) + .join('\n'), + }), + ); + structInlineMethods.push(methodStrs.join('\n')); + moduleImplementations.push( + serializeModuleSource( + hasteModuleName, + generatedStructs, + methodSerializations.filter( + ({selector}) => selector !== '@selector(constantsToExport)', + ), + ), + ); + } + const headerFileName = `${libraryName}.h`; + const headerFile = HeaderFileTemplate({ + moduleDeclarations: moduleDeclarations.join('\n'), + structInlineMethods: structInlineMethods.join('\n'), + assumeNonnull, + }); + const sourceFileName = `${libraryName}-generated.mm`; + const sourceFile = SourceFileTemplate({ + headerFileName, + moduleImplementations: moduleImplementations.join('\n'), + }); + return new Map([ + [headerFileName, headerFile], + [sourceFileName, sourceFile], + ]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js.flow new file mode 100644 index 000000000000..9524327b8713 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/index.js.flow @@ -0,0 +1,219 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {NativeModulePropertyShape} from '../../../CodegenSchema'; + +import type {SchemaType} from '../../../CodegenSchema'; +import type {MethodSerializationOutput} from './serializeMethod'; + +const {createAliasResolver, getModules} = require('../Utils'); + +const {StructCollector} = require('./StructCollector'); +const {serializeStruct} = require('./header/serializeStruct'); +const {serializeMethod} = require('./serializeMethod'); +const {serializeModuleSource} = require('./source/serializeModule'); + +type FilesOutput = Map; + +const ModuleDeclarationTemplate = ({ + hasteModuleName, + structDeclarations, + protocolMethods, +}: $ReadOnly<{ + hasteModuleName: string, + structDeclarations: string, + protocolMethods: string, +}>) => `${structDeclarations} +@protocol ${hasteModuleName}Spec + +${protocolMethods} + +@end +namespace facebook { + namespace react { + /** + * ObjC++ class for module '${hasteModuleName}' + */ + class JSI_EXPORT ${hasteModuleName}SpecJSI : public ObjCTurboModule { + public: + ${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; + } // namespace react +} // namespace facebook`; + +const HeaderFileTemplate = ({ + moduleDeclarations, + structInlineMethods, + assumeNonnull, +}: $ReadOnly<{ + moduleDeclarations: string, + structInlineMethods: string, + assumeNonnull: boolean, +}>) => + `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleObjCpp + * + * We create an umbrella header (and corresponding implementation) here since + * Cxx compilation in BUCK has a limitation: source-code producing genrule()s + * must have a single output. More files => more genrule()s => slower builds. + */ + +#ifndef __cplusplus +#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm. +#endif +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +` + + (assumeNonnull ? '\nNS_ASSUME_NONNULL_BEGIN\n' : '') + + moduleDeclarations + + '\n' + + structInlineMethods + + (assumeNonnull ? '\nNS_ASSUME_NONNULL_END\n' : '\n'); + +const SourceFileTemplate = ({ + headerFileName, + moduleImplementations, +}: $ReadOnly<{ + headerFileName: string, + moduleImplementations: string, +}>) => `/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * ${'@'}generated by codegen project: GenerateModuleObjCpp + * + * We create an umbrella header (and corresponding implementation) here since + * Cxx compilation in BUCK has a limitation: source-code producing genrule()s + * must have a single output. More files => more genrule()s => slower builds. + */ + +#import "${headerFileName}" + +${moduleImplementations} +`; + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean, + ): FilesOutput { + const nativeModules = getModules(schema); + + const moduleDeclarations: Array = []; + const structInlineMethods: Array = []; + const moduleImplementations: Array = []; + + const hasteModuleNames: Array = Object.keys(nativeModules).sort(); + for (const hasteModuleName of hasteModuleNames) { + const { + aliasMap, + excludedPlatforms, + spec: {properties}, + } = nativeModules[hasteModuleName]; + if (excludedPlatforms != null && excludedPlatforms.includes('iOS')) { + continue; + } + const resolveAlias = createAliasResolver(aliasMap); + const structCollector = new StructCollector(); + + const methodSerializations: Array = []; + const serializeProperty = (property: NativeModulePropertyShape) => { + methodSerializations.push( + ...serializeMethod( + hasteModuleName, + property, + structCollector, + resolveAlias, + ), + ); + }; + + /** + * Note: As we serialize NativeModule methods, we insert structs into + * StructCollector, as we encounter them. + */ + properties + .filter(property => property.name !== 'getConstants') + .forEach(serializeProperty); + properties + .filter(property => property.name === 'getConstants') + .forEach(serializeProperty); + + const generatedStructs = structCollector.getAllStructs(); + const structStrs = []; + const methodStrs = []; + + for (const struct of generatedStructs) { + const {methods, declaration} = serializeStruct(hasteModuleName, struct); + structStrs.push(declaration); + methodStrs.push(methods); + } + + moduleDeclarations.push( + ModuleDeclarationTemplate({ + hasteModuleName: hasteModuleName, + structDeclarations: structStrs.join('\n'), + protocolMethods: methodSerializations + .map(({protocolMethod}) => protocolMethod) + .join('\n'), + }), + ); + + structInlineMethods.push(methodStrs.join('\n')); + + moduleImplementations.push( + serializeModuleSource( + hasteModuleName, + generatedStructs, + methodSerializations.filter( + ({selector}) => selector !== '@selector(constantsToExport)', + ), + ), + ); + } + + const headerFileName = `${libraryName}.h`; + const headerFile = HeaderFileTemplate({ + moduleDeclarations: moduleDeclarations.join('\n'), + structInlineMethods: structInlineMethods.join('\n'), + assumeNonnull, + }); + + const sourceFileName = `${libraryName}-generated.mm`; + const sourceFile = SourceFileTemplate({ + headerFileName, + moduleImplementations: moduleImplementations.join('\n'), + }); + + return new Map([ + [headerFileName, headerFile], + [sourceFileName, sourceFile], + ]); + }, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js new file mode 100644 index 000000000000..1a0af9bb9295 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js @@ -0,0 +1,535 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const invariant = require('invariant'); +const _require = require('./Utils'), + getNamespacedStructName = _require.getNamespacedStructName; +const _require2 = require('../../Utils'), + capitalize = _require2.capitalize; +const _require3 = require('../../../parsers/parsers-commons'), + wrapNullable = _require3.wrapNullable, + unwrapNullable = _require3.unwrapNullable; +const ProtocolMethodTemplate = ({returnObjCType, methodName, params}) => + `- (${returnObjCType})${methodName}${params};`; +function serializeMethod( + hasteModuleName, + property, + structCollector, + resolveAlias, +) { + const methodName = property.name, + nullableTypeAnnotation = property.typeAnnotation; + const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 1), + propertyTypeAnnotation = _unwrapNullable2[0]; + const params = propertyTypeAnnotation.params; + if (methodName === 'getConstants') { + return serializeConstantsProtocolMethods( + hasteModuleName, + property, + structCollector, + resolveAlias, + ); + } + const methodParams = []; + const structParamRecords = []; + params.forEach((param, index) => { + const structName = getParamStructName(methodName, param); + const _getParamObjCType = getParamObjCType( + hasteModuleName, + methodName, + param, + structName, + structCollector, + resolveAlias, + ), + objCType = _getParamObjCType.objCType, + isStruct = _getParamObjCType.isStruct; + methodParams.push({ + paramName: param.name, + objCType, + }); + if (isStruct) { + structParamRecords.push({ + paramIndex: index, + structName, + }); + } + }); + + // Unwrap returnTypeAnnotation, so we check if the return type is Promise + // TODO(T76719514): Disallow nullable PromiseTypeAnnotations + const _unwrapNullable3 = unwrapNullable( + propertyTypeAnnotation.returnTypeAnnotation, + ), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 1), + returnTypeAnnotation = _unwrapNullable4[0]; + if (returnTypeAnnotation.type === 'PromiseTypeAnnotation') { + methodParams.push( + { + paramName: 'resolve', + objCType: 'RCTPromiseResolveBlock', + }, + { + paramName: 'reject', + objCType: 'RCTPromiseRejectBlock', + }, + ); + } + + /** + * Build Protocol Method + **/ + const returnObjCType = getReturnObjCType( + methodName, + propertyTypeAnnotation.returnTypeAnnotation, + ); + const paddingMax = `- (${returnObjCType})${methodName}`.length; + const objCParams = methodParams.reduce( + ($objCParams, {objCType, paramName}, i) => { + const rhs = `(${objCType})${paramName}`; + const padding = ' '.repeat(Math.max(0, paddingMax - paramName.length)); + return i === 0 + ? `:${rhs}` + : `${$objCParams}\n${padding}${paramName}:${rhs}`; + }, + '', + ); + const protocolMethod = ProtocolMethodTemplate({ + methodName, + returnObjCType, + params: objCParams, + }); + + /** + * Build ObjC Selector + */ + // $FlowFixMe[missing-type-arg] + const selector = methodParams + .map(({paramName}) => paramName) + .reduce(($selector, paramName, i) => { + return i === 0 ? `${$selector}:` : `${$selector}${paramName}:`; + }, methodName); + + /** + * Build JS Return type + */ + const returnJSType = getReturnJSType(methodName, returnTypeAnnotation); + return [ + { + methodName, + protocolMethod, + selector: `@selector(${selector})`, + structParamRecords, + returnJSType, + argCount: params.length, + }, + ]; +} +function getParamStructName(methodName, param) { + const _unwrapNullable5 = unwrapNullable(param.typeAnnotation), + _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 1), + typeAnnotation = _unwrapNullable6[0]; + if (typeAnnotation.type === 'TypeAliasTypeAnnotation') { + return typeAnnotation.name; + } + return `Spec${capitalize(methodName)}${capitalize(param.name)}`; +} +function getParamObjCType( + hasteModuleName, + methodName, + param, + structName, + structCollector, + resolveAlias, +) { + const paramName = param.name, + nullableTypeAnnotation = param.typeAnnotation; + const _unwrapNullable7 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable8 = _slicedToArray(_unwrapNullable7, 2), + typeAnnotation = _unwrapNullable8[0], + nullable = _unwrapNullable8[1]; + const notRequired = param.optional || nullable; + function wrapIntoNullableIfNeeded(generatedType) { + return nullable ? `${generatedType} _Nullable` : generatedType; + } + const isStruct = objCType => ({ + isStruct: true, + objCType, + }); + const notStruct = objCType => ({ + isStruct: false, + objCType, + }); + + // Handle types that can only be in parameters + switch (typeAnnotation.type) { + case 'FunctionTypeAnnotation': { + return notStruct('RCTResponseSenderBlock'); + } + case 'ArrayTypeAnnotation': { + /** + * Array in params always codegen NSArray * + * + * TODO(T73933406): Support codegen for Arrays of structs and primitives + * + * For example: + * Array => NSArray + * type Animal = {}; + * Array => NSArray, etc. + */ + return notStruct(wrapIntoNullableIfNeeded('NSArray *')); + } + } + const _unwrapNullable9 = unwrapNullable( + structCollector.process( + structName, + 'REGULAR', + resolveAlias, + wrapNullable(nullable, typeAnnotation), + ), + ), + _unwrapNullable10 = _slicedToArray(_unwrapNullable9, 1), + structTypeAnnotation = _unwrapNullable10[0]; + invariant( + structTypeAnnotation.type !== 'ArrayTypeAnnotation', + 'ArrayTypeAnnotations should have been processed earlier', + ); + switch (structTypeAnnotation.type) { + case 'TypeAliasTypeAnnotation': { + /** + * TODO(T73943261): Support nullable object literals and aliases? + */ + return isStruct( + getNamespacedStructName(hasteModuleName, structTypeAnnotation.name) + + ' &', + ); + } + case 'ReservedTypeAnnotation': + switch (structTypeAnnotation.name) { + case 'RootTag': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + default: + structTypeAnnotation.name; + throw new Error( + `Unsupported type for param "${paramName}" in ${methodName}. Found: ${structTypeAnnotation.type}`, + ); + } + case 'StringTypeAnnotation': + return notStruct(wrapIntoNullableIfNeeded('NSString *')); + case 'NumberTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'FloatTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'DoubleTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'Int32TypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'BooleanTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'BOOL'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'StringTypeAnnotation': + return notStruct(wrapIntoNullableIfNeeded('NSString *')); + default: + throw new Error( + `Unsupported enum type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + case 'GenericObjectTypeAnnotation': + return notStruct(wrapIntoNullableIfNeeded('NSDictionary *')); + default: + structTypeAnnotation.type; + throw new Error( + `Unsupported type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, + ); + } +} +function getReturnObjCType(methodName, nullableTypeAnnotation) { + const _unwrapNullable11 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable12 = _slicedToArray(_unwrapNullable11, 2), + typeAnnotation = _unwrapNullable12[0], + nullable = _unwrapNullable12[1]; + function wrapIntoNullableIfNeeded(generatedType) { + return nullable ? `${generatedType} _Nullable` : generatedType; + } + switch (typeAnnotation.type) { + case 'VoidTypeAnnotation': + return 'void'; + case 'PromiseTypeAnnotation': + return 'void'; + case 'ObjectTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + case 'TypeAliasTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType == null) { + return wrapIntoNullableIfNeeded('NSArray> *'); + } + return wrapIntoNullableIfNeeded( + `NSArray<${getReturnObjCType( + methodName, + typeAnnotation.elementType, + )}> *`, + ); + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapIntoNullableIfNeeded('NSNumber *'); + default: + typeAnnotation.name; + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.name}`, + ); + } + case 'StringTypeAnnotation': + // TODO: Can NSString * returns not be _Nullable? + // In the legacy codegen, we don't surround NSSTring * with _Nullable + return wrapIntoNullableIfNeeded('NSString *'); + case 'NumberTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'FloatTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'DoubleTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'Int32TypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'BooleanTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'StringTypeAnnotation': + return wrapIntoNullableIfNeeded('NSString *'); + default: + throw new Error( + `Unsupported enum return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'ObjectTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + case 'StringTypeAnnotation': + // TODO: Can NSString * returns not be _Nullable? + // In the legacy codegen, we don't surround NSSTring * with _Nullable + return wrapIntoNullableIfNeeded('NSString *'); + default: + throw new Error( + `Unsupported union return type for ${methodName}, found: ${typeAnnotation.memberType}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + default: + typeAnnotation.type; + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } +} +function getReturnJSType(methodName, nullableTypeAnnotation) { + const _unwrapNullable13 = unwrapNullable(nullableTypeAnnotation), + _unwrapNullable14 = _slicedToArray(_unwrapNullable13, 1), + typeAnnotation = _unwrapNullable14[0]; + switch (typeAnnotation.type) { + case 'VoidTypeAnnotation': + return 'VoidKind'; + case 'PromiseTypeAnnotation': + return 'PromiseKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'TypeAliasTypeAnnotation': + return 'ObjectKind'; + case 'ArrayTypeAnnotation': + return 'ArrayKind'; + case 'ReservedTypeAnnotation': + return 'NumberKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'FloatTypeAnnotation': + return 'NumberKind'; + case 'DoubleTypeAnnotation': + return 'NumberKind'; + case 'Int32TypeAnnotation': + return 'NumberKind'; + case 'BooleanTypeAnnotation': + return 'BooleanKind'; + case 'GenericObjectTypeAnnotation': + return 'ObjectKind'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + default: + typeAnnotation.type; + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } +} +function serializeConstantsProtocolMethods( + hasteModuleName, + property, + structCollector, + resolveAlias, +) { + const _unwrapNullable15 = unwrapNullable(property.typeAnnotation), + _unwrapNullable16 = _slicedToArray(_unwrapNullable15, 1), + propertyTypeAnnotation = _unwrapNullable16[0]; + if (propertyTypeAnnotation.params.length !== 0) { + throw new Error( + `${hasteModuleName}.getConstants() may only accept 0 arguments.`, + ); + } + let returnTypeAnnotation = propertyTypeAnnotation.returnTypeAnnotation; + if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + // The return type is an alias, resolve it to get the expected undelying object literal type + returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); + } + if (returnTypeAnnotation.type !== 'ObjectTypeAnnotation') { + throw new Error( + `${hasteModuleName}.getConstants() may only return an object literal: {...}` + + ` or a type alias of such. Got '${propertyTypeAnnotation.returnTypeAnnotation.type}'.`, + ); + } + if ( + returnTypeAnnotation.type === 'ObjectTypeAnnotation' && + returnTypeAnnotation.properties.length === 0 + ) { + return []; + } + const realTypeAnnotation = structCollector.process( + 'Constants', + 'CONSTANTS', + resolveAlias, + returnTypeAnnotation, + ); + invariant( + realTypeAnnotation.type === 'TypeAliasTypeAnnotation', + "Unable to generate C++ struct from module's getConstants() method return type.", + ); + const returnObjCType = `facebook::react::ModuleConstants`; + + // $FlowFixMe[missing-type-arg] + return ['constantsToExport', 'getConstants'].map(methodName => { + const protocolMethod = ProtocolMethodTemplate({ + methodName, + returnObjCType, + params: '', + }); + return { + methodName, + protocolMethod, + returnJSType: 'ObjectKind', + selector: `@selector(${methodName})`, + structParamRecords: [], + argCount: 0, + }; + }); +} +module.exports = { + serializeMethod, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow new file mode 100644 index 000000000000..9dcf621c7096 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow @@ -0,0 +1,520 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + Nullable, + NamedShape, + NativeModuleParamTypeAnnotation, + NativeModuleReturnTypeAnnotation, + NativeModulePropertyShape, +} from '../../../CodegenSchema'; + +import type {AliasResolver} from '../Utils'; +import type {StructCollector} from './StructCollector'; + +const invariant = require('invariant'); +const {getNamespacedStructName} = require('./Utils'); +const {capitalize} = require('../../Utils'); +const { + wrapNullable, + unwrapNullable, +} = require('../../../parsers/parsers-commons'); + +const ProtocolMethodTemplate = ({ + returnObjCType, + methodName, + params, +}: $ReadOnly<{ + returnObjCType: string, + methodName: string, + params: string, +}>) => `- (${returnObjCType})${methodName}${params};`; + +export type StructParameterRecord = $ReadOnly<{ + paramIndex: number, + structName: string, +}>; + +type ReturnJSType = + | 'VoidKind' + | 'BooleanKind' + | 'PromiseKind' + | 'ObjectKind' + | 'ArrayKind' + | 'NumberKind' + | 'StringKind'; + +export type MethodSerializationOutput = $ReadOnly<{ + methodName: string, + protocolMethod: string, + selector: string, + structParamRecords: $ReadOnlyArray, + returnJSType: ReturnJSType, + argCount: number, +}>; + +function serializeMethod( + hasteModuleName: string, + property: NativeModulePropertyShape, + structCollector: StructCollector, + resolveAlias: AliasResolver, +): $ReadOnlyArray { + const {name: methodName, typeAnnotation: nullableTypeAnnotation} = property; + const [propertyTypeAnnotation] = unwrapNullable(nullableTypeAnnotation); + const {params} = propertyTypeAnnotation; + + if (methodName === 'getConstants') { + return serializeConstantsProtocolMethods( + hasteModuleName, + property, + structCollector, + resolveAlias, + ); + } + + const methodParams: Array<{paramName: string, objCType: string}> = []; + const structParamRecords: Array = []; + + params.forEach((param, index) => { + const structName = getParamStructName(methodName, param); + const {objCType, isStruct} = getParamObjCType( + hasteModuleName, + methodName, + param, + structName, + structCollector, + resolveAlias, + ); + + methodParams.push({paramName: param.name, objCType}); + + if (isStruct) { + structParamRecords.push({paramIndex: index, structName}); + } + }); + + // Unwrap returnTypeAnnotation, so we check if the return type is Promise + // TODO(T76719514): Disallow nullable PromiseTypeAnnotations + const [returnTypeAnnotation] = unwrapNullable( + propertyTypeAnnotation.returnTypeAnnotation, + ); + + if (returnTypeAnnotation.type === 'PromiseTypeAnnotation') { + methodParams.push( + {paramName: 'resolve', objCType: 'RCTPromiseResolveBlock'}, + {paramName: 'reject', objCType: 'RCTPromiseRejectBlock'}, + ); + } + + /** + * Build Protocol Method + **/ + const returnObjCType = getReturnObjCType( + methodName, + propertyTypeAnnotation.returnTypeAnnotation, + ); + const paddingMax = `- (${returnObjCType})${methodName}`.length; + + const objCParams = methodParams.reduce( + ($objCParams, {objCType, paramName}, i) => { + const rhs = `(${objCType})${paramName}`; + const padding = ' '.repeat(Math.max(0, paddingMax - paramName.length)); + return i === 0 + ? `:${rhs}` + : `${$objCParams}\n${padding}${paramName}:${rhs}`; + }, + '', + ); + + const protocolMethod = ProtocolMethodTemplate({ + methodName, + returnObjCType, + params: objCParams, + }); + + /** + * Build ObjC Selector + */ + // $FlowFixMe[missing-type-arg] + const selector = methodParams + .map(({paramName}) => paramName) + .reduce(($selector, paramName, i) => { + return i === 0 ? `${$selector}:` : `${$selector}${paramName}:`; + }, methodName); + + /** + * Build JS Return type + */ + const returnJSType = getReturnJSType(methodName, returnTypeAnnotation); + + return [ + { + methodName, + protocolMethod, + selector: `@selector(${selector})`, + structParamRecords, + returnJSType, + argCount: params.length, + }, + ]; +} + +type Param = NamedShape>; + +function getParamStructName(methodName: string, param: Param): string { + const [typeAnnotation] = unwrapNullable(param.typeAnnotation); + if (typeAnnotation.type === 'TypeAliasTypeAnnotation') { + return typeAnnotation.name; + } + + return `Spec${capitalize(methodName)}${capitalize(param.name)}`; +} + +function getParamObjCType( + hasteModuleName: string, + methodName: string, + param: Param, + structName: string, + structCollector: StructCollector, + resolveAlias: AliasResolver, +): $ReadOnly<{objCType: string, isStruct: boolean}> { + const {name: paramName, typeAnnotation: nullableTypeAnnotation} = param; + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + const notRequired = param.optional || nullable; + + function wrapIntoNullableIfNeeded(generatedType: string) { + return nullable ? `${generatedType} _Nullable` : generatedType; + } + + const isStruct = (objCType: string) => ({ + isStruct: true, + objCType, + }); + + const notStruct = (objCType: string) => ({ + isStruct: false, + objCType, + }); + + // Handle types that can only be in parameters + switch (typeAnnotation.type) { + case 'FunctionTypeAnnotation': { + return notStruct('RCTResponseSenderBlock'); + } + case 'ArrayTypeAnnotation': { + /** + * Array in params always codegen NSArray * + * + * TODO(T73933406): Support codegen for Arrays of structs and primitives + * + * For example: + * Array => NSArray + * type Animal = {}; + * Array => NSArray, etc. + */ + return notStruct(wrapIntoNullableIfNeeded('NSArray *')); + } + } + + const [structTypeAnnotation] = unwrapNullable( + structCollector.process( + structName, + 'REGULAR', + resolveAlias, + wrapNullable(nullable, typeAnnotation), + ), + ); + + invariant( + structTypeAnnotation.type !== 'ArrayTypeAnnotation', + 'ArrayTypeAnnotations should have been processed earlier', + ); + + switch (structTypeAnnotation.type) { + case 'TypeAliasTypeAnnotation': { + /** + * TODO(T73943261): Support nullable object literals and aliases? + */ + return isStruct( + getNamespacedStructName(hasteModuleName, structTypeAnnotation.name) + + ' &', + ); + } + case 'ReservedTypeAnnotation': + switch (structTypeAnnotation.name) { + case 'RootTag': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + default: + (structTypeAnnotation.name: empty); + throw new Error( + `Unsupported type for param "${paramName}" in ${methodName}. Found: ${structTypeAnnotation.type}`, + ); + } + case 'StringTypeAnnotation': + return notStruct(wrapIntoNullableIfNeeded('NSString *')); + case 'NumberTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'FloatTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'DoubleTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'Int32TypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'BooleanTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'BOOL'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return notStruct(notRequired ? 'NSNumber *' : 'double'); + case 'StringTypeAnnotation': + return notStruct(wrapIntoNullableIfNeeded('NSString *')); + default: + throw new Error( + `Unsupported enum type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + case 'GenericObjectTypeAnnotation': + return notStruct(wrapIntoNullableIfNeeded('NSDictionary *')); + default: + (structTypeAnnotation.type: empty); + throw new Error( + `Unsupported type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, + ); + } +} + +function getReturnObjCType( + methodName: string, + nullableTypeAnnotation: Nullable, +): string { + const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); + + function wrapIntoNullableIfNeeded(generatedType: string) { + return nullable ? `${generatedType} _Nullable` : generatedType; + } + + switch (typeAnnotation.type) { + case 'VoidTypeAnnotation': + return 'void'; + case 'PromiseTypeAnnotation': + return 'void'; + case 'ObjectTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + case 'TypeAliasTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + case 'ArrayTypeAnnotation': + if (typeAnnotation.elementType == null) { + return wrapIntoNullableIfNeeded('NSArray> *'); + } + + return wrapIntoNullableIfNeeded( + `NSArray<${getReturnObjCType( + methodName, + typeAnnotation.elementType, + )}> *`, + ); + case 'ReservedTypeAnnotation': + switch (typeAnnotation.name) { + case 'RootTag': + return wrapIntoNullableIfNeeded('NSNumber *'); + default: + (typeAnnotation.name: empty); + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.name}`, + ); + } + case 'StringTypeAnnotation': + // TODO: Can NSString * returns not be _Nullable? + // In the legacy codegen, we don't surround NSSTring * with _Nullable + return wrapIntoNullableIfNeeded('NSString *'); + case 'NumberTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'FloatTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'DoubleTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'Int32TypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'BooleanTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'StringTypeAnnotation': + return wrapIntoNullableIfNeeded('NSString *'); + default: + throw new Error( + `Unsupported enum return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return wrapIntoNullableIfNeeded('NSNumber *'); + case 'ObjectTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + case 'StringTypeAnnotation': + // TODO: Can NSString * returns not be _Nullable? + // In the legacy codegen, we don't surround NSSTring * with _Nullable + return wrapIntoNullableIfNeeded('NSString *'); + default: + throw new Error( + `Unsupported union return type for ${methodName}, found: ${typeAnnotation.memberType}"`, + ); + } + case 'GenericObjectTypeAnnotation': + return wrapIntoNullableIfNeeded('NSDictionary *'); + default: + (typeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } +} + +function getReturnJSType( + methodName: string, + nullableTypeAnnotation: Nullable, +): ReturnJSType { + const [typeAnnotation] = unwrapNullable(nullableTypeAnnotation); + switch (typeAnnotation.type) { + case 'VoidTypeAnnotation': + return 'VoidKind'; + case 'PromiseTypeAnnotation': + return 'PromiseKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'TypeAliasTypeAnnotation': + return 'ObjectKind'; + case 'ArrayTypeAnnotation': + return 'ArrayKind'; + case 'ReservedTypeAnnotation': + return 'NumberKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'FloatTypeAnnotation': + return 'NumberKind'; + case 'DoubleTypeAnnotation': + return 'NumberKind'; + case 'Int32TypeAnnotation': + return 'NumberKind'; + case 'BooleanTypeAnnotation': + return 'BooleanKind'; + case 'GenericObjectTypeAnnotation': + return 'ObjectKind'; + case 'EnumDeclaration': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + case 'UnionTypeAnnotation': + switch (typeAnnotation.memberType) { + case 'NumberTypeAnnotation': + return 'NumberKind'; + case 'ObjectTypeAnnotation': + return 'ObjectKind'; + case 'StringTypeAnnotation': + return 'StringKind'; + default: + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } + default: + (typeAnnotation.type: 'MixedTypeAnnotation'); + throw new Error( + `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, + ); + } +} + +function serializeConstantsProtocolMethods( + hasteModuleName: string, + property: NativeModulePropertyShape, + structCollector: StructCollector, + resolveAlias: AliasResolver, +): $ReadOnlyArray { + const [propertyTypeAnnotation] = unwrapNullable(property.typeAnnotation); + if (propertyTypeAnnotation.params.length !== 0) { + throw new Error( + `${hasteModuleName}.getConstants() may only accept 0 arguments.`, + ); + } + + let {returnTypeAnnotation} = propertyTypeAnnotation; + + if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { + // The return type is an alias, resolve it to get the expected undelying object literal type + returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); + } + + if (returnTypeAnnotation.type !== 'ObjectTypeAnnotation') { + throw new Error( + `${hasteModuleName}.getConstants() may only return an object literal: {...}` + + ` or a type alias of such. Got '${propertyTypeAnnotation.returnTypeAnnotation.type}'.`, + ); + } + + if ( + returnTypeAnnotation.type === 'ObjectTypeAnnotation' && + returnTypeAnnotation.properties.length === 0 + ) { + return []; + } + + const realTypeAnnotation = structCollector.process( + 'Constants', + 'CONSTANTS', + resolveAlias, + returnTypeAnnotation, + ); + + invariant( + realTypeAnnotation.type === 'TypeAliasTypeAnnotation', + "Unable to generate C++ struct from module's getConstants() method return type.", + ); + + const returnObjCType = `facebook::react::ModuleConstants`; + + // $FlowFixMe[missing-type-arg] + return ['constantsToExport', 'getConstants'].map( + methodName => { + const protocolMethod = ProtocolMethodTemplate({ + methodName, + returnObjCType, + params: '', + }); + + return { + methodName, + protocolMethod, + returnJSType: 'ObjectKind', + selector: `@selector(${methodName})`, + structParamRecords: [], + argCount: 0, + }; + }, + ); +} + +module.exports = { + serializeMethod, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js new file mode 100644 index 000000000000..b67717b49464 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js @@ -0,0 +1,96 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const ModuleTemplate = ({ + hasteModuleName, + structs, + methodSerializationOutputs, +}) => `${structs + .map(struct => + RCTCxxConvertCategoryTemplate({ + hasteModuleName, + structName: struct.name, + }), + ) + .join('\n')} +namespace facebook { + namespace react { + ${methodSerializationOutputs + .map(serializedMethodParts => + InlineHostFunctionTemplate({ + hasteModuleName, + methodName: serializedMethodParts.methodName, + returnJSType: serializedMethodParts.returnJSType, + selector: serializedMethodParts.selector, + }), + ) + .join('\n')} + + ${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + ${methodSerializationOutputs + .map(({methodName, structParamRecords, argCount}) => + MethodMapEntryTemplate({ + hasteModuleName, + methodName, + structParamRecords, + argCount, + }), + ) + .join('\n' + ' '.repeat(8))} + } + } // namespace react +} // namespace facebook`; +const RCTCxxConvertCategoryTemplate = ({ + hasteModuleName, + structName, +}) => `@implementation RCTCxxConvert (${hasteModuleName}_${structName}) ++ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json +{ + return facebook::react::managedPointer(json); +} +@end`; +const InlineHostFunctionTemplate = ({ + hasteModuleName, + methodName, + returnJSType, + selector, +}) => ` + static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${methodName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { + return static_cast(turboModule).invokeObjCMethod(rt, ${returnJSType}, "${methodName}", ${selector}, args, count); + }`; +const MethodMapEntryTemplate = ({ + hasteModuleName, + methodName, + structParamRecords, + argCount, +}) => ` + methodMap_["${methodName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${methodName}}; + ${structParamRecords + .map(({paramIndex, structName}) => { + return `setMethodArgConversionSelector(@"${methodName}", ${paramIndex}, @"JS_${hasteModuleName}_${structName}:");`; + }) + .join('\n' + ' '.repeat(8))}`; +function serializeModuleSource( + hasteModuleName, + structs, + methodSerializationOutputs, +) { + return ModuleTemplate({ + hasteModuleName, + structs: structs.filter(({context}) => context !== 'CONSTANTS'), + methodSerializationOutputs, + }); +} +module.exports = { + serializeModuleSource, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow new file mode 100644 index 000000000000..2d9eb34d2564 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow @@ -0,0 +1,121 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {Struct} from '../StructCollector'; +import type { + MethodSerializationOutput, + StructParameterRecord, +} from '../serializeMethod'; + +const ModuleTemplate = ({ + hasteModuleName, + structs, + methodSerializationOutputs, +}: $ReadOnly<{ + hasteModuleName: string, + structs: $ReadOnlyArray, + methodSerializationOutputs: $ReadOnlyArray, +}>) => `${structs + .map(struct => + RCTCxxConvertCategoryTemplate({hasteModuleName, structName: struct.name}), + ) + .join('\n')} +namespace facebook { + namespace react { + ${methodSerializationOutputs + .map(serializedMethodParts => + InlineHostFunctionTemplate({ + hasteModuleName, + methodName: serializedMethodParts.methodName, + returnJSType: serializedMethodParts.returnJSType, + selector: serializedMethodParts.selector, + }), + ) + .join('\n')} + + ${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + ${methodSerializationOutputs + .map(({methodName, structParamRecords, argCount}) => + MethodMapEntryTemplate({ + hasteModuleName, + methodName, + structParamRecords, + argCount, + }), + ) + .join('\n' + ' '.repeat(8))} + } + } // namespace react +} // namespace facebook`; + +const RCTCxxConvertCategoryTemplate = ({ + hasteModuleName, + structName, +}: $ReadOnly<{ + hasteModuleName: string, + structName: string, +}>) => `@implementation RCTCxxConvert (${hasteModuleName}_${structName}) ++ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json +{ + return facebook::react::managedPointer(json); +} +@end`; + +const InlineHostFunctionTemplate = ({ + hasteModuleName, + methodName, + returnJSType, + selector, +}: $ReadOnly<{ + hasteModuleName: string, + methodName: string, + returnJSType: string, + selector: string, +}>) => ` + static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${methodName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { + return static_cast(turboModule).invokeObjCMethod(rt, ${returnJSType}, "${methodName}", ${selector}, args, count); + }`; + +const MethodMapEntryTemplate = ({ + hasteModuleName, + methodName, + structParamRecords, + argCount, +}: $ReadOnly<{ + hasteModuleName: string, + methodName: string, + structParamRecords: $ReadOnlyArray, + argCount: number, +}>) => ` + methodMap_["${methodName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${methodName}}; + ${structParamRecords + .map(({paramIndex, structName}) => { + return `setMethodArgConversionSelector(@"${methodName}", ${paramIndex}, @"JS_${hasteModuleName}_${structName}:");`; + }) + .join('\n' + ' '.repeat(8))}`; + +function serializeModuleSource( + hasteModuleName: string, + structs: $ReadOnlyArray, + methodSerializationOutputs: $ReadOnlyArray, +): string { + return ModuleTemplate({ + hasteModuleName, + structs: structs.filter(({context}) => context !== 'CONSTANTS'), + methodSerializationOutputs, + }); +} + +module.exports = { + serializeModuleSource, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/Utils.js b/packages/react-native-codegen/lib/generators/modules/Utils.js new file mode 100644 index 000000000000..42739d275f1e --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/Utils.js @@ -0,0 +1,38 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const invariant = require('invariant'); +function createAliasResolver(aliasMap) { + return aliasName => { + const alias = aliasMap[aliasName]; + invariant(alias != null, `Unable to resolve type alias '${aliasName}'.`); + return alias; + }; +} +function getModules(schema) { + return Object.keys(schema.modules).reduce((modules, hasteModuleName) => { + const module = schema.modules[hasteModuleName]; + if (module == null || module.type === 'Component') { + return modules; + } + modules[hasteModuleName] = module; + return modules; + }, {}); +} +function getAreEnumMembersInteger(members) { + return !members.some(m => `${m.value}`.includes('.')); +} +module.exports = { + createAliasResolver, + getModules, + getAreEnumMembersInteger, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/Utils.js.flow b/packages/react-native-codegen/lib/generators/modules/Utils.js.flow new file mode 100644 index 000000000000..8d172d32abc8 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/Utils.js.flow @@ -0,0 +1,59 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + SchemaType, + NativeModuleAliasMap, + NativeModuleObjectTypeAnnotation, + NativeModuleSchema, + NativeModuleEnumMembers, +} from '../../CodegenSchema'; + +const invariant = require('invariant'); + +export type AliasResolver = ( + aliasName: string, +) => NativeModuleObjectTypeAnnotation; + +function createAliasResolver(aliasMap: NativeModuleAliasMap): AliasResolver { + return (aliasName: string) => { + const alias = aliasMap[aliasName]; + invariant(alias != null, `Unable to resolve type alias '${aliasName}'.`); + return alias; + }; +} + +function getModules( + schema: SchemaType, +): $ReadOnly<{[hasteModuleName: string]: NativeModuleSchema}> { + return Object.keys(schema.modules).reduce<{[string]: NativeModuleSchema}>( + (modules, hasteModuleName: string) => { + const module = schema.modules[hasteModuleName]; + if (module == null || module.type === 'Component') { + return modules; + } + modules[hasteModuleName] = module; + return modules; + }, + {}, + ); +} + +function getAreEnumMembersInteger(members: NativeModuleEnumMembers): boolean { + return !members.some(m => `${m.value}`.includes('.')); +} + +module.exports = { + createAliasResolver, + getModules, + getAreEnumMembersInteger, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js b/packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js new file mode 100644 index 000000000000..818e190ea92a --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js @@ -0,0 +1,1800 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const EMPTY_NATIVE_MODULES = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; +const SIMPLE_NATIVE_MODULES = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: { + NumEnum: { + type: 'EnumDeclarationWithMembers', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'ONE', + value: '1', + }, + { + name: 'TWO', + value: '2', + }, + ], + }, + FloatEnum: { + type: 'EnumDeclarationWithMembers', + name: 'FloatEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'POINT_ZERO', + value: '0.0', + }, + { + name: 'POINT_ONE', + value: '0.1', + }, + { + name: 'POINT_TWO', + value: '0.2', + }, + ], + }, + StringEnum: { + type: 'EnumDeclarationWithMembers', + name: 'StringEnum', + memberType: 'StringTypeAnnotation', + members: [ + { + name: 'HELLO', + value: 'hello', + }, + { + name: 'GoodBye', + value: 'goodbye', + }, + ], + }, + }, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'const1', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'const2', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'const3', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + params: [], + }, + }, + { + name: 'voidFunc', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + { + name: 'getBool', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getNumber', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NumberTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getString', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getArray', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'GenericObjectTypeAnnotation', + }, + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'GenericObjectTypeAnnotation', + }, + }, + }, + ], + }, + }, + { + name: 'getObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getRootTag', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }, + }, + ], + }, + }, + { + name: 'getValue', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'x', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'y', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'z', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getEnumReturn', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'EnumDeclaration', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + }, + params: [], + }, + }, + { + name: 'getValueWithCallback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + name: 'callback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + ], + }, + }, + { + name: 'getValueWithPromise', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'error', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getValueWithOptionalArg', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: true, + name: 'parameter', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getEnums', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + name: 'enumInt', + optional: false, + typeAnnotation: { + name: 'NumEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumFloat', + optional: false, + typeAnnotation: { + name: 'FloatEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumString', + optional: false, + typeAnnotation: { + name: 'StringEnum', + type: 'EnumDeclaration', + memberType: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; +const TWO_MODULES_DIFFERENT_FILES = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'voidFunc', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModule', + }, + NativeSampleTurboModule2: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + params: [], + }, + }, + { + name: 'voidFunc', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModule2', + }, + }, +}; +const COMPLEX_OBJECTS = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'difficult', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'D', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'E', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'F', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + params: [ + { + optional: false, + name: 'A', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'D', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'E', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'D', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'E', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'F', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'id', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: false, + name: 'F', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'optionals', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'A', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: true, + name: 'optionalNumberProperty', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'optionalArrayProperty', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + }, + { + optional: true, + name: 'optionalObjectProperty', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'x', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'y', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: true, + name: 'optionalGenericObjectProperty', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + { + optional: true, + name: 'optionalBooleanTypeProperty', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'optionalMethod', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'options', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + { + name: 'callback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + { + name: 'extras', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'key', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'value', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + }, + }, + }, + { + name: 'getArrays', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'options', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'arrayOfNumbers', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + }, + { + optional: true, + name: 'optionalArrayOfNumbers', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + }, + { + optional: false, + name: 'arrayOfStrings', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + { + optional: true, + name: 'optionalArrayOfStrings', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + { + optional: false, + name: 'arrayOfObjects', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'numberProperty', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'getNullableObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + }, + params: [], + }, + }, + { + name: 'getNullableGenericObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + params: [], + }, + }, + { + name: 'getNullableArray', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + }, + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; +const NATIVE_MODULES_WITH_TYPE_ALIASES = { + modules: { + AliasTurboModule: { + type: 'NativeModule', + aliasMap: { + Options: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'offset', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'x', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'y', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: false, + name: 'size', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'width', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'height', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: true, + name: 'displaySize', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'width', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'height', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: true, + name: 'resizeMode', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'allowExternalStorage', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + enumMap: {}, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + params: [], + }, + }, + { + name: 'cropImage', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'cropData', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'Options', + }, + }, + ], + }, + }, + ], + }, + moduleName: 'AliasTurboModule', + }, + }, +}; +const REAL_MODULE_EXAMPLE = { + modules: { + NativeCameraRollManager: { + type: 'NativeModule', + aliasMap: { + PhotoIdentifierImage: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'uri', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'playableDuration', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'width', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'height', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'isStored', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'filename', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + PhotoIdentifier: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'node', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'image', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'PhotoIdentifierImage', + }, + }, + { + optional: false, + name: 'type', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'group_name', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'timestamp', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'location', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'longitude', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'latitude', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'altitude', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'heading', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'speed', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + PhotoIdentifiersPage: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'edges', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'PhotoIdentifier', + }, + }, + }, + { + optional: false, + name: 'page_info', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'has_next_page', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: true, + name: 'start_cursor', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'end_cursor', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + GetPhotosParams: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'first', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'after', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'groupName', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'groupTypes', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'assetType', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'maxSize', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'mimeTypes', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + enumMap: {}, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + params: [], + }, + }, + { + name: 'getPhotos', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'params', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'GetPhotosParams', + }, + }, + ], + }, + }, + { + name: 'saveToCameraRoll', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'uri', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'type', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'deletePhotos', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + name: 'assets', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + ], + }, + moduleName: 'CameraRollManager', + }, + NativeExceptionsManager: { + type: 'NativeModule', + aliasMap: { + StackFrame: { + properties: [ + { + optional: true, + name: 'column', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'file', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'lineNumber', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'methodName', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'collapse', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + type: 'ObjectTypeAnnotation', + }, + ExceptionData: { + properties: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'originalMessage', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'name', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'componentStack', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'stack', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'id', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'isFatal', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: true, + name: 'extraData', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + type: 'ObjectTypeAnnotation', + }, + }, + enumMap: {}, + spec: { + properties: [ + { + name: 'reportFatalException', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'stack', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'exceptionId', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'reportSoftException', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'stack', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'exceptionId', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'reportException', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'data', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ExceptionData', + }, + }, + ], + }, + }, + }, + { + name: 'updateExceptionMessage', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'stack', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'exceptionId', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'dismissRedbox', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + }, + ], + }, + moduleName: 'ExceptionsManager', + }, + }, +}; +const CXX_ONLY_NATIVE_MODULES = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: { + ObjectAlias: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + enumMap: { + NumEnum: { + type: 'EnumDeclarationWithMembers', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'ONE', + value: '1', + }, + { + name: 'TWO', + value: '2', + }, + ], + }, + FloatEnum: { + type: 'EnumDeclarationWithMembers', + name: 'FloatEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'POINT_ZERO', + value: '0.0', + }, + { + name: 'POINT_ONE', + value: '0.1', + }, + { + name: 'POINT_TWO', + value: '0.2', + }, + ], + }, + StringEnum: { + type: 'EnumDeclarationWithMembers', + name: 'StringEnum', + memberType: 'StringTypeAnnotation', + members: [ + { + name: 'HELLO', + value: 'hello', + }, + { + name: 'GoodBye', + value: 'goodbye', + }, + ], + }, + }, + spec: { + properties: [ + { + name: 'getMixed', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'MixedTypeAnnotation', + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getNullableNumberFromNullableAlias', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + params: [ + { + name: 'a', + optional: false, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectAlias', + }, + }, + }, + ], + }, + }, + { + name: 'getEnums', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + name: 'enumInt', + optional: false, + typeAnnotation: { + name: 'NumEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumFloat', + optional: false, + typeAnnotation: { + name: 'FloatEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumString', + optional: false, + typeAnnotation: { + name: 'StringEnum', + type: 'EnumDeclaration', + memberType: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getUnion', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'ObjectTypeAnnotation', + }, + params: [ + { + name: 'chooseInt', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'chooseFloat', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'chooseObject', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'ObjectTypeAnnotation', + }, + }, + { + name: 'chooseString', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getEnumReturn', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'EnumDeclaration', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModuleCxx', + excludedPlatforms: ['iOS', 'android'], + }, + }, +}; +const SAMPLE_WITH_UPPERCASE_NAME = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + enumMap: {}, + aliasMap: {}, + spec: { + properties: [], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; +module.exports = { + complex_objects: COMPLEX_OBJECTS, + two_modules_different_files: TWO_MODULES_DIFFERENT_FILES, + empty_native_modules: EMPTY_NATIVE_MODULES, + simple_native_modules: SIMPLE_NATIVE_MODULES, + native_modules_with_type_aliases: NATIVE_MODULES_WITH_TYPE_ALIASES, + real_module_example: REAL_MODULE_EXAMPLE, + cxx_only_native_modules: CXX_ONLY_NATIVE_MODULES, + SampleWithUppercaseName: SAMPLE_WITH_UPPERCASE_NAME, +}; diff --git a/packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js.flow b/packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js.flow new file mode 100644 index 000000000000..8f96919d4c38 --- /dev/null +++ b/packages/react-native-codegen/lib/generators/modules/__test_fixtures__/fixtures.js.flow @@ -0,0 +1,1811 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../../CodegenSchema.js'; + +const EMPTY_NATIVE_MODULES: SchemaType = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; + +const SIMPLE_NATIVE_MODULES: SchemaType = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: { + NumEnum: { + type: 'EnumDeclarationWithMembers', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'ONE', + value: '1', + }, + { + name: 'TWO', + value: '2', + }, + ], + }, + FloatEnum: { + type: 'EnumDeclarationWithMembers', + name: 'FloatEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'POINT_ZERO', + value: '0.0', + }, + { + name: 'POINT_ONE', + value: '0.1', + }, + { + name: 'POINT_TWO', + value: '0.2', + }, + ], + }, + StringEnum: { + type: 'EnumDeclarationWithMembers', + name: 'StringEnum', + memberType: 'StringTypeAnnotation', + members: [ + { + name: 'HELLO', + value: 'hello', + }, + { + name: 'GoodBye', + value: 'goodbye', + }, + ], + }, + }, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'const1', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'const2', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'const3', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + params: [], + }, + }, + { + name: 'voidFunc', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + { + name: 'getBool', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getNumber', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NumberTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getString', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getArray', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'GenericObjectTypeAnnotation', + }, + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + + elementType: { + type: 'GenericObjectTypeAnnotation', + }, + }, + }, + ], + }, + }, + { + name: 'getObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getRootTag', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }, + params: [ + { + optional: false, + name: 'arg', + typeAnnotation: { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }, + }, + ], + }, + }, + { + name: 'getValue', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'x', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'y', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'z', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getEnumReturn', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'EnumDeclaration', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + }, + params: [], + }, + }, + { + name: 'getValueWithCallback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + name: 'callback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + ], + }, + }, + { + name: 'getValueWithPromise', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'error', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getValueWithOptionalArg', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: true, + name: 'parameter', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getEnums', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + name: 'enumInt', + optional: false, + typeAnnotation: { + name: 'NumEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumFloat', + optional: false, + typeAnnotation: { + name: 'FloatEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumString', + optional: false, + typeAnnotation: { + name: 'StringEnum', + type: 'EnumDeclaration', + memberType: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; + +const TWO_MODULES_DIFFERENT_FILES: SchemaType = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'voidFunc', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModule', + }, + NativeSampleTurboModule2: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + params: [], + }, + }, + { + name: 'voidFunc', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModule2', + }, + }, +}; + +const COMPLEX_OBJECTS: SchemaType = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [ + { + name: 'difficult', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'D', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'E', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'F', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + params: [ + { + optional: false, + name: 'A', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'D', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'E', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'D', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'E', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'F', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'id', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: false, + name: 'F', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'optionals', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'A', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: true, + name: 'optionalNumberProperty', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'optionalArrayProperty', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + }, + { + optional: true, + name: 'optionalObjectProperty', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'x', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'y', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: true, + name: 'optionalGenericObjectProperty', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + { + optional: true, + name: 'optionalBooleanTypeProperty', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'optionalMethod', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'options', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + { + name: 'callback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, + { + name: 'extras', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'key', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'value', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + }, + }, + }, + { + name: 'getArrays', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'options', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'arrayOfNumbers', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + }, + { + optional: true, + name: 'optionalArrayOfNumbers', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + }, + { + optional: false, + name: 'arrayOfStrings', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + { + optional: true, + name: 'optionalArrayOfStrings', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + { + optional: false, + name: 'arrayOfObjects', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'numberProperty', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'getNullableObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + }, + params: [], + }, + }, + { + name: 'getNullableGenericObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + params: [], + }, + }, + { + name: 'getNullableArray', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + }, + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; + +const NATIVE_MODULES_WITH_TYPE_ALIASES: SchemaType = { + modules: { + AliasTurboModule: { + type: 'NativeModule', + aliasMap: { + Options: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'offset', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'x', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'y', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: false, + name: 'size', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'width', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'height', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: true, + name: 'displaySize', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'width', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'height', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + optional: true, + name: 'resizeMode', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'allowExternalStorage', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + enumMap: {}, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + params: [], + }, + }, + { + name: 'cropImage', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'cropData', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'Options', + }, + }, + ], + }, + }, + ], + }, + moduleName: 'AliasTurboModule', + }, + }, +}; + +const REAL_MODULE_EXAMPLE: SchemaType = { + modules: { + NativeCameraRollManager: { + type: 'NativeModule', + aliasMap: { + PhotoIdentifierImage: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'uri', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'playableDuration', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'width', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'height', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'isStored', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: false, + name: 'filename', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + PhotoIdentifier: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'node', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'image', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'PhotoIdentifierImage', + }, + }, + { + optional: false, + name: 'type', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'group_name', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'timestamp', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'location', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'longitude', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'latitude', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'altitude', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'heading', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'speed', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + PhotoIdentifiersPage: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'edges', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'PhotoIdentifier', + }, + }, + }, + { + optional: false, + name: 'page_info', + typeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'has_next_page', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: true, + name: 'start_cursor', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'end_cursor', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + GetPhotosParams: { + type: 'ObjectTypeAnnotation', + properties: [ + { + optional: false, + name: 'first', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'after', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'groupName', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'groupTypes', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'assetType', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'maxSize', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: true, + name: 'mimeTypes', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + enumMap: {}, + spec: { + properties: [ + { + name: 'getConstants', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + params: [], + }, + }, + { + name: 'getPhotos', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'params', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'GetPhotosParams', + }, + }, + ], + }, + }, + { + name: 'saveToCameraRoll', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'uri', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'type', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'deletePhotos', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + }, + params: [ + { + name: 'assets', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + }, + ], + }, + moduleName: 'CameraRollManager', + }, + NativeExceptionsManager: { + type: 'NativeModule', + aliasMap: { + StackFrame: { + properties: [ + { + optional: true, + name: 'column', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'file', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'lineNumber', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'methodName', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: true, + name: 'collapse', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + type: 'ObjectTypeAnnotation', + }, + ExceptionData: { + properties: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'originalMessage', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'name', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'componentStack', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + optional: false, + name: 'stack', + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'id', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + optional: false, + name: 'isFatal', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + optional: true, + name: 'extraData', + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + }, + }, + ], + type: 'ObjectTypeAnnotation', + }, + }, + enumMap: {}, + spec: { + properties: [ + { + name: 'reportFatalException', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'stack', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'exceptionId', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'reportSoftException', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'stack', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'exceptionId', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'reportException', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'data', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ExceptionData', + }, + }, + ], + }, + }, + }, + { + name: 'updateExceptionMessage', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + optional: false, + name: 'message', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'stack', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'StackFrame', + }, + }, + }, + { + optional: false, + name: 'exceptionId', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'dismissRedbox', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + }, + ], + }, + moduleName: 'ExceptionsManager', + }, + }, +}; + +const CXX_ONLY_NATIVE_MODULES: SchemaType = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + aliasMap: { + ObjectAlias: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + enumMap: { + NumEnum: { + type: 'EnumDeclarationWithMembers', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'ONE', + value: '1', + }, + { + name: 'TWO', + value: '2', + }, + ], + }, + FloatEnum: { + type: 'EnumDeclarationWithMembers', + name: 'FloatEnum', + memberType: 'NumberTypeAnnotation', + members: [ + { + name: 'POINT_ZERO', + value: '0.0', + }, + { + name: 'POINT_ONE', + value: '0.1', + }, + { + name: 'POINT_TWO', + value: '0.2', + }, + ], + }, + StringEnum: { + type: 'EnumDeclarationWithMembers', + name: 'StringEnum', + memberType: 'StringTypeAnnotation', + members: [ + { + name: 'HELLO', + value: 'hello', + }, + { + name: 'GoodBye', + value: 'goodbye', + }, + ], + }, + }, + spec: { + properties: [ + { + name: 'getMixed', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'MixedTypeAnnotation', + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getNullableNumberFromNullableAlias', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + params: [ + { + name: 'a', + optional: false, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectAlias', + }, + }, + }, + ], + }, + }, + { + name: 'getEnums', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + name: 'enumInt', + optional: false, + typeAnnotation: { + name: 'NumEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumFloat', + optional: false, + typeAnnotation: { + name: 'FloatEnum', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'enumString', + optional: false, + typeAnnotation: { + name: 'StringEnum', + type: 'EnumDeclaration', + memberType: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getUnion', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'ObjectTypeAnnotation', + }, + params: [ + { + name: 'chooseInt', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'chooseFloat', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'NumberTypeAnnotation', + }, + }, + { + name: 'chooseObject', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'ObjectTypeAnnotation', + }, + }, + { + name: 'chooseString', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getEnumReturn', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'EnumDeclaration', + name: 'NumEnum', + memberType: 'NumberTypeAnnotation', + }, + params: [], + }, + }, + ], + }, + moduleName: 'SampleTurboModuleCxx', + excludedPlatforms: ['iOS', 'android'], + }, + }, +}; + +const SAMPLE_WITH_UPPERCASE_NAME: SchemaType = { + modules: { + NativeSampleTurboModule: { + type: 'NativeModule', + enumMap: {}, + aliasMap: {}, + spec: { + properties: [], + }, + moduleName: 'SampleTurboModule', + }, + }, +}; + +module.exports = { + complex_objects: COMPLEX_OBJECTS, + two_modules_different_files: TWO_MODULES_DIFFERENT_FILES, + empty_native_modules: EMPTY_NATIVE_MODULES, + simple_native_modules: SIMPLE_NATIVE_MODULES, + native_modules_with_type_aliases: NATIVE_MODULES_WITH_TYPE_ALIASES, + real_module_example: REAL_MODULE_EXAMPLE, + cxx_only_native_modules: CXX_ONLY_NATIVE_MODULES, + SampleWithUppercaseName: SAMPLE_WITH_UPPERCASE_NAME, +}; diff --git a/packages/react-native-codegen/lib/parsers/consistency/compareSnaps.js b/packages/react-native-codegen/lib/parsers/consistency/compareSnaps.js new file mode 100644 index 000000000000..0e549003cae8 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/consistency/compareSnaps.js @@ -0,0 +1,84 @@ +/** + * 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. + * + * @format + * @oncall react_native + */ + +'use strict'; + +function compareSnaps( + flowFixtures, + flowSnaps, + flowExtraCases, + tsFixtures, + tsSnaps, + tsExtraCases, + ignoredCases, +) { + const flowCases = Object.keys(flowFixtures).sort(); + const tsCases = Object.keys(tsFixtures).sort(); + const commonCases = flowCases.filter(name => tsCases.indexOf(name) !== -1); + describe('RN Codegen Parsers', () => { + it('should not unintentionally contains test case for Flow but not for TypeScript', () => { + expect( + flowCases.filter(name => commonCases.indexOf(name) === -1), + ).toEqual(flowExtraCases); + }); + it('should not unintentionally contains test case for TypeScript but not for Flow', () => { + expect(tsCases.filter(name => commonCases.indexOf(name) === -1)).toEqual( + tsExtraCases, + ); + }); + for (const commonCase of commonCases) { + const flowSnap = + flowSnaps[ + `RN Codegen Flow Parser can generate fixture ${commonCase} 1` + ]; + const tsSnap = + tsSnaps[ + `RN Codegen TypeScript Parser can generate fixture ${commonCase} 1` + ]; + it(`should be able to find the snapshot for Flow for case ${commonCase}`, () => { + expect(typeof flowSnap).toEqual('string'); + }); + it(`should be able to find the snapshot for TypeScript for case ${commonCase}`, () => { + expect(typeof tsSnap).toEqual('string'); + }); + if (ignoredCases.indexOf(commonCase) === -1) { + it(`should generate the same snapshot from Flow and TypeScript for fixture ${commonCase}`, () => { + expect(flowSnap).toEqual(tsSnap); + }); + } else { + it(`should generate the different snapshot from Flow and TypeScript for fixture ${commonCase}`, () => { + expect(flowSnap).not.toEqual(tsSnap); + }); + } + } + }); +} +function compareTsArraySnaps(tsSnaps, tsExtraCases) { + for (const array2Case of tsExtraCases.filter( + name => name.indexOf('ARRAY2') !== -1, + )) { + const arrayCase = array2Case.replace('ARRAY2', 'ARRAY'); + it(`should generate the same snap from fixture ${arrayCase} and ${array2Case}`, () => { + expect( + tsSnaps[ + `RN Codegen TypeScript Parser can generate fixture ${arrayCase}` + ], + ).toEqual( + tsSnaps[ + `RN Codegen TypeScript Parser can generate fixture ${array2Case}` + ], + ); + }); + } +} +module.exports = { + compareSnaps, + compareTsArraySnaps, +}; diff --git a/packages/react-native-codegen/lib/parsers/error-utils.js b/packages/react-native-codegen/lib/parsers/error-utils.js new file mode 100644 index 000000000000..d0704fdac844 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/error-utils.js @@ -0,0 +1,345 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./errors'), + MisnamedModuleInterfaceParserError = + _require.MisnamedModuleInterfaceParserError, + UnsupportedFunctionReturnTypeAnnotationParserError = + _require.UnsupportedFunctionReturnTypeAnnotationParserError, + ModuleInterfaceNotFoundParserError = + _require.ModuleInterfaceNotFoundParserError, + MoreThanOneModuleRegistryCallsParserError = + _require.MoreThanOneModuleRegistryCallsParserError, + UnusedModuleInterfaceParserError = _require.UnusedModuleInterfaceParserError, + IncorrectModuleRegistryCallArityParserError = + _require.IncorrectModuleRegistryCallArityParserError, + IncorrectModuleRegistryCallTypeParameterParserError = + _require.IncorrectModuleRegistryCallTypeParameterParserError, + IncorrectModuleRegistryCallArgumentTypeParserError = + _require.IncorrectModuleRegistryCallArgumentTypeParserError, + UnsupportedObjectPropertyValueTypeAnnotationParserError = + _require.UnsupportedObjectPropertyValueTypeAnnotationParserError, + UntypedModuleRegistryCallParserError = + _require.UntypedModuleRegistryCallParserError, + UnsupportedModulePropertyParserError = + _require.UnsupportedModulePropertyParserError, + MoreThanOneModuleInterfaceParserError = + _require.MoreThanOneModuleInterfaceParserError, + UnsupportedFunctionParamTypeAnnotationParserError = + _require.UnsupportedFunctionParamTypeAnnotationParserError, + UnsupportedArrayElementTypeAnnotationParserError = + _require.UnsupportedArrayElementTypeAnnotationParserError; +function throwIfModuleInterfaceIsMisnamed( + nativeModuleName, + moduleSpecId, + parserType, +) { + if (moduleSpecId.name !== 'Spec') { + throw new MisnamedModuleInterfaceParserError( + nativeModuleName, + moduleSpecId, + parserType, + ); + } +} +function throwIfModuleInterfaceNotFound( + numberOfModuleSpecs, + nativeModuleName, + ast, + parserType, +) { + if (numberOfModuleSpecs === 0) { + throw new ModuleInterfaceNotFoundParserError( + nativeModuleName, + ast, + parserType, + ); + } +} +function throwIfMoreThanOneModuleRegistryCalls( + hasteModuleName, + callExpressions, + callExpressionsLength, +) { + if (callExpressions.length > 1) { + throw new MoreThanOneModuleRegistryCallsParserError( + hasteModuleName, + callExpressions, + callExpressionsLength, + ); + } +} +function throwIfUnusedModuleInterfaceParserError( + nativeModuleName, + moduleSpec, + callExpressions, +) { + if (callExpressions.length === 0) { + throw new UnusedModuleInterfaceParserError(nativeModuleName, moduleSpec); + } +} +function throwIfWrongNumberOfCallExpressionArgs( + nativeModuleName, + flowCallExpression, + methodName, + numberOfCallExpressionArgs, +) { + if (numberOfCallExpressionArgs !== 1) { + throw new IncorrectModuleRegistryCallArityParserError( + nativeModuleName, + flowCallExpression, + methodName, + numberOfCallExpressionArgs, + ); + } +} +function throwIfIncorrectModuleRegistryCallTypeParameterParserError( + nativeModuleName, + typeArguments, + methodName, + moduleName, + parser, +) { + function throwError() { + throw new IncorrectModuleRegistryCallTypeParameterParserError( + nativeModuleName, + typeArguments, + methodName, + moduleName, + ); + } + if (parser.checkIfInvalidModule(typeArguments)) { + throwError(); + } +} +function throwIfUnsupportedFunctionReturnTypeAnnotationParserError( + nativeModuleName, + returnTypeAnnotation, + invalidReturnType, + cxxOnly, + returnType, +) { + if (!cxxOnly && returnType === 'FunctionTypeAnnotation') { + throw new UnsupportedFunctionReturnTypeAnnotationParserError( + nativeModuleName, + returnTypeAnnotation.returnType, + 'FunctionTypeAnnotation', + ); + } +} +function throwIfUntypedModule( + typeArguments, + hasteModuleName, + callExpression, + methodName, + moduleName, +) { + if (typeArguments == null) { + throw new UntypedModuleRegistryCallParserError( + hasteModuleName, + callExpression, + methodName, + moduleName, + ); + } +} +function throwIfModuleTypeIsUnsupported( + nativeModuleName, + propertyValue, + propertyName, + propertyValueType, + parser, +) { + if (!parser.functionTypeAnnotation(propertyValueType)) { + throw new UnsupportedModulePropertyParserError( + nativeModuleName, + propertyValue, + propertyName, + propertyValueType, + parser.language(), + ); + } +} +const UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap = { + FunctionTypeAnnotation: 'FunctionTypeAnnotation', + VoidTypeAnnotation: 'void', + PromiseTypeAnnotation: 'Promise', +}; +function throwIfPropertyValueTypeIsUnsupported( + moduleName, + propertyValue, + propertyKey, + type, +) { + const invalidPropertyValueType = + UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap[type]; + throw new UnsupportedObjectPropertyValueTypeAnnotationParserError( + moduleName, + propertyValue, + propertyKey, + invalidPropertyValueType, + ); +} +function throwIfMoreThanOneModuleInterfaceParserError( + nativeModuleName, + moduleSpecs, + parserType, +) { + if (moduleSpecs.length > 1) { + throw new MoreThanOneModuleInterfaceParserError( + nativeModuleName, + moduleSpecs, + moduleSpecs.map(node => node.id.name), + parserType, + ); + } +} +function throwIfUnsupportedFunctionParamTypeAnnotationParserError( + nativeModuleName, + languageParamTypeAnnotation, + paramName, + paramTypeAnnotationType, +) { + throw new UnsupportedFunctionParamTypeAnnotationParserError( + nativeModuleName, + languageParamTypeAnnotation, + paramName, + paramTypeAnnotationType, + ); +} +function throwIfArrayElementTypeAnnotationIsUnsupported( + hasteModuleName, + flowElementType, + flowArrayType, + type, +) { + const TypeMap = { + FunctionTypeAnnotation: 'FunctionTypeAnnotation', + VoidTypeAnnotation: 'void', + PromiseTypeAnnotation: 'Promise', + // TODO: Added as a work-around for now until TupleTypeAnnotation are fully supported in both flow and TS + // Right now they are partially treated as UnionTypeAnnotation + UnionTypeAnnotation: 'UnionTypeAnnotation', + }; + if (type in TypeMap) { + throw new UnsupportedArrayElementTypeAnnotationParserError( + hasteModuleName, + flowElementType, + flowArrayType, + TypeMap[type], + ); + } +} +function throwIfIncorrectModuleRegistryCallArgument( + nativeModuleName, + callExpressionArg, + methodName, +) { + if ( + callExpressionArg.type !== 'StringLiteral' && + callExpressionArg.type !== 'Literal' + ) { + const type = callExpressionArg.type; + throw new IncorrectModuleRegistryCallArgumentTypeParserError( + nativeModuleName, + callExpressionArg, + methodName, + type, + ); + } +} +function throwIfPartialNotAnnotatingTypeParameter( + typeAnnotation, + types, + parser, +) { + const annotatedElement = parser.extractAnnotatedElement( + typeAnnotation, + types, + ); + if (!annotatedElement) { + throw new Error('Partials only support annotating a type parameter.'); + } +} +function throwIfPartialWithMoreParameter(typeAnnotation) { + if (typeAnnotation.typeParameters.params.length !== 1) { + throw new Error('Partials only support annotating exactly one parameter.'); + } +} +function throwIfMoreThanOneCodegenNativecommands(commandsTypeNames) { + if (commandsTypeNames.length > 1) { + throw new Error('codegenNativeCommands may only be called once in a file'); + } +} +function throwIfConfigNotfound(foundConfigs) { + if (foundConfigs.length === 0) { + throw new Error('Could not find component config for native component'); + } +} +function throwIfMoreThanOneConfig(foundConfigs) { + if (foundConfigs.length > 1) { + throw new Error('Only one component is supported per file'); + } +} +function throwIfEventHasNoName(typeAnnotation, parser) { + const name = + parser.language() === 'Flow' ? typeAnnotation.id : typeAnnotation.typeName; + if (!name) { + throw new Error("typeAnnotation of event doesn't have a name"); + } +} +function throwIfBubblingTypeIsNull(bubblingType, eventName) { + if (!bubblingType) { + throw new Error( + `Unable to determine event bubbling type for "${eventName}"`, + ); + } + return bubblingType; +} +function throwIfArgumentPropsAreNull(argumentProps, eventName) { + if (!argumentProps) { + throw new Error(`Unable to determine event arguments for "${eventName}"`); + } + return argumentProps; +} +function throwIfTypeAliasIsNotInterface(typeAlias, parser) { + if (typeAlias.type !== parser.interfaceDeclaration) { + throw new Error( + `The type argument for codegenNativeCommands must be an interface, received ${typeAlias.type}`, + ); + } +} +module.exports = { + throwIfModuleInterfaceIsMisnamed, + throwIfUnsupportedFunctionReturnTypeAnnotationParserError, + throwIfModuleInterfaceNotFound, + throwIfMoreThanOneModuleRegistryCalls, + throwIfPropertyValueTypeIsUnsupported, + throwIfUnusedModuleInterfaceParserError, + throwIfWrongNumberOfCallExpressionArgs, + throwIfIncorrectModuleRegistryCallTypeParameterParserError, + throwIfUntypedModule, + throwIfModuleTypeIsUnsupported, + throwIfMoreThanOneModuleInterfaceParserError, + throwIfUnsupportedFunctionParamTypeAnnotationParserError, + throwIfArrayElementTypeAnnotationIsUnsupported, + throwIfIncorrectModuleRegistryCallArgument, + throwIfPartialNotAnnotatingTypeParameter, + throwIfPartialWithMoreParameter, + throwIfMoreThanOneCodegenNativecommands, + throwIfConfigNotfound, + throwIfMoreThanOneConfig, + throwIfEventHasNoName, + throwIfBubblingTypeIsNull, + throwIfArgumentPropsAreNull, + throwIfTypeAliasIsNotInterface, +}; diff --git a/packages/react-native-codegen/lib/parsers/error-utils.js.flow b/packages/react-native-codegen/lib/parsers/error-utils.js.flow new file mode 100644 index 000000000000..1fedbe252991 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/error-utils.js.flow @@ -0,0 +1,378 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {NativeModuleTypeAnnotation} from '../CodegenSchema'; +import type {ParserType} from './errors'; +import type {Parser} from './parser'; +import type {TypeDeclarationMap} from '../parsers/utils'; + +const { + MisnamedModuleInterfaceParserError, + UnsupportedFunctionReturnTypeAnnotationParserError, + ModuleInterfaceNotFoundParserError, + MoreThanOneModuleRegistryCallsParserError, + UnusedModuleInterfaceParserError, + IncorrectModuleRegistryCallArityParserError, + IncorrectModuleRegistryCallTypeParameterParserError, + IncorrectModuleRegistryCallArgumentTypeParserError, + UnsupportedObjectPropertyValueTypeAnnotationParserError, + UntypedModuleRegistryCallParserError, + UnsupportedModulePropertyParserError, + MoreThanOneModuleInterfaceParserError, + UnsupportedFunctionParamTypeAnnotationParserError, + UnsupportedArrayElementTypeAnnotationParserError, +} = require('./errors'); + +function throwIfModuleInterfaceIsMisnamed( + nativeModuleName: string, + moduleSpecId: $FlowFixMe, + parserType: ParserType, +) { + if (moduleSpecId.name !== 'Spec') { + throw new MisnamedModuleInterfaceParserError( + nativeModuleName, + moduleSpecId, + parserType, + ); + } +} + +function throwIfModuleInterfaceNotFound( + numberOfModuleSpecs: number, + nativeModuleName: string, + ast: $FlowFixMe, + parserType: ParserType, +) { + if (numberOfModuleSpecs === 0) { + throw new ModuleInterfaceNotFoundParserError( + nativeModuleName, + ast, + parserType, + ); + } +} + +function throwIfMoreThanOneModuleRegistryCalls( + hasteModuleName: string, + callExpressions: $FlowFixMe, + callExpressionsLength: number, +) { + if (callExpressions.length > 1) { + throw new MoreThanOneModuleRegistryCallsParserError( + hasteModuleName, + callExpressions, + callExpressionsLength, + ); + } +} + +function throwIfUnusedModuleInterfaceParserError( + nativeModuleName: string, + moduleSpec: $FlowFixMe, + callExpressions: $FlowFixMe, +) { + if (callExpressions.length === 0) { + throw new UnusedModuleInterfaceParserError(nativeModuleName, moduleSpec); + } +} + +function throwIfWrongNumberOfCallExpressionArgs( + nativeModuleName: string, + flowCallExpression: $FlowFixMe, + methodName: string, + numberOfCallExpressionArgs: number, +) { + if (numberOfCallExpressionArgs !== 1) { + throw new IncorrectModuleRegistryCallArityParserError( + nativeModuleName, + flowCallExpression, + methodName, + numberOfCallExpressionArgs, + ); + } +} + +function throwIfIncorrectModuleRegistryCallTypeParameterParserError( + nativeModuleName: string, + typeArguments: $FlowFixMe, + methodName: string, + moduleName: string, + parser: Parser, +) { + function throwError() { + throw new IncorrectModuleRegistryCallTypeParameterParserError( + nativeModuleName, + typeArguments, + methodName, + moduleName, + ); + } + + if (parser.checkIfInvalidModule(typeArguments)) { + throwError(); + } +} + +function throwIfUnsupportedFunctionReturnTypeAnnotationParserError( + nativeModuleName: string, + returnTypeAnnotation: $FlowFixMe, + invalidReturnType: string, + cxxOnly: boolean, + returnType: string, +) { + if (!cxxOnly && returnType === 'FunctionTypeAnnotation') { + throw new UnsupportedFunctionReturnTypeAnnotationParserError( + nativeModuleName, + returnTypeAnnotation.returnType, + 'FunctionTypeAnnotation', + ); + } +} + +function throwIfUntypedModule( + typeArguments: $FlowFixMe, + hasteModuleName: string, + callExpression: $FlowFixMe, + methodName: string, + moduleName: string, +) { + if (typeArguments == null) { + throw new UntypedModuleRegistryCallParserError( + hasteModuleName, + callExpression, + methodName, + moduleName, + ); + } +} + +function throwIfModuleTypeIsUnsupported( + nativeModuleName: string, + propertyValue: $FlowFixMe, + propertyName: string, + propertyValueType: string, + parser: Parser, +) { + if (!parser.functionTypeAnnotation(propertyValueType)) { + throw new UnsupportedModulePropertyParserError( + nativeModuleName, + propertyValue, + propertyName, + propertyValueType, + parser.language(), + ); + } +} + +const UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap = { + FunctionTypeAnnotation: 'FunctionTypeAnnotation', + VoidTypeAnnotation: 'void', + PromiseTypeAnnotation: 'Promise', +}; + +function throwIfPropertyValueTypeIsUnsupported( + moduleName: string, + propertyValue: $FlowFixMe, + propertyKey: string, + type: string, +) { + const invalidPropertyValueType = + UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap[type]; + + throw new UnsupportedObjectPropertyValueTypeAnnotationParserError( + moduleName, + propertyValue, + propertyKey, + invalidPropertyValueType, + ); +} + +function throwIfMoreThanOneModuleInterfaceParserError( + nativeModuleName: string, + moduleSpecs: $ReadOnlyArray<$FlowFixMe>, + parserType: ParserType, +) { + if (moduleSpecs.length > 1) { + throw new MoreThanOneModuleInterfaceParserError( + nativeModuleName, + moduleSpecs, + moduleSpecs.map(node => node.id.name), + parserType, + ); + } +} + +function throwIfUnsupportedFunctionParamTypeAnnotationParserError( + nativeModuleName: string, + languageParamTypeAnnotation: $FlowFixMe, + paramName: string, + paramTypeAnnotationType: NativeModuleTypeAnnotation['type'], +) { + throw new UnsupportedFunctionParamTypeAnnotationParserError( + nativeModuleName, + languageParamTypeAnnotation, + paramName, + paramTypeAnnotationType, + ); +} + +function throwIfArrayElementTypeAnnotationIsUnsupported( + hasteModuleName: string, + flowElementType: $FlowFixMe, + flowArrayType: 'Array' | '$ReadOnlyArray' | 'ReadonlyArray', + type: string, +) { + const TypeMap = { + FunctionTypeAnnotation: 'FunctionTypeAnnotation', + VoidTypeAnnotation: 'void', + PromiseTypeAnnotation: 'Promise', + // TODO: Added as a work-around for now until TupleTypeAnnotation are fully supported in both flow and TS + // Right now they are partially treated as UnionTypeAnnotation + UnionTypeAnnotation: 'UnionTypeAnnotation', + }; + + if (type in TypeMap) { + throw new UnsupportedArrayElementTypeAnnotationParserError( + hasteModuleName, + flowElementType, + flowArrayType, + TypeMap[type], + ); + } +} + +function throwIfIncorrectModuleRegistryCallArgument( + nativeModuleName: string, + callExpressionArg: $FlowFixMe, + methodName: string, +) { + if ( + callExpressionArg.type !== 'StringLiteral' && + callExpressionArg.type !== 'Literal' + ) { + const {type} = callExpressionArg; + throw new IncorrectModuleRegistryCallArgumentTypeParserError( + nativeModuleName, + callExpressionArg, + methodName, + type, + ); + } +} + +function throwIfPartialNotAnnotatingTypeParameter( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + parser: Parser, +) { + const annotatedElement = parser.extractAnnotatedElement( + typeAnnotation, + types, + ); + + if (!annotatedElement) { + throw new Error('Partials only support annotating a type parameter.'); + } +} + +function throwIfPartialWithMoreParameter(typeAnnotation: $FlowFixMe) { + if (typeAnnotation.typeParameters.params.length !== 1) { + throw new Error('Partials only support annotating exactly one parameter.'); + } +} + +function throwIfMoreThanOneCodegenNativecommands( + commandsTypeNames: $ReadOnlyArray<$FlowFixMe>, +) { + if (commandsTypeNames.length > 1) { + throw new Error('codegenNativeCommands may only be called once in a file'); + } +} + +function throwIfConfigNotfound(foundConfigs: Array<{[string]: string}>) { + if (foundConfigs.length === 0) { + throw new Error('Could not find component config for native component'); + } +} + +function throwIfMoreThanOneConfig(foundConfigs: Array<{[string]: string}>) { + if (foundConfigs.length > 1) { + throw new Error('Only one component is supported per file'); + } +} + +function throwIfEventHasNoName(typeAnnotation: $FlowFixMe, parser: Parser) { + const name = + parser.language() === 'Flow' ? typeAnnotation.id : typeAnnotation.typeName; + + if (!name) { + throw new Error("typeAnnotation of event doesn't have a name"); + } +} + +function throwIfBubblingTypeIsNull( + bubblingType: ?('direct' | 'bubble'), + eventName: string, +): 'direct' | 'bubble' { + if (!bubblingType) { + throw new Error( + `Unable to determine event bubbling type for "${eventName}"`, + ); + } + + return bubblingType; +} + +function throwIfArgumentPropsAreNull( + argumentProps: ?$ReadOnlyArray<$FlowFixMe>, + eventName: string, +): $ReadOnlyArray<$FlowFixMe> { + if (!argumentProps) { + throw new Error(`Unable to determine event arguments for "${eventName}"`); + } + + return argumentProps; +} + +function throwIfTypeAliasIsNotInterface(typeAlias: $FlowFixMe, parser: Parser) { + if (typeAlias.type !== parser.interfaceDeclaration) { + throw new Error( + `The type argument for codegenNativeCommands must be an interface, received ${typeAlias.type}`, + ); + } +} + +module.exports = { + throwIfModuleInterfaceIsMisnamed, + throwIfUnsupportedFunctionReturnTypeAnnotationParserError, + throwIfModuleInterfaceNotFound, + throwIfMoreThanOneModuleRegistryCalls, + throwIfPropertyValueTypeIsUnsupported, + throwIfUnusedModuleInterfaceParserError, + throwIfWrongNumberOfCallExpressionArgs, + throwIfIncorrectModuleRegistryCallTypeParameterParserError, + throwIfUntypedModule, + throwIfModuleTypeIsUnsupported, + throwIfMoreThanOneModuleInterfaceParserError, + throwIfUnsupportedFunctionParamTypeAnnotationParserError, + throwIfArrayElementTypeAnnotationIsUnsupported, + throwIfIncorrectModuleRegistryCallArgument, + throwIfPartialNotAnnotatingTypeParameter, + throwIfPartialWithMoreParameter, + throwIfMoreThanOneCodegenNativecommands, + throwIfConfigNotfound, + throwIfMoreThanOneConfig, + throwIfEventHasNoName, + throwIfBubblingTypeIsNull, + throwIfArgumentPropsAreNull, + throwIfTypeAliasIsNotInterface, +}; diff --git a/packages/react-native-codegen/lib/parsers/errors.d.ts b/packages/react-native-codegen/lib/parsers/errors.d.ts new file mode 100644 index 000000000000..c99bd85e0d3f --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/errors.d.ts @@ -0,0 +1,10 @@ +/** + * 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. + */ + +export type ParserType = 'Flow' | 'TypeScript'; + +export declare class ParserError extends Error {} diff --git a/packages/react-native-codegen/lib/parsers/errors.js b/packages/react-native-codegen/lib/parsers/errors.js new file mode 100644 index 000000000000..00ef4b33ad44 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/errors.js @@ -0,0 +1,323 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +class ParserError extends Error { + constructor(nativeModuleName, astNodeOrNodes, message) { + super(`Module ${nativeModuleName}: ${message}`); + this.nodes = Array.isArray(astNodeOrNodes) + ? astNodeOrNodes + : [astNodeOrNodes]; + + // assign the error class name in your custom error (as a shortcut) + this.name = this.constructor.name; + + // capturing the stack trace keeps the reference to your error class + Error.captureStackTrace(this, this.constructor); + } +} +class MisnamedModuleInterfaceParserError extends ParserError { + constructor(nativeModuleName, id, language) { + super( + nativeModuleName, + id, + `All ${language} interfaces extending TurboModule must be called 'Spec'. Please rename ${language} interface '${id.name}' to 'Spec'.`, + ); + } +} +class ModuleInterfaceNotFoundParserError extends ParserError { + constructor(nativeModuleName, ast, language) { + super( + nativeModuleName, + ast, + `No ${language} interfaces extending TurboModule were detected in this NativeModule spec.`, + ); + } +} +class MoreThanOneModuleInterfaceParserError extends ParserError { + constructor(nativeModuleName, flowModuleInterfaces, names, language) { + const finalName = names[names.length - 1]; + const allButLastName = names.slice(0, -1); + const quote = x => `'${x}'`; + const nameStr = + allButLastName.map(quote).join(', ') + ', and ' + quote(finalName); + super( + nativeModuleName, + flowModuleInterfaces, + `Every NativeModule spec file must declare exactly one NativeModule ${language} interface. This file declares ${names.length}: ${nameStr}. Please remove the extraneous ${language} interface declarations.`, + ); + } +} +class UnsupportedModulePropertyParserError extends ParserError { + constructor( + nativeModuleName, + propertyValue, + propertyName, + invalidPropertyValueType, + language, + ) { + super( + nativeModuleName, + propertyValue, + `${language} interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property '${propertyName}' refers to a '${invalidPropertyValueType}'.`, + ); + } +} +class UnsupportedTypeAnnotationParserError extends ParserError { + constructor(nativeModuleName, typeAnnotation, language) { + super( + nativeModuleName, + typeAnnotation, + `${language} type annotation '${typeAnnotation.type}' is unsupported in NativeModule specs.`, + ); + this.typeAnnotationType = typeAnnotation.type; + } +} +class UnsupportedGenericParserError extends ParserError { + // +genericName: string; + constructor(nativeModuleName, genericTypeAnnotation, parser) { + const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); + super( + nativeModuleName, + genericTypeAnnotation, + `Unrecognized generic type '${genericName}' in NativeModule spec.`, + ); + + // this.genericName = genericName; + } +} +class MissingTypeParameterGenericParserError extends ParserError { + constructor(nativeModuleName, genericTypeAnnotation, parser) { + const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); + super( + nativeModuleName, + genericTypeAnnotation, + `Generic '${genericName}' must have type parameters.`, + ); + } +} +class MoreThanOneTypeParameterGenericParserError extends ParserError { + constructor(nativeModuleName, genericTypeAnnotation, parser) { + const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); + super( + nativeModuleName, + genericTypeAnnotation, + `Generic '${genericName}' must have exactly one type parameter.`, + ); + } +} + +/** + * Array parsing errors + */ + +class UnsupportedArrayElementTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName, + arrayElementTypeAST, + arrayType, + invalidArrayElementType, + ) { + super( + nativeModuleName, + arrayElementTypeAST, + `${arrayType} element types cannot be '${invalidArrayElementType}'.`, + ); + } +} + +/** + * Object parsing errors + */ + +class UnsupportedObjectPropertyTypeAnnotationParserError extends ParserError { + constructor(nativeModuleName, propertyAST, invalidPropertyType, language) { + let message = `'ObjectTypeAnnotation' cannot contain '${invalidPropertyType}'.`; + if ( + invalidPropertyType === 'ObjectTypeSpreadProperty' && + language !== 'TypeScript' + ) { + message = "Object spread isn't supported in 'ObjectTypeAnnotation's."; + } + super(nativeModuleName, propertyAST, message); + } +} +class UnsupportedObjectPropertyValueTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName, + propertyValueAST, + propertyName, + invalidPropertyValueType, + ) { + super( + nativeModuleName, + propertyValueAST, + `Object property '${propertyName}' cannot have type '${invalidPropertyValueType}'.`, + ); + } +} + +/** + * Function parsing errors + */ + +class UnnamedFunctionParamParserError extends ParserError { + constructor(functionParam, nativeModuleName) { + super( + nativeModuleName, + functionParam, + 'All function parameters must be named.', + ); + } +} +class UnsupportedFunctionParamTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName, + flowParamTypeAnnotation, + paramName, + invalidParamType, + ) { + super( + nativeModuleName, + flowParamTypeAnnotation, + `Function parameter '${paramName}' cannot have type '${invalidParamType}'.`, + ); + } +} +class UnsupportedFunctionReturnTypeAnnotationParserError extends ParserError { + constructor(nativeModuleName, flowReturnTypeAnnotation, invalidReturnType) { + super( + nativeModuleName, + flowReturnTypeAnnotation, + `Function return cannot have type '${invalidReturnType}'.`, + ); + } +} + +/** + * Enum parsing errors + */ + +class UnsupportedEnumDeclarationParserError extends ParserError { + constructor(nativeModuleName, arrayElementTypeAST, memberType) { + super( + nativeModuleName, + arrayElementTypeAST, + `Unexpected enum member type ${memberType}. Only string and number enum members are supported`, + ); + } +} + +/** + * Union parsing errors + */ + +class UnsupportedUnionTypeAnnotationParserError extends ParserError { + constructor(nativeModuleName, arrayElementTypeAST, types) { + super( + nativeModuleName, + arrayElementTypeAST, + `Union members must be of the same type, but multiple types were found ${types.join( + ', ', + )}'.`, + ); + } +} + +/** + * Module parsing errors + */ + +class UnusedModuleInterfaceParserError extends ParserError { + constructor(nativeModuleName, flowInterface) { + super( + nativeModuleName, + flowInterface, + "Unused NativeModule spec. Please load the NativeModule by calling TurboModuleRegistry.get('').", + ); + } +} +class MoreThanOneModuleRegistryCallsParserError extends ParserError { + constructor(nativeModuleName, flowCallExpressions, numCalls) { + super( + nativeModuleName, + flowCallExpressions, + `Every NativeModule spec file must contain exactly one NativeModule load. This file contains ${numCalls}. Please simplify this spec file, splitting it as necessary, to remove the extraneous loads.`, + ); + } +} +class UntypedModuleRegistryCallParserError extends ParserError { + constructor(nativeModuleName, flowCallExpression, methodName, moduleName) { + super( + nativeModuleName, + flowCallExpression, + `Please type this NativeModule load: TurboModuleRegistry.${methodName}('${moduleName}').`, + ); + } +} +class IncorrectModuleRegistryCallTypeParameterParserError extends ParserError { + constructor(nativeModuleName, flowTypeArguments, methodName, moduleName) { + super( + nativeModuleName, + flowTypeArguments, + `Please change these type arguments to reflect TurboModuleRegistry.${methodName}('${moduleName}').`, + ); + } +} +class IncorrectModuleRegistryCallArityParserError extends ParserError { + constructor( + nativeModuleName, + flowCallExpression, + methodName, + incorrectArity, + ) { + super( + nativeModuleName, + flowCallExpression, + `Please call TurboModuleRegistry.${methodName}() with exactly one argument. Detected ${incorrectArity}.`, + ); + } +} +class IncorrectModuleRegistryCallArgumentTypeParserError extends ParserError { + constructor(nativeModuleName, flowArgument, methodName, type) { + const a = /[aeiouy]/.test(type.toLowerCase()) ? 'an' : 'a'; + super( + nativeModuleName, + flowArgument, + `Please call TurboModuleRegistry.${methodName}() with a string literal. Detected ${a} '${type}'`, + ); + } +} +module.exports = { + ParserError, + MissingTypeParameterGenericParserError, + MoreThanOneTypeParameterGenericParserError, + MisnamedModuleInterfaceParserError, + ModuleInterfaceNotFoundParserError, + MoreThanOneModuleInterfaceParserError, + UnnamedFunctionParamParserError, + UnsupportedArrayElementTypeAnnotationParserError, + UnsupportedGenericParserError, + UnsupportedTypeAnnotationParserError, + UnsupportedFunctionParamTypeAnnotationParserError, + UnsupportedFunctionReturnTypeAnnotationParserError, + UnsupportedEnumDeclarationParserError, + UnsupportedUnionTypeAnnotationParserError, + UnsupportedModulePropertyParserError, + UnsupportedObjectPropertyTypeAnnotationParserError, + UnsupportedObjectPropertyValueTypeAnnotationParserError, + UnusedModuleInterfaceParserError, + MoreThanOneModuleRegistryCallsParserError, + UntypedModuleRegistryCallParserError, + IncorrectModuleRegistryCallTypeParameterParserError, + IncorrectModuleRegistryCallArityParserError, + IncorrectModuleRegistryCallArgumentTypeParserError, +}; diff --git a/packages/react-native-codegen/lib/parsers/errors.js.flow b/packages/react-native-codegen/lib/parsers/errors.js.flow new file mode 100644 index 000000000000..b0e42ecad955 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/errors.js.flow @@ -0,0 +1,415 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {UnionTypeAnnotationMemberType} from '../CodegenSchema'; + +import type {Parser} from './parser'; +export type ParserType = 'Flow' | 'TypeScript'; + +class ParserError extends Error { + nodes: $ReadOnlyArray<$FlowFixMe>; + constructor( + nativeModuleName: string, + astNodeOrNodes: $FlowFixMe, + message: string, + ) { + super(`Module ${nativeModuleName}: ${message}`); + + this.nodes = Array.isArray(astNodeOrNodes) + ? astNodeOrNodes + : [astNodeOrNodes]; + + // assign the error class name in your custom error (as a shortcut) + this.name = this.constructor.name; + + // capturing the stack trace keeps the reference to your error class + Error.captureStackTrace(this, this.constructor); + } +} +class MisnamedModuleInterfaceParserError extends ParserError { + constructor(nativeModuleName: string, id: $FlowFixMe, language: ParserType) { + super( + nativeModuleName, + id, + `All ${language} interfaces extending TurboModule must be called 'Spec'. Please rename ${language} interface '${id.name}' to 'Spec'.`, + ); + } +} + +class ModuleInterfaceNotFoundParserError extends ParserError { + constructor(nativeModuleName: string, ast: $FlowFixMe, language: ParserType) { + super( + nativeModuleName, + ast, + `No ${language} interfaces extending TurboModule were detected in this NativeModule spec.`, + ); + } +} + +class MoreThanOneModuleInterfaceParserError extends ParserError { + constructor( + nativeModuleName: string, + flowModuleInterfaces: $ReadOnlyArray<$FlowFixMe>, + names: $ReadOnlyArray, + language: ParserType, + ) { + const finalName = names[names.length - 1]; + const allButLastName = names.slice(0, -1); + const quote = (x: string) => `'${x}'`; + + const nameStr = + allButLastName.map(quote).join(', ') + ', and ' + quote(finalName); + + super( + nativeModuleName, + flowModuleInterfaces, + `Every NativeModule spec file must declare exactly one NativeModule ${language} interface. This file declares ${names.length}: ${nameStr}. Please remove the extraneous ${language} interface declarations.`, + ); + } +} + +class UnsupportedModulePropertyParserError extends ParserError { + constructor( + nativeModuleName: string, + propertyValue: $FlowFixMe, + propertyName: string, + invalidPropertyValueType: string, + language: ParserType, + ) { + super( + nativeModuleName, + propertyValue, + `${language} interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property '${propertyName}' refers to a '${invalidPropertyValueType}'.`, + ); + } +} + +class UnsupportedTypeAnnotationParserError extends ParserError { + +typeAnnotationType: string; + constructor( + nativeModuleName: string, + typeAnnotation: $FlowFixMe, + language: ParserType, + ) { + super( + nativeModuleName, + typeAnnotation, + `${language} type annotation '${typeAnnotation.type}' is unsupported in NativeModule specs.`, + ); + + this.typeAnnotationType = typeAnnotation.type; + } +} + +class UnsupportedGenericParserError extends ParserError { + // +genericName: string; + constructor( + nativeModuleName: string, + genericTypeAnnotation: $FlowFixMe, + parser: Parser, + ) { + const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); + super( + nativeModuleName, + genericTypeAnnotation, + `Unrecognized generic type '${genericName}' in NativeModule spec.`, + ); + + // this.genericName = genericName; + } +} + +class MissingTypeParameterGenericParserError extends ParserError { + constructor( + nativeModuleName: string, + genericTypeAnnotation: $FlowFixMe, + parser: Parser, + ) { + const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); + + super( + nativeModuleName, + genericTypeAnnotation, + `Generic '${genericName}' must have type parameters.`, + ); + } +} + +class MoreThanOneTypeParameterGenericParserError extends ParserError { + constructor( + nativeModuleName: string, + genericTypeAnnotation: $FlowFixMe, + parser: Parser, + ) { + const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); + + super( + nativeModuleName, + genericTypeAnnotation, + `Generic '${genericName}' must have exactly one type parameter.`, + ); + } +} + +/** + * Array parsing errors + */ + +class UnsupportedArrayElementTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName: string, + arrayElementTypeAST: $FlowFixMe, + arrayType: 'Array' | '$ReadOnlyArray' | 'ReadonlyArray', + invalidArrayElementType: string, + ) { + super( + nativeModuleName, + arrayElementTypeAST, + `${arrayType} element types cannot be '${invalidArrayElementType}'.`, + ); + } +} + +/** + * Object parsing errors + */ + +class UnsupportedObjectPropertyTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName: string, + propertyAST: $FlowFixMe, + invalidPropertyType: string, + language: ParserType, + ) { + let message = `'ObjectTypeAnnotation' cannot contain '${invalidPropertyType}'.`; + + if ( + invalidPropertyType === 'ObjectTypeSpreadProperty' && + language !== 'TypeScript' + ) { + message = "Object spread isn't supported in 'ObjectTypeAnnotation's."; + } + + super(nativeModuleName, propertyAST, message); + } +} + +class UnsupportedObjectPropertyValueTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName: string, + propertyValueAST: $FlowFixMe, + propertyName: string, + invalidPropertyValueType: string, + ) { + super( + nativeModuleName, + propertyValueAST, + `Object property '${propertyName}' cannot have type '${invalidPropertyValueType}'.`, + ); + } +} + +/** + * Function parsing errors + */ + +class UnnamedFunctionParamParserError extends ParserError { + constructor(functionParam: $FlowFixMe, nativeModuleName: string) { + super( + nativeModuleName, + functionParam, + 'All function parameters must be named.', + ); + } +} + +class UnsupportedFunctionParamTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName: string, + flowParamTypeAnnotation: $FlowFixMe, + paramName: string, + invalidParamType: string, + ) { + super( + nativeModuleName, + flowParamTypeAnnotation, + `Function parameter '${paramName}' cannot have type '${invalidParamType}'.`, + ); + } +} + +class UnsupportedFunctionReturnTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName: string, + flowReturnTypeAnnotation: $FlowFixMe, + invalidReturnType: string, + ) { + super( + nativeModuleName, + flowReturnTypeAnnotation, + `Function return cannot have type '${invalidReturnType}'.`, + ); + } +} + +/** + * Enum parsing errors + */ + +class UnsupportedEnumDeclarationParserError extends ParserError { + constructor( + nativeModuleName: string, + arrayElementTypeAST: $FlowFixMe, + memberType: string, + ) { + super( + nativeModuleName, + arrayElementTypeAST, + `Unexpected enum member type ${memberType}. Only string and number enum members are supported`, + ); + } +} + +/** + * Union parsing errors + */ + +class UnsupportedUnionTypeAnnotationParserError extends ParserError { + constructor( + nativeModuleName: string, + arrayElementTypeAST: $FlowFixMe, + types: UnionTypeAnnotationMemberType[], + ) { + super( + nativeModuleName, + arrayElementTypeAST, + `Union members must be of the same type, but multiple types were found ${types.join( + ', ', + )}'.`, + ); + } +} + +/** + * Module parsing errors + */ + +class UnusedModuleInterfaceParserError extends ParserError { + constructor(nativeModuleName: string, flowInterface: $FlowFixMe) { + super( + nativeModuleName, + flowInterface, + "Unused NativeModule spec. Please load the NativeModule by calling TurboModuleRegistry.get('').", + ); + } +} + +class MoreThanOneModuleRegistryCallsParserError extends ParserError { + constructor( + nativeModuleName: string, + flowCallExpressions: $FlowFixMe, + numCalls: number, + ) { + super( + nativeModuleName, + flowCallExpressions, + `Every NativeModule spec file must contain exactly one NativeModule load. This file contains ${numCalls}. Please simplify this spec file, splitting it as necessary, to remove the extraneous loads.`, + ); + } +} + +class UntypedModuleRegistryCallParserError extends ParserError { + constructor( + nativeModuleName: string, + flowCallExpression: $FlowFixMe, + methodName: string, + moduleName: string, + ) { + super( + nativeModuleName, + flowCallExpression, + `Please type this NativeModule load: TurboModuleRegistry.${methodName}('${moduleName}').`, + ); + } +} + +class IncorrectModuleRegistryCallTypeParameterParserError extends ParserError { + constructor( + nativeModuleName: string, + flowTypeArguments: $FlowFixMe, + methodName: string, + moduleName: string, + ) { + super( + nativeModuleName, + flowTypeArguments, + `Please change these type arguments to reflect TurboModuleRegistry.${methodName}('${moduleName}').`, + ); + } +} + +class IncorrectModuleRegistryCallArityParserError extends ParserError { + constructor( + nativeModuleName: string, + flowCallExpression: $FlowFixMe, + methodName: string, + incorrectArity: number, + ) { + super( + nativeModuleName, + flowCallExpression, + `Please call TurboModuleRegistry.${methodName}() with exactly one argument. Detected ${incorrectArity}.`, + ); + } +} + +class IncorrectModuleRegistryCallArgumentTypeParserError extends ParserError { + constructor( + nativeModuleName: string, + flowArgument: $FlowFixMe, + methodName: string, + type: string, + ) { + const a = /[aeiouy]/.test(type.toLowerCase()) ? 'an' : 'a'; + super( + nativeModuleName, + flowArgument, + `Please call TurboModuleRegistry.${methodName}() with a string literal. Detected ${a} '${type}'`, + ); + } +} + +module.exports = { + ParserError, + MissingTypeParameterGenericParserError, + MoreThanOneTypeParameterGenericParserError, + MisnamedModuleInterfaceParserError, + ModuleInterfaceNotFoundParserError, + MoreThanOneModuleInterfaceParserError, + UnnamedFunctionParamParserError, + UnsupportedArrayElementTypeAnnotationParserError, + UnsupportedGenericParserError, + UnsupportedTypeAnnotationParserError, + UnsupportedFunctionParamTypeAnnotationParserError, + UnsupportedFunctionReturnTypeAnnotationParserError, + UnsupportedEnumDeclarationParserError, + UnsupportedUnionTypeAnnotationParserError, + UnsupportedModulePropertyParserError, + UnsupportedObjectPropertyTypeAnnotationParserError, + UnsupportedObjectPropertyValueTypeAnnotationParserError, + UnusedModuleInterfaceParserError, + MoreThanOneModuleRegistryCallsParserError, + UntypedModuleRegistryCallParserError, + IncorrectModuleRegistryCallTypeParameterParserError, + IncorrectModuleRegistryCallArityParserError, + IncorrectModuleRegistryCallArgumentTypeParserError, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js new file mode 100644 index 000000000000..24f2cb1e033b --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js @@ -0,0 +1,583 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const COMMANDS_DEFINED_INLINE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props +|}>; + +export const Commands = codegenNativeCommands<{ + +hotspotUpdate: (ref: React.Ref<'RCTView'>, x: Int32, y: Int32) => void, +}>({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const COMMANDS_DEFINED_MULTIPLE_TIMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); +export const Commands2 = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const COMMANDS_DEFINED_WITHOUT_REF = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (x: Int32, y: Int32) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: ?React.Ref<'RCTView'>, x: Int32, y: Int32) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + +scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + +scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands(); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const NULLABLE_WITH_DEFAULT = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + nullable_with_default: ?WithDefault, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + required_key_with_default: WithDefault, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROPS_CONFLICT_NAMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + isEnabled: string, + + isEnabled: boolean, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type PropsInFile = $ReadOnly<{| + isEnabled: boolean, +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + ...PropsInFile, + isEnabled: boolean, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROPS_SPREAD_CONFLICTS_WITH_PROPS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type PropsInFile = $ReadOnly<{| + isEnabled: boolean, +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + isEnabled: boolean, + ...PropsInFile, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROP_NUMBER_TYPE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp: number +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROP_MIXED_ENUM = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<'foo' | 1, 1> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROP_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROP_ARRAY_MIXED_ENUM = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<$ReadOnlyArray<'foo' | 1>, 1> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROP_ARRAY_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<$ReadOnlyArray, false> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROP_ARRAY_ENUM_INT = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<$ReadOnlyArray<0 | 1>, 0> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +module.exports = { + COMMANDS_DEFINED_INLINE, + COMMANDS_DEFINED_MULTIPLE_TIMES, + COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_REF, + COMMANDS_DEFINED_WITH_NULLABLE_REF, + NULLABLE_WITH_DEFAULT, + NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, + PROPS_CONFLICT_NAMES, + PROPS_CONFLICT_WITH_SPREAD_PROPS, + PROPS_SPREAD_CONFLICTS_WITH_PROPS, + PROP_NUMBER_TYPE, + PROP_MIXED_ENUM, + PROP_ENUM_BOOLEAN, + PROP_ARRAY_MIXED_ENUM, + PROP_ARRAY_ENUM_BOOLEAN, + PROP_ARRAY_ENUM_INT, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js.flow b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js.flow new file mode 100644 index 000000000000..1d7072636a48 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/failures.js.flow @@ -0,0 +1,600 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const COMMANDS_DEFINED_INLINE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props +|}>; + +export const Commands = codegenNativeCommands<{ + +hotspotUpdate: (ref: React.Ref<'RCTView'>, x: Int32, y: Int32) => void, +}>({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const COMMANDS_DEFINED_MULTIPLE_TIMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); +export const Commands2 = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const COMMANDS_DEFINED_WITHOUT_REF = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (x: Int32, y: Int32) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: ?React.Ref<'RCTView'>, x: Int32, y: Int32) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + +scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + +scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +export const Commands = codegenNativeCommands(); + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const NULLABLE_WITH_DEFAULT = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + nullable_with_default: ?WithDefault, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + required_key_with_default: WithDefault, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROPS_CONFLICT_NAMES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + isEnabled: string, + + isEnabled: boolean, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type PropsInFile = $ReadOnly<{| + isEnabled: boolean, +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + ...PropsInFile, + isEnabled: boolean, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROPS_SPREAD_CONFLICTS_WITH_PROPS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type PropsInFile = $ReadOnly<{| + isEnabled: boolean, +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + isEnabled: boolean, + ...PropsInFile, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROP_NUMBER_TYPE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp: number +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROP_MIXED_ENUM = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<'foo' | 1, 1> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROP_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROP_ARRAY_MIXED_ENUM = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<$ReadOnlyArray<'foo' | 1>, 1> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROP_ARRAY_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<$ReadOnlyArray, false> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROP_ARRAY_ENUM_INT = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + someProp?: WithDefault<$ReadOnlyArray<0 | 1>, 0> +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +module.exports = { + COMMANDS_DEFINED_INLINE, + COMMANDS_DEFINED_MULTIPLE_TIMES, + COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_REF, + COMMANDS_DEFINED_WITH_NULLABLE_REF, + NULLABLE_WITH_DEFAULT, + NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, + PROPS_CONFLICT_NAMES, + PROPS_CONFLICT_WITH_SPREAD_PROPS, + PROPS_SPREAD_CONFLICTS_WITH_PROPS, + PROP_NUMBER_TYPE, + PROP_MIXED_ENUM, + PROP_ENUM_BOOLEAN, + PROP_ARRAY_MIXED_ENUM, + PROP_ARRAY_ENUM_BOOLEAN, + PROP_ARRAY_ENUM_INT, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js new file mode 100644 index 000000000000..503f2ecffcd1 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js @@ -0,0 +1,1074 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const EVENT_DEFINITION = ` + boolean_required: boolean, + boolean_optional_key?: boolean, + boolean_optional_value: ?boolean, + boolean_optional_both?: ?boolean, + + string_required: string, + string_optional_key?: string, + string_optional_value: ?string, + string_optional_both?: ?string, + + double_required: Double, + double_optional_key?: Double, + double_optional_value: ?Double, + double_optional_both?: ?Double, + + float_required: Float, + float_optional_key?: Float, + float_optional_value: ?Float, + float_optional_both?: ?Float, + + int32_required: Int32, + int32_optional_key?: Int32, + int32_optional_value: ?Int32, + int32_optional_both?: ?Int32, + + enum_required: ('small' | 'large'), + enum_optional_key?: ('small' | 'large'), + enum_optional_value: ?('small' | 'large'), + enum_optional_both?: ?('small' | 'large'), + + object_required: { + boolean_required: boolean, + }, + + object_optional_key?: { + string_optional_key?: string, + }, + + object_optional_value: ?{ + float_optional_value: ?Float, + }, + + object_optional_both?: ?{ + int32_optional_both?: ?Int32, + }, + + object_required_nested_2_layers: { + object_optional_nested_1_layer?: ?{ + boolean_required: Int32, + string_optional_key?: string, + double_optional_value: ?Double, + float_optional_value: ?Float, + int32_optional_both?: ?Int32, + } + }, + + object_readonly_required: $ReadOnly<{ + boolean_required: boolean, + }>, + + object_readonly_optional_key?: $ReadOnly<{ + string_optional_key?: string, + }>, + + object_readonly_optional_value: ?$ReadOnly<{ + float_optional_value: ?Float, + }>, + + object_readonly_optional_both?: ?$ReadOnly<{ + int32_optional_both?: ?Int32, + }>, + + boolean_array_required: $ReadOnlyArray, + boolean_array_optional_key?: boolean[], + boolean_array_optional_value: ?$ReadOnlyArray, + boolean_array_optional_both?: ?boolean[], + + string_array_required: $ReadOnlyArray, + string_array_optional_key?: string[], + string_array_optional_value: ?$ReadOnlyArray, + string_array_optional_both?: ?string[], + + double_array_required: $ReadOnlyArray, + double_array_optional_key?: Double[], + double_array_optional_value: ?$ReadOnlyArray, + double_array_optional_both?: ?Double[], + + float_array_required: $ReadOnlyArray, + float_array_optional_key?: Float[], + float_array_optional_value: ?$ReadOnlyArray, + float_array_optional_both?: ?Float[], + + int32_array_required: $ReadOnlyArray, + int32_array_optional_key?: Int32[], + int32_array_optional_value: ?$ReadOnlyArray, + int32_array_optional_both?: ?Int32[], + + enum_array_required: $ReadOnlyArray<('small' | 'large')>, + enum_array_optional_key?: ('small' | 'large')[], + enum_array_optional_value: ?$ReadOnlyArray<('small' | 'large')>, + enum_array_optional_both?: ?('small' | 'large')[], + + object_array_required: $ReadOnlyArray<{ + boolean_required: boolean, + }>, + + object_array_optional_key?: { + string_optional_key?: string, + }[], + + object_array_optional_value: ?$ReadOnlyArray<{ + float_optional_value: ?Float, + }>, + + object_array_optional_both?: ?{ + int32_optional_both?: ?Int32, + }[], + + int32_array_array_required: $ReadOnlyArray<$ReadOnlyArray>, + int32_array_array_optional_key?: Int32[][], + int32_array_array_optional_value: ?$ReadOnlyArray<$ReadOnlyArray>, + int32_array_array_optional_both?: ?Int32[][], +`; +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + boolean_default_true_optional_both?: WithDefault, + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler, + onBubblingEventDefinedInlineNull: BubblingEventHandler, +|}>; + +export default (codegenNativeComponent('Module', { + interfaceOnly: true, + paperComponentName: 'RCTModule', +}): HostComponent); +`; +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + boolean_default_true_optional_both?: WithDefault, + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler, + onBubblingEventDefinedInlineNull: BubblingEventHandler, +|}>; + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + excludedPlatforms: ['android'], + paperComponentName: 'RCTModule', +}); +`; +const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, +|}>; + +export default (codegenNativeComponent('Module', { + deprecatedViewConfigName: 'DeprecateModuleName', +}): HostComponent); +`; +const ALL_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type {ColorValue, ColorArrayValue, PointValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + // Boolean props + boolean_required: boolean, + boolean_optional_key?: WithDefault, + boolean_optional_both?: WithDefault, + + // Boolean props, null default + boolean_null_optional_key?: WithDefault, + boolean_null_optional_both?: WithDefault, + + // String props + string_required: string, + string_optional_key?: WithDefault, + string_optional_both?: WithDefault, + + // String props, null default + string_null_optional_key?: WithDefault, + string_null_optional_both?: WithDefault, + + // Stringish props + stringish_required: Stringish, + stringish_optional_key?: WithDefault, + stringish_optional_both?: WithDefault, + + // Stringish props, null default + stringish_null_optional_key?: WithDefault, + stringish_null_optional_both?: WithDefault, + + // Double props + double_required: Double, + double_optional_key?: WithDefault, + double_optional_both?: WithDefault, + + // Float props + float_required: Float, + float_optional_key?: WithDefault, + float_optional_both?: WithDefault, + + // Float props, null default + float_null_optional_key?: WithDefault, + float_null_optional_both?: WithDefault, + + // Int32 props + int32_required: Int32, + int32_optional_key?: WithDefault, + int32_optional_both?: WithDefault, + + // String enum props + enum_optional_key?: WithDefault<'small' | 'large', 'small'>, + enum_optional_both?: WithDefault<'small' | 'large', 'small'>, + + // Int enum props + int_enum_optional_key?: WithDefault<0 | 1, 0>, + + // Object props + object_optional_key?: $ReadOnly<{| prop: string |}>, + object_optional_both?: ?$ReadOnly<{| prop: string |}>, + object_optional_value: ?$ReadOnly<{| prop: string |}>, + + // ImageSource props + image_required: ImageSource, + image_optional_value: ?ImageSource, + image_optional_both?: ?ImageSource, + + // ColorValue props + color_required: ColorValue, + color_optional_key?: ColorValue, + color_optional_value: ?ColorValue, + color_optional_both?: ?ColorValue, + + // ColorArrayValue props + color_array_required: ColorArrayValue, + color_array_optional_key?: ColorArrayValue, + color_array_optional_value: ?ColorArrayValue, + color_array_optional_both?: ?ColorArrayValue, + + // ProcessedColorValue props + processed_color_required: ProcessedColorValue, + processed_color_optional_key?: ProcessedColorValue, + processed_color_optional_value: ?ProcessedColorValue, + processed_color_optional_both?: ?ProcessedColorValue, + + // PointValue props + point_required: PointValue, + point_optional_key?: PointValue, + point_optional_value: ?PointValue, + point_optional_both?: ?PointValue, + + // EdgeInsets props + insets_required: EdgeInsetsValue, + insets_optional_key?: EdgeInsetsValue, + insets_optional_value: ?EdgeInsetsValue, + insets_optional_both?: ?EdgeInsetsValue, + + // DimensionValue props + dimension_required: DimensionValue, + dimension_optional_key?: DimensionValue, + dimension_optional_value: ?DimensionValue, + dimension_optional_both?: ?DimensionValue, + + // Mixed props + mixed_required: UnsafeMixed, + mixed_optional_key?: UnsafeMixed, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const ARRAY_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type {ColorValue, PointValue, ProcessColorValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ObjectType = $ReadOnly<{| prop: string |}>; +type ArrayObjectType = $ReadOnlyArray<$ReadOnly<{| prop: string |}>>; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + // Boolean props + array_boolean_required: $ReadOnlyArray, + array_boolean_optional_key?: $ReadOnlyArray, + array_boolean_optional_value: ?$ReadOnlyArray, + array_boolean_optional_both?: ?$ReadOnlyArray, + + // String props + array_string_required: $ReadOnlyArray, + array_string_optional_key?: $ReadOnlyArray, + array_string_optional_value: ?$ReadOnlyArray, + array_string_optional_both?: ?$ReadOnlyArray, + + // Double props + array_double_required: $ReadOnlyArray, + array_double_optional_key?: $ReadOnlyArray, + array_double_optional_value: ?$ReadOnlyArray, + array_double_optional_both?: ?$ReadOnlyArray, + + // Float props + array_float_required: $ReadOnlyArray, + array_float_optional_key?: $ReadOnlyArray, + array_float_optional_value: ?$ReadOnlyArray, + array_float_optional_both?: ?$ReadOnlyArray, + + // Int32 props + array_int32_required: $ReadOnlyArray, + array_int32_optional_key?: $ReadOnlyArray, + array_int32_optional_value: ?$ReadOnlyArray, + array_int32_optional_both?: ?$ReadOnlyArray, + + // String enum props + array_enum_optional_key?: WithDefault< + $ReadOnlyArray<'small' | 'large'>, + 'small', + >, + array_enum_optional_both?: WithDefault< + $ReadOnlyArray<'small' | 'large'>, + 'small', + >, + + // ImageSource props + array_image_required: $ReadOnlyArray, + array_image_optional_key?: $ReadOnlyArray, + array_image_optional_value: ?$ReadOnlyArray, + array_image_optional_both?: ?$ReadOnlyArray, + + // ColorValue props + array_color_required: $ReadOnlyArray, + array_color_optional_key?: $ReadOnlyArray, + array_color_optional_value: ?$ReadOnlyArray, + array_color_optional_both?: ?$ReadOnlyArray, + + // PointValue props + array_point_required: $ReadOnlyArray, + array_point_optional_key?: $ReadOnlyArray, + array_point_optional_value: ?$ReadOnlyArray, + array_point_optional_both?: ?$ReadOnlyArray, + + // EdgeInsetsValue props + array_insets_required: $ReadOnlyArray, + array_insets_optional_key?: $ReadOnlyArray, + array_insets_optional_value: ?$ReadOnlyArray, + array_insets_optional_both?: ?$ReadOnlyArray, + + // DimensionValue props + array_dimension_required: $ReadOnlyArray, + array_dimension_optional_key?: $ReadOnlyArray, + array_dimension_optional_value: ?$ReadOnlyArray, + array_dimension_optional_both?: ?$ReadOnlyArray, + + // Object props + array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, + array_object_optional_key?: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, + array_object_optional_value: ?ArrayObjectType, + array_object_optional_both?: ?$ReadOnlyArray, + + // Nested array object types + array_of_array_object_required: $ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, + |}> + >, + array_of_array_object_optional_key?: $ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_optional_key: $ReadOnlyArray<$ReadOnly<{| prop?: string |}>>, + |}> + >, + array_of_array_object_optional_value: ?$ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_optional_value: $ReadOnlyArray<$ReadOnly<{| prop: ?string |}>>, + |}> + >, + array_of_array_object_optional_both?: ?$ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_optional_both: $ReadOnlyArray<$ReadOnly<{| prop?: ?string |}>>, + |}> + >, + + // Nested array of array of object types + array_of_array_of_object_required: $ReadOnlyArray< + $ReadOnlyArray< + $ReadOnly<{| + prop: string, + |}>, + >, + >, + + // Nested array of array of object types (in file) + array_of_array_of_object_required_in_file: $ReadOnlyArray< + $ReadOnlyArray, + >, + + // Nested array of array of object types (with spread) + array_of_array_of_object_required_with_spread: $ReadOnlyArray< + $ReadOnlyArray< + $ReadOnly<{| + ...ObjectType + |}>, + >, + >, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const OBJECT_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type {ColorValue, PointValue, EdgeInsetsValue} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + // Boolean props + boolean_required: $ReadOnly<{|prop: boolean|}>, + boolean_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // String props + string_required: $ReadOnly<{|prop: string|}>, + string_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // Double props + double_required: $ReadOnly<{|prop: Double|}>, + double_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // Float props + float_required: $ReadOnly<{|prop: Float|}>, + float_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // Int32 props + int_required: $ReadOnly<{|prop: Int32|}>, + int_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // String enum props + enum_optional: $ReadOnly<{| + prop?: WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>, + |}>, + + // ImageSource props + image_required: $ReadOnly<{|prop: ImageSource|}>, + image_optional_key: $ReadOnly<{|prop?: ImageSource|}>, + image_optional_value: $ReadOnly<{|prop: ?ImageSource|}>, + image_optional_both: $ReadOnly<{|prop?: ?ImageSource|}>, + + // ColorValue props + color_required: $ReadOnly<{|prop: ColorValue|}>, + color_optional_key: $ReadOnly<{|prop?: ColorValue|}>, + color_optional_value: $ReadOnly<{|prop: ?ColorValue|}>, + color_optional_both: $ReadOnly<{|prop?: ?ColorValue|}>, + + // ProcessedColorValue props + processed_color_required: $ReadOnly<{|prop: ProcessedColorValue|}>, + processed_color_optional_key: $ReadOnly<{|prop?: ProcessedColorValue|}>, + processed_color_optional_value: $ReadOnly<{|prop: ?ProcessedColorValue|}>, + processed_color_optional_both: $ReadOnly<{|prop?: ?ProcessedColorValue|}>, + + // PointValue props + point_required: $ReadOnly<{|prop: PointValue|}>, + point_optional_key: $ReadOnly<{|prop?: PointValue|}>, + point_optional_value: $ReadOnly<{|prop: ?PointValue|}>, + point_optional_both: $ReadOnly<{|prop?: ?PointValue|}>, + + // EdgeInsetsValue props + insets_required: $ReadOnly<{|prop: EdgeInsetsValue|}>, + insets_optional_key: $ReadOnly<{|prop?: EdgeInsetsValue|}>, + insets_optional_value: $ReadOnly<{|prop: ?EdgeInsetsValue|}>, + insets_optional_both: $ReadOnly<{|prop?: ?EdgeInsetsValue|}>, + + // DimensionValue props + dimension_required: $ReadOnly<{|prop: DimensionValue|}>, + dimension_optional_key: $ReadOnly<{|prop?: DimensionValue|}>, + dimension_optional_value: $ReadOnly<{|prop: ?DimensionValue|}>, + dimension_optional_both: $ReadOnly<{|prop?: ?DimensionValue|}>, + + // Nested object props + object_required: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, + object_optional_key?: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, + object_optional_value: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, + object_optional_both?: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROPS_ALIASED_LOCALLY = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type DeepSpread = $ReadOnly<{| + otherStringProp: string, +|}>; + +export type PropsInFile = $ReadOnly<{| + ...DeepSpread, + isEnabled: boolean, + label: string, +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + ...PropsInFile, + + localType: $ReadOnly<{| + ...PropsInFile + |}>, + + localArr: $ReadOnlyArray +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {HostComponent} from 'react-native'; +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + Int32, + Double, + Float, + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; + +import type {ViewProps} from 'ViewPropTypes'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No Props + + // Events + onDirectEventDefinedInline: + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineOptionalKey?: + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineOptionalValue: ? + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineOptionalBoth?: ? + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineWithPaperName?: ? + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + 'paperDirectEventDefinedInlineWithPaperName', + >, + + onBubblingEventDefinedInline: + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineOptionalKey?: + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineOptionalValue: ? + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineOptionalBoth?: ? + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineWithPaperName?: ? + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + 'paperBubblingEventDefinedInlineWithPaperName' + >, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const EVENTS_DEFINED_AS_NULL_INLINE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // No props + + // Events defined inline + onDirectEventDefinedInlineNull: DirectEventHandler, + onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler, + onDirectEventDefinedInlineNullOptionalValue: ?DirectEventHandler, + onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler, + onDirectEventDefinedInlineNullWithPaperName?: ?DirectEventHandler< + null, + 'paperDirectEventDefinedInlineNullWithPaperName', + >, + + onBubblingEventDefinedInlineNull: BubblingEventHandler, + onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler, + onBubblingEventDefinedInlineNullOptionalValue: ?BubblingEventHandler, + onBubblingEventDefinedInlineNullOptionalBoth?: ?BubblingEventHandler, + onBubblingEventDefinedInlineNullWithPaperName?: ?BubblingEventHandler< + null, + 'paperBubblingEventDefinedInlineNullWithPaperName', + >, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROPS_AND_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type EventInFile = $ReadOnly<{| + ${EVENT_DEFINITION} +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler, + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, + onDirectEventDefinedInline: DirectEventHandler, + onDirectEventDefinedInlineWithPaperName: DirectEventHandler, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const PROPS_AS_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {HostComponent} from 'react-native'; + +export type String = string; +export type AnotherArray = $ReadOnlyArray; + +export type ModuleProps = $ReadOnly<{| + disable: String, + array: AnotherArray, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; +const COMMANDS_DEFINED_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float} from 'CodegenTypes'; +import type {RootTag} from 'RCTExport'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +type NativeType = HostComponent; + +interface NativeCommands { + +handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; + +hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; + scrollTo( + viewRef: React.ElementRef, + x: Float, + y: Int32, + z: Double, + animated: boolean, + ): void; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], +}); + +export default (codegenNativeComponent( + 'Module', +): NativeType); +`; +const COMMANDS_WITH_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +type NativeType = HostComponent; + +export type ScrollTo = ( + viewRef: React.ElementRef, + y: Int, + animated: Boolean, +) => Void; + +interface NativeCommands { + +scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); + +export default (codegenNativeComponent( + 'Module', +): NativeType); +`; +const COMMANDS_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type EventInFile = $ReadOnly<{| + ${EVENT_DEFINITION} +|}>; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler, + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, + onDirectEventDefinedInline: DirectEventHandler, + onDirectEventDefinedInlineWithPaperName: DirectEventHandler, +|}>; + +type NativeType = HostComponent; + +export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; + +interface NativeCommands { + +scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'] +}); + +export default (codegenNativeComponent( + 'Module', +): NativeType); +`; +module.exports = { + ALL_PROP_TYPES_NO_EVENTS, + ARRAY_PROP_TYPES_NO_EVENTS, + OBJECT_PROP_TYPES_NO_EVENTS, + PROPS_ALIASED_LOCALLY, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, + NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, + EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, + EVENTS_DEFINED_AS_NULL_INLINE, + PROPS_AND_EVENTS_TYPES_EXPORTED, + COMMANDS_EVENTS_TYPES_EXPORTED, + COMMANDS_DEFINED_WITH_ALL_TYPES, + PROPS_AS_EXTERNAL_TYPES, + COMMANDS_WITH_EXTERNAL_TYPES, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow new file mode 100644 index 000000000000..64cefa676f6b --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow @@ -0,0 +1,1089 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const EVENT_DEFINITION = ` + boolean_required: boolean, + boolean_optional_key?: boolean, + boolean_optional_value: ?boolean, + boolean_optional_both?: ?boolean, + + string_required: string, + string_optional_key?: string, + string_optional_value: ?string, + string_optional_both?: ?string, + + double_required: Double, + double_optional_key?: Double, + double_optional_value: ?Double, + double_optional_both?: ?Double, + + float_required: Float, + float_optional_key?: Float, + float_optional_value: ?Float, + float_optional_both?: ?Float, + + int32_required: Int32, + int32_optional_key?: Int32, + int32_optional_value: ?Int32, + int32_optional_both?: ?Int32, + + enum_required: ('small' | 'large'), + enum_optional_key?: ('small' | 'large'), + enum_optional_value: ?('small' | 'large'), + enum_optional_both?: ?('small' | 'large'), + + object_required: { + boolean_required: boolean, + }, + + object_optional_key?: { + string_optional_key?: string, + }, + + object_optional_value: ?{ + float_optional_value: ?Float, + }, + + object_optional_both?: ?{ + int32_optional_both?: ?Int32, + }, + + object_required_nested_2_layers: { + object_optional_nested_1_layer?: ?{ + boolean_required: Int32, + string_optional_key?: string, + double_optional_value: ?Double, + float_optional_value: ?Float, + int32_optional_both?: ?Int32, + } + }, + + object_readonly_required: $ReadOnly<{ + boolean_required: boolean, + }>, + + object_readonly_optional_key?: $ReadOnly<{ + string_optional_key?: string, + }>, + + object_readonly_optional_value: ?$ReadOnly<{ + float_optional_value: ?Float, + }>, + + object_readonly_optional_both?: ?$ReadOnly<{ + int32_optional_both?: ?Int32, + }>, + + boolean_array_required: $ReadOnlyArray, + boolean_array_optional_key?: boolean[], + boolean_array_optional_value: ?$ReadOnlyArray, + boolean_array_optional_both?: ?boolean[], + + string_array_required: $ReadOnlyArray, + string_array_optional_key?: string[], + string_array_optional_value: ?$ReadOnlyArray, + string_array_optional_both?: ?string[], + + double_array_required: $ReadOnlyArray, + double_array_optional_key?: Double[], + double_array_optional_value: ?$ReadOnlyArray, + double_array_optional_both?: ?Double[], + + float_array_required: $ReadOnlyArray, + float_array_optional_key?: Float[], + float_array_optional_value: ?$ReadOnlyArray, + float_array_optional_both?: ?Float[], + + int32_array_required: $ReadOnlyArray, + int32_array_optional_key?: Int32[], + int32_array_optional_value: ?$ReadOnlyArray, + int32_array_optional_both?: ?Int32[], + + enum_array_required: $ReadOnlyArray<('small' | 'large')>, + enum_array_optional_key?: ('small' | 'large')[], + enum_array_optional_value: ?$ReadOnlyArray<('small' | 'large')>, + enum_array_optional_both?: ?('small' | 'large')[], + + object_array_required: $ReadOnlyArray<{ + boolean_required: boolean, + }>, + + object_array_optional_key?: { + string_optional_key?: string, + }[], + + object_array_optional_value: ?$ReadOnlyArray<{ + float_optional_value: ?Float, + }>, + + object_array_optional_both?: ?{ + int32_optional_both?: ?Int32, + }[], + + int32_array_array_required: $ReadOnlyArray<$ReadOnlyArray>, + int32_array_array_optional_key?: Int32[][], + int32_array_array_optional_value: ?$ReadOnlyArray<$ReadOnlyArray>, + int32_array_array_optional_both?: ?Int32[][], +`; + +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + boolean_default_true_optional_both?: WithDefault, + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler, + onBubblingEventDefinedInlineNull: BubblingEventHandler, +|}>; + +export default (codegenNativeComponent('Module', { + interfaceOnly: true, + paperComponentName: 'RCTModule', +}): HostComponent); +`; + +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + boolean_default_true_optional_both?: WithDefault, + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler, + onBubblingEventDefinedInlineNull: BubblingEventHandler, +|}>; + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + excludedPlatforms: ['android'], + paperComponentName: 'RCTModule', +}); +`; + +const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, +|}>; + +export default (codegenNativeComponent('Module', { + deprecatedViewConfigName: 'DeprecateModuleName', +}): HostComponent); +`; + +const ALL_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type {ColorValue, ColorArrayValue, PointValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + // Boolean props + boolean_required: boolean, + boolean_optional_key?: WithDefault, + boolean_optional_both?: WithDefault, + + // Boolean props, null default + boolean_null_optional_key?: WithDefault, + boolean_null_optional_both?: WithDefault, + + // String props + string_required: string, + string_optional_key?: WithDefault, + string_optional_both?: WithDefault, + + // String props, null default + string_null_optional_key?: WithDefault, + string_null_optional_both?: WithDefault, + + // Stringish props + stringish_required: Stringish, + stringish_optional_key?: WithDefault, + stringish_optional_both?: WithDefault, + + // Stringish props, null default + stringish_null_optional_key?: WithDefault, + stringish_null_optional_both?: WithDefault, + + // Double props + double_required: Double, + double_optional_key?: WithDefault, + double_optional_both?: WithDefault, + + // Float props + float_required: Float, + float_optional_key?: WithDefault, + float_optional_both?: WithDefault, + + // Float props, null default + float_null_optional_key?: WithDefault, + float_null_optional_both?: WithDefault, + + // Int32 props + int32_required: Int32, + int32_optional_key?: WithDefault, + int32_optional_both?: WithDefault, + + // String enum props + enum_optional_key?: WithDefault<'small' | 'large', 'small'>, + enum_optional_both?: WithDefault<'small' | 'large', 'small'>, + + // Int enum props + int_enum_optional_key?: WithDefault<0 | 1, 0>, + + // Object props + object_optional_key?: $ReadOnly<{| prop: string |}>, + object_optional_both?: ?$ReadOnly<{| prop: string |}>, + object_optional_value: ?$ReadOnly<{| prop: string |}>, + + // ImageSource props + image_required: ImageSource, + image_optional_value: ?ImageSource, + image_optional_both?: ?ImageSource, + + // ColorValue props + color_required: ColorValue, + color_optional_key?: ColorValue, + color_optional_value: ?ColorValue, + color_optional_both?: ?ColorValue, + + // ColorArrayValue props + color_array_required: ColorArrayValue, + color_array_optional_key?: ColorArrayValue, + color_array_optional_value: ?ColorArrayValue, + color_array_optional_both?: ?ColorArrayValue, + + // ProcessedColorValue props + processed_color_required: ProcessedColorValue, + processed_color_optional_key?: ProcessedColorValue, + processed_color_optional_value: ?ProcessedColorValue, + processed_color_optional_both?: ?ProcessedColorValue, + + // PointValue props + point_required: PointValue, + point_optional_key?: PointValue, + point_optional_value: ?PointValue, + point_optional_both?: ?PointValue, + + // EdgeInsets props + insets_required: EdgeInsetsValue, + insets_optional_key?: EdgeInsetsValue, + insets_optional_value: ?EdgeInsetsValue, + insets_optional_both?: ?EdgeInsetsValue, + + // DimensionValue props + dimension_required: DimensionValue, + dimension_optional_key?: DimensionValue, + dimension_optional_value: ?DimensionValue, + dimension_optional_both?: ?DimensionValue, + + // Mixed props + mixed_required: UnsafeMixed, + mixed_optional_key?: UnsafeMixed, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const ARRAY_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type {ColorValue, PointValue, ProcessColorValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ObjectType = $ReadOnly<{| prop: string |}>; +type ArrayObjectType = $ReadOnlyArray<$ReadOnly<{| prop: string |}>>; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + // Boolean props + array_boolean_required: $ReadOnlyArray, + array_boolean_optional_key?: $ReadOnlyArray, + array_boolean_optional_value: ?$ReadOnlyArray, + array_boolean_optional_both?: ?$ReadOnlyArray, + + // String props + array_string_required: $ReadOnlyArray, + array_string_optional_key?: $ReadOnlyArray, + array_string_optional_value: ?$ReadOnlyArray, + array_string_optional_both?: ?$ReadOnlyArray, + + // Double props + array_double_required: $ReadOnlyArray, + array_double_optional_key?: $ReadOnlyArray, + array_double_optional_value: ?$ReadOnlyArray, + array_double_optional_both?: ?$ReadOnlyArray, + + // Float props + array_float_required: $ReadOnlyArray, + array_float_optional_key?: $ReadOnlyArray, + array_float_optional_value: ?$ReadOnlyArray, + array_float_optional_both?: ?$ReadOnlyArray, + + // Int32 props + array_int32_required: $ReadOnlyArray, + array_int32_optional_key?: $ReadOnlyArray, + array_int32_optional_value: ?$ReadOnlyArray, + array_int32_optional_both?: ?$ReadOnlyArray, + + // String enum props + array_enum_optional_key?: WithDefault< + $ReadOnlyArray<'small' | 'large'>, + 'small', + >, + array_enum_optional_both?: WithDefault< + $ReadOnlyArray<'small' | 'large'>, + 'small', + >, + + // ImageSource props + array_image_required: $ReadOnlyArray, + array_image_optional_key?: $ReadOnlyArray, + array_image_optional_value: ?$ReadOnlyArray, + array_image_optional_both?: ?$ReadOnlyArray, + + // ColorValue props + array_color_required: $ReadOnlyArray, + array_color_optional_key?: $ReadOnlyArray, + array_color_optional_value: ?$ReadOnlyArray, + array_color_optional_both?: ?$ReadOnlyArray, + + // PointValue props + array_point_required: $ReadOnlyArray, + array_point_optional_key?: $ReadOnlyArray, + array_point_optional_value: ?$ReadOnlyArray, + array_point_optional_both?: ?$ReadOnlyArray, + + // EdgeInsetsValue props + array_insets_required: $ReadOnlyArray, + array_insets_optional_key?: $ReadOnlyArray, + array_insets_optional_value: ?$ReadOnlyArray, + array_insets_optional_both?: ?$ReadOnlyArray, + + // DimensionValue props + array_dimension_required: $ReadOnlyArray, + array_dimension_optional_key?: $ReadOnlyArray, + array_dimension_optional_value: ?$ReadOnlyArray, + array_dimension_optional_both?: ?$ReadOnlyArray, + + // Object props + array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, + array_object_optional_key?: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, + array_object_optional_value: ?ArrayObjectType, + array_object_optional_both?: ?$ReadOnlyArray, + + // Nested array object types + array_of_array_object_required: $ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, + |}> + >, + array_of_array_object_optional_key?: $ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_optional_key: $ReadOnlyArray<$ReadOnly<{| prop?: string |}>>, + |}> + >, + array_of_array_object_optional_value: ?$ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_optional_value: $ReadOnlyArray<$ReadOnly<{| prop: ?string |}>>, + |}> + >, + array_of_array_object_optional_both?: ?$ReadOnlyArray< + $ReadOnly<{| + // This needs to be the same name as the top level array above + array_object_optional_both: $ReadOnlyArray<$ReadOnly<{| prop?: ?string |}>>, + |}> + >, + + // Nested array of array of object types + array_of_array_of_object_required: $ReadOnlyArray< + $ReadOnlyArray< + $ReadOnly<{| + prop: string, + |}>, + >, + >, + + // Nested array of array of object types (in file) + array_of_array_of_object_required_in_file: $ReadOnlyArray< + $ReadOnlyArray, + >, + + // Nested array of array of object types (with spread) + array_of_array_of_object_required_with_spread: $ReadOnlyArray< + $ReadOnlyArray< + $ReadOnly<{| + ...ObjectType + |}>, + >, + >, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const OBJECT_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type {ColorValue, PointValue, EdgeInsetsValue} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // Props + // Boolean props + boolean_required: $ReadOnly<{|prop: boolean|}>, + boolean_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // String props + string_required: $ReadOnly<{|prop: string|}>, + string_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // Double props + double_required: $ReadOnly<{|prop: Double|}>, + double_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // Float props + float_required: $ReadOnly<{|prop: Float|}>, + float_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // Int32 props + int_required: $ReadOnly<{|prop: Int32|}>, + int_optional: $ReadOnly<{|prop?: WithDefault|}>, + + // String enum props + enum_optional: $ReadOnly<{| + prop?: WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>, + |}>, + + // ImageSource props + image_required: $ReadOnly<{|prop: ImageSource|}>, + image_optional_key: $ReadOnly<{|prop?: ImageSource|}>, + image_optional_value: $ReadOnly<{|prop: ?ImageSource|}>, + image_optional_both: $ReadOnly<{|prop?: ?ImageSource|}>, + + // ColorValue props + color_required: $ReadOnly<{|prop: ColorValue|}>, + color_optional_key: $ReadOnly<{|prop?: ColorValue|}>, + color_optional_value: $ReadOnly<{|prop: ?ColorValue|}>, + color_optional_both: $ReadOnly<{|prop?: ?ColorValue|}>, + + // ProcessedColorValue props + processed_color_required: $ReadOnly<{|prop: ProcessedColorValue|}>, + processed_color_optional_key: $ReadOnly<{|prop?: ProcessedColorValue|}>, + processed_color_optional_value: $ReadOnly<{|prop: ?ProcessedColorValue|}>, + processed_color_optional_both: $ReadOnly<{|prop?: ?ProcessedColorValue|}>, + + // PointValue props + point_required: $ReadOnly<{|prop: PointValue|}>, + point_optional_key: $ReadOnly<{|prop?: PointValue|}>, + point_optional_value: $ReadOnly<{|prop: ?PointValue|}>, + point_optional_both: $ReadOnly<{|prop?: ?PointValue|}>, + + // EdgeInsetsValue props + insets_required: $ReadOnly<{|prop: EdgeInsetsValue|}>, + insets_optional_key: $ReadOnly<{|prop?: EdgeInsetsValue|}>, + insets_optional_value: $ReadOnly<{|prop: ?EdgeInsetsValue|}>, + insets_optional_both: $ReadOnly<{|prop?: ?EdgeInsetsValue|}>, + + // DimensionValue props + dimension_required: $ReadOnly<{|prop: DimensionValue|}>, + dimension_optional_key: $ReadOnly<{|prop?: DimensionValue|}>, + dimension_optional_value: $ReadOnly<{|prop: ?DimensionValue|}>, + dimension_optional_both: $ReadOnly<{|prop?: ?DimensionValue|}>, + + // Nested object props + object_required: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, + object_optional_key?: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, + object_optional_value: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, + object_optional_both?: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROPS_ALIASED_LOCALLY = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type DeepSpread = $ReadOnly<{| + otherStringProp: string, +|}>; + +export type PropsInFile = $ReadOnly<{| + ...DeepSpread, + isEnabled: boolean, + label: string, +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + ...PropsInFile, + + localType: $ReadOnly<{| + ...PropsInFile + |}>, + + localArr: $ReadOnlyArray +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type {HostComponent} from 'react-native'; +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + Int32, + Double, + Float, + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; + +import type {ViewProps} from 'ViewPropTypes'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No Props + + // Events + onDirectEventDefinedInline: + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineOptionalKey?: + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineOptionalValue: ? + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineOptionalBoth?: ? + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onDirectEventDefinedInlineWithPaperName?: ? + DirectEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + 'paperDirectEventDefinedInlineWithPaperName', + >, + + onBubblingEventDefinedInline: + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineOptionalKey?: + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineOptionalValue: ? + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineOptionalBoth?: ? + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + >, + + onBubblingEventDefinedInlineWithPaperName?: ? + BubblingEventHandler< + $ReadOnly<{| + ${EVENT_DEFINITION} + |}>, + 'paperBubblingEventDefinedInlineWithPaperName' + >, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const EVENTS_DEFINED_AS_NULL_INLINE = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // No props + + // Events defined inline + onDirectEventDefinedInlineNull: DirectEventHandler, + onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler, + onDirectEventDefinedInlineNullOptionalValue: ?DirectEventHandler, + onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler, + onDirectEventDefinedInlineNullWithPaperName?: ?DirectEventHandler< + null, + 'paperDirectEventDefinedInlineNullWithPaperName', + >, + + onBubblingEventDefinedInlineNull: BubblingEventHandler, + onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler, + onBubblingEventDefinedInlineNullOptionalValue: ?BubblingEventHandler, + onBubblingEventDefinedInlineNullOptionalBoth?: ?BubblingEventHandler, + onBubblingEventDefinedInlineNullWithPaperName?: ?BubblingEventHandler< + null, + 'paperBubblingEventDefinedInlineNullWithPaperName', + >, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROPS_AND_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type EventInFile = $ReadOnly<{| + ${EVENT_DEFINITION} +|}>; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler, + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, + onDirectEventDefinedInline: DirectEventHandler, + onDirectEventDefinedInlineWithPaperName: DirectEventHandler, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const PROPS_AS_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {HostComponent} from 'react-native'; + +export type String = string; +export type AnotherArray = $ReadOnlyArray; + +export type ModuleProps = $ReadOnly<{| + disable: String, + array: AnotherArray, +|}>; + +export default (codegenNativeComponent( + 'Module', +): HostComponent); +`; + +const COMMANDS_DEFINED_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float} from 'CodegenTypes'; +import type {RootTag} from 'RCTExport'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +type NativeType = HostComponent; + +interface NativeCommands { + +handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; + +hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; + scrollTo( + viewRef: React.ElementRef, + x: Float, + y: Int32, + z: Double, + animated: boolean, + ): void; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], +}); + +export default (codegenNativeComponent( + 'Module', +): NativeType); +`; + +const COMMANDS_WITH_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + // No props or events +|}>; + +type NativeType = HostComponent; + +export type ScrollTo = ( + viewRef: React.ElementRef, + y: Int, + animated: Boolean, +) => Void; + +interface NativeCommands { + +scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); + +export default (codegenNativeComponent( + 'Module', +): NativeType); +`; + +const COMMANDS_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + * @flow strict-local + */ + +'use strict'; + +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type EventInFile = $ReadOnly<{| + ${EVENT_DEFINITION} +|}>; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export type ModuleProps = $ReadOnly<{| + ...ViewProps, + + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler, + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, + onDirectEventDefinedInline: DirectEventHandler, + onDirectEventDefinedInlineWithPaperName: DirectEventHandler, +|}>; + +type NativeType = HostComponent; + +export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; + +interface NativeCommands { + +scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'] +}); + +export default (codegenNativeComponent( + 'Module', +): NativeType); +`; + +module.exports = { + ALL_PROP_TYPES_NO_EVENTS, + ARRAY_PROP_TYPES_NO_EVENTS, + OBJECT_PROP_TYPES_NO_EVENTS, + PROPS_ALIASED_LOCALLY, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, + NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, + EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, + EVENTS_DEFINED_AS_NULL_INLINE, + PROPS_AND_EVENTS_TYPES_EXPORTED, + COMMANDS_EVENTS_TYPES_EXPORTED, + COMMANDS_DEFINED_WITH_ALL_TYPES, + PROPS_AS_EXTERNAL_TYPES, + COMMANDS_WITH_EXTERNAL_TYPES, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/commands.js b/packages/react-native-codegen/lib/parsers/flow/components/commands.js new file mode 100644 index 000000000000..605dc60c7c91 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/commands.js @@ -0,0 +1,107 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../utils.js'), + getValueFromTypes = _require.getValueFromTypes; + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs + +function buildCommandSchema(property, types) { + const name = property.key.name; + const optional = property.optional; + const value = getValueFromTypes(property.value, types); + const firstParam = value.params[0].typeAnnotation; + if ( + !( + firstParam.id != null && + firstParam.id.type === 'QualifiedTypeIdentifier' && + firstParam.id.qualification.name === 'React' && + firstParam.id.id.name === 'ElementRef' + ) + ) { + throw new Error( + `The first argument of method ${name} must be of type React.ElementRef<>`, + ); + } + const params = value.params.slice(1).map(param => { + const paramName = param.name.name; + const paramValue = getValueFromTypes(param.typeAnnotation, types); + const type = + paramValue.type === 'GenericTypeAnnotation' + ? paramValue.id.name + : paramValue.type; + let returnType; + switch (type) { + case 'RootTag': + returnType = { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }; + break; + case 'BooleanTypeAnnotation': + returnType = { + type: 'BooleanTypeAnnotation', + }; + break; + case 'Int32': + returnType = { + type: 'Int32TypeAnnotation', + }; + break; + case 'Double': + returnType = { + type: 'DoubleTypeAnnotation', + }; + break; + case 'Float': + returnType = { + type: 'FloatTypeAnnotation', + }; + break; + case 'StringTypeAnnotation': + returnType = { + type: 'StringTypeAnnotation', + }; + break; + default: + type; + throw new Error( + `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, + ); + } + return { + name: paramName, + optional: false, + typeAnnotation: returnType, + }; + }); + return { + name, + optional, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params, + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }; +} +function getCommands(commandTypeAST, types) { + return commandTypeAST + .filter(property => property.type === 'ObjectTypeProperty') + .map(property => buildCommandSchema(property, types)) + .filter(Boolean); +} +module.exports = { + getCommands, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/commands.js.flow b/packages/react-native-codegen/lib/parsers/flow/components/commands.js.flow new file mode 100644 index 000000000000..bf789178d996 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/commands.js.flow @@ -0,0 +1,124 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + NamedShape, + CommandTypeAnnotation, +} from '../../../CodegenSchema.js'; +import type {TypeDeclarationMap} from '../../utils'; + +const {getValueFromTypes} = require('../utils.js'); + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs +type EventTypeAST = Object; + +function buildCommandSchema(property: EventTypeAST, types: TypeDeclarationMap) { + const name = property.key.name; + const optional = property.optional; + const value = getValueFromTypes(property.value, types); + + const firstParam = value.params[0].typeAnnotation; + + if ( + !( + firstParam.id != null && + firstParam.id.type === 'QualifiedTypeIdentifier' && + firstParam.id.qualification.name === 'React' && + firstParam.id.id.name === 'ElementRef' + ) + ) { + throw new Error( + `The first argument of method ${name} must be of type React.ElementRef<>`, + ); + } + + const params = value.params.slice(1).map(param => { + const paramName = param.name.name; + const paramValue = getValueFromTypes(param.typeAnnotation, types); + const type = + paramValue.type === 'GenericTypeAnnotation' + ? paramValue.id.name + : paramValue.type; + let returnType; + + switch (type) { + case 'RootTag': + returnType = { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }; + break; + case 'BooleanTypeAnnotation': + returnType = { + type: 'BooleanTypeAnnotation', + }; + break; + case 'Int32': + returnType = { + type: 'Int32TypeAnnotation', + }; + break; + case 'Double': + returnType = { + type: 'DoubleTypeAnnotation', + }; + break; + case 'Float': + returnType = { + type: 'FloatTypeAnnotation', + }; + break; + case 'StringTypeAnnotation': + returnType = { + type: 'StringTypeAnnotation', + }; + break; + default: + (type: empty); + throw new Error( + `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, + ); + } + + return { + name: paramName, + optional: false, + typeAnnotation: returnType, + }; + }); + + return { + name, + optional, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params, + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }; +} + +function getCommands( + commandTypeAST: $ReadOnlyArray, + types: TypeDeclarationMap, +): $ReadOnlyArray> { + return commandTypeAST + .filter(property => property.type === 'ObjectTypeProperty') + .map(property => buildCommandSchema(property, types)) + .filter(Boolean); +} + +module.exports = { + getCommands, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js b/packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js new file mode 100644 index 000000000000..347afcbf29c7 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js @@ -0,0 +1,449 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../utils.js'), + getValueFromTypes = _require.getValueFromTypes; +const _require2 = require('../../parsers-commons'), + verifyPropNotAlreadyDefined = _require2.verifyPropNotAlreadyDefined; +// $FlowFixMe[unsupported-variance-annotation] +function getTypeAnnotationForArray( + name, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, +) { + const extractedTypeAnnotation = getValueFromTypes(typeAnnotation, types); + if (extractedTypeAnnotation.type === 'NullableTypeAnnotation') { + throw new Error( + 'Nested optionals such as "$ReadOnlyArray" are not supported, please declare optionals at the top level of value definitions as in "?$ReadOnlyArray"', + ); + } + if ( + extractedTypeAnnotation.type === 'GenericTypeAnnotation' && + parser.getTypeAnnotationName(extractedTypeAnnotation) === 'WithDefault' + ) { + throw new Error( + 'Nested defaults such as "$ReadOnlyArray>" are not supported, please declare defaults at the top level of value definitions as in "WithDefault<$ReadOnlyArray, false>"', + ); + } + if (extractedTypeAnnotation.type === 'GenericTypeAnnotation') { + // Resolve the type alias if it's not defined inline + const objectType = getValueFromTypes(extractedTypeAnnotation, types); + if (objectType.id.name === '$ReadOnly') { + return { + type: 'ObjectTypeAnnotation', + properties: flattenProperties( + objectType.typeParameters.params[0].properties, + types, + parser, + ) + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean), + }; + } + if (objectType.id.name === '$ReadOnlyArray') { + // We need to go yet another level deeper to resolve + // types that may be defined in a type alias + const nestedObjectType = getValueFromTypes( + objectType.typeParameters.params[0], + types, + ); + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: flattenProperties( + nestedObjectType.typeParameters.params[0].properties, + types, + parser, + ) + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean), + }, + }; + } + } + const type = + extractedTypeAnnotation.type === 'GenericTypeAnnotation' + ? parser.getTypeAnnotationName(extractedTypeAnnotation) + : extractedTypeAnnotation.type; + switch (type) { + case 'ImageSource': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }; + case 'ImageRequest': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageRequestPrimitive', + }; + case 'ColorValue': + case 'ProcessedColorValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }; + case 'PointValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }; + case 'EdgeInsetsValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }; + case 'DimensionValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }; + case 'Stringish': + return { + type: 'StringTypeAnnotation', + }; + case 'Int32': + return { + type: 'Int32TypeAnnotation', + }; + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + }; + case 'BooleanTypeAnnotation': + return { + type: 'BooleanTypeAnnotation', + }; + case 'StringTypeAnnotation': + return { + type: 'StringTypeAnnotation', + }; + case 'UnionTypeAnnotation': + typeAnnotation.types.reduce((lastType, currType) => { + if (lastType && currType.type !== lastType.type) { + throw new Error(`Mixed types are not supported (see "${name}")`); + } + return currType; + }); + if (defaultValue === null) { + throw new Error(`A default enum value is required for "${name}"`); + } + const unionType = typeAnnotation.types[0].type; + if (unionType === 'StringLiteralTypeAnnotation') { + return { + type: 'StringEnumTypeAnnotation', + default: defaultValue, + options: typeAnnotation.types.map(option => option.value), + }; + } else if (unionType === 'NumberLiteralTypeAnnotation') { + throw new Error( + `Arrays of int enums are not supported (see: "${name}")`, + ); + } else { + throw new Error( + `Unsupported union type for "${name}", received "${unionType}"`, + ); + } + default: + throw new Error(`Unknown property type for "${name}": ${type}`); + } +} +function flattenProperties(typeDefinition, types, parser) { + return typeDefinition + .map(property => { + if (property.type === 'ObjectTypeProperty') { + return property; + } else if (property.type === 'ObjectTypeSpreadProperty') { + return flattenProperties( + parser.getProperties(property.argument.id.name, types), + types, + parser, + ); + } + }) + .reduce((acc, item) => { + if (Array.isArray(item)) { + item.forEach(prop => { + verifyPropNotAlreadyDefined(acc, prop); + }); + return acc.concat(item); + } else { + verifyPropNotAlreadyDefined(acc, item); + acc.push(item); + return acc; + } + }, []) + .filter(Boolean); +} + +// $FlowFixMe[unsupported-variance-annotation] +function getTypeAnnotation( + name, + annotation, + defaultValue, + withNullDefault, + types, + parser, + buildSchema, +) { + const typeAnnotation = getValueFromTypes(annotation, types); + if ( + typeAnnotation.type === 'GenericTypeAnnotation' && + parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnlyArray' + ) { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.typeParameters.params[0], + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + if ( + typeAnnotation.type === 'GenericTypeAnnotation' && + parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnly' + ) { + return { + type: 'ObjectTypeAnnotation', + properties: flattenProperties( + typeAnnotation.typeParameters.params[0].properties, + types, + parser, + ) + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean), + }; + } + const type = + typeAnnotation.type === 'GenericTypeAnnotation' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; + switch (type) { + case 'ImageSource': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }; + case 'ImageRequest': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageRequestPrimitive', + }; + case 'ColorValue': + case 'ProcessedColorValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }; + case 'ColorArrayValue': + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }; + case 'PointValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }; + case 'EdgeInsetsValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }; + case 'DimensionValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }; + case 'Int32': + return { + type: 'Int32TypeAnnotation', + default: defaultValue ? defaultValue : 0, + }; + case 'Double': + return { + type: 'DoubleTypeAnnotation', + default: defaultValue ? defaultValue : 0, + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + default: withNullDefault + ? defaultValue + : defaultValue + ? defaultValue + : 0, + }; + case 'BooleanTypeAnnotation': + return { + type: 'BooleanTypeAnnotation', + default: withNullDefault + ? defaultValue + : defaultValue == null + ? false + : defaultValue, + }; + case 'StringTypeAnnotation': + if (typeof defaultValue !== 'undefined') { + return { + type: 'StringTypeAnnotation', + default: defaultValue, + }; + } + throw new Error(`A default string (or null) is required for "${name}"`); + case 'Stringish': + if (typeof defaultValue !== 'undefined') { + return { + type: 'StringTypeAnnotation', + default: defaultValue, + }; + } + throw new Error(`A default string (or null) is required for "${name}"`); + case 'UnionTypeAnnotation': + typeAnnotation.types.reduce((lastType, currType) => { + if (lastType && currType.type !== lastType.type) { + throw new Error(`Mixed types are not supported (see "${name}").`); + } + return currType; + }); + if (defaultValue === null) { + throw new Error(`A default enum value is required for "${name}"`); + } + const unionType = typeAnnotation.types[0].type; + if (unionType === 'StringLiteralTypeAnnotation') { + return { + type: 'StringEnumTypeAnnotation', + default: defaultValue, + options: typeAnnotation.types.map(option => option.value), + }; + } else if (unionType === 'NumberLiteralTypeAnnotation') { + return { + type: 'Int32EnumTypeAnnotation', + default: defaultValue, + options: typeAnnotation.types.map(option => option.value), + }; + } else { + throw new Error( + `Unsupported union type for "${name}", received "${unionType}"`, + ); + } + case 'ObjectTypeAnnotation': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": object types must be declared using $ReadOnly<>`, + ); + case 'NumberTypeAnnotation': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, + ); + case 'UnsafeMixed': + return { + type: 'MixedTypeAnnotation', + }; + default: + throw new Error( + `Unknown property type for "${name}": "${type}" in the State`, + ); + } +} +function getSchemaInfo(property, types) { + const name = property.key.name; + const value = getValueFromTypes(property.value, types); + let typeAnnotation = + value.type === 'NullableTypeAnnotation' ? value.typeAnnotation : value; + const optional = + value.type === 'NullableTypeAnnotation' || + property.optional || + (value.type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault'); + if ( + !property.optional && + value.type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault' + ) { + throw new Error( + `key ${name} must be optional if used with WithDefault<> annotation`, + ); + } + if ( + value.type === 'NullableTypeAnnotation' && + typeAnnotation.type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault' + ) { + throw new Error( + 'WithDefault<> is optional and does not need to be marked as optional. Please remove the ? annotation in front of it.', + ); + } + let type = typeAnnotation.type; + if ( + type === 'GenericTypeAnnotation' && + (typeAnnotation.id.name === 'DirectEventHandler' || + typeAnnotation.id.name === 'BubblingEventHandler') + ) { + return null; + } + if ( + name === 'style' && + type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'ViewStyleProp' + ) { + return null; + } + let defaultValue = null; + let withNullDefault = false; + if ( + type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault' + ) { + if (typeAnnotation.typeParameters.params.length === 1) { + throw new Error( + `WithDefault requires two parameters, did you forget to provide a default value for "${name}"?`, + ); + } + defaultValue = typeAnnotation.typeParameters.params[1].value; + const defaultValueType = typeAnnotation.typeParameters.params[1].type; + typeAnnotation = typeAnnotation.typeParameters.params[0]; + type = + typeAnnotation.type === 'GenericTypeAnnotation' + ? typeAnnotation.id.name + : typeAnnotation.type; + if (defaultValueType === 'NullLiteralTypeAnnotation') { + defaultValue = null; + withNullDefault = true; + } + } + return { + name, + optional, + typeAnnotation, + defaultValue, + withNullDefault, + }; +} +module.exports = { + getSchemaInfo, + getTypeAnnotation, + flattenProperties, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js.flow b/packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js.flow new file mode 100644 index 000000000000..e827bcecbbd7 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/componentsUtils.js.flow @@ -0,0 +1,489 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +const {getValueFromTypes} = require('../utils.js'); +const {verifyPropNotAlreadyDefined} = require('../../parsers-commons'); +import type {TypeDeclarationMap, PropAST, ASTNode} from '../../utils'; +import type {BuildSchemaFN, Parser} from '../../parser'; + +// $FlowFixMe[unsupported-variance-annotation] +function getTypeAnnotationForArray<+T>( + name: string, + typeAnnotation: $FlowFixMe, + defaultValue: $FlowFixMe | null, + types: TypeDeclarationMap, + parser: Parser, + buildSchema: BuildSchemaFN, +): $FlowFixMe { + const extractedTypeAnnotation = getValueFromTypes(typeAnnotation, types); + if (extractedTypeAnnotation.type === 'NullableTypeAnnotation') { + throw new Error( + 'Nested optionals such as "$ReadOnlyArray" are not supported, please declare optionals at the top level of value definitions as in "?$ReadOnlyArray"', + ); + } + + if ( + extractedTypeAnnotation.type === 'GenericTypeAnnotation' && + parser.getTypeAnnotationName(extractedTypeAnnotation) === 'WithDefault' + ) { + throw new Error( + 'Nested defaults such as "$ReadOnlyArray>" are not supported, please declare defaults at the top level of value definitions as in "WithDefault<$ReadOnlyArray, false>"', + ); + } + + if (extractedTypeAnnotation.type === 'GenericTypeAnnotation') { + // Resolve the type alias if it's not defined inline + const objectType = getValueFromTypes(extractedTypeAnnotation, types); + + if (objectType.id.name === '$ReadOnly') { + return { + type: 'ObjectTypeAnnotation', + properties: flattenProperties( + objectType.typeParameters.params[0].properties, + types, + parser, + ) + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean), + }; + } + + if (objectType.id.name === '$ReadOnlyArray') { + // We need to go yet another level deeper to resolve + // types that may be defined in a type alias + const nestedObjectType = getValueFromTypes( + objectType.typeParameters.params[0], + types, + ); + + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ObjectTypeAnnotation', + properties: flattenProperties( + nestedObjectType.typeParameters.params[0].properties, + types, + parser, + ) + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean), + }, + }; + } + } + + const type = + extractedTypeAnnotation.type === 'GenericTypeAnnotation' + ? parser.getTypeAnnotationName(extractedTypeAnnotation) + : extractedTypeAnnotation.type; + + switch (type) { + case 'ImageSource': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }; + case 'ImageRequest': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageRequestPrimitive', + }; + case 'ColorValue': + case 'ProcessedColorValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }; + case 'PointValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }; + case 'EdgeInsetsValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }; + case 'DimensionValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }; + case 'Stringish': + return { + type: 'StringTypeAnnotation', + }; + case 'Int32': + return { + type: 'Int32TypeAnnotation', + }; + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + }; + case 'BooleanTypeAnnotation': + return { + type: 'BooleanTypeAnnotation', + }; + case 'StringTypeAnnotation': + return { + type: 'StringTypeAnnotation', + }; + case 'UnionTypeAnnotation': + typeAnnotation.types.reduce((lastType, currType) => { + if (lastType && currType.type !== lastType.type) { + throw new Error(`Mixed types are not supported (see "${name}")`); + } + return currType; + }); + + if (defaultValue === null) { + throw new Error(`A default enum value is required for "${name}"`); + } + + const unionType = typeAnnotation.types[0].type; + if (unionType === 'StringLiteralTypeAnnotation') { + return { + type: 'StringEnumTypeAnnotation', + default: (defaultValue: string), + options: typeAnnotation.types.map(option => option.value), + }; + } else if (unionType === 'NumberLiteralTypeAnnotation') { + throw new Error( + `Arrays of int enums are not supported (see: "${name}")`, + ); + } else { + throw new Error( + `Unsupported union type for "${name}", received "${unionType}"`, + ); + } + default: + throw new Error(`Unknown property type for "${name}": ${type}`); + } +} + +function flattenProperties( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + parser: Parser, +): $ReadOnlyArray { + return typeDefinition + .map(property => { + if (property.type === 'ObjectTypeProperty') { + return property; + } else if (property.type === 'ObjectTypeSpreadProperty') { + return flattenProperties( + parser.getProperties(property.argument.id.name, types), + types, + parser, + ); + } + }) + .reduce((acc: Array, item) => { + if (Array.isArray(item)) { + item.forEach(prop => { + verifyPropNotAlreadyDefined(acc, prop); + }); + return acc.concat(item); + } else { + verifyPropNotAlreadyDefined(acc, item); + acc.push(item); + return acc; + } + }, []) + .filter(Boolean); +} + +// $FlowFixMe[unsupported-variance-annotation] +function getTypeAnnotation<+T>( + name: string, + annotation: $FlowFixMe | ASTNode, + defaultValue: $FlowFixMe | null, + withNullDefault: boolean, + types: TypeDeclarationMap, + parser: Parser, + buildSchema: BuildSchemaFN, +): $FlowFixMe { + const typeAnnotation = getValueFromTypes(annotation, types); + + if ( + typeAnnotation.type === 'GenericTypeAnnotation' && + parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnlyArray' + ) { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.typeParameters.params[0], + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + + if ( + typeAnnotation.type === 'GenericTypeAnnotation' && + parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnly' + ) { + return { + type: 'ObjectTypeAnnotation', + properties: flattenProperties( + typeAnnotation.typeParameters.params[0].properties, + types, + parser, + ) + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean), + }; + } + + const type = + typeAnnotation.type === 'GenericTypeAnnotation' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; + + switch (type) { + case 'ImageSource': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }; + case 'ImageRequest': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageRequestPrimitive', + }; + case 'ColorValue': + case 'ProcessedColorValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }; + case 'ColorArrayValue': + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }; + case 'PointValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }; + case 'EdgeInsetsValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }; + case 'DimensionValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }; + case 'Int32': + return { + type: 'Int32TypeAnnotation', + default: ((defaultValue ? defaultValue : 0): number), + }; + case 'Double': + return { + type: 'DoubleTypeAnnotation', + default: ((defaultValue ? defaultValue : 0): number), + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + default: withNullDefault + ? (defaultValue: number | null) + : ((defaultValue ? defaultValue : 0): number), + }; + case 'BooleanTypeAnnotation': + return { + type: 'BooleanTypeAnnotation', + default: withNullDefault + ? (defaultValue: boolean | null) + : ((defaultValue == null ? false : defaultValue): boolean), + }; + case 'StringTypeAnnotation': + if (typeof defaultValue !== 'undefined') { + return { + type: 'StringTypeAnnotation', + default: (defaultValue: string | null), + }; + } + throw new Error(`A default string (or null) is required for "${name}"`); + case 'Stringish': + if (typeof defaultValue !== 'undefined') { + return { + type: 'StringTypeAnnotation', + default: (defaultValue: string | null), + }; + } + throw new Error(`A default string (or null) is required for "${name}"`); + case 'UnionTypeAnnotation': + typeAnnotation.types.reduce((lastType, currType) => { + if (lastType && currType.type !== lastType.type) { + throw new Error(`Mixed types are not supported (see "${name}").`); + } + return currType; + }); + + if (defaultValue === null) { + throw new Error(`A default enum value is required for "${name}"`); + } + + const unionType = typeAnnotation.types[0].type; + if (unionType === 'StringLiteralTypeAnnotation') { + return { + type: 'StringEnumTypeAnnotation', + default: (defaultValue: string), + options: typeAnnotation.types.map(option => option.value), + }; + } else if (unionType === 'NumberLiteralTypeAnnotation') { + return { + type: 'Int32EnumTypeAnnotation', + default: (defaultValue: number), + options: typeAnnotation.types.map(option => option.value), + }; + } else { + throw new Error( + `Unsupported union type for "${name}", received "${unionType}"`, + ); + } + case 'ObjectTypeAnnotation': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": object types must be declared using $ReadOnly<>`, + ); + case 'NumberTypeAnnotation': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, + ); + case 'UnsafeMixed': + return { + type: 'MixedTypeAnnotation', + }; + default: + throw new Error( + `Unknown property type for "${name}": "${type}" in the State`, + ); + } +} + +type SchemaInfo = { + name: string, + optional: boolean, + typeAnnotation: $FlowFixMe, + defaultValue: $FlowFixMe, + withNullDefault: boolean, +}; + +function getSchemaInfo( + property: PropAST, + types: TypeDeclarationMap, +): ?SchemaInfo { + const name = property.key.name; + + const value = getValueFromTypes(property.value, types); + let typeAnnotation = + value.type === 'NullableTypeAnnotation' ? value.typeAnnotation : value; + + const optional = + value.type === 'NullableTypeAnnotation' || + property.optional || + (value.type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault'); + + if ( + !property.optional && + value.type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault' + ) { + throw new Error( + `key ${name} must be optional if used with WithDefault<> annotation`, + ); + } + if ( + value.type === 'NullableTypeAnnotation' && + typeAnnotation.type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault' + ) { + throw new Error( + 'WithDefault<> is optional and does not need to be marked as optional. Please remove the ? annotation in front of it.', + ); + } + + let type = typeAnnotation.type; + if ( + type === 'GenericTypeAnnotation' && + (typeAnnotation.id.name === 'DirectEventHandler' || + typeAnnotation.id.name === 'BubblingEventHandler') + ) { + return null; + } + + if ( + name === 'style' && + type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'ViewStyleProp' + ) { + return null; + } + + let defaultValue = null; + let withNullDefault = false; + if ( + type === 'GenericTypeAnnotation' && + typeAnnotation.id.name === 'WithDefault' + ) { + if (typeAnnotation.typeParameters.params.length === 1) { + throw new Error( + `WithDefault requires two parameters, did you forget to provide a default value for "${name}"?`, + ); + } + + defaultValue = typeAnnotation.typeParameters.params[1].value; + const defaultValueType = typeAnnotation.typeParameters.params[1].type; + + typeAnnotation = typeAnnotation.typeParameters.params[0]; + type = + typeAnnotation.type === 'GenericTypeAnnotation' + ? typeAnnotation.id.name + : typeAnnotation.type; + + if (defaultValueType === 'NullLiteralTypeAnnotation') { + defaultValue = null; + withNullDefault = true; + } + } + + return { + name, + optional, + typeAnnotation, + defaultValue, + withNullDefault, + }; +} + +module.exports = { + getSchemaInfo, + getTypeAnnotation, + flattenProperties, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/events.js b/packages/react-native-codegen/lib/parsers/flow/components/events.js new file mode 100644 index 000000000000..c868cf5d8b2f --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/events.js @@ -0,0 +1,256 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../../error-utils'), + throwIfEventHasNoName = _require.throwIfEventHasNoName, + throwIfBubblingTypeIsNull = _require.throwIfBubblingTypeIsNull, + throwIfArgumentPropsAreNull = _require.throwIfArgumentPropsAreNull; +const _require2 = require('../../parsers-commons'), + getEventArgument = _require2.getEventArgument, + buildPropertiesForEvent = _require2.buildPropertiesForEvent, + handleEventHandler = _require2.handleEventHandler, + emitBuildEventSchema = _require2.emitBuildEventSchema; +const _require3 = require('../../parsers-primitives'), + emitBoolProp = _require3.emitBoolProp, + emitDoubleProp = _require3.emitDoubleProp, + emitFloatProp = _require3.emitFloatProp, + emitMixedProp = _require3.emitMixedProp, + emitStringProp = _require3.emitStringProp, + emitInt32Prop = _require3.emitInt32Prop, + emitObjectProp = _require3.emitObjectProp, + emitUnionProp = _require3.emitUnionProp; +function getPropertyType( + /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ + name, + optional, + typeAnnotation, + parser, +) { + const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); + switch (type) { + case 'BooleanTypeAnnotation': + return emitBoolProp(name, optional); + case 'StringTypeAnnotation': + return emitStringProp(name, optional); + case 'Int32': + return emitInt32Prop(name, optional); + case 'Double': + return emitDoubleProp(name, optional); + case 'Float': + return emitFloatProp(name, optional); + case '$ReadOnly': + return getPropertyType( + name, + optional, + typeAnnotation.typeParameters.params[0], + parser, + ); + case 'ObjectTypeAnnotation': + return emitObjectProp( + name, + optional, + parser, + typeAnnotation, + extractArrayElementType, + ); + case 'UnionTypeAnnotation': + return emitUnionProp(name, optional, parser, typeAnnotation); + case 'UnsafeMixed': + return emitMixedProp(name, optional); + case 'ArrayTypeAnnotation': + case '$ReadOnlyArray': + return { + name, + optional, + typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), + }; + default: + throw new Error(`Unable to determine event type for "${name}": ${type}`); + } +} +function extractArrayElementType(typeAnnotation, name, parser) { + const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); + switch (type) { + case 'BooleanTypeAnnotation': + return { + type: 'BooleanTypeAnnotation', + }; + case 'StringTypeAnnotation': + return { + type: 'StringTypeAnnotation', + }; + case 'Int32': + return { + type: 'Int32TypeAnnotation', + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + }; + case 'NumberTypeAnnotation': + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'UnionTypeAnnotation': + return { + type: 'StringEnumTypeAnnotation', + options: typeAnnotation.types.map(option => + parser.getLiteralValue(option), + ), + }; + case 'UnsafeMixed': + return { + type: 'MixedTypeAnnotation', + }; + case 'ObjectTypeAnnotation': + return { + type: 'ObjectTypeAnnotation', + properties: parser + .getObjectProperties(typeAnnotation) + .map(member => + buildPropertiesForEvent(member, parser, getPropertyType), + ), + }; + case 'ArrayTypeAnnotation': + return { + type: 'ArrayTypeAnnotation', + elementType: extractArrayElementType( + typeAnnotation.elementType, + name, + parser, + ), + }; + case '$ReadOnlyArray': + const genericParams = typeAnnotation.typeParameters.params; + if (genericParams.length !== 1) { + throw new Error( + `Events only supports arrays with 1 Generic type. Found ${ + genericParams.length + } types:\n${prettify(genericParams)}`, + ); + } + return { + type: 'ArrayTypeAnnotation', + elementType: extractArrayElementType(genericParams[0], name, parser), + }; + default: + throw new Error( + `Unrecognized ${type} for Array ${name} in events.\n${prettify( + typeAnnotation, + )}`, + ); + } +} +function prettify(jsonObject) { + return JSON.stringify(jsonObject, null, 2); +} +function extractTypeFromTypeAnnotation(typeAnnotation, parser) { + return typeAnnotation.type === 'GenericTypeAnnotation' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; +} +function findEventArgumentsAndType( + parser, + typeAnnotation, + types, + bubblingType, + paperName, +) { + throwIfEventHasNoName(typeAnnotation, parser); + const name = parser.getTypeAnnotationName(typeAnnotation); + if (name === '$ReadOnly') { + return { + argumentProps: typeAnnotation.typeParameters.params[0].properties, + paperTopLevelNameDeprecated: paperName, + bubblingType, + }; + } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { + return handleEventHandler( + name, + typeAnnotation, + parser, + types, + findEventArgumentsAndType, + ); + } else if (types[name]) { + return findEventArgumentsAndType( + parser, + types[name].right, + types, + bubblingType, + paperName, + ); + } else { + return { + argumentProps: null, + bubblingType: null, + paperTopLevelNameDeprecated: null, + }; + } +} +function buildEventSchema(types, property, parser) { + const name = property.key.name; + const optional = + property.optional || property.value.type === 'NullableTypeAnnotation'; + let typeAnnotation = + property.value.type === 'NullableTypeAnnotation' + ? property.value.typeAnnotation + : property.value; + if ( + typeAnnotation.type !== 'GenericTypeAnnotation' || + (parser.getTypeAnnotationName(typeAnnotation) !== 'BubblingEventHandler' && + parser.getTypeAnnotationName(typeAnnotation) !== 'DirectEventHandler') + ) { + return null; + } + const _findEventArgumentsAn = findEventArgumentsAndType( + parser, + typeAnnotation, + types, + ), + argumentProps = _findEventArgumentsAn.argumentProps, + bubblingType = _findEventArgumentsAn.bubblingType, + paperTopLevelNameDeprecated = + _findEventArgumentsAn.paperTopLevelNameDeprecated; + const nonNullableArgumentProps = throwIfArgumentPropsAreNull( + argumentProps, + name, + ); + const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); + const argument = getEventArgument( + nonNullableArgumentProps, + parser, + getPropertyType, + ); + return emitBuildEventSchema( + paperTopLevelNameDeprecated, + name, + optional, + nonNullableBubblingType, + argument, + ); +} + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs + +function getEvents(eventTypeAST, types, parser) { + return eventTypeAST + .filter(property => property.type === 'ObjectTypeProperty') + .map(property => buildEventSchema(types, property, parser)) + .filter(Boolean); +} +module.exports = { + getEvents, + extractArrayElementType, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/events.js.flow b/packages/react-native-codegen/lib/parsers/flow/components/events.js.flow new file mode 100644 index 000000000000..17b3c933b326 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/events.js.flow @@ -0,0 +1,287 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + EventTypeShape, + NamedShape, + EventTypeAnnotation, +} from '../../../CodegenSchema.js'; +import type {Parser} from '../../parser'; +import type {EventArgumentReturnType} from '../../parsers-commons'; + +const { + throwIfEventHasNoName, + throwIfBubblingTypeIsNull, + throwIfArgumentPropsAreNull, +} = require('../../error-utils'); +const { + getEventArgument, + buildPropertiesForEvent, + handleEventHandler, + emitBuildEventSchema, +} = require('../../parsers-commons'); +const { + emitBoolProp, + emitDoubleProp, + emitFloatProp, + emitMixedProp, + emitStringProp, + emitInt32Prop, + emitObjectProp, + emitUnionProp, +} = require('../../parsers-primitives'); + +function getPropertyType( + /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ + name: string, + optional: boolean, + typeAnnotation: $FlowFixMe, + parser: Parser, +): NamedShape { + const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); + + switch (type) { + case 'BooleanTypeAnnotation': + return emitBoolProp(name, optional); + case 'StringTypeAnnotation': + return emitStringProp(name, optional); + case 'Int32': + return emitInt32Prop(name, optional); + case 'Double': + return emitDoubleProp(name, optional); + case 'Float': + return emitFloatProp(name, optional); + case '$ReadOnly': + return getPropertyType( + name, + optional, + typeAnnotation.typeParameters.params[0], + parser, + ); + case 'ObjectTypeAnnotation': + return emitObjectProp( + name, + optional, + parser, + typeAnnotation, + extractArrayElementType, + ); + case 'UnionTypeAnnotation': + return emitUnionProp(name, optional, parser, typeAnnotation); + case 'UnsafeMixed': + return emitMixedProp(name, optional); + case 'ArrayTypeAnnotation': + case '$ReadOnlyArray': + return { + name, + optional, + typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), + }; + default: + throw new Error(`Unable to determine event type for "${name}": ${type}`); + } +} + +function extractArrayElementType( + typeAnnotation: $FlowFixMe, + name: string, + parser: Parser, +): EventTypeAnnotation { + const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); + + switch (type) { + case 'BooleanTypeAnnotation': + return {type: 'BooleanTypeAnnotation'}; + case 'StringTypeAnnotation': + return {type: 'StringTypeAnnotation'}; + case 'Int32': + return {type: 'Int32TypeAnnotation'}; + case 'Float': + return {type: 'FloatTypeAnnotation'}; + case 'NumberTypeAnnotation': + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'UnionTypeAnnotation': + return { + type: 'StringEnumTypeAnnotation', + options: typeAnnotation.types.map(option => + parser.getLiteralValue(option), + ), + }; + case 'UnsafeMixed': + return {type: 'MixedTypeAnnotation'}; + case 'ObjectTypeAnnotation': + return { + type: 'ObjectTypeAnnotation', + properties: parser + .getObjectProperties(typeAnnotation) + .map(member => + buildPropertiesForEvent(member, parser, getPropertyType), + ), + }; + case 'ArrayTypeAnnotation': + return { + type: 'ArrayTypeAnnotation', + elementType: extractArrayElementType( + typeAnnotation.elementType, + name, + parser, + ), + }; + case '$ReadOnlyArray': + const genericParams = typeAnnotation.typeParameters.params; + if (genericParams.length !== 1) { + throw new Error( + `Events only supports arrays with 1 Generic type. Found ${ + genericParams.length + } types:\n${prettify(genericParams)}`, + ); + } + return { + type: 'ArrayTypeAnnotation', + elementType: extractArrayElementType(genericParams[0], name, parser), + }; + default: + throw new Error( + `Unrecognized ${type} for Array ${name} in events.\n${prettify( + typeAnnotation, + )}`, + ); + } +} + +function prettify(jsonObject: $FlowFixMe): string { + return JSON.stringify(jsonObject, null, 2); +} + +function extractTypeFromTypeAnnotation( + typeAnnotation: $FlowFixMe, + parser: Parser, +): string { + return typeAnnotation.type === 'GenericTypeAnnotation' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; +} + +function findEventArgumentsAndType( + parser: Parser, + typeAnnotation: $FlowFixMe, + types: TypeMap, + bubblingType: void | 'direct' | 'bubble', + paperName: ?$FlowFixMe, +): EventArgumentReturnType { + throwIfEventHasNoName(typeAnnotation, parser); + const name = parser.getTypeAnnotationName(typeAnnotation); + if (name === '$ReadOnly') { + return { + argumentProps: typeAnnotation.typeParameters.params[0].properties, + paperTopLevelNameDeprecated: paperName, + bubblingType, + }; + } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { + return handleEventHandler( + name, + typeAnnotation, + parser, + types, + findEventArgumentsAndType, + ); + } else if (types[name]) { + return findEventArgumentsAndType( + parser, + types[name].right, + types, + bubblingType, + paperName, + ); + } else { + return { + argumentProps: null, + bubblingType: null, + paperTopLevelNameDeprecated: null, + }; + } +} + +function buildEventSchema( + types: TypeMap, + property: EventTypeAST, + parser: Parser, +): ?EventTypeShape { + const name = property.key.name; + const optional = + property.optional || property.value.type === 'NullableTypeAnnotation'; + + let typeAnnotation = + property.value.type === 'NullableTypeAnnotation' + ? property.value.typeAnnotation + : property.value; + + if ( + typeAnnotation.type !== 'GenericTypeAnnotation' || + (parser.getTypeAnnotationName(typeAnnotation) !== 'BubblingEventHandler' && + parser.getTypeAnnotationName(typeAnnotation) !== 'DirectEventHandler') + ) { + return null; + } + + const {argumentProps, bubblingType, paperTopLevelNameDeprecated} = + findEventArgumentsAndType(parser, typeAnnotation, types); + + const nonNullableArgumentProps = throwIfArgumentPropsAreNull( + argumentProps, + name, + ); + const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); + + const argument = getEventArgument( + nonNullableArgumentProps, + parser, + getPropertyType, + ); + + return emitBuildEventSchema( + paperTopLevelNameDeprecated, + name, + optional, + nonNullableBubblingType, + argument, + ); +} + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs +type EventTypeAST = Object; + +type TypeMap = { + // $FlowFixMe[unclear-type] there's no flowtype for ASTs + [string]: Object, + ... +}; + +function getEvents( + eventTypeAST: $ReadOnlyArray, + types: TypeMap, + parser: Parser, +): $ReadOnlyArray { + return eventTypeAST + .filter(property => property.type === 'ObjectTypeProperty') + .map(property => buildEventSchema(types, property, parser)) + .filter(Boolean); +} + +module.exports = { + getEvents, + extractArrayElementType, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/index.js b/packages/react-native-codegen/lib/parsers/flow/components/index.js new file mode 100644 index 000000000000..a0298c51a1b9 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/index.js @@ -0,0 +1,49 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./commands'), + getCommands = _require.getCommands; +const _require2 = require('./events'), + getEvents = _require2.getEvents; +const _require3 = require('../../parsers-commons'), + getOptions = _require3.getOptions, + findComponentConfig = _require3.findComponentConfig, + getCommandProperties = _require3.getCommandProperties; + +// $FlowFixMe[signature-verification-failure] there's no flowtype for AST +function buildComponentSchema(ast, parser) { + const _findComponentConfig = findComponentConfig(ast, parser), + componentName = _findComponentConfig.componentName, + propsTypeName = _findComponentConfig.propsTypeName, + optionsExpression = _findComponentConfig.optionsExpression; + const types = parser.getTypes(ast); + const propProperties = parser.getProperties(propsTypeName, types); + const commandProperties = getCommandProperties(ast, parser); + const _parser$getProps = parser.getProps(propProperties, types), + extendsProps = _parser$getProps.extendsProps, + props = _parser$getProps.props; + const options = getOptions(optionsExpression); + const events = getEvents(propProperties, types, parser); + const commands = getCommands(commandProperties, types); + return { + filename: componentName, + componentName, + options, + extendsProps, + events, + props, + commands, + }; +} +module.exports = { + buildComponentSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/components/index.js.flow b/packages/react-native-codegen/lib/parsers/flow/components/index.js.flow new file mode 100644 index 000000000000..9b7acbba2082 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/components/index.js.flow @@ -0,0 +1,56 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {Parser} from '../../parser'; +import type {ComponentSchemaBuilderConfig} from '../../schema.js'; + +const {getCommands} = require('./commands'); +const {getEvents} = require('./events'); +const { + getOptions, + findComponentConfig, + getCommandProperties, +} = require('../../parsers-commons'); + +// $FlowFixMe[signature-verification-failure] there's no flowtype for AST +function buildComponentSchema( + ast: $FlowFixMe, + parser: Parser, +): ComponentSchemaBuilderConfig { + const {componentName, propsTypeName, optionsExpression} = findComponentConfig( + ast, + parser, + ); + + const types = parser.getTypes(ast); + + const propProperties = parser.getProperties(propsTypeName, types); + const commandProperties = getCommandProperties(ast, parser); + const {extendsProps, props} = parser.getProps(propProperties, types); + + const options = getOptions(optionsExpression); + const events = getEvents(propProperties, types, parser); + const commands = getCommands(commandProperties, types); + + return { + filename: componentName, + componentName, + options, + extendsProps, + events, + props, + commands, + }; +} + +module.exports = { + buildComponentSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js new file mode 100644 index 000000000000..59309dcc7a1e --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js @@ -0,0 +1,269 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg: string) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg : Array) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg : $ReadOnly<>) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getBool: (arg: boolean) => boolean; + +getNumber: (arg: number) => number; + +getString: (arg: string) => string; + sampleBool: boolean, + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getBool: (boolean) => boolean; + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getBool: (arg: boolean) => Promise; + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); +export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); + +`; +const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getSth: (a : ?number) => void +} + +export interface Spec2 extends TurboModule { + +getSth: (a : ?number) => void +} + + +`; +const EMPTY_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export enum SomeEnum { +} + +export interface Spec extends TurboModule { + +getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing('EmptyEnumNativeModule'); +`; +const MIXED_VALUES_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export enum SomeEnum { + NUM = 1, + STR = 'str', +} + +export interface Spec extends TurboModule { + +getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing('MixedValuesEnumNativeModule'); +`; +module.exports = { + NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT, + NATIVE_MODULES_WITH_UNNAMED_PARAMS, + NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, + TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, + NATIVE_MODULES_WITH_NOT_ONLY_METHODS, + TWO_NATIVE_EXTENDING_TURBO_MODULE, + EMPTY_ENUM_NATIVE_MODULE, + MIXED_VALUES_ENUM_NATIVE_MODULE, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js.flow b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js.flow new file mode 100644 index 000000000000..8734095f43f2 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js.flow @@ -0,0 +1,279 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg: string) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg : Array) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg : $ReadOnly<>) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getBool: (arg: boolean) => boolean; + +getNumber: (arg: number) => number; + +getString: (arg: string) => string; + sampleBool: boolean, + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getBool: (boolean) => boolean; + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getBool: (arg: boolean) => Promise; + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); +export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); + +`; + +const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getSth: (a : ?number) => void +} + +export interface Spec2 extends TurboModule { + +getSth: (a : ?number) => void +} + + +`; + +const EMPTY_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export enum SomeEnum { +} + +export interface Spec extends TurboModule { + +getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing('EmptyEnumNativeModule'); +`; + +const MIXED_VALUES_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export enum SomeEnum { + NUM = 1, + STR = 'str', +} + +export interface Spec extends TurboModule { + +getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing('MixedValuesEnumNativeModule'); +`; + +module.exports = { + NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT, + NATIVE_MODULES_WITH_UNNAMED_PARAMS, + NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, + TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, + NATIVE_MODULES_WITH_NOT_ONLY_METHODS, + TWO_NATIVE_EXTENDING_TURBO_MODULE, + EMPTY_ENUM_NATIVE_MODULE, + MIXED_VALUES_ENUM_NATIVE_MODULE, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js new file mode 100644 index 000000000000..7e996d09c353 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js @@ -0,0 +1,787 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const EMPTY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // no methods +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type String = string; + +export interface Spec extends TurboModule { + // Exported methods. + +getObject: (arg: {|const1: {|const1: boolean|}|}) => {| + const1: {|const1: boolean|}, + |}; + +getReadOnlyObject: (arg: $ReadOnly<{|const1: $ReadOnly<{|const1: boolean|}>|}>) => $ReadOnly<{| + const1: {|const1: boolean|}, + |}>; + +getObject2: (arg: { a: String }) => Object; + +getObjectInArray: (arg: {const1: {|const1: boolean|}}) => Array<{| + const1: {const1: boolean}, + |}>; +} +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getConstants: () => {| + isTesting: boolean, + reactNativeVersion: {| + major: number, + minor: number, + patch?: number, + prerelease: ?number, + |}, + forceTouchAvailable: boolean, + osVersion: string, + systemName: string, + interfaceIdiom: string, + |}; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +passBool?: (arg: boolean) => void; + +passNumber: (arg: number) => void; + +passString: (arg: string) => void; + +passStringish: (arg: Stringish) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_ALIASES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type NumNum = number; +export type Num = (arg: NumNum) => void; +type Num2 = Num; +export type Void = void; +export type A = number; +export type B = number; +export type ObjectAlias = {| + x: number, + y: number, + label: string, + truthy: boolean, +|}; +export type ReadOnlyAlias = $ReadOnly; + +export interface Spec extends TurboModule { + // Exported methods. + +getNumber: Num2; + +getVoid: () => Void; + +getArray: (a: Array) => {| a: B |}; + +getStringFromAlias: (a: ObjectAlias) => string; + +getStringFromNullableAlias: (a: ?ObjectAlias) => string; + +getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; + +getStringFromNullableReadOnlyAlias: (a: ?ReadOnlyAlias) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_NESTED_ALIASES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type Bar = {| + z: number +|}; + +type Foo = {| + bar1: Bar, + bar2: Bar, +|}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; +import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; + +export interface Spec extends TurboModule { + +getInt: (arg: Int32) => Int32; + +getFloat: (arg: Float) => Float; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getObject: (o: Object) => Object, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; +import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; + +export interface Spec extends TurboModule { + +getUnsafeObject: (o: UnsafeObject) => UnsafeObject, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_PARTIALS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type SomeObj = {| + a: string, + b?: boolean, +|}; + +export interface Spec extends TurboModule { + +getSomeObj: () => SomeObj; + +getPartialSomeObj: () => Partial; + +getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type SomeObj = {| + a: string, + b?: boolean, +|}; + +export type PartialSomeObj = Partial; + +export interface Spec extends TurboModule { + +getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_ROOT_TAG = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {RootTag, TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getRootTag: (rootTag: RootTag) => RootTag, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // Exported methods. + +voidFunc: (arg: ?string) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_BASIC_ARRAY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getArray: (arg: Array) => Array; + +getArray: (arg: $ReadOnlyArray) => $ReadOnlyArray; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type DisplayMetricsAndroid = {| + width: number, +|}; + +export interface Spec extends TurboModule { + +getConstants: () => {| + +Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid, + }, + |}; + +getConstants2: () => $ReadOnly<{| + +Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid, + }, + |}>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getArray: (arg: Array<[string, string]>) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type SomeString = string; + +export interface Spec extends TurboModule { + +getArray: (arg: Array) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getArray: (arg: Array>>>>) => Array>>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_PROMISE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type String = string; +export type SomeObj = {| a: string |}; + +export interface Spec extends TurboModule { + +getValueWithPromise: () => Promise; + +getValueWithPromiseDefinedSomewhereElse: () => Promise; + +getValueWithPromiseObjDefinedSomewhereElse: () => Promise; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_CALLBACK = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // Exported methods. + +getValueWithCallback: ( + callback: (value: string, arr: Array>) => void, + ) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_UNION = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export interface Spec extends TurboModule { + +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const ANDROID_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // no methods +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModuleAndroid'); + +`; +const IOS_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export interface Spec extends TurboModule { + getEnums(quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions): string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModuleIOS'); + +`; +const CXX_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export interface Spec extends TurboModule { + +getCallback: () => () => void; + +getMixed: (arg: mixed) => mixed; + +getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; + +getMap: (arg: {[a: string]: ?number}) => {[b: string]: ?number}; + +getAnotherMap: (arg: {[string]: string}) => {[string]: string}; + +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModuleCxx'); + +`; +const PROMISE_WITH_COMMONLY_USED_TYPES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type Season = 'Spring' | 'Summer' | 'Autumn' | 'Winter'; + +export type CustomObject = {| + field1: Array, + field2: boolean, + field3: string, + type: 'A_String_Literal', +|}; + +export interface Spec extends TurboModule { + returnStringArray(): Promise>; + returnObjectArray(): Promise>; + returnNullableNumber(): Promise; + returnEmpty(): Promise; + returnUnsupportedIndex(): Promise<{ [string]: 'authorized' | 'denied' | 'undetermined' | true | false }>; + returnSupportedIndex(): Promise<{ [string]: CustomObject }>; + returnEnum() : Promise; + returnObject() : Promise; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +module.exports = { + NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, + NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, + NATIVE_MODULE_WITH_FLOAT_AND_INT32, + NATIVE_MODULE_WITH_ALIASES, + NATIVE_MODULE_WITH_NESTED_ALIASES, + NATIVE_MODULE_WITH_PROMISE, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, + NATIVE_MODULE_WITH_SIMPLE_OBJECT, + NATIVE_MODULE_WITH_UNSAFE_OBJECT, + NATIVE_MODULE_WITH_PARTIALS, + NATIVE_MODULE_WITH_PARTIALS_COMPLEX, + NATIVE_MODULE_WITH_ROOT_TAG, + NATIVE_MODULE_WITH_NULLABLE_PARAM, + NATIVE_MODULE_WITH_BASIC_ARRAY, + NATIVE_MODULE_WITH_COMPLEX_ARRAY, + NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, + NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, + NATIVE_MODULE_WITH_CALLBACK, + NATIVE_MODULE_WITH_UNION, + EMPTY_NATIVE_MODULE, + ANDROID_ONLY_NATIVE_MODULE, + IOS_ONLY_NATIVE_MODULE, + CXX_ONLY_NATIVE_MODULE, + PROMISE_WITH_COMMONLY_USED_TYPES, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow new file mode 100644 index 000000000000..a7a81e017831 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow @@ -0,0 +1,812 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const EMPTY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // no methods +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type String = string; + +export interface Spec extends TurboModule { + // Exported methods. + +getObject: (arg: {|const1: {|const1: boolean|}|}) => {| + const1: {|const1: boolean|}, + |}; + +getReadOnlyObject: (arg: $ReadOnly<{|const1: $ReadOnly<{|const1: boolean|}>|}>) => $ReadOnly<{| + const1: {|const1: boolean|}, + |}>; + +getObject2: (arg: { a: String }) => Object; + +getObjectInArray: (arg: {const1: {|const1: boolean|}}) => Array<{| + const1: {const1: boolean}, + |}>; +} +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getConstants: () => {| + isTesting: boolean, + reactNativeVersion: {| + major: number, + minor: number, + patch?: number, + prerelease: ?number, + |}, + forceTouchAvailable: boolean, + osVersion: string, + systemName: string, + interfaceIdiom: string, + |}; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +passBool?: (arg: boolean) => void; + +passNumber: (arg: number) => void; + +passString: (arg: string) => void; + +passStringish: (arg: Stringish) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_ALIASES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type NumNum = number; +export type Num = (arg: NumNum) => void; +type Num2 = Num; +export type Void = void; +export type A = number; +export type B = number; +export type ObjectAlias = {| + x: number, + y: number, + label: string, + truthy: boolean, +|}; +export type ReadOnlyAlias = $ReadOnly; + +export interface Spec extends TurboModule { + // Exported methods. + +getNumber: Num2; + +getVoid: () => Void; + +getArray: (a: Array) => {| a: B |}; + +getStringFromAlias: (a: ObjectAlias) => string; + +getStringFromNullableAlias: (a: ?ObjectAlias) => string; + +getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; + +getStringFromNullableReadOnlyAlias: (a: ?ReadOnlyAlias) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_NESTED_ALIASES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type Bar = {| + z: number +|}; + +type Foo = {| + bar1: Bar, + bar2: Bar, +|}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; +import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; + +export interface Spec extends TurboModule { + +getInt: (arg: Int32) => Int32; + +getFloat: (arg: Float) => Float; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getObject: (o: Object) => Object, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; +import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; + +export interface Spec extends TurboModule { + +getUnsafeObject: (o: UnsafeObject) => UnsafeObject, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_PARTIALS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type SomeObj = {| + a: string, + b?: boolean, +|}; + +export interface Spec extends TurboModule { + +getSomeObj: () => SomeObj; + +getPartialSomeObj: () => Partial; + +getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type SomeObj = {| + a: string, + b?: boolean, +|}; + +export type PartialSomeObj = Partial; + +export interface Spec extends TurboModule { + +getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_ROOT_TAG = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {RootTag, TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getRootTag: (rootTag: RootTag) => RootTag, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // Exported methods. + +voidFunc: (arg: ?string) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_BASIC_ARRAY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getArray: (arg: Array) => Array; + +getArray: (arg: $ReadOnlyArray) => $ReadOnlyArray; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type DisplayMetricsAndroid = {| + width: number, +|}; + +export interface Spec extends TurboModule { + +getConstants: () => {| + +Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid, + }, + |}; + +getConstants2: () => $ReadOnly<{| + +Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid, + }, + |}>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getArray: (arg: Array<[string, string]>) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type SomeString = string; + +export interface Spec extends TurboModule { + +getArray: (arg: Array) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +getArray: (arg: Array>>>>) => Array>>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_PROMISE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type String = string; +export type SomeObj = {| a: string |}; + +export interface Spec extends TurboModule { + +getValueWithPromise: () => Promise; + +getValueWithPromiseDefinedSomewhereElse: () => Promise; + +getValueWithPromiseObjDefinedSomewhereElse: () => Promise; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_CALLBACK = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // Exported methods. + +getValueWithCallback: ( + callback: (value: string, arr: Array>) => void, + ) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_UNION = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export interface Spec extends TurboModule { + +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const ANDROID_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + // no methods +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModuleAndroid'); + +`; + +const IOS_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export interface Spec extends TurboModule { + getEnums(quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions): string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModuleIOS'); + +`; + +const CXX_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export interface Spec extends TurboModule { + +getCallback: () => () => void; + +getMixed: (arg: mixed) => mixed; + +getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; + +getMap: (arg: {[a: string]: ?number}) => {[b: string]: ?number}; + +getAnotherMap: (arg: {[string]: string}) => {[string]: string}; + +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModuleCxx'); + +`; + +const PROMISE_WITH_COMMONLY_USED_TYPES = ` +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export type Season = 'Spring' | 'Summer' | 'Autumn' | 'Winter'; + +export type CustomObject = {| + field1: Array, + field2: boolean, + field3: string, + type: 'A_String_Literal', +|}; + +export interface Spec extends TurboModule { + returnStringArray(): Promise>; + returnObjectArray(): Promise>; + returnNullableNumber(): Promise; + returnEmpty(): Promise; + returnUnsupportedIndex(): Promise<{ [string]: 'authorized' | 'denied' | 'undetermined' | true | false }>; + returnSupportedIndex(): Promise<{ [string]: CustomObject }>; + returnEnum() : Promise; + returnObject() : Promise; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +module.exports = { + NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, + NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, + NATIVE_MODULE_WITH_FLOAT_AND_INT32, + NATIVE_MODULE_WITH_ALIASES, + NATIVE_MODULE_WITH_NESTED_ALIASES, + NATIVE_MODULE_WITH_PROMISE, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, + NATIVE_MODULE_WITH_SIMPLE_OBJECT, + NATIVE_MODULE_WITH_UNSAFE_OBJECT, + NATIVE_MODULE_WITH_PARTIALS, + NATIVE_MODULE_WITH_PARTIALS_COMPLEX, + NATIVE_MODULE_WITH_ROOT_TAG, + NATIVE_MODULE_WITH_NULLABLE_PARAM, + NATIVE_MODULE_WITH_BASIC_ARRAY, + NATIVE_MODULE_WITH_COMPLEX_ARRAY, + NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, + NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, + NATIVE_MODULE_WITH_CALLBACK, + NATIVE_MODULE_WITH_UNION, + EMPTY_NATIVE_MODULE, + ANDROID_ONLY_NATIVE_MODULE, + IOS_ONLY_NATIVE_MODULE, + CXX_ONLY_NATIVE_MODULE, + PROMISE_WITH_COMMONLY_USED_TYPES, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/modules/index.js b/packages/react-native-codegen/lib/parsers/flow/modules/index.js new file mode 100644 index 000000000000..302a7c350643 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/modules/index.js @@ -0,0 +1,314 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('../../parsers-commons'), + unwrapNullable = _require.unwrapNullable, + wrapNullable = _require.wrapNullable, + assertGenericTypeAnnotationHasExactlyOneTypeParameter = + _require.assertGenericTypeAnnotationHasExactlyOneTypeParameter, + parseObjectProperty = _require.parseObjectProperty; +const _require2 = require('../../parsers-primitives'), + emitArrayType = _require2.emitArrayType, + emitFunction = _require2.emitFunction, + emitDictionary = _require2.emitDictionary, + emitPromise = _require2.emitPromise, + emitRootTag = _require2.emitRootTag, + emitUnion = _require2.emitUnion, + emitCommonTypes = _require2.emitCommonTypes, + typeAliasResolution = _require2.typeAliasResolution, + typeEnumResolution = _require2.typeEnumResolution; +const _require3 = require('../../errors'), + UnsupportedTypeAnnotationParserError = + _require3.UnsupportedTypeAnnotationParserError, + UnsupportedGenericParserError = _require3.UnsupportedGenericParserError; +function translateTypeAnnotation( + hasteModuleName, + /** + * TODO(T71778680): Flow-type this node. + */ + flowTypeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, +) { + const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); + const _resolveTypeAnnotatio = resolveTypeAnnotationFN( + flowTypeAnnotation, + types, + parser, + ), + nullable = _resolveTypeAnnotatio.nullable, + typeAnnotation = _resolveTypeAnnotatio.typeAnnotation, + typeResolutionStatus = _resolveTypeAnnotatio.typeResolutionStatus; + switch (typeAnnotation.type) { + case 'GenericTypeAnnotation': { + switch (parser.getTypeAnnotationName(typeAnnotation)) { + case 'RootTag': { + return emitRootTag(nullable); + } + case 'Promise': { + return emitPromise( + hasteModuleName, + typeAnnotation, + parser, + nullable, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + ); + } + case 'Array': + case '$ReadOnlyArray': { + return emitArrayType( + hasteModuleName, + typeAnnotation, + parser, + types, + aliasMap, + enumMap, + cxxOnly, + nullable, + translateTypeAnnotation, + ); + } + case '$ReadOnly': { + assertGenericTypeAnnotationHasExactlyOneTypeParameter( + hasteModuleName, + typeAnnotation, + parser, + ); + const _unwrapNullable = unwrapNullable( + translateTypeAnnotation( + hasteModuleName, + typeAnnotation.typeParameters.params[0], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + paramType = _unwrapNullable2[0], + isParamNullable = _unwrapNullable2[1]; + return wrapNullable(nullable || isParamNullable, paramType); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + if (!commonType) { + throw new UnsupportedGenericParserError( + hasteModuleName, + typeAnnotation, + parser, + ); + } + return commonType; + } + } + } + case 'ObjectTypeAnnotation': { + // if there is any indexer, then it is a dictionary + if (typeAnnotation.indexers) { + const indexers = typeAnnotation.indexers.filter( + member => member.type === 'ObjectTypeIndexer', + ); + if (indexers.length > 0) { + // check the property type to prevent developers from using unsupported types + // the return value from `translateTypeAnnotation` is unused + const propertyType = indexers[0].value; + const valueType = translateTypeAnnotation( + hasteModuleName, + propertyType, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + // no need to do further checking + return emitDictionary(nullable, valueType); + } + } + const objectTypeAnnotation = { + type: 'ObjectTypeAnnotation', + // $FlowFixMe[missing-type-arg] + properties: [...typeAnnotation.properties, ...typeAnnotation.indexers] + .map(property => { + return tryParse(() => { + return parseObjectProperty( + property, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + translateTypeAnnotation, + parser, + ); + }); + }) + .filter(Boolean), + }; + return typeAliasResolution( + typeResolutionStatus, + objectTypeAnnotation, + aliasMap, + nullable, + ); + } + case 'FunctionTypeAnnotation': { + return emitFunction( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ); + } + case 'UnionTypeAnnotation': { + return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); + } + case 'StringLiteralTypeAnnotation': { + // 'a' is a special case for 'a' | 'b' but the type name is different + return wrapNullable(nullable, { + type: 'UnionTypeAnnotation', + memberType: 'StringTypeAnnotation', + }); + } + case 'EnumStringBody': + case 'EnumNumberBody': { + return typeEnumResolution( + typeAnnotation, + typeResolutionStatus, + nullable, + hasteModuleName, + enumMap, + parser, + ); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + if (!commonType) { + throw new UnsupportedTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + parser.language(), + ); + } + return commonType; + } + } +} +module.exports = { + flowTranslateTypeAnnotation: translateTypeAnnotation, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/modules/index.js.flow b/packages/react-native-codegen/lib/parsers/flow/modules/index.js.flow new file mode 100644 index 000000000000..c50c45f2d699 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/modules/index.js.flow @@ -0,0 +1,267 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + NamedShape, + NativeModuleAliasMap, + NativeModuleEnumMap, + NativeModuleBaseTypeAnnotation, + NativeModuleTypeAnnotation, + Nullable, +} from '../../../CodegenSchema'; + +import type {Parser} from '../../parser'; +import type {ParserErrorCapturer, TypeDeclarationMap} from '../../utils'; + +const { + unwrapNullable, + wrapNullable, + assertGenericTypeAnnotationHasExactlyOneTypeParameter, + parseObjectProperty, +} = require('../../parsers-commons'); +const { + emitArrayType, + emitFunction, + emitDictionary, + emitPromise, + emitRootTag, + emitUnion, + emitCommonTypes, + typeAliasResolution, + typeEnumResolution, +} = require('../../parsers-primitives'); + +const { + UnsupportedTypeAnnotationParserError, + UnsupportedGenericParserError, +} = require('../../errors'); + +function translateTypeAnnotation( + hasteModuleName: string, + /** + * TODO(T71778680): Flow-type this node. + */ + flowTypeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + parser: Parser, +): Nullable { + const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); + const {nullable, typeAnnotation, typeResolutionStatus} = + resolveTypeAnnotationFN(flowTypeAnnotation, types, parser); + + switch (typeAnnotation.type) { + case 'GenericTypeAnnotation': { + switch (parser.getTypeAnnotationName(typeAnnotation)) { + case 'RootTag': { + return emitRootTag(nullable); + } + case 'Promise': { + return emitPromise( + hasteModuleName, + typeAnnotation, + parser, + nullable, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + ); + } + case 'Array': + case '$ReadOnlyArray': { + return emitArrayType( + hasteModuleName, + typeAnnotation, + parser, + types, + aliasMap, + enumMap, + cxxOnly, + nullable, + translateTypeAnnotation, + ); + } + case '$ReadOnly': { + assertGenericTypeAnnotationHasExactlyOneTypeParameter( + hasteModuleName, + typeAnnotation, + parser, + ); + + const [paramType, isParamNullable] = unwrapNullable( + translateTypeAnnotation( + hasteModuleName, + typeAnnotation.typeParameters.params[0], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ); + + return wrapNullable(nullable || isParamNullable, paramType); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + + if (!commonType) { + throw new UnsupportedGenericParserError( + hasteModuleName, + typeAnnotation, + parser, + ); + } + return commonType; + } + } + } + case 'ObjectTypeAnnotation': { + // if there is any indexer, then it is a dictionary + if (typeAnnotation.indexers) { + const indexers = typeAnnotation.indexers.filter( + member => member.type === 'ObjectTypeIndexer', + ); + if (indexers.length > 0) { + // check the property type to prevent developers from using unsupported types + // the return value from `translateTypeAnnotation` is unused + const propertyType = indexers[0].value; + const valueType = translateTypeAnnotation( + hasteModuleName, + propertyType, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + // no need to do further checking + return emitDictionary(nullable, valueType); + } + } + + const objectTypeAnnotation = { + type: 'ObjectTypeAnnotation', + // $FlowFixMe[missing-type-arg] + properties: ([ + ...typeAnnotation.properties, + ...typeAnnotation.indexers, + ]: Array<$FlowFixMe>) + .map>>( + property => { + return tryParse(() => { + return parseObjectProperty( + property, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + translateTypeAnnotation, + parser, + ); + }); + }, + ) + .filter(Boolean), + }; + + return typeAliasResolution( + typeResolutionStatus, + objectTypeAnnotation, + aliasMap, + nullable, + ); + } + case 'FunctionTypeAnnotation': { + return emitFunction( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ); + } + case 'UnionTypeAnnotation': { + return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); + } + case 'StringLiteralTypeAnnotation': { + // 'a' is a special case for 'a' | 'b' but the type name is different + return wrapNullable(nullable, { + type: 'UnionTypeAnnotation', + memberType: 'StringTypeAnnotation', + }); + } + case 'EnumStringBody': + case 'EnumNumberBody': { + return typeEnumResolution( + typeAnnotation, + typeResolutionStatus, + nullable, + hasteModuleName, + enumMap, + parser, + ); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + + if (!commonType) { + throw new UnsupportedTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + parser.language(), + ); + } + return commonType; + } + } +} + +module.exports = { + flowTranslateTypeAnnotation: translateTypeAnnotation, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/parser.d.ts b/packages/react-native-codegen/lib/parsers/flow/parser.d.ts new file mode 100644 index 000000000000..2a60b3683df0 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/parser.d.ts @@ -0,0 +1,17 @@ +/** + * 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. + */ + +import type { Parser } from '../parser'; +import type { SchemaType } from '../../CodegenSchema'; +import type { ParserType } from '../errors'; + +export declare class FlowParser implements Parser { + language(): ParserType; + parseFile(filename: string): SchemaType; + parseString(contents: string, filename?: string): SchemaType; + parseModuleFixture(filename: string): SchemaType; +} diff --git a/packages/react-native-codegen/lib/parsers/flow/parser.js b/packages/react-native-codegen/lib/parsers/flow/parser.js new file mode 100644 index 000000000000..be057b1e90df --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/parser.js @@ -0,0 +1,482 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +const invariant = require('invariant'); +const _require = require('./components/componentsUtils'), + getSchemaInfo = _require.getSchemaInfo, + getTypeAnnotation = _require.getTypeAnnotation, + flattenProperties = _require.flattenProperties; +const _require2 = require('./modules'), + flowTranslateTypeAnnotation = _require2.flowTranslateTypeAnnotation; + +// $FlowFixMe[untyped-import] there's no flowtype flow-parser +const flowParser = require('flow-parser'); +const _require3 = require('../parsers-commons'), + buildSchema = _require3.buildSchema, + buildPropSchema = _require3.buildPropSchema, + buildModuleSchema = _require3.buildModuleSchema, + handleGenericTypeAnnotation = _require3.handleGenericTypeAnnotation; +const _require4 = require('../parsers-primitives'), + Visitor = _require4.Visitor; +const _require5 = require('./components'), + buildComponentSchema = _require5.buildComponentSchema; +const _require6 = require('../schema.js'), + wrapComponentSchema = _require6.wrapComponentSchema; +const fs = require('fs'); +const _require7 = require('../errors'), + UnsupportedObjectPropertyTypeAnnotationParserError = + _require7.UnsupportedObjectPropertyTypeAnnotationParserError; +class FlowParser { + constructor() { + _defineProperty( + this, + 'typeParameterInstantiation', + 'TypeParameterInstantiation', + ); + _defineProperty(this, 'typeAlias', 'TypeAlias'); + _defineProperty(this, 'enumDeclaration', 'EnumDeclaration'); + _defineProperty(this, 'interfaceDeclaration', 'InterfaceDeclaration'); + _defineProperty( + this, + 'nullLiteralTypeAnnotation', + 'NullLiteralTypeAnnotation', + ); + _defineProperty( + this, + 'undefinedLiteralTypeAnnotation', + 'VoidLiteralTypeAnnotation', + ); + } + isProperty(property) { + return property.type === 'ObjectTypeProperty'; + } + getKeyName(property, hasteModuleName) { + if (!this.isProperty(property)) { + throw new UnsupportedObjectPropertyTypeAnnotationParserError( + hasteModuleName, + property, + property.type, + this.language(), + ); + } + return property.key.name; + } + language() { + return 'Flow'; + } + getTypeAnnotationName(typeAnnotation) { + var _typeAnnotation$id; + return typeAnnotation === null || typeAnnotation === void 0 + ? void 0 + : (_typeAnnotation$id = typeAnnotation.id) === null || + _typeAnnotation$id === void 0 + ? void 0 + : _typeAnnotation$id.name; + } + checkIfInvalidModule(typeArguments) { + return ( + typeArguments.type !== 'TypeParameterInstantiation' || + typeArguments.params.length !== 1 || + typeArguments.params[0].type !== 'GenericTypeAnnotation' || + typeArguments.params[0].id.name !== 'Spec' + ); + } + remapUnionTypeAnnotationMemberNames(membersTypes) { + const remapLiteral = item => { + return item.type + .replace('NumberLiteralTypeAnnotation', 'NumberTypeAnnotation') + .replace('StringLiteralTypeAnnotation', 'StringTypeAnnotation'); + }; + return [...new Set(membersTypes.map(remapLiteral))]; + } + parseFile(filename) { + const contents = fs.readFileSync(filename, 'utf8'); + return this.parseString(contents, filename); + } + parseString(contents, filename) { + return buildSchema( + contents, + filename, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + Visitor, + this, + flowTranslateTypeAnnotation, + ); + } + parseModuleFixture(filename) { + const contents = fs.readFileSync(filename, 'utf8'); + return this.parseString(contents, 'path/NativeSampleTurboModule.js'); + } + getAst(contents) { + return flowParser.parse(contents, { + enums: true, + }); + } + getFunctionTypeAnnotationParameters(functionTypeAnnotation) { + return functionTypeAnnotation.params; + } + getFunctionNameFromParameter(parameter) { + return parameter.name; + } + getParameterName(parameter) { + return parameter.name.name; + } + getParameterTypeAnnotation(parameter) { + return parameter.typeAnnotation; + } + getFunctionTypeAnnotationReturnType(functionTypeAnnotation) { + return functionTypeAnnotation.returnType; + } + parseEnumMembersType(typeAnnotation) { + const enumMembersType = + typeAnnotation.type === 'EnumStringBody' + ? 'StringTypeAnnotation' + : typeAnnotation.type === 'EnumNumberBody' + ? 'NumberTypeAnnotation' + : null; + if (!enumMembersType) { + throw new Error( + `Unknown enum type annotation type. Got: ${typeAnnotation.type}. Expected: EnumStringBody or EnumNumberBody.`, + ); + } + return enumMembersType; + } + validateEnumMembersSupported(typeAnnotation, enumMembersType) { + if (!typeAnnotation.members || typeAnnotation.members.length === 0) { + // passing mixed members to flow would result in a flow error + // if the tool is launched ignoring that error, the enum would appear like not having enums + throw new Error( + 'Enums should have at least one member and member values can not be mixed- they all must be either blank, number, or string values.', + ); + } + typeAnnotation.members.forEach(member => { + if ( + enumMembersType === 'StringTypeAnnotation' && + (!member.init || typeof member.init.value === 'string') + ) { + return; + } + if ( + enumMembersType === 'NumberTypeAnnotation' && + member.init && + typeof member.init.value === 'number' + ) { + return; + } + throw new Error( + 'Enums can not be mixed- they all must be either blank, number, or string values.', + ); + }); + } + parseEnumMembers(typeAnnotation) { + return typeAnnotation.members.map(member => { + var _member$init$value, _member$init; + return { + name: member.id.name, + value: + (_member$init$value = + (_member$init = member.init) === null || _member$init === void 0 + ? void 0 + : _member$init.value) !== null && _member$init$value !== void 0 + ? _member$init$value + : member.id.name, + }; + }); + } + isModuleInterface(node) { + return ( + node.type === 'InterfaceDeclaration' && + node.extends.length === 1 && + node.extends[0].type === 'InterfaceExtends' && + node.extends[0].id.name === 'TurboModule' + ); + } + isGenericTypeAnnotation(type) { + return type === 'GenericTypeAnnotation'; + } + extractAnnotatedElement(typeAnnotation, types) { + return types[typeAnnotation.typeParameters.params[0].id.name]; + } + + /** + * This FlowFixMe is supposed to refer to an InterfaceDeclaration or TypeAlias + * declaration type. Unfortunately, we don't have those types, because flow-parser + * generates them, and flow-parser is not type-safe. In the future, we should find + * a way to get these types from our flow parser library. + * + * TODO(T71778680): Flow type AST Nodes + */ + + getTypes(ast) { + return ast.body.reduce((types, node) => { + if ( + node.type === 'ExportNamedDeclaration' && + node.exportKind === 'type' + ) { + if ( + node.declaration != null && + (node.declaration.type === 'TypeAlias' || + node.declaration.type === 'InterfaceDeclaration') + ) { + types[node.declaration.id.name] = node.declaration; + } + } else if ( + node.type === 'ExportNamedDeclaration' && + node.exportKind === 'value' && + node.declaration && + node.declaration.type === 'EnumDeclaration' + ) { + types[node.declaration.id.name] = node.declaration; + } else if ( + node.type === 'TypeAlias' || + node.type === 'InterfaceDeclaration' || + node.type === 'EnumDeclaration' + ) { + types[node.id.name] = node; + } + return types; + }, {}); + } + callExpressionTypeParameters(callExpression) { + return callExpression.typeArguments || null; + } + computePartialProperties( + properties, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + ) { + return properties.map(prop => { + return { + name: prop.key.name, + optional: true, + typeAnnotation: flowTranslateTypeAnnotation( + hasteModuleName, + prop.value, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + this, + ), + }; + }); + } + functionTypeAnnotation(propertyValueType) { + return propertyValueType === 'FunctionTypeAnnotation'; + } + getTypeArgumentParamsFromDeclaration(declaration) { + return declaration.typeArguments.params; + } + + /** + * This FlowFixMe is supposed to refer to typeArgumentParams and + * funcArgumentParams of generated AST. + */ + getNativeComponentType(typeArgumentParams, funcArgumentParams) { + return { + propsTypeName: typeArgumentParams[0].id.name, + componentName: funcArgumentParams[0].value, + }; + } + getAnnotatedElementProperties(annotatedElement) { + return annotatedElement.right.properties; + } + bodyProperties(typeAlias) { + return typeAlias.body.properties; + } + convertKeywordToTypeAnnotation(keyword) { + return keyword; + } + argumentForProp(prop) { + return prop.argument; + } + nameForArgument(prop) { + return prop.argument.id.name; + } + isOptionalProperty(property) { + return ( + property.value.type === 'NullableTypeAnnotation' || property.optional + ); + } + getGetSchemaInfoFN() { + return getSchemaInfo; + } + getTypeAnnotationFromProperty(property) { + return property.value.type === 'NullableTypeAnnotation' + ? property.value.typeAnnotation + : property.value; + } + getGetTypeAnnotationFN() { + return getTypeAnnotation; + } + getResolvedTypeAnnotation(typeAnnotation, types, parser) { + invariant( + typeAnnotation != null, + 'resolveTypeAnnotation(): typeAnnotation cannot be null', + ); + let node = typeAnnotation; + let nullable = false; + let typeResolutionStatus = { + successful: false, + }; + for (;;) { + if (node.type === 'NullableTypeAnnotation') { + nullable = true; + node = node.typeAnnotation; + continue; + } + if (node.type !== 'GenericTypeAnnotation') { + break; + } + const typeAnnotationName = this.getTypeAnnotationName(node); + const resolvedTypeAnnotation = types[typeAnnotationName]; + if (resolvedTypeAnnotation == null) { + break; + } + const _handleGenericTypeAnn = handleGenericTypeAnnotation( + node, + resolvedTypeAnnotation, + this, + ), + typeAnnotationNode = _handleGenericTypeAnn.typeAnnotation, + status = _handleGenericTypeAnn.typeResolutionStatus; + typeResolutionStatus = status; + node = typeAnnotationNode; + } + return { + nullable: nullable, + typeAnnotation: node, + typeResolutionStatus, + }; + } + getResolveTypeAnnotationFN() { + return (typeAnnotation, types, parser) => + this.getResolvedTypeAnnotation(typeAnnotation, types, parser); + } + extendsForProp(prop, types, parser) { + const argument = this.argumentForProp(prop); + if (!argument) { + console.log('null', prop); + } + const name = parser.nameForArgument(prop); + if (types[name] != null) { + // This type is locally defined in the file + return null; + } + switch (name) { + case 'ViewProps': + return { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }; + default: { + throw new Error(`Unable to handle prop spread: ${name}`); + } + } + } + removeKnownExtends(typeDefinition, types) { + return typeDefinition.filter( + prop => + prop.type !== 'ObjectTypeSpreadProperty' || + this.extendsForProp(prop, types, this) === null, + ); + } + getExtendsProps(typeDefinition, types) { + return typeDefinition + .filter(prop => prop.type === 'ObjectTypeSpreadProperty') + .map(prop => this.extendsForProp(prop, types, this)) + .filter(Boolean); + } + getProps(typeDefinition, types) { + const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); + const props = flattenProperties(nonExtendsProps, types, this) + .map(property => buildPropSchema(property, types, this)) + .filter(Boolean); + return { + props, + extendsProps: this.getExtendsProps(typeDefinition, types), + }; + } + getProperties(typeName, types) { + const typeAlias = types[typeName]; + try { + return typeAlias.right.typeParameters.params[0].properties; + } catch (e) { + throw new Error( + `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, + ); + } + } + nextNodeForTypeAlias(typeAnnotation) { + return typeAnnotation.right; + } + nextNodeForEnum(typeAnnotation) { + return typeAnnotation.body; + } + genericTypeAnnotationErrorMessage(typeAnnotation) { + return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; + } + extractTypeFromTypeAnnotation(typeAnnotation) { + return typeAnnotation.type === 'GenericTypeAnnotation' + ? typeAnnotation.id.name + : typeAnnotation.type; + } + getObjectProperties(typeAnnotation) { + return typeAnnotation.properties; + } + getLiteralValue(option) { + return option.value; + } + getPaperTopLevelNameDeprecated(typeAnnotation) { + return typeAnnotation.typeParameters.params.length > 1 + ? typeAnnotation.typeParameters.params[1].value + : null; + } +} +module.exports = { + FlowParser, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/parser.js.flow b/packages/react-native-codegen/lib/parsers/flow/parser.js.flow new file mode 100644 index 000000000000..b0d1f2df2b50 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/parser.js.flow @@ -0,0 +1,560 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + UnionTypeAnnotationMemberType, + SchemaType, + NamedShape, + Nullable, + NativeModuleParamTypeAnnotation, + NativeModuleEnumMemberType, + NativeModuleEnumMembers, + NativeModuleAliasMap, + NativeModuleEnumMap, + PropTypeAnnotation, + ExtendsPropsShape, +} from '../../CodegenSchema'; +import type {ParserType} from '../errors'; +import type { + GetSchemaInfoFN, + GetTypeAnnotationFN, + Parser, + ResolveTypeAnnotationFN, +} from '../parser'; +import type { + ParserErrorCapturer, + TypeDeclarationMap, + PropAST, + TypeResolutionStatus, +} from '../utils'; + +type ExtendsForProp = null | { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', +}; + +const invariant = require('invariant'); + +const { + getSchemaInfo, + getTypeAnnotation, + flattenProperties, +} = require('./components/componentsUtils'); + +const {flowTranslateTypeAnnotation} = require('./modules'); + +// $FlowFixMe[untyped-import] there's no flowtype flow-parser +const flowParser = require('flow-parser'); + +const { + buildSchema, + buildPropSchema, + buildModuleSchema, + handleGenericTypeAnnotation, +} = require('../parsers-commons'); +const {Visitor} = require('../parsers-primitives'); +const {buildComponentSchema} = require('./components'); +const {wrapComponentSchema} = require('../schema.js'); + +const fs = require('fs'); + +const { + UnsupportedObjectPropertyTypeAnnotationParserError, +} = require('../errors'); + +class FlowParser implements Parser { + typeParameterInstantiation: string = 'TypeParameterInstantiation'; + typeAlias: string = 'TypeAlias'; + enumDeclaration: string = 'EnumDeclaration'; + interfaceDeclaration: string = 'InterfaceDeclaration'; + nullLiteralTypeAnnotation: string = 'NullLiteralTypeAnnotation'; + undefinedLiteralTypeAnnotation: string = 'VoidLiteralTypeAnnotation'; + + isProperty(property: $FlowFixMe): boolean { + return property.type === 'ObjectTypeProperty'; + } + + getKeyName(property: $FlowFixMe, hasteModuleName: string): string { + if (!this.isProperty(property)) { + throw new UnsupportedObjectPropertyTypeAnnotationParserError( + hasteModuleName, + property, + property.type, + this.language(), + ); + } + return property.key.name; + } + + language(): ParserType { + return 'Flow'; + } + + getTypeAnnotationName(typeAnnotation: $FlowFixMe): string { + return typeAnnotation?.id?.name; + } + + checkIfInvalidModule(typeArguments: $FlowFixMe): boolean { + return ( + typeArguments.type !== 'TypeParameterInstantiation' || + typeArguments.params.length !== 1 || + typeArguments.params[0].type !== 'GenericTypeAnnotation' || + typeArguments.params[0].id.name !== 'Spec' + ); + } + + remapUnionTypeAnnotationMemberNames( + membersTypes: $FlowFixMe[], + ): UnionTypeAnnotationMemberType[] { + const remapLiteral = (item: $FlowFixMe) => { + return item.type + .replace('NumberLiteralTypeAnnotation', 'NumberTypeAnnotation') + .replace('StringLiteralTypeAnnotation', 'StringTypeAnnotation'); + }; + + return [...new Set(membersTypes.map(remapLiteral))]; + } + + parseFile(filename: string): SchemaType { + const contents = fs.readFileSync(filename, 'utf8'); + + return this.parseString(contents, filename); + } + + parseString(contents: string, filename: ?string): SchemaType { + return buildSchema( + contents, + filename, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + Visitor, + this, + flowTranslateTypeAnnotation, + ); + } + + parseModuleFixture(filename: string): SchemaType { + const contents = fs.readFileSync(filename, 'utf8'); + + return this.parseString(contents, 'path/NativeSampleTurboModule.js'); + } + + getAst(contents: string): $FlowFixMe { + return flowParser.parse(contents, { + enums: true, + }); + } + + getFunctionTypeAnnotationParameters( + functionTypeAnnotation: $FlowFixMe, + ): $ReadOnlyArray<$FlowFixMe> { + return functionTypeAnnotation.params; + } + + getFunctionNameFromParameter( + parameter: NamedShape>, + ): $FlowFixMe { + return parameter.name; + } + + getParameterName(parameter: $FlowFixMe): string { + return parameter.name.name; + } + + getParameterTypeAnnotation(parameter: $FlowFixMe): $FlowFixMe { + return parameter.typeAnnotation; + } + + getFunctionTypeAnnotationReturnType( + functionTypeAnnotation: $FlowFixMe, + ): $FlowFixMe { + return functionTypeAnnotation.returnType; + } + + parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType { + const enumMembersType: ?NativeModuleEnumMemberType = + typeAnnotation.type === 'EnumStringBody' + ? 'StringTypeAnnotation' + : typeAnnotation.type === 'EnumNumberBody' + ? 'NumberTypeAnnotation' + : null; + if (!enumMembersType) { + throw new Error( + `Unknown enum type annotation type. Got: ${typeAnnotation.type}. Expected: EnumStringBody or EnumNumberBody.`, + ); + } + return enumMembersType; + } + + validateEnumMembersSupported( + typeAnnotation: $FlowFixMe, + enumMembersType: NativeModuleEnumMemberType, + ): void { + if (!typeAnnotation.members || typeAnnotation.members.length === 0) { + // passing mixed members to flow would result in a flow error + // if the tool is launched ignoring that error, the enum would appear like not having enums + throw new Error( + 'Enums should have at least one member and member values can not be mixed- they all must be either blank, number, or string values.', + ); + } + + typeAnnotation.members.forEach(member => { + if ( + enumMembersType === 'StringTypeAnnotation' && + (!member.init || typeof member.init.value === 'string') + ) { + return; + } + + if ( + enumMembersType === 'NumberTypeAnnotation' && + member.init && + typeof member.init.value === 'number' + ) { + return; + } + + throw new Error( + 'Enums can not be mixed- they all must be either blank, number, or string values.', + ); + }); + } + + parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers { + return typeAnnotation.members.map(member => ({ + name: member.id.name, + value: member.init?.value ?? member.id.name, + })); + } + + isModuleInterface(node: $FlowFixMe): boolean { + return ( + node.type === 'InterfaceDeclaration' && + node.extends.length === 1 && + node.extends[0].type === 'InterfaceExtends' && + node.extends[0].id.name === 'TurboModule' + ); + } + + isGenericTypeAnnotation(type: $FlowFixMe): boolean { + return type === 'GenericTypeAnnotation'; + } + + extractAnnotatedElement( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + ): $FlowFixMe { + return types[typeAnnotation.typeParameters.params[0].id.name]; + } + + /** + * This FlowFixMe is supposed to refer to an InterfaceDeclaration or TypeAlias + * declaration type. Unfortunately, we don't have those types, because flow-parser + * generates them, and flow-parser is not type-safe. In the future, we should find + * a way to get these types from our flow parser library. + * + * TODO(T71778680): Flow type AST Nodes + */ + + getTypes(ast: $FlowFixMe): TypeDeclarationMap { + return ast.body.reduce((types, node) => { + if ( + node.type === 'ExportNamedDeclaration' && + node.exportKind === 'type' + ) { + if ( + node.declaration != null && + (node.declaration.type === 'TypeAlias' || + node.declaration.type === 'InterfaceDeclaration') + ) { + types[node.declaration.id.name] = node.declaration; + } + } else if ( + node.type === 'ExportNamedDeclaration' && + node.exportKind === 'value' && + node.declaration && + node.declaration.type === 'EnumDeclaration' + ) { + types[node.declaration.id.name] = node.declaration; + } else if ( + node.type === 'TypeAlias' || + node.type === 'InterfaceDeclaration' || + node.type === 'EnumDeclaration' + ) { + types[node.id.name] = node; + } + return types; + }, {}); + } + + callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null { + return callExpression.typeArguments || null; + } + + computePartialProperties( + properties: Array<$FlowFixMe>, + hasteModuleName: string, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + ): Array<$FlowFixMe> { + return properties.map(prop => { + return { + name: prop.key.name, + optional: true, + typeAnnotation: flowTranslateTypeAnnotation( + hasteModuleName, + prop.value, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + this, + ), + }; + }); + } + + functionTypeAnnotation(propertyValueType: string): boolean { + return propertyValueType === 'FunctionTypeAnnotation'; + } + + getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe { + return declaration.typeArguments.params; + } + + /** + * This FlowFixMe is supposed to refer to typeArgumentParams and + * funcArgumentParams of generated AST. + */ + getNativeComponentType( + typeArgumentParams: $FlowFixMe, + funcArgumentParams: $FlowFixMe, + ): {[string]: string} { + return { + propsTypeName: typeArgumentParams[0].id.name, + componentName: funcArgumentParams[0].value, + }; + } + + getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe { + return annotatedElement.right.properties; + } + + bodyProperties(typeAlias: $FlowFixMe): $ReadOnlyArray<$FlowFixMe> { + return typeAlias.body.properties; + } + + convertKeywordToTypeAnnotation(keyword: string): string { + return keyword; + } + + argumentForProp(prop: PropAST): $FlowFixMe { + return prop.argument; + } + + nameForArgument(prop: PropAST): $FlowFixMe { + return prop.argument.id.name; + } + + isOptionalProperty(property: $FlowFixMe): boolean { + return ( + property.value.type === 'NullableTypeAnnotation' || property.optional + ); + } + + getGetSchemaInfoFN(): GetSchemaInfoFN { + return getSchemaInfo; + } + + getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe { + return property.value.type === 'NullableTypeAnnotation' + ? property.value.typeAnnotation + : property.value; + } + + getGetTypeAnnotationFN(): GetTypeAnnotationFN { + return getTypeAnnotation; + } + + getResolvedTypeAnnotation( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + parser: Parser, + ): { + nullable: boolean, + typeAnnotation: $FlowFixMe, + typeResolutionStatus: TypeResolutionStatus, + } { + invariant( + typeAnnotation != null, + 'resolveTypeAnnotation(): typeAnnotation cannot be null', + ); + + let node = typeAnnotation; + let nullable = false; + let typeResolutionStatus: TypeResolutionStatus = { + successful: false, + }; + + for (;;) { + if (node.type === 'NullableTypeAnnotation') { + nullable = true; + node = node.typeAnnotation; + continue; + } + + if (node.type !== 'GenericTypeAnnotation') { + break; + } + + const typeAnnotationName = this.getTypeAnnotationName(node); + const resolvedTypeAnnotation = types[typeAnnotationName]; + if (resolvedTypeAnnotation == null) { + break; + } + + const {typeAnnotation: typeAnnotationNode, typeResolutionStatus: status} = + handleGenericTypeAnnotation(node, resolvedTypeAnnotation, this); + typeResolutionStatus = status; + node = typeAnnotationNode; + } + + return { + nullable: nullable, + typeAnnotation: node, + typeResolutionStatus, + }; + } + + getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN { + return (typeAnnotation, types, parser) => + this.getResolvedTypeAnnotation(typeAnnotation, types, parser); + } + extendsForProp( + prop: PropAST, + types: TypeDeclarationMap, + parser: Parser, + ): ExtendsForProp { + const argument = this.argumentForProp(prop); + if (!argument) { + console.log('null', prop); + } + const name = parser.nameForArgument(prop); + + if (types[name] != null) { + // This type is locally defined in the file + return null; + } + + switch (name) { + case 'ViewProps': + return { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }; + default: { + throw new Error(`Unable to handle prop spread: ${name}`); + } + } + } + + removeKnownExtends( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): $ReadOnlyArray { + return typeDefinition.filter( + prop => + prop.type !== 'ObjectTypeSpreadProperty' || + this.extendsForProp(prop, types, this) === null, + ); + } + + getExtendsProps( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): $ReadOnlyArray { + return typeDefinition + .filter(prop => prop.type === 'ObjectTypeSpreadProperty') + .map(prop => this.extendsForProp(prop, types, this)) + .filter(Boolean); + } + + getProps( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): { + props: $ReadOnlyArray>, + extendsProps: $ReadOnlyArray, + } { + const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); + const props = flattenProperties(nonExtendsProps, types, this) + .map(property => buildPropSchema(property, types, this)) + .filter(Boolean); + + return { + props, + extendsProps: this.getExtendsProps(typeDefinition, types), + }; + } + + getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe { + const typeAlias = types[typeName]; + try { + return typeAlias.right.typeParameters.params[0].properties; + } catch (e) { + throw new Error( + `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, + ); + } + } + + nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.right; + } + + nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.body; + } + + genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string { + return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; + } + + extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string { + return typeAnnotation.type === 'GenericTypeAnnotation' + ? typeAnnotation.id.name + : typeAnnotation.type; + } + + getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.properties; + } + + getLiteralValue(option: $FlowFixMe): $FlowFixMe { + return option.value; + } + + getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.typeParameters.params.length > 1 + ? typeAnnotation.typeParameters.params[1].value + : null; + } +} + +module.exports = { + FlowParser, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/utils.js b/packages/react-native-codegen/lib/parsers/flow/utils.js new file mode 100644 index 000000000000..31446ab11182 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/utils.js @@ -0,0 +1,21 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function getValueFromTypes(value, types) { + if (value.type === 'GenericTypeAnnotation' && types[value.id.name]) { + return getValueFromTypes(types[value.id.name].right, types); + } + return value; +} +module.exports = { + getValueFromTypes, +}; diff --git a/packages/react-native-codegen/lib/parsers/flow/utils.js.flow b/packages/react-native-codegen/lib/parsers/flow/utils.js.flow new file mode 100644 index 000000000000..73e71760df44 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/flow/utils.js.flow @@ -0,0 +1,24 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {TypeDeclarationMap, ASTNode} from '../utils'; + +function getValueFromTypes(value: ASTNode, types: TypeDeclarationMap): ASTNode { + if (value.type === 'GenericTypeAnnotation' && types[value.id.name]) { + return getValueFromTypes(types[value.id.name].right, types); + } + return value; +} + +module.exports = { + getValueFromTypes, +}; diff --git a/packages/react-native-codegen/lib/parsers/parser.d.ts b/packages/react-native-codegen/lib/parsers/parser.d.ts new file mode 100644 index 000000000000..ae6017a31832 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parser.d.ts @@ -0,0 +1,17 @@ +/** + * 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. + */ + +import type { SchemaType } from '../CodegenSchema'; +import type { ParserType } from './errors'; + +// useful members only for downstream +export interface Parser { + language(): ParserType; + parseFile(filename: string): SchemaType; + parseString(contents: string, filename?: string): SchemaType; + parseModuleFixture(filename: string): SchemaType; +} diff --git a/packages/react-native-codegen/lib/parsers/parser.js b/packages/react-native-codegen/lib/parsers/parser.js new file mode 100644 index 000000000000..4949d716cda2 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parser.js @@ -0,0 +1,11 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; diff --git a/packages/react-native-codegen/lib/parsers/parser.js.flow b/packages/react-native-codegen/lib/parsers/parser.js.flow new file mode 100644 index 000000000000..7835107642da --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parser.js.flow @@ -0,0 +1,431 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + UnionTypeAnnotationMemberType, + SchemaType, + NamedShape, + Nullable, + NativeModuleParamTypeAnnotation, + NativeModuleEnumMemberType, + NativeModuleEnumMembers, + NativeModuleAliasMap, + NativeModuleEnumMap, + PropTypeAnnotation, + ExtendsPropsShape, +} from '../CodegenSchema'; +import type {ParserType} from './errors'; +import type { + ParserErrorCapturer, + TypeDeclarationMap, + PropAST, + ASTNode, + TypeResolutionStatus, +} from './utils'; + +export type GetTypeAnnotationFN = ( + name: string, + annotation: $FlowFixMe | ASTNode, + defaultValue: $FlowFixMe | void, + withNullDefault: boolean, + types: TypeDeclarationMap, + parser: Parser, + buildSchema: ( + property: PropAST, + types: TypeDeclarationMap, + parser: Parser, + ) => $FlowFixMe, +) => $FlowFixMe; + +export type SchemaInfo = { + name: string, + optional: boolean, + typeAnnotation: $FlowFixMe, + defaultValue: $FlowFixMe, + withNullDefault: boolean, +}; + +export type GetSchemaInfoFN = ( + property: PropAST, + types: TypeDeclarationMap, +) => ?SchemaInfo; + +export type BuildSchemaFN = ( + property: PropAST, + types: TypeDeclarationMap, + parser: Parser, +) => ?NamedShape; + +export type ResolveTypeAnnotationFN = ( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + parser: Parser, +) => { + nullable: boolean, + typeAnnotation: $FlowFixMe, + typeResolutionStatus: TypeResolutionStatus, +}; + +/** + * This is the main interface for Parsers of various languages. + * It exposes all the methods that contain language-specific logic. + */ +export interface Parser { + /** + * This is the TypeParameterInstantiation value + */ + typeParameterInstantiation: string; + + /** + * TypeAlias property of the Parser + */ + typeAlias: string; + + /** + * enumDeclaration Property of the Parser + */ + enumDeclaration: string; + + /** + * InterfaceDeclaration property of the Parser + */ + interfaceDeclaration: string; + + /** + * This is the NullLiteralTypeAnnotation value + */ + nullLiteralTypeAnnotation: string; + + /** + * UndefinedLiteralTypeAnnotation property of the Parser + */ + undefinedLiteralTypeAnnotation: string; + + /** + * Given a declaration, it returns true if it is a property + */ + isProperty(property: $FlowFixMe): boolean; + /** + * Given a property declaration, it returns the key name. + * @parameter property: an object containing a property declaration. + * @parameter hasteModuleName: a string with the native module name. + * @returns: the key name. + * @throws if property does not contain a property declaration. + */ + getKeyName(property: $FlowFixMe, hasteModuleName: string): string; + /** + * @returns: the Parser language. + */ + language(): ParserType; + /** + * Given a type annotation, it returns the type name. + * @parameter typeAnnotation: the annotation for a type in the AST. + * @returns: the name of the type. + */ + getTypeAnnotationName(typeAnnotation: $FlowFixMe): string; + /** + * Given a type arguments, it returns a boolean specifying if the Module is Invalid. + * @parameter typeArguments: the type arguments. + * @returns: a boolean specifying if the Module is Invalid. + */ + checkIfInvalidModule(typeArguments: $FlowFixMe): boolean; + /** + * Given a union annotation members types, it returns an array of remaped members names without duplicates. + * @parameter membersTypes: union annotation members types + * @returns: an array of remaped members names without duplicates. + */ + remapUnionTypeAnnotationMemberNames( + types: $FlowFixMe, + ): UnionTypeAnnotationMemberType[]; + /** + * Given the name of a file, it returns a Schema. + * @parameter filename: the name of the file. + * @returns: the Schema of the file. + */ + parseFile(filename: string): SchemaType; + /** + * Given the content of a file, it returns a Schema. + * @parameter contents: the content of the file. + * @parameter filename: the name of the file. + * @returns: the Schema of the file. + */ + parseString(contents: string, filename: ?string): SchemaType; + /** + * Given the name of a file, it returns a Schema. + * @parameter filename: the name of the file. + * @returns: the Schema of the file. + */ + parseModuleFixture(filename: string): SchemaType; + + /** + * Given the content of a file, it returns an AST. + * @parameter contents: the content of the file. + * @returns: the AST of the file. + */ + getAst(contents: string): $FlowFixMe; + + /** + * Given a FunctionTypeAnnotation, it returns an array of its parameters. + * @parameter functionTypeAnnotation: a FunctionTypeAnnotation + * @returns: the parameters of the FunctionTypeAnnotation. + */ + getFunctionTypeAnnotationParameters( + functionTypeAnnotation: $FlowFixMe, + ): $ReadOnlyArray<$FlowFixMe>; + + /** + * Given a parameter, it returns the function name of the parameter. + * @parameter parameter: a parameter of a FunctionTypeAnnotation. + * @returns: the function name of the parameter. + */ + getFunctionNameFromParameter( + parameter: NamedShape>, + ): $FlowFixMe; + + /** + * Given a parameter, it returns its name. + * @parameter parameter: a parameter of a FunctionTypeAnnotation. + * @returns: the name of the parameter. + */ + getParameterName(parameter: $FlowFixMe): string; + + /** + * Given a parameter, it returns its typeAnnotation. + * @parameter parameter: a parameter of a FunctionTypeAnnotation. + * @returns: the typeAnnotation of the parameter. + */ + getParameterTypeAnnotation(param: $FlowFixMe): $FlowFixMe; + + /** + * Given a FunctionTypeAnnotation, it returns its returnType. + * @parameter functionTypeAnnotation: a FunctionTypeAnnotation + * @returns: the returnType of the FunctionTypeAnnotation. + */ + getFunctionTypeAnnotationReturnType( + functionTypeAnnotation: $FlowFixMe, + ): $FlowFixMe; + + /** + * Calculates an enum's members type + */ + parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType; + + /** + * Throws if enum mebers are not supported + */ + validateEnumMembersSupported( + typeAnnotation: $FlowFixMe, + enumMembersType: NativeModuleEnumMemberType, + ): void; + + /** + * Calculates enum's members + */ + parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers; + + /** + * Given a node, it returns true if it is a module interface + */ + isModuleInterface(node: $FlowFixMe): boolean; + + /** + * Given a type name, it returns true if it is a generic type annotation + */ + isGenericTypeAnnotation(type: $FlowFixMe): boolean; + + /** + * Given a typeAnnotation, it returns the annotated element. + * @parameter typeAnnotation: the annotation for a type. + * @parameter types: a map of type declarations. + * @returns: the annotated element. + */ + extractAnnotatedElement( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + ): $FlowFixMe; + + /** + * Given the AST, returns the TypeDeclarationMap + */ + getTypes(ast: $FlowFixMe): TypeDeclarationMap; + + /** + * Given a callExpression, it returns the typeParameters of the callExpression. + * @parameter callExpression: the callExpression. + * @returns: the typeParameters of the callExpression or null if it does not exist. + */ + callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null; + + /** + * Given an array of properties from a Partial type, it returns an array of remaped properties. + * @parameter properties: properties from a Partial types. + * @parameter hasteModuleName: a string with the native module name. + * @parameter types: a map of type declarations. + * @parameter aliasMap: a map of type aliases. + * @parameter enumMap: a map of type enums. + * @parameter tryParse: a parser error capturer. + * @parameter cxxOnly: a boolean specifying if the module is Cxx only. + * @returns: an array of remaped properties + */ + computePartialProperties( + properties: Array<$FlowFixMe>, + hasteModuleName: string, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + ): Array<$FlowFixMe>; + + /** + * Given a propertyValueType, it returns a boolean specifying if the property is a function type annotation. + * @parameter propertyValueType: the propertyValueType. + * @returns: a boolean specifying if the property is a function type annotation. + */ + functionTypeAnnotation(propertyValueType: string): boolean; + + /** + * Given a declaration, it returns the typeArgumentParams of the declaration. + * @parameter declaration: the declaration. + * @returns: the typeArgumentParams of the declaration. + */ + getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe; + + /** + * Given a typeArgumentParams and funcArgumentParams it returns a native component type. + * @parameter typeArgumentParams: the typeArgumentParams. + * @parameter funcArgumentParams: the funcArgumentParams. + * @returns: a native component type. + */ + getNativeComponentType( + typeArgumentParams: $FlowFixMe, + funcArgumentParams: $FlowFixMe, + ): {[string]: string}; + + /** + * Given a annotatedElement, it returns the properties of annotated element. + * @parameter annotatedElement: the annotated element. + * @returns: the properties of annotated element. + */ + getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe; + + /** + * Given a typeAlias, it returns an array of properties. + * @parameter typeAlias: the type alias. + * @returns: an array of properties. + */ + bodyProperties(typeAlias: $FlowFixMe): $ReadOnlyArray<$FlowFixMe>; + + /** + * Given a keyword convert it to TypeAnnotation. + * @parameter keyword + * @returns: converted TypeAnnotation to Keywords + */ + convertKeywordToTypeAnnotation(keyword: string): string; + + /** + * Given a prop return its arguments. + * @parameter prop + * @returns: Arguments of the prop + */ + argumentForProp(prop: PropAST): $FlowFixMe; + + /** + * Given a prop return its name. + * @parameter prop + * @returns: name property + */ + nameForArgument(prop: PropAST): $FlowFixMe; + + /** + * Given a property return if it is optional. + * @parameter property + * @returns: a boolean specifying if the Property is optional + */ + isOptionalProperty(property: $FlowFixMe): boolean; + + getGetTypeAnnotationFN(): GetTypeAnnotationFN; + + getGetSchemaInfoFN(): GetSchemaInfoFN; + + /** + * Given a property return the type annotation. + * @parameter property + * @returns: the annotation for a type in the AST. + */ + getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe; + + getResolvedTypeAnnotation( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + parser: Parser, + ): { + nullable: boolean, + typeAnnotation: $FlowFixMe, + typeResolutionStatus: TypeResolutionStatus, + }; + + getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN; + + getProps( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): { + props: $ReadOnlyArray>, + extendsProps: $ReadOnlyArray, + }; + + getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe; + + /** + * Given a typeAlias, it returns the next node. + */ + nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe; + + /** + * Given an enum Declaration, it returns the next node. + */ + nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe; + + /** + * Given a unsupported typeAnnotation, returns an error message. + */ + genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string; + + /** + * Given a type annotation, it extracts the type. + * @parameter typeAnnotation: the annotation for a type in the AST. + * @returns: the extracted type. + */ + extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string; + + /** + * Given a typeAnnotation return the properties of an object. + * @parameter property + * @returns: the properties of an object represented by a type annotation. + */ + getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe; + + /** + * Given a option return the literal value. + * @parameter option + * @returns: the literal value of an union represented. + */ + getLiteralValue(option: $FlowFixMe): $FlowFixMe; + + /** + * Given a type annotation, it returns top level name in the AST if it exists else returns null. + * @parameter typeAnnotation: the annotation for a type in the AST. + * @returns: the top level name properties in the AST if it exists else null. + */ + getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe; +} diff --git a/packages/react-native-codegen/lib/parsers/parserMock.js b/packages/react-native-codegen/lib/parsers/parserMock.js new file mode 100644 index 000000000000..b81ea5a18602 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parserMock.js @@ -0,0 +1,418 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +import invariant from 'invariant'; +const _require = require('./typescript/components/componentsUtils'), + flattenProperties = _require.flattenProperties; +const _require2 = require('./parsers-commons'), + buildPropSchema = _require2.buildPropSchema; + +// $FlowFixMe[untyped-import] there's no flowtype flow-parser +const flowParser = require('flow-parser'); +const _require3 = require('./errors'), + UnsupportedObjectPropertyTypeAnnotationParserError = + _require3.UnsupportedObjectPropertyTypeAnnotationParserError; +const schemaMock = { + modules: { + StringPropNativeComponentView: { + type: 'Component', + components: { + StringPropNativeComponentView: { + extendsProps: [], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; +export class MockedParser { + constructor() { + _defineProperty( + this, + 'typeParameterInstantiation', + 'TypeParameterInstantiation', + ); + _defineProperty(this, 'typeAlias', 'TypeAlias'); + _defineProperty(this, 'enumDeclaration', 'EnumDeclaration'); + _defineProperty(this, 'interfaceDeclaration', 'InterfaceDeclaration'); + _defineProperty( + this, + 'nullLiteralTypeAnnotation', + 'NullLiteralTypeAnnotation', + ); + _defineProperty( + this, + 'undefinedLiteralTypeAnnotation', + 'VoidLiteralTypeAnnotation', + ); + } + isProperty(property) { + return property.type === 'ObjectTypeProperty'; + } + getKeyName(property, hasteModuleName) { + if (!this.isProperty(property)) { + throw new UnsupportedObjectPropertyTypeAnnotationParserError( + hasteModuleName, + property, + property.type, + this.language(), + ); + } + return property.key.name; + } + language() { + return 'Flow'; + } + getTypeAnnotationName(typeAnnotation) { + var _typeAnnotation$id; + return typeAnnotation === null || typeAnnotation === void 0 + ? void 0 + : (_typeAnnotation$id = typeAnnotation.id) === null || + _typeAnnotation$id === void 0 + ? void 0 + : _typeAnnotation$id.name; + } + checkIfInvalidModule(typeArguments) { + return false; + } + remapUnionTypeAnnotationMemberNames(membersTypes) { + return []; + } + parseFile(filename) { + return schemaMock; + } + parseString(contents, filename) { + return schemaMock; + } + parseModuleFixture(filename) { + return schemaMock; + } + getAst(contents) { + return flowParser.parse(contents, { + enums: true, + }); + } + getFunctionTypeAnnotationParameters(functionTypeAnnotation) { + return functionTypeAnnotation.params; + } + getFunctionNameFromParameter(parameter) { + return parameter.name; + } + getParameterName(parameter) { + return parameter.name.name; + } + getParameterTypeAnnotation(parameter) { + return parameter.typeAnnotation; + } + getFunctionTypeAnnotationReturnType(functionTypeAnnotation) { + return functionTypeAnnotation.returnType; + } + parseEnumMembersType(typeAnnotation) { + return typeAnnotation.type; + } + validateEnumMembersSupported(typeAnnotation, enumMembersType) { + return; + } + parseEnumMembers(typeAnnotation) { + return typeAnnotation.type === 'StringTypeAnnotation' + ? [ + { + name: 'Hello', + value: 'hello', + }, + { + name: 'Goodbye', + value: 'goodbye', + }, + ] + : [ + { + name: 'On', + value: '1', + }, + { + name: 'Off', + value: '0', + }, + ]; + } + isModuleInterface(node) { + return ( + node.type === 'InterfaceDeclaration' && + node.extends.length === 1 && + node.extends[0].type === 'InterfaceExtends' && + node.extends[0].id.name === 'TurboModule' + ); + } + isGenericTypeAnnotation(type) { + return true; + } + extractAnnotatedElement(typeAnnotation, types) { + return types[typeAnnotation.typeParameters.params[0].id.name]; + } + getTypes(ast) { + return {}; + } + callExpressionTypeParameters(callExpression) { + return callExpression.typeArguments || null; + } + computePartialProperties( + properties, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + ) { + return [ + { + name: 'a', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'b', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ]; + } + functionTypeAnnotation(propertyValueType) { + return propertyValueType === 'FunctionTypeAnnotation'; + } + getTypeArgumentParamsFromDeclaration(declaration) { + return declaration.typeArguments.params; + } + getNativeComponentType(typeArgumentParams, funcArgumentParams) { + return { + propsTypeName: typeArgumentParams[0].id.name, + componentName: funcArgumentParams[0].value, + }; + } + getAnnotatedElementProperties(annotatedElement) { + return annotatedElement.right.properties; + } + bodyProperties(typeAlias) { + return typeAlias.body.properties; + } + convertKeywordToTypeAnnotation(keyword) { + return keyword; + } + argumentForProp(prop) { + return prop.expression; + } + nameForArgument(prop) { + return prop.expression.name; + } + isOptionalProperty(property) { + return property.optional || false; + } + getTypeAnnotationFromProperty(property) { + return property.typeAnnotation.typeAnnotation; + } + getGetTypeAnnotationFN() { + return () => { + return {}; + }; + } + getGetSchemaInfoFN() { + return () => { + return { + name: 'MockedSchema', + optional: false, + typeAnnotation: 'BooleanTypeAnnotation', + defaultValue: false, + withNullDefault: false, + }; + }; + } + getResolveTypeAnnotationFN() { + return () => { + return { + nullable: false, + typeAnnotation: null, + typeResolutionStatus: { + successful: false, + }, + }; + }; + } + getResolvedTypeAnnotation(typeAnnotation, types) { + invariant( + typeAnnotation != null, + 'resolveTypeAnnotation(): typeAnnotation cannot be null', + ); + let node = typeAnnotation; + let nullable = false; + let typeResolutionStatus = { + successful: false, + }; + for (;;) { + if (node.type === 'NullableTypeAnnotation') { + nullable = true; + node = node.typeAnnotation; + continue; + } + if (node.type !== 'GenericTypeAnnotation') { + break; + } + const resolvedTypeAnnotation = types[node.id.name]; + if (resolvedTypeAnnotation == null) { + break; + } + switch (resolvedTypeAnnotation.type) { + case 'TypeAlias': { + typeResolutionStatus = { + successful: true, + type: 'alias', + name: node.id.name, + }; + node = resolvedTypeAnnotation.right; + break; + } + case 'EnumDeclaration': { + typeResolutionStatus = { + successful: true, + type: 'enum', + name: node.id.name, + }; + node = resolvedTypeAnnotation.body; + break; + } + default: { + throw new TypeError( + `A non GenericTypeAnnotation must be a type declaration ('TypeAlias') or enum ('EnumDeclaration'). Instead, got the unsupported ${resolvedTypeAnnotation.type}.`, + ); + } + } + } + return { + nullable: nullable, + typeAnnotation: node, + typeResolutionStatus, + }; + } + getExtendsProps(typeDefinition, types) { + return typeDefinition + .filter(prop => prop.type === 'ObjectTypeSpreadProperty') + .map(prop => this.extendsForProp(prop, types, this)) + .filter(Boolean); + } + extendsForProp(prop, types, parser) { + const argument = this.argumentForProp(prop); + if (!argument) { + console.log('null', prop); + } + const name = parser.nameForArgument(prop); + if (types[name] != null) { + // This type is locally defined in the file + return null; + } + switch (name) { + case 'ViewProps': + return { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }; + default: { + throw new Error(`Unable to handle prop spread: ${name}`); + } + } + } + removeKnownExtends(typeDefinition, types) { + return typeDefinition.filter( + prop => + prop.type !== 'ObjectTypeSpreadProperty' || + this.extendsForProp(prop, types, this) === null, + ); + } + getProps(typeDefinition, types) { + const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); + const props = flattenProperties(nonExtendsProps, types, this) + .map(property => buildPropSchema(property, types, this)) + .filter(Boolean); + return { + props, + extendsProps: this.getExtendsProps(typeDefinition, types), + }; + } + getProperties(typeName, types) { + const typeAlias = types[typeName]; + try { + return typeAlias.right.typeParameters.params[0].properties; + } catch (e) { + throw new Error( + `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, + ); + } + } + nextNodeForTypeAlias(typeAnnotation) { + return typeAnnotation.right; + } + nextNodeForEnum(typeAnnotation) { + return typeAnnotation.body; + } + genericTypeAnnotationErrorMessage(typeAnnotation) { + return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; + } + extractTypeFromTypeAnnotation(typeAnnotation) { + return typeAnnotation.type === 'GenericTypeAnnotation' + ? typeAnnotation.id.name + : typeAnnotation.type; + } + getObjectProperties(typeAnnotation) { + return typeAnnotation.properties; + } + getLiteralValue(option) { + return option.value; + } + getPaperTopLevelNameDeprecated(typeAnnotation) { + return typeAnnotation.typeParameters.params.length > 1 + ? typeAnnotation.typeParameters.params[1].value + : null; + } +} diff --git a/packages/react-native-codegen/lib/parsers/parserMock.js.flow b/packages/react-native-codegen/lib/parsers/parserMock.js.flow new file mode 100644 index 000000000000..1a775b3079cb --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parserMock.js.flow @@ -0,0 +1,495 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + GetSchemaInfoFN, + GetTypeAnnotationFN, + Parser, + ResolveTypeAnnotationFN, +} from './parser'; +import type {ParserType} from './errors'; +type ExtendsForProp = null | { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', +}; +import type { + UnionTypeAnnotationMemberType, + SchemaType, + NamedShape, + Nullable, + NativeModuleParamTypeAnnotation, + NativeModuleEnumMemberType, + NativeModuleEnumMembers, + NativeModuleAliasMap, + NativeModuleEnumMap, + PropTypeAnnotation, + ExtendsPropsShape, +} from '../CodegenSchema'; +import type { + ParserErrorCapturer, + PropAST, + TypeDeclarationMap, + TypeResolutionStatus, +} from './utils'; +import invariant from 'invariant'; + +const {flattenProperties} = require('./typescript/components/componentsUtils'); + +const {buildPropSchema} = require('./parsers-commons'); + +// $FlowFixMe[untyped-import] there's no flowtype flow-parser +const flowParser = require('flow-parser'); +const { + UnsupportedObjectPropertyTypeAnnotationParserError, +} = require('./errors'); + +const schemaMock = { + modules: { + StringPropNativeComponentView: { + type: 'Component', + components: { + StringPropNativeComponentView: { + extendsProps: [], + events: [], + props: [], + commands: [], + }, + }, + }, + }, +}; + +export class MockedParser implements Parser { + typeParameterInstantiation: string = 'TypeParameterInstantiation'; + typeAlias: string = 'TypeAlias'; + enumDeclaration: string = 'EnumDeclaration'; + interfaceDeclaration: string = 'InterfaceDeclaration'; + nullLiteralTypeAnnotation: string = 'NullLiteralTypeAnnotation'; + undefinedLiteralTypeAnnotation: string = 'VoidLiteralTypeAnnotation'; + + isProperty(property: $FlowFixMe): boolean { + return property.type === 'ObjectTypeProperty'; + } + + getKeyName(property: $FlowFixMe, hasteModuleName: string): string { + if (!this.isProperty(property)) { + throw new UnsupportedObjectPropertyTypeAnnotationParserError( + hasteModuleName, + property, + property.type, + this.language(), + ); + } + return property.key.name; + } + + language(): ParserType { + return 'Flow'; + } + + getTypeAnnotationName(typeAnnotation: $FlowFixMe): string { + return typeAnnotation?.id?.name; + } + + checkIfInvalidModule(typeArguments: $FlowFixMe): boolean { + return false; + } + + remapUnionTypeAnnotationMemberNames( + membersTypes: $FlowFixMe[], + ): UnionTypeAnnotationMemberType[] { + return []; + } + + parseFile(filename: string): SchemaType { + return schemaMock; + } + + parseString(contents: string, filename: ?string): SchemaType { + return schemaMock; + } + + parseModuleFixture(filename: string): SchemaType { + return schemaMock; + } + + getAst(contents: string): $FlowFixMe { + return flowParser.parse(contents, { + enums: true, + }); + } + + getFunctionTypeAnnotationParameters( + functionTypeAnnotation: $FlowFixMe, + ): $ReadOnlyArray<$FlowFixMe> { + return functionTypeAnnotation.params; + } + + getFunctionNameFromParameter( + parameter: NamedShape>, + ): $FlowFixMe { + return parameter.name; + } + + getParameterName(parameter: $FlowFixMe): string { + return parameter.name.name; + } + + getParameterTypeAnnotation(parameter: $FlowFixMe): $FlowFixMe { + return parameter.typeAnnotation; + } + + getFunctionTypeAnnotationReturnType( + functionTypeAnnotation: $FlowFixMe, + ): $FlowFixMe { + return functionTypeAnnotation.returnType; + } + + parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType { + return typeAnnotation.type; + } + + validateEnumMembersSupported( + typeAnnotation: $FlowFixMe, + enumMembersType: NativeModuleEnumMemberType, + ): void { + return; + } + + parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers { + return typeAnnotation.type === 'StringTypeAnnotation' + ? [ + { + name: 'Hello', + value: 'hello', + }, + { + name: 'Goodbye', + value: 'goodbye', + }, + ] + : [ + { + name: 'On', + value: '1', + }, + { + name: 'Off', + value: '0', + }, + ]; + } + + isModuleInterface(node: $FlowFixMe): boolean { + return ( + node.type === 'InterfaceDeclaration' && + node.extends.length === 1 && + node.extends[0].type === 'InterfaceExtends' && + node.extends[0].id.name === 'TurboModule' + ); + } + + isGenericTypeAnnotation(type: $FlowFixMe): boolean { + return true; + } + + extractAnnotatedElement( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + ): $FlowFixMe { + return types[typeAnnotation.typeParameters.params[0].id.name]; + } + + getTypes(ast: $FlowFixMe): TypeDeclarationMap { + return {}; + } + + callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null { + return callExpression.typeArguments || null; + } + + computePartialProperties( + properties: Array<$FlowFixMe>, + hasteModuleName: string, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + ): Array<$FlowFixMe> { + return [ + { + name: 'a', + optional: true, + typeAnnotation: {type: 'StringTypeAnnotation'}, + }, + { + name: 'b', + optional: true, + typeAnnotation: {type: 'BooleanTypeAnnotation'}, + }, + ]; + } + + functionTypeAnnotation(propertyValueType: string): boolean { + return propertyValueType === 'FunctionTypeAnnotation'; + } + + getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe { + return declaration.typeArguments.params; + } + + getNativeComponentType( + typeArgumentParams: $FlowFixMe, + funcArgumentParams: $FlowFixMe, + ): {[string]: string} { + return { + propsTypeName: typeArgumentParams[0].id.name, + componentName: funcArgumentParams[0].value, + }; + } + + getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe { + return annotatedElement.right.properties; + } + + bodyProperties(typeAlias: $FlowFixMe): $ReadOnlyArray<$FlowFixMe> { + return typeAlias.body.properties; + } + + convertKeywordToTypeAnnotation(keyword: string): string { + return keyword; + } + + argumentForProp(prop: PropAST): $FlowFixMe { + return prop.expression; + } + + nameForArgument(prop: PropAST): $FlowFixMe { + return prop.expression.name; + } + + isOptionalProperty(property: $FlowFixMe): boolean { + return property.optional || false; + } + + getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe { + return property.typeAnnotation.typeAnnotation; + } + + getGetTypeAnnotationFN(): GetTypeAnnotationFN { + return () => { + return {}; + }; + } + + getGetSchemaInfoFN(): GetSchemaInfoFN { + return () => { + return { + name: 'MockedSchema', + optional: false, + typeAnnotation: 'BooleanTypeAnnotation', + defaultValue: false, + withNullDefault: false, + }; + }; + } + + getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN { + return () => { + return { + nullable: false, + typeAnnotation: null, + typeResolutionStatus: {successful: false}, + }; + }; + } + + getResolvedTypeAnnotation( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + ): { + nullable: boolean, + typeAnnotation: $FlowFixMe, + typeResolutionStatus: TypeResolutionStatus, + } { + invariant( + typeAnnotation != null, + 'resolveTypeAnnotation(): typeAnnotation cannot be null', + ); + + let node = typeAnnotation; + let nullable = false; + let typeResolutionStatus: TypeResolutionStatus = { + successful: false, + }; + + for (;;) { + if (node.type === 'NullableTypeAnnotation') { + nullable = true; + node = node.typeAnnotation; + continue; + } + + if (node.type !== 'GenericTypeAnnotation') { + break; + } + + const resolvedTypeAnnotation = types[node.id.name]; + if (resolvedTypeAnnotation == null) { + break; + } + + switch (resolvedTypeAnnotation.type) { + case 'TypeAlias': { + typeResolutionStatus = { + successful: true, + type: 'alias', + name: node.id.name, + }; + node = resolvedTypeAnnotation.right; + break; + } + case 'EnumDeclaration': { + typeResolutionStatus = { + successful: true, + type: 'enum', + name: node.id.name, + }; + node = resolvedTypeAnnotation.body; + break; + } + default: { + throw new TypeError( + `A non GenericTypeAnnotation must be a type declaration ('TypeAlias') or enum ('EnumDeclaration'). Instead, got the unsupported ${resolvedTypeAnnotation.type}.`, + ); + } + } + } + + return { + nullable: nullable, + typeAnnotation: node, + typeResolutionStatus, + }; + } + + getExtendsProps( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): $ReadOnlyArray { + return typeDefinition + .filter(prop => prop.type === 'ObjectTypeSpreadProperty') + .map(prop => this.extendsForProp(prop, types, this)) + .filter(Boolean); + } + + extendsForProp( + prop: PropAST, + types: TypeDeclarationMap, + parser: Parser, + ): ExtendsForProp { + const argument = this.argumentForProp(prop); + if (!argument) { + console.log('null', prop); + } + const name = parser.nameForArgument(prop); + + if (types[name] != null) { + // This type is locally defined in the file + return null; + } + + switch (name) { + case 'ViewProps': + return { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }; + default: { + throw new Error(`Unable to handle prop spread: ${name}`); + } + } + } + + removeKnownExtends( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): $ReadOnlyArray { + return typeDefinition.filter( + prop => + prop.type !== 'ObjectTypeSpreadProperty' || + this.extendsForProp(prop, types, this) === null, + ); + } + + getProps( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): { + props: $ReadOnlyArray>, + extendsProps: $ReadOnlyArray, + } { + const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); + const props = flattenProperties(nonExtendsProps, types, this) + .map(property => buildPropSchema(property, types, this)) + .filter(Boolean); + + return { + props, + extendsProps: this.getExtendsProps(typeDefinition, types), + }; + } + + getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe { + const typeAlias = types[typeName]; + try { + return typeAlias.right.typeParameters.params[0].properties; + } catch (e) { + throw new Error( + `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, + ); + } + } + + nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.right; + } + + nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.body; + } + + genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string { + return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; + } + + extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string { + return typeAnnotation.type === 'GenericTypeAnnotation' + ? typeAnnotation.id.name + : typeAnnotation.type; + } + + getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.properties; + } + + getLiteralValue(option: $FlowFixMe): $FlowFixMe { + return option.value; + } + + getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.typeParameters.params.length > 1 + ? typeAnnotation.typeParameters.params[1].value + : null; + } +} diff --git a/packages/react-native-codegen/lib/parsers/parsers-commons.js b/packages/react-native-codegen/lib/parsers/parsers-commons.js new file mode 100644 index 000000000000..3527a293a142 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parsers-commons.js @@ -0,0 +1,1095 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && + (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), + t.push.apply(t, o); + } + return t; +} +function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 + ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) + : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; +} +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('./utils'), + getConfigType = _require.getConfigType, + extractNativeModuleName = _require.extractNativeModuleName, + createParserErrorCapturer = _require.createParserErrorCapturer, + visit = _require.visit, + isModuleRegistryCall = _require.isModuleRegistryCall, + verifyPlatforms = _require.verifyPlatforms; +const _require2 = require('./error-utils'), + throwIfPropertyValueTypeIsUnsupported = + _require2.throwIfPropertyValueTypeIsUnsupported, + throwIfUnsupportedFunctionParamTypeAnnotationParserError = + _require2.throwIfUnsupportedFunctionParamTypeAnnotationParserError, + throwIfUnsupportedFunctionReturnTypeAnnotationParserError = + _require2.throwIfUnsupportedFunctionReturnTypeAnnotationParserError, + throwIfModuleTypeIsUnsupported = _require2.throwIfModuleTypeIsUnsupported, + throwIfUnusedModuleInterfaceParserError = + _require2.throwIfUnusedModuleInterfaceParserError, + throwIfMoreThanOneModuleRegistryCalls = + _require2.throwIfMoreThanOneModuleRegistryCalls, + throwIfWrongNumberOfCallExpressionArgs = + _require2.throwIfWrongNumberOfCallExpressionArgs, + throwIfUntypedModule = _require2.throwIfUntypedModule, + throwIfIncorrectModuleRegistryCallTypeParameterParserError = + _require2.throwIfIncorrectModuleRegistryCallTypeParameterParserError, + throwIfIncorrectModuleRegistryCallArgument = + _require2.throwIfIncorrectModuleRegistryCallArgument, + throwIfModuleInterfaceNotFound = _require2.throwIfModuleInterfaceNotFound, + throwIfMoreThanOneModuleInterfaceParserError = + _require2.throwIfMoreThanOneModuleInterfaceParserError, + throwIfModuleInterfaceIsMisnamed = _require2.throwIfModuleInterfaceIsMisnamed, + throwIfMoreThanOneCodegenNativecommands = + _require2.throwIfMoreThanOneCodegenNativecommands, + throwIfConfigNotfound = _require2.throwIfConfigNotfound, + throwIfMoreThanOneConfig = _require2.throwIfMoreThanOneConfig, + throwIfTypeAliasIsNotInterface = _require2.throwIfTypeAliasIsNotInterface; +const _require3 = require('./errors'), + MissingTypeParameterGenericParserError = + _require3.MissingTypeParameterGenericParserError, + MoreThanOneTypeParameterGenericParserError = + _require3.MoreThanOneTypeParameterGenericParserError, + UnnamedFunctionParamParserError = _require3.UnnamedFunctionParamParserError; +const invariant = require('invariant'); + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser + +function wrapModuleSchema(nativeModuleSchema, hasteModuleName) { + return { + modules: { + [hasteModuleName]: nativeModuleSchema, + }, + }; +} + +// $FlowFixMe[unsupported-variance-annotation] +function unwrapNullable(x) { + if (x.type === 'NullableTypeAnnotation') { + return [x.typeAnnotation, true]; + } + return [x, false]; +} + +// $FlowFixMe[unsupported-variance-annotation] +function wrapNullable(nullable, typeAnnotation) { + if (!nullable) { + return typeAnnotation; + } + return { + type: 'NullableTypeAnnotation', + typeAnnotation, + }; +} +function assertGenericTypeAnnotationHasExactlyOneTypeParameter( + moduleName, + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + typeAnnotation, + parser, +) { + if (typeAnnotation.typeParameters == null) { + throw new MissingTypeParameterGenericParserError( + moduleName, + typeAnnotation, + parser, + ); + } + const typeAnnotationType = parser.typeParameterInstantiation; + invariant( + typeAnnotation.typeParameters.type === typeAnnotationType, + `assertGenericTypeAnnotationHasExactlyOneTypeParameter: Type parameters must be an AST node of type '${typeAnnotationType}'`, + ); + if (typeAnnotation.typeParameters.params.length !== 1) { + throw new MoreThanOneTypeParameterGenericParserError( + moduleName, + typeAnnotation, + parser, + ); + } +} +function isObjectProperty(property, language) { + switch (language) { + case 'Flow': + return property.type === 'ObjectTypeProperty'; + case 'TypeScript': + return property.type === 'TSPropertySignature'; + default: + return false; + } +} +function parseObjectProperty( + property, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + translateTypeAnnotation, + parser, +) { + const language = parser.language(); + const name = parser.getKeyName(property, hasteModuleName); + const _property$optional = property.optional, + optional = _property$optional === void 0 ? false : _property$optional; + const languageTypeAnnotation = + language === 'TypeScript' + ? property.typeAnnotation.typeAnnotation + : property.value; + const _unwrapNullable = unwrapNullable( + translateTypeAnnotation( + hasteModuleName, + languageTypeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + propertyTypeAnnotation = _unwrapNullable2[0], + isPropertyNullable = _unwrapNullable2[1]; + if ( + propertyTypeAnnotation.type === 'FunctionTypeAnnotation' || + propertyTypeAnnotation.type === 'PromiseTypeAnnotation' || + propertyTypeAnnotation.type === 'VoidTypeAnnotation' + ) { + throwIfPropertyValueTypeIsUnsupported( + hasteModuleName, + languageTypeAnnotation, + property.key, + propertyTypeAnnotation.type, + ); + } + return { + name, + optional, + typeAnnotation: wrapNullable(isPropertyNullable, propertyTypeAnnotation), + }; +} +function translateFunctionTypeAnnotation( + hasteModuleName, + // TODO(T108222691): Use flow-types for @babel/parser + // TODO(T71778680): This is a FunctionTypeAnnotation. Type this. + functionTypeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, +) { + const params = []; + for (const param of parser.getFunctionTypeAnnotationParameters( + functionTypeAnnotation, + )) { + const parsedParam = tryParse(() => { + if (parser.getFunctionNameFromParameter(param) == null) { + throw new UnnamedFunctionParamParserError(param, hasteModuleName); + } + const paramName = parser.getParameterName(param); + const _unwrapNullable3 = unwrapNullable( + translateTypeAnnotation( + hasteModuleName, + parser.getParameterTypeAnnotation(param), + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ), + _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), + paramTypeAnnotation = _unwrapNullable4[0], + isParamTypeAnnotationNullable = _unwrapNullable4[1]; + if ( + paramTypeAnnotation.type === 'VoidTypeAnnotation' || + paramTypeAnnotation.type === 'PromiseTypeAnnotation' + ) { + return throwIfUnsupportedFunctionParamTypeAnnotationParserError( + hasteModuleName, + param.typeAnnotation, + paramName, + paramTypeAnnotation.type, + ); + } + return { + name: paramName, + optional: Boolean(param.optional), + typeAnnotation: wrapNullable( + isParamTypeAnnotationNullable, + paramTypeAnnotation, + ), + }; + }); + if (parsedParam != null) { + params.push(parsedParam); + } + } + const _unwrapNullable5 = unwrapNullable( + translateTypeAnnotation( + hasteModuleName, + parser.getFunctionTypeAnnotationReturnType(functionTypeAnnotation), + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ), + _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 2), + returnTypeAnnotation = _unwrapNullable6[0], + isReturnTypeAnnotationNullable = _unwrapNullable6[1]; + throwIfUnsupportedFunctionReturnTypeAnnotationParserError( + hasteModuleName, + functionTypeAnnotation, + 'FunctionTypeAnnotation', + cxxOnly, + returnTypeAnnotation.type, + ); + return { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: wrapNullable( + isReturnTypeAnnotationNullable, + returnTypeAnnotation, + ), + params, + }; +} +function buildPropertySchema( + hasteModuleName, + // TODO(T108222691): [TS] Use flow-types for @babel/parser + // TODO(T71778680): [Flow] This is an ObjectTypeProperty containing either: + // - a FunctionTypeAnnotation or GenericTypeAnnotation + // - a NullableTypeAnnoation containing a FunctionTypeAnnotation or GenericTypeAnnotation + // Flow type this node + property, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, +) { + let nullable = false; + let key = property.key, + value = property.value; + const methodName = key.name; + if (parser.language() === 'TypeScript') { + value = + property.type === 'TSMethodSignature' + ? property + : property.typeAnnotation; + } + const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); + var _resolveTypeAnnotatio = resolveTypeAnnotationFN(value, types, parser); + nullable = _resolveTypeAnnotatio.nullable; + value = _resolveTypeAnnotatio.typeAnnotation; + throwIfModuleTypeIsUnsupported( + hasteModuleName, + property.value, + key.name, + value.type, + parser, + ); + return { + name: methodName, + optional: Boolean(property.optional), + typeAnnotation: wrapNullable( + nullable, + translateFunctionTypeAnnotation( + hasteModuleName, + value, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ), + ), + }; +} +function buildSchemaFromConfigType( + configType, + filename, + ast, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + parser, + translateTypeAnnotation, +) { + switch (configType) { + case 'component': { + return wrapComponentSchema(buildComponentSchema(ast, parser)); + } + case 'module': { + if (filename === undefined || filename === null) { + throw new Error('Filepath expected while parasing a module'); + } + const nativeModuleName = extractNativeModuleName(filename); + const _createParserErrorCap = createParserErrorCapturer(), + _createParserErrorCap2 = _slicedToArray(_createParserErrorCap, 2), + parsingErrors = _createParserErrorCap2[0], + tryParse = _createParserErrorCap2[1]; + const schema = tryParse(() => + buildModuleSchema( + nativeModuleName, + ast, + tryParse, + parser, + translateTypeAnnotation, + ), + ); + if (parsingErrors.length > 0) { + /** + * TODO(T77968131): We have two options: + * - Throw the first error, but indicate there are more then one errors. + * - Display all errors, nicely formatted. + * + * For the time being, we're just throw the first error. + **/ + + throw parsingErrors[0]; + } + invariant( + schema != null, + 'When there are no parsing errors, the schema should not be null', + ); + return wrapModuleSchema(schema, nativeModuleName); + } + default: + return { + modules: {}, + }; + } +} +function buildSchema( + contents, + filename, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + Visitor, + parser, + translateTypeAnnotation, +) { + // Early return for non-Spec JavaScript files + if ( + !contents.includes('codegenNativeComponent') && + !contents.includes('TurboModule') + ) { + return { + modules: {}, + }; + } + const ast = parser.getAst(contents); + const configType = getConfigType(ast, Visitor); + return buildSchemaFromConfigType( + configType, + filename, + ast, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + parser, + translateTypeAnnotation, + ); +} +function createComponentConfig(foundConfig, commandsTypeNames) { + return _objectSpread( + _objectSpread({}, foundConfig), + {}, + { + commandTypeName: + commandsTypeNames[0] == null + ? null + : commandsTypeNames[0].commandTypeName, + commandOptionsExpression: + commandsTypeNames[0] == null + ? null + : commandsTypeNames[0].commandOptionsExpression, + }, + ); +} +const parseModuleName = (hasteModuleName, moduleSpec, ast, parser) => { + const callExpressions = []; + visit(ast, { + CallExpression(node) { + if (isModuleRegistryCall(node)) { + callExpressions.push(node); + } + }, + }); + throwIfUnusedModuleInterfaceParserError( + hasteModuleName, + moduleSpec, + callExpressions, + ); + throwIfMoreThanOneModuleRegistryCalls( + hasteModuleName, + callExpressions, + callExpressions.length, + ); + const callExpression = callExpressions[0]; + const typeParameters = parser.callExpressionTypeParameters(callExpression); + const methodName = callExpression.callee.property.name; + throwIfWrongNumberOfCallExpressionArgs( + hasteModuleName, + callExpression, + methodName, + callExpression.arguments.length, + ); + throwIfIncorrectModuleRegistryCallArgument( + hasteModuleName, + callExpression.arguments[0], + methodName, + ); + const $moduleName = callExpression.arguments[0].value; + throwIfUntypedModule( + typeParameters, + hasteModuleName, + callExpression, + methodName, + $moduleName, + ); + throwIfIncorrectModuleRegistryCallTypeParameterParserError( + hasteModuleName, + typeParameters, + methodName, + $moduleName, + parser, + ); + return $moduleName; +}; +const buildModuleSchema = ( + hasteModuleName, + ast, + tryParse, + parser, + translateTypeAnnotation, +) => { + const language = parser.language(); + const types = parser.getTypes(ast); + const moduleSpecs = Object.values(types).filter(t => + parser.isModuleInterface(t), + ); + throwIfModuleInterfaceNotFound( + moduleSpecs.length, + hasteModuleName, + ast, + language, + ); + throwIfMoreThanOneModuleInterfaceParserError( + hasteModuleName, + moduleSpecs, + language, + ); + const _moduleSpecs = _slicedToArray(moduleSpecs, 1), + moduleSpec = _moduleSpecs[0]; + throwIfModuleInterfaceIsMisnamed(hasteModuleName, moduleSpec.id, language); + + // Parse Module Name + const moduleName = parseModuleName(hasteModuleName, moduleSpec, ast, parser); + + // Some module names use platform suffix to indicate platform-exclusive modules. + // Eventually this should be made explicit in the Flow type itself. + // Also check the hasteModuleName for platform suffix. + // Note: this shape is consistent with ComponentSchema. + const _verifyPlatforms = verifyPlatforms(hasteModuleName, moduleName), + cxxOnly = _verifyPlatforms.cxxOnly, + excludedPlatforms = _verifyPlatforms.excludedPlatforms; + const properties = + language === 'Flow' ? moduleSpec.body.properties : moduleSpec.body.body; + + // $FlowFixMe[missing-type-arg] + return properties + .filter( + property => + property.type === 'ObjectTypeProperty' || + property.type === 'TSPropertySignature' || + property.type === 'TSMethodSignature', + ) + .map(property => { + const aliasMap = {}; + const enumMap = {}; + return tryParse(() => ({ + aliasMap, + enumMap, + propertyShape: buildPropertySchema( + hasteModuleName, + property, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ), + })); + }) + .filter(Boolean) + .reduce( + (moduleSchema, {aliasMap, enumMap, propertyShape}) => ({ + type: 'NativeModule', + aliasMap: _objectSpread( + _objectSpread({}, moduleSchema.aliasMap), + aliasMap, + ), + enumMap: _objectSpread( + _objectSpread({}, moduleSchema.enumMap), + enumMap, + ), + spec: { + properties: [...moduleSchema.spec.properties, propertyShape], + }, + moduleName: moduleSchema.moduleName, + excludedPlatforms: moduleSchema.excludedPlatforms, + }), + { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: { + properties: [], + }, + moduleName, + excludedPlatforms: + excludedPlatforms.length !== 0 ? [...excludedPlatforms] : undefined, + }, + ); +}; + +/** + * This function is used to find the type of a native component + * provided the default exports statement from generated AST. + * @param statement The statement to be parsed. + * @param foundConfigs The 'mutable' array of configs that have been found. + * @param parser The language parser to be used. + * @returns void + */ +function findNativeComponentType(statement, foundConfigs, parser) { + let declaration = statement.declaration; + + // codegenNativeComponent can be nested inside a cast + // expression so we need to go one level deeper + if ( + declaration.type === 'TSAsExpression' || + declaration.type === 'TypeCastExpression' + ) { + declaration = declaration.expression; + } + try { + if (declaration.callee.name === 'codegenNativeComponent') { + const typeArgumentParams = + parser.getTypeArgumentParamsFromDeclaration(declaration); + const funcArgumentParams = declaration.arguments; + const nativeComponentType = parser.getNativeComponentType( + typeArgumentParams, + funcArgumentParams, + ); + if (funcArgumentParams.length > 1) { + nativeComponentType.optionsExpression = funcArgumentParams[1]; + } + foundConfigs.push(nativeComponentType); + } + } catch (e) { + // ignore + } +} +function getCommandOptions(commandOptionsExpression) { + if (commandOptionsExpression == null) { + return null; + } + let foundOptions; + try { + foundOptions = commandOptionsExpression.properties.reduce( + (options, prop) => { + options[prop.key.name] = ( + (prop && prop.value && prop.value.elements) || + [] + ).map(element => element && element.value); + return options; + }, + {}, + ); + } catch (e) { + throw new Error( + 'Failed to parse command options, please check that they are defined correctly', + ); + } + return foundOptions; +} +function getOptions(optionsExpression) { + if (!optionsExpression) { + return null; + } + let foundOptions; + try { + foundOptions = optionsExpression.properties.reduce((options, prop) => { + if (prop.value.type === 'ArrayExpression') { + options[prop.key.name] = prop.value.elements.map( + element => element.value, + ); + } else { + options[prop.key.name] = prop.value.value; + } + return options; + }, {}); + } catch (e) { + throw new Error( + 'Failed to parse codegen options, please check that they are defined correctly', + ); + } + if ( + foundOptions.paperComponentName && + foundOptions.paperComponentNameDeprecated + ) { + throw new Error( + 'Failed to parse codegen options, cannot use both paperComponentName and paperComponentNameDeprecated', + ); + } + return foundOptions; +} +function getCommandTypeNameAndOptionsExpression(namedExport, parser) { + let callExpression; + let calleeName; + try { + callExpression = namedExport.declaration.declarations[0].init; + calleeName = callExpression.callee.name; + } catch (e) { + return; + } + if (calleeName !== 'codegenNativeCommands') { + return; + } + if (callExpression.arguments.length !== 1) { + throw new Error( + 'codegenNativeCommands must be passed options including the supported commands', + ); + } + const typeArgumentParam = + parser.getTypeArgumentParamsFromDeclaration(callExpression)[0]; + if (!parser.isGenericTypeAnnotation(typeArgumentParam.type)) { + throw new Error( + "codegenNativeCommands doesn't support inline definitions. Specify a file local type alias", + ); + } + return { + commandTypeName: parser.getTypeAnnotationName(typeArgumentParam), + commandOptionsExpression: callExpression.arguments[0], + }; +} +function propertyNames(properties) { + return properties + .map(property => property && property.key && property.key.name) + .filter(Boolean); +} +function extendsForProp(prop, types, parser) { + const argument = parser.argumentForProp(prop); + if (!argument) { + console.log('null', prop); + } + const name = parser.nameForArgument(prop); + if (types[name] != null) { + // This type is locally defined in the file + return null; + } + switch (name) { + case 'ViewProps': + return { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }; + default: { + throw new Error(`Unable to handle prop spread: ${name}`); + } + } +} +function buildPropSchema(property, types, parser) { + const getSchemaInfoFN = parser.getGetSchemaInfoFN(); + const info = getSchemaInfoFN(property, types); + if (info == null) { + return null; + } + const name = info.name, + optional = info.optional, + typeAnnotation = info.typeAnnotation, + defaultValue = info.defaultValue, + withNullDefault = info.withNullDefault; + const getTypeAnnotationFN = parser.getGetTypeAnnotationFN(); + return { + name, + optional, + typeAnnotation: getTypeAnnotationFN( + name, + typeAnnotation, + defaultValue, + withNullDefault, + types, + parser, + buildPropSchema, + ), + }; +} + +/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ +function getEventArgument(argumentProps, parser, getPropertyType) { + return { + type: 'ObjectTypeAnnotation', + properties: argumentProps.map(member => + buildPropertiesForEvent(member, parser, getPropertyType), + ), + }; +} + +/* $FlowFixMe[signature-verification-failure] there's no flowtype for AST. + * TODO(T108222691): Use flow-types for @babel/parser */ +function findComponentConfig(ast, parser) { + const foundConfigs = []; + const defaultExports = ast.body.filter( + node => node.type === 'ExportDefaultDeclaration', + ); + defaultExports.forEach(statement => { + findNativeComponentType(statement, foundConfigs, parser); + }); + throwIfConfigNotfound(foundConfigs); + throwIfMoreThanOneConfig(foundConfigs); + const foundConfig = foundConfigs[0]; + const namedExports = ast.body.filter( + node => node.type === 'ExportNamedDeclaration', + ); + const commandsTypeNames = namedExports + .map(statement => getCommandTypeNameAndOptionsExpression(statement, parser)) + .filter(Boolean); + throwIfMoreThanOneCodegenNativecommands(commandsTypeNames); + return createComponentConfig(foundConfig, commandsTypeNames); +} + +// $FlowFixMe[signature-verification-failure] there's no flowtype for AST +function getCommandProperties(ast, parser) { + const _findComponentConfig = findComponentConfig(ast, parser), + commandTypeName = _findComponentConfig.commandTypeName, + commandOptionsExpression = _findComponentConfig.commandOptionsExpression; + if (commandTypeName == null) { + return []; + } + const types = parser.getTypes(ast); + const typeAlias = types[commandTypeName]; + throwIfTypeAliasIsNotInterface(typeAlias, parser); + const properties = parser.bodyProperties(typeAlias); + if (!properties) { + throw new Error( + `Failed to find type definition for "${commandTypeName}", please check that you have a valid codegen file`, + ); + } + const commandPropertyNames = propertyNames(properties); + const commandOptions = getCommandOptions(commandOptionsExpression); + if (commandOptions == null || commandOptions.supportedCommands == null) { + throw new Error( + 'codegenNativeCommands must be given an options object with supportedCommands array', + ); + } + if ( + commandOptions.supportedCommands.length !== commandPropertyNames.length || + !commandOptions.supportedCommands.every(supportedCommand => + commandPropertyNames.includes(supportedCommand), + ) + ) { + throw new Error( + `codegenNativeCommands expected the same supportedCommands specified in the ${commandTypeName} interface: ${commandPropertyNames.join( + ', ', + )}`, + ); + } + return properties; +} +function getTypeResolutionStatus(type, typeAnnotation, parser) { + return { + successful: true, + type, + name: parser.getTypeAnnotationName(typeAnnotation), + }; +} +function handleGenericTypeAnnotation( + typeAnnotation, + resolvedTypeAnnotation, + parser, +) { + let typeResolutionStatus; + let node; + switch (resolvedTypeAnnotation.type) { + case parser.typeAlias: { + typeResolutionStatus = getTypeResolutionStatus( + 'alias', + typeAnnotation, + parser, + ); + node = parser.nextNodeForTypeAlias(resolvedTypeAnnotation); + break; + } + case parser.enumDeclaration: { + typeResolutionStatus = getTypeResolutionStatus( + 'enum', + typeAnnotation, + parser, + ); + node = parser.nextNodeForEnum(resolvedTypeAnnotation); + break; + } + // parser.interfaceDeclaration is not used here because for flow it should fall through to default case and throw an error + case 'TSInterfaceDeclaration': { + typeResolutionStatus = getTypeResolutionStatus( + 'alias', + typeAnnotation, + parser, + ); + node = resolvedTypeAnnotation; + break; + } + default: { + throw new TypeError( + parser.genericTypeAnnotationErrorMessage(resolvedTypeAnnotation), + ); + } + } + return { + typeAnnotation: node, + typeResolutionStatus, + }; +} +function buildPropertiesForEvent(property, parser, getPropertyType) { + const name = property.key.name; + const optional = parser.isOptionalProperty(property); + const typeAnnotation = parser.getTypeAnnotationFromProperty(property); + return getPropertyType(name, optional, typeAnnotation, parser); +} +function verifyPropNotAlreadyDefined(props, needleProp) { + const propName = needleProp.key.name; + const foundProp = props.some(prop => prop.key.name === propName); + if (foundProp) { + throw new Error(`A prop was already defined with the name ${propName}`); + } +} +function handleEventHandler( + name, + typeAnnotation, + parser, + types, + findEventArgumentsAndType, +) { + const eventType = name === 'BubblingEventHandler' ? 'bubble' : 'direct'; + const paperTopLevelNameDeprecated = + parser.getPaperTopLevelNameDeprecated(typeAnnotation); + switch (typeAnnotation.typeParameters.params[0].type) { + case parser.nullLiteralTypeAnnotation: + case parser.undefinedLiteralTypeAnnotation: + return { + argumentProps: [], + bubblingType: eventType, + paperTopLevelNameDeprecated, + }; + default: + return findEventArgumentsAndType( + parser, + typeAnnotation.typeParameters.params[0], + types, + eventType, + paperTopLevelNameDeprecated, + ); + } +} +function emitBuildEventSchema( + paperTopLevelNameDeprecated, + name, + optional, + nonNullableBubblingType, + argument, +) { + if (paperTopLevelNameDeprecated != null) { + return { + name, + optional, + bubblingType: nonNullableBubblingType, + paperTopLevelNameDeprecated, + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: argument, + }, + }; + } + return { + name, + optional, + bubblingType: nonNullableBubblingType, + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: argument, + }, + }; +} +module.exports = { + wrapModuleSchema, + unwrapNullable, + wrapNullable, + assertGenericTypeAnnotationHasExactlyOneTypeParameter, + isObjectProperty, + parseObjectProperty, + translateFunctionTypeAnnotation, + buildPropertySchema, + buildSchemaFromConfigType, + buildSchema, + createComponentConfig, + parseModuleName, + buildModuleSchema, + findNativeComponentType, + propertyNames, + getCommandOptions, + getOptions, + getCommandTypeNameAndOptionsExpression, + extendsForProp, + buildPropSchema, + getEventArgument, + findComponentConfig, + getCommandProperties, + handleGenericTypeAnnotation, + getTypeResolutionStatus, + buildPropertiesForEvent, + verifyPropNotAlreadyDefined, + handleEventHandler, + emitBuildEventSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/parsers-commons.js.flow b/packages/react-native-codegen/lib/parsers/parsers-commons.js.flow new file mode 100644 index 000000000000..f2f5a3839d55 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parsers-commons.js.flow @@ -0,0 +1,1192 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + Nullable, + NamedShape, + NativeModuleAliasMap, + NativeModuleBaseTypeAnnotation, + NativeModuleSchema, + NativeModuleTypeAnnotation, + NativeModuleFunctionTypeAnnotation, + NativeModuleParamTypeAnnotation, + NativeModulePropertyShape, + SchemaType, + NativeModuleEnumMap, + OptionsShape, + PropTypeAnnotation, + EventTypeAnnotation, + ObjectTypeAnnotation, + EventTypeShape, +} from '../CodegenSchema.js'; + +import type {Parser} from './parser'; +import type {ParserType} from './errors'; +import type { + ParserErrorCapturer, + TypeDeclarationMap, + PropAST, + TypeResolutionStatus, +} from './utils'; +import type {ComponentSchemaBuilderConfig} from './schema.js'; + +const { + getConfigType, + extractNativeModuleName, + createParserErrorCapturer, + visit, + isModuleRegistryCall, + verifyPlatforms, +} = require('./utils'); + +const { + throwIfPropertyValueTypeIsUnsupported, + throwIfUnsupportedFunctionParamTypeAnnotationParserError, + throwIfUnsupportedFunctionReturnTypeAnnotationParserError, + throwIfModuleTypeIsUnsupported, + throwIfUnusedModuleInterfaceParserError, + throwIfMoreThanOneModuleRegistryCalls, + throwIfWrongNumberOfCallExpressionArgs, + throwIfUntypedModule, + throwIfIncorrectModuleRegistryCallTypeParameterParserError, + throwIfIncorrectModuleRegistryCallArgument, + throwIfModuleInterfaceNotFound, + throwIfMoreThanOneModuleInterfaceParserError, + throwIfModuleInterfaceIsMisnamed, + throwIfMoreThanOneCodegenNativecommands, + throwIfConfigNotfound, + throwIfMoreThanOneConfig, + throwIfTypeAliasIsNotInterface, +} = require('./error-utils'); + +const { + MissingTypeParameterGenericParserError, + MoreThanOneTypeParameterGenericParserError, + UnnamedFunctionParamParserError, +} = require('./errors'); + +const invariant = require('invariant'); + +export type CommandOptions = $ReadOnly<{ + supportedCommands: $ReadOnlyArray, +}>; + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser +type OptionsAST = Object; + +type ExtendedPropResult = { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', +} | null; + +export type EventArgumentReturnType = { + argumentProps: ?$ReadOnlyArray<$FlowFixMe>, + paperTopLevelNameDeprecated: ?$FlowFixMe, + bubblingType: ?'direct' | 'bubble', +}; + +function wrapModuleSchema( + nativeModuleSchema: NativeModuleSchema, + hasteModuleName: string, +): SchemaType { + return { + modules: { + [hasteModuleName]: nativeModuleSchema, + }, + }; +} + +// $FlowFixMe[unsupported-variance-annotation] +function unwrapNullable<+T: NativeModuleTypeAnnotation>( + x: Nullable, +): [T, boolean] { + if (x.type === 'NullableTypeAnnotation') { + return [x.typeAnnotation, true]; + } + + return [x, false]; +} + +// $FlowFixMe[unsupported-variance-annotation] +function wrapNullable<+T: NativeModuleTypeAnnotation>( + nullable: boolean, + typeAnnotation: T, +): Nullable { + if (!nullable) { + return typeAnnotation; + } + + return { + type: 'NullableTypeAnnotation', + typeAnnotation, + }; +} + +function assertGenericTypeAnnotationHasExactlyOneTypeParameter( + moduleName: string, + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + typeAnnotation: $FlowFixMe, + parser: Parser, +) { + if (typeAnnotation.typeParameters == null) { + throw new MissingTypeParameterGenericParserError( + moduleName, + typeAnnotation, + parser, + ); + } + + const typeAnnotationType = parser.typeParameterInstantiation; + + invariant( + typeAnnotation.typeParameters.type === typeAnnotationType, + `assertGenericTypeAnnotationHasExactlyOneTypeParameter: Type parameters must be an AST node of type '${typeAnnotationType}'`, + ); + + if (typeAnnotation.typeParameters.params.length !== 1) { + throw new MoreThanOneTypeParameterGenericParserError( + moduleName, + typeAnnotation, + parser, + ); + } +} + +function isObjectProperty(property: $FlowFixMe, language: ParserType): boolean { + switch (language) { + case 'Flow': + return property.type === 'ObjectTypeProperty'; + case 'TypeScript': + return property.type === 'TSPropertySignature'; + default: + return false; + } +} + +function parseObjectProperty( + property: $FlowFixMe, + hasteModuleName: string, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + nullable: boolean, + translateTypeAnnotation: $FlowFixMe, + parser: Parser, +): NamedShape> { + const language = parser.language(); + + const name = parser.getKeyName(property, hasteModuleName); + const {optional = false} = property; + const languageTypeAnnotation = + language === 'TypeScript' + ? property.typeAnnotation.typeAnnotation + : property.value; + + const [propertyTypeAnnotation, isPropertyNullable] = + unwrapNullable<$FlowFixMe>( + translateTypeAnnotation( + hasteModuleName, + languageTypeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ); + + if ( + propertyTypeAnnotation.type === 'FunctionTypeAnnotation' || + propertyTypeAnnotation.type === 'PromiseTypeAnnotation' || + propertyTypeAnnotation.type === 'VoidTypeAnnotation' + ) { + throwIfPropertyValueTypeIsUnsupported( + hasteModuleName, + languageTypeAnnotation, + property.key, + propertyTypeAnnotation.type, + ); + } + + return { + name, + optional, + typeAnnotation: wrapNullable(isPropertyNullable, propertyTypeAnnotation), + }; +} + +function translateFunctionTypeAnnotation( + hasteModuleName: string, + // TODO(T108222691): Use flow-types for @babel/parser + // TODO(T71778680): This is a FunctionTypeAnnotation. Type this. + functionTypeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + translateTypeAnnotation: $FlowFixMe, + parser: Parser, +): NativeModuleFunctionTypeAnnotation { + type Param = NamedShape>; + const params: Array = []; + + for (const param of parser.getFunctionTypeAnnotationParameters( + functionTypeAnnotation, + )) { + const parsedParam = tryParse(() => { + if (parser.getFunctionNameFromParameter(param) == null) { + throw new UnnamedFunctionParamParserError(param, hasteModuleName); + } + + const paramName = parser.getParameterName(param); + + const [paramTypeAnnotation, isParamTypeAnnotationNullable] = + unwrapNullable<$FlowFixMe>( + translateTypeAnnotation( + hasteModuleName, + parser.getParameterTypeAnnotation(param), + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ); + + if ( + paramTypeAnnotation.type === 'VoidTypeAnnotation' || + paramTypeAnnotation.type === 'PromiseTypeAnnotation' + ) { + return throwIfUnsupportedFunctionParamTypeAnnotationParserError( + hasteModuleName, + param.typeAnnotation, + paramName, + paramTypeAnnotation.type, + ); + } + + return { + name: paramName, + optional: Boolean(param.optional), + typeAnnotation: wrapNullable( + isParamTypeAnnotationNullable, + paramTypeAnnotation, + ), + }; + }); + + if (parsedParam != null) { + params.push(parsedParam); + } + } + + const [returnTypeAnnotation, isReturnTypeAnnotationNullable] = + unwrapNullable<$FlowFixMe>( + translateTypeAnnotation( + hasteModuleName, + parser.getFunctionTypeAnnotationReturnType(functionTypeAnnotation), + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + ); + + throwIfUnsupportedFunctionReturnTypeAnnotationParserError( + hasteModuleName, + functionTypeAnnotation, + 'FunctionTypeAnnotation', + cxxOnly, + returnTypeAnnotation.type, + ); + + return { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: wrapNullable( + isReturnTypeAnnotationNullable, + returnTypeAnnotation, + ), + params, + }; +} + +function buildPropertySchema( + hasteModuleName: string, + // TODO(T108222691): [TS] Use flow-types for @babel/parser + // TODO(T71778680): [Flow] This is an ObjectTypeProperty containing either: + // - a FunctionTypeAnnotation or GenericTypeAnnotation + // - a NullableTypeAnnoation containing a FunctionTypeAnnotation or GenericTypeAnnotation + // Flow type this node + property: $FlowFixMe, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + translateTypeAnnotation: $FlowFixMe, + parser: Parser, +): NativeModulePropertyShape { + let nullable: boolean = false; + let {key, value} = property; + const methodName: string = key.name; + + if (parser.language() === 'TypeScript') { + value = + property.type === 'TSMethodSignature' + ? property + : property.typeAnnotation; + } + + const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); + ({nullable, typeAnnotation: value} = resolveTypeAnnotationFN( + value, + types, + parser, + )); + + throwIfModuleTypeIsUnsupported( + hasteModuleName, + property.value, + key.name, + value.type, + parser, + ); + + return { + name: methodName, + optional: Boolean(property.optional), + typeAnnotation: wrapNullable( + nullable, + translateFunctionTypeAnnotation( + hasteModuleName, + value, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ), + ), + }; +} + +function buildSchemaFromConfigType( + configType: 'module' | 'component' | 'none', + filename: ?string, + ast: $FlowFixMe, + wrapComponentSchema: (config: ComponentSchemaBuilderConfig) => SchemaType, + buildComponentSchema: ( + ast: $FlowFixMe, + parser: Parser, + ) => ComponentSchemaBuilderConfig, + buildModuleSchema: ( + hasteModuleName: string, + ast: $FlowFixMe, + tryParse: ParserErrorCapturer, + parser: Parser, + translateTypeAnnotation: $FlowFixMe, + ) => NativeModuleSchema, + parser: Parser, + translateTypeAnnotation: $FlowFixMe, +): SchemaType { + switch (configType) { + case 'component': { + return wrapComponentSchema(buildComponentSchema(ast, parser)); + } + case 'module': { + if (filename === undefined || filename === null) { + throw new Error('Filepath expected while parasing a module'); + } + const nativeModuleName = extractNativeModuleName(filename); + + const [parsingErrors, tryParse] = createParserErrorCapturer(); + + const schema = tryParse(() => + buildModuleSchema( + nativeModuleName, + ast, + tryParse, + parser, + translateTypeAnnotation, + ), + ); + + if (parsingErrors.length > 0) { + /** + * TODO(T77968131): We have two options: + * - Throw the first error, but indicate there are more then one errors. + * - Display all errors, nicely formatted. + * + * For the time being, we're just throw the first error. + **/ + + throw parsingErrors[0]; + } + + invariant( + schema != null, + 'When there are no parsing errors, the schema should not be null', + ); + + return wrapModuleSchema(schema, nativeModuleName); + } + default: + return {modules: {}}; + } +} + +function buildSchema( + contents: string, + filename: ?string, + wrapComponentSchema: (config: ComponentSchemaBuilderConfig) => SchemaType, + buildComponentSchema: ( + ast: $FlowFixMe, + parser: Parser, + ) => ComponentSchemaBuilderConfig, + buildModuleSchema: ( + hasteModuleName: string, + ast: $FlowFixMe, + tryParse: ParserErrorCapturer, + parser: Parser, + translateTypeAnnotation: $FlowFixMe, + ) => NativeModuleSchema, + Visitor: ({isComponent: boolean, isModule: boolean}) => { + [type: string]: (node: $FlowFixMe) => void, + }, + parser: Parser, + translateTypeAnnotation: $FlowFixMe, +): SchemaType { + // Early return for non-Spec JavaScript files + if ( + !contents.includes('codegenNativeComponent') && + !contents.includes('TurboModule') + ) { + return {modules: {}}; + } + + const ast = parser.getAst(contents); + const configType = getConfigType(ast, Visitor); + + return buildSchemaFromConfigType( + configType, + filename, + ast, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + parser, + translateTypeAnnotation, + ); +} + +function createComponentConfig( + foundConfig: $FlowFixMe, + commandsTypeNames: $FlowFixMe, +): $FlowFixMe { + return { + ...foundConfig, + commandTypeName: + commandsTypeNames[0] == null + ? null + : commandsTypeNames[0].commandTypeName, + commandOptionsExpression: + commandsTypeNames[0] == null + ? null + : commandsTypeNames[0].commandOptionsExpression, + }; +} + +const parseModuleName = ( + hasteModuleName: string, + moduleSpec: $FlowFixMe, + ast: $FlowFixMe, + parser: Parser, +): string => { + const callExpressions = []; + visit(ast, { + CallExpression(node) { + if (isModuleRegistryCall(node)) { + callExpressions.push(node); + } + }, + }); + + throwIfUnusedModuleInterfaceParserError( + hasteModuleName, + moduleSpec, + callExpressions, + ); + + throwIfMoreThanOneModuleRegistryCalls( + hasteModuleName, + callExpressions, + callExpressions.length, + ); + + const [callExpression] = callExpressions; + const typeParameters = parser.callExpressionTypeParameters(callExpression); + const methodName = callExpression.callee.property.name; + + throwIfWrongNumberOfCallExpressionArgs( + hasteModuleName, + callExpression, + methodName, + callExpression.arguments.length, + ); + + throwIfIncorrectModuleRegistryCallArgument( + hasteModuleName, + callExpression.arguments[0], + methodName, + ); + + const $moduleName = callExpression.arguments[0].value; + + throwIfUntypedModule( + typeParameters, + hasteModuleName, + callExpression, + methodName, + $moduleName, + ); + + throwIfIncorrectModuleRegistryCallTypeParameterParserError( + hasteModuleName, + typeParameters, + methodName, + $moduleName, + parser, + ); + + return $moduleName; +}; + +const buildModuleSchema = ( + hasteModuleName: string, + /** + * TODO(T71778680): Flow-type this node. + */ + ast: $FlowFixMe, + tryParse: ParserErrorCapturer, + parser: Parser, + translateTypeAnnotation: $FlowFixMe, +): NativeModuleSchema => { + const language = parser.language(); + const types = parser.getTypes(ast); + const moduleSpecs = (Object.values(types): $ReadOnlyArray<$FlowFixMe>).filter( + t => parser.isModuleInterface(t), + ); + + throwIfModuleInterfaceNotFound( + moduleSpecs.length, + hasteModuleName, + ast, + language, + ); + + throwIfMoreThanOneModuleInterfaceParserError( + hasteModuleName, + moduleSpecs, + language, + ); + + const [moduleSpec] = moduleSpecs; + + throwIfModuleInterfaceIsMisnamed(hasteModuleName, moduleSpec.id, language); + + // Parse Module Name + const moduleName = parseModuleName(hasteModuleName, moduleSpec, ast, parser); + + // Some module names use platform suffix to indicate platform-exclusive modules. + // Eventually this should be made explicit in the Flow type itself. + // Also check the hasteModuleName for platform suffix. + // Note: this shape is consistent with ComponentSchema. + const {cxxOnly, excludedPlatforms} = verifyPlatforms( + hasteModuleName, + moduleName, + ); + + const properties: $ReadOnlyArray<$FlowFixMe> = + language === 'Flow' ? moduleSpec.body.properties : moduleSpec.body.body; + + // $FlowFixMe[missing-type-arg] + return properties + .filter( + property => + property.type === 'ObjectTypeProperty' || + property.type === 'TSPropertySignature' || + property.type === 'TSMethodSignature', + ) + .map(property => { + const aliasMap: {...NativeModuleAliasMap} = {}; + const enumMap: {...NativeModuleEnumMap} = {}; + + return tryParse(() => ({ + aliasMap, + enumMap, + propertyShape: buildPropertySchema( + hasteModuleName, + property, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ), + })); + }) + .filter(Boolean) + .reduce( + ( + moduleSchema: NativeModuleSchema, + {aliasMap, enumMap, propertyShape}, + ) => ({ + type: 'NativeModule', + aliasMap: {...moduleSchema.aliasMap, ...aliasMap}, + enumMap: {...moduleSchema.enumMap, ...enumMap}, + spec: { + properties: [...moduleSchema.spec.properties, propertyShape], + }, + moduleName: moduleSchema.moduleName, + excludedPlatforms: moduleSchema.excludedPlatforms, + }), + { + type: 'NativeModule', + aliasMap: {}, + enumMap: {}, + spec: {properties: []}, + moduleName, + excludedPlatforms: + excludedPlatforms.length !== 0 ? [...excludedPlatforms] : undefined, + }, + ); +}; + +/** + * This function is used to find the type of a native component + * provided the default exports statement from generated AST. + * @param statement The statement to be parsed. + * @param foundConfigs The 'mutable' array of configs that have been found. + * @param parser The language parser to be used. + * @returns void + */ +function findNativeComponentType( + statement: $FlowFixMe, + foundConfigs: Array<{[string]: string}>, + parser: Parser, +): void { + let declaration = statement.declaration; + + // codegenNativeComponent can be nested inside a cast + // expression so we need to go one level deeper + if ( + declaration.type === 'TSAsExpression' || + declaration.type === 'TypeCastExpression' + ) { + declaration = declaration.expression; + } + + try { + if (declaration.callee.name === 'codegenNativeComponent') { + const typeArgumentParams = + parser.getTypeArgumentParamsFromDeclaration(declaration); + const funcArgumentParams = declaration.arguments; + + const nativeComponentType: {[string]: string} = + parser.getNativeComponentType(typeArgumentParams, funcArgumentParams); + if (funcArgumentParams.length > 1) { + nativeComponentType.optionsExpression = funcArgumentParams[1]; + } + foundConfigs.push(nativeComponentType); + } + } catch (e) { + // ignore + } +} + +function getCommandOptions( + commandOptionsExpression: OptionsAST, +): ?CommandOptions { + if (commandOptionsExpression == null) { + return null; + } + + let foundOptions; + try { + foundOptions = commandOptionsExpression.properties.reduce( + (options, prop) => { + options[prop.key.name] = ( + (prop && prop.value && prop.value.elements) || + [] + ).map(element => element && element.value); + return options; + }, + {}, + ); + } catch (e) { + throw new Error( + 'Failed to parse command options, please check that they are defined correctly', + ); + } + + return foundOptions; +} + +function getOptions(optionsExpression: OptionsAST): ?OptionsShape { + if (!optionsExpression) { + return null; + } + let foundOptions; + try { + foundOptions = optionsExpression.properties.reduce((options, prop) => { + if (prop.value.type === 'ArrayExpression') { + options[prop.key.name] = prop.value.elements.map( + element => element.value, + ); + } else { + options[prop.key.name] = prop.value.value; + } + return options; + }, {}); + } catch (e) { + throw new Error( + 'Failed to parse codegen options, please check that they are defined correctly', + ); + } + + if ( + foundOptions.paperComponentName && + foundOptions.paperComponentNameDeprecated + ) { + throw new Error( + 'Failed to parse codegen options, cannot use both paperComponentName and paperComponentNameDeprecated', + ); + } + return foundOptions; +} + +function getCommandTypeNameAndOptionsExpression( + namedExport: $FlowFixMe, + parser: Parser, +): { + commandOptionsExpression: OptionsAST, + commandTypeName: string, +} | void { + let callExpression; + let calleeName; + try { + callExpression = namedExport.declaration.declarations[0].init; + calleeName = callExpression.callee.name; + } catch (e) { + return; + } + + if (calleeName !== 'codegenNativeCommands') { + return; + } + + if (callExpression.arguments.length !== 1) { + throw new Error( + 'codegenNativeCommands must be passed options including the supported commands', + ); + } + + const typeArgumentParam = + parser.getTypeArgumentParamsFromDeclaration(callExpression)[0]; + + if (!parser.isGenericTypeAnnotation(typeArgumentParam.type)) { + throw new Error( + "codegenNativeCommands doesn't support inline definitions. Specify a file local type alias", + ); + } + + return { + commandTypeName: parser.getTypeAnnotationName(typeArgumentParam), + commandOptionsExpression: callExpression.arguments[0], + }; +} + +function propertyNames( + properties: $ReadOnlyArray<$FlowFixMe>, +): $ReadOnlyArray<$FlowFixMe> { + return properties + .map(property => property && property.key && property.key.name) + .filter(Boolean); +} + +function extendsForProp( + prop: PropAST, + types: TypeDeclarationMap, + parser: Parser, +): ExtendedPropResult { + const argument = parser.argumentForProp(prop); + + if (!argument) { + console.log('null', prop); + } + + const name = parser.nameForArgument(prop); + + if (types[name] != null) { + // This type is locally defined in the file + return null; + } + + switch (name) { + case 'ViewProps': + return { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }; + default: { + throw new Error(`Unable to handle prop spread: ${name}`); + } + } +} + +function buildPropSchema( + property: PropAST, + types: TypeDeclarationMap, + parser: Parser, +): ?NamedShape { + const getSchemaInfoFN = parser.getGetSchemaInfoFN(); + const info = getSchemaInfoFN(property, types); + if (info == null) { + return null; + } + const {name, optional, typeAnnotation, defaultValue, withNullDefault} = info; + + const getTypeAnnotationFN = parser.getGetTypeAnnotationFN(); + + return { + name, + optional, + typeAnnotation: getTypeAnnotationFN( + name, + typeAnnotation, + defaultValue, + withNullDefault, + types, + parser, + buildPropSchema, + ), + }; +} + +/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ +function getEventArgument( + argumentProps: PropAST, + parser: Parser, + getPropertyType: ( + name: $FlowFixMe, + optional: boolean, + typeAnnotation: $FlowFixMe, + parser: Parser, + ) => NamedShape, +): ObjectTypeAnnotation { + return { + type: 'ObjectTypeAnnotation', + properties: argumentProps.map(member => + buildPropertiesForEvent(member, parser, getPropertyType), + ), + }; +} + +/* $FlowFixMe[signature-verification-failure] there's no flowtype for AST. + * TODO(T108222691): Use flow-types for @babel/parser */ +function findComponentConfig(ast: $FlowFixMe, parser: Parser) { + const foundConfigs: Array<{[string]: string}> = []; + + const defaultExports = ast.body.filter( + node => node.type === 'ExportDefaultDeclaration', + ); + + defaultExports.forEach(statement => { + findNativeComponentType(statement, foundConfigs, parser); + }); + + throwIfConfigNotfound(foundConfigs); + throwIfMoreThanOneConfig(foundConfigs); + + const foundConfig = foundConfigs[0]; + + const namedExports = ast.body.filter( + node => node.type === 'ExportNamedDeclaration', + ); + + const commandsTypeNames = namedExports + .map(statement => getCommandTypeNameAndOptionsExpression(statement, parser)) + .filter(Boolean); + + throwIfMoreThanOneCodegenNativecommands(commandsTypeNames); + + return createComponentConfig(foundConfig, commandsTypeNames); +} + +// $FlowFixMe[signature-verification-failure] there's no flowtype for AST +function getCommandProperties(ast: $FlowFixMe, parser: Parser) { + const {commandTypeName, commandOptionsExpression} = findComponentConfig( + ast, + parser, + ); + + if (commandTypeName == null) { + return []; + } + const types = parser.getTypes(ast); + + const typeAlias = types[commandTypeName]; + + throwIfTypeAliasIsNotInterface(typeAlias, parser); + + const properties = parser.bodyProperties(typeAlias); + if (!properties) { + throw new Error( + `Failed to find type definition for "${commandTypeName}", please check that you have a valid codegen file`, + ); + } + + const commandPropertyNames = propertyNames(properties); + + const commandOptions = getCommandOptions(commandOptionsExpression); + + if (commandOptions == null || commandOptions.supportedCommands == null) { + throw new Error( + 'codegenNativeCommands must be given an options object with supportedCommands array', + ); + } + + if ( + commandOptions.supportedCommands.length !== commandPropertyNames.length || + !commandOptions.supportedCommands.every(supportedCommand => + commandPropertyNames.includes(supportedCommand), + ) + ) { + throw new Error( + `codegenNativeCommands expected the same supportedCommands specified in the ${commandTypeName} interface: ${commandPropertyNames.join( + ', ', + )}`, + ); + } + + return properties; +} + +function getTypeResolutionStatus( + type: 'alias' | 'enum', + typeAnnotation: $FlowFixMe, + parser: Parser, +): TypeResolutionStatus { + return { + successful: true, + type, + name: parser.getTypeAnnotationName(typeAnnotation), + }; +} + +function handleGenericTypeAnnotation( + typeAnnotation: $FlowFixMe, + resolvedTypeAnnotation: TypeDeclarationMap, + parser: Parser, +): { + typeAnnotation: $FlowFixMe, + typeResolutionStatus: TypeResolutionStatus, +} { + let typeResolutionStatus; + let node; + + switch (resolvedTypeAnnotation.type) { + case parser.typeAlias: { + typeResolutionStatus = getTypeResolutionStatus( + 'alias', + typeAnnotation, + parser, + ); + node = parser.nextNodeForTypeAlias(resolvedTypeAnnotation); + break; + } + case parser.enumDeclaration: { + typeResolutionStatus = getTypeResolutionStatus( + 'enum', + typeAnnotation, + parser, + ); + node = parser.nextNodeForEnum(resolvedTypeAnnotation); + break; + } + // parser.interfaceDeclaration is not used here because for flow it should fall through to default case and throw an error + case 'TSInterfaceDeclaration': { + typeResolutionStatus = getTypeResolutionStatus( + 'alias', + typeAnnotation, + parser, + ); + node = resolvedTypeAnnotation; + break; + } + default: { + throw new TypeError( + parser.genericTypeAnnotationErrorMessage(resolvedTypeAnnotation), + ); + } + } + + return { + typeAnnotation: node, + typeResolutionStatus, + }; +} + +function buildPropertiesForEvent( + property: $FlowFixMe, + parser: Parser, + getPropertyType: ( + name: $FlowFixMe, + optional: boolean, + typeAnnotation: $FlowFixMe, + parser: Parser, + ) => NamedShape, +): NamedShape { + const name = property.key.name; + const optional = parser.isOptionalProperty(property); + const typeAnnotation = parser.getTypeAnnotationFromProperty(property); + + return getPropertyType(name, optional, typeAnnotation, parser); +} + +function verifyPropNotAlreadyDefined( + props: $ReadOnlyArray, + needleProp: PropAST, +) { + const propName = needleProp.key.name; + const foundProp = props.some(prop => prop.key.name === propName); + if (foundProp) { + throw new Error(`A prop was already defined with the name ${propName}`); + } +} + +function handleEventHandler( + name: 'BubblingEventHandler' | 'DirectEventHandler', + typeAnnotation: $FlowFixMe, + parser: Parser, + types: TypeDeclarationMap, + findEventArgumentsAndType: ( + parser: Parser, + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + bubblingType: void | 'direct' | 'bubble', + paperName: ?$FlowFixMe, + ) => EventArgumentReturnType, +): EventArgumentReturnType { + const eventType = name === 'BubblingEventHandler' ? 'bubble' : 'direct'; + const paperTopLevelNameDeprecated = + parser.getPaperTopLevelNameDeprecated(typeAnnotation); + + switch (typeAnnotation.typeParameters.params[0].type) { + case parser.nullLiteralTypeAnnotation: + case parser.undefinedLiteralTypeAnnotation: + return { + argumentProps: [], + bubblingType: eventType, + paperTopLevelNameDeprecated, + }; + default: + return findEventArgumentsAndType( + parser, + typeAnnotation.typeParameters.params[0], + types, + eventType, + paperTopLevelNameDeprecated, + ); + } +} + +function emitBuildEventSchema( + paperTopLevelNameDeprecated: $FlowFixMe, + name: $FlowFixMe, + optional: $FlowFixMe, + nonNullableBubblingType: 'direct' | 'bubble', + argument: ObjectTypeAnnotation, +): ?EventTypeShape { + if (paperTopLevelNameDeprecated != null) { + return { + name, + optional, + bubblingType: nonNullableBubblingType, + paperTopLevelNameDeprecated, + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: argument, + }, + }; + } + + return { + name, + optional, + bubblingType: nonNullableBubblingType, + typeAnnotation: { + type: 'EventTypeAnnotation', + argument: argument, + }, + }; +} + +module.exports = { + wrapModuleSchema, + unwrapNullable, + wrapNullable, + assertGenericTypeAnnotationHasExactlyOneTypeParameter, + isObjectProperty, + parseObjectProperty, + translateFunctionTypeAnnotation, + buildPropertySchema, + buildSchemaFromConfigType, + buildSchema, + createComponentConfig, + parseModuleName, + buildModuleSchema, + findNativeComponentType, + propertyNames, + getCommandOptions, + getOptions, + getCommandTypeNameAndOptionsExpression, + extendsForProp, + buildPropSchema, + getEventArgument, + findComponentConfig, + getCommandProperties, + handleGenericTypeAnnotation, + getTypeResolutionStatus, + buildPropertiesForEvent, + verifyPropNotAlreadyDefined, + handleEventHandler, + emitBuildEventSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/parsers-primitives.js b/packages/react-native-codegen/lib/parsers/parsers-primitives.js new file mode 100644 index 000000000000..fa3e22781a71 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parsers-primitives.js @@ -0,0 +1,660 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray(arr, i) || + _nonIterableRest() + ); +} +function _nonIterableRest() { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', + ); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _iterableToArrayLimit(r, l) { + var t = + null == r + ? null + : ('undefined' != typeof Symbol && r[Symbol.iterator]) || r['@@iterator']; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (((i = (t = t.call(r)).next), 0 === l)) { + if (Object(t) !== t) return; + f = !1; + } else + for ( + ; + !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); + f = !0 + ); + } catch (r) { + (o = !0), (n = r); + } finally { + try { + if (!f && null != t.return && ((u = t.return()), Object(u) !== u)) + return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +const _require = require('./errors'), + UnsupportedUnionTypeAnnotationParserError = + _require.UnsupportedUnionTypeAnnotationParserError, + UnsupportedTypeAnnotationParserError = + _require.UnsupportedTypeAnnotationParserError, + ParserError = _require.ParserError; +const _require2 = require('./error-utils'), + throwIfArrayElementTypeAnnotationIsUnsupported = + _require2.throwIfArrayElementTypeAnnotationIsUnsupported, + throwIfPartialNotAnnotatingTypeParameter = + _require2.throwIfPartialNotAnnotatingTypeParameter, + throwIfPartialWithMoreParameter = _require2.throwIfPartialWithMoreParameter; +const _require3 = require('./parsers-utils'), + nullGuard = _require3.nullGuard; +const _require4 = require('./parsers-commons'), + assertGenericTypeAnnotationHasExactlyOneTypeParameter = + _require4.assertGenericTypeAnnotationHasExactlyOneTypeParameter, + wrapNullable = _require4.wrapNullable, + unwrapNullable = _require4.unwrapNullable, + translateFunctionTypeAnnotation = _require4.translateFunctionTypeAnnotation; +const _require5 = require('./utils'), + isModuleRegistryCall = _require5.isModuleRegistryCall; +function emitBoolean(nullable) { + return wrapNullable(nullable, { + type: 'BooleanTypeAnnotation', + }); +} +function emitInt32(nullable) { + return wrapNullable(nullable, { + type: 'Int32TypeAnnotation', + }); +} +function emitInt32Prop(name, optional) { + return { + name, + optional, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }; +} +function emitNumber(nullable) { + return wrapNullable(nullable, { + type: 'NumberTypeAnnotation', + }); +} +function emitRootTag(nullable) { + return wrapNullable(nullable, { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }); +} +function emitDouble(nullable) { + return wrapNullable(nullable, { + type: 'DoubleTypeAnnotation', + }); +} +function emitDoubleProp(name, optional) { + return { + name, + optional, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }; +} +function emitVoid(nullable) { + return wrapNullable(nullable, { + type: 'VoidTypeAnnotation', + }); +} +function emitStringish(nullable) { + return wrapNullable(nullable, { + type: 'StringTypeAnnotation', + }); +} +function emitFunction( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, +) { + const translateFunctionTypeAnnotationValue = translateFunctionTypeAnnotation( + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ); + return wrapNullable(nullable, translateFunctionTypeAnnotationValue); +} +function emitMixed(nullable) { + return wrapNullable(nullable, { + type: 'MixedTypeAnnotation', + }); +} +function emitString(nullable) { + return wrapNullable(nullable, { + type: 'StringTypeAnnotation', + }); +} +function emitStringProp(name, optional) { + return { + name, + optional, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }; +} +function typeAliasResolution( + typeResolution, + objectTypeAnnotation, + aliasMap, + nullable, +) { + if (!typeResolution.successful) { + return wrapNullable(nullable, objectTypeAnnotation); + } + + /** + * All aliases RHS are required. + */ + aliasMap[typeResolution.name] = objectTypeAnnotation; + + /** + * Nullability of type aliases is transitive. + * + * Consider this case: + * + * type Animal = ?{ + * name: string, + * }; + * + * type B = Animal + * + * export interface Spec extends TurboModule { + * +greet: (animal: B) => void; + * } + * + * In this case, we follow B to Animal, and then Animal to ?{name: string}. + * + * We: + * 1. Replace `+greet: (animal: B) => void;` with `+greet: (animal: ?Animal) => void;`, + * 2. Pretend that Animal = {name: string}. + * + * Why do we do this? + * 1. In ObjC, we need to generate a struct called Animal, not B. + * 2. This design is simpler than managing nullability within both the type alias usage, and the type alias RHS. + * 3. What does it mean for a C++ struct, which is what this type alias RHS will generate, to be nullable? ¯\_(ツ)_/¯ + * Nullability is a concept that only makes sense when talking about instances (i.e: usages) of the C++ structs. + * Hence, it's better to manage nullability within the actual TypeAliasTypeAnnotation nodes, and not the + * associated ObjectTypeAnnotations. + */ + return wrapNullable(nullable, { + type: 'TypeAliasTypeAnnotation', + name: typeResolution.name, + }); +} +function typeEnumResolution( + typeAnnotation, + typeResolution, + nullable, + hasteModuleName, + enumMap, + parser, +) { + if (!typeResolution.successful || typeResolution.type !== 'enum') { + throw new UnsupportedTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + parser.language(), + ); + } + const enumName = typeResolution.name; + const enumMemberType = parser.parseEnumMembersType(typeAnnotation); + try { + parser.validateEnumMembersSupported(typeAnnotation, enumMemberType); + } catch (e) { + if (e instanceof Error) { + throw new ParserError( + hasteModuleName, + typeAnnotation, + `Failed parsing the enum ${enumName} in ${hasteModuleName} with the error: ${e.message}`, + ); + } else { + throw e; + } + } + const enumMembers = parser.parseEnumMembers(typeAnnotation); + enumMap[enumName] = { + name: enumName, + type: 'EnumDeclarationWithMembers', + memberType: enumMemberType, + members: enumMembers, + }; + return wrapNullable(nullable, { + name: enumName, + type: 'EnumDeclaration', + memberType: enumMemberType, + }); +} +function emitPromise( + hasteModuleName, + typeAnnotation, + parser, + nullable, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, +) { + assertGenericTypeAnnotationHasExactlyOneTypeParameter( + hasteModuleName, + typeAnnotation, + parser, + ); + const elementType = typeAnnotation.typeParameters.params[0]; + if ( + elementType.type === 'ExistsTypeAnnotation' || + elementType.type === 'EmptyTypeAnnotation' + ) { + return wrapNullable(nullable, { + type: 'PromiseTypeAnnotation', + }); + } else { + try { + return wrapNullable(nullable, { + type: 'PromiseTypeAnnotation', + elementType: translateTypeAnnotation( + hasteModuleName, + typeAnnotation.typeParameters.params[0], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + }); + } catch { + return wrapNullable(nullable, { + type: 'PromiseTypeAnnotation', + }); + } + } +} +function emitGenericObject(nullable) { + return wrapNullable(nullable, { + type: 'GenericObjectTypeAnnotation', + }); +} +function emitDictionary(nullable, valueType) { + return wrapNullable(nullable, { + type: 'GenericObjectTypeAnnotation', + dictionaryValueType: valueType, + }); +} +function emitObject(nullable, properties) { + return wrapNullable(nullable, { + type: 'ObjectTypeAnnotation', + properties, + }); +} +function emitFloat(nullable) { + return wrapNullable(nullable, { + type: 'FloatTypeAnnotation', + }); +} +function emitFloatProp(name, optional) { + return { + name, + optional, + typeAnnotation: { + type: 'FloatTypeAnnotation', + }, + }; +} +function emitUnion(nullable, hasteModuleName, typeAnnotation, parser) { + const unionTypes = parser.remapUnionTypeAnnotationMemberNames( + typeAnnotation.types, + ); + + // Only support unionTypes of the same kind + if (unionTypes.length > 1) { + throw new UnsupportedUnionTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + unionTypes, + ); + } + return wrapNullable(nullable, { + type: 'UnionTypeAnnotation', + memberType: unionTypes[0], + }); +} +function translateArrayTypeAnnotation( + hasteModuleName, + types, + aliasMap, + enumMap, + cxxOnly, + arrayType, + elementType, + nullable, + translateTypeAnnotation, + parser, +) { + try { + /** + * TODO(T72031674): Migrate all our NativeModule specs to not use + * invalid Array ElementTypes. Then, make the elementType a required + * parameter. + */ + const _unwrapNullable = unwrapNullable( + translateTypeAnnotation( + hasteModuleName, + elementType, + types, + aliasMap, + enumMap, + /** + * TODO(T72031674): Ensure that all ParsingErrors that are thrown + * while parsing the array element don't get captured and collected. + * Why? If we detect any parsing error while parsing the element, + * we should default it to null down the line, here. This is + * the correct behaviour until we migrate all our NativeModule specs + * to be parseable. + */ + nullGuard, + cxxOnly, + parser, + ), + ), + _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), + _elementType = _unwrapNullable2[0], + isElementTypeNullable = _unwrapNullable2[1]; + throwIfArrayElementTypeAnnotationIsUnsupported( + hasteModuleName, + elementType, + arrayType, + _elementType.type, + ); + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + // $FlowFixMe[incompatible-call] + elementType: wrapNullable(isElementTypeNullable, _elementType), + }); + } catch (ex) { + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + }); + } +} +function emitArrayType( + hasteModuleName, + typeAnnotation, + parser, + types, + aliasMap, + enumMap, + cxxOnly, + nullable, + translateTypeAnnotation, +) { + assertGenericTypeAnnotationHasExactlyOneTypeParameter( + hasteModuleName, + typeAnnotation, + parser, + ); + return translateArrayTypeAnnotation( + hasteModuleName, + types, + aliasMap, + enumMap, + cxxOnly, + typeAnnotation.type, + typeAnnotation.typeParameters.params[0], + nullable, + translateTypeAnnotation, + parser, + ); +} +function Visitor(infoMap) { + return { + CallExpression(node) { + if ( + node.callee.type === 'Identifier' && + node.callee.name === 'codegenNativeComponent' + ) { + infoMap.isComponent = true; + } + if (isModuleRegistryCall(node)) { + infoMap.isModule = true; + } + }, + InterfaceExtends(node) { + if (node.id.name === 'TurboModule') { + infoMap.isModule = true; + } + }, + TSInterfaceDeclaration(node) { + if ( + Array.isArray(node.extends) && + node.extends.some( + extension => extension.expression.name === 'TurboModule', + ) + ) { + infoMap.isModule = true; + } + }, + }; +} +function emitPartial( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, +) { + throwIfPartialWithMoreParameter(typeAnnotation); + throwIfPartialNotAnnotatingTypeParameter(typeAnnotation, types, parser); + const annotatedElement = parser.extractAnnotatedElement( + typeAnnotation, + types, + ); + const annotatedElementProperties = + parser.getAnnotatedElementProperties(annotatedElement); + const partialProperties = parser.computePartialProperties( + annotatedElementProperties, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + ); + return emitObject(nullable, partialProperties); +} +function emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, +) { + const typeMap = { + Stringish: emitStringish, + Int32: emitInt32, + Double: emitDouble, + Float: emitFloat, + UnsafeObject: emitGenericObject, + Object: emitGenericObject, + $Partial: emitPartial, + Partial: emitPartial, + BooleanTypeAnnotation: emitBoolean, + NumberTypeAnnotation: emitNumber, + VoidTypeAnnotation: emitVoid, + StringTypeAnnotation: emitString, + MixedTypeAnnotation: cxxOnly ? emitMixed : emitGenericObject, + }; + const typeAnnotationName = parser.convertKeywordToTypeAnnotation( + typeAnnotation.type, + ); + const simpleEmitter = typeMap[typeAnnotationName]; + if (simpleEmitter) { + return simpleEmitter(nullable); + } + const genericTypeAnnotationName = + parser.getTypeAnnotationName(typeAnnotation); + const emitter = typeMap[genericTypeAnnotationName]; + if (!emitter) { + return null; + } + return emitter( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); +} +function emitBoolProp(name, optional) { + return { + name, + optional, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }; +} +function emitMixedProp(name, optional) { + return { + name, + optional, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }; +} +function emitObjectProp( + name, + optional, + parser, + typeAnnotation, + extractArrayElementType, +) { + return { + name, + optional, + typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), + }; +} +function emitUnionProp(name, optional, parser, typeAnnotation) { + return { + name, + optional, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + options: typeAnnotation.types.map(option => + parser.getLiteralValue(option), + ), + }, + }; +} +module.exports = { + emitArrayType, + emitBoolean, + emitBoolProp, + emitDouble, + emitDoubleProp, + emitFloat, + emitFloatProp, + emitFunction, + emitInt32, + emitInt32Prop, + emitMixedProp, + emitNumber, + emitGenericObject, + emitDictionary, + emitObject, + emitPromise, + emitRootTag, + emitVoid, + emitString, + emitStringish, + emitStringProp, + emitMixed, + emitUnion, + emitPartial, + emitCommonTypes, + typeAliasResolution, + typeEnumResolution, + translateArrayTypeAnnotation, + Visitor, + emitObjectProp, + emitUnionProp, +}; diff --git a/packages/react-native-codegen/lib/parsers/parsers-primitives.js.flow b/packages/react-native-codegen/lib/parsers/parsers-primitives.js.flow new file mode 100644 index 000000000000..e632570db09c --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parsers-primitives.js.flow @@ -0,0 +1,728 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + Nullable, + BooleanTypeAnnotation, + DoubleTypeAnnotation, + EventTypeAnnotation, + Int32TypeAnnotation, + NamedShape, + NativeModuleAliasMap, + NativeModuleEnumMap, + NativeModuleBaseTypeAnnotation, + NativeModuleTypeAnnotation, + NativeModuleFloatTypeAnnotation, + NativeModuleFunctionTypeAnnotation, + NativeModuleGenericObjectTypeAnnotation, + NativeModuleMixedTypeAnnotation, + NativeModuleNumberTypeAnnotation, + NativeModulePromiseTypeAnnotation, + NativeModuleTypeAliasTypeAnnotation, + NativeModuleUnionTypeAnnotation, + ObjectTypeAnnotation, + ReservedTypeAnnotation, + StringTypeAnnotation, + VoidTypeAnnotation, + NativeModuleObjectTypeAnnotation, + NativeModuleEnumDeclaration, +} from '../CodegenSchema'; +import type {Parser} from './parser'; +import type { + ParserErrorCapturer, + TypeResolutionStatus, + TypeDeclarationMap, +} from './utils'; + +const { + UnsupportedUnionTypeAnnotationParserError, + UnsupportedTypeAnnotationParserError, + ParserError, +} = require('./errors'); + +const { + throwIfArrayElementTypeAnnotationIsUnsupported, + throwIfPartialNotAnnotatingTypeParameter, + throwIfPartialWithMoreParameter, +} = require('./error-utils'); +const {nullGuard} = require('./parsers-utils'); +const { + assertGenericTypeAnnotationHasExactlyOneTypeParameter, + wrapNullable, + unwrapNullable, + translateFunctionTypeAnnotation, +} = require('./parsers-commons'); + +const {isModuleRegistryCall} = require('./utils'); + +function emitBoolean(nullable: boolean): Nullable { + return wrapNullable(nullable, { + type: 'BooleanTypeAnnotation', + }); +} + +function emitInt32(nullable: boolean): Nullable { + return wrapNullable(nullable, { + type: 'Int32TypeAnnotation', + }); +} + +function emitInt32Prop( + name: string, + optional: boolean, +): NamedShape { + return { + name, + optional, + typeAnnotation: { + type: 'Int32TypeAnnotation', + }, + }; +} + +function emitNumber( + nullable: boolean, +): Nullable { + return wrapNullable(nullable, { + type: 'NumberTypeAnnotation', + }); +} + +function emitRootTag(nullable: boolean): Nullable { + return wrapNullable(nullable, { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }); +} + +function emitDouble(nullable: boolean): Nullable { + return wrapNullable(nullable, { + type: 'DoubleTypeAnnotation', + }); +} + +function emitDoubleProp( + name: string, + optional: boolean, +): NamedShape { + return { + name, + optional, + typeAnnotation: { + type: 'DoubleTypeAnnotation', + }, + }; +} + +function emitVoid(nullable: boolean): Nullable { + return wrapNullable(nullable, { + type: 'VoidTypeAnnotation', + }); +} + +function emitStringish(nullable: boolean): Nullable { + return wrapNullable(nullable, { + type: 'StringTypeAnnotation', + }); +} + +function emitFunction( + nullable: boolean, + hasteModuleName: string, + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + translateTypeAnnotation: $FlowFixMe, + parser: Parser, +): Nullable { + const translateFunctionTypeAnnotationValue: NativeModuleFunctionTypeAnnotation = + translateFunctionTypeAnnotation( + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ); + return wrapNullable(nullable, translateFunctionTypeAnnotationValue); +} + +function emitMixed( + nullable: boolean, +): Nullable { + return wrapNullable(nullable, { + type: 'MixedTypeAnnotation', + }); +} + +function emitString(nullable: boolean): Nullable { + return wrapNullable(nullable, { + type: 'StringTypeAnnotation', + }); +} + +function emitStringProp( + name: string, + optional: boolean, +): NamedShape { + return { + name, + optional, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }; +} + +function typeAliasResolution( + typeResolution: TypeResolutionStatus, + objectTypeAnnotation: ObjectTypeAnnotation< + Nullable, + >, + aliasMap: {...NativeModuleAliasMap}, + nullable: boolean, +): + | Nullable + | Nullable>> { + if (!typeResolution.successful) { + return wrapNullable(nullable, objectTypeAnnotation); + } + + /** + * All aliases RHS are required. + */ + aliasMap[typeResolution.name] = objectTypeAnnotation; + + /** + * Nullability of type aliases is transitive. + * + * Consider this case: + * + * type Animal = ?{ + * name: string, + * }; + * + * type B = Animal + * + * export interface Spec extends TurboModule { + * +greet: (animal: B) => void; + * } + * + * In this case, we follow B to Animal, and then Animal to ?{name: string}. + * + * We: + * 1. Replace `+greet: (animal: B) => void;` with `+greet: (animal: ?Animal) => void;`, + * 2. Pretend that Animal = {name: string}. + * + * Why do we do this? + * 1. In ObjC, we need to generate a struct called Animal, not B. + * 2. This design is simpler than managing nullability within both the type alias usage, and the type alias RHS. + * 3. What does it mean for a C++ struct, which is what this type alias RHS will generate, to be nullable? ¯\_(ツ)_/¯ + * Nullability is a concept that only makes sense when talking about instances (i.e: usages) of the C++ structs. + * Hence, it's better to manage nullability within the actual TypeAliasTypeAnnotation nodes, and not the + * associated ObjectTypeAnnotations. + */ + return wrapNullable(nullable, { + type: 'TypeAliasTypeAnnotation', + name: typeResolution.name, + }); +} + +function typeEnumResolution( + typeAnnotation: $FlowFixMe, + typeResolution: TypeResolutionStatus, + nullable: boolean, + hasteModuleName: string, + enumMap: {...NativeModuleEnumMap}, + parser: Parser, +): Nullable { + if (!typeResolution.successful || typeResolution.type !== 'enum') { + throw new UnsupportedTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + parser.language(), + ); + } + + const enumName = typeResolution.name; + + const enumMemberType = parser.parseEnumMembersType(typeAnnotation); + + try { + parser.validateEnumMembersSupported(typeAnnotation, enumMemberType); + } catch (e) { + if (e instanceof Error) { + throw new ParserError( + hasteModuleName, + typeAnnotation, + `Failed parsing the enum ${enumName} in ${hasteModuleName} with the error: ${e.message}`, + ); + } else { + throw e; + } + } + + const enumMembers = parser.parseEnumMembers(typeAnnotation); + + enumMap[enumName] = { + name: enumName, + type: 'EnumDeclarationWithMembers', + memberType: enumMemberType, + members: enumMembers, + }; + + return wrapNullable(nullable, { + name: enumName, + type: 'EnumDeclaration', + memberType: enumMemberType, + }); +} + +function emitPromise( + hasteModuleName: string, + typeAnnotation: $FlowFixMe, + parser: Parser, + nullable: boolean, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + translateTypeAnnotation: $FlowFixMe, +): Nullable { + assertGenericTypeAnnotationHasExactlyOneTypeParameter( + hasteModuleName, + typeAnnotation, + parser, + ); + + const elementType = typeAnnotation.typeParameters.params[0]; + if ( + elementType.type === 'ExistsTypeAnnotation' || + elementType.type === 'EmptyTypeAnnotation' + ) { + return wrapNullable(nullable, { + type: 'PromiseTypeAnnotation', + }); + } else { + try { + return wrapNullable(nullable, { + type: 'PromiseTypeAnnotation', + elementType: translateTypeAnnotation( + hasteModuleName, + typeAnnotation.typeParameters.params[0], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ), + }); + } catch { + return wrapNullable(nullable, { + type: 'PromiseTypeAnnotation', + }); + } + } +} + +function emitGenericObject( + nullable: boolean, +): Nullable { + return wrapNullable(nullable, { + type: 'GenericObjectTypeAnnotation', + }); +} + +function emitDictionary( + nullable: boolean, + valueType: Nullable, +): Nullable { + return wrapNullable(nullable, { + type: 'GenericObjectTypeAnnotation', + dictionaryValueType: valueType, + }); +} + +function emitObject( + nullable: boolean, + properties: Array<$FlowFixMe>, +): Nullable { + return wrapNullable(nullable, { + type: 'ObjectTypeAnnotation', + properties, + }); +} + +function emitFloat( + nullable: boolean, +): Nullable { + return wrapNullable(nullable, { + type: 'FloatTypeAnnotation', + }); +} + +function emitFloatProp( + name: string, + optional: boolean, +): NamedShape { + return { + name, + optional, + typeAnnotation: { + type: 'FloatTypeAnnotation', + }, + }; +} + +function emitUnion( + nullable: boolean, + hasteModuleName: string, + typeAnnotation: $FlowFixMe, + parser: Parser, +): Nullable { + const unionTypes = parser.remapUnionTypeAnnotationMemberNames( + typeAnnotation.types, + ); + + // Only support unionTypes of the same kind + if (unionTypes.length > 1) { + throw new UnsupportedUnionTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + unionTypes, + ); + } + + return wrapNullable(nullable, { + type: 'UnionTypeAnnotation', + memberType: unionTypes[0], + }); +} + +function translateArrayTypeAnnotation( + hasteModuleName: string, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + cxxOnly: boolean, + arrayType: 'Array' | 'ReadonlyArray', + elementType: $FlowFixMe, + nullable: boolean, + translateTypeAnnotation: $FlowFixMe, + parser: Parser, +): Nullable { + try { + /** + * TODO(T72031674): Migrate all our NativeModule specs to not use + * invalid Array ElementTypes. Then, make the elementType a required + * parameter. + */ + const [_elementType, isElementTypeNullable] = unwrapNullable<$FlowFixMe>( + translateTypeAnnotation( + hasteModuleName, + elementType, + types, + aliasMap, + enumMap, + /** + * TODO(T72031674): Ensure that all ParsingErrors that are thrown + * while parsing the array element don't get captured and collected. + * Why? If we detect any parsing error while parsing the element, + * we should default it to null down the line, here. This is + * the correct behaviour until we migrate all our NativeModule specs + * to be parseable. + */ + nullGuard, + cxxOnly, + parser, + ), + ); + + throwIfArrayElementTypeAnnotationIsUnsupported( + hasteModuleName, + elementType, + arrayType, + _elementType.type, + ); + + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + // $FlowFixMe[incompatible-call] + elementType: wrapNullable(isElementTypeNullable, _elementType), + }); + } catch (ex) { + return wrapNullable(nullable, { + type: 'ArrayTypeAnnotation', + }); + } +} + +function emitArrayType( + hasteModuleName: string, + typeAnnotation: $FlowFixMe, + parser: Parser, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + cxxOnly: boolean, + nullable: boolean, + translateTypeAnnotation: $FlowFixMe, +): Nullable { + assertGenericTypeAnnotationHasExactlyOneTypeParameter( + hasteModuleName, + typeAnnotation, + parser, + ); + + return translateArrayTypeAnnotation( + hasteModuleName, + types, + aliasMap, + enumMap, + cxxOnly, + typeAnnotation.type, + typeAnnotation.typeParameters.params[0], + nullable, + translateTypeAnnotation, + parser, + ); +} + +function Visitor(infoMap: {isComponent: boolean, isModule: boolean}): { + [type: string]: (node: $FlowFixMe) => void, +} { + return { + CallExpression(node: $FlowFixMe) { + if ( + node.callee.type === 'Identifier' && + node.callee.name === 'codegenNativeComponent' + ) { + infoMap.isComponent = true; + } + + if (isModuleRegistryCall(node)) { + infoMap.isModule = true; + } + }, + InterfaceExtends(node: $FlowFixMe) { + if (node.id.name === 'TurboModule') { + infoMap.isModule = true; + } + }, + TSInterfaceDeclaration(node: $FlowFixMe) { + if ( + Array.isArray(node.extends) && + node.extends.some( + extension => extension.expression.name === 'TurboModule', + ) + ) { + infoMap.isModule = true; + } + }, + }; +} + +function emitPartial( + nullable: boolean, + hasteModuleName: string, + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + parser: Parser, +): Nullable { + throwIfPartialWithMoreParameter(typeAnnotation); + + throwIfPartialNotAnnotatingTypeParameter(typeAnnotation, types, parser); + + const annotatedElement = parser.extractAnnotatedElement( + typeAnnotation, + types, + ); + const annotatedElementProperties = + parser.getAnnotatedElementProperties(annotatedElement); + + const partialProperties = parser.computePartialProperties( + annotatedElementProperties, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + ); + + return emitObject(nullable, partialProperties); +} + +function emitCommonTypes( + hasteModuleName: string, + types: TypeDeclarationMap, + typeAnnotation: $FlowFixMe, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + nullable: boolean, + parser: Parser, +): $FlowFixMe { + const typeMap = { + Stringish: emitStringish, + Int32: emitInt32, + Double: emitDouble, + Float: emitFloat, + UnsafeObject: emitGenericObject, + Object: emitGenericObject, + $Partial: emitPartial, + Partial: emitPartial, + BooleanTypeAnnotation: emitBoolean, + NumberTypeAnnotation: emitNumber, + VoidTypeAnnotation: emitVoid, + StringTypeAnnotation: emitString, + MixedTypeAnnotation: cxxOnly ? emitMixed : emitGenericObject, + }; + + const typeAnnotationName = parser.convertKeywordToTypeAnnotation( + typeAnnotation.type, + ); + + const simpleEmitter = typeMap[typeAnnotationName]; + if (simpleEmitter) { + return simpleEmitter(nullable); + } + + const genericTypeAnnotationName = + parser.getTypeAnnotationName(typeAnnotation); + + const emitter = typeMap[genericTypeAnnotationName]; + if (!emitter) { + return null; + } + + return emitter( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); +} + +function emitBoolProp( + name: string, + optional: boolean, +): NamedShape { + return { + name, + optional, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }; +} + +function emitMixedProp( + name: string, + optional: boolean, +): NamedShape { + return { + name, + optional, + typeAnnotation: { + type: 'MixedTypeAnnotation', + }, + }; +} + +function emitObjectProp( + name: string, + optional: boolean, + parser: Parser, + typeAnnotation: $FlowFixMe, + extractArrayElementType: ( + typeAnnotation: $FlowFixMe, + name: string, + parser: Parser, + ) => EventTypeAnnotation, +): NamedShape { + return { + name, + optional, + typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), + }; +} + +function emitUnionProp( + name: string, + optional: boolean, + parser: Parser, + typeAnnotation: $FlowFixMe, +): NamedShape { + return { + name, + optional, + typeAnnotation: { + type: 'StringEnumTypeAnnotation', + options: typeAnnotation.types.map(option => + parser.getLiteralValue(option), + ), + }, + }; +} + +module.exports = { + emitArrayType, + emitBoolean, + emitBoolProp, + emitDouble, + emitDoubleProp, + emitFloat, + emitFloatProp, + emitFunction, + emitInt32, + emitInt32Prop, + emitMixedProp, + emitNumber, + emitGenericObject, + emitDictionary, + emitObject, + emitPromise, + emitRootTag, + emitVoid, + emitString, + emitStringish, + emitStringProp, + emitMixed, + emitUnion, + emitPartial, + emitCommonTypes, + typeAliasResolution, + typeEnumResolution, + translateArrayTypeAnnotation, + Visitor, + emitObjectProp, + emitUnionProp, +}; diff --git a/packages/react-native-codegen/lib/parsers/parsers-utils.js b/packages/react-native-codegen/lib/parsers/parsers-utils.js new file mode 100644 index 000000000000..fd91c47e0938 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parsers-utils.js @@ -0,0 +1,18 @@ +/** + * 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. + * + * @format + * + */ + +'use strict'; + +function nullGuard(fn) { + return fn(); +} +module.exports = { + nullGuard, +}; diff --git a/packages/react-native-codegen/lib/parsers/parsers-utils.js.flow b/packages/react-native-codegen/lib/parsers/parsers-utils.js.flow new file mode 100644 index 000000000000..696d308c990d --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/parsers-utils.js.flow @@ -0,0 +1,19 @@ +/** + * 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. + * + * @format + * @flow strict + */ + +'use strict'; + +function nullGuard(fn: () => T): ?T { + return fn(); +} + +module.exports = { + nullGuard, +}; diff --git a/packages/react-native-codegen/lib/parsers/schema.js b/packages/react-native-codegen/lib/parsers/schema.js new file mode 100644 index 000000000000..9a2143274c65 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/schema.js @@ -0,0 +1,99 @@ +/** + * 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. + * + * @format + * + */ + +'use strict'; + +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && + (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), + t.push.apply(t, o); + } + return t; +} +function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 + ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) + : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; +} +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +function wrapComponentSchema({ + filename, + componentName, + extendsProps, + events, + props, + options, + commands, +}) { + return { + modules: { + [filename]: { + type: 'Component', + components: { + [componentName]: _objectSpread( + _objectSpread({}, options || {}), + {}, + { + extendsProps, + events, + props, + commands, + }, + ), + }, + }, + }, + }; +} +module.exports = { + wrapComponentSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/schema.js.flow b/packages/react-native-codegen/lib/parsers/schema.js.flow new file mode 100644 index 000000000000..0fdf3c375114 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/schema.js.flow @@ -0,0 +1,62 @@ +/** + * 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. + * + * @format + * @flow strict + */ + +'use strict'; + +import type { + EventTypeShape, + NamedShape, + CommandTypeAnnotation, + PropTypeAnnotation, + ExtendsPropsShape, + SchemaType, + OptionsShape, +} from '../CodegenSchema.js'; + +export type ComponentSchemaBuilderConfig = $ReadOnly<{ + filename: string, + componentName: string, + extendsProps: $ReadOnlyArray, + events: $ReadOnlyArray, + props: $ReadOnlyArray>, + commands: $ReadOnlyArray>, + options?: ?OptionsShape, +}>; + +function wrapComponentSchema({ + filename, + componentName, + extendsProps, + events, + props, + options, + commands, +}: ComponentSchemaBuilderConfig): SchemaType { + return { + modules: { + [filename]: { + type: 'Component', + components: { + [componentName]: { + ...(options || {}), + extendsProps, + events, + props, + commands, + }, + }, + }, + }, + }; +} + +module.exports = { + wrapComponentSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/schema/index.d.ts b/packages/react-native-codegen/lib/parsers/schema/index.d.ts new file mode 100644 index 000000000000..cb298ccc9f15 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/schema/index.d.ts @@ -0,0 +1,10 @@ +/** + * 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. + */ + +import type { SchemaType } from '../../CodegenSchema'; + +export declare function parse(filename: string): SchemaType | undefined; diff --git a/packages/react-native-codegen/lib/parsers/schema/index.js b/packages/react-native-codegen/lib/parsers/schema/index.js new file mode 100644 index 000000000000..6016ece25b65 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/schema/index.js @@ -0,0 +1,23 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function parse(filename) { + try { + // $FlowFixMe[unsupported-syntax] Can't require dynamic variables + return require(filename); + } catch (err) { + // Ignore + } +} +module.exports = { + parse, +}; diff --git a/packages/react-native-codegen/lib/parsers/schema/index.js.flow b/packages/react-native-codegen/lib/parsers/schema/index.js.flow new file mode 100644 index 000000000000..646aa86fcee8 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/schema/index.js.flow @@ -0,0 +1,26 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +'use strict'; + +import type {SchemaType} from '../../CodegenSchema.js'; + +function parse(filename: string): ?SchemaType { + try { + // $FlowFixMe[unsupported-syntax] Can't require dynamic variables + return require(filename); + } catch (err) { + // Ignore + } +} + +module.exports = { + parse, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js new file mode 100644 index 000000000000..fe90d864598a --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js @@ -0,0 +1,489 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const COMMANDS_DEFINED_INLINE = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // No props +} + +export const Commands = codegenNativeCommands<{ + readonly hotspotUpdate: ( + ref: React.Ref<'RCTView'>, + x: Int32, + y: Int32, + ) => void; +}>({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const COMMANDS_DEFINED_MULTIPLE_TIMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: ( + viewRef: React.Ref<'RCTView'>, + x: Int32, + y: Int32, + ) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); +export const Commands2 = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const COMMANDS_DEFINED_WITHOUT_REF = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (x: Int32, y: Int32) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'> | null | undefined, x: Int32, y: Int32) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + readonly scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + readonly scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands(); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const NULLABLE_WITH_DEFAULT = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + nullable_with_default: WithDefault | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + required_key_with_default: WithDefault; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROPS_CONFLICT_NAMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + isEnabled: string, + + isEnabled: boolean, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type PropsInFile = Readonly<{ + isEnabled: boolean, +}>; + +export interface ModuleProps extends ViewProps, PropsInFile { + isEnabled: boolean, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROP_NUMBER_TYPE = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + someProp: number +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROP_MIXED_ENUM = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault<'foo' | 1, 1>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROP_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROP_ARRAY_MIXED_ENUM = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault, 1>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROP_ARRAY_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault, false>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROP_ARRAY_ENUM_INT = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault, 0>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +module.exports = { + COMMANDS_DEFINED_INLINE, + COMMANDS_DEFINED_MULTIPLE_TIMES, + COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_REF, + COMMANDS_DEFINED_WITH_NULLABLE_REF, + NULLABLE_WITH_DEFAULT, + NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, + PROPS_CONFLICT_NAMES, + PROPS_CONFLICT_WITH_SPREAD_PROPS, + PROP_NUMBER_TYPE, + PROP_MIXED_ENUM, + PROP_ENUM_BOOLEAN, + PROP_ARRAY_MIXED_ENUM, + PROP_ARRAY_ENUM_BOOLEAN, + PROP_ARRAY_ENUM_INT, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js.flow b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js.flow new file mode 100644 index 000000000000..eefd9e316f18 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js.flow @@ -0,0 +1,505 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const COMMANDS_DEFINED_INLINE = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // No props +} + +export const Commands = codegenNativeCommands<{ + readonly hotspotUpdate: ( + ref: React.Ref<'RCTView'>, + x: Int32, + y: Int32, + ) => void; +}>({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const COMMANDS_DEFINED_MULTIPLE_TIMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: ( + viewRef: React.Ref<'RCTView'>, + x: Int32, + y: Int32, + ) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); +export const Commands2 = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const COMMANDS_DEFINED_WITHOUT_REF = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (x: Int32, y: Int32) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'> | null | undefined, x: Int32, y: Int32) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['hotspotUpdate'], +}); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + readonly scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +interface NativeCommands { + readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; + readonly scrollTo: ( + viewRef: React.Ref<'RCTView'>, + y: Int32, + animated: boolean, + ) => void; +} + +export interface ModuleProps extends ViewProps { + // No props or events +} + +export const Commands = codegenNativeCommands(); + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const NULLABLE_WITH_DEFAULT = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + nullable_with_default: WithDefault | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {WithDefault, Float} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + required_key_with_default: WithDefault; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROPS_CONFLICT_NAMES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + isEnabled: string, + + isEnabled: boolean, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type PropsInFile = Readonly<{ + isEnabled: boolean, +}>; + +export interface ModuleProps extends ViewProps, PropsInFile { + isEnabled: boolean, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROP_NUMBER_TYPE = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + someProp: number +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROP_MIXED_ENUM = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault<'foo' | 1, 1>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROP_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROP_ARRAY_MIXED_ENUM = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault, 1>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROP_ARRAY_ENUM_BOOLEAN = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault, false>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROP_ARRAY_ENUM_INT = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type {WithDefault} from 'CodegenTypes'; + +export interface ModuleProps extends ViewProps { + someProp?: WithDefault, 0>; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +module.exports = { + COMMANDS_DEFINED_INLINE, + COMMANDS_DEFINED_MULTIPLE_TIMES, + COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, + COMMANDS_DEFINED_WITHOUT_REF, + COMMANDS_DEFINED_WITH_NULLABLE_REF, + NULLABLE_WITH_DEFAULT, + NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, + PROPS_CONFLICT_NAMES, + PROPS_CONFLICT_WITH_SPREAD_PROPS, + PROP_NUMBER_TYPE, + PROP_MIXED_ENUM, + PROP_ENUM_BOOLEAN, + PROP_ARRAY_MIXED_ENUM, + PROP_ARRAY_ENUM_BOOLEAN, + PROP_ARRAY_ENUM_INT, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js new file mode 100644 index 000000000000..e56e3fc3abc8 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js @@ -0,0 +1,1228 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const EVENT_DEFINITION = ` + boolean_required: boolean; + boolean_optional_key?: boolean; + boolean_optional_value: boolean | null | undefined; + boolean_optional_both?: boolean | null | undefined; + + string_required: string; + string_optional_key?: (string); + string_optional_value: (string) | null | undefined; + string_optional_both?: (string | null | undefined); + + double_required: Double; + double_optional_key?: Double; + double_optional_value: Double | null | undefined; + double_optional_both?: Double | null | undefined; + + float_required: Float; + float_optional_key?: Float; + float_optional_value: Float | null | undefined; + float_optional_both?: Float | null | undefined; + + int32_required: Int32; + int32_optional_key?: Int32; + int32_optional_value: Int32 | null | undefined; + int32_optional_both?: Int32 | null | undefined; + + enum_required: 'small' | 'large'; + enum_optional_key?: 'small' | 'large'; + enum_optional_value: ('small' | 'large') | null | undefined; + enum_optional_both?: ('small' | 'large') | null | undefined; + + object_required: { + boolean_required: boolean; + }; + + object_optional_key?: { + string_optional_key?: string; + }; + + object_optional_value: { + float_optional_value: Float | null | undefined; + } | null | undefined; + + object_optional_both?: { + int32_optional_both?: Int32 | null | undefined; + } | null | undefined; + + object_required_nested_2_layers: { + object_optional_nested_1_layer?: { + boolean_required: Int32; + string_optional_key?: string; + double_optional_value: Double | null | undefined; + float_optional_value: Float | null | undefined; + int32_optional_both?: Int32 | null | undefined; + } | null | undefined; + }; + + object_readonly_required: Readonly<{ + boolean_required: boolean; + }>; + + object_readonly_optional_key?: Readonly<{ + string_optional_key?: string; + }>; + + object_readonly_optional_value: Readonly<{ + float_optional_value: Float | null | undefined; + }> | null | undefined; + + object_readonly_optional_both?: Readonly<{ + int32_optional_both?: Int32 | null | undefined; + }> | null | undefined; + + boolean_array_required: boolean[]; + boolean_array_optional_key?: boolean[]; + boolean_array_optional_value: boolean[] | null | undefined; + boolean_array_optional_both?: boolean[] | null | undefined; + + string_array_required: string[]; + string_array_optional_key?: (string[]); + string_array_optional_value: (string[]) | null | undefined; + string_array_optional_both?: (string[] | null | undefined); + + double_array_required: Double[]; + double_array_optional_key?: Double[]; + double_array_optional_value: Double[] | null | undefined; + double_array_optional_both?: Double[] | null | undefined; + + float_array_required: Float[]; + float_array_optional_key?: Float[]; + float_array_optional_value: Float[] | null | undefined; + float_array_optional_both?: Float[] | null | undefined; + + int32_array_required: Int32[]; + int32_array_optional_key?: Int32[]; + int32_array_optional_value: Int32[] | null | undefined; + int32_array_optional_both?: Int32[] | null | undefined; + + enum_array_required: ('small' | 'large')[]; + enum_array_optional_key?: ('small' | 'large')[]; + enum_array_optional_value: ('small' | 'large')[] | null | undefined; + enum_array_optional_both?: ('small' | 'large')[] | null | undefined; + + object_array_required: { + boolean_required: boolean; + }[]; + + object_array_optional_key?: { + string_optional_key?: string; + }[]; + + object_array_optional_value: { + float_optional_value: Float | null | undefined; + }[] | null | undefined; + + object_array_optional_both?: { + int32_optional_both?: Int32 | null | undefined; + }[] | null | undefined; + + int32_array_array_required: Int32[][]; + int32_array_array_optional_key?: Int32[][]; + int32_array_array_optional_value: Int32[][] | null | undefined; + int32_array_array_optional_both?: Int32[][] | null | undefined; +`; +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export interface ModuleProps extends ViewProps { + // Props + boolean_default_true_optional_both?: WithDefault; + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler; + onBubblingEventDefinedInlineNull: BubblingEventHandler; +} + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + paperComponentName: 'RCTModule', +}) as HostComponent; +`; +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // Props + boolean_default_true_optional_both?: WithDefault; + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler; + onBubblingEventDefinedInlineNull: BubblingEventHandler; +} + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + excludedPlatforms: ['android'], + paperComponentName: 'RCTModule', +}) as HostComponent; +`; +const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + +} + +export default codegenNativeComponent('Module', { + deprecatedViewConfigName: 'DeprecateModuleName', +}) as HostComponent; +`; +const ALL_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, + DimensionValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + boolean_required: boolean; + boolean_optional_key?: WithDefault; + boolean_optional_both?: WithDefault; + + // Boolean props, null default + boolean_null_optional_key?: WithDefault; + boolean_null_optional_both?: WithDefault; + + // String props + string_required: string; + string_optional_key?: WithDefault; + string_optional_both?: WithDefault; + + // String props, null default + string_null_optional_key?: WithDefault; + string_null_optional_both?: WithDefault; + + // Stringish props + stringish_required: Stringish; + stringish_optional_key?: WithDefault; + stringish_optional_both?: WithDefault; + + // Stringish props, null default + stringish_null_optional_key?: WithDefault; + stringish_null_optional_both?: WithDefault; + + // Double props + double_required: Double; + double_optional_key?: WithDefault; + double_optional_both?: WithDefault; + + // Float props + float_required: Float; + float_optional_key?: WithDefault; + float_optional_both?: WithDefault; + + // Float props, null default + float_null_optional_key?: WithDefault; + float_null_optional_both?: WithDefault; + + // Int32 props + int32_required: Int32; + int32_optional_key?: WithDefault; + int32_optional_both?: WithDefault; + + // String enum props + enum_optional_key?: WithDefault<'small' | 'large', 'small'>; + enum_optional_both?: WithDefault<'small' | 'large', 'small'>; + + // Int enum props + int_enum_optional_key?: WithDefault<0 | 1, 0>; + + // Object props + object_optional_key?: Readonly<{prop: string}>; + object_optional_both?: Readonly<{prop: string} | null | undefined>; + object_optional_value: Readonly<{prop: string} | null | undefined>; + + // ImageSource props + image_required: ImageSource; + image_optional_value: ImageSource | null | undefined; + image_optional_both?: ImageSource | null | undefined; + + // ColorValue props + color_required: ColorValue; + color_optional_key?: ColorValue; + color_optional_value: ColorValue | null | undefined; + color_optional_both?: ColorValue | null | undefined; + + // ColorArrayValue props + color_array_required: ColorArrayValue; + color_array_optional_key?: ColorArrayValue; + color_array_optional_value: ColorArrayValue | null | undefined; + color_array_optional_both?: ColorArrayValue | null | undefined; + + // ProcessedColorValue props + processed_color_required: ProcessedColorValue; + processed_color_optional_key?: ProcessedColorValue; + processed_color_optional_value: ProcessedColorValue | null | undefined; + processed_color_optional_both?: ProcessedColorValue | null | undefined; + + // PointValue props + point_required: PointValue; + point_optional_key?: PointValue; + point_optional_value: PointValue | null | undefined; + point_optional_both?: PointValue | null | undefined; + + // EdgeInsets props + insets_required: EdgeInsetsValue; + insets_optional_key?: EdgeInsetsValue; + insets_optional_value: EdgeInsetsValue | null | undefined; + insets_optional_both?: EdgeInsetsValue | null | undefined; + + + // DimensionValue props + dimension_required: DimensionValue; + dimension_optional_key?: DimensionValue; + dimension_optional_value: DimensionValue | null | undefined; + dimension_optional_both?: DimensionValue | null | undefined; + + // Mixed props + mixed_required: UnsafeMixed, + mixed_optional_key?: UnsafeMixed, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const ARRAY_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, + DimensionValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ObjectType = Readonly<{prop: string}>; +type ArrayObjectType = ReadonlyArray>; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + array_boolean_required: ReadonlyArray; + array_boolean_optional_key?: ReadonlyArray; + array_boolean_optional_value: ReadonlyArray | null | undefined; + array_boolean_optional_both?: ReadonlyArray | null | undefined; + + // String props + array_string_required: ReadonlyArray; + array_string_optional_key?: ReadonlyArray; + array_string_optional_value: ReadonlyArray | null | undefined; + array_string_optional_both?: ReadonlyArray | null | undefined; + + // Double props + array_double_required: ReadonlyArray; + array_double_optional_key?: ReadonlyArray; + array_double_optional_value: ReadonlyArray | null | undefined; + array_double_optional_both?: ReadonlyArray | null | undefined; + + // Float props + array_float_required: ReadonlyArray; + array_float_optional_key?: ReadonlyArray; + array_float_optional_value: ReadonlyArray | null | undefined; + array_float_optional_both?: ReadonlyArray | null | undefined; + + // Int32 props + array_int32_required: ReadonlyArray; + array_int32_optional_key?: ReadonlyArray; + array_int32_optional_value: ReadonlyArray | null | undefined; + array_int32_optional_both?: ReadonlyArray | null | undefined; + + // String enum props + array_enum_optional_key?: WithDefault< + ReadonlyArray<'small' | 'large'>, + 'small' + >; + array_enum_optional_both?: WithDefault< + ReadonlyArray<'small' | 'large'>, + 'small' + >; + + // ImageSource props + array_image_required: ReadonlyArray; + array_image_optional_key?: ReadonlyArray; + array_image_optional_value: ReadonlyArray | null | undefined; + array_image_optional_both?: ReadonlyArray | null | undefined; + + // ColorValue props + array_color_required: ReadonlyArray; + array_color_optional_key?: ReadonlyArray; + array_color_optional_value: ReadonlyArray | null | undefined; + array_color_optional_both?: ReadonlyArray | null | undefined; + + // PointValue props + array_point_required: ReadonlyArray; + array_point_optional_key?: ReadonlyArray; + array_point_optional_value: ReadonlyArray | null | undefined; + array_point_optional_both?: ReadonlyArray | null | undefined; + + // EdgeInsetsValue props + array_insets_required: ReadonlyArray; + array_insets_optional_key?: ReadonlyArray; + array_insets_optional_value: ReadonlyArray | null | undefined; + array_insets_optional_both?: ReadonlyArray | null | undefined; + + // DimensionValue props + array_dimension_required: ReadonlyArray; + array_dimension_optional_key?: ReadonlyArray; + array_dimension_optional_value: ReadonlyArray | null | undefined; + array_dimension_optional_both?: ReadonlyArray | null | undefined; + + // Object props + array_object_required: ReadonlyArray>; + array_object_optional_key?: ReadonlyArray>; + array_object_optional_value: ArrayObjectType | null | undefined; + array_object_optional_both?: ReadonlyArray | null | undefined; + + // Nested array object types + array_of_array_object_required: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_required: ReadonlyArray>; + }> + >; + array_of_array_object_optional_key?: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_key: ReadonlyArray>; + }> + >; + array_of_array_object_optional_value: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_value: ReadonlyArray< + Readonly<{prop: string | null | undefined}> + >; + }> + > | null | undefined; + array_of_array_object_optional_both?: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_both: ReadonlyArray< + Readonly<{prop?: string | null | undefined}> + >; + }> + > | null | undefined; + + // Nested array of array of object types + array_of_array_of_object_required: ReadonlyArray< + ReadonlyArray< + Readonly<{ + prop: string; + }> + > + >; + + // Nested array of array of object types (in file) + array_of_array_of_object_required_in_file: ReadonlyArray< + ReadonlyArray + >; + + // Nested array of array of object types (with spread) + array_of_array_of_object_required_with_spread: ReadonlyArray< + ReadonlyArray< + Readonly, + >, + >, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const ARRAY2_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ObjectType = Readonly<{prop: string}>; +type ArrayObjectType = readonly Readonly<{prop: string}>[]; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + array_boolean_required: readonly boolean[]; + array_boolean_optional_key?: readonly boolean[]; + array_boolean_optional_value: readonly boolean[] | null | undefined; + array_boolean_optional_both?: readonly boolean[] | null | undefined; + + // String props + array_string_required: readonly string[]; + array_string_optional_key?: readonly string[]; + array_string_optional_value: readonly string[] | null | undefined; + array_string_optional_both?: readonly string[] | null | undefined; + + // Double props + array_double_required: readonly Double[]; + array_double_optional_key?: readonly Double[]; + array_double_optional_value: readonly Double[] | null | undefined; + array_double_optional_both?: readonly Double[] | null | undefined; + + // Float props + array_float_required: readonly Float[]; + array_float_optional_key?: readonly Float[]; + array_float_optional_value: readonly Float[] | null | undefined; + array_float_optional_both?: readonly Float[] | null | undefined; + + // Int32 props + array_int32_required: readonly Int32[]; + array_int32_optional_key?: readonly Int32[]; + array_int32_optional_value: readonly Int32[] | null | undefined; + array_int32_optional_both?: readonly Int32[] | null | undefined; + + // String enum props + array_enum_optional_key?: WithDefault< + readonly ('small' | 'large')[], + 'small' + >; + array_enum_optional_both?: WithDefault< + readonly ('small' | 'large')[], + 'small' + >; + + // ImageSource props + array_image_required: readonly ImageSource[]; + array_image_optional_key?: readonly ImageSource[]; + array_image_optional_value: readonly ImageSource[] | null | undefined; + array_image_optional_both?: readonly ImageSource[] | null | undefined; + + // ColorValue props + array_color_required: readonly ColorValue[]; + array_color_optional_key?: readonly ColorValue[]; + array_color_optional_value: readonly ColorValue[] | null | undefined; + array_color_optional_both?: readonly ColorValue[] | null | undefined; + + // PointValue props + array_point_required: readonly PointValue[]; + array_point_optional_key?: readonly PointValue[]; + array_point_optional_value: readonly PointValue[] | null | undefined; + array_point_optional_both?: readonly PointValue[] | null | undefined; + + // EdgeInsetsValue props + array_insets_required: readonly EdgeInsetsValue[]; + array_insets_optional_key?: readonly EdgeInsetsValue[]; + array_insets_optional_value: readonly EdgeInsetsValue[] | null | undefined; + array_insets_optional_both?: readonly EdgeInsetsValue[] | null | undefined; + + // Object props + array_object_required: readonly Readonly<{prop: string}>[]; + array_object_optional_key?: readonly Readonly<{prop: string}>[]; + array_object_optional_value: ArrayObjectType | null | undefined; + array_object_optional_both?: readonly ObjectType[] | null | undefined; + + // Nested array object types + array_of_array_object_required: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_required: readonly Readonly<{prop: string}>[]; + }>[]; + array_of_array_object_optional_key?: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_key: readonly Readonly<{prop?: string}>[]; + }>[]; + array_of_array_object_optional_value: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_value: readonly Readonly<{prop: string | null | undefined}>[]; + }>[] | null | undefined; + array_of_array_object_optional_both?: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_both: readonly Readonly<{prop?: string | null | undefined}>[]; + }>[] | null | undefined; + + // Nested array of array of object types + array_of_array_of_object_required: readonly Readonly<{ + prop: string; + }>[][]; + + // Nested array of array of object types (in file) + array_of_array_of_object_required_in_file: readonly ObjectType[][]; + + // Nested array of array of object types (with spread) + array_of_array_of_object_required_with_spread: readonly Readonly[][]; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const OBJECT_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, + DimensionValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + boolean_required: Readonly<{prop: boolean}>; + boolean_optional: Readonly<{prop?: WithDefault}>; + + // String props + string_required: Readonly<{prop: string}>; + string_optional: Readonly<{prop?: WithDefault}>; + + // Double props + double_required: Readonly<{prop: Double}>; + double_optional: Readonly<{prop?: WithDefault}>; + + // Float props + float_required: Readonly<{prop: Float}>; + float_optional: Readonly<{prop?: WithDefault}>; + + // Int32 props + int_required: Readonly<{prop: Int32}>; + int_optional: Readonly<{prop?: WithDefault}>; + + // String enum props + enum_optional: Readonly<{ + prop?: WithDefault, 'small'>; + }>; + + // ImageSource props + image_required: Readonly<{prop: ImageSource}>; + image_optional_key: Readonly<{prop?: ImageSource}>; + image_optional_value: Readonly<{prop: ImageSource | null | undefined}>; + image_optional_both: Readonly<{prop?: ImageSource | null | undefined}>; + + // ColorValue props + color_required: Readonly<{prop: ColorValue}>; + color_optional_key: Readonly<{prop?: ColorValue}>; + color_optional_value: Readonly<{prop: ColorValue | null | undefined}>; + color_optional_both: Readonly<{prop?: ColorValue | null | undefined}>; + + // ProcessedColorValue props + processed_color_required: Readonly<{prop: ProcessedColorValue}>; + processed_color_optional_key: Readonly<{prop?: ProcessedColorValue}>; + processed_color_optional_value: Readonly<{ + prop: ProcessedColorValue | null | undefined; + }>; + processed_color_optional_both: Readonly<{ + prop?: ProcessedColorValue | null | undefined; + }>; + + // PointValue props + point_required: Readonly<{prop: PointValue}>; + point_optional_key: Readonly<{prop?: PointValue}>; + point_optional_value: Readonly<{prop: PointValue | null | undefined}>; + point_optional_both: Readonly<{prop?: PointValue | null | undefined}>; + + // EdgeInsetsValue props + insets_required: Readonly<{prop: EdgeInsetsValue}>; + insets_optional_key: Readonly<{prop?: EdgeInsetsValue}>; + insets_optional_value: Readonly<{prop: EdgeInsetsValue | null | undefined}>; + insets_optional_both: Readonly<{prop?: EdgeInsetsValue | null | undefined}>; + + // DimensionValue props + dimension_required: Readonly<{prop: DimensionValue}>; + dimension_optional_key: Readonly<{prop?: DimensionValue}>; + dimension_optional_value: Readonly<{prop: DimensionValue | null | undefined}>; + dimension_optional_both: Readonly<{prop?: DimensionValue | null | undefined}>; + + // Nested object props + object_required: Readonly<{prop: Readonly<{nestedProp: string}>}>; + object_optional_key?: Readonly<{prop: Readonly<{nestedProp: string}>}>; + object_optional_value: Readonly<{ + prop: Readonly<{nestedProp: string}>; + }> | null | undefined; + object_optional_both?: Readonly<{ + prop: Readonly<{nestedProp: string}>; + }> | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROPS_ALIASED_LOCALLY = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type DeepSpread = Readonly<{ + otherStringProp: string; +}>; + +export interface PropsInFile extends DeepSpread { + isEnabled: boolean; + label: string; +} + +type ReadOnlyPropsInFile = Readonly; + +export interface ModuleProps extends ViewProps, ReadOnlyPropsInFile { + localType: ReadOnlyPropsInFile; + localArr: ReadonlyArray; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + */ + +import type {HostComponent} from 'react-native'; +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + Int32, + Double, + Float, + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; + +import type {ViewProps} from 'ViewPropTypes'; + +export interface ModuleProps extends ViewProps { + // No Props + + // Events + onDirectEventDefinedInline: DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >; + + onDirectEventDefinedInlineOptionalKey?: (DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >); + + onDirectEventDefinedInlineOptionalValue: (DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >) | null | undefined; + + onDirectEventDefinedInlineOptionalBoth?: (DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + > | null | undefined); + + onDirectEventDefinedInlineWithPaperName?: DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }>, + 'paperDirectEventDefinedInlineWithPaperName' + > | null | undefined; + + onBubblingEventDefinedInline: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >; + + onBubblingEventDefinedInlineOptionalKey?: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >; + + onBubblingEventDefinedInlineOptionalValue: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + > | null | undefined; + + onBubblingEventDefinedInlineOptionalBoth?: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + > | null | undefined; + + onBubblingEventDefinedInlineWithPaperName?: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }>, + 'paperBubblingEventDefinedInlineWithPaperName' + > | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const EVENTS_DEFINED_AS_NULL_INLINE = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // No props + + // Events defined inline + onDirectEventDefinedInlineNull: DirectEventHandler; + onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler; + onDirectEventDefinedInlineNullOptionalValue: DirectEventHandler | null | undefined; + onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler; + onDirectEventDefinedInlineNullWithPaperName?: DirectEventHandler< + null, + 'paperDirectEventDefinedInlineNullWithPaperName' + > | null | undefined; + + onBubblingEventDefinedInlineNull: BubblingEventHandler; + onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler; + onBubblingEventDefinedInlineNullOptionalValue: BubblingEventHandler | null | undefined; + onBubblingEventDefinedInlineNullOptionalBoth?: BubblingEventHandler | null | undefined; + onBubblingEventDefinedInlineNullWithPaperName?: BubblingEventHandler< + undefined, + 'paperBubblingEventDefinedInlineNullWithPaperName' + > | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROPS_AND_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; + +export type EventInFile = Readonly<{ + ${EVENT_DEFINITION} +}>; + +export interface ModuleProps extends ViewProps { + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler; + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler< + EventInFile, + 'paperBubblingEventDefinedInlineWithPaperName' + >; + onDirectEventDefinedInline: DirectEventHandler; + onDirectEventDefinedInlineWithPaperName: DirectEventHandler< + EventInFile, + 'paperDirectEventDefinedInlineWithPaperName' + >; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const PROPS_AS_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {HostComponent} from 'react-native'; + +export type String = string; +export type AnotherArray = ReadonlyArray; + +export interface ModuleProps { + disable: String; + array: AnotherArray; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; +const COMMANDS_DEFINED_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + */ + + const codegenNativeCommands = require('codegenNativeCommands'); + const codegenNativeComponent = require('codegenNativeComponent'); + + import type {Int32, Double, Float} from 'CodegenTypes'; + import type {RootTag} from 'RCTExport'; + import type {ViewProps} from 'ViewPropTypes'; + import type {HostComponent} from 'react-native'; + + +export interface ModuleProps extends ViewProps { + // No props or events +} + +type NativeType = HostComponent; + + interface NativeCommands { + readonly handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; + readonly hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; + scrollTo( + viewRef: React.ElementRef, + x: Float, + y: Int32, + z: Double, + animated: boolean, + ): void; + } + + export const Commands = codegenNativeCommands({ + supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], + }); + +export default codegenNativeComponent( + 'Module', +) as NativeType; +`; +const COMMANDS_WITH_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export interface ModuleProps extends ViewProps { + // No props or events +} + +type NativeType = HostComponent; + +export type ScrollTo = ( + viewRef: React.ElementRef, + y: Int, + animated: Boolean, +) => Void; + +interface NativeCommands { + readonly scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); + +export default codegenNativeComponent('Module') as NativeType; + +`; +const COMMANDS_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + */ + +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type EventInFile = Readonly<{ + ${EVENT_DEFINITION} +}>; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export interface ModuleProps extends ViewProps { + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler, + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, + onDirectEventDefinedInline: DirectEventHandler, + onDirectEventDefinedInlineWithPaperName: DirectEventHandler, +} + +// Add state here +export interface ModuleNativeState { + boolean_required: boolean, + boolean_optional_key?: WithDefault, + boolean_optional_both?: WithDefault, +} + +type NativeType = HostComponent; + +export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; + +interface NativeCommands { + readonly scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'] +}); + +export default codegenNativeComponent( + 'Module', +) as NativeType; +`; +const PROPS_AND_EVENTS_WITH_INTERFACES = ` +import type { + BubblingEventHandler, + DirectEventHandler, + Int32, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export interface Base1 { + readonly x: string; +} + +export interface Base2 { + readonly y: Int32; +} + +export interface Derived extends Base1, Base2 { + readonly z: boolean; +} + +export interface ModuleProps extends ViewProps { + // Props + ordinary_prop: Derived; + readonly_prop: Readonly; + ordinary_array_prop?: readonly Derived[]; + readonly_array_prop?: readonly Readonly[]; + ordinary_nested_array_prop?: readonly Derived[][]; + readonly_nested_array_prop?: readonly Readonly[][]; + + // Events + onDirect: DirectEventHandler; + onBubbling: BubblingEventHandler>; +} + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + paperComponentName: 'RCTModule', +}) as HostComponent; +`; +module.exports = { + ALL_PROP_TYPES_NO_EVENTS, + ARRAY_PROP_TYPES_NO_EVENTS, + ARRAY2_PROP_TYPES_NO_EVENTS, + OBJECT_PROP_TYPES_NO_EVENTS, + PROPS_ALIASED_LOCALLY, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, + NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, + EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, + EVENTS_DEFINED_AS_NULL_INLINE, + PROPS_AND_EVENTS_TYPES_EXPORTED, + COMMANDS_EVENTS_TYPES_EXPORTED, + COMMANDS_DEFINED_WITH_ALL_TYPES, + PROPS_AS_EXTERNAL_TYPES, + COMMANDS_WITH_EXTERNAL_TYPES, + PROPS_AND_EVENTS_WITH_INTERFACES, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow new file mode 100644 index 000000000000..7f81b17e6cc3 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow @@ -0,0 +1,1245 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +'use strict'; + +const EVENT_DEFINITION = ` + boolean_required: boolean; + boolean_optional_key?: boolean; + boolean_optional_value: boolean | null | undefined; + boolean_optional_both?: boolean | null | undefined; + + string_required: string; + string_optional_key?: (string); + string_optional_value: (string) | null | undefined; + string_optional_both?: (string | null | undefined); + + double_required: Double; + double_optional_key?: Double; + double_optional_value: Double | null | undefined; + double_optional_both?: Double | null | undefined; + + float_required: Float; + float_optional_key?: Float; + float_optional_value: Float | null | undefined; + float_optional_both?: Float | null | undefined; + + int32_required: Int32; + int32_optional_key?: Int32; + int32_optional_value: Int32 | null | undefined; + int32_optional_both?: Int32 | null | undefined; + + enum_required: 'small' | 'large'; + enum_optional_key?: 'small' | 'large'; + enum_optional_value: ('small' | 'large') | null | undefined; + enum_optional_both?: ('small' | 'large') | null | undefined; + + object_required: { + boolean_required: boolean; + }; + + object_optional_key?: { + string_optional_key?: string; + }; + + object_optional_value: { + float_optional_value: Float | null | undefined; + } | null | undefined; + + object_optional_both?: { + int32_optional_both?: Int32 | null | undefined; + } | null | undefined; + + object_required_nested_2_layers: { + object_optional_nested_1_layer?: { + boolean_required: Int32; + string_optional_key?: string; + double_optional_value: Double | null | undefined; + float_optional_value: Float | null | undefined; + int32_optional_both?: Int32 | null | undefined; + } | null | undefined; + }; + + object_readonly_required: Readonly<{ + boolean_required: boolean; + }>; + + object_readonly_optional_key?: Readonly<{ + string_optional_key?: string; + }>; + + object_readonly_optional_value: Readonly<{ + float_optional_value: Float | null | undefined; + }> | null | undefined; + + object_readonly_optional_both?: Readonly<{ + int32_optional_both?: Int32 | null | undefined; + }> | null | undefined; + + boolean_array_required: boolean[]; + boolean_array_optional_key?: boolean[]; + boolean_array_optional_value: boolean[] | null | undefined; + boolean_array_optional_both?: boolean[] | null | undefined; + + string_array_required: string[]; + string_array_optional_key?: (string[]); + string_array_optional_value: (string[]) | null | undefined; + string_array_optional_both?: (string[] | null | undefined); + + double_array_required: Double[]; + double_array_optional_key?: Double[]; + double_array_optional_value: Double[] | null | undefined; + double_array_optional_both?: Double[] | null | undefined; + + float_array_required: Float[]; + float_array_optional_key?: Float[]; + float_array_optional_value: Float[] | null | undefined; + float_array_optional_both?: Float[] | null | undefined; + + int32_array_required: Int32[]; + int32_array_optional_key?: Int32[]; + int32_array_optional_value: Int32[] | null | undefined; + int32_array_optional_both?: Int32[] | null | undefined; + + enum_array_required: ('small' | 'large')[]; + enum_array_optional_key?: ('small' | 'large')[]; + enum_array_optional_value: ('small' | 'large')[] | null | undefined; + enum_array_optional_both?: ('small' | 'large')[] | null | undefined; + + object_array_required: { + boolean_required: boolean; + }[]; + + object_array_optional_key?: { + string_optional_key?: string; + }[]; + + object_array_optional_value: { + float_optional_value: Float | null | undefined; + }[] | null | undefined; + + object_array_optional_both?: { + int32_optional_both?: Int32 | null | undefined; + }[] | null | undefined; + + int32_array_array_required: Int32[][]; + int32_array_array_optional_key?: Int32[][]; + int32_array_array_optional_value: Int32[][] | null | undefined; + int32_array_array_optional_both?: Int32[][] | null | undefined; +`; + +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export interface ModuleProps extends ViewProps { + // Props + boolean_default_true_optional_both?: WithDefault; + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler; + onBubblingEventDefinedInlineNull: BubblingEventHandler; +} + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + paperComponentName: 'RCTModule', +}) as HostComponent; +`; + +const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + BubblingEventHandler, + DirectEventHandler, + WithDefault, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // Props + boolean_default_true_optional_both?: WithDefault; + + // Events + onDirectEventDefinedInlineNull: DirectEventHandler; + onBubblingEventDefinedInlineNull: BubblingEventHandler; +} + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + excludedPlatforms: ['android'], + paperComponentName: 'RCTModule', +}) as HostComponent; +`; + +const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + +} + +export default codegenNativeComponent('Module', { + deprecatedViewConfigName: 'DeprecateModuleName', +}) as HostComponent; +`; + +const ALL_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, + DimensionValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + boolean_required: boolean; + boolean_optional_key?: WithDefault; + boolean_optional_both?: WithDefault; + + // Boolean props, null default + boolean_null_optional_key?: WithDefault; + boolean_null_optional_both?: WithDefault; + + // String props + string_required: string; + string_optional_key?: WithDefault; + string_optional_both?: WithDefault; + + // String props, null default + string_null_optional_key?: WithDefault; + string_null_optional_both?: WithDefault; + + // Stringish props + stringish_required: Stringish; + stringish_optional_key?: WithDefault; + stringish_optional_both?: WithDefault; + + // Stringish props, null default + stringish_null_optional_key?: WithDefault; + stringish_null_optional_both?: WithDefault; + + // Double props + double_required: Double; + double_optional_key?: WithDefault; + double_optional_both?: WithDefault; + + // Float props + float_required: Float; + float_optional_key?: WithDefault; + float_optional_both?: WithDefault; + + // Float props, null default + float_null_optional_key?: WithDefault; + float_null_optional_both?: WithDefault; + + // Int32 props + int32_required: Int32; + int32_optional_key?: WithDefault; + int32_optional_both?: WithDefault; + + // String enum props + enum_optional_key?: WithDefault<'small' | 'large', 'small'>; + enum_optional_both?: WithDefault<'small' | 'large', 'small'>; + + // Int enum props + int_enum_optional_key?: WithDefault<0 | 1, 0>; + + // Object props + object_optional_key?: Readonly<{prop: string}>; + object_optional_both?: Readonly<{prop: string} | null | undefined>; + object_optional_value: Readonly<{prop: string} | null | undefined>; + + // ImageSource props + image_required: ImageSource; + image_optional_value: ImageSource | null | undefined; + image_optional_both?: ImageSource | null | undefined; + + // ColorValue props + color_required: ColorValue; + color_optional_key?: ColorValue; + color_optional_value: ColorValue | null | undefined; + color_optional_both?: ColorValue | null | undefined; + + // ColorArrayValue props + color_array_required: ColorArrayValue; + color_array_optional_key?: ColorArrayValue; + color_array_optional_value: ColorArrayValue | null | undefined; + color_array_optional_both?: ColorArrayValue | null | undefined; + + // ProcessedColorValue props + processed_color_required: ProcessedColorValue; + processed_color_optional_key?: ProcessedColorValue; + processed_color_optional_value: ProcessedColorValue | null | undefined; + processed_color_optional_both?: ProcessedColorValue | null | undefined; + + // PointValue props + point_required: PointValue; + point_optional_key?: PointValue; + point_optional_value: PointValue | null | undefined; + point_optional_both?: PointValue | null | undefined; + + // EdgeInsets props + insets_required: EdgeInsetsValue; + insets_optional_key?: EdgeInsetsValue; + insets_optional_value: EdgeInsetsValue | null | undefined; + insets_optional_both?: EdgeInsetsValue | null | undefined; + + + // DimensionValue props + dimension_required: DimensionValue; + dimension_optional_key?: DimensionValue; + dimension_optional_value: DimensionValue | null | undefined; + dimension_optional_both?: DimensionValue | null | undefined; + + // Mixed props + mixed_required: UnsafeMixed, + mixed_optional_key?: UnsafeMixed, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const ARRAY_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, + DimensionValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ObjectType = Readonly<{prop: string}>; +type ArrayObjectType = ReadonlyArray>; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + array_boolean_required: ReadonlyArray; + array_boolean_optional_key?: ReadonlyArray; + array_boolean_optional_value: ReadonlyArray | null | undefined; + array_boolean_optional_both?: ReadonlyArray | null | undefined; + + // String props + array_string_required: ReadonlyArray; + array_string_optional_key?: ReadonlyArray; + array_string_optional_value: ReadonlyArray | null | undefined; + array_string_optional_both?: ReadonlyArray | null | undefined; + + // Double props + array_double_required: ReadonlyArray; + array_double_optional_key?: ReadonlyArray; + array_double_optional_value: ReadonlyArray | null | undefined; + array_double_optional_both?: ReadonlyArray | null | undefined; + + // Float props + array_float_required: ReadonlyArray; + array_float_optional_key?: ReadonlyArray; + array_float_optional_value: ReadonlyArray | null | undefined; + array_float_optional_both?: ReadonlyArray | null | undefined; + + // Int32 props + array_int32_required: ReadonlyArray; + array_int32_optional_key?: ReadonlyArray; + array_int32_optional_value: ReadonlyArray | null | undefined; + array_int32_optional_both?: ReadonlyArray | null | undefined; + + // String enum props + array_enum_optional_key?: WithDefault< + ReadonlyArray<'small' | 'large'>, + 'small' + >; + array_enum_optional_both?: WithDefault< + ReadonlyArray<'small' | 'large'>, + 'small' + >; + + // ImageSource props + array_image_required: ReadonlyArray; + array_image_optional_key?: ReadonlyArray; + array_image_optional_value: ReadonlyArray | null | undefined; + array_image_optional_both?: ReadonlyArray | null | undefined; + + // ColorValue props + array_color_required: ReadonlyArray; + array_color_optional_key?: ReadonlyArray; + array_color_optional_value: ReadonlyArray | null | undefined; + array_color_optional_both?: ReadonlyArray | null | undefined; + + // PointValue props + array_point_required: ReadonlyArray; + array_point_optional_key?: ReadonlyArray; + array_point_optional_value: ReadonlyArray | null | undefined; + array_point_optional_both?: ReadonlyArray | null | undefined; + + // EdgeInsetsValue props + array_insets_required: ReadonlyArray; + array_insets_optional_key?: ReadonlyArray; + array_insets_optional_value: ReadonlyArray | null | undefined; + array_insets_optional_both?: ReadonlyArray | null | undefined; + + // DimensionValue props + array_dimension_required: ReadonlyArray; + array_dimension_optional_key?: ReadonlyArray; + array_dimension_optional_value: ReadonlyArray | null | undefined; + array_dimension_optional_both?: ReadonlyArray | null | undefined; + + // Object props + array_object_required: ReadonlyArray>; + array_object_optional_key?: ReadonlyArray>; + array_object_optional_value: ArrayObjectType | null | undefined; + array_object_optional_both?: ReadonlyArray | null | undefined; + + // Nested array object types + array_of_array_object_required: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_required: ReadonlyArray>; + }> + >; + array_of_array_object_optional_key?: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_key: ReadonlyArray>; + }> + >; + array_of_array_object_optional_value: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_value: ReadonlyArray< + Readonly<{prop: string | null | undefined}> + >; + }> + > | null | undefined; + array_of_array_object_optional_both?: ReadonlyArray< + Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_both: ReadonlyArray< + Readonly<{prop?: string | null | undefined}> + >; + }> + > | null | undefined; + + // Nested array of array of object types + array_of_array_of_object_required: ReadonlyArray< + ReadonlyArray< + Readonly<{ + prop: string; + }> + > + >; + + // Nested array of array of object types (in file) + array_of_array_of_object_required_in_file: ReadonlyArray< + ReadonlyArray + >; + + // Nested array of array of object types (with spread) + array_of_array_of_object_required_with_spread: ReadonlyArray< + ReadonlyArray< + Readonly, + >, + >, +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const ARRAY2_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +type ObjectType = Readonly<{prop: string}>; +type ArrayObjectType = readonly Readonly<{prop: string}>[]; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + array_boolean_required: readonly boolean[]; + array_boolean_optional_key?: readonly boolean[]; + array_boolean_optional_value: readonly boolean[] | null | undefined; + array_boolean_optional_both?: readonly boolean[] | null | undefined; + + // String props + array_string_required: readonly string[]; + array_string_optional_key?: readonly string[]; + array_string_optional_value: readonly string[] | null | undefined; + array_string_optional_both?: readonly string[] | null | undefined; + + // Double props + array_double_required: readonly Double[]; + array_double_optional_key?: readonly Double[]; + array_double_optional_value: readonly Double[] | null | undefined; + array_double_optional_both?: readonly Double[] | null | undefined; + + // Float props + array_float_required: readonly Float[]; + array_float_optional_key?: readonly Float[]; + array_float_optional_value: readonly Float[] | null | undefined; + array_float_optional_both?: readonly Float[] | null | undefined; + + // Int32 props + array_int32_required: readonly Int32[]; + array_int32_optional_key?: readonly Int32[]; + array_int32_optional_value: readonly Int32[] | null | undefined; + array_int32_optional_both?: readonly Int32[] | null | undefined; + + // String enum props + array_enum_optional_key?: WithDefault< + readonly ('small' | 'large')[], + 'small' + >; + array_enum_optional_both?: WithDefault< + readonly ('small' | 'large')[], + 'small' + >; + + // ImageSource props + array_image_required: readonly ImageSource[]; + array_image_optional_key?: readonly ImageSource[]; + array_image_optional_value: readonly ImageSource[] | null | undefined; + array_image_optional_both?: readonly ImageSource[] | null | undefined; + + // ColorValue props + array_color_required: readonly ColorValue[]; + array_color_optional_key?: readonly ColorValue[]; + array_color_optional_value: readonly ColorValue[] | null | undefined; + array_color_optional_both?: readonly ColorValue[] | null | undefined; + + // PointValue props + array_point_required: readonly PointValue[]; + array_point_optional_key?: readonly PointValue[]; + array_point_optional_value: readonly PointValue[] | null | undefined; + array_point_optional_both?: readonly PointValue[] | null | undefined; + + // EdgeInsetsValue props + array_insets_required: readonly EdgeInsetsValue[]; + array_insets_optional_key?: readonly EdgeInsetsValue[]; + array_insets_optional_value: readonly EdgeInsetsValue[] | null | undefined; + array_insets_optional_both?: readonly EdgeInsetsValue[] | null | undefined; + + // Object props + array_object_required: readonly Readonly<{prop: string}>[]; + array_object_optional_key?: readonly Readonly<{prop: string}>[]; + array_object_optional_value: ArrayObjectType | null | undefined; + array_object_optional_both?: readonly ObjectType[] | null | undefined; + + // Nested array object types + array_of_array_object_required: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_required: readonly Readonly<{prop: string}>[]; + }>[]; + array_of_array_object_optional_key?: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_key: readonly Readonly<{prop?: string}>[]; + }>[]; + array_of_array_object_optional_value: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_value: readonly Readonly<{prop: string | null | undefined}>[]; + }>[] | null | undefined; + array_of_array_object_optional_both?: readonly Readonly<{ + // This needs to be the same name as the top level array above + array_object_optional_both: readonly Readonly<{prop?: string | null | undefined}>[]; + }>[] | null | undefined; + + // Nested array of array of object types + array_of_array_of_object_required: readonly Readonly<{ + prop: string; + }>[][]; + + // Nested array of array of object types (in file) + array_of_array_of_object_required_in_file: readonly ObjectType[][]; + + // Nested array of array of object types (with spread) + array_of_array_of_object_required_with_spread: readonly Readonly[][]; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const OBJECT_PROP_TYPES_NO_EVENTS = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; +import type {ImageSource} from 'ImageSource'; +import type { + ColorValue, + ColorArrayValue, + PointValue, + EdgeInsetsValue, + DimensionValue, +} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // Props + // Boolean props + boolean_required: Readonly<{prop: boolean}>; + boolean_optional: Readonly<{prop?: WithDefault}>; + + // String props + string_required: Readonly<{prop: string}>; + string_optional: Readonly<{prop?: WithDefault}>; + + // Double props + double_required: Readonly<{prop: Double}>; + double_optional: Readonly<{prop?: WithDefault}>; + + // Float props + float_required: Readonly<{prop: Float}>; + float_optional: Readonly<{prop?: WithDefault}>; + + // Int32 props + int_required: Readonly<{prop: Int32}>; + int_optional: Readonly<{prop?: WithDefault}>; + + // String enum props + enum_optional: Readonly<{ + prop?: WithDefault, 'small'>; + }>; + + // ImageSource props + image_required: Readonly<{prop: ImageSource}>; + image_optional_key: Readonly<{prop?: ImageSource}>; + image_optional_value: Readonly<{prop: ImageSource | null | undefined}>; + image_optional_both: Readonly<{prop?: ImageSource | null | undefined}>; + + // ColorValue props + color_required: Readonly<{prop: ColorValue}>; + color_optional_key: Readonly<{prop?: ColorValue}>; + color_optional_value: Readonly<{prop: ColorValue | null | undefined}>; + color_optional_both: Readonly<{prop?: ColorValue | null | undefined}>; + + // ProcessedColorValue props + processed_color_required: Readonly<{prop: ProcessedColorValue}>; + processed_color_optional_key: Readonly<{prop?: ProcessedColorValue}>; + processed_color_optional_value: Readonly<{ + prop: ProcessedColorValue | null | undefined; + }>; + processed_color_optional_both: Readonly<{ + prop?: ProcessedColorValue | null | undefined; + }>; + + // PointValue props + point_required: Readonly<{prop: PointValue}>; + point_optional_key: Readonly<{prop?: PointValue}>; + point_optional_value: Readonly<{prop: PointValue | null | undefined}>; + point_optional_both: Readonly<{prop?: PointValue | null | undefined}>; + + // EdgeInsetsValue props + insets_required: Readonly<{prop: EdgeInsetsValue}>; + insets_optional_key: Readonly<{prop?: EdgeInsetsValue}>; + insets_optional_value: Readonly<{prop: EdgeInsetsValue | null | undefined}>; + insets_optional_both: Readonly<{prop?: EdgeInsetsValue | null | undefined}>; + + // DimensionValue props + dimension_required: Readonly<{prop: DimensionValue}>; + dimension_optional_key: Readonly<{prop?: DimensionValue}>; + dimension_optional_value: Readonly<{prop: DimensionValue | null | undefined}>; + dimension_optional_both: Readonly<{prop?: DimensionValue | null | undefined}>; + + // Nested object props + object_required: Readonly<{prop: Readonly<{nestedProp: string}>}>; + object_optional_key?: Readonly<{prop: Readonly<{nestedProp: string}>}>; + object_optional_value: Readonly<{ + prop: Readonly<{nestedProp: string}>; + }> | null | undefined; + object_optional_both?: Readonly<{ + prop: Readonly<{nestedProp: string}>; + }> | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROPS_ALIASED_LOCALLY = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +type DeepSpread = Readonly<{ + otherStringProp: string; +}>; + +export interface PropsInFile extends DeepSpread { + isEnabled: boolean; + label: string; +} + +type ReadOnlyPropsInFile = Readonly; + +export interface ModuleProps extends ViewProps, ReadOnlyPropsInFile { + localType: ReadOnlyPropsInFile; + localArr: ReadonlyArray; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + */ + +import type {HostComponent} from 'react-native'; +const codegenNativeComponent = require('codegenNativeComponent'); + +import type { + Int32, + Double, + Float, + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; + +import type {ViewProps} from 'ViewPropTypes'; + +export interface ModuleProps extends ViewProps { + // No Props + + // Events + onDirectEventDefinedInline: DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >; + + onDirectEventDefinedInlineOptionalKey?: (DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >); + + onDirectEventDefinedInlineOptionalValue: (DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >) | null | undefined; + + onDirectEventDefinedInlineOptionalBoth?: (DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + > | null | undefined); + + onDirectEventDefinedInlineWithPaperName?: DirectEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }>, + 'paperDirectEventDefinedInlineWithPaperName' + > | null | undefined; + + onBubblingEventDefinedInline: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >; + + onBubblingEventDefinedInlineOptionalKey?: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + >; + + onBubblingEventDefinedInlineOptionalValue: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + > | null | undefined; + + onBubblingEventDefinedInlineOptionalBoth?: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }> + > | null | undefined; + + onBubblingEventDefinedInlineWithPaperName?: BubblingEventHandler< + Readonly<{ + ${EVENT_DEFINITION} + }>, + 'paperBubblingEventDefinedInlineWithPaperName' + > | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const EVENTS_DEFINED_AS_NULL_INLINE = ` +/** + * 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. + * + * @format + */ + +'use strict'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export interface ModuleProps extends ViewProps { + // No props + + // Events defined inline + onDirectEventDefinedInlineNull: DirectEventHandler; + onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler; + onDirectEventDefinedInlineNullOptionalValue: DirectEventHandler | null | undefined; + onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler; + onDirectEventDefinedInlineNullWithPaperName?: DirectEventHandler< + null, + 'paperDirectEventDefinedInlineNullWithPaperName' + > | null | undefined; + + onBubblingEventDefinedInlineNull: BubblingEventHandler; + onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler; + onBubblingEventDefinedInlineNullOptionalValue: BubblingEventHandler | null | undefined; + onBubblingEventDefinedInlineNullOptionalBoth?: BubblingEventHandler | null | undefined; + onBubblingEventDefinedInlineNullWithPaperName?: BubblingEventHandler< + undefined, + 'paperBubblingEventDefinedInlineNullWithPaperName' + > | null | undefined; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROPS_AND_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; + +export type EventInFile = Readonly<{ + ${EVENT_DEFINITION} +}>; + +export interface ModuleProps extends ViewProps { + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler; + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler< + EventInFile, + 'paperBubblingEventDefinedInlineWithPaperName' + >; + onDirectEventDefinedInline: DirectEventHandler; + onDirectEventDefinedInlineWithPaperName: DirectEventHandler< + EventInFile, + 'paperDirectEventDefinedInlineWithPaperName' + >; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const PROPS_AS_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {HostComponent} from 'react-native'; + +export type String = string; +export type AnotherArray = ReadonlyArray; + +export interface ModuleProps { + disable: String; + array: AnotherArray; +} + +export default codegenNativeComponent( + 'Module', +) as HostComponent; +`; + +const COMMANDS_DEFINED_WITH_ALL_TYPES = ` +/** + * 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. + * + * @format + */ + + const codegenNativeCommands = require('codegenNativeCommands'); + const codegenNativeComponent = require('codegenNativeComponent'); + + import type {Int32, Double, Float} from 'CodegenTypes'; + import type {RootTag} from 'RCTExport'; + import type {ViewProps} from 'ViewPropTypes'; + import type {HostComponent} from 'react-native'; + + +export interface ModuleProps extends ViewProps { + // No props or events +} + +type NativeType = HostComponent; + + interface NativeCommands { + readonly handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; + readonly hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; + scrollTo( + viewRef: React.ElementRef, + x: Float, + y: Int32, + z: Double, + animated: boolean, + ): void; + } + + export const Commands = codegenNativeCommands({ + supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], + }); + +export default codegenNativeComponent( + 'Module', +) as NativeType; +`; + +const COMMANDS_WITH_EXTERNAL_TYPES = ` +/** + * 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. + * + * @format + */ + +const codegenNativeCommands = require('codegenNativeCommands'); +const codegenNativeComponent = require('codegenNativeComponent'); + +import type {Int32} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export interface ModuleProps extends ViewProps { + // No props or events +} + +type NativeType = HostComponent; + +export type ScrollTo = ( + viewRef: React.ElementRef, + y: Int, + animated: Boolean, +) => Void; + +interface NativeCommands { + readonly scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'], +}); + +export default codegenNativeComponent('Module') as NativeType; + +`; + +const COMMANDS_EVENTS_TYPES_EXPORTED = ` +/** + * 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. + * + * @format + */ + +import type { + BubblingEventHandler, + DirectEventHandler, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export type EventInFile = Readonly<{ + ${EVENT_DEFINITION} +}>; + +export type Boolean = boolean; +export type Int = Int32; +export type Void = void; + +export interface ModuleProps extends ViewProps { + // No props + + // Events defined inline + onBubblingEventDefinedInline: BubblingEventHandler, + onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, + onDirectEventDefinedInline: DirectEventHandler, + onDirectEventDefinedInlineWithPaperName: DirectEventHandler, +} + +// Add state here +export interface ModuleNativeState { + boolean_required: boolean, + boolean_optional_key?: WithDefault, + boolean_optional_both?: WithDefault, +} + +type NativeType = HostComponent; + +export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; + +interface NativeCommands { + readonly scrollTo: ScrollTo; +} + +export const Commands = codegenNativeCommands({ + supportedCommands: ['scrollTo'] +}); + +export default codegenNativeComponent( + 'Module', +) as NativeType; +`; + +const PROPS_AND_EVENTS_WITH_INTERFACES = ` +import type { + BubblingEventHandler, + DirectEventHandler, + Int32, +} from 'CodegenTypes'; +import type {ViewProps} from 'ViewPropTypes'; +import type {HostComponent} from 'react-native'; + +const codegenNativeComponent = require('codegenNativeComponent'); + +export interface Base1 { + readonly x: string; +} + +export interface Base2 { + readonly y: Int32; +} + +export interface Derived extends Base1, Base2 { + readonly z: boolean; +} + +export interface ModuleProps extends ViewProps { + // Props + ordinary_prop: Derived; + readonly_prop: Readonly; + ordinary_array_prop?: readonly Derived[]; + readonly_array_prop?: readonly Readonly[]; + ordinary_nested_array_prop?: readonly Derived[][]; + readonly_nested_array_prop?: readonly Readonly[][]; + + // Events + onDirect: DirectEventHandler; + onBubbling: BubblingEventHandler>; +} + +export default codegenNativeComponent('Module', { + interfaceOnly: true, + paperComponentName: 'RCTModule', +}) as HostComponent; +`; + +module.exports = { + ALL_PROP_TYPES_NO_EVENTS, + ARRAY_PROP_TYPES_NO_EVENTS, + ARRAY2_PROP_TYPES_NO_EVENTS, + OBJECT_PROP_TYPES_NO_EVENTS, + PROPS_ALIASED_LOCALLY, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, + ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, + NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, + EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, + EVENTS_DEFINED_AS_NULL_INLINE, + PROPS_AND_EVENTS_TYPES_EXPORTED, + COMMANDS_EVENTS_TYPES_EXPORTED, + COMMANDS_DEFINED_WITH_ALL_TYPES, + PROPS_AS_EXTERNAL_TYPES, + COMMANDS_WITH_EXTERNAL_TYPES, + PROPS_AND_EVENTS_WITH_INTERFACES, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/commands.js b/packages/react-native-codegen/lib/parsers/typescript/components/commands.js new file mode 100644 index 000000000000..5788e71e43b3 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/commands.js @@ -0,0 +1,135 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../parseTopLevelType'), + parseTopLevelType = _require.parseTopLevelType; + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs + +function buildCommandSchemaInternal(name, optional, parameters, types) { + var _firstParam$typeAnnot, _firstParam$typeAnnot2; + const firstParam = parameters[0].typeAnnotation; + if ( + !( + firstParam.typeAnnotation != null && + firstParam.typeAnnotation.type === 'TSTypeReference' && + ((_firstParam$typeAnnot = firstParam.typeAnnotation.typeName.left) === + null || _firstParam$typeAnnot === void 0 + ? void 0 + : _firstParam$typeAnnot.name) === 'React' && + ((_firstParam$typeAnnot2 = firstParam.typeAnnotation.typeName.right) === + null || _firstParam$typeAnnot2 === void 0 + ? void 0 + : _firstParam$typeAnnot2.name) === 'ElementRef' + ) + ) { + throw new Error( + `The first argument of method ${name} must be of type React.ElementRef<>`, + ); + } + const params = parameters.slice(1).map(param => { + const paramName = param.name; + const paramValue = parseTopLevelType( + param.typeAnnotation.typeAnnotation, + types, + ).type; + const type = + paramValue.type === 'TSTypeReference' + ? paramValue.typeName.name + : paramValue.type; + let returnType; + switch (type) { + case 'RootTag': + returnType = { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }; + break; + case 'TSBooleanKeyword': + returnType = { + type: 'BooleanTypeAnnotation', + }; + break; + case 'Int32': + returnType = { + type: 'Int32TypeAnnotation', + }; + break; + case 'Double': + returnType = { + type: 'DoubleTypeAnnotation', + }; + break; + case 'Float': + returnType = { + type: 'FloatTypeAnnotation', + }; + break; + case 'TSStringKeyword': + returnType = { + type: 'StringTypeAnnotation', + }; + break; + default: + type; + throw new Error( + `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, + ); + } + return { + name: paramName, + optional: false, + typeAnnotation: returnType, + }; + }); + return { + name, + optional, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params, + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }; +} +function buildCommandSchema(property, types) { + if (property.type === 'TSPropertySignature') { + const topLevelType = parseTopLevelType( + property.typeAnnotation.typeAnnotation, + types, + ); + const name = property.key.name; + const optional = property.optional || topLevelType.optional; + const parameters = topLevelType.type.parameters || topLevelType.type.params; + return buildCommandSchemaInternal(name, optional, parameters, types); + } else { + const name = property.key.name; + const optional = property.optional || false; + const parameters = property.parameters || property.params; + return buildCommandSchemaInternal(name, optional, parameters, types); + } +} +function getCommands(commandTypeAST, types) { + return commandTypeAST + .filter( + property => + property.type === 'TSPropertySignature' || + property.type === 'TSMethodSignature', + ) + .map(property => buildCommandSchema(property, types)) + .filter(Boolean); +} +module.exports = { + getCommands, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/commands.js.flow b/packages/react-native-codegen/lib/parsers/typescript/components/commands.js.flow new file mode 100644 index 000000000000..390a6d71b960 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/commands.js.flow @@ -0,0 +1,152 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + NamedShape, + CommandTypeAnnotation, +} from '../../../CodegenSchema.js'; +import type {TypeDeclarationMap} from '../../utils'; +const {parseTopLevelType} = require('../parseTopLevelType'); + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs +type EventTypeAST = Object; + +function buildCommandSchemaInternal( + name: string, + optional: boolean, + parameters: Array<$FlowFixMe>, + types: TypeDeclarationMap, +): NamedShape { + const firstParam = parameters[0].typeAnnotation; + if ( + !( + firstParam.typeAnnotation != null && + firstParam.typeAnnotation.type === 'TSTypeReference' && + firstParam.typeAnnotation.typeName.left?.name === 'React' && + firstParam.typeAnnotation.typeName.right?.name === 'ElementRef' + ) + ) { + throw new Error( + `The first argument of method ${name} must be of type React.ElementRef<>`, + ); + } + + const params = parameters.slice(1).map(param => { + const paramName = param.name; + const paramValue = parseTopLevelType( + param.typeAnnotation.typeAnnotation, + types, + ).type; + + const type = + paramValue.type === 'TSTypeReference' + ? paramValue.typeName.name + : paramValue.type; + let returnType; + + switch (type) { + case 'RootTag': + returnType = { + type: 'ReservedTypeAnnotation', + name: 'RootTag', + }; + break; + case 'TSBooleanKeyword': + returnType = { + type: 'BooleanTypeAnnotation', + }; + break; + case 'Int32': + returnType = { + type: 'Int32TypeAnnotation', + }; + break; + case 'Double': + returnType = { + type: 'DoubleTypeAnnotation', + }; + break; + case 'Float': + returnType = { + type: 'FloatTypeAnnotation', + }; + break; + case 'TSStringKeyword': + returnType = { + type: 'StringTypeAnnotation', + }; + break; + default: + (type: empty); + throw new Error( + `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, + ); + } + + return { + name: paramName, + optional: false, + typeAnnotation: returnType, + }; + }); + + return { + name, + optional, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params, + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }; +} + +function buildCommandSchema( + property: EventTypeAST, + types: TypeDeclarationMap, +): NamedShape { + if (property.type === 'TSPropertySignature') { + const topLevelType = parseTopLevelType( + property.typeAnnotation.typeAnnotation, + types, + ); + const name = property.key.name; + const optional = property.optional || topLevelType.optional; + const parameters = topLevelType.type.parameters || topLevelType.type.params; + return buildCommandSchemaInternal(name, optional, parameters, types); + } else { + const name = property.key.name; + const optional = property.optional || false; + const parameters = property.parameters || property.params; + return buildCommandSchemaInternal(name, optional, parameters, types); + } +} + +function getCommands( + commandTypeAST: $ReadOnlyArray, + types: TypeDeclarationMap, +): $ReadOnlyArray> { + return commandTypeAST + .filter( + property => + property.type === 'TSPropertySignature' || + property.type === 'TSMethodSignature', + ) + .map(property => buildCommandSchema(property, types)) + .filter(Boolean); +} + +module.exports = { + getCommands, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js b/packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js new file mode 100644 index 000000000000..395d021bc2b7 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js @@ -0,0 +1,475 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../parseTopLevelType'), + parseTopLevelType = _require.parseTopLevelType, + flattenIntersectionType = _require.flattenIntersectionType; +const _require2 = require('../../parsers-commons'), + verifyPropNotAlreadyDefined = _require2.verifyPropNotAlreadyDefined; +function getUnionOfLiterals(name, forArray, elementTypes, defaultValue, types) { + var _elementTypes$0$liter, _elementTypes$0$liter2; + elementTypes.reduce((lastType, currType) => { + const lastFlattenedType = + lastType && lastType.type === 'TSLiteralType' + ? lastType.literal.type + : lastType.type; + const currFlattenedType = + currType.type === 'TSLiteralType' ? currType.literal.type : currType.type; + if (lastFlattenedType && currFlattenedType !== lastFlattenedType) { + throw new Error(`Mixed types are not supported (see "${name}")`); + } + return currType; + }); + if (defaultValue === undefined) { + throw new Error(`A default enum value is required for "${name}"`); + } + const unionType = elementTypes[0].type; + if ( + unionType === 'TSLiteralType' && + ((_elementTypes$0$liter = elementTypes[0].literal) === null || + _elementTypes$0$liter === void 0 + ? void 0 + : _elementTypes$0$liter.type) === 'StringLiteral' + ) { + return { + type: 'StringEnumTypeAnnotation', + default: defaultValue, + options: elementTypes.map(option => option.literal.value), + }; + } else if ( + unionType === 'TSLiteralType' && + ((_elementTypes$0$liter2 = elementTypes[0].literal) === null || + _elementTypes$0$liter2 === void 0 + ? void 0 + : _elementTypes$0$liter2.type) === 'NumericLiteral' + ) { + if (forArray) { + throw new Error(`Arrays of int enums are not supported (see: "${name}")`); + } else { + return { + type: 'Int32EnumTypeAnnotation', + default: defaultValue, + options: elementTypes.map(option => option.literal.value), + }; + } + } else { + var _elementTypes$0$liter3; + throw new Error( + `Unsupported union type for "${name}", received "${ + unionType === 'TSLiteralType' + ? (_elementTypes$0$liter3 = elementTypes[0].literal) === null || + _elementTypes$0$liter3 === void 0 + ? void 0 + : _elementTypes$0$liter3.type + : unionType + }"`, + ); + } +} +function detectArrayType( + name, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, +) { + // Covers: readonly T[] + if ( + typeAnnotation.type === 'TSTypeOperator' && + typeAnnotation.operator === 'readonly' && + typeAnnotation.typeAnnotation.type === 'TSArrayType' + ) { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.typeAnnotation.elementType, + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + + // Covers: T[] + if (typeAnnotation.type === 'TSArrayType') { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.elementType, + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + + // Covers: Array and ReadonlyArray + if ( + typeAnnotation.type === 'TSTypeReference' && + (parser.getTypeAnnotationName(typeAnnotation) === 'ReadonlyArray' || + parser.getTypeAnnotationName(typeAnnotation) === 'Array') + ) { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.typeParameters.params[0], + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + return null; +} +function buildObjectType(rawProperties, types, parser, buildSchema) { + const flattenedProperties = flattenProperties(rawProperties, types, parser); + const properties = flattenedProperties + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean); + return { + type: 'ObjectTypeAnnotation', + properties, + }; +} +function getCommonTypeAnnotation( + name, + forArray, + type, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, +) { + switch (type) { + case 'TSTypeLiteral': + return buildObjectType( + typeAnnotation.members, + types, + parser, + buildSchema, + ); + case 'TSInterfaceDeclaration': + return buildObjectType([typeAnnotation], types, parser, buildSchema); + case 'TSIntersectionType': + return buildObjectType( + flattenIntersectionType(typeAnnotation, types), + types, + parser, + buildSchema, + ); + case 'ImageSource': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }; + case 'ImageRequest': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageRequestPrimitive', + }; + case 'ColorValue': + case 'ProcessedColorValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }; + case 'PointValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }; + case 'EdgeInsetsValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }; + case 'DimensionValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }; + case 'TSUnionType': + return getUnionOfLiterals( + name, + forArray, + typeAnnotation.types, + defaultValue, + types, + ); + case 'Int32': + return { + type: 'Int32TypeAnnotation', + }; + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + }; + case 'TSBooleanKeyword': + return { + type: 'BooleanTypeAnnotation', + }; + case 'Stringish': + case 'TSStringKeyword': + return { + type: 'StringTypeAnnotation', + }; + case 'UnsafeMixed': + return { + type: 'MixedTypeAnnotation', + }; + default: + return undefined; + } +} +function getTypeAnnotationForArray( + name, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, +) { + var _extractedTypeAnnotat, _extractedTypeAnnotat2; + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType(typeAnnotation, types); + if (topLevelType.defaultValue !== undefined) { + throw new Error( + 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', + ); + } + if (topLevelType.optional) { + throw new Error( + 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', + ); + } + const extractedTypeAnnotation = topLevelType.type; + const arrayType = detectArrayType( + name, + extractedTypeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (arrayType) { + if (arrayType.elementType.type !== 'ObjectTypeAnnotation') { + throw new Error( + `Only array of array of object is supported for "${name}".`, + ); + } + return arrayType; + } + const type = + extractedTypeAnnotation.elementType === 'TSTypeReference' + ? extractedTypeAnnotation.elementType.typeName.name + : ((_extractedTypeAnnotat = extractedTypeAnnotation.elementType) === + null || _extractedTypeAnnotat === void 0 + ? void 0 + : _extractedTypeAnnotat.type) || + ((_extractedTypeAnnotat2 = extractedTypeAnnotation.typeName) === null || + _extractedTypeAnnotat2 === void 0 + ? void 0 + : _extractedTypeAnnotat2.name) || + extractedTypeAnnotation.type; + const common = getCommonTypeAnnotation( + name, + true, + type, + extractedTypeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (common) { + return common; + } + switch (type) { + case 'TSNumberKeyword': + return { + type: 'FloatTypeAnnotation', + }; + default: + type; + throw new Error(`Unknown prop type for "${name}": ${type}`); + } +} +function setDefaultValue(common, defaultValue) { + switch (common.type) { + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + common.default = defaultValue ? defaultValue : 0; + break; + case 'FloatTypeAnnotation': + common.default = + defaultValue === null ? null : defaultValue ? defaultValue : 0; + break; + case 'BooleanTypeAnnotation': + common.default = defaultValue === null ? null : !!defaultValue; + break; + case 'StringTypeAnnotation': + common.default = defaultValue === undefined ? null : defaultValue; + break; + } +} +function getTypeAnnotation( + name, + annotation, + defaultValue, + withNullDefault, + // Just to make `getTypeAnnotation` signature match with the one from Flow + types, + parser, + buildSchema, +) { + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType(annotation, types); + const typeAnnotation = topLevelType.type; + const arrayType = detectArrayType( + name, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (arrayType) { + return arrayType; + } + const type = + typeAnnotation.type === 'TSTypeReference' || + typeAnnotation.type === 'TSTypeAliasDeclaration' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; + const common = getCommonTypeAnnotation( + name, + false, + type, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (common) { + setDefaultValue(common, defaultValue); + return common; + } + switch (type) { + case 'ColorArrayValue': + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }; + case 'TSNumberKeyword': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, + ); + case 'TSFunctionType': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": must use a specific function type like BubblingEventHandler, or DirectEventHandler`, + ); + default: + throw new Error(`Unknown prop type for "${name}": "${type}"`); + } +} +function getSchemaInfo(property, types) { + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType( + property.typeAnnotation.typeAnnotation, + types, + ); + const name = property.key.name; + if (!property.optional && topLevelType.defaultValue !== undefined) { + throw new Error( + `key ${name} must be optional if used with WithDefault<> annotation`, + ); + } + return { + name, + optional: property.optional || topLevelType.optional, + typeAnnotation: topLevelType.type, + defaultValue: topLevelType.defaultValue, + withNullDefault: false, // Just to make `getTypeAnnotation` signature match with the one from Flow + }; +} +function flattenProperties(typeDefinition, types, parser) { + return typeDefinition + .map(property => { + if (property.type === 'TSPropertySignature') { + return property; + } else if (property.type === 'TSTypeReference') { + return flattenProperties( + parser.getProperties(property.typeName.name, types), + types, + parser, + ); + } else if ( + property.type === 'TSExpressionWithTypeArguments' || + property.type === 'TSInterfaceHeritage' + ) { + return flattenProperties( + parser.getProperties(property.expression.name, types), + types, + parser, + ); + } else if (property.type === 'TSTypeLiteral') { + return flattenProperties(property.members, types, parser); + } else if (property.type === 'TSInterfaceDeclaration') { + return flattenProperties( + parser.getProperties(property.id.name, types), + types, + parser, + ); + } else if (property.type === 'TSIntersectionType') { + return flattenProperties(property.types, types, parser); + } else { + throw new Error( + `${property.type} is not a supported object literal type.`, + ); + } + }) + .filter(Boolean) + .reduce((acc, item) => { + if (Array.isArray(item)) { + item.forEach(prop => { + verifyPropNotAlreadyDefined(acc, prop); + }); + return acc.concat(item); + } else { + verifyPropNotAlreadyDefined(acc, item); + acc.push(item); + return acc; + } + }, []) + .filter(Boolean); +} +module.exports = { + getSchemaInfo, + getTypeAnnotation, + flattenProperties, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js.flow b/packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js.flow new file mode 100644 index 000000000000..bbe56a973e5b --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/componentsUtils.js.flow @@ -0,0 +1,516 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +const { + parseTopLevelType, + flattenIntersectionType, +} = require('../parseTopLevelType'); +const {verifyPropNotAlreadyDefined} = require('../../parsers-commons'); +import type {TypeDeclarationMap, PropAST, ASTNode} from '../../utils'; +import type {BuildSchemaFN, Parser} from '../../parser'; + +function getUnionOfLiterals( + name: string, + forArray: boolean, + elementTypes: $FlowFixMe[], + defaultValue: $FlowFixMe | void, + types: TypeDeclarationMap, +) { + elementTypes.reduce((lastType, currType) => { + const lastFlattenedType = + lastType && lastType.type === 'TSLiteralType' + ? lastType.literal.type + : lastType.type; + const currFlattenedType = + currType.type === 'TSLiteralType' ? currType.literal.type : currType.type; + + if (lastFlattenedType && currFlattenedType !== lastFlattenedType) { + throw new Error(`Mixed types are not supported (see "${name}")`); + } + return currType; + }); + + if (defaultValue === undefined) { + throw new Error(`A default enum value is required for "${name}"`); + } + + const unionType = elementTypes[0].type; + if ( + unionType === 'TSLiteralType' && + elementTypes[0].literal?.type === 'StringLiteral' + ) { + return { + type: 'StringEnumTypeAnnotation', + default: (defaultValue: string), + options: elementTypes.map(option => option.literal.value), + }; + } else if ( + unionType === 'TSLiteralType' && + elementTypes[0].literal?.type === 'NumericLiteral' + ) { + if (forArray) { + throw new Error(`Arrays of int enums are not supported (see: "${name}")`); + } else { + return { + type: 'Int32EnumTypeAnnotation', + default: (defaultValue: number), + options: elementTypes.map(option => option.literal.value), + }; + } + } else { + throw new Error( + `Unsupported union type for "${name}", received "${ + unionType === 'TSLiteralType' + ? elementTypes[0].literal?.type + : unionType + }"`, + ); + } +} + +function detectArrayType( + name: string, + typeAnnotation: $FlowFixMe | ASTNode, + defaultValue: $FlowFixMe | void, + types: TypeDeclarationMap, + parser: Parser, + buildSchema: BuildSchemaFN, +): $FlowFixMe { + // Covers: readonly T[] + if ( + typeAnnotation.type === 'TSTypeOperator' && + typeAnnotation.operator === 'readonly' && + typeAnnotation.typeAnnotation.type === 'TSArrayType' + ) { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.typeAnnotation.elementType, + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + + // Covers: T[] + if (typeAnnotation.type === 'TSArrayType') { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.elementType, + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + + // Covers: Array and ReadonlyArray + if ( + typeAnnotation.type === 'TSTypeReference' && + (parser.getTypeAnnotationName(typeAnnotation) === 'ReadonlyArray' || + parser.getTypeAnnotationName(typeAnnotation) === 'Array') + ) { + return { + type: 'ArrayTypeAnnotation', + elementType: getTypeAnnotationForArray( + name, + typeAnnotation.typeParameters.params[0], + defaultValue, + types, + parser, + buildSchema, + ), + }; + } + + return null; +} + +function buildObjectType( + rawProperties: Array<$FlowFixMe>, + types: TypeDeclarationMap, + parser: Parser, + buildSchema: BuildSchemaFN, +): $FlowFixMe { + const flattenedProperties = flattenProperties(rawProperties, types, parser); + const properties = flattenedProperties + .map(prop => buildSchema(prop, types, parser)) + .filter(Boolean); + + return { + type: 'ObjectTypeAnnotation', + properties, + }; +} + +function getCommonTypeAnnotation( + name: string, + forArray: boolean, + type: string, + typeAnnotation: $FlowFixMe, + defaultValue: $FlowFixMe | void, + types: TypeDeclarationMap, + parser: Parser, + buildSchema: BuildSchemaFN, +): $FlowFixMe { + switch (type) { + case 'TSTypeLiteral': + return buildObjectType( + typeAnnotation.members, + types, + parser, + buildSchema, + ); + case 'TSInterfaceDeclaration': + return buildObjectType([typeAnnotation], types, parser, buildSchema); + case 'TSIntersectionType': + return buildObjectType( + flattenIntersectionType(typeAnnotation, types), + types, + parser, + buildSchema, + ); + case 'ImageSource': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageSourcePrimitive', + }; + case 'ImageRequest': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ImageRequestPrimitive', + }; + case 'ColorValue': + case 'ProcessedColorValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }; + case 'PointValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'PointPrimitive', + }; + case 'EdgeInsetsValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'EdgeInsetsPrimitive', + }; + case 'DimensionValue': + return { + type: 'ReservedPropTypeAnnotation', + name: 'DimensionPrimitive', + }; + case 'TSUnionType': + return getUnionOfLiterals( + name, + forArray, + typeAnnotation.types, + defaultValue, + types, + ); + case 'Int32': + return { + type: 'Int32TypeAnnotation', + }; + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + }; + case 'TSBooleanKeyword': + return { + type: 'BooleanTypeAnnotation', + }; + case 'Stringish': + case 'TSStringKeyword': + return { + type: 'StringTypeAnnotation', + }; + case 'UnsafeMixed': + return { + type: 'MixedTypeAnnotation', + }; + default: + return undefined; + } +} + +function getTypeAnnotationForArray( + name: string, + typeAnnotation: $FlowFixMe, + defaultValue: $FlowFixMe | void, + types: TypeDeclarationMap, + parser: Parser, + buildSchema: BuildSchemaFN, +): $FlowFixMe { + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType(typeAnnotation, types); + if (topLevelType.defaultValue !== undefined) { + throw new Error( + 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', + ); + } + if (topLevelType.optional) { + throw new Error( + 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', + ); + } + + const extractedTypeAnnotation = topLevelType.type; + const arrayType = detectArrayType( + name, + extractedTypeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (arrayType) { + if (arrayType.elementType.type !== 'ObjectTypeAnnotation') { + throw new Error( + `Only array of array of object is supported for "${name}".`, + ); + } + return arrayType; + } + + const type = + extractedTypeAnnotation.elementType === 'TSTypeReference' + ? extractedTypeAnnotation.elementType.typeName.name + : extractedTypeAnnotation.elementType?.type || + extractedTypeAnnotation.typeName?.name || + extractedTypeAnnotation.type; + + const common = getCommonTypeAnnotation( + name, + true, + type, + extractedTypeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (common) { + return common; + } + + switch (type) { + case 'TSNumberKeyword': + return { + type: 'FloatTypeAnnotation', + }; + default: + (type: empty); + throw new Error(`Unknown prop type for "${name}": ${type}`); + } +} + +function setDefaultValue( + common: $FlowFixMe, + defaultValue: $FlowFixMe | void, +): void { + switch (common.type) { + case 'Int32TypeAnnotation': + case 'DoubleTypeAnnotation': + common.default = ((defaultValue ? defaultValue : 0): number); + break; + case 'FloatTypeAnnotation': + common.default = ((defaultValue === null + ? null + : defaultValue + ? defaultValue + : 0): number | null); + break; + case 'BooleanTypeAnnotation': + common.default = defaultValue === null ? null : !!defaultValue; + break; + case 'StringTypeAnnotation': + common.default = ((defaultValue === undefined ? null : defaultValue): + | string + | null); + break; + } +} + +function getTypeAnnotation( + name: string, + annotation: $FlowFixMe | ASTNode, + defaultValue: $FlowFixMe | void, + withNullDefault: boolean, // Just to make `getTypeAnnotation` signature match with the one from Flow + types: TypeDeclarationMap, + parser: Parser, + buildSchema: BuildSchemaFN, +): $FlowFixMe { + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType(annotation, types); + const typeAnnotation = topLevelType.type; + const arrayType = detectArrayType( + name, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (arrayType) { + return arrayType; + } + + const type = + typeAnnotation.type === 'TSTypeReference' || + typeAnnotation.type === 'TSTypeAliasDeclaration' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; + + const common = getCommonTypeAnnotation( + name, + false, + type, + typeAnnotation, + defaultValue, + types, + parser, + buildSchema, + ); + if (common) { + setDefaultValue(common, defaultValue); + return common; + } + + switch (type) { + case 'ColorArrayValue': + return { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'ReservedPropTypeAnnotation', + name: 'ColorPrimitive', + }, + }; + case 'TSNumberKeyword': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, + ); + case 'TSFunctionType': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": must use a specific function type like BubblingEventHandler, or DirectEventHandler`, + ); + default: + throw new Error(`Unknown prop type for "${name}": "${type}"`); + } +} + +type SchemaInfo = { + name: string, + optional: boolean, + typeAnnotation: $FlowFixMe, + defaultValue: $FlowFixMe, + withNullDefault: boolean, // Just to make `getTypeAnnotation` signature match with the one from Flow +}; + +function getSchemaInfo( + property: PropAST, + types: TypeDeclarationMap, +): SchemaInfo { + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType( + property.typeAnnotation.typeAnnotation, + types, + ); + + const name = property.key.name; + + if (!property.optional && topLevelType.defaultValue !== undefined) { + throw new Error( + `key ${name} must be optional if used with WithDefault<> annotation`, + ); + } + + return { + name, + optional: property.optional || topLevelType.optional, + typeAnnotation: topLevelType.type, + defaultValue: topLevelType.defaultValue, + withNullDefault: false, // Just to make `getTypeAnnotation` signature match with the one from Flow + }; +} + +function flattenProperties( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + parser: Parser, +): $ReadOnlyArray { + return typeDefinition + .map(property => { + if (property.type === 'TSPropertySignature') { + return property; + } else if (property.type === 'TSTypeReference') { + return flattenProperties( + parser.getProperties(property.typeName.name, types), + types, + parser, + ); + } else if ( + property.type === 'TSExpressionWithTypeArguments' || + property.type === 'TSInterfaceHeritage' + ) { + return flattenProperties( + parser.getProperties(property.expression.name, types), + types, + parser, + ); + } else if (property.type === 'TSTypeLiteral') { + return flattenProperties(property.members, types, parser); + } else if (property.type === 'TSInterfaceDeclaration') { + return flattenProperties( + parser.getProperties(property.id.name, types), + types, + parser, + ); + } else if (property.type === 'TSIntersectionType') { + return flattenProperties(property.types, types, parser); + } else { + throw new Error( + `${property.type} is not a supported object literal type.`, + ); + } + }) + .filter(Boolean) + .reduce((acc: Array, item) => { + if (Array.isArray(item)) { + item.forEach((prop: PropAST) => { + verifyPropNotAlreadyDefined(acc, prop); + }); + return acc.concat(item); + } else { + verifyPropNotAlreadyDefined(acc, item); + acc.push(item); + return acc; + } + }, []) + .filter(Boolean); +} + +module.exports = { + getSchemaInfo, + getTypeAnnotation, + flattenProperties, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/events.js b/packages/react-native-codegen/lib/parsers/typescript/components/events.js new file mode 100644 index 000000000000..b9bc3102d272 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/events.js @@ -0,0 +1,261 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./componentsUtils'), + flattenProperties = _require.flattenProperties; +const _require2 = require('../parseTopLevelType'), + parseTopLevelType = _require2.parseTopLevelType; +const _require3 = require('../../error-utils'), + throwIfEventHasNoName = _require3.throwIfEventHasNoName, + throwIfBubblingTypeIsNull = _require3.throwIfBubblingTypeIsNull, + throwIfArgumentPropsAreNull = _require3.throwIfArgumentPropsAreNull; +const _require4 = require('../../parsers-commons'), + getEventArgument = _require4.getEventArgument, + buildPropertiesForEvent = _require4.buildPropertiesForEvent, + handleEventHandler = _require4.handleEventHandler, + emitBuildEventSchema = _require4.emitBuildEventSchema; +const _require5 = require('../../parsers-primitives'), + emitBoolProp = _require5.emitBoolProp, + emitDoubleProp = _require5.emitDoubleProp, + emitFloatProp = _require5.emitFloatProp, + emitMixedProp = _require5.emitMixedProp, + emitStringProp = _require5.emitStringProp, + emitInt32Prop = _require5.emitInt32Prop, + emitObjectProp = _require5.emitObjectProp, + emitUnionProp = _require5.emitUnionProp; +function getPropertyType( + /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ + name, + optionalProperty, + /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ + annotation, + parser, +) { + const topLevelType = parseTopLevelType(annotation); + const typeAnnotation = topLevelType.type; + const optional = optionalProperty || topLevelType.optional; + const type = + typeAnnotation.type === 'TSTypeReference' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; + switch (type) { + case 'TSBooleanKeyword': + return emitBoolProp(name, optional); + case 'TSStringKeyword': + return emitStringProp(name, optional); + case 'Int32': + return emitInt32Prop(name, optional); + case 'Double': + return emitDoubleProp(name, optional); + case 'Float': + return emitFloatProp(name, optional); + case 'TSTypeLiteral': + return emitObjectProp( + name, + optional, + parser, + typeAnnotation, + extractArrayElementType, + ); + case 'TSUnionType': + return emitUnionProp(name, optional, parser, typeAnnotation); + case 'UnsafeMixed': + return emitMixedProp(name, optional); + case 'TSArrayType': + return { + name, + optional, + typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), + }; + default: + throw new Error(`Unable to determine event type for "${name}": ${type}`); + } +} +function extractArrayElementType(typeAnnotation, name, parser) { + const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); + switch (type) { + case 'TSParenthesizedType': + return extractArrayElementType( + typeAnnotation.typeAnnotation, + name, + parser, + ); + case 'TSBooleanKeyword': + return { + type: 'BooleanTypeAnnotation', + }; + case 'TSStringKeyword': + return { + type: 'StringTypeAnnotation', + }; + case 'Float': + return { + type: 'FloatTypeAnnotation', + }; + case 'Int32': + return { + type: 'Int32TypeAnnotation', + }; + case 'TSNumberKeyword': + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'TSUnionType': + return { + type: 'StringEnumTypeAnnotation', + options: typeAnnotation.types.map(option => + parser.getLiteralValue(option), + ), + }; + case 'TSTypeLiteral': + return { + type: 'ObjectTypeAnnotation', + properties: parser + .getObjectProperties(typeAnnotation) + .map(member => + buildPropertiesForEvent(member, parser, getPropertyType), + ), + }; + case 'TSArrayType': + return { + type: 'ArrayTypeAnnotation', + elementType: extractArrayElementType( + typeAnnotation.elementType, + name, + parser, + ), + }; + default: + throw new Error( + `Unrecognized ${type} for Array ${name} in events.\n${JSON.stringify( + typeAnnotation, + null, + 2, + )}`, + ); + } +} +function extractTypeFromTypeAnnotation(typeAnnotation, parser) { + return typeAnnotation.type === 'TSTypeReference' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; +} +function findEventArgumentsAndType( + parser, + typeAnnotation, + types, + bubblingType, + paperName, +) { + if (typeAnnotation.type === 'TSInterfaceDeclaration') { + return { + argumentProps: flattenProperties([typeAnnotation], types, parser), + paperTopLevelNameDeprecated: paperName, + bubblingType, + }; + } + if (typeAnnotation.type === 'TSTypeLiteral') { + return { + argumentProps: parser.getObjectProperties(typeAnnotation), + paperTopLevelNameDeprecated: paperName, + bubblingType, + }; + } + throwIfEventHasNoName(typeAnnotation, parser); + const name = parser.getTypeAnnotationName(typeAnnotation); + if (name === 'Readonly') { + return findEventArgumentsAndType( + parser, + typeAnnotation.typeParameters.params[0], + types, + bubblingType, + paperName, + ); + } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { + return handleEventHandler( + name, + typeAnnotation, + parser, + types, + findEventArgumentsAndType, + ); + } else if (types[name]) { + let elementType = types[name]; + if (elementType.type === 'TSTypeAliasDeclaration') { + elementType = elementType.typeAnnotation; + } + return findEventArgumentsAndType( + parser, + elementType, + types, + bubblingType, + paperName, + ); + } else { + return { + argumentProps: null, + bubblingType: null, + paperTopLevelNameDeprecated: null, + }; + } +} + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser + +function buildEventSchema(types, property, parser) { + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType( + property.typeAnnotation.typeAnnotation, + types, + ); + const name = property.key.name; + const typeAnnotation = topLevelType.type; + const optional = property.optional || topLevelType.optional; + const _findEventArgumentsAn = findEventArgumentsAndType( + parser, + typeAnnotation, + types, + ), + argumentProps = _findEventArgumentsAn.argumentProps, + bubblingType = _findEventArgumentsAn.bubblingType, + paperTopLevelNameDeprecated = + _findEventArgumentsAn.paperTopLevelNameDeprecated; + const nonNullableArgumentProps = throwIfArgumentPropsAreNull( + argumentProps, + name, + ); + const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); + const argument = getEventArgument( + nonNullableArgumentProps, + parser, + getPropertyType, + ); + return emitBuildEventSchema( + paperTopLevelNameDeprecated, + name, + optional, + nonNullableBubblingType, + argument, + ); +} +function getEvents(eventTypeAST, types, parser) { + return eventTypeAST + .map(property => buildEventSchema(types, property, parser)) + .filter(Boolean); +} +module.exports = { + getEvents, + extractArrayElementType, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/events.js.flow b/packages/react-native-codegen/lib/parsers/typescript/components/events.js.flow new file mode 100644 index 000000000000..0be6d104d580 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/events.js.flow @@ -0,0 +1,291 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + EventTypeShape, + NamedShape, + EventTypeAnnotation, +} from '../../../CodegenSchema.js'; +import type {TypeDeclarationMap} from '../../utils'; +import type {Parser} from '../../parser'; +const {flattenProperties} = require('./componentsUtils'); +const {parseTopLevelType} = require('../parseTopLevelType'); +const { + throwIfEventHasNoName, + throwIfBubblingTypeIsNull, + throwIfArgumentPropsAreNull, +} = require('../../error-utils'); +const { + getEventArgument, + buildPropertiesForEvent, + handleEventHandler, + emitBuildEventSchema, +} = require('../../parsers-commons'); +const { + emitBoolProp, + emitDoubleProp, + emitFloatProp, + emitMixedProp, + emitStringProp, + emitInt32Prop, + emitObjectProp, + emitUnionProp, +} = require('../../parsers-primitives'); +function getPropertyType( + /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ + name, + optionalProperty: boolean, + /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */ + annotation, + parser: Parser, +): NamedShape { + const topLevelType = parseTopLevelType(annotation); + const typeAnnotation = topLevelType.type; + const optional = optionalProperty || topLevelType.optional; + const type = + typeAnnotation.type === 'TSTypeReference' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; + + switch (type) { + case 'TSBooleanKeyword': + return emitBoolProp(name, optional); + case 'TSStringKeyword': + return emitStringProp(name, optional); + case 'Int32': + return emitInt32Prop(name, optional); + case 'Double': + return emitDoubleProp(name, optional); + case 'Float': + return emitFloatProp(name, optional); + case 'TSTypeLiteral': + return emitObjectProp( + name, + optional, + parser, + typeAnnotation, + extractArrayElementType, + ); + case 'TSUnionType': + return emitUnionProp(name, optional, parser, typeAnnotation); + case 'UnsafeMixed': + return emitMixedProp(name, optional); + case 'TSArrayType': + return { + name, + optional, + typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), + }; + default: + throw new Error(`Unable to determine event type for "${name}": ${type}`); + } +} + +function extractArrayElementType( + typeAnnotation: $FlowFixMe, + name: string, + parser: Parser, +): EventTypeAnnotation { + const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); + + switch (type) { + case 'TSParenthesizedType': + return extractArrayElementType( + typeAnnotation.typeAnnotation, + name, + parser, + ); + case 'TSBooleanKeyword': + return {type: 'BooleanTypeAnnotation'}; + case 'TSStringKeyword': + return {type: 'StringTypeAnnotation'}; + case 'Float': + return { + type: 'FloatTypeAnnotation', + }; + case 'Int32': + return { + type: 'Int32TypeAnnotation', + }; + case 'TSNumberKeyword': + case 'Double': + return { + type: 'DoubleTypeAnnotation', + }; + case 'TSUnionType': + return { + type: 'StringEnumTypeAnnotation', + options: typeAnnotation.types.map(option => + parser.getLiteralValue(option), + ), + }; + case 'TSTypeLiteral': + return { + type: 'ObjectTypeAnnotation', + properties: parser + .getObjectProperties(typeAnnotation) + .map(member => + buildPropertiesForEvent(member, parser, getPropertyType), + ), + }; + case 'TSArrayType': + return { + type: 'ArrayTypeAnnotation', + elementType: extractArrayElementType( + typeAnnotation.elementType, + name, + parser, + ), + }; + default: + throw new Error( + `Unrecognized ${type} for Array ${name} in events.\n${JSON.stringify( + typeAnnotation, + null, + 2, + )}`, + ); + } +} + +function extractTypeFromTypeAnnotation( + typeAnnotation: $FlowFixMe, + parser: Parser, +): string { + return typeAnnotation.type === 'TSTypeReference' + ? parser.getTypeAnnotationName(typeAnnotation) + : typeAnnotation.type; +} + +function findEventArgumentsAndType( + parser: Parser, + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + bubblingType: void | 'direct' | 'bubble', + paperName: ?$FlowFixMe, +): { + argumentProps: ?$ReadOnlyArray<$FlowFixMe>, + paperTopLevelNameDeprecated: ?$FlowFixMe, + bubblingType: ?'direct' | 'bubble', +} { + if (typeAnnotation.type === 'TSInterfaceDeclaration') { + return { + argumentProps: flattenProperties([typeAnnotation], types, parser), + paperTopLevelNameDeprecated: paperName, + bubblingType, + }; + } + + if (typeAnnotation.type === 'TSTypeLiteral') { + return { + argumentProps: parser.getObjectProperties(typeAnnotation), + paperTopLevelNameDeprecated: paperName, + bubblingType, + }; + } + + throwIfEventHasNoName(typeAnnotation, parser); + const name = parser.getTypeAnnotationName(typeAnnotation); + if (name === 'Readonly') { + return findEventArgumentsAndType( + parser, + typeAnnotation.typeParameters.params[0], + types, + bubblingType, + paperName, + ); + } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { + return handleEventHandler( + name, + typeAnnotation, + parser, + types, + findEventArgumentsAndType, + ); + } else if (types[name]) { + let elementType = types[name]; + if (elementType.type === 'TSTypeAliasDeclaration') { + elementType = elementType.typeAnnotation; + } + return findEventArgumentsAndType( + parser, + elementType, + types, + bubblingType, + paperName, + ); + } else { + return { + argumentProps: null, + bubblingType: null, + paperTopLevelNameDeprecated: null, + }; + } +} + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser +type EventTypeAST = Object; + +function buildEventSchema( + types: TypeDeclarationMap, + property: EventTypeAST, + parser: Parser, +): ?EventTypeShape { + // unpack WithDefault, (T) or T|U + const topLevelType = parseTopLevelType( + property.typeAnnotation.typeAnnotation, + types, + ); + + const name = property.key.name; + const typeAnnotation = topLevelType.type; + const optional = property.optional || topLevelType.optional; + const {argumentProps, bubblingType, paperTopLevelNameDeprecated} = + findEventArgumentsAndType(parser, typeAnnotation, types); + + const nonNullableArgumentProps = throwIfArgumentPropsAreNull( + argumentProps, + name, + ); + const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); + + const argument = getEventArgument( + nonNullableArgumentProps, + parser, + getPropertyType, + ); + + return emitBuildEventSchema( + paperTopLevelNameDeprecated, + name, + optional, + nonNullableBubblingType, + argument, + ); +} + +function getEvents( + eventTypeAST: $ReadOnlyArray, + types: TypeDeclarationMap, + parser: Parser, +): $ReadOnlyArray { + return eventTypeAST + .map(property => buildEventSchema(types, property, parser)) + .filter(Boolean); +} + +module.exports = { + getEvents, + extractArrayElementType, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/extends.js b/packages/react-native-codegen/lib/parsers/typescript/components/extends.js new file mode 100644 index 000000000000..4c1f72301273 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/extends.js @@ -0,0 +1,41 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../parseTopLevelType'), + parseTopLevelType = _require.parseTopLevelType; +function isEvent(typeAnnotation) { + if (typeAnnotation.type !== 'TSTypeReference') { + return false; + } + const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); + return eventNames.has(typeAnnotation.typeName.name); +} + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser + +function categorizeProps(typeDefinition, types, events) { + // find events + for (const prop of typeDefinition) { + if (prop.type === 'TSPropertySignature') { + const topLevelType = parseTopLevelType( + prop.typeAnnotation.typeAnnotation, + types, + ); + if (isEvent(topLevelType.type)) { + events.push(prop); + } + } + } +} +module.exports = { + categorizeProps, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/extends.js.flow b/packages/react-native-codegen/lib/parsers/typescript/components/extends.js.flow new file mode 100644 index 000000000000..fa0ed221a957 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/extends.js.flow @@ -0,0 +1,49 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {TypeDeclarationMap} from '../../utils'; +const {parseTopLevelType} = require('../parseTopLevelType'); + +function isEvent(typeAnnotation: $FlowFixMe): boolean { + if (typeAnnotation.type !== 'TSTypeReference') { + return false; + } + const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); + return eventNames.has(typeAnnotation.typeName.name); +} + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser +type PropsAST = Object; + +function categorizeProps( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + events: Array, +): void { + // find events + for (const prop of typeDefinition) { + if (prop.type === 'TSPropertySignature') { + const topLevelType = parseTopLevelType( + prop.typeAnnotation.typeAnnotation, + types, + ); + + if (isEvent(topLevelType.type)) { + events.push(prop); + } + } + } +} + +module.exports = { + categorizeProps, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/index.js b/packages/react-native-codegen/lib/parsers/typescript/components/index.js new file mode 100644 index 000000000000..be070bf5cf62 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/index.js @@ -0,0 +1,55 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./commands'), + getCommands = _require.getCommands; +const _require2 = require('./events'), + getEvents = _require2.getEvents; +const _require3 = require('./extends'), + categorizeProps = _require3.categorizeProps; +const _require4 = require('../../parsers-commons'), + getOptions = _require4.getOptions, + findComponentConfig = _require4.findComponentConfig, + getCommandProperties = _require4.getCommandProperties; + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser + +// $FlowFixMe[signature-verification-failure] TODO(T108222691): Use flow-types for @babel/parser +function buildComponentSchema(ast, parser) { + const _findComponentConfig = findComponentConfig(ast, parser), + componentName = _findComponentConfig.componentName, + propsTypeName = _findComponentConfig.propsTypeName, + optionsExpression = _findComponentConfig.optionsExpression; + const types = parser.getTypes(ast); + const propProperties = parser.getProperties(propsTypeName, types); + const commandProperties = getCommandProperties(ast, parser); + const options = getOptions(optionsExpression); + const componentEventAsts = []; + categorizeProps(propProperties, types, componentEventAsts); + const _parser$getProps = parser.getProps(propProperties, types), + props = _parser$getProps.props, + extendsProps = _parser$getProps.extendsProps; + const events = getEvents(componentEventAsts, types, parser); + const commands = getCommands(commandProperties, types); + return { + filename: componentName, + componentName, + options, + extendsProps, + events, + props, + commands, + }; +} +module.exports = { + buildComponentSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/components/index.js.flow b/packages/react-native-codegen/lib/parsers/typescript/components/index.js.flow new file mode 100644 index 000000000000..4d3523c6a194 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/components/index.js.flow @@ -0,0 +1,64 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; +import type {Parser} from '../../parser'; +import type {ComponentSchemaBuilderConfig} from '../../schema.js'; + +const {getCommands} = require('./commands'); +const {getEvents} = require('./events'); +const {categorizeProps} = require('./extends'); +const { + getOptions, + findComponentConfig, + getCommandProperties, +} = require('../../parsers-commons'); + +// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser +type PropsAST = Object; + +// $FlowFixMe[signature-verification-failure] TODO(T108222691): Use flow-types for @babel/parser +function buildComponentSchema( + ast: $FlowFixMe, + parser: Parser, +): ComponentSchemaBuilderConfig { + const {componentName, propsTypeName, optionsExpression} = findComponentConfig( + ast, + parser, + ); + + const types = parser.getTypes(ast); + + const propProperties = parser.getProperties(propsTypeName, types); + + const commandProperties = getCommandProperties(ast, parser); + + const options = getOptions(optionsExpression); + + const componentEventAsts: Array = []; + categorizeProps(propProperties, types, componentEventAsts); + const {props, extendsProps} = parser.getProps(propProperties, types); + const events = getEvents(componentEventAsts, types, parser); + const commands = getCommands(commandProperties, types); + + return { + filename: componentName, + componentName, + options, + extendsProps, + events, + props, + commands, + }; +} + +module.exports = { + buildComponentSchema, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js new file mode 100644 index 000000000000..59f52acef62c --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js @@ -0,0 +1,212 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg: string) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg: Array) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getBool: (arg: boolean) => boolean; + readonly getNumber: (arg: number) => number; + readonly getString: (arg: string) => string; + sampleBool: boolean, + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getBool: (boolean) => boolean; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getBool: (arg: boolean) => Promise; + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); +export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); +`; +const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getSth: (a: number | null | undefined) => void; +} + +export interface Spec2 extends TurboModule { + readonly getSth: (a: number | null | undefined) => void; +} +`; +const EMPTY_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum SomeEnum { +} + +export interface Spec extends TurboModule { + readonly getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing( + 'EmptyEnumNativeModule', +); +`; +const MIXED_VALUES_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum SomeEnum { + NUM = 1, + STR = 'str', +} + +export interface Spec extends TurboModule { + readonly getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing( + 'MixedValuesEnumNativeModule', +); +`; +module.exports = { + NATIVE_MODULES_WITH_UNNAMED_PARAMS, + NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, + TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, + NATIVE_MODULES_WITH_NOT_ONLY_METHODS, + TWO_NATIVE_EXTENDING_TURBO_MODULE, + EMPTY_ENUM_NATIVE_MODULE, + MIXED_VALUES_ENUM_NATIVE_MODULE, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow new file mode 100644 index 000000000000..a8d08e8395ff --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow @@ -0,0 +1,221 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg: string) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getString: (arg: Array) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getBool: (arg: boolean) => boolean; + readonly getNumber: (arg: number) => number; + readonly getString: (arg: string) => string; + sampleBool: boolean, + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getBool: (boolean) => boolean; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getBool: (arg: boolean) => Promise; + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); +export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); +`; + +const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getSth: (a: number | null | undefined) => void; +} + +export interface Spec2 extends TurboModule { + readonly getSth: (a: number | null | undefined) => void; +} +`; + +const EMPTY_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum SomeEnum { +} + +export interface Spec extends TurboModule { + readonly getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing( + 'EmptyEnumNativeModule', +); +`; + +const MIXED_VALUES_ENUM_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum SomeEnum { + NUM = 1, + STR = 'str', +} + +export interface Spec extends TurboModule { + readonly getEnums: (a: SomeEnum) => string; +} + +export default TurboModuleRegistry.getEnforcing( + 'MixedValuesEnumNativeModule', +); +`; + +module.exports = { + NATIVE_MODULES_WITH_UNNAMED_PARAMS, + NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, + NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, + TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, + NATIVE_MODULES_WITH_NOT_ONLY_METHODS, + TWO_NATIVE_EXTENDING_TURBO_MODULE, + EMPTY_ENUM_NATIVE_MODULE, + MIXED_VALUES_ENUM_NATIVE_MODULE, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js new file mode 100644 index 000000000000..3c5098c713a4 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js @@ -0,0 +1,843 @@ +/** + * 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. + * + * + * @format + */ + +// @licenselint-loose-mode + +const EMPTY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type String = string; + +export interface Spec extends TurboModule { + // Exported methods. + readonly getObject: (arg: {const1: {const1: boolean}}) => { + const1: {const1: boolean}, + }; + readonly getReadOnlyObject: (arg: Readonly<{const1: Readonly<{const1: boolean}>}>) => Readonly<{ + const1: {const1: boolean}, + }>; + readonly getObject2: (arg: { a: String }) => Object; + readonly getObjectInArray: (arg: {const1: {const1: boolean}}) => Array<{ + const1: {const1: boolean}, + }>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type String = string; + +export interface Spec extends TurboModule { + readonly getConstants: () => { + isTesting: boolean; + reactNativeVersion: { + major: number; + minor: number; + patch?: number; + prerelease: number | null | undefined; + }; + forceTouchAvailable: boolean; + osVersion: string; + systemName: string; + interfaceIdiom: string; + }; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly passBool?: (arg: boolean) => void; + readonly passNumber: (arg: number) => void; + readonly passString: (arg: string) => void; + readonly passStringish: (arg: Stringish) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_ALIASES = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +type NumNum = number; +export type Num = (arg: NumNum) => void; +type Num2 = Num; +export type Void = void; +export type A = number; +export type B = number; +export type ObjectAlias = { + x: number; + y: number; + label: string; + truthy: boolean; +}; +export type ReadOnlyAlias = Readonly; + +export interface Spec extends TurboModule { + // Exported methods. + readonly getNumber: Num2; + readonly getVoid: () => Void; + readonly getArray: (a: Array) => {a: B}; + readonly getStringFromAlias: (a: ObjectAlias) => string; + readonly getStringFromNullableAlias: (a: ObjectAlias | null) => string; + readonly getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; + readonly getStringFromNullableReadOnlyAlias: (a: ReadOnlyAlias | null) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_NESTED_ALIASES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type Bar = { + z: number +}; + +type Foo = { + bar1: Bar, + bar2: Bar, +}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_NESTED_INTERFACES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +interface Bar { + z: number +}; + +interface Base1 { + bar1: Bar, +} + +interface Base2 { + bar2: Bar, +} + +interface Base3 extends Base2 { + bar3: Bar, +} + +interface Foo extends Base1, Base3 { + bar4: Bar, +}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_INTERSECTION_TYPES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type Bar = { + z: number +}; + +type Base1 = { + bar1: Bar, +} + +type Base2 = { + bar2: Bar, +} + +type Base3 = Base2 & { + bar3: Bar, +} + +type Foo = Base1 & Base3 & { + bar4: Bar, +}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getInt: (arg: Int32) => Int32; + readonly getFloat: (arg: Float) => Float; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getObject: (o: Object) => Object, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; +import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; + +export interface Spec extends TurboModule { + readonly getUnsafeObject: (o: UnsafeObject) => UnsafeObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_PARTIALS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeObj = { + a: string, + b?: boolean, +}; + +export interface Spec extends TurboModule { + getSomeObj: () => SomeObj; + getPartialSomeObj: () => Partial; + getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeObj = { + a: string, + b?: boolean, +}; + +export type PartialSomeObj = Partial; + +export interface Spec extends TurboModule { + getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_ROOT_TAG = ` +/** + * 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. + * + * @format + */ + +import type { + TurboModule, + RootTag, +} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getRootTag: (rootTag: RootTag) => RootTag; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly voidFunc: (arg: string | null | undefined) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_BASIC_ARRAY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: (arg: Array) => (Array<(string)>); + readonly getArray: (arg: ReadonlyArray) => (ReadonlyArray<(string)>); +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_BASIC_ARRAY2 = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: (arg: string[]) => ((string)[]); + readonly getArray: (arg: readonly string[]) => (readonly (string)[]); +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +type DisplayMetricsAndroid = { + width: number; +}; + +export interface Spec extends TurboModule { + readonly getConstants: () => { + readonly Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid; + }; + }; + readonly getConstants2: () => Readonly<{ + readonly Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid; + }; + }>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: ( + arg: Array<[string, string]>, + ) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getArray( + arg: [string, string][], + ): (string | number | boolean)[]; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeString = string; + +export interface Spec extends TurboModule { + readonly getArray: (arg: Array) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeString = string; + +export interface Spec extends TurboModule { + readonly getArray: (arg: SomeString[]) => string[]; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: ( + arg: Array>>>>, + ) => Array>>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_COMPLEX_ARRAY2 = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: ( + arg: string[][][][][], + ) => string[][][]; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_PROMISE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type String = string; +export type SomeObj = { a: string }; + +export interface Spec extends TurboModule { + readonly getValueWithPromise: () => Promise; + readonly getValueWithPromiseDefinedSomewhereElse: () => Promise; + readonly getValueWithPromiseObjDefinedSomewhereElse: () => Promise; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_CALLBACK = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getValueWithCallback: ( + callback: (value: string, arr: Array>) => void, + ) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; +const NATIVE_MODULE_WITH_UNION = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export interface Spec extends TurboModule { + readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; +const ANDROID_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule {} + +export default TurboModuleRegistry.getEnforcing( + 'SampleTurboModuleAndroid', +); +`; +const IOS_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export interface Spec extends TurboModule { + readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; +} + +export default TurboModuleRegistry.getEnforcing( + 'SampleTurboModuleIOS', +); +`; +const CXX_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export interface Spec extends TurboModule { + readonly getCallback: () => () => void; + readonly getMixed: (arg: unknown) => unknown; + readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; + readonly getMap: (arg: {[a: string]: number | null;}) => {[b: string]: number | null;}; + readonly getAnotherMap: (arg: {[key: string]: string}) => {[key: string]: string}; + readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing( + 'SampleTurboModuleCxx', +); +`; +module.exports = { + NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, + NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, + NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE, + NATIVE_MODULE_WITH_FLOAT_AND_INT32, + NATIVE_MODULE_WITH_ALIASES, + NATIVE_MODULE_WITH_NESTED_ALIASES, + NATIVE_MODULE_WITH_NESTED_INTERFACES, + NATIVE_MODULE_WITH_INTERSECTION_TYPES, + NATIVE_MODULE_WITH_PROMISE, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, + NATIVE_MODULE_WITH_SIMPLE_OBJECT, + NATIVE_MODULE_WITH_UNSAFE_OBJECT, + NATIVE_MODULE_WITH_PARTIALS, + NATIVE_MODULE_WITH_PARTIALS_COMPLEX, + NATIVE_MODULE_WITH_ROOT_TAG, + NATIVE_MODULE_WITH_NULLABLE_PARAM, + NATIVE_MODULE_WITH_BASIC_ARRAY, + NATIVE_MODULE_WITH_BASIC_ARRAY2, + NATIVE_MODULE_WITH_COMPLEX_ARRAY, + NATIVE_MODULE_WITH_COMPLEX_ARRAY2, + NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, + NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS, + NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, + NATIVE_MODULE_WITH_CALLBACK, + NATIVE_MODULE_WITH_UNION, + EMPTY_NATIVE_MODULE, + ANDROID_ONLY_NATIVE_MODULE, + IOS_ONLY_NATIVE_MODULE, + CXX_ONLY_NATIVE_MODULE, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow new file mode 100644 index 000000000000..5f6377869afb --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow @@ -0,0 +1,873 @@ +/** + * 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. + * + * @flow strict-local + * @format + */ + +// @licenselint-loose-mode + +const EMPTY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type String = string; + +export interface Spec extends TurboModule { + // Exported methods. + readonly getObject: (arg: {const1: {const1: boolean}}) => { + const1: {const1: boolean}, + }; + readonly getReadOnlyObject: (arg: Readonly<{const1: Readonly<{const1: boolean}>}>) => Readonly<{ + const1: {const1: boolean}, + }>; + readonly getObject2: (arg: { a: String }) => Object; + readonly getObjectInArray: (arg: {const1: {const1: boolean}}) => Array<{ + const1: {const1: boolean}, + }>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type String = string; + +export interface Spec extends TurboModule { + readonly getConstants: () => { + isTesting: boolean; + reactNativeVersion: { + major: number; + minor: number; + patch?: number; + prerelease: number | null | undefined; + }; + forceTouchAvailable: boolean; + osVersion: string; + systemName: string; + interfaceIdiom: string; + }; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly passBool?: (arg: boolean) => void; + readonly passNumber: (arg: number) => void; + readonly passString: (arg: string) => void; + readonly passStringish: (arg: Stringish) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_ALIASES = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +type NumNum = number; +export type Num = (arg: NumNum) => void; +type Num2 = Num; +export type Void = void; +export type A = number; +export type B = number; +export type ObjectAlias = { + x: number; + y: number; + label: string; + truthy: boolean; +}; +export type ReadOnlyAlias = Readonly; + +export interface Spec extends TurboModule { + // Exported methods. + readonly getNumber: Num2; + readonly getVoid: () => Void; + readonly getArray: (a: Array) => {a: B}; + readonly getStringFromAlias: (a: ObjectAlias) => string; + readonly getStringFromNullableAlias: (a: ObjectAlias | null) => string; + readonly getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; + readonly getStringFromNullableReadOnlyAlias: (a: ReadOnlyAlias | null) => string; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_NESTED_ALIASES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type Bar = { + z: number +}; + +type Foo = { + bar1: Bar, + bar2: Bar, +}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_NESTED_INTERFACES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +interface Bar { + z: number +}; + +interface Base1 { + bar1: Bar, +} + +interface Base2 { + bar2: Bar, +} + +interface Base3 extends Base2 { + bar3: Bar, +} + +interface Foo extends Base1, Base3 { + bar4: Bar, +}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_INTERSECTION_TYPES = ` +/** + * 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. + * + * @format + */ + + +import type {TurboModule} from '../RCTExport'; +import * as TurboModuleRegistry from '../TurboModuleRegistry'; + +type Bar = { + z: number +}; + +type Base1 = { + bar1: Bar, +} + +type Base2 = { + bar2: Bar, +} + +type Base3 = Base2 & { + bar3: Bar, +} + +type Foo = Base1 & Base3 & { + bar4: Bar, +}; + +export interface Spec extends TurboModule { + // Exported methods. + foo1: (x: Foo) => Foo; + foo2: (x: Foo) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getInt: (arg: Int32) => Int32; + readonly getFloat: (arg: Float) => Float; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getObject: (o: Object) => Object, +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; +import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; + +export interface Spec extends TurboModule { + readonly getUnsafeObject: (o: UnsafeObject) => UnsafeObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_PARTIALS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeObj = { + a: string, + b?: boolean, +}; + +export interface Spec extends TurboModule { + getSomeObj: () => SomeObj; + getPartialSomeObj: () => Partial; + getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeObj = { + a: string, + b?: boolean, +}; + +export type PartialSomeObj = Partial; + +export interface Spec extends TurboModule { + getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_ROOT_TAG = ` +/** + * 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. + * + * @format + */ + +import type { + TurboModule, + RootTag, +} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getRootTag: (rootTag: RootTag) => RootTag; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly voidFunc: (arg: string | null | undefined) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_BASIC_ARRAY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: (arg: Array) => (Array<(string)>); + readonly getArray: (arg: ReadonlyArray) => (ReadonlyArray<(string)>); +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_BASIC_ARRAY2 = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: (arg: string[]) => ((string)[]); + readonly getArray: (arg: readonly string[]) => (readonly (string)[]); +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +type DisplayMetricsAndroid = { + width: number; +}; + +export interface Spec extends TurboModule { + readonly getConstants: () => { + readonly Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid; + }; + }; + readonly getConstants2: () => Readonly<{ + readonly Dimensions: { + windowPhysicalPixels: DisplayMetricsAndroid; + }; + }>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: ( + arg: Array<[string, string]>, + ) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + getArray( + arg: [string, string][], + ): (string | number | boolean)[]; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeString = string; + +export interface Spec extends TurboModule { + readonly getArray: (arg: Array) => Array; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type SomeString = string; + +export interface Spec extends TurboModule { + readonly getArray: (arg: SomeString[]) => string[]; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: ( + arg: Array>>>>, + ) => Array>>; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_COMPLEX_ARRAY2 = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getArray: ( + arg: string[][][][][], + ) => string[][][]; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_PROMISE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type String = string; +export type SomeObj = { a: string }; + +export interface Spec extends TurboModule { + readonly getValueWithPromise: () => Promise; + readonly getValueWithPromiseDefinedSomewhereElse: () => Promise; + readonly getValueWithPromiseObjDefinedSomewhereElse: () => Promise; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_CALLBACK = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule { + readonly getValueWithCallback: ( + callback: (value: string, arr: Array>) => void, + ) => void; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); +`; + +const NATIVE_MODULE_WITH_UNION = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export interface Spec extends TurboModule { + readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); + +`; + +const ANDROID_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export interface Spec extends TurboModule {} + +export default TurboModuleRegistry.getEnforcing( + 'SampleTurboModuleAndroid', +); +`; + +const IOS_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export interface Spec extends TurboModule { + readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; +} + +export default TurboModuleRegistry.getEnforcing( + 'SampleTurboModuleIOS', +); +`; + +const CXX_ONLY_NATIVE_MODULE = ` +/** + * 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. + * + * @format + */ + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; + +export enum Quality { + SD, + HD, +} + +export enum Resolution { + Low = 720, + High = 1080, +} + +export enum Floppy { + LowDensity = 0.72, + HighDensity = 1.44, +} + +export enum StringOptions { + One = 'one', + Two = 'two', + Three = 'three', +} + +export type ChooseInt = 1 | 2 | 3; +export type ChooseFloat = 1.44 | 2.88 | 5.76; +export type ChooseObject = {} | {low: string}; +export type ChooseString = 'One' | 'Two' | 'Three'; + +export interface Spec extends TurboModule { + readonly getCallback: () => () => void; + readonly getMixed: (arg: unknown) => unknown; + readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; + readonly getMap: (arg: {[a: string]: number | null;}) => {[b: string]: number | null;}; + readonly getAnotherMap: (arg: {[key: string]: string}) => {[key: string]: string}; + readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; +} + +export default TurboModuleRegistry.getEnforcing( + 'SampleTurboModuleCxx', +); +`; + +module.exports = { + NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, + NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, + NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE, + NATIVE_MODULE_WITH_FLOAT_AND_INT32, + NATIVE_MODULE_WITH_ALIASES, + NATIVE_MODULE_WITH_NESTED_ALIASES, + NATIVE_MODULE_WITH_NESTED_INTERFACES, + NATIVE_MODULE_WITH_INTERSECTION_TYPES, + NATIVE_MODULE_WITH_PROMISE, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS, + NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, + NATIVE_MODULE_WITH_SIMPLE_OBJECT, + NATIVE_MODULE_WITH_UNSAFE_OBJECT, + NATIVE_MODULE_WITH_PARTIALS, + NATIVE_MODULE_WITH_PARTIALS_COMPLEX, + NATIVE_MODULE_WITH_ROOT_TAG, + NATIVE_MODULE_WITH_NULLABLE_PARAM, + NATIVE_MODULE_WITH_BASIC_ARRAY, + NATIVE_MODULE_WITH_BASIC_ARRAY2, + NATIVE_MODULE_WITH_COMPLEX_ARRAY, + NATIVE_MODULE_WITH_COMPLEX_ARRAY2, + NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, + NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS, + NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, + NATIVE_MODULE_WITH_CALLBACK, + NATIVE_MODULE_WITH_UNION, + EMPTY_NATIVE_MODULE, + ANDROID_ONLY_NATIVE_MODULE, + IOS_ONLY_NATIVE_MODULE, + CXX_ONLY_NATIVE_MODULE, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/modules/index.js b/packages/react-native-codegen/lib/parsers/typescript/modules/index.js new file mode 100644 index 000000000000..8add15009bf4 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/modules/index.js @@ -0,0 +1,383 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('../parseTopLevelType'), + flattenIntersectionType = _require.flattenIntersectionType; +const _require2 = require('../components/componentsUtils'), + flattenProperties = _require2.flattenProperties; +const _require3 = require('../../parsers-commons'), + parseObjectProperty = _require3.parseObjectProperty; +const _require4 = require('../../parsers-primitives'), + emitArrayType = _require4.emitArrayType, + emitFunction = _require4.emitFunction, + emitDictionary = _require4.emitDictionary, + emitPromise = _require4.emitPromise, + emitRootTag = _require4.emitRootTag, + emitUnion = _require4.emitUnion, + emitCommonTypes = _require4.emitCommonTypes, + typeAliasResolution = _require4.typeAliasResolution, + typeEnumResolution = _require4.typeEnumResolution, + translateArrayTypeAnnotation = _require4.translateArrayTypeAnnotation; +const _require5 = require('../../errors'), + UnsupportedGenericParserError = _require5.UnsupportedGenericParserError, + UnsupportedTypeAnnotationParserError = + _require5.UnsupportedTypeAnnotationParserError; +function translateObjectTypeAnnotation( + hasteModuleName, + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + nullable, + objectMembers, + typeResolutionStatus, + baseTypes, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, +) { + // $FlowFixMe[missing-type-arg] + const properties = objectMembers + .map(property => { + return tryParse(() => { + return parseObjectProperty( + property, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + translateTypeAnnotation, + parser, + ); + }); + }) + .filter(Boolean); + let objectTypeAnnotation; + if (baseTypes.length === 0) { + objectTypeAnnotation = { + type: 'ObjectTypeAnnotation', + properties, + }; + } else { + objectTypeAnnotation = { + type: 'ObjectTypeAnnotation', + properties, + baseTypes, + }; + } + return typeAliasResolution( + typeResolutionStatus, + objectTypeAnnotation, + aliasMap, + nullable, + ); +} +function translateTypeReferenceAnnotation( + typeName, + nullable, + typeAnnotation, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, +) { + switch (typeName) { + case 'RootTag': { + return emitRootTag(nullable); + } + case 'Promise': { + return emitPromise( + hasteModuleName, + typeAnnotation, + parser, + nullable, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + ); + } + case 'Array': + case 'ReadonlyArray': { + return emitArrayType( + hasteModuleName, + typeAnnotation, + parser, + types, + aliasMap, + enumMap, + cxxOnly, + nullable, + translateTypeAnnotation, + ); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + if (!commonType) { + throw new UnsupportedGenericParserError( + hasteModuleName, + typeAnnotation, + parser, + ); + } + return commonType; + } + } +} +function translateTypeAnnotation( + hasteModuleName, + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + typeScriptTypeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, +) { + const _parser$getResolvedTy = parser.getResolvedTypeAnnotation( + typeScriptTypeAnnotation, + types, + parser, + ), + nullable = _parser$getResolvedTy.nullable, + typeAnnotation = _parser$getResolvedTy.typeAnnotation, + typeResolutionStatus = _parser$getResolvedTy.typeResolutionStatus; + const resolveTypeaAnnotationFn = parser.getResolveTypeAnnotationFN(); + resolveTypeaAnnotationFn(typeScriptTypeAnnotation, types, parser); + switch (typeAnnotation.type) { + case 'TSArrayType': { + return translateArrayTypeAnnotation( + hasteModuleName, + types, + aliasMap, + enumMap, + cxxOnly, + 'Array', + typeAnnotation.elementType, + nullable, + translateTypeAnnotation, + parser, + ); + } + case 'TSTypeOperator': { + if ( + typeAnnotation.operator === 'readonly' && + typeAnnotation.typeAnnotation.type === 'TSArrayType' + ) { + return translateArrayTypeAnnotation( + hasteModuleName, + types, + aliasMap, + enumMap, + cxxOnly, + 'ReadonlyArray', + typeAnnotation.typeAnnotation.elementType, + nullable, + translateTypeAnnotation, + parser, + ); + } else { + throw new UnsupportedGenericParserError( + hasteModuleName, + typeAnnotation, + parser, + ); + } + } + case 'TSTypeReference': { + return translateTypeReferenceAnnotation( + parser.getTypeAnnotationName(typeAnnotation), + nullable, + typeAnnotation, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSInterfaceDeclaration': { + var _typeAnnotation$exten; + const baseTypes = ( + (_typeAnnotation$exten = typeAnnotation.extends) !== null && + _typeAnnotation$exten !== void 0 + ? _typeAnnotation$exten + : [] + ).map(extend => extend.expression.name); + for (const baseType of baseTypes) { + // ensure base types exist and appear in aliasMap + translateTypeAnnotation( + hasteModuleName, + { + type: 'TSTypeReference', + typeName: { + type: 'Identifier', + name: baseType, + }, + }, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + return translateObjectTypeAnnotation( + hasteModuleName, + nullable, + flattenProperties([typeAnnotation], types, parser), + typeResolutionStatus, + baseTypes, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSIntersectionType': { + return translateObjectTypeAnnotation( + hasteModuleName, + nullable, + flattenProperties( + flattenIntersectionType(typeAnnotation, types), + types, + parser, + ), + typeResolutionStatus, + [], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSTypeLiteral': { + // if there is TSIndexSignature, then it is a dictionary + if (typeAnnotation.members) { + const indexSignatures = typeAnnotation.members.filter( + member => member.type === 'TSIndexSignature', + ); + if (indexSignatures.length > 0) { + // check the property type to prevent developers from using unsupported types + // the return value from `translateTypeAnnotation` is unused + const propertyType = indexSignatures[0].typeAnnotation; + const valueType = translateTypeAnnotation( + hasteModuleName, + propertyType, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + // no need to do further checking + return emitDictionary(nullable, valueType); + } + } + return translateObjectTypeAnnotation( + hasteModuleName, + nullable, + typeAnnotation.members, + typeResolutionStatus, + [], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSEnumDeclaration': { + return typeEnumResolution( + typeAnnotation, + typeResolutionStatus, + nullable, + hasteModuleName, + enumMap, + parser, + ); + } + case 'TSFunctionType': { + return emitFunction( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ); + } + case 'TSUnionType': { + return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + if (!commonType) { + throw new UnsupportedTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + parser.language(), + ); + } + return commonType; + } + } +} +module.exports = { + typeScriptTranslateTypeAnnotation: translateTypeAnnotation, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/modules/index.js.flow b/packages/react-native-codegen/lib/parsers/typescript/modules/index.js.flow new file mode 100644 index 000000000000..4668924375cc --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/modules/index.js.flow @@ -0,0 +1,396 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + NamedShape, + NativeModuleAliasMap, + NativeModuleEnumMap, + NativeModuleBaseTypeAnnotation, + NativeModuleTypeAnnotation, + Nullable, +} from '../../../CodegenSchema'; + +import type {Parser} from '../../parser'; +import type { + ParserErrorCapturer, + TypeResolutionStatus, + TypeDeclarationMap, +} from '../../utils'; +const {flattenIntersectionType} = require('../parseTopLevelType'); +const {flattenProperties} = require('../components/componentsUtils'); + +const {parseObjectProperty} = require('../../parsers-commons'); + +const { + emitArrayType, + emitFunction, + emitDictionary, + emitPromise, + emitRootTag, + emitUnion, + emitCommonTypes, + typeAliasResolution, + typeEnumResolution, + translateArrayTypeAnnotation, +} = require('../../parsers-primitives'); + +const { + UnsupportedGenericParserError, + UnsupportedTypeAnnotationParserError, +} = require('../../errors'); + +function translateObjectTypeAnnotation( + hasteModuleName: string, + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + nullable: boolean, + objectMembers: $ReadOnlyArray<$FlowFixMe>, + typeResolutionStatus: TypeResolutionStatus, + baseTypes: $ReadOnlyArray, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + parser: Parser, +): Nullable { + // $FlowFixMe[missing-type-arg] + const properties = objectMembers + .map>>(property => { + return tryParse(() => { + return parseObjectProperty( + property, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + translateTypeAnnotation, + parser, + ); + }); + }) + .filter(Boolean); + + let objectTypeAnnotation; + if (baseTypes.length === 0) { + objectTypeAnnotation = { + type: 'ObjectTypeAnnotation', + properties, + }; + } else { + objectTypeAnnotation = { + type: 'ObjectTypeAnnotation', + properties, + baseTypes, + }; + } + + return typeAliasResolution( + typeResolutionStatus, + objectTypeAnnotation, + aliasMap, + nullable, + ); +} + +function translateTypeReferenceAnnotation( + typeName: string, + nullable: boolean, + typeAnnotation: $FlowFixMe, + hasteModuleName: string, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + parser: Parser, +): Nullable { + switch (typeName) { + case 'RootTag': { + return emitRootTag(nullable); + } + case 'Promise': { + return emitPromise( + hasteModuleName, + typeAnnotation, + parser, + nullable, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + ); + } + case 'Array': + case 'ReadonlyArray': { + return emitArrayType( + hasteModuleName, + typeAnnotation, + parser, + types, + aliasMap, + enumMap, + cxxOnly, + nullable, + translateTypeAnnotation, + ); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + + if (!commonType) { + throw new UnsupportedGenericParserError( + hasteModuleName, + typeAnnotation, + parser, + ); + } + return commonType; + } + } +} +function translateTypeAnnotation( + hasteModuleName: string, + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + typeScriptTypeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + parser: Parser, +): Nullable { + const {nullable, typeAnnotation, typeResolutionStatus} = + parser.getResolvedTypeAnnotation(typeScriptTypeAnnotation, types, parser); + const resolveTypeaAnnotationFn = parser.getResolveTypeAnnotationFN(); + resolveTypeaAnnotationFn(typeScriptTypeAnnotation, types, parser); + + switch (typeAnnotation.type) { + case 'TSArrayType': { + return translateArrayTypeAnnotation( + hasteModuleName, + types, + aliasMap, + enumMap, + cxxOnly, + 'Array', + typeAnnotation.elementType, + nullable, + translateTypeAnnotation, + parser, + ); + } + case 'TSTypeOperator': { + if ( + typeAnnotation.operator === 'readonly' && + typeAnnotation.typeAnnotation.type === 'TSArrayType' + ) { + return translateArrayTypeAnnotation( + hasteModuleName, + types, + aliasMap, + enumMap, + cxxOnly, + 'ReadonlyArray', + typeAnnotation.typeAnnotation.elementType, + nullable, + translateTypeAnnotation, + parser, + ); + } else { + throw new UnsupportedGenericParserError( + hasteModuleName, + typeAnnotation, + parser, + ); + } + } + case 'TSTypeReference': { + return translateTypeReferenceAnnotation( + parser.getTypeAnnotationName(typeAnnotation), + nullable, + typeAnnotation, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSInterfaceDeclaration': { + const baseTypes = (typeAnnotation.extends ?? []).map( + extend => extend.expression.name, + ); + for (const baseType of baseTypes) { + // ensure base types exist and appear in aliasMap + translateTypeAnnotation( + hasteModuleName, + { + type: 'TSTypeReference', + typeName: {type: 'Identifier', name: baseType}, + }, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + + return translateObjectTypeAnnotation( + hasteModuleName, + nullable, + flattenProperties([typeAnnotation], types, parser), + typeResolutionStatus, + baseTypes, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSIntersectionType': { + return translateObjectTypeAnnotation( + hasteModuleName, + nullable, + flattenProperties( + flattenIntersectionType(typeAnnotation, types), + types, + parser, + ), + typeResolutionStatus, + [], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSTypeLiteral': { + // if there is TSIndexSignature, then it is a dictionary + if (typeAnnotation.members) { + const indexSignatures = typeAnnotation.members.filter( + member => member.type === 'TSIndexSignature', + ); + if (indexSignatures.length > 0) { + // check the property type to prevent developers from using unsupported types + // the return value from `translateTypeAnnotation` is unused + const propertyType = indexSignatures[0].typeAnnotation; + const valueType = translateTypeAnnotation( + hasteModuleName, + propertyType, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + // no need to do further checking + return emitDictionary(nullable, valueType); + } + } + + return translateObjectTypeAnnotation( + hasteModuleName, + nullable, + typeAnnotation.members, + typeResolutionStatus, + [], + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + parser, + ); + } + case 'TSEnumDeclaration': { + return typeEnumResolution( + typeAnnotation, + typeResolutionStatus, + nullable, + hasteModuleName, + enumMap, + parser, + ); + } + case 'TSFunctionType': { + return emitFunction( + nullable, + hasteModuleName, + typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + translateTypeAnnotation, + parser, + ); + } + case 'TSUnionType': { + return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); + } + default: { + const commonType = emitCommonTypes( + hasteModuleName, + types, + typeAnnotation, + aliasMap, + enumMap, + tryParse, + cxxOnly, + nullable, + parser, + ); + + if (!commonType) { + throw new UnsupportedTypeAnnotationParserError( + hasteModuleName, + typeAnnotation, + parser.language(), + ); + } + return commonType; + } + } +} + +module.exports = { + typeScriptTranslateTypeAnnotation: translateTypeAnnotation, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js b/packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js new file mode 100644 index 000000000000..0ef998d8920c --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js @@ -0,0 +1,203 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function getValueFromTypes(value, types) { + switch (value.type) { + case 'TSTypeReference': + if (types[value.typeName.name]) { + return getValueFromTypes(types[value.typeName.name], types); + } else { + return value; + } + case 'TSTypeAliasDeclaration': + return getValueFromTypes(value.typeAnnotation, types); + default: + return value; + } +} +function isNull(t) { + return t.type === 'TSNullKeyword' || t.type === 'TSUndefinedKeyword'; +} +function isNullOrVoid(t) { + return isNull(t) || t.type === 'TSVoidKeyword'; +} +function couldBeNumericLiteral(type) { + return type === 'Literal' || type === 'NumericLiteral'; +} +function couldBeSimpleLiteral(type) { + return ( + couldBeNumericLiteral(type) || + type === 'StringLiteral' || + type === 'BooleanLiteral' + ); +} +function evaluateLiteral(literalNode) { + const valueType = literalNode.type; + if (valueType === 'TSLiteralType') { + const literal = literalNode.literal; + if (couldBeSimpleLiteral(literal.type)) { + if ( + typeof literal.value === 'string' || + typeof literal.value === 'number' || + typeof literal.value === 'boolean' + ) { + return literal.value; + } + } else if ( + literal.type === 'UnaryExpression' && + literal.operator === '-' && + couldBeNumericLiteral(literal.argument.type) && + typeof literal.argument.value === 'number' + ) { + return -literal.argument.value; + } + } else if (isNull(literalNode)) { + return null; + } + throw new Error( + 'The default value in WithDefault must be string, number, boolean or null .', + ); +} +function handleUnionAndParen(type, result, knownTypes) { + switch (type.type) { + case 'TSParenthesizedType': { + handleUnionAndParen(type.typeAnnotation, result, knownTypes); + break; + } + case 'TSUnionType': { + // the order is important + // result.optional must be set first + for (const t of type.types) { + if (isNullOrVoid(t)) { + result.optional = true; + } + } + for (const t of type.types) { + if (!isNullOrVoid(t)) { + handleUnionAndParen(t, result, knownTypes); + } + } + break; + } + case 'TSTypeReference': + if (type.typeName.name === 'Readonly') { + handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); + } else if (type.typeName.name === 'WithDefault') { + if (result.optional) { + throw new Error( + 'WithDefault<> is optional and does not need to be marked as optional. Please remove the union of undefined and/or null', + ); + } + if (type.typeParameters.params.length !== 2) { + throw new Error( + 'WithDefault requires two parameters: type and default value.', + ); + } + if (result.defaultValue !== undefined) { + throw new Error( + 'Multiple WithDefault is not allowed nested or in a union type.', + ); + } + result.optional = true; + result.defaultValue = evaluateLiteral(type.typeParameters.params[1]); + handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); + } else if (!knownTypes) { + result.unions.push(type); + } else { + const resolvedType = getValueFromTypes(type, knownTypes); + if ( + resolvedType.type === 'TSTypeReference' && + resolvedType.typeName.name === type.typeName.name + ) { + result.unions.push(type); + } else { + handleUnionAndParen(resolvedType, result, knownTypes); + } + } + break; + default: + result.unions.push(type); + } +} +function parseTopLevelType(type, knownTypes) { + let result = { + unions: [], + optional: false, + }; + handleUnionAndParen(type, result, knownTypes); + if (result.unions.length === 0) { + throw new Error('Union type could not be just null or undefined.'); + } else if (result.unions.length === 1) { + return { + type: result.unions[0], + optional: result.optional, + defaultValue: result.defaultValue, + }; + } else { + return { + type: { + type: 'TSUnionType', + types: result.unions, + }, + optional: result.optional, + defaultValue: result.defaultValue, + }; + } +} +function handleIntersectionAndParen(type, result, knownTypes) { + switch (type.type) { + case 'TSParenthesizedType': { + handleIntersectionAndParen(type.typeAnnotation, result, knownTypes); + break; + } + case 'TSIntersectionType': { + for (const t of type.types) { + handleIntersectionAndParen(t, result, knownTypes); + } + break; + } + case 'TSTypeReference': + if (type.typeName.name === 'Readonly') { + handleIntersectionAndParen( + type.typeParameters.params[0], + result, + knownTypes, + ); + } else if (type.typeName.name === 'WithDefault') { + throw new Error('WithDefault<> is now allowed in intersection types.'); + } else if (!knownTypes) { + result.push(type); + } else { + const resolvedType = getValueFromTypes(type, knownTypes); + if ( + resolvedType.type === 'TSTypeReference' && + resolvedType.typeName.name === type.typeName.name + ) { + result.push(type); + } else { + handleIntersectionAndParen(resolvedType, result, knownTypes); + } + } + break; + default: + result.push(type); + } +} +function flattenIntersectionType(type, knownTypes) { + const result = []; + handleIntersectionAndParen(type, result, knownTypes); + return result; +} +module.exports = { + parseTopLevelType, + flattenIntersectionType, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js.flow b/packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js.flow new file mode 100644 index 000000000000..eb43a78a0de9 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/parseTopLevelType.js.flow @@ -0,0 +1,243 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {TypeDeclarationMap} from '../utils'; + +export type LegalDefaultValues = string | number | boolean | null; + +type TopLevelTypeInternal = { + unions: Array<$FlowFixMe>, + optional: boolean, + defaultValue?: LegalDefaultValues, +}; + +export type TopLevelType = { + type: $FlowFixMe, + optional: boolean, + defaultValue?: LegalDefaultValues, +}; + +function getValueFromTypes( + value: $FlowFixMe, + types: TypeDeclarationMap, +): $FlowFixMe { + switch (value.type) { + case 'TSTypeReference': + if (types[value.typeName.name]) { + return getValueFromTypes(types[value.typeName.name], types); + } else { + return value; + } + case 'TSTypeAliasDeclaration': + return getValueFromTypes(value.typeAnnotation, types); + default: + return value; + } +} + +function isNull(t: $FlowFixMe) { + return t.type === 'TSNullKeyword' || t.type === 'TSUndefinedKeyword'; +} + +function isNullOrVoid(t: $FlowFixMe) { + return isNull(t) || t.type === 'TSVoidKeyword'; +} + +function couldBeNumericLiteral(type: string) { + return type === 'Literal' || type === 'NumericLiteral'; +} + +function couldBeSimpleLiteral(type: string) { + return ( + couldBeNumericLiteral(type) || + type === 'StringLiteral' || + type === 'BooleanLiteral' + ); +} + +function evaluateLiteral( + literalNode: $FlowFixMe, +): string | number | boolean | null { + const valueType = literalNode.type; + if (valueType === 'TSLiteralType') { + const literal = literalNode.literal; + if (couldBeSimpleLiteral(literal.type)) { + if ( + typeof literal.value === 'string' || + typeof literal.value === 'number' || + typeof literal.value === 'boolean' + ) { + return literal.value; + } + } else if ( + literal.type === 'UnaryExpression' && + literal.operator === '-' && + couldBeNumericLiteral(literal.argument.type) && + typeof literal.argument.value === 'number' + ) { + return -literal.argument.value; + } + } else if (isNull(literalNode)) { + return null; + } + + throw new Error( + 'The default value in WithDefault must be string, number, boolean or null .', + ); +} + +function handleUnionAndParen( + type: $FlowFixMe, + result: TopLevelTypeInternal, + knownTypes?: TypeDeclarationMap, +): void { + switch (type.type) { + case 'TSParenthesizedType': { + handleUnionAndParen(type.typeAnnotation, result, knownTypes); + break; + } + case 'TSUnionType': { + // the order is important + // result.optional must be set first + for (const t of type.types) { + if (isNullOrVoid(t)) { + result.optional = true; + } + } + for (const t of type.types) { + if (!isNullOrVoid(t)) { + handleUnionAndParen(t, result, knownTypes); + } + } + break; + } + case 'TSTypeReference': + if (type.typeName.name === 'Readonly') { + handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); + } else if (type.typeName.name === 'WithDefault') { + if (result.optional) { + throw new Error( + 'WithDefault<> is optional and does not need to be marked as optional. Please remove the union of undefined and/or null', + ); + } + if (type.typeParameters.params.length !== 2) { + throw new Error( + 'WithDefault requires two parameters: type and default value.', + ); + } + if (result.defaultValue !== undefined) { + throw new Error( + 'Multiple WithDefault is not allowed nested or in a union type.', + ); + } + result.optional = true; + result.defaultValue = evaluateLiteral(type.typeParameters.params[1]); + handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); + } else if (!knownTypes) { + result.unions.push(type); + } else { + const resolvedType = getValueFromTypes(type, knownTypes); + if ( + resolvedType.type === 'TSTypeReference' && + resolvedType.typeName.name === type.typeName.name + ) { + result.unions.push(type); + } else { + handleUnionAndParen(resolvedType, result, knownTypes); + } + } + break; + default: + result.unions.push(type); + } +} + +function parseTopLevelType( + type: $FlowFixMe, + knownTypes?: TypeDeclarationMap, +): TopLevelType { + let result: TopLevelTypeInternal = {unions: [], optional: false}; + handleUnionAndParen(type, result, knownTypes); + if (result.unions.length === 0) { + throw new Error('Union type could not be just null or undefined.'); + } else if (result.unions.length === 1) { + return { + type: result.unions[0], + optional: result.optional, + defaultValue: result.defaultValue, + }; + } else { + return { + type: {type: 'TSUnionType', types: result.unions}, + optional: result.optional, + defaultValue: result.defaultValue, + }; + } +} + +function handleIntersectionAndParen( + type: $FlowFixMe, + result: Array<$FlowFixMe>, + knownTypes?: TypeDeclarationMap, +): void { + switch (type.type) { + case 'TSParenthesizedType': { + handleIntersectionAndParen(type.typeAnnotation, result, knownTypes); + break; + } + case 'TSIntersectionType': { + for (const t of type.types) { + handleIntersectionAndParen(t, result, knownTypes); + } + break; + } + case 'TSTypeReference': + if (type.typeName.name === 'Readonly') { + handleIntersectionAndParen( + type.typeParameters.params[0], + result, + knownTypes, + ); + } else if (type.typeName.name === 'WithDefault') { + throw new Error('WithDefault<> is now allowed in intersection types.'); + } else if (!knownTypes) { + result.push(type); + } else { + const resolvedType = getValueFromTypes(type, knownTypes); + if ( + resolvedType.type === 'TSTypeReference' && + resolvedType.typeName.name === type.typeName.name + ) { + result.push(type); + } else { + handleIntersectionAndParen(resolvedType, result, knownTypes); + } + } + break; + default: + result.push(type); + } +} + +function flattenIntersectionType( + type: $FlowFixMe, + knownTypes?: TypeDeclarationMap, +): Array<$FlowFixMe> { + const result: Array<$FlowFixMe> = []; + handleIntersectionAndParen(type, result, knownTypes); + return result; +} + +module.exports = { + parseTopLevelType, + flattenIntersectionType, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/parser.d.ts b/packages/react-native-codegen/lib/parsers/typescript/parser.d.ts new file mode 100644 index 000000000000..eeec1a78a6d1 --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/parser.d.ts @@ -0,0 +1,17 @@ +/** + * 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. + */ + +import type { Parser } from '../parser'; +import type { SchemaType } from '../../CodegenSchema'; +import type { ParserType } from '../errors'; + +export declare class TypeScriptParser implements Parser { + language(): ParserType; + parseFile(filename: string): SchemaType; + parseString(contents: string, filename?: string): SchemaType; + parseModuleFixture(filename: string): SchemaType; +} diff --git a/packages/react-native-codegen/lib/parsers/typescript/parser.js b/packages/react-native-codegen/lib/parsers/typescript/parser.js new file mode 100644 index 000000000000..097aa4e5746e --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/parser.js @@ -0,0 +1,533 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, 'string'); + return 'symbol' == typeof i ? i : String(i); +} +function _toPrimitive(t, r) { + if ('object' != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || 'default'); + if ('object' != typeof i) return i; + throw new TypeError('@@toPrimitive must return a primitive value.'); + } + return ('string' === r ? String : Number)(t); +} +const invariant = require('invariant'); +const _require = require('./modules'), + typeScriptTranslateTypeAnnotation = + _require.typeScriptTranslateTypeAnnotation; + +// $FlowFixMe[untyped-import] Use flow-types for @babel/parser +const babelParser = require('@babel/parser'); +const _require2 = require('../parsers-primitives'), + Visitor = _require2.Visitor; +const _require3 = require('./components'), + buildComponentSchema = _require3.buildComponentSchema; +const _require4 = require('../schema.js'), + wrapComponentSchema = _require4.wrapComponentSchema; +const _require5 = require('../parsers-commons.js'), + buildSchema = _require5.buildSchema, + buildModuleSchema = _require5.buildModuleSchema, + extendsForProp = _require5.extendsForProp, + buildPropSchema = _require5.buildPropSchema, + handleGenericTypeAnnotation = _require5.handleGenericTypeAnnotation; +const _require6 = require('./parseTopLevelType'), + parseTopLevelType = _require6.parseTopLevelType; +const _require7 = require('./components/componentsUtils'), + getSchemaInfo = _require7.getSchemaInfo, + getTypeAnnotation = _require7.getTypeAnnotation, + flattenProperties = _require7.flattenProperties; +const fs = require('fs'); +const _require8 = require('../errors'), + UnsupportedObjectPropertyTypeAnnotationParserError = + _require8.UnsupportedObjectPropertyTypeAnnotationParserError; +class TypeScriptParser { + constructor() { + _defineProperty( + this, + 'typeParameterInstantiation', + 'TSTypeParameterInstantiation', + ); + _defineProperty(this, 'typeAlias', 'TSTypeAliasDeclaration'); + _defineProperty(this, 'enumDeclaration', 'TSEnumDeclaration'); + _defineProperty(this, 'interfaceDeclaration', 'TSInterfaceDeclaration'); + _defineProperty(this, 'nullLiteralTypeAnnotation', 'TSNullKeyword'); + _defineProperty( + this, + 'undefinedLiteralTypeAnnotation', + 'TSUndefinedKeyword', + ); + } + isProperty(property) { + return property.type === 'TSPropertySignature'; + } + getKeyName(property, hasteModuleName) { + if (!this.isProperty(property)) { + throw new UnsupportedObjectPropertyTypeAnnotationParserError( + hasteModuleName, + property, + property.type, + this.language(), + ); + } + return property.key.name; + } + language() { + return 'TypeScript'; + } + getTypeAnnotationName(typeAnnotation) { + var _typeAnnotation$typeN; + return typeAnnotation === null || typeAnnotation === void 0 + ? void 0 + : (_typeAnnotation$typeN = typeAnnotation.typeName) === null || + _typeAnnotation$typeN === void 0 + ? void 0 + : _typeAnnotation$typeN.name; + } + checkIfInvalidModule(typeArguments) { + return ( + typeArguments.type !== 'TSTypeParameterInstantiation' || + typeArguments.params.length !== 1 || + typeArguments.params[0].type !== 'TSTypeReference' || + typeArguments.params[0].typeName.name !== 'Spec' + ); + } + remapUnionTypeAnnotationMemberNames(membersTypes) { + const remapLiteral = item => { + return item.literal + ? item.literal.type + .replace('NumericLiteral', 'NumberTypeAnnotation') + .replace('StringLiteral', 'StringTypeAnnotation') + : 'ObjectTypeAnnotation'; + }; + return [...new Set(membersTypes.map(remapLiteral))]; + } + parseFile(filename) { + const contents = fs.readFileSync(filename, 'utf8'); + return this.parseString(contents, filename); + } + parseString(contents, filename) { + return buildSchema( + contents, + filename, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + Visitor, + this, + typeScriptTranslateTypeAnnotation, + ); + } + parseModuleFixture(filename) { + const contents = fs.readFileSync(filename, 'utf8'); + return this.parseString(contents, 'path/NativeSampleTurboModule.ts'); + } + getAst(contents) { + return babelParser.parse(contents, { + sourceType: 'module', + plugins: ['typescript'], + }).program; + } + getFunctionTypeAnnotationParameters(functionTypeAnnotation) { + return functionTypeAnnotation.parameters; + } + getFunctionNameFromParameter(parameter) { + return parameter.typeAnnotation; + } + getParameterName(parameter) { + return parameter.name; + } + getParameterTypeAnnotation(parameter) { + return parameter.typeAnnotation.typeAnnotation; + } + getFunctionTypeAnnotationReturnType(functionTypeAnnotation) { + return functionTypeAnnotation.typeAnnotation.typeAnnotation; + } + parseEnumMembersType(typeAnnotation) { + var _typeAnnotation$membe; + const enumInitializer = + (_typeAnnotation$membe = typeAnnotation.members[0]) === null || + _typeAnnotation$membe === void 0 + ? void 0 + : _typeAnnotation$membe.initializer; + const enumMembersType = + !enumInitializer || enumInitializer.type === 'StringLiteral' + ? 'StringTypeAnnotation' + : enumInitializer.type === 'NumericLiteral' + ? 'NumberTypeAnnotation' + : null; + if (!enumMembersType) { + throw new Error( + 'Enum values must be either blank, number, or string values.', + ); + } + return enumMembersType; + } + validateEnumMembersSupported(typeAnnotation, enumMembersType) { + if (!typeAnnotation.members || typeAnnotation.members.length === 0) { + throw new Error('Enums should have at least one member.'); + } + const enumInitializerType = + enumMembersType === 'StringTypeAnnotation' + ? 'StringLiteral' + : enumMembersType === 'NumberTypeAnnotation' + ? 'NumericLiteral' + : null; + typeAnnotation.members.forEach(member => { + var _member$initializer$t, _member$initializer; + if ( + ((_member$initializer$t = + (_member$initializer = member.initializer) === null || + _member$initializer === void 0 + ? void 0 + : _member$initializer.type) !== null && + _member$initializer$t !== void 0 + ? _member$initializer$t + : 'StringLiteral') !== enumInitializerType + ) { + throw new Error( + 'Enum values can not be mixed. They all must be either blank, number, or string values.', + ); + } + }); + } + parseEnumMembers(typeAnnotation) { + return typeAnnotation.members.map(member => { + var _member$initializer$v, _member$initializer2; + return { + name: member.id.name, + value: + (_member$initializer$v = + (_member$initializer2 = member.initializer) === null || + _member$initializer2 === void 0 + ? void 0 + : _member$initializer2.value) !== null && + _member$initializer$v !== void 0 + ? _member$initializer$v + : member.id.name, + }; + }); + } + isModuleInterface(node) { + var _node$extends; + return ( + node.type === 'TSInterfaceDeclaration' && + ((_node$extends = node.extends) === null || _node$extends === void 0 + ? void 0 + : _node$extends.length) === 1 && + node.extends[0].type === 'TSExpressionWithTypeArguments' && + node.extends[0].expression.name === 'TurboModule' + ); + } + isGenericTypeAnnotation(type) { + return type === 'TSTypeReference'; + } + extractAnnotatedElement(typeAnnotation, types) { + return types[typeAnnotation.typeParameters.params[0].typeName.name]; + } + + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + getTypes(ast) { + return ast.body.reduce((types, node) => { + switch (node.type) { + case 'ExportNamedDeclaration': { + if (node.declaration) { + switch (node.declaration.type) { + case 'TSTypeAliasDeclaration': + case 'TSInterfaceDeclaration': + case 'TSEnumDeclaration': { + types[node.declaration.id.name] = node.declaration; + break; + } + } + } + break; + } + case 'TSTypeAliasDeclaration': + case 'TSInterfaceDeclaration': + case 'TSEnumDeclaration': { + types[node.id.name] = node; + break; + } + } + return types; + }, {}); + } + callExpressionTypeParameters(callExpression) { + return callExpression.typeParameters || null; + } + computePartialProperties( + properties, + hasteModuleName, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + ) { + return properties.map(prop => { + return { + name: prop.key.name, + optional: true, + typeAnnotation: typeScriptTranslateTypeAnnotation( + hasteModuleName, + prop.typeAnnotation.typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + this, + ), + }; + }); + } + functionTypeAnnotation(propertyValueType) { + return ( + propertyValueType === 'TSFunctionType' || + propertyValueType === 'TSMethodSignature' + ); + } + getTypeArgumentParamsFromDeclaration(declaration) { + return declaration.typeParameters.params; + } + + // This FlowFixMe is supposed to refer to typeArgumentParams and funcArgumentParams of generated AST. + getNativeComponentType(typeArgumentParams, funcArgumentParams) { + return { + propsTypeName: typeArgumentParams[0].typeName.name, + componentName: funcArgumentParams[0].value, + }; + } + getAnnotatedElementProperties(annotatedElement) { + return annotatedElement.typeAnnotation.members; + } + bodyProperties(typeAlias) { + return typeAlias.body.body; + } + convertKeywordToTypeAnnotation(keyword) { + switch (keyword) { + case 'TSBooleanKeyword': + return 'BooleanTypeAnnotation'; + case 'TSNumberKeyword': + return 'NumberTypeAnnotation'; + case 'TSVoidKeyword': + return 'VoidTypeAnnotation'; + case 'TSStringKeyword': + return 'StringTypeAnnotation'; + case 'TSUnknownKeyword': + return 'MixedTypeAnnotation'; + } + return keyword; + } + argumentForProp(prop) { + return prop.expression; + } + nameForArgument(prop) { + return prop.expression.name; + } + isOptionalProperty(property) { + return property.optional || false; + } + getGetSchemaInfoFN() { + return getSchemaInfo; + } + getTypeAnnotationFromProperty(property) { + return property.typeAnnotation.typeAnnotation; + } + getGetTypeAnnotationFN() { + return getTypeAnnotation; + } + getResolvedTypeAnnotation( + // TODO(T108222691): Use flow-types for @babel/parser + typeAnnotation, + types, + parser, + ) { + invariant( + typeAnnotation != null, + 'resolveTypeAnnotation(): typeAnnotation cannot be null', + ); + let node = + typeAnnotation.type === 'TSTypeAnnotation' + ? typeAnnotation.typeAnnotation + : typeAnnotation; + let nullable = false; + let typeResolutionStatus = { + successful: false, + }; + for (;;) { + const topLevelType = parseTopLevelType(node); + nullable = nullable || topLevelType.optional; + node = topLevelType.type; + if (node.type !== 'TSTypeReference') { + break; + } + const typeAnnotationName = this.getTypeAnnotationName(node); + const resolvedTypeAnnotation = types[typeAnnotationName]; + if (resolvedTypeAnnotation == null) { + break; + } + const _handleGenericTypeAnn = handleGenericTypeAnnotation( + node, + resolvedTypeAnnotation, + this, + ), + typeAnnotationNode = _handleGenericTypeAnn.typeAnnotation, + status = _handleGenericTypeAnn.typeResolutionStatus; + typeResolutionStatus = status; + node = typeAnnotationNode; + } + return { + nullable: nullable, + typeAnnotation: node, + typeResolutionStatus, + }; + } + getResolveTypeAnnotationFN() { + return (typeAnnotation, types, parser) => { + return this.getResolvedTypeAnnotation(typeAnnotation, types, parser); + }; + } + isEvent(typeAnnotation) { + if (typeAnnotation.type !== 'TSTypeReference') { + return false; + } + const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); + return eventNames.has(this.getTypeAnnotationName(typeAnnotation)); + } + isProp(name, typeAnnotation) { + if (typeAnnotation.type !== 'TSTypeReference') { + return true; + } + const isStyle = + name === 'style' && + typeAnnotation.type === 'GenericTypeAnnotation' && + this.getTypeAnnotationName(typeAnnotation) === 'ViewStyleProp'; + return !isStyle; + } + getProps(typeDefinition, types) { + const extendsProps = []; + const componentPropAsts = []; + const remaining = []; + for (const prop of typeDefinition) { + // find extends + if (prop.type === 'TSExpressionWithTypeArguments') { + const extend = extendsForProp(prop, types, this); + if (extend) { + extendsProps.push(extend); + continue; + } + } + remaining.push(prop); + } + + // find events and props + for (const prop of flattenProperties(remaining, types, this)) { + const topLevelType = parseTopLevelType( + prop.typeAnnotation.typeAnnotation, + types, + ); + if ( + prop.type === 'TSPropertySignature' && + !this.isEvent(topLevelType.type) && + this.isProp(prop.key.name, prop) + ) { + componentPropAsts.push(prop); + } + } + return { + props: componentPropAsts + .map(property => buildPropSchema(property, types, this)) + .filter(Boolean), + extendsProps, + }; + } + getProperties(typeName, types) { + const alias = types[typeName]; + if (!alias) { + throw new Error( + `Failed to find definition for "${typeName}", please check that you have a valid codegen typescript file`, + ); + } + const aliasKind = + alias.type === 'TSInterfaceDeclaration' ? 'interface' : 'type'; + try { + if (aliasKind === 'interface') { + var _alias$extends; + return [ + ...((_alias$extends = alias.extends) !== null && + _alias$extends !== void 0 + ? _alias$extends + : []), + ...alias.body.body, + ]; + } + return ( + alias.typeAnnotation.members || + alias.typeAnnotation.typeParameters.params[0].members || + alias.typeAnnotation.typeParameters.params + ); + } catch (e) { + throw new Error( + `Failed to find ${aliasKind} definition for "${typeName}", please check that you have a valid codegen typescript file`, + ); + } + } + nextNodeForTypeAlias(typeAnnotation) { + return typeAnnotation.typeAnnotation; + } + nextNodeForEnum(typeAnnotation) { + return typeAnnotation; + } + genericTypeAnnotationErrorMessage(typeAnnotation) { + return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}'), an interface ('${this.interfaceDeclaration}'), or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; + } + extractTypeFromTypeAnnotation(typeAnnotation) { + return typeAnnotation.type === 'TSTypeReference' + ? typeAnnotation.typeName.name + : typeAnnotation.type; + } + getObjectProperties(typeAnnotation) { + return typeAnnotation.members; + } + getLiteralValue(option) { + return option.literal.value; + } + getPaperTopLevelNameDeprecated(typeAnnotation) { + return typeAnnotation.typeParameters.params.length > 1 + ? typeAnnotation.typeParameters.params[1].literal.value + : null; + } +} +module.exports = { + TypeScriptParser, +}; diff --git a/packages/react-native-codegen/lib/parsers/typescript/parser.js.flow b/packages/react-native-codegen/lib/parsers/typescript/parser.js.flow new file mode 100644 index 000000000000..9e8dc836b4ed --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/typescript/parser.js.flow @@ -0,0 +1,574 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type { + UnionTypeAnnotationMemberType, + SchemaType, + NamedShape, + Nullable, + NativeModuleParamTypeAnnotation, + NativeModuleEnumMembers, + NativeModuleEnumMemberType, + NativeModuleAliasMap, + NativeModuleEnumMap, + PropTypeAnnotation, + ExtendsPropsShape, +} from '../../CodegenSchema'; +import type {ParserType} from '../errors'; +import type { + GetSchemaInfoFN, + GetTypeAnnotationFN, + Parser, + ResolveTypeAnnotationFN, +} from '../parser'; +import type { + ParserErrorCapturer, + TypeDeclarationMap, + PropAST, + TypeResolutionStatus, +} from '../utils'; +const invariant = require('invariant'); + +const {typeScriptTranslateTypeAnnotation} = require('./modules'); + +// $FlowFixMe[untyped-import] Use flow-types for @babel/parser +const babelParser = require('@babel/parser'); + +const {Visitor} = require('../parsers-primitives'); +const {buildComponentSchema} = require('./components'); +const {wrapComponentSchema} = require('../schema.js'); +const { + buildSchema, + buildModuleSchema, + extendsForProp, + buildPropSchema, + handleGenericTypeAnnotation, +} = require('../parsers-commons.js'); + +const {parseTopLevelType} = require('./parseTopLevelType'); +const { + getSchemaInfo, + getTypeAnnotation, + flattenProperties, +} = require('./components/componentsUtils'); +const fs = require('fs'); + +const { + UnsupportedObjectPropertyTypeAnnotationParserError, +} = require('../errors'); + +class TypeScriptParser implements Parser { + typeParameterInstantiation: string = 'TSTypeParameterInstantiation'; + typeAlias: string = 'TSTypeAliasDeclaration'; + enumDeclaration: string = 'TSEnumDeclaration'; + interfaceDeclaration: string = 'TSInterfaceDeclaration'; + nullLiteralTypeAnnotation: string = 'TSNullKeyword'; + undefinedLiteralTypeAnnotation: string = 'TSUndefinedKeyword'; + + isProperty(property: $FlowFixMe): boolean { + return property.type === 'TSPropertySignature'; + } + + getKeyName(property: $FlowFixMe, hasteModuleName: string): string { + if (!this.isProperty(property)) { + throw new UnsupportedObjectPropertyTypeAnnotationParserError( + hasteModuleName, + property, + property.type, + this.language(), + ); + } + return property.key.name; + } + + language(): ParserType { + return 'TypeScript'; + } + + getTypeAnnotationName(typeAnnotation: $FlowFixMe): string { + return typeAnnotation?.typeName?.name; + } + + checkIfInvalidModule(typeArguments: $FlowFixMe): boolean { + return ( + typeArguments.type !== 'TSTypeParameterInstantiation' || + typeArguments.params.length !== 1 || + typeArguments.params[0].type !== 'TSTypeReference' || + typeArguments.params[0].typeName.name !== 'Spec' + ); + } + + remapUnionTypeAnnotationMemberNames( + membersTypes: $FlowFixMe[], + ): UnionTypeAnnotationMemberType[] { + const remapLiteral = (item: $FlowFixMe) => { + return item.literal + ? item.literal.type + .replace('NumericLiteral', 'NumberTypeAnnotation') + .replace('StringLiteral', 'StringTypeAnnotation') + : 'ObjectTypeAnnotation'; + }; + + return [...new Set(membersTypes.map(remapLiteral))]; + } + + parseFile(filename: string): SchemaType { + const contents = fs.readFileSync(filename, 'utf8'); + + return this.parseString(contents, filename); + } + + parseString(contents: string, filename: ?string): SchemaType { + return buildSchema( + contents, + filename, + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + Visitor, + this, + typeScriptTranslateTypeAnnotation, + ); + } + + parseModuleFixture(filename: string): SchemaType { + const contents = fs.readFileSync(filename, 'utf8'); + + return this.parseString(contents, 'path/NativeSampleTurboModule.ts'); + } + + getAst(contents: string): $FlowFixMe { + return babelParser.parse(contents, { + sourceType: 'module', + plugins: ['typescript'], + }).program; + } + + getFunctionTypeAnnotationParameters( + functionTypeAnnotation: $FlowFixMe, + ): $ReadOnlyArray<$FlowFixMe> { + return functionTypeAnnotation.parameters; + } + + getFunctionNameFromParameter( + parameter: NamedShape>, + ): $FlowFixMe { + return parameter.typeAnnotation; + } + + getParameterName(parameter: $FlowFixMe): string { + return parameter.name; + } + + getParameterTypeAnnotation(parameter: $FlowFixMe): $FlowFixMe { + return parameter.typeAnnotation.typeAnnotation; + } + + getFunctionTypeAnnotationReturnType( + functionTypeAnnotation: $FlowFixMe, + ): $FlowFixMe { + return functionTypeAnnotation.typeAnnotation.typeAnnotation; + } + + parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType { + const enumInitializer = typeAnnotation.members[0]?.initializer; + const enumMembersType: ?NativeModuleEnumMemberType = + !enumInitializer || enumInitializer.type === 'StringLiteral' + ? 'StringTypeAnnotation' + : enumInitializer.type === 'NumericLiteral' + ? 'NumberTypeAnnotation' + : null; + if (!enumMembersType) { + throw new Error( + 'Enum values must be either blank, number, or string values.', + ); + } + return enumMembersType; + } + + validateEnumMembersSupported( + typeAnnotation: $FlowFixMe, + enumMembersType: NativeModuleEnumMemberType, + ): void { + if (!typeAnnotation.members || typeAnnotation.members.length === 0) { + throw new Error('Enums should have at least one member.'); + } + + const enumInitializerType = + enumMembersType === 'StringTypeAnnotation' + ? 'StringLiteral' + : enumMembersType === 'NumberTypeAnnotation' + ? 'NumericLiteral' + : null; + + typeAnnotation.members.forEach(member => { + if ( + (member.initializer?.type ?? 'StringLiteral') !== enumInitializerType + ) { + throw new Error( + 'Enum values can not be mixed. They all must be either blank, number, or string values.', + ); + } + }); + } + + parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers { + return typeAnnotation.members.map(member => ({ + name: member.id.name, + value: member.initializer?.value ?? member.id.name, + })); + } + + isModuleInterface(node: $FlowFixMe): boolean { + return ( + node.type === 'TSInterfaceDeclaration' && + node.extends?.length === 1 && + node.extends[0].type === 'TSExpressionWithTypeArguments' && + node.extends[0].expression.name === 'TurboModule' + ); + } + + isGenericTypeAnnotation(type: $FlowFixMe): boolean { + return type === 'TSTypeReference'; + } + + extractAnnotatedElement( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + ): $FlowFixMe { + return types[typeAnnotation.typeParameters.params[0].typeName.name]; + } + + /** + * TODO(T108222691): Use flow-types for @babel/parser + */ + getTypes(ast: $FlowFixMe): TypeDeclarationMap { + return ast.body.reduce((types, node) => { + switch (node.type) { + case 'ExportNamedDeclaration': { + if (node.declaration) { + switch (node.declaration.type) { + case 'TSTypeAliasDeclaration': + case 'TSInterfaceDeclaration': + case 'TSEnumDeclaration': { + types[node.declaration.id.name] = node.declaration; + break; + } + } + } + break; + } + case 'TSTypeAliasDeclaration': + case 'TSInterfaceDeclaration': + case 'TSEnumDeclaration': { + types[node.id.name] = node; + break; + } + } + return types; + }, {}); + } + + callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null { + return callExpression.typeParameters || null; + } + + computePartialProperties( + properties: Array<$FlowFixMe>, + hasteModuleName: string, + types: TypeDeclarationMap, + aliasMap: {...NativeModuleAliasMap}, + enumMap: {...NativeModuleEnumMap}, + tryParse: ParserErrorCapturer, + cxxOnly: boolean, + ): Array<$FlowFixMe> { + return properties.map(prop => { + return { + name: prop.key.name, + optional: true, + typeAnnotation: typeScriptTranslateTypeAnnotation( + hasteModuleName, + prop.typeAnnotation.typeAnnotation, + types, + aliasMap, + enumMap, + tryParse, + cxxOnly, + this, + ), + }; + }); + } + + functionTypeAnnotation(propertyValueType: string): boolean { + return ( + propertyValueType === 'TSFunctionType' || + propertyValueType === 'TSMethodSignature' + ); + } + + getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe { + return declaration.typeParameters.params; + } + + // This FlowFixMe is supposed to refer to typeArgumentParams and funcArgumentParams of generated AST. + getNativeComponentType( + typeArgumentParams: $FlowFixMe, + funcArgumentParams: $FlowFixMe, + ): {[string]: string} { + return { + propsTypeName: typeArgumentParams[0].typeName.name, + componentName: funcArgumentParams[0].value, + }; + } + + getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe { + return annotatedElement.typeAnnotation.members; + } + + bodyProperties(typeAlias: TypeDeclarationMap): $ReadOnlyArray<$FlowFixMe> { + return typeAlias.body.body; + } + + convertKeywordToTypeAnnotation(keyword: string): string { + switch (keyword) { + case 'TSBooleanKeyword': + return 'BooleanTypeAnnotation'; + case 'TSNumberKeyword': + return 'NumberTypeAnnotation'; + case 'TSVoidKeyword': + return 'VoidTypeAnnotation'; + case 'TSStringKeyword': + return 'StringTypeAnnotation'; + case 'TSUnknownKeyword': + return 'MixedTypeAnnotation'; + } + + return keyword; + } + + argumentForProp(prop: PropAST): $FlowFixMe { + return prop.expression; + } + + nameForArgument(prop: PropAST): $FlowFixMe { + return prop.expression.name; + } + + isOptionalProperty(property: $FlowFixMe): boolean { + return property.optional || false; + } + + getGetSchemaInfoFN(): GetSchemaInfoFN { + return getSchemaInfo; + } + + getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe { + return property.typeAnnotation.typeAnnotation; + } + + getGetTypeAnnotationFN(): GetTypeAnnotationFN { + return getTypeAnnotation; + } + + getResolvedTypeAnnotation( + // TODO(T108222691): Use flow-types for @babel/parser + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + parser: Parser, + ): { + nullable: boolean, + typeAnnotation: $FlowFixMe, + typeResolutionStatus: TypeResolutionStatus, + } { + invariant( + typeAnnotation != null, + 'resolveTypeAnnotation(): typeAnnotation cannot be null', + ); + + let node = + typeAnnotation.type === 'TSTypeAnnotation' + ? typeAnnotation.typeAnnotation + : typeAnnotation; + let nullable = false; + let typeResolutionStatus: TypeResolutionStatus = { + successful: false, + }; + + for (;;) { + const topLevelType = parseTopLevelType(node); + nullable = nullable || topLevelType.optional; + node = topLevelType.type; + + if (node.type !== 'TSTypeReference') { + break; + } + + const typeAnnotationName = this.getTypeAnnotationName(node); + const resolvedTypeAnnotation = types[typeAnnotationName]; + if (resolvedTypeAnnotation == null) { + break; + } + + const {typeAnnotation: typeAnnotationNode, typeResolutionStatus: status} = + handleGenericTypeAnnotation(node, resolvedTypeAnnotation, this); + typeResolutionStatus = status; + node = typeAnnotationNode; + } + + return { + nullable: nullable, + typeAnnotation: node, + typeResolutionStatus, + }; + } + + getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN { + return ( + typeAnnotation: $FlowFixMe, + types: TypeDeclarationMap, + parser: Parser, + ) => { + return this.getResolvedTypeAnnotation(typeAnnotation, types, parser); + }; + } + + isEvent(typeAnnotation: $FlowFixMe): boolean { + if (typeAnnotation.type !== 'TSTypeReference') { + return false; + } + const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); + return eventNames.has(this.getTypeAnnotationName(typeAnnotation)); + } + + isProp(name: string, typeAnnotation: $FlowFixMe): boolean { + if (typeAnnotation.type !== 'TSTypeReference') { + return true; + } + const isStyle = + name === 'style' && + typeAnnotation.type === 'GenericTypeAnnotation' && + this.getTypeAnnotationName(typeAnnotation) === 'ViewStyleProp'; + return !isStyle; + } + + getProps( + typeDefinition: $ReadOnlyArray, + types: TypeDeclarationMap, + ): { + props: $ReadOnlyArray>, + extendsProps: $ReadOnlyArray, + } { + const extendsProps: Array = []; + const componentPropAsts: Array = []; + const remaining: Array = []; + + for (const prop of typeDefinition) { + // find extends + if (prop.type === 'TSExpressionWithTypeArguments') { + const extend = extendsForProp(prop, types, this); + if (extend) { + extendsProps.push(extend); + continue; + } + } + + remaining.push(prop); + } + + // find events and props + for (const prop of flattenProperties(remaining, types, this)) { + const topLevelType = parseTopLevelType( + prop.typeAnnotation.typeAnnotation, + types, + ); + + if ( + prop.type === 'TSPropertySignature' && + !this.isEvent(topLevelType.type) && + this.isProp(prop.key.name, prop) + ) { + componentPropAsts.push(prop); + } + } + + return { + props: componentPropAsts + .map(property => buildPropSchema(property, types, this)) + .filter(Boolean), + extendsProps, + }; + } + + getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe { + const alias = types[typeName]; + if (!alias) { + throw new Error( + `Failed to find definition for "${typeName}", please check that you have a valid codegen typescript file`, + ); + } + const aliasKind = + alias.type === 'TSInterfaceDeclaration' ? 'interface' : 'type'; + + try { + if (aliasKind === 'interface') { + return [...(alias.extends ?? []), ...alias.body.body]; + } + + return ( + alias.typeAnnotation.members || + alias.typeAnnotation.typeParameters.params[0].members || + alias.typeAnnotation.typeParameters.params + ); + } catch (e) { + throw new Error( + `Failed to find ${aliasKind} definition for "${typeName}", please check that you have a valid codegen typescript file`, + ); + } + } + + nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.typeAnnotation; + } + + nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation; + } + + genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string { + return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}'), an interface ('${this.interfaceDeclaration}'), or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; + } + + extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string { + return typeAnnotation.type === 'TSTypeReference' + ? typeAnnotation.typeName.name + : typeAnnotation.type; + } + + getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.members; + } + + getLiteralValue(option: $FlowFixMe): $FlowFixMe { + return option.literal.value; + } + + getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe { + return typeAnnotation.typeParameters.params.length > 1 + ? typeAnnotation.typeParameters.params[1].literal.value + : null; + } +} + +module.exports = { + TypeScriptParser, +}; diff --git a/packages/react-native-codegen/lib/parsers/utils.js b/packages/react-native-codegen/lib/parsers/utils.js new file mode 100644 index 000000000000..a6cfea8f5b3c --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/utils.js @@ -0,0 +1,157 @@ +/** + * 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. + * + * + * @format + */ + +'use strict'; + +const _require = require('./errors'), + ParserError = _require.ParserError; +const path = require('path'); +function extractNativeModuleName(filename) { + // this should drop everything after the file name. For Example it will drop: + // .android.js, .android.ts, .android.tsx, .ios.js, .ios.ts, .ios.tsx, .js, .ts, .tsx + return path.basename(filename).split('.')[0]; +} + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs + +function createParserErrorCapturer() { + // $FlowFixMe[missing-empty-array-annot] + const errors = []; + function guard(fn) { + try { + return fn(); + } catch (error) { + if (!(error instanceof ParserError)) { + throw error; + } + // $FlowFixMe[incompatible-call] + errors.push(error); + return null; + } + } + + // $FlowFixMe[incompatible-return] + return [errors, guard]; +} +function verifyPlatforms(hasteModuleName, moduleName) { + let cxxOnly = false; + const excludedPlatforms = new Set(); + const namesToValidate = [moduleName, hasteModuleName]; + namesToValidate.forEach(name => { + if (name.endsWith('Android')) { + excludedPlatforms.add('iOS'); + return; + } + if (name.endsWith('IOS')) { + excludedPlatforms.add('android'); + return; + } + if (name.endsWith('Cxx')) { + cxxOnly = true; + excludedPlatforms.add('iOS'); + excludedPlatforms.add('android'); + return; + } + }); + return { + cxxOnly, + excludedPlatforms: Array.from(excludedPlatforms), + }; +} + +// TODO(T108222691): Use flow-types for @babel/parser +function visit(astNode, visitor) { + const queue = [astNode]; + while (queue.length !== 0) { + let item = queue.shift(); + if (!(typeof item === 'object' && item != null)) { + continue; + } + if ( + typeof item.type === 'string' && + typeof visitor[item.type] === 'function' + ) { + // Don't visit any children + visitor[item.type](item); + } else if (Array.isArray(item)) { + queue.push(...item); + } else { + queue.push(...Object.values(item)); + } + } +} +function getConfigType( + // TODO(T71778680): Flow-type this node. + ast, + Visitor, +) { + let infoMap = { + isComponent: false, + isModule: false, + }; + visit(ast, Visitor(infoMap)); + const isModule = infoMap.isModule, + isComponent = infoMap.isComponent; + if (isModule && isComponent) { + throw new Error( + 'Found type extending "TurboModule" and exported "codegenNativeComponent" declaration in one file. Split them into separated files.', + ); + } + if (isModule) { + return 'module'; + } else if (isComponent) { + return 'component'; + } else { + return 'none'; + } +} + +// TODO(T71778680): Flow-type ASTNodes. +function isModuleRegistryCall(node) { + if (node.type !== 'CallExpression') { + return false; + } + const callExpression = node; + if (callExpression.callee.type !== 'MemberExpression') { + return false; + } + const memberExpression = callExpression.callee; + if ( + !( + memberExpression.object.type === 'Identifier' && + memberExpression.object.name === 'TurboModuleRegistry' + ) + ) { + return false; + } + if ( + !( + memberExpression.property.type === 'Identifier' && + (memberExpression.property.name === 'get' || + memberExpression.property.name === 'getEnforcing') + ) + ) { + return false; + } + if (memberExpression.computed) { + return false; + } + return true; +} +module.exports = { + getConfigType, + extractNativeModuleName, + createParserErrorCapturer, + verifyPlatforms, + visit, + isModuleRegistryCall, +}; diff --git a/packages/react-native-codegen/lib/parsers/utils.js.flow b/packages/react-native-codegen/lib/parsers/utils.js.flow new file mode 100644 index 000000000000..5c904c6c80fe --- /dev/null +++ b/packages/react-native-codegen/lib/parsers/utils.js.flow @@ -0,0 +1,208 @@ +/** + * 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. + * + * @flow strict + * @format + */ + +'use strict'; + +const {ParserError} = require('./errors'); + +const path = require('path'); + +export type TypeDeclarationMap = {[declarationName: string]: $FlowFixMe}; + +export type TypeResolutionStatus = + | $ReadOnly<{ + type: 'alias' | 'enum', + successful: true, + name: string, + }> + | $ReadOnly<{ + successful: false, + }>; + +function extractNativeModuleName(filename: string): string { + // this should drop everything after the file name. For Example it will drop: + // .android.js, .android.ts, .android.tsx, .ios.js, .ios.ts, .ios.tsx, .js, .ts, .tsx + return path.basename(filename).split('.')[0]; +} + +export type ParserErrorCapturer = (fn: () => T) => ?T; + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs +export type PropAST = Object; + +// $FlowFixMe[unclear-type] there's no flowtype for ASTs +export type ASTNode = Object; + +function createParserErrorCapturer(): [ + Array, + ParserErrorCapturer, +] { + // $FlowFixMe[missing-empty-array-annot] + const errors = []; + function guard(fn: () => T): ?T { + try { + return fn(); + } catch (error) { + if (!(error instanceof ParserError)) { + throw error; + } + // $FlowFixMe[incompatible-call] + errors.push(error); + + return null; + } + } + + // $FlowFixMe[incompatible-return] + return [errors, guard]; +} + +function verifyPlatforms( + hasteModuleName: string, + moduleName: string, +): $ReadOnly<{ + cxxOnly: boolean, + excludedPlatforms: Array<'iOS' | 'android'>, +}> { + let cxxOnly = false; + const excludedPlatforms = new Set<'iOS' | 'android'>(); + const namesToValidate = [moduleName, hasteModuleName]; + + namesToValidate.forEach(name => { + if (name.endsWith('Android')) { + excludedPlatforms.add('iOS'); + return; + } + + if (name.endsWith('IOS')) { + excludedPlatforms.add('android'); + return; + } + + if (name.endsWith('Cxx')) { + cxxOnly = true; + excludedPlatforms.add('iOS'); + excludedPlatforms.add('android'); + return; + } + }); + + return { + cxxOnly, + excludedPlatforms: Array.from(excludedPlatforms), + }; +} + +// TODO(T108222691): Use flow-types for @babel/parser +function visit( + astNode: $FlowFixMe, + visitor: { + [type: string]: (node: $FlowFixMe) => void, + }, +) { + const queue = [astNode]; + while (queue.length !== 0) { + let item = queue.shift(); + + if (!(typeof item === 'object' && item != null)) { + continue; + } + + if ( + typeof item.type === 'string' && + typeof visitor[item.type] === 'function' + ) { + // Don't visit any children + visitor[item.type](item); + } else if (Array.isArray(item)) { + queue.push(...item); + } else { + queue.push(...Object.values(item)); + } + } +} + +function getConfigType( + // TODO(T71778680): Flow-type this node. + ast: $FlowFixMe, + Visitor: ({isComponent: boolean, isModule: boolean}) => { + [type: string]: (node: $FlowFixMe) => void, + }, +): 'module' | 'component' | 'none' { + let infoMap = { + isComponent: false, + isModule: false, + }; + + visit(ast, Visitor(infoMap)); + + const {isModule, isComponent} = infoMap; + if (isModule && isComponent) { + throw new Error( + 'Found type extending "TurboModule" and exported "codegenNativeComponent" declaration in one file. Split them into separated files.', + ); + } + + if (isModule) { + return 'module'; + } else if (isComponent) { + return 'component'; + } else { + return 'none'; + } +} + +// TODO(T71778680): Flow-type ASTNodes. +function isModuleRegistryCall(node: $FlowFixMe): boolean { + if (node.type !== 'CallExpression') { + return false; + } + + const callExpression = node; + + if (callExpression.callee.type !== 'MemberExpression') { + return false; + } + + const memberExpression = callExpression.callee; + if ( + !( + memberExpression.object.type === 'Identifier' && + memberExpression.object.name === 'TurboModuleRegistry' + ) + ) { + return false; + } + + if ( + !( + memberExpression.property.type === 'Identifier' && + (memberExpression.property.name === 'get' || + memberExpression.property.name === 'getEnforcing') + ) + ) { + return false; + } + + if (memberExpression.computed) { + return false; + } + + return true; +} + +module.exports = { + getConfigType, + extractNativeModuleName, + createParserErrorCapturer, + verifyPlatforms, + visit, + isModuleRegistryCall, +}; From 99d69297589e88224eee59bb7801121bcc1b2dab Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Tue, 5 Dec 2023 00:02:41 +0800 Subject: [PATCH 188/190] Revert "[ios] Fix hermes inspector exception is uncaught and crash the app." This reverts commit 2822a4af74e7c4f52b58f0b2e9f6f0abcc5f131c. --- .../ReactCommon/hermes/inspector-modern/Inspector.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h b/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h index ea5d629cc7e3..aebeb828d27d 100644 --- a/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h +++ b/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h @@ -372,10 +372,6 @@ std::optional runUserCallback(C &cb, A &&...arg) { cb(std::forward(arg)...); } catch (const std::exception &e) { return UserCallbackException(e); - } catch (const std::runtime_error &e) { - // NOTE(kudo): Adding this to catch Hermes inspector exceptions after SDK 49. - // I still not figure out why the std::runtime_error is not catched by the std::exception above. - return UserCallbackException(e); } return {}; From 5aa6b7238043548b8d5cd5a4f0aa8ded3bfd6998 Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Mon, 22 Jan 2024 23:12:59 +0800 Subject: [PATCH 189/190] Enable hermes debugger on all build variants (#33) --- .../react-native/ReactAndroid/hermes-engine/build.gradle | 3 ++- .../main/jni/react/hermes/reactexecutor/CMakeLists.txt | 2 +- .../src/main/jni/react/runtime/hermes/jni/CMakeLists.txt | 2 +- .../src/main/jni/react/runtime/jni/CMakeLists.txt | 2 +- .../ReactCommon/hermes/executor/CMakeLists.txt | 1 + .../ReactCommon/hermes/inspector-modern/CMakeLists.txt | 8 ++++++++ .../react-native/ReactCommon/react/runtime/CMakeLists.txt | 2 +- .../react-native/sdks/hermes-engine/hermes-engine.podspec | 3 +++ .../sdks/hermes-engine/utils/build-apple-framework.sh | 3 ++- .../sdks/hermes-engine/utils/build-hermes-xcode.sh | 3 ++- 10 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/react-native/ReactAndroid/hermes-engine/build.gradle b/packages/react-native/ReactAndroid/hermes-engine/build.gradle index 4cb7ad9e9f97..1ce6cdee2798 100644 --- a/packages/react-native/ReactAndroid/hermes-engine/build.gradle +++ b/packages/react-native/ReactAndroid/hermes-engine/build.gradle @@ -228,7 +228,8 @@ android { cmake { arguments "-DCMAKE_BUILD_TYPE=MinSizeRel" // For release builds, we don't want to enable the Hermes Debugger. - arguments "-DHERMES_ENABLE_DEBUGGER=False" + // For Expo Go, we have to enable debugging even on release builds. + arguments "-DHERMES_ENABLE_DEBUGGER=True" } } } diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt b/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt index 0a7f253f63ce..60a5a0944939 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +++ b/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(hermes_executor target_compile_options( hermes_executor PRIVATE - $<$:-DHERMES_ENABLE_DEBUGGER=1> + -DHERMES_ENABLE_DEBUGGER=1 -std=c++20 -fexceptions ) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt b/packages/react-native/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt index 1848f355fb6f..50f027dd8a45 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +++ b/packages/react-native/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(hermesinstancejni target_compile_options( hermesinstancejni PRIVATE - $<$:-DHERMES_ENABLE_DEBUGGER=1> + -DHERMES_ENABLE_DEBUGGER=1 -std=c++20 -fexceptions ) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt b/packages/react-native/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt index ab59671367e9..40daedfd4883 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +++ b/packages/react-native/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(rninstance target_compile_options( rninstance PRIVATE - $<$:-DHERMES_ENABLE_DEBUGGER=1> + -DHERMES_ENABLE_DEBUGGER=1 -std=c++20 -fexceptions ) diff --git a/packages/react-native/ReactCommon/hermes/executor/CMakeLists.txt b/packages/react-native/ReactCommon/hermes/executor/CMakeLists.txt index 6c72e5d1b90a..6ed337abb5f5 100644 --- a/packages/react-native/ReactCommon/hermes/executor/CMakeLists.txt +++ b/packages/react-native/ReactCommon/hermes/executor/CMakeLists.txt @@ -33,5 +33,6 @@ else() hermes_executor_common PRIVATE -DNDEBUG + -DHERMES_ENABLE_DEBUGGER=1 ) endif() diff --git a/packages/react-native/ReactCommon/hermes/inspector-modern/CMakeLists.txt b/packages/react-native/ReactCommon/hermes/inspector-modern/CMakeLists.txt index bd051c84563f..3b1cf40fa458 100644 --- a/packages/react-native/ReactCommon/hermes/inspector-modern/CMakeLists.txt +++ b/packages/react-native/ReactCommon/hermes/inspector-modern/CMakeLists.txt @@ -26,6 +26,14 @@ if(${CMAKE_BUILD_TYPE} MATCHES Debug) PRIVATE -DHERMES_ENABLE_DEBUGGER=1 ) +else() + # Expo Go requires debugging on release builds + target_compile_options( + hermes_inspector_modern + PRIVATE + # Expo Go requires debugging on release builds + -DHERMES_ENABLE_DEBUGGER=1 + ) endif() target_include_directories(hermes_inspector_modern PUBLIC ${REACT_COMMON_DIR}) diff --git a/packages/react-native/ReactCommon/react/runtime/CMakeLists.txt b/packages/react-native/ReactCommon/react/runtime/CMakeLists.txt index ace51b62265c..272b27f038ad 100644 --- a/packages/react-native/ReactCommon/react/runtime/CMakeLists.txt +++ b/packages/react-native/ReactCommon/react/runtime/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(bridgeless target_compile_options( bridgeless PRIVATE - $<$:-DHERMES_ENABLE_DEBUGGER=1> + -DHERMES_ENABLE_DEBUGGER=1 -std=c++20 -fexceptions ) diff --git a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec index ab678e142c65..6fd85aad8282 100644 --- a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec +++ b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec @@ -12,6 +12,9 @@ react_native_path = File.join(__dir__, "..", "..") package = JSON.parse(File.read(File.join(react_native_path, "package.json"))) version = package['version'] +# Force building Hermes from source because Expo Go requires customized Hermes build +ENV['BUILD_FROM_SOURCE'] = 'true' + source_type = hermes_source_type(version, react_native_path) source = podspec_source(source_type, version, react_native_path) diff --git a/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh b/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh index e530a99c0c9b..e6b33d415b34 100755 --- a/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh +++ b/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh @@ -57,7 +57,8 @@ function configure_apple_framework { if [[ $BUILD_TYPE == "Debug" ]]; then enable_debugger="true" else - enable_debugger="false" + # Expo Go requires debugging on release build + enable_debugger="true" fi if [[ $BUILD_TYPE == "Debug" ]]; then # JS developers aren't VM developers. diff --git a/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh b/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh index 0e3066ee18a4..ffe10c4c7277 100755 --- a/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh +++ b/packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh @@ -10,7 +10,8 @@ release_version="$1"; shift hermesc_path="$1"; shift jsi_path="$1"; shift -enable_debugger="false" +# Expo Go requires debugging on release build +enable_debugger="true" if [[ "$CONFIGURATION" == "Debug" ]]; then enable_debugger="true" fi From cf55a593438ea5650b9c087bb77e79e8af5ccd3a Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Tue, 23 Jan 2024 18:20:13 +0800 Subject: [PATCH 190/190] Fix appearance changed into wrong activity (#34) the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()` --- .../react/modules/appearance/AppearanceModule.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java index 56e01d0a8f90..b951511ba178 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java @@ -84,12 +84,20 @@ private String colorSchemeForCurrentConfiguration(Context context) { @Override public void setColorScheme(String style) { + int nightMode = AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM; if (style.equals("dark")) { - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + nightMode = AppCompatDelegate.MODE_NIGHT_YES; } else if (style.equals("light")) { - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); + nightMode = AppCompatDelegate.MODE_NIGHT_NO; } else if (style.equals("unspecified")) { - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM); + nightMode = AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM; + } + + Activity activity = getCurrentActivity(); + if (activity instanceof AppCompatActivity) { + ((AppCompatActivity) activity).getDelegate().setLocalNightMode(nightMode); + } else { + AppCompatDelegate.setDefaultNightMode(nightMode); } }