diff --git a/.buckconfig b/.buckconfig deleted file mode 100644 index 3f1b5c6d11f0..000000000000 --- a/.buckconfig +++ /dev/null @@ -1,20 +0,0 @@ - -[android] - target = android-31 - -[kotlin] - compile_against_abis = True - kotlin_version = 1.6.10 - -[download] - max_number_of_retries = 3 - -[maven_repositories] - central = https://repo1.maven.org/maven2 - google = https://maven.google.com/ - -[alias] - rntester = //packages/rn-tester/android/app:app - -[buildfile] - includes = //tools/build_defs/oss/preload.bzl diff --git a/.buckjavaargs b/.buckjavaargs deleted file mode 100644 index 11452478196f..000000000000 --- a/.buckjavaargs +++ /dev/null @@ -1 +0,0 @@ --Xmx512m -XX:+HeapDumpOnOutOfMemoryError diff --git a/.circleci/README.md b/.circleci/README.md index 9c944ef6d105..0ae32f93c4d1 100644 --- a/.circleci/README.md +++ b/.circleci/README.md @@ -1,5 +1,172 @@ # Circle CI -This directory is home to the Circle CI configuration file. Circle is our continuous integration service provider. You can see the overall status of React Native's builds at https://circleci.com/gh/facebook/react-native +This directory is home to the Circle CI configuration files. Circle is our continuous integration service provider. You can see the overall status of React Native's builds at https://circleci.com/gh/facebook/react-native You may also see an individual PR's build status by scrolling down to the Checks section in the PR. + +## Purposes + +We use CircleCI for mainly 3 purposes: + +1. Testing changes +2. Release Nightlies +3. Release Stable Versions of React Native + +When testing changes, we run all the tests on commits that lands on `main`. For commits in PR, we try to understand which kind of changes the PR is about and we try to selectively run only the relevant tests. so, for example, if a PR only touches iOS files, we are going to run only iOS tests. + +A Nighly job runs every day at around 9:00 PM, GMT. They run from `main` and they publish a version of React Native using the current state of the codebase, creating a version number that follows the format: `0..0-nightly--`. +The nightly job also publish all the monorepo packages, taking care of updating the transitive dependencies of those packages. + +Stable versions are released manually by the Release Crew and they run from a stable branch. Stable branches have the shape of `0.-stable`. + +## How It Works? + +CircleCI execution is now split in two steps: +- Setup +- Testing + +The setup step takes care of analyzing the changes in the PR and of deciding which jobs needs to run. + +The testing flow is a set of workflows that executes the required tests. + +### Setup + +The code of the setup workflow lives in the root [`config.yml`](https://github.com/facebook/react-native/blob/main/.circleci/config.yml) file. +It uses the `Continuation orb` from CircleCI to start a CI flow that depends on the changes present in the PR. + +If the changes are not coming from a PR (either a simple commit or if the CI is running on main) **we always run all the tests** as a cautionary measure. + +The setup job has also to expose all the pipeline parameters that we would need to pass to the actual workflow. Those parameters are **automatically forwarded** to the workflows that are started as a result of the setup. + +The setup job uses a JS script to carry on its logic. The [`pipeline_selection.js`](https://github.com/facebook/react-native/blob/main/scripts/circleci/pipeline_selection.js) script can be invoked with two commands: +- `filter-jobs` +- `create-configs` + +The **`filter-jobs`** command takes care of creating a JSON representation of the tests we need to run based on the changes in the PR. + +The **`create-configs`** command consumes the JSON representation to create a CircleCI configuration that can then executes all the required tests. + +#### Creating a Configuration + +To create a configuration, the `pipeline-selection` scripts collates together various pieces of `YML` files that lives in the [`Configurations` folder](https://github.com/facebook/react-native/tree/main/.circleci/configurations). + +The order in which these files are appended is **important** and it always contains the following.: + +1. `top_level.yml`: this file contains some high level directives for CircleCI, like the version, the list of orbs, the cache-keys, and the pipeline parameters that can be used by the workflows. +2. `executors.yml`: this file contains the list of the executors used in our jobs and their configurations. +3. `commands.yml`: this file contains all the commands that can be used by jobs to executes. Commands are reusable functions that are shared by multiple jobs. +4. `jobs.yml`: this file contains the jobs that are used by workflows to carry on some specific tasks. They are composed of sequential commands. +5. `workflows.yml`: this file contains the shared workflows that needs to (or can) be always executed, no matter which kind of changes are pushed to CI. An example of these workflows is `analysis` (which is always executed) or `nightly` (which can be executed if a specific pipeline parameter is passed to the CI). + +Then, the `pipeline_selection create-configs` attach some specific test workflows, depending on the changes that are present in the PR. These change-dependent workflows live in the [`test_workflows`](https://github.com/facebook/react-native/tree/main/.circleci/configurations/test_workflows) folder. +These workflows are: +* `testAll.yml` => runs all the possible tests. This workflow is executed on main and on PRs which change set touches both iOS and Android +* `testAndroid.yml` => runs all the build steps and Android tests. This is used on changes that happens on the Android codebase and infra (`ReactAndroid` folder) +* `testIOS.yml` => runs all the build steps and iOS tests. This is used on changes that happens on the iOS codebase and infra (`React` folder) +* `testE2E.yml` => runs the E2E tests. As of today, E2E tests can be triggered if the commit message contains the `#run-e2e-tests` tag. +* `testJS.yml` => For all the changes that do not touch native/platform code, we only run JS tests. + +Notice that if there are changes on files that do not represents code (for example `.md` files like this one or the `Changelog`) we don't run any CI. + +## Test workflows + +The test workflows for native code are composed of 2 parts: +- building React Native +- testing + +Building React Native requires us to build several parts of it: +1. We need to build the Hermes JS engine +2. We need to build Android to create prebuilds +3. We need to package everything in an npm package that will mimic a React native release +4. We need to create a local maven repository + +### Building Hermes Engine + +#### Android +The `build_android` workflows takes care of building the Android version of Hermes and to put it properly in a local maven repository. +See the [Build Android](#build_android) section below. + +#### iOS +Hermes is a very complicated item to build for iOS. +It is composed of the Hermes compiler (HermesC) and of the actual engine. + +Hermes is shipped as a universal XCFramework. This means that we need to build all the architecture slices and then put them together in the XCFramework archive. +We also need to build 2 configurations: Debug and Release. + +In order to be efficient and to save costs, we parallelize the process as much as possible: + +1. We prepare the environment for building Hermes. +2. We build HermesC which is required by all the slices. +3. We start 8 jobs to build all the required slices in parallel: + 1. `iphone` slice, Debug mode + 1. `iphonesimulator` slice, Debug mode + 1. `macos` slice, Debug mode + 1. `catalyst` slice, Debug mode + 1. `iphone` slice, Release mode + 1. `iphonesimulator` slice, Release mode + 1. `macos` slice, Release mode + 1. `catalyst` slice, Release mode +4. We then have 2 jobs to create the Debug and Release tarballs in parallel. + 1. The Debug job receives the 4 Debug slices + 1. The Release job receives the 4 Release slices + +The `Debug` and `Release` tarball are then uploaded as artifacts. Notice that these we use these artifacts to **test the release** of React Native. + +While building Hermes, we take also care of building the dSYMs. A dSYM (Debug Symbols) is an archive that contains the Debug Symbols that users can load to de-symbolicate the Hermes Stack traces. These symbols are published when we create a React Native release. + +A lot of these build steps are automated by some shell scripts that lives in the [`react-native/packages/react-native/sdks/hermes-engine/utils` folder](https://github.com/facebook/react-native/tree/main/packages/react-native/sdks/hermes-engine/utils). + +### Build Android + +The android build is all managed by Gradle, so building android should be as easy as calling a [`gradle` command](https://github.com/facebook/react-native/blob/main/.circleci/configurations/jobs.yml#L268-L274). + +The relevant part here is that the build android generates a `maven-local` repository that is passed to the [`build_npm_package`](https://github.com/facebook/react-native/blob/main/.circleci/configurations/jobs.yml#L1182) and that we use to test the releases. + +### Build NPM package + +This job is the responsible to create an NPM package that is suitable to be released or tested in CI. +If we are in a release flow (for example the Nightly workflow), it also proceed with the publication. + +The job can be invoked with different parameters: +- `dry-run` => it does not publish anything, but prepare the artifacts to be used for testing +- `nightly` => it creates the artifacts and publish a nightly version of React Native. +- `release` => it creates the artifacts and publish a stable version of React Native. + +The build NPM package takes all the artifacts produced in the previous steps (iOS' Hermes, iOS' Hermes dSYMs, Android's `maven-local`) and creates an npm package packing all the code. + +If in a release mode, it also proceed publishing the NPM package to NPM, and the artifacts to Maven central, which we use to distribute all the artifacts. + +This job also uploads the `maven-local` repository and a zipped version of the npm package to CircleCI's artifacts. We use these artifacts to **test the release** of React Native. + +## Testing React Native +React Native tests runs in two different scenarios: +- RNTester +- A New App + +### RNTester +RNTester is our internal testing app. It is a fully working React Native app that lives in the [`react-native/packages/rn-tester` folder](https://github.com/facebook/react-native/tree/main/packages/rn-tester) of the repository. +RNTester is an app which contains code that exercise most part of the React Native frameworks. +It also has the feature of building React Native **from source**. For that reason, it does not have to wait for the NPM package to be ready, but RNTester's tests can start as soon as the `build_android` step and the step that builds Hermes for iOS are done. + +Notice the Tests on RNTester for iOS consumes the Hermes engine that is built in the previous steps. + +For Android, these tests creates an APK that is uploaded as an artifact in CircleCI. We use these artifacts to **test the releases** of React Native.. + +### A New App +The React Native repo contains a template app in the [`react-native/packages/react-native/template` folder]() that is used to spin up a new application that is preconfigured with React Native. + +We have several tests that we run starting from the template, testing various configurations: +- Debug/Release +- JSC/Hermes (two different JS engine we support) +- New/Old Architecture (two different Architectures for React Native) + +We want to test all the React Native changes against the template, but we can't publish a React native version on each change that is merged. Therefore, to run tests on the template we use a NPM registry proxy called [Verdaccio](https://verdaccio.org/). + +When running a Template test our CI follows roughly these steps: +1. Prepare the executor +2. Start a Verdaccio server +3. Publish on Verdaccio all the monorepo [packages](https://github.com/facebook/react-native/tree/main/packages) on which React Native depends on. +4. Publish on Verdaccio the react-native NPM package that has been created in the NPM step +5. Spin up a new React native apps from the template, downloading react-native from Verdaccio. + +In this way, we are sure that we can test all the changes that happen in React Native on a new React Native app. diff --git a/.circleci/config.yml b/.circleci/config.yml index 91d3e642d440..a642711e33d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,15 +12,23 @@ parameters: default: false type: boolean - release_latest: + run_nightly_workflow: default: false type: boolean release_version: - default: "9999" + default: "" type: string - run_nightly_workflow: + release_monorepo_packages_version: + default: "" + type: string + + release_tag: + default: "" + type: string + + release_dry_run: default: false type: boolean @@ -35,7 +43,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 @@ -51,7 +68,7 @@ jobs: value: << pipeline.git.branch >> steps: - run: - name: "[Main or Stable] Create input fo config to test everything" + name: "[Main or Stable] Create input for config to test everything" command: | mkdir -p /tmp/circleci/ echo '{ "run_all": true }' > /tmp/circleci/pipeline_config.json @@ -69,9 +86,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 @@ -91,4 +108,7 @@ jobs: workflows: always-run: jobs: - - choose_ci_jobs + - choose_ci_jobs: + filters: + tags: + only: /.*/ diff --git a/.circleci/configurations/commands.yml b/.circleci/configurations/commands.yml index 0461946330ab..bba0dc1a635b 100644 --- a/.circleci/configurations/commands.yml +++ b/.circleci/configurations/commands.yml @@ -31,7 +31,7 @@ commands: - restore_cache: key: *rbenv_cache_key - run: - name: Bundle Install + name: Install the proper Ruby and run Bundle install command: | # Check if rbenv is installed. CircleCI is migrating to rbenv so we may not need to always install it. @@ -46,10 +46,6 @@ commands: echo "rbenv found; Skipping installation" fi - brew reinstall libyaml - gem install psych -- --with-libyaml-dir=$(brew --prefix libyaml) - export RUBY_CONFIGURE_OPTS=--with-libyaml-dir=$(brew --prefix libyaml) - # Install the right version of ruby if [[ -z "$(rbenv versions | grep << parameters.ruby_version >>)" ]]; then # ensure that `ruby-build` can see all the available versions of Ruby @@ -61,7 +57,13 @@ commands: # Set ruby dependencies rbenv global << parameters.ruby_version >> - gem install bundler + if [[ << parameters.ruby_version >> == "2.6.10" ]]; then + rbenv rehash + gem install bundler -v 2.4.22 + else + rbenv rehash + gem install bundler + fi bundle check || bundle install --path vendor/bundle --clean - save_cache: key: *rbenv_cache_key @@ -167,7 +169,7 @@ commands: steps: - run: name: "Run Tests: << parameters.platform >> End-to-End Tests" - command: node ./scripts/run-ci-e2e-tests.js --<< parameters.platform >> --retries << parameters.retries >> + command: node ./scripts/e2e/run-ci-e2e-tests.js --<< parameters.platform >> --retries << parameters.retries >> report_bundle_size: parameters: diff --git a/.circleci/configurations/executors.yml b/.circleci/configurations/executors.yml index d860bcef264e..5ffb38877edd 100644 --- a/.circleci/configurations/executors.yml +++ b/.circleci/configurations/executors.yml @@ -33,6 +33,13 @@ executors: <<: *defaults macos: xcode: *xcode_version - resource_class: macos.x86.medium.gen2 + resource_class: macos.m1.medium.gen1 environment: - - BUILD_FROM_SOURCE: true + - RCT_BUILD_HERMES_FROM_SOURCE: true + reactnativeios-lts: + <<: *defaults + macos: + xcode: '15.1' + resource_class: macos.m1.medium.gen1 + environment: + - RCT_BUILD_HERMES_FROM_SOURCE: true diff --git a/.circleci/configurations/jobs.yml b/.circleci/configurations/jobs.yml index d0d17a83f6aa..aec9b109d8a1 100644 --- a/.circleci/configurations/jobs.yml +++ b/.circleci/configurations/jobs.yml @@ -116,7 +116,7 @@ jobs: executor: reactnativeios parameters: ruby_version: - default: "2.7.7" + default: "2.7.8" description: The version of ruby that must be used type: string steps: @@ -250,16 +250,16 @@ jobs: executor: reactnativeandroid-xlarge parameters: release_type: - description: The type of release to build. Must be one of "nightly", "release", "dry-run". + description: The type of release to build. Must be one of "nightly", "release", "dry-run", "prealpha". type: enum - enum: ["nightly", "release", "dry-run"] + enum: ["nightly", "release", "dry-run", "prealpha"] default: "dry-run" steps: - checkout - run_yarn - run: name: Set React Native Version - command: node ./scripts/set-rn-version.js --build-type << parameters.release_type >> + command: node ./scripts/releases/set-rn-version.js --build-type << parameters.release_type >> - with_gradle_cache: steps: @@ -286,7 +286,6 @@ jobs: - packages/react-native/ReactAndroid/build/ - packages/react-native/ReactAndroid/hermes-engine/.cxx/ - packages/react-native/ReactAndroid/hermes-engine/build/ - - packages/react-native/ReactAndroid/flipper-integration/build/ - packages/react-native/ReactAndroid/src/main/jni/prebuilt/ - packages/react-native-gradle-plugin/.gradle/ - packages/react-native-gradle-plugin/build/ @@ -304,7 +303,7 @@ jobs: name: Set React Native Version to "dry-run" # test_android executes only for dry-run builds. We need to bump the version for caching # reasons otherwise we won't reuse the artifacts from the build_android job. - command: node ./scripts/set-rn-version.js --build-type "dry-run" + command: node ./scripts/releases/set-rn-version.js --build-type "dry-run" - attach_workspace: at: . @@ -350,6 +349,7 @@ jobs: enum: ["Hermes", "JSC"] environment: - PROJECT_NAME: "AndroidTemplateProject" + - YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - checkout_code_with_cache - run_yarn @@ -359,8 +359,8 @@ jobs: name: Create Android template project command: | REPO_ROOT=$(pwd) - node ./scripts/update-template-package.js "{\"react-native\":\"file:$REPO_ROOT/build/$(cat build/react-native-package-version)\"}" - node ./scripts/template/initialize.js --reactNativeRootPath $REPO_ROOT --templateName $PROJECT_NAME --templateConfigPath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" + node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$REPO_ROOT/build/$(cat build/react-native-package-version)\"}" + node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose - with_gradle_cache: steps: - run: @@ -387,7 +387,6 @@ jobs: # JOBS: Test iOS Template # ------------------------- test_ios_template: - executor: reactnativeios parameters: flavor: default: "Debug" @@ -404,11 +403,6 @@ jobs: description: Which JavaScript engine to use. Must be one of "Hermes", "JSC". type: enum enum: ["Hermes", "JSC"] - flipper: - default: "WithFlipper" - description: Whether Flipper is enabled. Must be one of "WithFlipper", "WithoutFlipper". - type: enum - enum: ["WithFlipper", "WithoutFlipper"] use_frameworks: default: "StaticLibraries" description: Which kind of option we want to use for `use_frameworks!` @@ -430,9 +424,15 @@ jobs: cocoapods_cache_key: type: string default: *template_cocoapods_cache_key + executor: + description: The executor to use + default: reactnativeios + type: string + executor: << parameters.executor >> environment: - PROJECT_NAME: "iOSTemplateProject" - HERMES_WS_DIR: *hermes_workspace_root + - YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - checkout_code_with_cache - run_yarn @@ -457,8 +457,8 @@ jobs: REPO_ROOT=$(pwd) PACKAGE=$(cat build/react-native-package-version) PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE" - node ./scripts/update-template-package.js "{\"react-native\":\"file:$PATH_TO_PACKAGE\"}" - node ./scripts/template/initialize.js --reactNativeRootPath $REPO_ROOT --templateName $PROJECT_NAME --templateConfigPath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" + node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$PATH_TO_PACKAGE\"}" + node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose - with_xcodebuild_cache: podfile_lock_path: << parameters.podfile_lock_path >> pods_build_folder: << parameters.pods_build_folder >> @@ -466,7 +466,7 @@ jobs: podfile_lock_cache_key: << parameters.podfile_lock_cache_key >> steps: - run: - name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>; Flipper << parameters.flipper >> + name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>> command: | cd /tmp/$PROJECT_NAME/ios @@ -478,10 +478,6 @@ jobs: export USE_HERMES=0 fi - if [[ << parameters.flipper >> == "WithoutFlipper" ]]; then - export NO_FLIPPER=1 - fi - if [[ << parameters.use_frameworks >> == "DynamicFrameworks" ]]; then export USE_FRAMEWORKS=dynamic fi @@ -502,23 +498,23 @@ jobs: # JOBS: Test iOS RNTester # ------------------------- test_ios_rntester: - executor: reactnativeios + parameters: jsengine: default: "Hermes" description: Which JavaScript engine to use. Must be one of "Hermes", "JSC". type: enum enum: ["Hermes", "JSC"] - architecture: - default: "OldArch" - description: Which React Native architecture to use. Must be one of "OldArch", "NewArch". - type: enum - enum: ["NewArch", "OldArch"] use_frameworks: default: "StaticLibraries" description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" type: enum enum: ["StaticLibraries", "DynamicFrameworks"] + architecture: + default: "NewArch" + description: "The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup" + type: enum + enum: ["OldArch", "NewArch"] ruby_version: default: "2.6.10" description: The version of ruby that must be used @@ -527,6 +523,11 @@ jobs: description: whether unit tests should run or not. default: false type: boolean + executor: + description: The executor to use + default: reactnativeios + type: string + executor: << parameters.executor >> steps: - checkout_code_with_cache - run_yarn @@ -551,21 +552,21 @@ jobs: - with_xcodebuild_cache: steps: - run: - name: Install CocoaPods dependencies - Architecture << parameters.architecture >> + name: Install CocoaPods dependencies command: | - if [[ << parameters.architecture >> == "NewArch" ]]; then - export RCT_NEW_ARCH_ENABLED=1 - fi if [[ << parameters.jsengine >> == "JSC" ]]; then export USE_HERMES=0 fi if [[ << parameters.use_frameworks >> == "DynamicFrameworks" ]]; then - export NO_FLIPPER=1 export USE_FRAMEWORKS=dynamic fi + if [[ << parameters.architecture >> == "NewArch" ]]; then + export RCT_NEW_ARCH_ENABLED=1 + fi + cd packages/rn-tester bundle install @@ -589,81 +590,6 @@ jobs: steps: - run_ios_tests - # ------------------------- - # JOBS: Windows - # ------------------------- - test_windows: - executor: - name: win/default - environment: - - CHOCO_CACHE_DIR: "C:\\ChocoCache" - steps: - - checkout_code_with_cache - - - restore_cache: - keys: - - *windows_choco_cache_key - - - run: - name: Choco cache - # Cache our dependencies which can be flakey to download - command: | - if (!Test-Path $env:CHOCO_CACHE_DIR) { - mkdir $env:CHOCO_CACHE_DIR - } - choco config set --name cacheLocation --value $env:CHOCO_CACHE_DIR - - - run: - name: Disable NVM - # Use choco to manage node versions due to https://github.com/npm/cli/issues/4234 - command: nvm off - - - run: - name: Install Node JS - # Note: Version set separately for non-Windows builds, see above. - command: choco install nodejs-lts - - # Setup Dependencies - - run: - name: Enable Yarn with corepack - command: corepack enable - - # it looks like that, last week, envinfo released version 7.9.0 which does not works - # with Windows. I have opened an issue here: https://github.com/tabrindle/envinfo/issues/238 - # TODO: T156811874 - Revert this to npx envinfo@latest when the issue is addressed - - run: - name: Display Environment info - command: | - npm install -g envinfo - envinfo -v - envinfo - - - restore_cache: - keys: - - *windows_yarn_cache_key - - run: - name: "Yarn: Install Dependencies" - command: yarn install --frozen-lockfile --non-interactive - - - save_cache: - key: *windows_yarn_cache_key - paths: - - C:\Users\circleci\AppData\Local\Yarn - - - save_cache: - key: *windows_choco_cache_key - paths: - - $env:CHOCO_CACHE_DIR - - # ------------------------- - # Run Tests - - run: - name: "Flow Check" - command: yarn flow-check - - run: - name: "Run Tests: JavaScript Tests" - command: yarn test - # ------------------------- # JOBS: Build Hermes # ------------------------- @@ -673,7 +599,7 @@ jobs: environment: - HERMES_WS_DIR: *hermes_workspace_root - HERMES_VERSION_FILE: "packages/react-native/sdks/.hermesversion" - - BUILD_FROM_SOURCE: true + - RCT_BUILD_HERMES_FROM_SOURCE: true steps: - run: name: Install dependencies @@ -681,7 +607,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 @@ -845,7 +780,7 @@ jobs: default: "iphoneos" description: The Hermes Slice that this job has to build type: enum - enum: ["macosx", "iphoneos", "iphonesimulator", "catalyst"] + enum: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"] executor: reactnativeios environment: - HERMES_WS_DIR: *hermes_workspace_root @@ -878,16 +813,37 @@ jobs: exit 0 fi + export RELEASE_VERSION=$(cat /tmp/react-native-version) if [[ "$SLICE" == "macosx" ]]; then echo "[HERMES] Building Hermes for MacOS" - BUILD_TYPE="<< parameters.flavor >>" ./utils/build-mac-framework.sh - else + BUILD_TYPE="<< parameters.flavor >>" MACOSX_DEPLOYMENT_TARGET=10.15 ./utils/build-mac-framework.sh + elif [[ "$SLICE" == "xros" ]] || [[ "$SLICE" == "xrsimulator" ]]; then + echo "[HERMES] Building Hermes for XR: $SLICE" + BUILD_TYPE="<< parameters.flavor >>" XROS_DEPLOYMENT_TARGET=1.0 ./utils/build-ios-framework.sh "$SLICE" + elif [[ "$SLICE" == "iphoneos" ]] || [[ "$SLICE" == "iphonesimulator" ]] || [[ "$SLICE" == "catalyst" ]] ; then echo "[HERMES] Building Hermes for iOS: $SLICE" - BUILD_TYPE="<< parameters.flavor >>" ./utils/build-ios-framework.sh "$SLICE" + BUILD_TYPE="<< parameters.flavor >>" IOS_DEPLOYMENT_TARGET=13.4 ./utils/build-ios-framework.sh "$SLICE" fi + unset RELEASE_VERSION echo "Moving from build_$SLICE to $FINAL_PATH" mv build_"$SLICE" "$FINAL_PATH" + + # check whether everything is there + if [[ -d "$FINAL_PATH/API/hermes/hermes.framework" ]]; then + echo "Successfully built hermes.framework for $SLICE in $FLAVOR" + else + echo "Failed to built hermes.framework for $SLICE in $FLAVOR" + exit 1 + fi + + if [[ -d "$FINAL_PATH/API/hermes/hermes.framework.dSYM" ]]; then + echo "Successfully built hermes.framework.dSYM for $SLICE in $FLAVOR" + else + echo "Failed to built hermes.framework.dSYM for $SLICE in $FLAVOR" + echo "Please try again" + exit 1 + fi - save_cache: key: << parameters.slice_base_cache_key >>-<< parameters.slice >>-<< parameters.flavor >> paths: @@ -928,6 +884,10 @@ jobs: key: << parameters.slice_base_cache_key >>-iphonesimulator-<< parameters.flavor >> - restore_cache: key: << parameters.slice_base_cache_key >>-catalyst-<< parameters.flavor >> + - restore_cache: + key: << parameters.slice_base_cache_key >>-xros-<< parameters.flavor >> + - restore_cache: + key: << parameters.slice_base_cache_key >>-xrsimulator-<< parameters.flavor >> - run: name: "Move back build folders" command: | @@ -936,6 +896,8 @@ jobs: mv build_iphoneos_<< parameters.flavor >> build_iphoneos mv build_iphonesimulator_<< parameters.flavor >> build_iphonesimulator mv build_catalyst_<< parameters.flavor >> build_catalyst + mv build_xros_<< parameters.flavor >> build_xros + mv build_xrsimulator_<< parameters.flavor >> build_xrsimulator - run: name: "Prepare destroot folder" command: | @@ -947,7 +909,11 @@ jobs: command: | cd ./packages/react-native/sdks/hermes || exit 1 echo "[HERMES] Creating the universal framework" + export IOS_DEPLOYMENT_TARGET=13.4 + export RELEASE_VERSION=$(cat /tmp/react-native-version) ./utils/build-ios-framework.sh build_framework + unset RELEASE_VERSION + unset IOS_DEPLOYMENT_TARGET - run: name: Package the Hermes Apple frameworks command: | @@ -982,6 +948,8 @@ jobs: mkdir -p "$WORKING_DIR/catalyst" mkdir -p "$WORKING_DIR/iphoneos" mkdir -p "$WORKING_DIR/iphonesimulator" + mkdir -p "$WORKING_DIR/xros" + mkdir -p "$WORKING_DIR/xrsimulator" cd ./packages/react-native/sdks/hermes || exit 1 @@ -990,6 +958,8 @@ jobs: cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/" cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/" cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/" + cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/" + cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/" DEST_DIR="/tmp/hermes/dSYM/$FLAVOR" tar -C "$WORKING_DIR" -czvf "hermes.framework.dSYM" . @@ -1074,7 +1044,7 @@ jobs: name: Build HermesC for Windows command: | if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) { - choco install --no-progress cmake --version 3.14.7 + choco install --no-progress cmake --version 3.14.7 -y if (-not $?) { throw "Failed to install CMake" } cd $Env:HERMES_WS_DIR\icu @@ -1125,14 +1095,20 @@ jobs: # ------------------------- # JOBS: Releases # ------------------------- - prepare_package_for_release: + + # Writes a new commit and tag(s), which will trigger the `publish_release` + # and `publish_bumped_packages` workflows. + prepare_release: parameters: version: type: string - latest: - type: boolean - default: false - dryrun: + # TODO(T182538198): Required for 0.74.x, where workspace packages are out + # of sync with react-native. This will be removed for 0.75+. + monorepo_packages_version: + type: string + tag: + type: string + dry_run: type: boolean default: false executor: reactnativeios @@ -1145,23 +1121,48 @@ jobs: - brew_install: package: cmake - run: - name: "Set new react-native version and commit changes" + name: Versioning workspace packages command: | - VERSION=<< parameters.version >> - - if [[ -z "$VERSION" ]]; then - VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -1) - echo "Using the version from the package.json: $VERSION" - fi - - node ./scripts/prepare-package-for-release.js -v "$VERSION" -l << parameters.latest >> --dry-run << parameters.dryrun >> + node scripts/releases/set-version "<< parameters.monorepo_packages_version >>" --skip-react-native-version + - run: + name: Versioning react-native package + command: | + node scripts/releases/set-rn-version.js -v "<< parameters.version >>" --build-type "release" + - run: + name: Creating release commit + command: | + # I'm seeing failures in automatically detect the email for the + # agent that should push the commit. + git config --global user.name "Distiller" + git config --global user.email "distiller@circleci.com" + + git commit -a -m "Release << parameters.version >>" -m "#publish-packages-to-npm&<< parameters.tag >>" + git tag -a "v<< parameters.version >>" -m "v<< parameters.version >>" + env GIT_PAGER=cat git show HEAD + - when: + condition: + equal: ["latest", << parameters.tag >>] + steps: + - run: + name: Updating "latest" tag + command: | + git tag -d "latest" + git push origin :latest + git tag -a "latest" -m "latest" + - unless: + condition: << parameters.dry_run >> + steps: + run: + name: Pushing release commit + command: | + git push origin $CIRCLE_BRANCH --follow-tags build_npm_package: parameters: release_type: - description: The type of release to build. Must be one of "nightly", "release", "dry-run". + description: The type of release to build. Must be one of "nightly", "release", "dry-run", or "prealpha". type: enum - enum: ["nightly", "release", "dry-run"] + enum: ["nightly", "release", "dry-run", "prealpha"] default: "dry-run" executor: reactnativeandroid-xlarge environment: @@ -1201,7 +1202,7 @@ jobs: - attach_workspace: at: . - # START: Stables and nightlies + # START: Stables, nightlies and prealphas # This conditional step sets up the necessary credentials for publishing react-native to npm. - when: condition: @@ -1210,7 +1211,7 @@ jobs: - equal: [ "nightly", << parameters.release_type >> ] steps: - run: echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc - # END: Stables and nightlies + # END: Stables, prealpha and nightlies - with_gradle_cache: steps: @@ -1224,7 +1225,7 @@ jobs: else export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64" fi - node ./scripts/publish-npm.js -t << parameters.release_type >> + node ./scripts/releases-ci/publish-npm.js -t << parameters.release_type >> - run: name: Zip Maven Artifacts from /tmp/maven-local @@ -1288,19 +1289,6 @@ jobs: command: | node scripts/circleci/poll-maven.js - - # ------------------------- - # JOBS: Nightly - # ------------------------- - nightly_job: - machine: - image: ubuntu-2004:202010-01 - steps: - - run: - name: Nightly - command: | - echo "Nightly build run" - find_and_publish_bumped_packages: executor: nodelts steps: @@ -1312,4 +1300,4 @@ jobs: command: echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc - run: name: Find and publish all bumped packages - command: node ./scripts/monorepo/find-and-publish-all-bumped-packages.js + command: node ./scripts/releases-ci/publish-updated-packages.js diff --git a/.circleci/configurations/test_workflows/testAll.yml b/.circleci/configurations/test_workflows/testAll.yml index 145dcbd71ff2..497ac42be381 100644 --- a/.circleci/configurations/test_workflows/testAll.yml +++ b/.circleci/configurations/test_workflows/testAll.yml @@ -4,11 +4,12 @@ - equal: [ false, << pipeline.parameters.run_release_workflow >> ] - equal: [ false, << pipeline.parameters.run_nightly_workflow >> ] jobs: - - prepare_package_for_release: - name: prepare_package_for_release - version: '' - latest : false - dryrun: true + - prepare_release: + name: "prepare_release (dry run test)" + version: "0.0.0" + monorepo_packages_version: "0.0.0" + tag: test + dry_run: true - prepare_hermes_workspace - build_android: release_type: "dry-run" @@ -24,7 +25,7 @@ matrix: parameters: flavor: ["Debug", "Release"] - slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"] + slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"] - build_hermes_macos: requires: - build_apple_slices_hermes @@ -56,122 +57,50 @@ - test_ios_template: requires: - build_npm_package - name: "Test Template with Ruby 3.2.0" - ruby_version: "3.2.0" + name: "Test Template with Ruby 3.2.2" + ruby_version: "3.2.2" architecture: "NewArch" flavor: "Debug" + executor: reactnativeios-lts - test_ios_template: + architecture: "OldArch" requires: - build_npm_package matrix: parameters: - architecture: ["NewArch", "OldArch"] flavor: ["Debug", "Release"] jsengine: ["Hermes", "JSC"] - flipper: ["WithFlipper", "WithoutFlipper"] use_frameworks: ["StaticLibraries", "DynamicFrameworks"] exclude: - - architecture: "NewArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "NewArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "NewArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "OldArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "OldArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Debug" + # This config is tested with Ruby 3.2.2. Let's not double test it. + - flavor: "Debug" jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Debug" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Debug" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "NewArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "OldArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" use_frameworks: "StaticLibraries" - test_ios_rntester: requires: - build_hermes_macos - name: "Test RNTester with Ruby 3.2.0" - ruby_version: "3.2.0" - architecture: "NewArch" + name: "Test RNTester with Ruby 3.2.2" + ruby_version: "3.2.2" + executor: reactnativeios-lts - test_ios_rntester: requires: - build_hermes_macos matrix: parameters: - architecture: ["NewArch", "OldArch"] jsengine: ["Hermes", "JSC"] use_frameworks: ["StaticLibraries", "DynamicFrameworks"] exclude: # Tested by test_ios-Hermes - - architecture: "OldArch" - jsengine: "Hermes" + - jsengine: "Hermes" use_frameworks: "StaticLibraries" # Tested by test_ios-JSC - - architecture: "OldArch" - jsengine: "JSC" + - jsengine: "JSC" + use_frameworks: "StaticLibraries" + # Tested with Ruby 3.2.2, do not test this twice. + - jsengine: "Hermes" use_frameworks: "StaticLibraries" - test_ios_rntester: - run_unit_tests: true - architecture: "OldArch" + run_unit_tests: false use_frameworks: "StaticLibraries" ruby_version: "2.6.10" requires: @@ -179,4 +108,4 @@ matrix: parameters: jsengine: ["Hermes", "JSC"] - - test_windows + architecture: ["NewArch", "OldArch"] diff --git a/.circleci/configurations/test_workflows/testAndroid.yml b/.circleci/configurations/test_workflows/testAndroid.yml index b21ed9775fcb..9a29ead21ad8 100644 --- a/.circleci/configurations/test_workflows/testAndroid.yml +++ b/.circleci/configurations/test_workflows/testAndroid.yml @@ -4,11 +4,12 @@ - equal: [ false, << pipeline.parameters.run_release_workflow >> ] - equal: [ false, << pipeline.parameters.run_nightly_workflow >> ] jobs: - - prepare_package_for_release: - name: prepare_package_for_release - version: '' - latest : false - dryrun: true + - prepare_release: + name: "prepare_release (dry run test)" + version: "0.0.0" + monorepo_packages_version: "0.0.0" + tag: test + dry_run: true - prepare_hermes_workspace - build_android: release_type: "dry-run" @@ -24,7 +25,7 @@ matrix: parameters: flavor: ["Debug", "Release"] - slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"] + slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"] - build_hermes_macos: requires: - build_apple_slices_hermes @@ -45,7 +46,7 @@ - test_android: requires: - build_android - - test_e2e_android + # - test_e2e_android - test_android_template: requires: - build_npm_package @@ -54,4 +55,3 @@ architecture: ["NewArch", "OldArch"] jsengine: ["Hermes", "JSC"] flavor: ["Debug", "Release"] - - test_windows diff --git a/.circleci/configurations/test_workflows/testE2E.yml b/.circleci/configurations/test_workflows/testE2E.yml index b161180ee5a5..a926a395775c 100644 --- a/.circleci/configurations/test_workflows/testE2E.yml +++ b/.circleci/configurations/test_workflows/testE2E.yml @@ -5,6 +5,5 @@ - equal: [ false, << pipeline.parameters.run_nightly_workflow >> ] jobs: - test_e2e_ios: - ruby_version: "2.7.7" - # This is not stable - # - test_e2e_android + ruby_version: "2.7.8" + - test_e2e_android diff --git a/.circleci/configurations/test_workflows/testIOS.yml b/.circleci/configurations/test_workflows/testIOS.yml index 484ef5a8f2ea..273f0dde4467 100644 --- a/.circleci/configurations/test_workflows/testIOS.yml +++ b/.circleci/configurations/test_workflows/testIOS.yml @@ -4,11 +4,12 @@ - equal: [ false, << pipeline.parameters.run_release_workflow >> ] - equal: [ false, << pipeline.parameters.run_nightly_workflow >> ] jobs: - - prepare_package_for_release: - name: prepare_package_for_release - version: '' - latest : false - dryrun: true + - prepare_release: + name: "prepare_release (dry run test)" + version: "0.0.0" + monorepo_packages_version: "0.0.0" + tag: test + dry_run: true - prepare_hermes_workspace - build_android: release_type: "dry-run" @@ -24,7 +25,7 @@ matrix: parameters: flavor: ["Debug", "Release"] - slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"] + slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"] - build_hermes_macos: requires: - build_apple_slices_hermes @@ -42,127 +43,47 @@ - build_hermesc_linux - build_hermes_macos - build_hermesc_windows - - test_e2e_ios: - ruby_version: "2.7.7" + # - test_e2e_ios: + # ruby_version: "2.7.7" - test_ios_template: requires: - build_npm_package - name: "Test Template with Ruby 3.2.0" - ruby_version: "3.2.0" + name: "Test Template with Ruby 3.2.2" + ruby_version: "3.2.2" architecture: "NewArch" flavor: "Debug" + executor: reactnativeios-lts - test_ios_template: + architecture: "OldArch" requires: - build_npm_package matrix: parameters: - architecture: ["NewArch", "OldArch"] flavor: ["Debug", "Release"] jsengine: ["Hermes", "JSC"] - flipper: ["WithFlipper", "WithoutFlipper"] use_frameworks: ["StaticLibraries", "DynamicFrameworks"] exclude: - - architecture: "NewArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "NewArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "NewArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "OldArch" - flavor: "Release" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "OldArch" - flavor: "Release" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Debug" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Debug" - jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "OldArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "DynamicFrameworks" - - architecture: "NewArch" - flavor: "Debug" + # Tested with Ruby 3.2.2, let's not double test this + - flavor: "Debug" jsengine: "Hermes" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "NewArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" - use_frameworks: "StaticLibraries" - - architecture: "OldArch" - flavor: "Debug" - jsengine: "JSC" - flipper: "WithFlipper" use_frameworks: "StaticLibraries" - test_ios_rntester: requires: - build_hermes_macos - name: "Test RNTester with Ruby 3.2.0" - ruby_version: "3.2.0" - architecture: "NewArch" + name: "RNTester on Ruby 3.2.2" + ruby_version: "3.2.2" + executor: reactnativeios-lts - test_ios_rntester: + name: "RNTester with Dynamic Frameworks" + use_frameworks: "DynamicFrameworks" requires: - build_hermes_macos matrix: parameters: - architecture: ["NewArch", "OldArch"] jsengine: ["Hermes", "JSC"] - use_frameworks: ["StaticLibraries", "DynamicFrameworks"] - exclude: - # Tested by test_ios-Hermes - - architecture: "OldArch" - jsengine: "Hermes" - use_frameworks: "StaticLibraries" - # Tested by test_ios-JSC - - architecture: "OldArch" - jsengine: "JSC" - use_frameworks: "StaticLibraries" - test_ios_rntester: - run_unit_tests: true - architecture: "OldArch" + name: "RNTester Integration Tests" + run_unit_tests: false use_frameworks: "StaticLibraries" ruby_version: "2.6.10" requires: @@ -170,3 +91,4 @@ matrix: parameters: jsengine: ["Hermes", "JSC"] + architecture: ["NewArch", "OldArch"] diff --git a/.circleci/configurations/top_level.yml b/.circleci/configurations/top_level.yml index f8c98c6e9ef0..d9466370f264 100644 --- a/.circleci/configurations/top_level.yml +++ b/.circleci/configurations/top_level.yml @@ -25,11 +25,11 @@ references: android-defaults: &android-defaults working_directory: ~/react-native docker: - - image: reactnativecommunity/react-native-android:v11.0 + - image: reactnativecommunity/react-native-android:v13.0 environment: - TERM: "dumb" - GRADLE_OPTS: '-Dorg.gradle.daemon=false' - # By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs. + # By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs. - ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a" # Repeated here, as the environment key in this executor will overwrite the one in defaults - PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: *github_analysisbot_token_a @@ -59,7 +59,7 @@ references: # Dependency Anchors # ------------------------- dependency_versions: - xcode_version: &xcode_version "14.3.0" + xcode_version: &xcode_version "15.2" nodelts_image: &nodelts_image "cimg/node:20.2.0" nodeprevlts_image: &nodeprevlts_image "cimg/node:18.12.1" nodelts_browser_image: &nodelts_browser_image "cimg/node:20.2.0-browsers" @@ -71,37 +71,32 @@ references: cache_keys: checkout_cache_key: &checkout_cache_key v1-checkout - gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }} + gems_cache_key: &gems_cache_key v1-gems-{{ arch }}-{{ checksum "Gemfile.lock" }} gradle_cache_key: &gradle_cache_key v3-gradle-{{ .Environment.CIRCLE_JOB }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "packages/react-native/ReactAndroid/gradle.properties" }} - yarn_cache_key: &yarn_cache_key v6-yarn-cache-{{ .Environment.CIRCLE_JOB }} - rbenv_cache_key: &rbenv_cache_key v1-rbenv-{{ checksum "/tmp/required_ruby" }} - hermes_workspace_cache_key: &hermes_workspace_cache_key v5-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }} - hermes_workspace_debug_cache_key: &hermes_workspace_debug_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} - hermes_workspace_release_cache_key: &hermes_workspace_release_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} + yarn_cache_key: &yarn_cache_key v7-yarn-cache-{{ .Environment.CIRCLE_JOB }} + rbenv_cache_key: &rbenv_cache_key v1-rbenv-{{ arch }}-{{ checksum "/tmp/required_ruby" }} + hermes_workspace_cache_key: &hermes_workspace_cache_key v8-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }} + hermes_workspace_debug_cache_key: &hermes_workspace_debug_cache_key v5-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} + hermes_workspace_release_cache_key: &hermes_workspace_release_cache_key v5-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} hermes_linux_cache_key: &hermes_linux_cache_key v1-hermes-{{ .Environment.CIRCLE_JOB }}-linux-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-windows-{{ checksum "/Users/circleci/project/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} # Hermes iOS - hermesc_apple_cache_key: &hermesc_apple_cache_key v2-hermesc-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} - hermes_apple_slices_cache_key: &hermes_apple_slices_cache_key v2-hermes-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} - hermes_tarball_debug_cache_key: &hermes_tarball_debug_cache_key v4-hermes-tarball-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} - hermes_tarball_release_cache_key: &hermes_tarball_release_cache_key v3-hermes-tarball-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} - hermes_macosx_bin_release_cache_key: &hermes_macosx_bin_release_cache_key v1-hermes-release-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} - hermes_macosx_bin_debug_cache_key: &hermes_macosx_bin_debug_cache_key v1-hermes-debug-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} - hermes_dsym_debug_cache_key: &hermes_dsym_debug_cache_key v1-hermes-debug-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} - hermes_dsym_release_cache_key: &hermes_dsym_release_cache_key v1-hermes-release-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} + hermesc_apple_cache_key: &hermesc_apple_cache_key v4-hermesc-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} + hermes_apple_slices_cache_key: &hermes_apple_slices_cache_key v13-hermes-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} + hermes_tarball_debug_cache_key: &hermes_tarball_debug_cache_key v10-hermes-tarball-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} + hermes_tarball_release_cache_key: &hermes_tarball_release_cache_key v9-hermes-tarball-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }} + hermes_macosx_bin_release_cache_key: &hermes_macosx_bin_release_cache_key v5-hermes-release-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} + hermes_macosx_bin_debug_cache_key: &hermes_macosx_bin_debug_cache_key v3-hermes-debug-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} + hermes_dsym_debug_cache_key: &hermes_dsym_debug_cache_key v4-hermes-debug-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} + hermes_dsym_release_cache_key: &hermes_dsym_release_cache_key v4-hermes-release-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }} # Cocoapods - RNTester - pods_cache_key: &pods_cache_key v10-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }} - cocoapods_cache_key: &cocoapods_cache_key v8-cocoapods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }} - rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v6-podfilelock-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }} + pods_cache_key: &pods_cache_key v12-pods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }} + cocoapods_cache_key: &cocoapods_cache_key v12-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }} + rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v10-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }} # Cocoapods - Template - template_cocoapods_cache_key: &template_cocoapods_cache_key v4-cocoapods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile.lock" }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "packages/rn-tester/Podfile.lock }} - template_podfile_lock_cache_key: &template_podfile_lock_cache_key v4-podfilelock-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "packages/rn-tester/Podfile.lock }} - - # Windows - windows_yarn_cache_key: &windows_yarn_cache_key v1-win-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }} - windows_choco_cache_key: &windows_choco_cache_key v1-win-choco-cache-{{ .Environment.CIRCLE_JOB }} - + template_cocoapods_cache_key: &template_cocoapods_cache_key v6-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile.lock" }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "packages/rn-tester/Podfile.lock" }} + template_podfile_lock_cache_key: &template_podfile_lock_cache_key v6-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "packages/rn-tester/Podfile.lock" }} cache_paths: hermes_workspace_macos_cache_paths: &hermes_workspace_macos_cache_paths @@ -134,14 +129,22 @@ parameters: default: false type: boolean - release_latest: + run_nightly_workflow: default: false type: boolean release_version: - default: "9999" + default: "" type: string - run_nightly_workflow: + release_monorepo_packages_version: + default: "" + type: string + + release_tag: + default: "" + type: string + + release_dry_run: default: false type: boolean diff --git a/.circleci/configurations/workflows.yml b/.circleci/configurations/workflows.yml index 4b346cb78fa4..cccab425b0bb 100644 --- a/.circleci/configurations/workflows.yml +++ b/.circleci/configurations/workflows.yml @@ -15,15 +15,16 @@ workflows: version: 2 - # This workflow should only be triggered by release script - package_release: + # Release workflow, triggered by `yarn trigger-react-native-release` + create_release: when: << pipeline.parameters.run_release_workflow >> jobs: - # This job will push a tag that will trigger the publish_release workflow - - prepare_package_for_release: - name: prepare_package_for_release + - prepare_release: + name: prepare_release version: << pipeline.parameters.release_version >> - latest : << pipeline.parameters.release_latest >> + monorepo_packages_version: << pipeline.parameters.release_monorepo_packages_version >> + tag: << pipeline.parameters.release_tag >> + dry_run: << pipeline.parameters.release_dry_run >> # This job will run only when a tag is published due to all the jobs being filtered. publish_release: @@ -43,6 +44,7 @@ workflows: requires: - prepare_hermes_workspace - build_apple_slices_hermes: + filters: *only_release_tags requires: - build_hermesc_apple matrix: @@ -54,6 +56,7 @@ workflows: requires: - prepare_hermes_workspace - build_hermes_macos: + filters: *only_release_tags requires: - build_apple_slices_hermes matrix: @@ -88,7 +91,6 @@ workflows: nightly: when: << pipeline.parameters.run_nightly_workflow >> jobs: - - nightly_job - prepare_hermes_workspace - build_android: release_type: "nightly" diff --git a/.circleci/verdaccio.yml b/.circleci/verdaccio.yml deleted file mode 100644 index 7ec6fd1f9a91..000000000000 --- a/.circleci/verdaccio.yml +++ /dev/null @@ -1,36 +0,0 @@ -storage: ./storage -auth: - htpasswd: - file: ./htpasswd -uplinks: - npmjs: - url: https://registry.npmjs.org/ - max_fails: 40 - maxage: 30m - timeout: 60s - fail_timeout: 10m - cache: false - agent_options: - keepAlive: true - maxSockets: 40 - maxFreeSockets: 10 -packages: - # Get @react-native/normalize-color from npm registry, since its used in deprecated-react-native-prop-types package - '@react-native/normalize-color': - access: $all - publish: $authenticated - proxy: npmjs - # Group and isolate all local packages, avoid being proxy from outside - '@react-native/*': - access: $all - publish: $all - '@*/*': - access: $all - publish: $authenticated - proxy: npmjs - '**': - access: $all - publish: $all - proxy: npmjs -logs: - - {type: file, path: verdaccio.log, format: json, level: warn} diff --git a/.eslintignore b/.eslintignore index e3313f1685f5..e35c03e132f7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,6 +6,10 @@ packages/react-native/Libraries/Renderer/* packages/react-native/Libraries/vendor/**/* node_modules/ packages/*/node_modules +packages/*/dist packages/debugger-frontend/dist/**/* packages/react-native-codegen/lib tools/eslint/rules/sort-imports.js +**/Pods/* +**/*.macos.js +**/*.windows.js diff --git a/.eslintrc.js b/.eslintrc.js index f14dc495f236..b0410b566e34 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,6 +34,13 @@ module.exports = { 'no-undef': 0, }, }, + { + files: ['*.js', '*.js.flow'], + excludedFiles: ['packages/react-native/template/**/*'], + rules: { + 'lint/sort-imports': 1, + }, + }, { files: ['package.json'], parser: 'jsonc-eslint-parser', @@ -53,14 +60,16 @@ module.exports = { }, }, { - files: ['packages/react-native/Libraries/**/*.js'], + files: [ + 'packages/react-native/Libraries/**/*.js', + 'packages/react-native/src/**/*.js', + ], rules: { '@react-native/platform-colors': 2, '@react-native/specs/react-native-modules': 2, 'lint/no-haste-imports': 2, 'lint/no-react-native-imports': 2, 'lint/require-extends-error': 2, - 'lint/sort-imports': 1, }, }, { diff --git a/.flowconfig b/.flowconfig index 46b145a20225..f240531f3d78 100644 --- a/.flowconfig +++ b/.flowconfig @@ -8,11 +8,18 @@ ; Ignore "BUCK" generated dirs /\.buckd/ +; Ignore other platform suffixes +.*\.macos\.js$ +.*\.windows\.js$ + .*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$ ; Checked-in build output /packages/debugger-frontend/dist/ +; Generated build output +/packages/.*/dist + [untyped] .*/node_modules/@react-native-community/cli/.*/.* @@ -29,6 +36,7 @@ packages/react-native/flow/ [options] experimental.global_find_ref=true enums=true +casting_syntax=both emoji=true @@ -77,4 +85,4 @@ untyped-import untyped-type-import [version] -^0.217.0 +^0.228.0 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d923854d7b2a..eeda1f865d9c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -2,23 +2,68 @@ name: 🐛 Bug Report description: Report a reproducible bug or regression in React Native. labels: ["Needs: Triage :mag:"] body: + - type: markdown + attributes: + value: "## Reporting a bug to React Native" - type: markdown attributes: value: | - Please provide all the information requested. Issues that do not follow this format are likely to stall. + Thank you for taking the time to report an issue for React Native, your contribution will help + make the framework better for everyone. + + Before you continue: + * If you're using **Expo** and you're noticing a bug, [report it here](https://github.com/expo/expo/issues). + * If you're found a problem with our **documentation**, [report it here](https://github.com/facebook/react-native-website/issues/). + * If you're having an issue with **Metro** (the bundler), [report it here](https://github.com/facebook/metro/issues/). + * If you're using an external library, report the issue to the **library first**. + * Please [search for similar issues](https://github.com/facebook/react-native/issues) in our issue tracker. + + Make sure that your issue: + * Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native). + * Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native. + + Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native. - type: textarea id: description attributes: label: Description - description: Please provide a clear and concise description of what the bug is. Include screenshots if needed. Test using the [latest React Native release](https://github.com/facebook/react-native/releases/latest) to make sure your issue has not already been fixed. + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to reproduce + description: The list of steps that reproduce the issue. + placeholder: | + 1. Install the application with `yarn android` + 2. Click on the button on the Home + 3. Notice the crash validations: required: true - type: input id: version attributes: label: React Native Version - description: What is the latest version of react-native that this issue reproduces on? Please only list the highest version you tested. Bear in mind that only issues on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) will be looked into. - placeholder: ex. 0.71.0 + description: The version of react-native that this issue reproduces on. Bear in mind that only issues on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) will be looked into. + placeholder: "0.73.0" + validations: + required: true + - type: dropdown + id: platforms + attributes: + label: Affected Platforms + description: Please select which platform you're developing to, and which OS you're using for building. + multiple: true + options: + - Runtime - Android + - Runtime - iOS + - Runtime - Web + - Runtime - Desktop + - Build - MacOS + - Build - Windows + - Build - Linux + - Other (please specify) validations: required: true - type: textarea @@ -26,23 +71,53 @@ body: attributes: label: Output of `npx react-native info` description: Run `npx react-native info` in your terminal, copy and paste the results here. + placeholder: | + Paste the output of `npx react-native info` here. The output looks like: + ... + System: + OS: macOS 14.1.1 + CPU: (10) arm64 Apple M1 Max + Memory: 417.81 MB / 64.00 GB + Shell: + version: "5.9" + path: /bin/zsh + Binaries: + Node: ... + version: 18.14.0 + ... + render: text validations: required: true - type: textarea - id: reproduction + id: stacktrace attributes: - label: Steps to reproduce - description: Provide a detailed list of steps that reproduce the issue. + label: Stacktrace or Logs + description: Please provide a stacktrace or a log of your crash or failure + render: text + placeholder: | + Paste your stacktraces and logs here. They might look like: + + java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfabricjni.so caused by: com.facebook.react.fabric.StateWrapperImpl result: 0 + at com.facebook.soloader.SoLoader.g(Unknown Source:341) + at com.facebook.soloader.SoLoader.t(Unknown Source:124) + at com.facebook.soloader.SoLoader.s(Unknown Source:2) + at com.facebook.soloader.SoLoader.q(Unknown Source:42) + at com.facebook.soloader.SoLoader.p(Unknown Source:1) + ... + validations: + required: true + - type: input + id: reproducer + attributes: + label: Reproducer + description: A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**. + placeholder: "https://github.com//" validations: required: true - type: textarea id: extra attributes: - label: Snack, screenshot, or link to a repository + label: Screenshots and Videos description: | - Please provide a Snack (https://snack.expo.dev/), a link to a repository on GitHub that reproduces the problem. - You may provide a screenshot of the application if you think it is relevant to your bug report. - Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve - Please note that a reproducer is **mandatory**. Issues without reproducer are more likely to stall and will be closed. - validations: - required: true + Please provide screenshot or a video of your bug if relevant. + Issues with videos and screenshots are more likely to **get prioritized**. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7eef039fb2f9..3dc8f2471854 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,12 +1,16 @@ blank_issues_enabled: false contact_links: - - name: 📦 Metro Issue - url: https://github.com/facebook/metro/issues/new + - name: 🚀 Expo Issue + url: https://github.com/expo/expo/issues/new about: | - If you've encountered a module resolution problem, e.g. "Error: Unable to resolve module ...", or something else that might be related to Metro, please open an issue in the Metro repo instead. + If you're using Expo in your project, please report the issue first in the Expo issue tracker. - name: 📃 Documentation Issue url: https://github.com/facebook/react-native-website/issues about: Please report documentation issues in the React Native website repository. + - name: 📦 Metro Issue + url: https://github.com/facebook/metro/issues/new + about: | + If you've encountered a module resolution problem, e.g. "Error: Unable to resolve module ...", or something else that might be related to Metro, please open an issue in the Metro repo instead. - name: 🤔 Questions and Help url: https://reactnative.dev/help about: Looking for help with your app? Please refer to the React Native community's support resources. diff --git a/.github/ISSUE_TEMPLATE/new_architecture_bug_report.yml b/.github/ISSUE_TEMPLATE/new_architecture_bug_report.yml index f0ac968d8075..452c7899eabc 100644 --- a/.github/ISSUE_TEMPLATE/new_architecture_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/new_architecture_bug_report.yml @@ -1,29 +1,81 @@ name: 💫 New Architecture - Bug Report description: Report a reproducible bug or a build issue when using the New Architecture (Fabric & TurboModules) in React Native. labels: ["Needs: Triage :mag:", "Type: New Architecture"] + body: + - type: markdown + attributes: + value: "## New Architecture Related Bugs" - type: markdown attributes: value: | - Please provide all the information requested. Issues that do not follow this format are going to be closed. - This issue report is reserved to bug & build issues for users on the New Architecture. If you're not using - the New Architecture, please don't open issues on this category. + Thank you for taking the time to report an issue for [the New Architecture of React Native](https://reactnative.dev/docs/the-new-architecture/landing-page), + your contribution will help make the framework better for everyone. + + If you're **NOT** using the New Architecture, please use this [other bug type](https://github.com/facebook/react-native/issues/new?template=bug_report.yml). + Do not attempt to open a bug in this category if you're not using the New Architecture as your bug will be closed. + + Make sure that your issue: + * Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native). + * Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native. + + Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native. - type: textarea id: description attributes: label: Description - description: | - Please provide a clear and concise description of what the bug or issue is. Include screenshots if needed. - Please make sure you check the New Architecture documentation first, as your issue might - already be answered there - https://reactnative.dev/docs/next/new-architecture-intro + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to reproduce + description: The list of steps that reproduce the issue. + placeholder: | + 1. Install the application with `yarn android` + 2. Click on the button on the Home + 3. Notice the crash validations: required: true - type: input id: version attributes: label: React Native Version - description: What is the latest version of react-native that this issue reproduces on? Please test against the latest stable version, and list only the highest version you tested. Bug reports against older versions are more likely to stall. - placeholder: ex. 0.71.0 + description: The version of react-native that this issue reproduces on. Bear in mind that only issues on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) will be looked into. + placeholder: "0.73.0" + validations: + required: true + - type: dropdown + id: platforms + attributes: + label: Affected Platforms + description: Please select which platform you're developing to, and which OS you're using for building. + multiple: true + options: + - Runtime - Android + - Runtime - iOS + - Runtime - Web + - Runtime - Desktop + - Build - MacOS + - Build - Windows + - Build - Linux + - Other (please specify) + validations: + required: true + - type: dropdown + id: areas + attributes: + label: Areas + description: Which areas of the New Architecture are affected by this bug report? + multiple: true + options: + - Fabric - The New Renderer + - TurboModule - The New Native Module System + - JSI - Javascript Interface + - Bridgeless - The New Initialization Flow + - Codegen + - Other (please specify) validations: required: true - type: textarea @@ -31,23 +83,53 @@ body: attributes: label: Output of `npx react-native info` description: Run `npx react-native info` in your terminal, copy and paste the results here. + placeholder: | + Paste the output of `npx react-native info` here. The output looks like: + ... + System: + OS: macOS 14.1.1 + CPU: (10) arm64 Apple M1 Max + Memory: 417.81 MB / 64.00 GB + Shell: + version: "5.9" + path: /bin/zsh + Binaries: + Node: ... + version: 18.14.0 + ... + render: text validations: required: true - type: textarea - id: reproduction + id: stacktrace attributes: - label: Steps to reproduce - description: Provide a detailed list of steps that reproduce the issue. + label: Stacktrace or Logs + description: Please provide a stacktrace or a log of your crash or failure + render: text + placeholder: | + Paste your stacktraces and logs here. They might look like: + + java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfabricjni.so caused by: com.facebook.react.fabric.StateWrapperImpl result: 0 + at com.facebook.soloader.SoLoader.g(Unknown Source:341) + at com.facebook.soloader.SoLoader.t(Unknown Source:124) + at com.facebook.soloader.SoLoader.s(Unknown Source:2) + at com.facebook.soloader.SoLoader.q(Unknown Source:42) + at com.facebook.soloader.SoLoader.p(Unknown Source:1) + ... + validations: + required: true + - type: input + id: reproducer + attributes: + label: Reproducer + description: A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**. + placeholder: "https://github.com//" validations: required: true - type: textarea id: extra attributes: - label: Snack, code example, screenshot, or link to a repository + label: Screenshots and Videos description: | - Please provide a Snack (https://snack.expo.dev/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. - You may provide a screenshot of the application if you think it is relevant to your bug report. - Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve - Please note that a reproducer is **mandatory**. Issues without reproducer are more likely to stall and will be closed. - validations: - required: true + Please provide screenshot or a video of your bug if relevant. + Issues with videos and screenshots are more likely to **get prioritized**. diff --git a/.github/ISSUE_TEMPLATE/upgrade-regression-form.yml b/.github/ISSUE_TEMPLATE/upgrade-regression-form.yml deleted file mode 100644 index 967c92b921be..000000000000 --- a/.github/ISSUE_TEMPLATE/upgrade-regression-form.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: ⬆️ Upgrade - Build Regression -description: If you are upgrading to a new React Native version (stable or pre-release) and encounter a build regression. -labels: ["Needs: Triage :mag:", "Type: Upgrade Issue"] -body: - - type: markdown - attributes: - value: | - Please use this form to file an issue if you have upgraded or are upgrading to [latest stable release](https://github.com/facebook/react-native/releases/latest) and have experienced a regression (something that used to work in previous version). - - type: input - id: new-version - attributes: - label: New Version - description: This is the version you are attempting to upgrade to. - placeholder: ex. 0.66.1 - validations: - required: true - - type: input - id: old-version - attributes: - label: Old Version - description: This is the version you were on where the behavior was working. - placeholder: ex. 0.65.1 - validations: - required: true - - type: input - id: target - attributes: - label: Build Target(s) - description: What target(s) are encountering this issue? - placeholder: iOS simulator in release flavor - validations: - required: true - - type: textarea - id: react-native-info - attributes: - label: Output of `react-native info` - description: Run `react-native info` in your terminal, copy and paste the results here. - validations: - required: true - - type: textarea - id: reproduction - attributes: - label: Issue and Reproduction Steps - description: Please describe the issue and list out commands run to reproduce. - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/upgrade_regression_form.yml b/.github/ISSUE_TEMPLATE/upgrade_regression_form.yml new file mode 100644 index 000000000000..ed559395ecb0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/upgrade_regression_form.yml @@ -0,0 +1,133 @@ +name: ⬆️ Upgrade - Build Regression +description: If you are upgrading to a new React Native version (stable or pre-release) and encounter a build regression. +labels: ["Needs: Triage :mag:", "Type: Upgrade Issue"] + +body: + - type: markdown + attributes: + value: "## Upgrade Issues" + - type: markdown + attributes: + value: | + Please use this form to file an issue if you have upgraded or are upgrading to [latest stable release](https://github.com/facebook/react-native/releases/latest) and have experienced a regression (something that used to work in previous version). + + If you're **NOT** upgrading the React Native version, please use this [other bug type](https://github.com/facebook/react-native/issues/new?template=bug_report.yml). + + Before you continue: + * If you're using **Expo** and having problems updating it, [report it here](https://github.com/expo/expo/issues). + * If you're found a problem with our **documentation**, [report it here](https://github.com/facebook/react-native-website/issues/). + * If you're having an issue with **Metro** (the bundler), [report it here](https://github.com/facebook/metro/issues/). + * If you're using an external library, report the issue to the **library first**. + * Please [search for similar issues](https://github.com/facebook/react-native/issues) in our issue tracker. + + Make sure that your issue: + * Have a **valid reproducer** with an [empty project from template](https://github.com/react-native-community/reproducer-react-native). + * Is upgrading to the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native. + + Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native. + - type: input + id: old-version + attributes: + label: Old Version + description: The version of react-native that you're upgrading from. + placeholder: "0.72.0" + validations: + required: true + - type: input + id: new-version + attributes: + label: New Version + description: The version of react-native that you're upgrading to. Bear in mind that only issues that are upgrading to the [latest stable](https://github.com/facebook/react-native/releases/) will be looked into. + placeholder: "0.73.0" + validations: + required: true + - type: textarea + id: description + attributes: + label: Description + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to reproduce + description: The list of steps and commands to reproduce the issue. + placeholder: | + 1. Install the application with `yarn android` + 2. Click on the button on the Home + 3. Notice the crash + validations: + required: true + - type: dropdown + id: platforms + attributes: + label: Affected Platforms + description: Please select which platform you're developing to, and which OS you're using for building. + multiple: true + options: + - Runtime - Android + - Runtime - iOS + - Runtime - Web + - Runtime - Desktop + - Build - MacOS + - Build - Windows + - Build - Linux + - Other (please specify) + validations: + required: true + - type: textarea + id: react-native-info + attributes: + label: Output of `npx react-native info` + description: Run `npx react-native info` in your terminal, copy and paste the results here. + placeholder: | + Paste the output of `npx react-native info` here. The output looks like: + ... + System: + OS: macOS 14.1.1 + CPU: (10) arm64 Apple M1 Max + Memory: 417.81 MB / 64.00 GB + Shell: + version: "5.9" + path: /bin/zsh + Binaries: + Node: ... + version: 18.14.0 + ... + render: text + validations: + required: true + - type: textarea + id: stacktrace + attributes: + label: Stacktrace or Logs + description: Please provide a stacktrace or a log of your crash or failure + render: text + placeholder: | + Paste your stacktraces and logs here. They might look like: + + java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfabricjni.so caused by: com.facebook.react.fabric.StateWrapperImpl result: 0 + at com.facebook.soloader.SoLoader.g(Unknown Source:341) + at com.facebook.soloader.SoLoader.t(Unknown Source:124) + at com.facebook.soloader.SoLoader.s(Unknown Source:2) + at com.facebook.soloader.SoLoader.q(Unknown Source:42) + at com.facebook.soloader.SoLoader.p(Unknown Source:1) + ... + validations: + required: true + - type: input + id: reproducer + attributes: + label: Reproducer + description: A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**. + placeholder: "https://github.com//" + validations: + required: true + - type: textarea + id: extra + attributes: + label: Screenshots and Videos + description: | + Please provide screenshot or a video of your bug if relevant. + Issues with videos and screenshots are more likely to **get prioritized**. diff --git a/.github/workflow-scripts/checkForReproducer.js b/.github/workflow-scripts/checkForReproducer.js index 50baff0d81c8..b4814d5441d9 100644 --- a/.github/workflow-scripts/checkForReproducer.js +++ b/.github/workflow-scripts/checkForReproducer.js @@ -8,6 +8,7 @@ */ const NEEDS_REPRO_LABEL = 'Needs: Repro'; +const NEEDS_AUTHOR_FEEDBACK_LABEL = 'Needs: Author Feedback'; const NEEDS_REPRO_HEADER = 'Missing Reproducible Example'; const NEEDS_REPRO_MESSAGE = `| :warning: | Missing Reproducible Example |\n` + @@ -83,7 +84,7 @@ module.exports = async (github, context) => { } else { await github.rest.issues.addLabels({ ...issueData, - labels: [NEEDS_REPRO_LABEL], + labels: [NEEDS_REPRO_LABEL, NEEDS_AUTHOR_FEEDBACK_LABEL], }); if (botComment) return; diff --git a/.github/workflows/autorebase.yml b/.github/workflows/autorebase.yml index f52439bbcb07..62fd97caf1ad 100644 --- a/.github/workflows/autorebase.yml +++ b/.github/workflows/autorebase.yml @@ -17,7 +17,7 @@ jobs: if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') steps: - name: Checkout the latest code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 # otherwise, you will fail to push refs to dest repo diff --git a/.github/workflows/check-for-reproducer.yml b/.github/workflows/check-for-reproducer.yml index 97d841e7e6b7..839416620f68 100644 --- a/.github/workflows/check-for-reproducer.yml +++ b/.github/workflows/check-for-reproducer.yml @@ -10,7 +10,7 @@ jobs: if: | github.repository == 'facebook/react-native' && github.event.issue.pull_request == null && github.event.issue.state == 'open' && !contains(github.event.issue.labels.*.name, ':open_umbrella: Umbrella') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/github-script@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/danger_pr.yml b/.github/workflows/danger_pr.yml index 62b8b612fe11..cfde17435243 100644 --- a/.github/workflows/danger_pr.yml +++ b/.github/workflows/danger_pr.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'facebook/react-native' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Yarn Install on Root run: yarn install working-directory: . diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml new file mode 100644 index 000000000000..7677425ab0b2 --- /dev/null +++ b/.github/workflows/ios-tests.yml @@ -0,0 +1,48 @@ +name: ios-tests + +on: + push: + branches: + - main + pull_request: + branches: + - "*" + +jobs: + test_ios_rntester-Hermes: + runs-on: macos-latest-large + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'yarn' + - name: Yarn Install + run: yarn install + - name: Get latest commit from Hermes + run: | + mkdir -p tmp/hermes + HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]') + echo $HERMES_TAG_SHA > tmp/hermes/hermesversion + echo "Latest Commit is:" + cat tmp/hermes/hermesversion + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: '3.2' + - name: Cache cocoapods + uses: actions/cache@v3 + with: + path: packages/rn-tester/Pods + key: v1-${{ runner.os }}-RNTesterPods-${{ hashFiles('packages/rn-tester/Podfile.lock') }}-${{ hashFiles('packages/rn-tester/Podfile') }}-${{ hashFiles('tmp/hermes/hermesversion') }} + - name: Pod Install + run: | + cd packages/rn-tester + bundle install + bundle exec pod install + - name: Install XCBeautify + run: brew install xcbeautify + - name: Build iOS + run: ./scripts/objc-test.sh diff --git a/.github/workflows/needs-attention.yml b/.github/workflows/needs-attention.yml index 741ece44b4d4..a92cf54504a4 100644 --- a/.github/workflows/needs-attention.yml +++ b/.github/workflows/needs-attention.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'facebook/react-native' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Apply Needs Attention Label uses: hramos/needs-attention@v1 with: diff --git a/.github/workflows/nightlies-feedback.yml b/.github/workflows/nightlies-feedback.yml new file mode 100644 index 000000000000..5ac43fb9b995 --- /dev/null +++ b/.github/workflows/nightlies-feedback.yml @@ -0,0 +1,52 @@ +name: Nightlies Partners Feedback +env: + # Add accounts for users who are part of the nightlies program + allowed_users: > + [ + "blakef", + "alanjhughes" + ] +on: + workflow_dispatch: + inputs: + project: + description: 'What project is running against the nighties build?' + required: true + type: string + outcome: + description: 'Did the CI run: ["pass", "fail"]?' + required: true + type: string + stage: + description: 'Stage in the run that failed: ["build", "test"]?' + required: true + type: string + link: + description: 'URL to the failing test' + required: true + type: string + version: + description: 'What is the Nightlies version this was run against?' + required: true + type: string +jobs: + share-nightlies-feedback: + name: ${{ inputs.project}} 💨 Nightlies CI + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - if: ${{ !contains(fromJSON(env.allowed_users), github.actor) }} + run: | + echo "Request from actor's login wasn't on the allowed_users list." + curl -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel + - run: | + echo "Project: ${{ inputs.project }}" + echo "Outcome: ${{ inputs.outcome }}" + echo "Stage: ${{ inputs.stage }}" + echo "Link: ${{ inputs.link }}" + echo "Version: ${{ inputs.version }}" + [[ "${{ inputs.outcome }}" == "pass" ]] && { exit 0; } || { exit 1; } diff --git a/.github/workflows/on-issue-labeled.yml b/.github/workflows/on-issue-labeled.yml index 14f9d4e9c5d6..b6172766fa67 100644 --- a/.github/workflows/on-issue-labeled.yml +++ b/.github/workflows/on-issue-labeled.yml @@ -16,7 +16,7 @@ jobs: if: "${{ github.repository == 'facebook/react-native' && contains(github.event.label.name, 'Needs: Triage :mag:') }}" steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Verify RN version uses: actions/github-script@v6 @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'facebook/react-native' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/github-script@v6 with: script: | diff --git a/.github/workflows/run_e2e_tests.yml b/.github/workflows/run_e2e_tests.yml new file mode 100644 index 000000000000..cf8478572270 --- /dev/null +++ b/.github/workflows/run_e2e_tests.yml @@ -0,0 +1,26 @@ +name: Run E2E Tests +# This workflow is used to trigger E2E tests on a PR when a comment is made +# containing the text "#run-e2e-tests". +on: + issue_comment: + types: [created] +permissions: + contents: read +jobs: + rebase: + name: Trigger E2E Tests + permissions: + contents: write # for cirrus-actions/rebase to push code to rebase + pull-requests: read # for cirrus-actions/rebase to get info about PR + runs-on: ubuntu-latest + if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '#run-e2e-tests') + steps: + - name: Checkout the latest code + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 # otherwise, you will fail to push refs to dest repo + - name: Push empty commit + run: | + git commit -m "#run-e2e-tests" --allow-empty + git push origin $(git branch --show-current) diff --git a/.gitignore b/.gitignore index 2481e622143e..626d954cfa3f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ DerivedData *.xcuserstate project.xcworkspace **/.xcode.env.local -/poackages/react-native/sdks/downloads/ # Gradle /build/ @@ -39,11 +38,11 @@ project.xcworkspace /packages/react-native/ReactAndroid/gradlew.bat /packages/react-native/ReactAndroid/external-artifacts/build/ /packages/react-native/ReactAndroid/external-artifacts/artifacts/ -/packages/react-native/ReactAndroid/flipper-integration/build/ /packages/react-native/ReactAndroid/hermes-engine/build/ /packages/react-native/ReactAndroid/hermes-engine/.cxx/ /packages/react-native/template/android/app/build/ /packages/react-native/template/android/build/ +/packages/react-native-popup-menu-android/android/build/ # Buck .buckd @@ -80,7 +79,6 @@ package-lock.json .DS_Store # Test generated files -/packages/react-native/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js *.js.meta /coverage @@ -100,22 +98,25 @@ package-lock.json # Libs that shouldn't have Xcode project /packages/react-native/Libraries/FBLazyVector/**/*.xcodeproj -/packages/react-native/Libraries/RCTRequired/**/*.xcodeproj +/packages/react-native/Libraries/Required/**/*.xcodeproj /packages/react-native/React/CoreModules/**/*.xcodeproj /packages/react-native/React/FBReactNativeSpec/**/*.xcodeproj /packages/react-native-codegen/**/*.xcodeproj +/packages/rn-tester/**/*.xcodeproj # Ruby Gems (Bundler) /packages/react-native/vendor /packages/react-native/template/vendor .ruby-version /**/.ruby-version +vendor/ # iOS / CocoaPods /packages/react-native/template/ios/build/ /packages/react-native/template/ios/Pods/ /packages/react-native/template/ios/Podfile.lock /packages/rn-tester/Gemfile.lock +/packages/**/RCTLegacyInteropComponents.mm # Ignore RNTester specific Pods, but keep the __offline_mirrors__ here. /packages/rn-tester/Pods/* diff --git a/.prettierignore b/.prettierignore index ece752382206..93b6aaeaf77e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,3 +4,6 @@ # Ignore hermes as it is downloaded from the react_native_pods **/sdks/hermes **/sdks/downloads + +packages/*/dist +vendor diff --git a/CHANGELOG.md b/CHANGELOG.md index 753a359556a7..affabe4ae515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,530 @@ # Changelog +## v0.73.4 + +### Fixed + +- Fix: cannot find module `react-native-*/Libraries/Core/InitializeCore` ([562447be47](https://github.com/facebook/react-native/commit/562447be4705c3e3338633ca108e7e67b9b01640) by [@tido64](https://github.com/tido64)) + +#### Android + +- Ignore the one-time NullPointerException and print error log ([ca9b6b5038](https://github.com/facebook/react-native/commit/ca9b6b5038c419405a440fc8add7090be633654c)) + +#### iOS + +- Fix warning when loading RCTUIManager and A11yManager ([f56bf1fa0a](https://github.com/facebook/react-native/commit/f56bf1fa0a0d0ca547cf7c3ff2e631efac1007ea) by [@cipolleschi](https://github.com/cipolleschi)) + +## v0.73.3 + +### Added + +#### iOS specific + +- Handle TSAsExpression when looking for the codegen declaration ([02957718d7](https://github.com/facebook/react-native/commit/02957718d7ca1af815493d145697c1e848b16c17) by [@dmytrorykun](https://github.com/dmytrorykun)) + +### Changed + +- Bump CLI to 12.3.2 ([bcb229e8f8](https://github.com/facebook/react-native/commit/bcb229e8f8b70b59d3cb603d7bb912784ad25a02) by [@szymonrybczak](https://github.com/szymonrybczak)) + +#### Android specific + +- Call super.onRequestPermissionsResult in ReactActivity's onRequestPermissionsResult() ([96ed1190c6](https://github.com/facebook/react-native/commit/96ed1190c624869af96e464b009e0c0234076893) by [@LimAlbert](https://github.com/LimAlbert)) + +#### iOS specific + +- Remove ATS config patch from react_native_post_install ([41c601e478](https://github.com/facebook/react-native/commit/41c601e4786b544fdd1fca138b0e0c61dbb8eba2) by [@gabrieldonadel](https://github.com/gabrieldonadel)) + +### Fixed + +- Declare missing dependency `chalk` ([9155e2d182](https://github.com/facebook/react-native/commit/9155e2d1828e04d6144de80bb543d50936500377) by [@tido64](https://github.com/tido64)) +- TouchableBounce, TouchableHighlight and TouchableNativeFeedback dropping touches with React 18. ([e4708d661b](https://github.com/facebook/react-native/commit/e4708d661bf3d01ec857635f04a4aabf9d954a5e) by [@sammy-SC](https://github.com/sammy-SC)) +- TouchableWithoutFeedback and TouchableOpacity dropping touches with React 18. ([54166342f0](https://github.com/facebook/react-native/commit/54166342f01fc74236ba6146a4c0f604189017e4) by [@sammy-SC](https://github.com/sammy-SC)) + +#### iOS specific + +- Restrict Cocoapods versions < 1.15. ([3869ae4d80](https://github.com/facebook/react-native/commit/3869ae4d80d1da8c4e3fe7449f2926c5e1575beb) by [@blakef](https://github.com/blakef)) +- Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge ([d46d80d2ef](https://github.com/facebook/react-native/commit/d46d80d2ef6cdc05c5a1b2429ed1df93410ae36f) by [@cipolleschi](https://github.com/cipolleschi)) +- Fix support for SOURCEMAP_FILE path containing spaces ([63e893d23d](https://github.com/facebook/react-native/commit/63e893d23d84c9bf65bad64fc359b9686eb19b4d) by [@paulschreiber](https://github.com/paulschreiber)) +- Fix release build error due to a casing issue in hermes tarball path after download prebuilt tarball ([2e2f8a6689](https://github.com/facebook/react-native/commit/2e2f8a668907552070a2a53a47137b1449b66bbd) by [@wfern](https://github.com/wfern)) +- Fix race condition between A11yManager and UIManager ([f39f34ed82](https://github.com/facebook/react-native/commit/f39f34ed82997d0595522a285c3cb8693594e718) by [@cipolleschi](https://github.com/cipolleschi)) +- Fix symbol not found _jump_fcontext with use_frameworks ([a2771ce58a](https://github.com/facebook/react-native/commit/a2771ce58ac221d1ac0de265c1ce571212fbcf83) by [@cipolleschi](https://github.com/cipolleschi)) + +## v0.72.10 + +### Added + +- Unhandled promise rejection - attach non-standard Error object stack info if possible ([655b12dbfa](https://github.com/facebook/react-native/commit/655b12dbfaa2c48f9fd38bbe8311e6f935045b30) by [@ospfranco](https://github.com/ospfranco)) + +### Fixed + +- Revert the regression of iOS min version and updates Podfile.lock for Releases ([1f70f58aa4](https://github.com/facebook/react-native/commit/1f70f58aa4225d017ebad4f66641cbd0d1db114f) by [@cipolleschi](https://github.com/cipolleschi)) +- Fix flags ([565281105e](https://github.com/facebook/react-native/commit/565281105e4a0c4d51d2134114bdadb33f03d61a) by [@cipolleschi](https://github.com/cipolleschi)) + +## v0.72.9 + +### Fixed + +- Fix boost link ([d62d714ada](https://github.com/facebook/react-native/commit/d62d714adab891028004063136a7e906478618c4) by [@cipolleschi](https://github.com/cipolleschi)) +- Fix New Arch build failing with -std=c++20 ([b7c1a40db4](https://github.com/facebook/react-native/commit/b7c1a40db4d5a6d992b926307842fe671ae80436) by [@tido64](https://github.com/tido64)) +- Fix ruby tests ([7c7baad7bd](https://github.com/facebook/react-native/commit/7c7baad7bd62cf59b46a426eeb31aefc1e85bca7) by [@cipolleschi](https://github.com/cipolleschi)) +- Bump Podfile.lock and try to fix Hermes update ([34da08755d](https://github.com/facebook/react-native/commit/34da08755d88a726e0a68d7a2ef544fe4af0dc6e) by [@cipolleschi](https://github.com/cipolleschi)) + +## v0.73.2 + +### Added + +- Unhandled promise rejection - attach non-standard Error object stack info if possible ([655b12dbfa](https://github.com/facebook/react-native/commit/655b12dbfaa2c48f9fd38bbe8311e6f935045b30) by [@ospfranco](https://github.com/ospfranco)) + +### Changed + +- Bump Metro to ^v0.80.3 ([16dff523b0](https://github.com/facebook/react-native/commit/16dff523b0a16d7fa9b651062c386885c2f48a6b) by [@huntie](https://github.com/huntie)) +- Automatically reconnect to an existing debugger session on relaunching the app ([0806ad7854](https://github.com/facebook/react-native/commit/0806ad785458009887ff4c67b995ec992a010702) by [@motiz88](https://github.com/motiz88)) + +#### iOS specific + +- Update ios pod post_install logic for detecting if hermes is enabled ([d6163d7f43](https://github.com/facebook/react-native/commit/d6163d7f43a753f24148450033491dfc9c5d0c36) by [@gabrieldonadel](https://github.com/gabrieldonadel)) + +### Fixed + +- Fix comment about adding packages in android template ([ac9b87cd57](https://github.com/facebook/react-native/commit/ac9b87cd57029a0f0876aaec8d259d9befba9838) by [@janicduplessis](https://github.com/janicduplessis)) +- Fix boost download url ([7e721f09ad](https://github.com/facebook/react-native/commit/7e721f09ad3dafed9f490f433b2ac613786c27b2) by [@cipolleschi](https://github.com/cipolleschi)) + +#### iOS specific + +- Fix horizontal scrollview scrollTo coordinate space in RTL on oldarch ([e809e0aca7](https://github.com/facebook/react-native/commit/e809e0aca713ad12f91778b09f5297f1da866b26) by [@NickGerleman](https://github.com/NickGerleman)) +- [enhance IP address retrieval for iOS devices in Metro bundler setup](https://github.com/facebook/react-native/pull/41839/commits/6a351db158dadf944933173aa0150435c742001f) ([9f28616650](https://github.com/facebook/react-native/commit/9f28616650a61ca298c2fc710b588445b8ceb94c) by [@Morritz](https://github.com/Morritz)) + This file contains all changelogs for latest releases, from 0.70.0 onward. Please check out the other `CHANGELOG-*.md` files for previous versions. +## v0.73.1 + +### Added + +- Add `enableNetworkInspector` experiment to enable Network panel and CDP handlers in inspector proxy ([8ef807bfb2](https://github.com/facebook/react-native/commit/8ef807bfb2e596bd70f0c8b17f1b6f698d98ae2a) by [@byCedric](https://github.com/byCedric)) + +### Changed + +- Chore: bump CLI to 12.3.0 ([dff11ab993](https://github.com/facebook/react-native/commit/dff11ab993e57a097988537791afe8ef086e4ce4) by [@szymonrybczak](https://github.com/szymonrybczak)) + +### Fixed + +- Fix last spacer constrain logic in VirtualizedList ([3ed4bf9046](https://github.com/facebook/react-native/commit/3ed4bf9046ae125d244283c3556892345bfd77e1) by [@janicduplessis](https://github.com/janicduplessis)) + +#### Android specific + +- Fix type for unrecognisable field mBinding ([31d8a93bf3](https://github.com/facebook/react-native/commit/31d8a93bf3199432bcd2b577738fbf49e84c207d) by [@piaskowyk](https://github.com/piaskowyk)) + +#### iOS specific + +- Fix NSAppTransportSecurity being overwritten during pod install ([a0b76d90b7](https://github.com/facebook/react-native/commit/a0b76d90b73ec0d3d9e0174004bfb96a5b6f3a3e) by [@robertying](https://github.com/robertying)) + +## v0.73.0 + +### Breaking + +- Bump minimum Node JS version to 18 ([2eb25cbdbe](https://github.com/facebook/react-native/commit/2eb25cbdbe8d1ce720ffdf5f5d855e1cbf14142b)) +- Require C++ 20 when including renderer headers ([3b5bea01d0](https://github.com/facebook/react-native/commit/3b5bea01d02ac93efeed237e474a8fe905272b24) by [@NickGerleman](https://github.com/NickGerleman)) +- Remove included `flow-typed/` directory from the `react-native` package ([4540668c15](https://github.com/facebook/react-native/commit/4540668c1598075f7ae46449bcbcbb70f69fcd8a) by [@huntie](https://github.com/huntie)) +- per-node `pointScaleFactor` ([dce7242ab6](https://github.com/facebook/react-native/commit/dce7242ab6855e7a546e6d25482311d995a4a63b) by [@NickGerleman](https://github.com/NickGerleman)) +- Remove "UseLegacyStretchBehaviour" functions ([c35ff13a58](https://github.com/facebook/react-native/commit/c35ff13a58431dee4198bc55575312558cc39bf1) by [@NickGerleman](https://github.com/NickGerleman)) +- Remove `YGConfigGetInstanceCount` ([858173280f](https://github.com/facebook/react-native/commit/858173280f515c81e2d9e76d0e0b81212ea61233) by [@NickGerleman](https://github.com/NickGerleman)) +- Remove `interpolateProps` functionality from `ComponentDescriptor` to fix circular dependency between `react/renderer/core` and `react/renderer/components/view` ([bae63d492f](https://github.com/facebook/react-native/commit/bae63d492fa8254547453229f28332f08e8b881c)) +- Migrate from native `CallInvoker` to `NativeMethodCallInvoker` ([b70f186b53](https://github.com/facebook/react-native/commit/b70f186b53c1d43ce5af681ba0be47dd9e61bcb5) by [@RSNara](https://github.com/RSNara)) +- Change how we set cmake policy ([2b932c3820](https://github.com/facebook/react-native/commit/2b932c3820cfabef1590f6fcf8b95f65d9c21eb8) by [@NickGerleman](https://github.com/NickGerleman)) +- Add `YGErrata` integration within C ABI ([0fd0f56f20](https://github.com/facebook/react-native/commit/0fd0f56f205dafed9a1960392a446f43255f29dc) by [@NickGerleman](https://github.com/NickGerleman)) +- Set `runtimeConfig` provider for the `Template` ([2de964cfd2](https://github.com/facebook/react-native/commit/2de964cfd229e56eeae8b6e0a7a516ff3a1498ac) by [@dmytrorykun](https://github.com/dmytrorykun)) + +#### Android specific + +- Fix: `role="searchbox"` should assign `"SearchField"` trait on iOS ([2749fbca9a](https://github.com/facebook/react-native/commit/2749fbca9a18fdff6c3e3dd3b3c5b8086cef9cc5) by [@mdjastrzebski](https://github.com/mdjastrzebski)) +- Renamed FabricMountItem.* files to MountItem.* to better match the name of the struct. ([49f1237526](https://github.com/facebook/react-native/commit/49f1237526f80e3aa09833cc13c6bb9f8ea9187c)) +- Deleting `warnOnLegacyNativeModuleSystemUse` ([9859fbc2ec](https://github.com/facebook/react-native/commit/9859fbc2ec9f50eba3672322a85ba7fd9fc11145) by [@philIip](https://github.com/philIip)) +- Do not enable `excludeYogaFromRawProps` feature flag, if you need to pass layout props to Java view managers when using new architecture ([88e19c0ce6](https://github.com/facebook/react-native/commit/88e19c0ce68e933d274c45f9c3f79afc11ad5b0a) by [@zeyap](https://github.com/zeyap)) +- Default to ignoring cached Metro bundle when offline ([2d6106055b](https://github.com/facebook/react-native/commit/2d6106055b629b18296d076c4f1287d8a5ba6ab8) by [@motiz88](https://github.com/motiz88)) +- W3CPointerEvents: change click event from direct to bubbling ([61eb9b4453](https://github.com/facebook/react-native/commit/61eb9b4453c96d3dc662319c9c9f322bf04d1d44)) +- Fix `ReactTextView` `setPadding` applying logic error ([d8ced6f895](https://github.com/facebook/react-native/commit/d8ced6f8953cd896471983714e722caf50783960) by [@jcdhlzq](https://github.com/jcdhlzq)) +- Add `view` getter on `RCTRootView` / `RCTFabricSurfaceHostingProxyRootView ([33e0521788](https://github.com/facebook/react-native/commit/33e0521788484eaba20beeeaabba2496854583a7) by [@zoontek](https://github.com/zoontek)) +- Remove support for Android API < 23 in ReactEditText ([1904e8036a](https://github.com/facebook/react-native/commit/1904e8036a777e463c5517010a254f0d081ae58c) by [@mdvacca](https://github.com/mdvacca)) + +#### iOS specific + +- Metro will no longer be started when running builds via Xcode ([dc6845739e](https://github.com/facebook/react-native/commit/dc6845739e29ea8cf63583d530f67c2498286a3e) by [@huntie](https://github.com/huntie)) +- `RCTTurboModuleRegistry` is unavailable in `RCTRootView` and `RCTSurfaceHostingProxyRootView` ([268d9edad6](https://github.com/facebook/react-native/commit/268d9edad69a22710711be055100680817b28791) by [@philIip](https://github.com/philIip)) +- `HasBridge` is removed from `RCTRootView` and `RCTSurfaceHostingProxyRootView` ([57b86f7a87](https://github.com/facebook/react-native/commit/57b86f7a87b7bed09124cc513d5069b4c0069a4f) by [@philIip](https://github.com/philIip)) +- Remove `sizeMeasureMode` argument from `RCTSurfaceHostingProxyRootView` constructor ([0d83c1a668](https://github.com/facebook/react-native/commit/0d83c1a6685222f97cd0c715270ca67192f89361) by [@philIip](https://github.com/philIip)) +- Deleting `RCTFabricSurfaceHostingProxyRootView` ([676676c954](https://github.com/facebook/react-native/commit/676676c95428ca92007160bf420eccc62ba41ea4) by [@philIip](https://github.com/philIip)) +- Delete RCT_EXPORT_PRE_REGISTERED_MODULE ([8cd5b2a57d](https://github.com/facebook/react-native/commit/8cd5b2a57d5b6af2ef1c6b1d673e328353ea776b) by [@philIip](https://github.com/philIip)) +- Replace `RCTLocalAssetImageLoader` with `RCTBundleAssetImageLoader` ([b675667a47](https://github.com/facebook/react-native/commit/b675667a47f651e85d66e12daaeeec00371d1b23) by [@hellohublot](https://github.com/hellohublot)) +- Add `React-FabricImage` pod. ([44af6ca03c](https://github.com/facebook/react-native/commit/44af6ca03cdb9e8c4c2cd67a2e097025bc21e17f) by [@cipolleschi](https://github.com/cipolleschi)) +- Make `getModuleInstanceFromClass` required ([5a7799eead](https://github.com/facebook/react-native/commit/5a7799eead0eb26f1f42d097d89af757eb6539d1) by [@philIip](https://github.com/philIip)) +- Make `getModuleClassFromName` required ([fbf196dd05](https://github.com/facebook/react-native/commit/fbf196dd05f367c841fa53b1c0ae7fcee9ca1721) by [@philIip](https://github.com/philIip)) +- Remove `openURL` method from `RCTInspectorDevServerHelper` ([3ef7de848d](https://github.com/facebook/react-native/commit/3ef7de848d6d4d95fe1ce4e4cf80bbfceeabb746) by [@huntie](https://github.com/huntie)) + +### Added + +- Enable animating skew in transforms with native driver ([645b643f68](https://github.com/facebook/react-native/commit/645b643f681f5260ae0505cf91cfb8f6ecdb33c0), [4934cdb403](https://github.com/facebook/react-native/commit/4934cdb40385c6417e87cf9d3ee985c06d207136) by [@genkikondo](https://github.com/genkikondo)) +- Support customization of underlying Touch event representation in out-of-tree platforms ([4884322781](https://github.com/facebook/react-native/commit/4884322781d92e019e78d89e5693b9ec029aaa7a)) +- Support customization of underlying Color representation in out-of-tree platforms ([2b688f6031](https://github.com/facebook/react-native/commit/2b688f603159c2cc9ba821f3efe8a07504400285)) +- Support lazy bundling in development ([799b0f4be8](https://github.com/facebook/react-native/commit/799b0f4be80a6c4b6bfc1d8bb3b887af4b1b7081) by [@motiz88](https://github.com/motiz88)) +- Fixup hack for flex line size calculation ([598b7ed690](https://github.com/facebook/react-native/commit/598b7ed690d908c408adea970d26382c834f5ead) by [@NickGerleman](https://github.com/NickGerleman)) +- Added a third parameter "contentType" to method `slice` of class `Blob`. ([e35ca71bca](https://github.com/facebook/react-native/commit/e35ca71bca6231138eadbc281177a8ff7948c071) by [@trashcoder](https://github.com/trashcoder)) +- Added plugins for private methods and properties to `@react-native/babel-preset`. ([db4a253c1e](https://github.com/facebook/react-native/commit/db4a253c1e8bad29df83cb649cef4132701930f0) by [@yungsters](https://github.com/yungsters)) +- Add `react-native/typescript-config` ([cae52f6cf8](https://github.com/facebook/react-native/commit/cae52f6cf878ef7ea2fc31a6197154873059a496) by [@NickGerleman](https://github.com/NickGerleman)) +- Better TypeScript support for `package.json` exports field ([1b0e8b1de4](https://github.com/facebook/react-native/commit/1b0e8b1de470bd5501d78defce6ad6fe4b2ade4b) by [@NickGerleman](https://github.com/NickGerleman)) +- Add the new media permission to typescript ([630cf3b21c](https://github.com/facebook/react-native/commit/630cf3b21cbd26154e4bed64871408439ddb8d97)) +- Added `contentType` parameter to Blob declaration ([ff40138c76](https://github.com/facebook/react-native/commit/ff40138c76a9a6028a8c063c95f9c6762bb47e9a) by [@trashcoder](https://github.com/trashcoder)) +- Remove `testID` from `TextStyle` types ([3273d38d3b](https://github.com/facebook/react-native/commit/3273d38d3bbcb0aa0a01cd6c5b959785db2a79dc) by [@tobua](https://github.com/tobua)) +- Log a warning if `npx react-native` uses old cached version ([bfca23a25d](https://github.com/facebook/react-native/commit/bfca23a25d098d1b5c599c1611fafa1d17edebec) by [@blakef](https://github.com/blakef)) +- Recognize dictionary type in codegen ([4fd8f405be](https://github.com/facebook/react-native/commit/4fd8f405beaefdf897ee8e511542fca3d6d71728) by [@ZihanChen-MSFT](https://github.com/ZihanChen-MSFT)) +- Generate events with arrays ([b422375782](https://github.com/facebook/react-native/commit/b422375782441c5836390579d0030be94a395f0c) by [@cipolleschi](https://github.com/cipolleschi)) +- Add generic support for Arrays in Events parsing ([6168701887](https://github.com/facebook/react-native/commit/6168701887ca48ae790bc2fc4058f7e65d32fc89) by [@cipolleschi](https://github.com/cipolleschi)) +- Remove config variant copy ctor from `YGNode` ([72fb75d4d4](https://github.com/facebook/react-native/commit/72fb75d4d48d3dbe4a339b2503b796716af6e5b5) by [@NickGerleman](https://github.com/NickGerleman)) +- Define Flag operators for `YGPrintOptions` ([fe6f70b913](https://github.com/facebook/react-native/commit/fe6f70b9139d97cff24dac6a60b724848e65a5d1) by [@NickGerleman](https://github.com/NickGerleman)) +- Add YGErrata Enum ([c7dcb42b8a](https://github.com/facebook/react-native/commit/c7dcb42b8acbf02bd95090bf17fe45437c52a5ab) by [@NickGerleman](https://github.com/NickGerleman)) +- Cleanup YGNode for explicit per-node config ([0e5d54a8ee](https://github.com/facebook/react-native/commit/0e5d54a8ee8f43cf39c3ee9b47acdcb933a762ab) by [@NickGerleman](https://github.com/NickGerleman)) +- Added customizeStack hook to Metro's `/symbolicate` endpoint to allow custom frame skipping logic on a stack level. ([03e78010ae](https://github.com/facebook/react-native/commit/03e78010aef3984287c34902df46268bbe9723e9) by [@GijsWeterings](https://github.com/GijsWeterings)) +- Enable TurboModule interop in Bridgeless mode ([aa1ad5496c](https://github.com/facebook/react-native/commit/aa1ad5496cdc0323de6e2b083a7e3e1826ef8289) by [@RSNara](https://github.com/RSNara)) +- Native view config interop layer enabled in bridgeless mode. ([4fbe05577b](https://github.com/facebook/react-native/commit/4fbe05577b7fd0dd1633fa422c33548ba97d4e8c) by [@dmytrorykun](https://github.com/dmytrorykun)) + +#### Android specific + +- Add `performance.reactNativeStartupTiming.initializeRuntimeStart` and `performance.reactNativeStartupTiming.initializeRuntimeEnd` API ([50638714f5](https://github.com/facebook/react-native/commit/50638714f5cbf110300aa2a3ecd63a3a25a9ac00), [10e8b3538f](https://github.com/facebook/react-native/commit/10e8b3538f65d54ebe28afea4b0f1cfd4a8233a0)) +- Transform origin ([9e68599daf](https://github.com/facebook/react-native/commit/9e68599daf844b06bd010c43cbabf3dc593bb114) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway)) +- Websocket Module setCustomClientBuilder ([0cdb9e6a52](https://github.com/facebook/react-native/commit/0cdb9e6a52f69ebee635d5bfaa34a52f6059dd47) by [@MO-Lewis](https://github.com/MO-Lewis)) +- Remove JNI Binding usage of layoutContext ([733c9289a1](https://github.com/facebook/react-native/commit/733c9289a15afe2c39a6bde56a472fe879a855f8) by [@NickGerleman](https://github.com/NickGerleman)) +- Added testing shadow helpers for robolectric ([4890d50edd](https://github.com/facebook/react-native/commit/4890d50eddbd9035e567134ac9b7d8570bae60f1) by [@philIip](https://github.com/philIip)) +- Android Events - setting default to true to use C++ event pipeline ([b816fa7a65](https://github.com/facebook/react-native/commit/b816fa7a65abe7535c4664d64827646d0ebacf03) by Jesse Watts-Russell) + +#### iOS specific + +- Added support for iOS 17+ text content types ([216865cdb7](https://github.com/facebook/react-native/commit/216865cdb7cfbb9280a40cb1f3065a8961869cba) by [@robwalkerco](https://github.com/robwalkerco)) +- Add support for building with Xcode 15 ([10d55888cc](https://github.com/facebook/react-native/commit/10d55888cce0b625c4b05a19ed609154893d17d0) by [@AlexanderEggers](https://github.com/AlexanderEggers)) +- Fixed cursor height on multiline text input ([987c6fd298](https://github.com/facebook/react-native/commit/987c6fd29868e18d9c881837a795d5d12588ca4e), [e1885853ac](https://github.com/facebook/react-native/commit/e1885853ac46f4e84af9e4a50203d50b773f1a27) by [@soumyajit4419](https://github.com/soumyajit4419)) +- Added support for `transform-origin` on old arch ([5f40f0800e](https://github.com/facebook/react-native/commit/5f40f0800e64b4380d7897b2e8b9ff561d84b97c) by [@jacobp100](https://github.com/jacobp100)) +- Now it is possible to build Hermes from local source directory. Just set REACT_NATIVE_OVERRIDE_HERMES_DIR to the path to that directory. ([45f7e117ad](https://github.com/facebook/react-native/commit/45f7e117ad0df4f6be1344588ac932a21cd192e2) by [@dmytrorykun](https://github.com/dmytrorykun)) +- Add all fontVariant values for font-variant-ligatures ([f0893cf72f](https://github.com/facebook/react-native/commit/f0893cf72ff0dfbd61b1fc28526420c6c20557d3) by [@finnp](https://github.com/finnp)) +- Support bridgeless with JSC and frameworks ([3965158a2d](https://github.com/facebook/react-native/commit/3965158a2d37c96c82f5c03e8beaeb7356c1d0f7)) +- Add pods for bridgeless ([b06c2d7050](https://github.com/facebook/react-native/commit/b06c2d7050e91491b653444d749cef3da6e86a75)) +- Added override method with default implementation ([abc6e1cbf4](https://github.com/facebook/react-native/commit/abc6e1cbf4cf9775205b0246404b0059a5838fba) by [@Gregoirevda](https://github.com/Gregoirevda)) +- Add `smartInsertDelete` prop to `TextInput` component ([6b62f12ce9](https://github.com/facebook/react-native/commit/6b62f12ce957a6eea47f4abc1ead23f64d883ce8) by [@fabioh8010](https://github.com/fabioh8010)) +- Add explicit dependencies for 3rd parties libraries ([c027f0a41f](https://github.com/facebook/react-native/commit/c027f0a41fd53a457a425d84e2c1e0ab6b862173) by [@cipolleschi](https://github.com/cipolleschi)) +- Added conversion helper for UIInterfaceOrientationMask to RCTConvert ([2ab750f7bb](https://github.com/facebook/react-native/commit/2ab750f7bbcfcc81714054cabb574442f33298bf)) + +### Changed + +- Use new Hermes CDP handler implementation for debugging ([3e7a873f2d](https://github.com/facebook/react-native/commit/3e7a873f2d1c5170a7f4c88064897e74a149c5d5) by [@huntie](https://github.com/huntie)) +- Add 'j' to debug key trigger from CLI ([321f7dbcad](https://github.com/facebook/react-native/commit/321f7dbcadb78dede9048500ab8abe86af863061) by [@huntie](https://github.com/huntie)) +- Relax FlatList.onViewableItemsChanged validation ([5cfa125b97](https://github.com/facebook/react-native/commit/5cfa125b979c7ce76884a81dd3baaddcf4a560fd)) +- Don't use setState for disabled KeyboardAvoidingView to avoid re-renders ([783150f37b](https://github.com/facebook/react-native/commit/783150f37be790f44e5a368982a200c7c08a866f) by [@adamgrzybowski](https://github.com/adamgrzybowski)) +- Add mock removeEventListener and currentState method for `AppState` ([1bda78f2fa](https://github.com/facebook/react-native/commit/1bda78f2fa64210cdfb1d84f0ce0d56be446e3e8) by [@w3cay](https://github.com/w3cay)) +- Default condition set for experimental Package Exports is now ['require', 'import', 'react-native'] ([808b3c9716](https://github.com/facebook/react-native/commit/808b3c9716e6d96b9e7308e46802de48ddc626d0) by [@huntie](https://github.com/huntie)) +- Remove default 50ms Scroll Event Throttling in VirtualizedList ([3eccc53629](https://github.com/facebook/react-native/commit/3eccc536292aa344f8d796e9325ab2aaeacfa24e) by [@NickGerleman](https://github.com/NickGerleman)) +- Sync AnimatedValue JS node value when animation completes ([51cea49be7](https://github.com/facebook/react-native/commit/51cea49be73250f5b346db9882a2da522cd508d8) by [@genkikondo](https://github.com/genkikondo)) +- Return animated values to JS for natively driven animations ([4b54c0b1fa](https://github.com/facebook/react-native/commit/4b54c0b1faf8233986bf9232e1a18a1c5067ad3a) by [@genkikondo](https://github.com/genkikondo)) +- Fixed `source` in `Image` type ([83885f1d69](https://github.com/facebook/react-native/commit/83885f1d693fdb7d3ce369cc67bcd39a9755f987) by [@BrodaNoel](https://github.com/BrodaNoel)) +- Address errors in viewability thresholds on Virtualized list by Math.floor the top and bottom dimensions of a cell item when determining viewability. ([824c1c6d07](https://github.com/facebook/react-native/commit/824c1c6d073ba53aab350bc617169ba04e568b19) by [@lunaleaps](https://github.com/lunaleaps)) +- Change `_onLayout` to update bottom height when frame height is changed ([5059ddc5ce](https://github.com/facebook/react-native/commit/5059ddc5ce623234820f231e5f4d75ea9ddf5a5b) by [@lyqandy](https://github.com/lyqandy)) +- Renaming bridgeless to runtime ([1547b81ec1](https://github.com/facebook/react-native/commit/1547b81ec18f4d66991831d06ce456472456bed5)) +- Update Metro to ^0.80.0, don't pin to exact version ([aed4aed9d5](https://github.com/facebook/react-native/commit/aed4aed9d5b02043291642c9177ceea9df9c7a4a) by [@robhogan](https://github.com/robhogan)) +- Bump Jest version in the new project template from `^29.2.1` to `^29.6.3` ([3c323382fe](https://github.com/facebook/react-native/commit/3c323382fe9ef05832fc44c6e87642de55965a4b) by [@robhogan](https://github.com/robhogan)) +- ReactImagePropertyList.java => ReactImagePropertyList.kt ([cb60e5c67b](https://github.com/facebook/react-native/commit/cb60e5c67b409da1b22e856446183bc7c82d828b) by [@bufgix](https://github.com/bufgix)) +- `BaseViewManagerTest.java` => `BaseViewManagerTest.kt` ([3660b7cf73](https://github.com/facebook/react-native/commit/3660b7cf73a322750fb9cc9aa124da0f5e739c80) by [@retyui](https://github.com/retyui)) +- React-native/babel-plugin-codegen to react-native/babel-preset ([1c3b3a09b6](https://github.com/facebook/react-native/commit/1c3b3a09b60efc55456ecfe4b79b8cc73d30f739) by [@dmytrorykun](https://github.com/dmytrorykun)) +- Replace `JSX.Element` with `React.JSX.Element` in `App.tsx` template ([1383a59ed2](https://github.com/facebook/react-native/commit/1383a59ed265531092de68ceb50dbf449070d7c0) by [@retyui](https://github.com/retyui)) +- Move react-native-babel-transformer and react-native-babel-preset from Metro to React Native repo. ([d380bb8473](https://github.com/facebook/react-native/commit/d380bb8473f1c03ca277074e952f03649d767766) by [@dmytrorykun](https://github.com/dmytrorykun)) +- Stricter TS check for transform style ([e414713e4c](https://github.com/facebook/react-native/commit/e414713e4c6d19a4f4aaa0193f540636dd936eb0) by [@vonovak](https://github.com/vonovak)) +- Bump Flipper to 0.204.0 ([d9c8cd3b40](https://github.com/facebook/react-native/commit/d9c8cd3b4051ecb9230a44289f9cf026b954ecdb) by [@szymonrybczak](https://github.com/szymonrybczak)) +- Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin ([3f6412b934](https://github.com/facebook/react-native/commit/3f6412b934250ef2c0fe2d573ea10f77b0e5eaa3) by [@NickGerleman](https://github.com/NickGerleman)) +- Pressable: prevent click bubbling in Pressable ([a449291323](https://github.com/facebook/react-native/commit/a44929132397181a11ec02e77e60b2bb0bb6add6)) +- Dirty nodes when dynamically setting config ([bde38d543e](https://github.com/facebook/react-native/commit/bde38d543e82d75b155ad60421674fb3549ef175) by [@NickGerleman](https://github.com/NickGerleman)) +- Jest globals are now defined using `Object.defineProperties` instead of object property assignment ([cf631ad59f](https://github.com/facebook/react-native/commit/cf631ad59f39bbace1a7c2311a4f66f9494ed0da) by [@yungsters](https://github.com/yungsters)) +- Support mixed props for events in codegen ([b68f53d44f](https://github.com/facebook/react-native/commit/b68f53d44f78c5627905246d8737fe46229f85aa) by [@genkikondo](https://github.com/genkikondo)) +- React-native-codegen: Buck-only: renamed src_prefix kwarg ([9193c4f50c](https://github.com/facebook/react-native/commit/9193c4f50c471193979bab589996d97bab489db4) by [@fkgozali](https://github.com/fkgozali)) +- Update CLI to v12.1.1 ([3da0959291](https://github.com/facebook/react-native/commit/3da0959291d34eca45da386a660bff184b7adb9e) by [@szymonrybczak](https://github.com/szymonrybczak)) + +#### Android specific + +- Convert the app template to Kotlin ([c1c22ebacc](https://github.com/facebook/react-native/commit/c1c22ebacc4097ce56f19385161ebb23ee1624b3) by [@cortinico](https://github.com/cortinico)) +- Upgrade target sdk version to 34 ([a6b0984893](https://github.com/facebook/react-native/commit/a6b0984893a6d1d9da5c4f69edcb3aed6407730e)) +- Bump NDK to 25 ([28deaa3a71](https://github.com/facebook/react-native/commit/28deaa3a71085dc877da7f68dcec78c63bd9192a) by [@szymonrybczak](https://github.com/szymonrybczak)) +- Remove Flipper actions in Dev Menu, add new Open Debugger action ([3bc402f612](https://github.com/facebook/react-native/commit/3bc402f612571fbfb70c309dcb2faaf67a524cfc) by [@huntie](https://github.com/huntie)) +- Add `scrollEventThrottle` prop support for android ([777934ec3a](https://github.com/facebook/react-native/commit/777934ec3ad05486602e73169cd4f2e7523cc93f)) +- Don't display the PopupWindow when current activity is in a bad state ([cee5dceac7](https://github.com/facebook/react-native/commit/cee5dceac7285fbae76139ebd58784009e2da2fb)) +- React trees will be unmounted when the application is reloaded ([e133100721](https://github.com/facebook/react-native/commit/e133100721939108b0f28dfa9f60ac627c804018) by [@javache](https://github.com/javache)) +- Fix crash "lateinit property initialProps has not been initialized" ([188eceec98](https://github.com/facebook/react-native/commit/188eceec98a6e6892c66fb81214ee5f646ce97a9)) +- Deprecating createNativeModules method from ReactPackage interface recommending using getModule instead in the new architecture of React Native ([33181ef8af](https://github.com/facebook/react-native/commit/33181ef8afd621252c7cbf181b15fc162fc294a2) by [@mdvacca](https://github.com/mdvacca)) +- Introducing getModule method into ReactPackage interface, defaulting to null. This method will be used in the Stable API of React Native ([da8616ec69](https://github.com/facebook/react-native/commit/da8616ec69a12a90b973fea1d8345c7517408a73) by [@mdvacca](https://github.com/mdvacca)) +- Update Java tests to Kotlin for the referenced file ([3dbb759506](https://github.com/facebook/react-native/commit/3dbb7595060b1454fbd8ec80cb851fe6af8f41da) by [@stewartsum](https://github.com/stewartsum)) +- Deprecate JSCJavaScriptExecutorFactory and JSCJavaScriptExecutor, use com.facebook.react.jscexecutor instead ([0cac88fa65](https://github.com/facebook/react-native/commit/0cac88fa65fd33dd6164ed2d6c4fbcdfa47f9e82) by [@mdvacca](https://github.com/mdvacca)) +- Throw ReactNoCrashSoftException when handle memeory pressure to avoid crash ([fa9ea8326e](https://github.com/facebook/react-native/commit/fa9ea8326e693b258e303aee6f59b049dcecea31)) +- Throw Error in dispatchViewManagerCommand when non-numeric tag is passed for easier debugging ([0519c11acd](https://github.com/facebook/react-native/commit/0519c11acd0c347db378bbc9238c7dabfd38f6fa) by [@hsource](https://github.com/hsource)) +- Moved ReactFontManager to a common package ([7341f9abdc](https://github.com/facebook/react-native/commit/7341f9abdcfbf5cf4dd5f8cda49151b28ae246bf) by [@fkgozali](https://github.com/fkgozali)) +- Throw Error in dispatchViewManagerCommand when non-numeric tag is passed for easier debugging ([ff1972daba](https://github.com/facebook/react-native/commit/ff1972dabafbbfc18203464b452e0d5b796cdcf6) by [@hsource](https://github.com/hsource)) +- Fresco to 3.0.0 ([823839bcc1](https://github.com/facebook/react-native/commit/823839bcc13526a5a37a0d316f90a39f6bf283bd) by [@cortinico](https://github.com/cortinico)) +- Avoid duplicate destroy on same thread ([43f7781c87](https://github.com/facebook/react-native/commit/43f7781c87c3540f2ad09147ea3fb63765b72f01)) +- Use new `getCanonicalName` and `getMessage` methods exposed by `fbjni` ([6c729acd12](https://github.com/facebook/react-native/commit/6c729acd12933d79aae3ef05dbdecfa0feb96bf4) by [@krystofwoldrich](https://github.com/krystofwoldrich)) +- Changed the scope of `setJSEngineResolutionAlgorithm` to public from private. Brownfield apps should be able to setup the JSResolutionAlgorithm before hand. ([cb376dd0d8](https://github.com/facebook/react-native/commit/cb376dd0d80fce9284c96fc5c03503a5c159fe86) by [@SparshaSaha](https://github.com/SparshaSaha)) +- Java to 17 and AGP to 8.0.2 ([9f7dddf1ac](https://github.com/facebook/react-native/commit/9f7dddf1ac34a54f27c97d2e451e7cb724cd0094) by [@cortinico](https://github.com/cortinico)) +- Use reference Yoga CMake Build ([6764adafe4](https://github.com/facebook/react-native/commit/6764adafe4c702b3d514179e4e6cfa0534f44de2) by [@NickGerleman](https://github.com/NickGerleman)) +- Enable Template with Bridgeless ([8b2f324a9b](https://github.com/facebook/react-native/commit/8b2f324a9b915f504b237cad1281735b22684444)) +- Kotlin to 1.8.0 and JDK Toolchain to 11 ([74987b6fca](https://github.com/facebook/react-native/commit/74987b6fca4aa31e15f83d871138f4edf258c082) by [@cortinico](https://github.com/cortinico)) +- Deprecate APIs that are deprecate only on JavaDoc ([1be65baf29](https://github.com/facebook/react-native/commit/1be65baf29967ec062f049d57d579694af816c1c) by [@cortinico](https://github.com/cortinico)) +- Gradle to 8.1 ([74f256b6f0](https://github.com/facebook/react-native/commit/74f256b6f019877c2854541845e11e024c16dd44) by [@cortinico](https://github.com/cortinico)) +- "Open Debugger" is no longer available for remote JS debugging from the Dev Menu (non-Hermes). Please use `NativeDevSettings.setIsDebuggingRemotely()`. ([361a944348](https://github.com/facebook/react-native/commit/361a944348e4da5d17f910965d0b89c9e65b18c7) by [@huntie](https://github.com/huntie)) + +#### iOS specific + +- Remove Flipper actions in Dev Menu, add new Open Debugger action ([5bfc507655](https://github.com/facebook/react-native/commit/5bfc5076557c92211bb58f8ac8fc008e87b14228) by [@huntie](https://github.com/huntie)) +- Moved the min iOS version to 13.4 ([610b14e4f3](https://github.com/facebook/react-native/commit/610b14e4f3f606cd4c49518b9a42e3290fd52aeb) by [@cipolleschi](https://github.com/cipolleschi)) +- TurboModules are now exposed to JS as the prototype of a plain JS object, so methods can be cached ([20dba39dab](https://github.com/facebook/react-native/commit/20dba39dab4ef85eb28659a89b19750cec3193a4) by [@javache](https://github.com/javache)) +- Restored `cancelable` option in `Pressability` configuration to not block native responder, and instead introduced a new optional `blockNativeResponder` boolean option to accomplish the same thing. ([30e2345b26](https://github.com/facebook/react-native/commit/30e2345b263233a4ebac6a4839885c8bc337bdfd) by [@yungsters](https://github.com/yungsters)) +- Scroll `ScrollView` text fields into view with `automaticallyAdjustsScrollIndicatorInsets` ([9ca16605e0](https://github.com/facebook/react-native/commit/9ca16605e0eb7b30996f10109aa9080088078995) by [@adamaveray](https://github.com/adamaveray)) +- Remove Xcode 15 `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` workaround for boost ([b9f0bdd12d](https://github.com/facebook/react-native/commit/b9f0bdd12d9d7eeb5a6cc13a4e9793fc6031a94b) by [@Kudo](https://github.com/Kudo)) +- Updated comment in RCTBundleURLProvider.h to instance correct jsBundleURLForBundleRoot:fallbackExtension method. ([d208dc422c](https://github.com/facebook/react-native/commit/d208dc422c9239d126e0da674451c5898d57319d) by [@JulioCVaz](https://github.com/JulioCVaz)) +- Set the new arch flag based on the React Native version. ([a8d268593a](https://github.com/facebook/react-native/commit/a8d268593ae811fcc0ef10749aab84abfb8ec89e) by [@cipolleschi](https://github.com/cipolleschi)) +- Add RCTPlatformName to RCTConstants.h ([046ae12a6d](https://github.com/facebook/react-native/commit/046ae12a6db9e7404131b28f44e2cf842551e3f3) by [@Saadnajmi](https://github.com/Saadnajmi)) +- Use the runtime scheduler in the old Architecture ([2692f206a6](https://github.com/facebook/react-native/commit/2692f206a6ff16f65d47f70774908db816cee989) by [@cipolleschi](https://github.com/cipolleschi)) +- Set DEFINES_MODULE xcconfig in React-RCTAppDelegate to generate a module map for this pod ([7c79e3107f](https://github.com/facebook/react-native/commit/7c79e3107fe735d4afa41c29ab9a3453cab38d11) by [@tsapeta](https://github.com/tsapeta)) +- Move .m to .mm to make obj-c and C++ headers compatible ([42d67452eb](https://github.com/facebook/react-native/commit/42d67452eb9a507651078882d00df44dd6720049)) +- Remove deprecated uses of UIActivityIndicatorViewStyle ([62e9faefd5](https://github.com/facebook/react-native/commit/62e9faefd5f12f5fe6dc88a076ddf7cafda75ee5) by [@Saadnajmi](https://github.com/Saadnajmi)) +- Fix setRuntimeConfigProvider called multiple times error ([637ffb175d](https://github.com/facebook/react-native/commit/637ffb175db17af0582d503e9f510c4fe35c115b)) +- Set initial AppState status to "inactive" instead of "unknown" ([54a5ff9745](https://github.com/facebook/react-native/commit/54a5ff9745ca8713b8d3a83dc37792ea71597b53) by [@louiszawadzki](https://github.com/louiszawadzki)) +- Return animated values to JS for natively driven animations ([b0485bed09](https://github.com/facebook/react-native/commit/b0485bed0945061becace5af924fa60b17ab295f) by [@genkikondo](https://github.com/genkikondo)) +- Disabled bitcode for Hermes prebuilts ([de6bfec82a](https://github.com/facebook/react-native/commit/de6bfec82a1cb4b387bfe8a87b1f597f39572764) by [@cipolleschi](https://github.com/cipolleschi)) +- Make RNTester use RCTAppDelegate ([680cbe757b](https://github.com/facebook/react-native/commit/680cbe757b250fd9a05862040c080f063b2197a7) by [@cipolleschi](https://github.com/cipolleschi)) +- Changed AppDelegate template to avoid retaining TurboModuleManager. ([ec1ab73674](https://github.com/facebook/react-native/commit/ec1ab736744bb3a511ce38cace8891b01436ae75) by [@javache](https://github.com/javache)) +- Migrate RNTester to Bridgeless ([d3c28d28a9](https://github.com/facebook/react-native/commit/d3c28d28a9b5324310f0d86c284d3d8ffd63615b)) +- Re-organise BridgelessApple files to keep proper header file include structure ([736dd5a3c0](https://github.com/facebook/react-native/commit/736dd5a3c0c074db25551db080e8f0a925f37bd8)) + +### Deprecated + +- Deprecate YGConfigSetUseLegacyStretchBehaviour ([7f300cd755](https://github.com/facebook/react-native/commit/7f300cd75539ba153ce3ee4758a9b1ea1f00a247) by [@NickGerleman](https://github.com/NickGerleman)) + +#### Android specific + +- Deprecate hasConstants from ReactModule annotation ([ccfd4c080c](https://github.com/facebook/react-native/commit/ccfd4c080ccaf9b030dbd6f3f5a3242b457db8be) by [@philIip](https://github.com/philIip)) +- ReactModuleInfo constructor with getConstants arg is deprecated ([9f52378cc1](https://github.com/facebook/react-native/commit/9f52378cc1061c7c9dae6aee5147bb54f0aa24aa) by [@philIip](https://github.com/philIip)) +- HasConstants in ReactModuleInfo is marked as deprecated ([196d9f9520](https://github.com/facebook/react-native/commit/196d9f9520be90190618c0f459719ffa08ab9673) by [@philIip](https://github.com/philIip)) +- Deprecating EventBeatManager constructor that receives a Context as a parameter. ([363224ea62](https://github.com/facebook/react-native/commit/363224ea626a3ddc51500a16d337da1df2d09633) by [@mdvacca](https://github.com/mdvacca)) +- Deprecate and mark for removal com.facebook.react.common.StandardCharsets, please use java.nio.charset.StandardCharsets instead ([c0b4883058](https://github.com/facebook/react-native/commit/c0b488305860fabd3d737674d614e4f466ace0ed) by [@mdvacca](https://github.com/mdvacca)) +- ([a4fe9b2b6d](https://github.com/facebook/react-native/commit/a4fe9b2b6da84ebfa5b90883dc4787e95e98405f) by [@philIip](https://github.com/philIip)) +- Deprecate TurboModuleManager.getLegacyCxxModule ([7a08fbb088](https://github.com/facebook/react-native/commit/7a08fbb0882779330b2135962842ddc92166be5c) by [@RSNara](https://github.com/RSNara)) +- Deprecate TurboModuleRegistry.getModule(), getModules(), hasModule(), ([3af66bf7fb](https://github.com/facebook/react-native/commit/3af66bf7fbd88d77fe27770bcb829768bf949b9c) by [@RSNara](https://github.com/RSNara)) + +#### iOS specific + +- Deprecate `get_default_flags` in Ruby scripts ([f60b9f695e](https://github.com/facebook/react-native/commit/f60b9f695e1c08714735b78366267127b29ab705) by [@cipolleschi](https://github.com/cipolleschi)) +- Use -[RCTTurboModuleManager installJSBindings:] instead of -[RCTTurboModuleManager installJSBindingWithRuntimeExecutor:] ([7fb9e4f46c](https://github.com/facebook/react-native/commit/7fb9e4f46c3131f74a9672afc6cc426a61adde0c) by [@javache](https://github.com/javache)) + +### Removed + +- Remove remote debugging from the dev menu ([28e1ca9873](https://github.com/facebook/react-native/commit/28e1ca98737014a9a1735789b3fb817255ffdfdf) by [@gabrieldonadel](https://github.com/gabrieldonadel)) +- Remove experimental support for loading bytecode from Metro ([6abc097bf3](https://github.com/facebook/react-native/commit/6abc097bf32ade1438fcf6c33bf6cc8c192249f8) by [@motiz88](https://github.com/motiz88)) +- Remove internal DevSplitBundleLoader native module ([6dcdb93ec0](https://github.com/facebook/react-native/commit/6dcdb93ec0c581f08b4f4a4ea1816571f15cc2ca) by [@motiz88](https://github.com/motiz88)) + +#### Android specific + +- Remove unused `canLoadFile` function from HermesExecutor.java ([1b7e26cccb](https://github.com/facebook/react-native/commit/1b7e26cccb3460b3525ab5066313f5dd2254ac30) by [@cortinico](https://github.com/cortinico)) +- Polish DevServerHelper (remove unused Interfaces) ([7dcaf00835](https://github.com/facebook/react-native/commit/7dcaf008352d53feeb9ced493adb10d72f9e04c1) by [@cortinico](https://github.com/cortinico)) +- DevServerHelper should not depend on internal ctor parameter ([da358d0ec7](https://github.com/facebook/react-native/commit/da358d0ec7a492edb804b9cdce70e7516ee518ae) by [@cortinico](https://github.com/cortinico)) +- Deprecate Java YogaConfig.setUseLegacyStretchBehaviour() ([f635341461](https://github.com/facebook/react-native/commit/f6353414613f89ce309547c43fab6c3ca5315266) by [@NickGerleman](https://github.com/NickGerleman)) +- Remove TurboModuleManagerDelegate.getLegacyCxxModule ([6f10110555](https://github.com/facebook/react-native/commit/6f10110555694ec659a87f41b65ca12ee044d908) by [@RSNara](https://github.com/RSNara)) +- Remove TurboModuleManager.getNativeModule,getNativeModules,hasNativeModule ([ac2a4d8e6c](https://github.com/facebook/react-native/commit/ac2a4d8e6cee233686e497e29518f0f11a89a4d7) by [@RSNara](https://github.com/RSNara)) +- Delete hasConstants() method from BaseJavaModule ([bbc3657ff4](https://github.com/facebook/react-native/commit/bbc3657ff4efd0218e02ad9a3c73725a7f8a366c) by [@mdvacca](https://github.com/mdvacca)) +- Deleted obsolete native methods DevServerHelper.symbolicateStackTrace and DevServerHelper.openStackFrameCall ([ad46bc6d77](https://github.com/facebook/react-native/commit/ad46bc6d775330ed55c5b945c8b3cf7145ad5a61) by [@GijsWeterings](https://github.com/GijsWeterings)) +- Reduce visibility of DevInternalSettings class ([1a9e444b61](https://github.com/facebook/react-native/commit/1a9e444b61630066604a974d3c0527a4ad7707e5) by [@cortinico](https://github.com/cortinico)) + +#### iOS specific + +- Remove redundant ifdefs for ArrayBuffer backwards compatibility ([fb30fcaa2f](https://github.com/facebook/react-native/commit/fb30fcaa2f526cc1f7c2d4189ec9c57f9cf9b3c5) by [@Saadnajmi](https://github.com/Saadnajmi)) +- Remove RCTSurfaceHostingComponent and RCTSurfaceBackedComponent, needed only for ComponentKit integration. ([b8d60a834f](https://github.com/facebook/react-native/commit/b8d60a834f25cfde8a8580a32afc752b52d10a8d) by [@constantine-fry](https://github.com/constantine-fry)) +- Remove PRODUCTION flag from iOS build logic ([daa99fe5e7](https://github.com/facebook/react-native/commit/daa99fe5e7d3b4fc634513ae8b3d954c7b40eaa4) by [@cipolleschi](https://github.com/cipolleschi)) +- Delete bridge.loadAndExecuteSplitBundleURL ([e2d512a1ee](https://github.com/facebook/react-native/commit/e2d512a1eef9950d3475c95dee8d2474a5723d74) by [@RSNara](https://github.com/RSNara)) +- delete RCTJSScriptLoaderModule ([438f6cf591](https://github.com/facebook/react-native/commit/438f6cf5915786e611ebea3bfc9b96c3106c2aa9) by [@philIip](https://github.com/philIip)) +- Remove Xcode 12.5 post install workaround ([0ab8b40fd6](https://github.com/facebook/react-native/commit/0ab8b40fd64ad86b4598293faa0b77e71fc9d349) by [@Saadnajmi](https://github.com/Saadnajmi)) + +### Fixed + +- Fix virtualization logic with horizontal RTL lists ([8b39bfadbb](https://github.com/facebook/react-native/commit/8b39bfadbb6206168db9601b86734a583ac11461) by [@NickGerleman](https://github.com/NickGerleman)) +- Fix a potential bug in `EventEmitter` when used with certain Babel configurations that incorrectly polyfill the spread operator for iterables. ([8b768f144a](https://github.com/facebook/react-native/commit/8b768f144a3cad25d84a4e70b880e5aa1d5ff872) by [@yungsters](https://github.com/yungsters)) +- Remove need for platform overrides in SafeAreaView.js ([80f531f9f4](https://github.com/facebook/react-native/commit/80f531f9f4c5eb43af6b4e7979cf6b7b3af12992) by [@christophpurrer](https://github.com/christophpurrer)) +- Hide Babel helpers and other core files from LogBox stack traces by default ([af73a75c21](https://github.com/facebook/react-native/commit/af73a75c215577847666dac49a3360a967f0dc46) by [@motiz88](https://github.com/motiz88)) +- Mitigate flickering on color animations ([5f8bbf2bd2](https://github.com/facebook/react-native/commit/5f8bbf2bd27ccff2c83be8d9dedc7005854fecaa) by [@genkikondo](https://github.com/genkikondo)) +- Resolves Animated.Value.interpolate results in NaN when output is in radians ([ae0d714bbd](https://github.com/facebook/react-native/commit/ae0d714bbdd2eb9d114c17c3945b2f678f60b65a) by [@javache](https://github.com/javache)) +- Fix invariant violation when using viewability callbacks with horizontal RTL FlatList on Paper ([a2fb46ec0d](https://github.com/facebook/react-native/commit/a2fb46ec0d157a4f9d5e4eb0f4c885aaf60c4325) by [@NickGerleman](https://github.com/NickGerleman)) +- Fix invariant violation when `maintainVisibleContentPosition` adjustment moves window before list start ([c168a4f88b](https://github.com/facebook/react-native/commit/c168a4f88bc51e441e704694eed498ce67c9c353) by [@NickGerleman](https://github.com/NickGerleman)) +- Fix backfaceVisibility after transform changes ([242c835c42](https://github.com/facebook/react-native/commit/242c835c422287aa91723cf2ad902ea232f17d15) by [@javache](https://github.com/javache)) +- Add missing type for TextInput.readOnly in Typescript ([deb81853f5](https://github.com/facebook/react-native/commit/deb81853f5618df2ee5fda7096777ac629babb7a) by [@antliann](https://github.com/antliann)) +- Do not render mocked when `visible=false` ([468a13635a](https://github.com/facebook/react-native/commit/468a13635a592621562b10b395ec73f0f4d28093) by [@mdjastrzebski](https://github.com/mdjastrzebski)) +- Fix a type issue of NativeEventEmitter ([d4d323cbc2](https://github.com/facebook/react-native/commit/d4d323cbc2469d54bbd684c478953df5bc815421)) +- Add support to archive Schemes names with backspaces ([a384e076e0](https://github.com/facebook/react-native/commit/a384e076e0f446610ab5c0ad2300fd94c27489f3) by [@yardenPhy](https://github.com/yardenPhy)) +- Updated TypeScript definitions to include userSelect style support. Refer to commit [2e4d8b6c145](https://github.com/facebook/react-native/commit/2e4d8b6c145ed36b600a0481d7f65157a78abbeb) for the specific changes. ([30ab7a45ec](https://github.com/facebook/react-native/commit/30ab7a45eceaa851e8af239f9b64bf7eec424952) by [@MjMoshiri](https://github.com/MjMoshiri)) +- Use right edge of ScrollView viewport for `scrollMetrics.offset` in RTL ([0e69050612](https://github.com/facebook/react-native/commit/0e690506124de44ea6e98012aad817aac9de7f9b) by [@NickGerleman](https://github.com/NickGerleman)) +- AnimatedColor flickering on Android ([ec97646fe4](https://github.com/facebook/react-native/commit/ec97646fe4a6d8cf002c3670e0444371e67edf9f)) +- Fixup contentLength invalidation logic ([ace0a80dea](https://github.com/facebook/react-native/commit/ace0a80dead59d552ed16872de05cd9e977fc6b2) by [@NickGerleman](https://github.com/NickGerleman)) +- Right align scrollToIndex in RTL ([5596f1c25b](https://github.com/facebook/react-native/commit/5596f1c25b31cbe38357264c3e31e5a60fa22380) by [@NickGerleman](https://github.com/NickGerleman)) +- Cache ScrollView content length before calling `scrollToIndex` ([33d6da01ea](https://github.com/facebook/react-native/commit/33d6da01ea15022485d8e65beae49a779130921a) by [@NickGerleman](https://github.com/NickGerleman)) +- Update `event-target-shim` import to support Metro resolving `mjs` modules before `js`. ([e37e53086a](https://github.com/facebook/react-native/commit/e37e53086af5c0569830efa607fc42c2b9593be1) by [@EvanBacon](https://github.com/EvanBacon)) +- Avoids re-renders during text selection on desktop platforms by limiting native-only `isHighlighted` prop to iOS ([3d2fd4bf22](https://github.com/facebook/react-native/commit/3d2fd4bf228c64b1f46dc4737cf5c8eb50392eb0)) +- Fixed missing property `signal` for the `Request` interface ([823b1f467b](https://github.com/facebook/react-native/commit/823b1f467b42b6d8b68a2f4af292c2663f192cd2) by [@ljbc1994](https://github.com/ljbc1994)) +- Remove need for platform overrides to Settings ([3c15b68d56](https://github.com/facebook/react-native/commit/3c15b68d565ac6f5bae782dac3a3fa5ca66f821d) by [@christophpurrer](https://github.com/christophpurrer)) +- Remove need for each platform to implement ToastAndroid as UnimplementedView ([800ea60393](https://github.com/facebook/react-native/commit/800ea60393cc810ef4b36ed102694deda04162c9) by [@christophpurrer](https://github.com/christophpurrer)) +- Remove need for each platform to implement DrawerLayoutAndroid as UnimplementedView ([151f3900de](https://github.com/facebook/react-native/commit/151f3900de092199fd18cf89aea470a41827bb06) by [@christophpurrer](https://github.com/christophpurrer)) +- Remove need for each platform to implement ProgressBarAndroid as UnimplementedView ([c02fcca187](https://github.com/facebook/react-native/commit/c02fcca187e8136dd320ba7c6bbab7268f1267ca) by [@christophpurrer](https://github.com/christophpurrer)) +- Correct the NativeSyntheticEvent type ([fedad15a69](https://github.com/facebook/react-native/commit/fedad15a693c9715fe258f0a0a41e131374700bb) by [@mmmulani](https://github.com/mmmulani)) +- ([4aa53d241d](https://github.com/facebook/react-native/commit/4aa53d241d79f0e0c6e82c4c8ea8c73d48934a14) by [@IslamRustamov](https://github.com/IslamRustamov)) +- Fixed missing File declaration in Typescript global.d.ts ([9c0441b8a1](https://github.com/facebook/react-native/commit/9c0441b8a100bbc4e47c8ba725b30ea979bb61e8) by [@trashcoder](https://github.com/trashcoder)) +- Android does't crash when using remote debugger ([0fe5ffd568](https://github.com/facebook/react-native/commit/0fe5ffd568b46104625479e1f9afa1b18cdf71b6) by [@javache](https://github.com/javache)) +- Fix timestamps and grouped display of console messages within in a `console.group` ([48791bcd98](https://github.com/facebook/react-native/commit/48791bcd9873b4db10435077c0560907fdb263b2)) +- When animating using native driver, trigger rerender on animation completion in order to update Pressability responder regions ([c870a529fe](https://github.com/facebook/react-native/commit/c870a529fe78ea1cc780f6b7c6f1b0940f4eb8df) by [@genkikondo](https://github.com/genkikondo)) +- Specify float value in ParagraphLayoutManager ([efc5f73f27](https://github.com/facebook/react-native/commit/efc5f73f27de1cc63c7182811293a87de4436359) by [@TatianaKapos](https://github.com/TatianaKapos)) +- When animating using native driver, trigger rerender on animation completion in order to update Pressability responder regions ([03f70bf995](https://github.com/facebook/react-native/commit/03f70bf995379f08a77abcf96bb0e31ff75ca8c3) by [@genkikondo](https://github.com/genkikondo)) +- Fixed computation of layout via `ref.measureRelative` and `ref.measureInWindow` for nodes with scale/rotate transforms in their parents. ([64416d9503](https://github.com/facebook/react-native/commit/64416d9503f9c17ab5ceec2a1506a97a2049f879) by [@rubennorte](https://github.com/rubennorte)) +- Remove duplicated code that resulted after a merge conflict. ([8dcaa4cc3b](https://github.com/facebook/react-native/commit/8dcaa4cc3b8d2f72337a0652b5058769b68d1eb8) by [@cipolleschi](https://github.com/cipolleschi)) +- Fix[devtools]: fixed duplicated backend activation with multiple renderers ([ada6c51943](https://github.com/facebook/react-native/commit/ada6c51943925ca161bf3f4f2dd1f453d5fdc543) by [@hoxyq](https://github.com/hoxyq)) +- Change FlatList `viewabilityConfig` prop type `any` to `ViewabilityConfig` ([5dfa38a20e](https://github.com/facebook/react-native/commit/5dfa38a20e72f6fe560577ec499ff2fee5943b73) by [@jeongshin](https://github.com/jeongshin)) +- Refactor: `substr()` is deprecated, using `slice()` instead across RN codebase ([8a49754cda](https://github.com/facebook/react-native/commit/8a49754cdaf259a9300eb254e0e5da0c7ce3b125) by [@Pranav-yadav](https://github.com/Pranav-yadav)) +- Fix VirtualizedList with `maintainVisibleContentPosition` ([69b22c9799](https://github.com/facebook/react-native/commit/69b22c9799108c05ddc9875d162060826c6e46e2) by [@janicduplessis](https://github.com/janicduplessis)) +- Make sure initialScrollToIndex is bigger than 0 when adjusting cells ([eb30a80c81](https://github.com/facebook/react-native/commit/eb30a80c81bd385f9902548b14df2a3c17e2dd5c) by [@okwasniewski](https://github.com/okwasniewski)) +- Comment out unreferenced formal parameter ([3c0ad81fef](https://github.com/facebook/react-native/commit/3c0ad81fef96d23a7240b708346c7f015f37aea9) by [@TatianaKapos](https://github.com/TatianaKapos)) +- Resolved property name conflicts in event-emitter codegen ([3759a26214](https://github.com/facebook/react-native/commit/3759a262146390798a4aa0cd97b96f47a33d8c08) by [@javache](https://github.com/javache)) +- Issue with TurboModule C++ codegen with optional return types ([dd6d57eea1](https://github.com/facebook/react-native/commit/dd6d57eea107f1b89ff89cc439dcbe73093e5d17) by [@javache](https://github.com/javache)) +- Issue with TurboModule C++ codegen with optional args ([0a8164d993](https://github.com/facebook/react-native/commit/0a8164d99352bb95462edb63283ce4a342cf2f07) by [@javache](https://github.com/javache)) +- Fix podspecs building with C++ 14 ([5ea0b449e2](https://github.com/facebook/react-native/commit/5ea0b449e246257feddcd7ca6cf6c551e9c5ab76) by [@NickGerleman](https://github.com/NickGerleman)) +- URLs parsed by RCTConvert should be encoded respecting RFC 3986, 1738/1808 ([9841bd8185](https://github.com/facebook/react-native/commit/9841bd81852d59608fe3566b17831d6d42eb7dcf) by [@philIip](https://github.com/philIip)) +- Enhance/fix error reporting in reload and destroy ([f437224042](https://github.com/facebook/react-native/commit/f4372240429658b4050090b1f3a384cb6d440fe4) by [@RSNara](https://github.com/RSNara)) +- Create FeatureFlag to gate Stable API for Turbo Module ([49197411d8](https://github.com/facebook/react-native/commit/49197411d886eb7673ca4cb5918a9ea2d7bb95d6) by [@mdvacca](https://github.com/mdvacca)) +- Do not render React DevTools overlays unless they are connected ([39016889d0](https://github.com/facebook/react-native/commit/39016889d09f1766e218e52d2e141e960a35b38a) by [@hoxyq](https://github.com/hoxyq)) +- Fix nullable-to-nonnull-conversion warnings ([2856bef721](https://github.com/facebook/react-native/commit/2856bef72119af4d46535facae61d9efed24e5ee) by [@caodoan](https://github.com/caodoan)) +- Clear bundler banner messages after a certain delay during development. ([6eeb81a86e](https://github.com/facebook/react-native/commit/6eeb81a86e0cf4f050bb6bae5b09dedf8b251a15) by [@jacdebug](https://github.com/jacdebug)) +- Correctly invalidate NSTextStorage when non layout related props change ([247da6ef7f](https://github.com/facebook/react-native/commit/247da6ef7fd0ae335ffc208218532becd596f855) by [@sammy-SC](https://github.com/sammy-SC)) +- Ensure systrace events are always stopped ([97b6829b83](https://github.com/facebook/react-native/commit/97b6829b830d26da62ca014ae83b22b40b7c5379) by [@javache](https://github.com/javache)) +- SafeAreaView shouldn't dirty layout on clone by default ([ecf1b84795](https://github.com/facebook/react-native/commit/ecf1b8479515759284e72a6f8680201795273fdf) by [@javache](https://github.com/javache)) +- Terminate instead of throwing if TurboModule callback double-called ([dfd445cbc6](https://github.com/facebook/react-native/commit/dfd445cbc69c8bc6c5d1d3d7948472a0a3ae4927) by [@NickGerleman](https://github.com/NickGerleman)) +- Reduce dynamic SchedulerFeatureFlags ([2a58b06863](https://github.com/facebook/react-native/commit/2a58b06863b320403cbbbeb9909e25db9c2aaa4e) by [@kassens](https://github.com/kassens)) +- Enable -Wextra in C++ builds ([99674b360a](https://github.com/facebook/react-native/commit/99674b360a8b1a24545af9c56c9f55b2ec121ff6) by [@NickGerleman](https://github.com/NickGerleman)) +- Update `deprecated-react-native-prop-types` to remove fragile transitive `*` dependencies. ([f00594b262](https://github.com/facebook/react-native/commit/f00594b26203ad2793b40c31d4f882d29daec46e) by [@robhogan](https://github.com/robhogan)) +- Fix `createAnimatedStyle` when providing an undefined transform style ([7e26e0270b](https://github.com/facebook/react-native/commit/7e26e0270b5d9f8490320af563a4943d24d269ea) by [@gabrieldonadel](https://github.com/gabrieldonadel)) +- Bail on hiPri render on missing layout data before checking priority ([817fedb0e7](https://github.com/facebook/react-native/commit/817fedb0e7a5276d86431c65cc886062ed8fe220) by [@NickGerleman](https://github.com/NickGerleman)) +- `react-native/codegen` shouldn't be built unless it's in the repo — fixes `pod install` failures in pnpm setups ([3dd6a83c0e](https://github.com/facebook/react-native/commit/3dd6a83c0e39c54b4ff050589e4e13f1ccc66a5d) by [@tido64](https://github.com/tido64)) +- Correctly declare runtime dependencies ([c32064c510](https://github.com/facebook/react-native/commit/c32064c5102cfd9b48abd25697cef9ceb05d18a3) by [@tido64](https://github.com/tido64)) + +#### Android specific + +- Fix Text cut off issues when adjusting text size and font weight in system settings. ([babbc3e43c](https://github.com/facebook/react-native/commit/babbc3e43cf0a855186a91d3c6b615a1cd940d94)) +- Set the accessibility role to `NONE` when a `null` string is passed to `fromValue` ([0f48e86fed](https://github.com/facebook/react-native/commit/0f48e86fedc5269f6fa5112d40282b747eacc0de) by [@cipolleschi](https://github.com/cipolleschi)) +- Fix default shadow radius in TextAttributeProps ([05fd10d12f](https://github.com/facebook/react-native/commit/05fd10d12f1822d38ea6aafc3e0435d9640ca307) by [@NickGerleman](https://github.com/NickGerleman)) +- UI freezing when using minimumFontScale ([79e8474b14](https://github.com/facebook/react-native/commit/79e8474b14e118daa0f6e525d6546892a09a09a3) by [@g4rb4g3](https://github.com/g4rb4g3)) +- Fixed ScrollView momentum not stopping when calling scrollToEnd programmatically ([2f86aafdfd](https://github.com/facebook/react-native/commit/2f86aafdfd42764b25d2e9bd68a05644965b89d7) by [@Almouro](https://github.com/Almouro)) +- Fixed an issue where calling `Accessibility.setAccessibilityFocus` on an unmounted component would crash ([5323221d14](https://github.com/facebook/react-native/commit/5323221d1442d1573bc65daff618478cb6f056f0) by [@Abbondanzo](https://github.com/Abbondanzo)) +- Localize Talkback strings ([a7e5c96a3d](https://github.com/facebook/react-native/commit/a7e5c96a3d11671ed45b5d4f02334e8cc988ce9e) by [@NickGerleman](https://github.com/NickGerleman)) +- Fix border clip check ([7d1f7f3f5f](https://github.com/facebook/react-native/commit/7d1f7f3f5fbc9e659757f17fae98fa8778ffdbb6) by [@gabrieldonadel](https://github.com/gabrieldonadel)) +- Improve threading in enableFabricPendingEventQueue experiment ([318b4c0d4b](https://github.com/facebook/react-native/commit/318b4c0d4b63e0d85b0c6648d4118880524157fc) by [@javache](https://github.com/javache)) +- Change `connectTimeout` to `callTimeout` in OKHttp client ([e00f2445d2](https://github.com/facebook/react-native/commit/e00f2445d223f512aa3a19b82d6eef207f6b14b3) by [@troZee](https://github.com/troZee)) +- Fix a race with FpsView on using FpsDebugFrameCallback. ([a63b443e62](https://github.com/facebook/react-native/commit/a63b443e62aac6ad0c6745fb01a38cc49b88778d)) +- Fix crash in CompositeTurboModuleManagerDelegate ([e716459d66](https://github.com/facebook/react-native/commit/e716459d66dade54e96f1dba11e4d3d179cf678c) by [@christophpurrer](https://github.com/christophpurrer)) +- Fix race condition with ReactMarker calls to its native module ([6ab062dfec](https://github.com/facebook/react-native/commit/6ab062dfec990ec4915b2ca4514fbddff9bbd9a3)) +- Generalize RTL Scroll Correction Logic ([30c7e9dfa4](https://github.com/facebook/react-native/commit/30c7e9dfa41348e96e946384c76f038ccd859896) by [@NickGerleman](https://github.com/NickGerleman)) +- Fix letters duplication when using autoCapitalize ([ab3c00de2c](https://github.com/facebook/react-native/commit/ab3c00de2ca1cff959c724c09f7f61c3706b2904) by [@fknives](https://github.com/fknives)) +- Fix ScrollView's onMomentumScrollEnd being called multiple times on Android ([06668fcbac](https://github.com/facebook/react-native/commit/06668fcbacd750771f1d53cce829dc55e86f3f3c) by [@AntoineDoubovetzky](https://github.com/AntoineDoubovetzky)) +- ANR when having an inverted `FlatList` on android API 33+ ([90186cd9b7](https://github.com/facebook/react-native/commit/90186cd9b71bc6ffb593448c9bb5a3df66b3a0c6) by [@hannojg](https://github.com/hannojg)) +- Surfaces in the new architecture no longer leak views once stopped ([c16e993bb8](https://github.com/facebook/react-native/commit/c16e993bb8417da9a4ff9e082a77a21688d75bac) by [@javache](https://github.com/javache)) +- Support Android Transitions during Fragment navigation ([187f16ddc6](https://github.com/facebook/react-native/commit/187f16ddc66493c3046ceffed69e21c646dfa7b1) by [@grahammendick](https://github.com/grahammendick)) +- Foreground ripple crashed on api < 23 ([ca65d97d60](https://github.com/facebook/react-native/commit/ca65d97d603f0308c18bbee835b7cf6d5f76e232) by [@vonovak](https://github.com/vonovak)) +- Exclude trailing whitespace from newline character on measuring text line width ([2674d9bf7c](https://github.com/facebook/react-native/commit/2674d9bf7c8b9d668d1a4fe072346b0534bb0f1d) by [@bernhardoj](https://github.com/bernhardoj)) +- W3CPointerEvents: include screen coordinates in pointer events ([3460ff5d04](https://github.com/facebook/react-native/commit/3460ff5d0492bb70806afec9c3c0b5edc00a7908)) +- W3CPointerEvents: include modifier key properties in Android pointer events ([2bd4429365](https://github.com/facebook/react-native/commit/2bd4429365c37e9ce70b12ff3f8d9a3c10af2a4b)) +- W3CPointerEvents: fix NPE due to null targetView ([96fd107d61](https://github.com/facebook/react-native/commit/96fd107d61da9b195928a2a6cfdc39fc095767b4)) +- W3CPointerEvents: fix a case where cancel can cause NPE ([79ae710cc5](https://github.com/facebook/react-native/commit/79ae710cc54b5872ad4a41e67e3cd9b73b20ff5b)) +- W3CPointerEvents: properly update hit path during native gestures ([396cdac629](https://github.com/facebook/react-native/commit/396cdac629594955ad37806464e41607fb59db48)) +- Fixing line truncation issue in Text containing /n when numberOfLines = {1} ([0af806e96c](https://github.com/facebook/react-native/commit/0af806e96c20c826f5a4bd55a3f73f512d6bb5af)) +- Fix ellipsis being cut on certain font sizes ([6d24ee13a4](https://github.com/facebook/react-native/commit/6d24ee13a47a58ff1b19c5a51f39f52c9a4a8a28) by [@BeeMargarida](https://github.com/BeeMargarida)) +- Fix links hidden via ellipsis crashing screen readers ([d54f486fe6](https://github.com/facebook/react-native/commit/d54f486fe66d01450d3c7a04fb0a025319a3014c) by [@dhleong](https://github.com/dhleong)) +- Fixed inconsistent styling for text nodes with many children ([dcb4eb050a](https://github.com/facebook/react-native/commit/dcb4eb050a900b21737b649dad3037b25d51fe5f) by [@cubuspl42](https://github.com/cubuspl42)) +- Fix copy / paste menu and simplify controlled text selection on Android ([d4f6cf1d80](https://github.com/facebook/react-native/commit/d4f6cf1d80b6ee725b81d9fdccc263d193178249) by [@janicduplessis](https://github.com/janicduplessis)) +- When applications reload, the previous react root will be correctly closed ([3a7555fb18](https://github.com/facebook/react-native/commit/3a7555fb18b47f64986e411e43a3cd48154a50e3) by [@javache](https://github.com/javache)) +- ViewManagers now receive an invalidate callback ([c5e7cd4ad9](https://github.com/facebook/react-native/commit/c5e7cd4ad96f468e9c5e2966e5fa5d599daa3e00) by [@javache](https://github.com/javache)) +- Fixed nightly builds of Android no longer building due to a recent version format change ([cceef57be1](https://github.com/facebook/react-native/commit/cceef57be1fca661c10955ecec088ce1ef7aab91) by [@tido64](https://github.com/tido64)) +- Fix unreadable dev menu header on dark theme apps ([88e3130218](https://github.com/facebook/react-native/commit/88e313021808b50f378ea6ddf2a9909d82ed5f57) by [@cortinico](https://github.com/cortinico)) +- Modify ViewManager.receiveCommand to call into delegate ([585057d746](https://github.com/facebook/react-native/commit/585057d7468b5ae8844fa8210df7ad1f8e0ae1e8) by [@genkikondo](https://github.com/genkikondo)) +- Fix crash when Android requests permission with activity that does not implement `PermissionAwareActivity` ([cff4bc8eea](https://github.com/facebook/react-native/commit/cff4bc8eead129738a7040f579a18e3819d28bfd) by [@yungsters](https://github.com/yungsters)) +- Fix issue downloading request body via remote URL ([4b39f44a61](https://github.com/facebook/react-native/commit/4b39f44a612e8f358b7f51cdb97b4d602207a754) by [@daisy1754](https://github.com/daisy1754)) +- Fix textTransform not working in New Architecture ([a2f3fa65bc](https://github.com/facebook/react-native/commit/a2f3fa65bcabf8bb711813292002270481840579) by [@tarunrajput](https://github.com/tarunrajput)) +- Fix projects being broken on dependencies starting with `a..` ([5ec2c01697](https://github.com/facebook/react-native/commit/5ec2c016972400cf6e26d987acec6feee46ba6e6) by [@cortinico](https://github.com/cortinico)) +- Fix android root view group removal during instance re-creation ([bb075d785d](https://github.com/facebook/react-native/commit/bb075d785deb3732689bf6aacdc5247187e81391) by [@wschurman](https://github.com/wschurman)) + +#### iOS specific + +- Fix TextInput vertical alignment issue when using lineHeight prop on iOS (Paper - old arch) ([35a1648d0c](https://github.com/facebook/react-native/commit/35a1648d0c93ef2db1de6b8dbe7fc1d997c24039) by [@fabriziobertoglio1987](https://github.com/fabriziobertoglio1987)) +- Announce checkbox and radio button roles on VoiceOver ([12f4a19306](https://github.com/facebook/react-native/commit/12f4a19306b9d4f77c1b5493159de99f897b1862) by [@carmenvkrol](https://github.com/carmenvkrol)) +- Localize Voiceover strings in Paper ([0e99b19257](https://github.com/facebook/react-native/commit/0e99b192577d1ac5c73fdc55902fea1d79d247b7) by [@NickGerleman](https://github.com/NickGerleman)) +- Re-enable direct debugging with JSC on iOS 16.4+ ([5cf8f43ab1](https://github.com/facebook/react-native/commit/5cf8f43ab182781ea82e88077df425c3efbfc21f) by [@Saadnajmi](https://github.com/Saadnajmi)) +- Fixed window.requestIdleCallback not firing on iOS ([72abed2c96](https://github.com/facebook/react-native/commit/72abed2c96d65769567e2b7e492764c1a58e6e81) by [@matt-oakes](https://github.com/matt-oakes)) +- Adapt iOS16+ dictation judge condition ([e8b4bb0684](https://github.com/facebook/react-native/commit/e8b4bb0684eed2acdb4648205893ee372f7ac1c7) by [@hellohublot](https://github.com/hellohublot)) +- Dimensions could be reported incorrectly when resizing iPad or macOS apps ([61861d21ff](https://github.com/facebook/react-native/commit/61861d21ff71a9451019e0f98e0c0414cf12c153) by [@jpdriver](https://github.com/jpdriver)) +- Include `accessibilityValue` prop values in `accessibilityValue` ([0c25f19d39](https://github.com/facebook/react-native/commit/0c25f19d3944e866fcbb6a09da6a55878f739742) by [@carmenvkrol](https://github.com/carmenvkrol)) +- Don't send the `RCTUserInterfaceStyleDidChangeNotification` when the app is in the background. ([6118aff69d](https://github.com/facebook/react-native/commit/6118aff69d69dce557b1c9d217c538f5670afed1) by [@alanjhughes](https://github.com/alanjhughes)) +- Rotation transforms are no longer clipped when zIndex is applied ([850349b1d2](https://github.com/facebook/react-native/commit/850349b1d274f0cc2595eee2f6bb361a958bb2e2) by [@javache](https://github.com/javache)) +- Fix the default trait collection to always return the value of the window ([94fea182d6](https://github.com/facebook/react-native/commit/94fea182d6cf19e96a8a87760017bd69ad0a9e0c) by [@alanjhughes](https://github.com/alanjhughes)) +- Fix Alert userInterfaceStyle having no effect ([0e150d071e](https://github.com/facebook/react-native/commit/0e150d071e66368e134566697f0f9d99c64d35c4) by [@zhongwuzw](https://github.com/zhongwuzw)) +- Properly escape URLs ([5e983d51d8](https://github.com/facebook/react-native/commit/5e983d51d8bc2abded5659a77808542c6dc1377a) by [@cipolleschi](https://github.com/cipolleschi)) +- Handle doulbe `#` and partially escaped urls ([2b4e1f5ece](https://github.com/facebook/react-native/commit/2b4e1f5ece7d160935b19d4862af8706a44cee59) by [@cipolleschi](https://github.com/cipolleschi)) +- RNTester's PROJECT_ROOT points to `packages/rn-tester` ([cd30bc3888](https://github.com/facebook/react-native/commit/cd30bc3888bac500e9ecc7e9be051d0bc3659c2f) by [@dmytrorykun](https://github.com/dmytrorykun)) +- Fix inverted `contentOffset` in scroll events in RTL ([4f8a8ce316](https://github.com/facebook/react-native/commit/4f8a8ce316494db99b19f6c8db6b0c1e7b6500d9) by [@NickGerleman](https://github.com/NickGerleman)) +- Fix bad comparison in RCTScrollViewComponentView RTL ([65b7680720](https://github.com/facebook/react-native/commit/65b7680720435c0d864df9c121c151b60bee08ad) by [@NickGerleman](https://github.com/NickGerleman)) +- Use `addEntriesFromDictionary` properly in RCTBaseTextInputView. ([e6dd22c628](https://github.com/facebook/react-native/commit/e6dd22c628c3bf1b16bb319694a0dddcedb0dd7a) by [@cipolleschi](https://github.com/cipolleschi)) +- Change the top of perf monitor component. ([5ba8de05b5](https://github.com/facebook/react-native/commit/5ba8de05b5e6c170b84b44979e7bbc576442eafb) by [@zerosrat](https://github.com/zerosrat)) +- Only modify EXCLUDED_ARCHS when needed for Hermes ([ee1cd13db6](https://github.com/facebook/react-native/commit/ee1cd13db6ba7d0eae315c296bac5ba2a58cdde3) by [@jpdriver](https://github.com/jpdriver)) +- Fix `use_react_native` to support custom react native absolute paths ([835f62c189](https://github.com/facebook/react-native/commit/835f62c189a76cf05a444f35d0215f51e1e155d8) by [@gabrieldonadel](https://github.com/gabrieldonadel)) +- UIApplicationDidReceiveMemoryWarningNotification has not been obeyed on iOS since RN 0.69 ([8f072b438a](https://github.com/facebook/react-native/commit/8f072b438a81293da026f0284dac8ddc7be35382) by [@liamjones](https://github.com/liamjones)) +- Debug builds from cli disable idle to stop application going into background ([41d5f4bce2](https://github.com/facebook/react-native/commit/41d5f4bce2850d3a81c0c02961c0768026dd353e) by [@blakef](https://github.com/blakef)) +- Fix RCTImageBlurUtils.m Greyscale Crash ([d6c4f2786c](https://github.com/facebook/react-native/commit/d6c4f2786c1dd8285dbabb7fe872a7d1bddcbe14) by [@OskarEichler](https://github.com/OskarEichler)) +- Logbox footer buttons respect safe area ([6d6b1fdc75](https://github.com/facebook/react-native/commit/6d6b1fdc75d870fa73abc6ee9bf0099f3f15e658) by [@philipheinser](https://github.com/philipheinser)) +- Add support for Components with custom names in the interop layer. ([daedbe6e3e](https://github.com/facebook/react-native/commit/daedbe6e3e4cb4b5fde533bf8205edd89a18c480) by [@cipolleschi](https://github.com/cipolleschi)) +- FP Tolerance in iOS Paper SafeAreaView debouncing ([c9c5651108](https://github.com/facebook/react-native/commit/c9c56511087d6e33bd4d2e86cbc1a76fc99ec8df) by [@NickGerleman](https://github.com/NickGerleman)) +- RNTester-ios / RCTAppDelegate > correctly check for USE_HERMES Flag ([e364553492](https://github.com/facebook/react-native/commit/e3645534920e509f1344e6f83916fcd61723403b) by [@christophpurrer](https://github.com/christophpurrer)) +- Exclude JSI headers when using hermes-engine prebuilt. ([5029cef0a9](https://github.com/facebook/react-native/commit/5029cef0a99469e37bc2f4d72ca2e1f3d6791511) by [@dmytrorykun](https://github.com/dmytrorykun)) +- Purge children from view registry on `RCTUIManager` invalidation. ([bc63e44b23](https://github.com/facebook/react-native/commit/bc63e44b23baddf579d8e42b70af0473314f8e48) by [@kkafar](https://github.com/kkafar)) +- Fix React-ImageManager dependencies ([830c2e7c57](https://github.com/facebook/react-native/commit/830c2e7c571650f49b645e7f9f9445a021e8a0a2) by [@cipolleschi](https://github.com/cipolleschi)) + +## v0.72.8 + +### Fixed + +- Fix `build_codegen!` not finding `@react-native/codegen` in pnpm setups ([e70166a3a8](https://github.com/facebook/react-native/commit/e70166a3a8b9ddf1a7e322db602c548aaa60102d) by [@tido64](https://github.com/tido64)) +- Correctly declare runtime dependencies ([df2bbba50b](https://github.com/facebook/react-native/commit/df2bbba50bf1484edf88079b965b8841fc7849a8) by [@tido64](https://github.com/tido64)) +- Prevent LogBox from crashing on very long messages ([c3c6cf4](https://github.com/facebook/react-native/commit/c3c6cf4646999e9bf971d2c0e63c41e550069f25) by [@motiz88](https://github.com/motiz88)) + +## v0.72.7 + +### Changed + +- Bump CLI to v11.3.10 ([e844a62ce9](https://github.com/facebook/react-native/commit/e844a62ce9e6ae70bbeba895dcf902287570f462) by [@szymonrybczak](https://github.com/szymonrybczak)) + +### Deprecated + +- Bump deprecated-react-native-prop-types to ^4.2.3 ([e031c05cdc](https://github.com/facebook/react-native/commit/e031c05cdc5650f17231caf7f60820e1df744788) by [@huntie](https://github.com/huntie)) + +### Fixed + +- Show correct stack frame on unhandled promise rejections on development mode. + ([18c9797ecc](https://github.com/facebook/react-native/commit/18c9797ecc8dab220ec68aae011ddb73db17a99d) by [@fortmarek](https://github.com/fortmarek)) + +#### Android specific + +- Fix android crash when apply PlatformColor to borders ([265af222aa](https://github.com/facebook/react-native/commit/265af222aa8acb3b514e22a7db191d66755f553b) by [@axinvd](https://github.com/axinvd)) +- Fix broken Loading/Refreshing indicator on Android ([5dedf277cb](https://github.com/facebook/react-native/commit/5dedf277cb903528659f0d8a71412274d9d32a65) by [@cortinico](https://github.com/cortinico)) + +## v0.72.6 + +### Fixed + +- Fix a potential bug in `EventEmitter` when used with certain Babel configurations that incorrectly polyfill the spread operator for iterables ([9b3bd63723](https://github.com/facebook/react-native/commit/9b3bd637231e5e9e7d8b729c71842f3b7a2da373) by [@yungsters](https://github.com/yungsters)) + +#### iOS specific + +- Set the max version of Active support to 7.0.8 ([785f91b67a](https://github.com/facebook/react-native/commit/785f91b67a5d97e4e54d341279c878483a3d9a11) by [@cipolleschi](https://github.com/cipolleschi)) + ## v0.72.5 ### Changed @@ -468,6 +991,53 @@ This file contains all changelogs for latest releases, from 0.70.0 onward. Pleas - Enable Address and Undefined Behavior Sanitizers on RNTester ([65e61f3c88](https://github.com/facebook/react-native/commit/65e61f3c88388d4a2ed88bcc9a2cb5ba63fd8afa) by [@Saadnajmi](https://github.com/Saadnajmi)) +## v0.71.16 + +### Changed + +#### Android specific + +- Cherry-picking 'Call super.onRequestPermissionsResult in ReactActivity (#42478)' onto 0.71 ([8593306b34](https://github.com/facebook/react-native/commit/8593306b348da498f18984985bc70e3e32156655) by [@LimAlbert](https://github.com/LimAlbert)) + +### Fixed + +- Symbolication stack fix (0.71.x) ([022a9f7835](https://github.com/facebook/react-native/commit/022a9f783561750be0f5c0e685d2ace8dd84d910) by [@joe-sam](https://github.com/joe-sam)) + +#### iOS specific + +- Fix path to build-apple-framework ([9d6a740bf7](https://github.com/facebook/react-native/commit/9d6a740bf7620a3c66f241351b4885f09b4e7524) by [@hurali97](https://github.com/hurali97)) +- Disable bitcode for Hermes ([d6fe029858](https://github.com/facebook/react-native/commit/d6fe02985849ba4712968b5811eeaf460640f85d) by [@hurali97](https://github.com/hurali97)) +- Fix symbol not found _jump_fcontext with use_frameworks! ([bb592ef0dd](https://github.com/facebook/react-native/commit/bb592ef0dda30c7652b23b45843f636c6439278d) by [@hurali97](https://github.com/hurali97)) +- Fix flags ([c38cdb60ca](https://github.com/facebook/react-native/commit/c38cdb60cad8fb6b0015e5d57afa4dd346fd71d2) by [@cipolleschi](https://github.com/cipolleschi)) + +## v0.71.15 + +### Fixed + +#### Android specific +- Fix Android crash when apply PlatformColor to borders ([265af222aa](https://github.com/facebook/react-native/commit/265af222aa8acb3b514e22a7db191d66755f553b) by [@axinvd](https://github.com/axinvd)) +- Fixed crash occurring in certain native views when keyboard events are fired. ([9497203957](https://github.com/facebook/react-native/commit/94972039571e1f3b387e0f63227a6ad13740eaf3) by [@kot331107](https://github.com/kot331107)) + +#### iOS specific + +- Migrate away from JFrog to download boost ([ab19fd6aef](https://github.com/facebook/react-native/commit/ab19fd6aef43a739f78cf62155fec59d95f577d3) by [@cipolleschi](https://github.com/cipolleschi)) +- Fix overriding `EXCLUDED_ARCHS` when installing Hermes on RN v0.71 ([16a605b6a3](https://github.com/facebook/react-native/commit/16a605b6a3c320f93b6cda9198d738672086e851) by [@ken0nek](https://github.com/ken0nek)) + +### Changed + +- Update node installation on debian (0.71) ([bdc0ef3466](https://github.com/facebook/react-native/commit/bdc0ef34664b7f1a2b8598ad6092a2ec6cf089ce) by [@cipolleschi](https://github.com/cipolleschi)) +- Bump cli to 10.2.6 ([0bc2dd03c1](https://github.com/facebook/react-native/commit/0bc2dd03c1ccb4ab6ecf55add249f222c5757f06) by [@hurali97](https://github.com/hurali97)) +- Fix version of react-native-codegen ([c74602fe47](https://github.com/facebook/react-native/commit/c74602fe47ca12a151eb173203fb6fce7f3cc964) by [@lunaleaps](https://github.com/lunaleaps)) + +## v0.71.14 + +### Fixed + +#### iOS specific + +- Set the max version of Active support to 7.0.8 ([ce39931bc2](https://github.com/facebook/react-native/commit/ce39931bc2b02f13cbc5751ba4d4a6dbc07bc91a) by [@cipolleschi](https://github.com/cipolleschi)) +- Xcode 15 patch ([287482e57f](https://github.com/facebook/react-native/commit/287482e57ffd221227e6fffb6852113d330260a1) by [@fortmarek](https://github.com/fortmarek)) + ## v0.71.13 ### Added @@ -1148,6 +1718,33 @@ Read the [announcement blogpost here](https://reactnative.dev/blog/2023/01/12/ve - Bump terser minor version to mitigate CVE-2022-25858 ([743f9ff63b](https://github.com/facebook/react-native/commit/743f9ff63bf1e3825a1788978a9f6bad8ebddc0d) by [@GijsWeterings](https://github.com/GijsWeterings)) +## v0.70.15 + +### Changed + +- BUMP CLI to v9.3.5 ([cb170efdd3](https://github.com/facebook/react-native/commit/cb170efdd346776aa6941512e1c23eb11c3f0a3a) by [@hurali97](https://github.com/hurali97)) +- Bump react-devtools-core to 4.27.7 ([abb4a2bddd](https://github.com/facebook/react-native/commit/abb4a2bdddbc904b4b3ff185e41c2dddb5ba684b) by [@lunaleaps](https://github.com/lunaleaps)) +- Bump hermes-engine ([5b95254359](https://github.com/facebook/react-native/commit/5b95254359da9813ce8eba5571b9abf6a5fcb21c) by [@cipolleschi](https://github.com/cipolleschi)) + +### Fixed + +#### iOS specific + +- Migrate boost download url away from JFrog ([e8e059a977](https://github.com/facebook/react-native/commit/e8e059a977ef2feec1b4b9dfd2866daede2b8ff8) by [@cipolleschi](https://github.com/cipolleschi)) + +## v0.70.14 + +### Changed +- Update JSCodeshift to 0.14 ([5a695dd](https://github.com/facebook/react-native/commit/5a695dd17c5681883018ba8d3c3608032aba14d9) by [@stianjensen](https://github.com/stianjensen)) + +### Fixed + +#### iOS specific + +- Fix Gemfile to set the max version of Active support to 7.0.8 ([a1a220b](https://github.com/facebook/react-native/commit/a1a220b6ace4e35b2cda45b869dc0ff4fb8fbdc1) by [@cipolleschi](https://github.com/cipolleschi)) +- Update Xcode 15 patches to be more robust ([735d06c01f](https://github.com/facebook/react-native/commit/735d06c01fe743fad58213e80bca64a0c70ea8ca) by [@cipolleschi](https://github.com/cipolleschi)) +- Make Hermes build properly with Xcode 15 ([5f4a091](https://github.com/facebook/react-native/commit/5f4a091a2ff86bcbcfa6f8fe438d260cca029cd3) by [@cipolleschi](https://github.com/cipolleschi)) + ## v0.70.13 ### Fixed diff --git a/Gemfile b/Gemfile index faa58ba5d928..8e468b2c4e66 100644 --- a/Gemfile +++ b/Gemfile @@ -3,5 +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 'activesupport', '>= 6.1.7.3' +gem 'cocoapods', '~> 1.13' +gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' diff --git a/Gemfile.lock b/Gemfile.lock index 20c085c27f8f..9ec5569aaf6e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,25 +3,24 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (6.1.7.3) + activesupport (7.0.8) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.1) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) claide (1.1.0) - cocoapods (1.12.0) + cocoapods (1.14.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.12.0) + cocoapods-core (= 1.14.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.6.0, < 2.0) + cocoapods-downloader (>= 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-trunk (>= 1.6.0, < 2.0) @@ -33,8 +32,8 @@ GEM molinillo (~> 0.8.0) nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.12.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.14.2) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -45,7 +44,7 @@ GEM public_suffix (~> 4.0) typhoeus (~> 1.0) cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.6.3) + cocoapods-downloader (2.0) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.1) @@ -58,44 +57,43 @@ GEM escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) - ffi (1.15.5) + ffi (1.16.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) json (2.6.3) - minitest (5.18.0) + minitest (5.20.0) molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) public_suffix (4.0.7) - rexml (3.2.5) + rexml (3.2.6) ruby-macho (2.5.1) typhoeus (1.4.0) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.22.0) + xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) - zeitwerk (2.6.7) PLATFORMS ruby DEPENDENCIES - activesupport (>= 6.1.7.3) - cocoapods (~> 1.12) + activesupport (>= 6.1.7.5, < 7.1.0) + cocoapods (~> 1.13) RUBY VERSION ruby 3.2.0p0 BUNDLED WITH - 2.4.7 + 2.4.12 diff --git a/README.md b/README.md index a99a5c75c20e..4d8883c511c6 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ React Native is developed and supported by many companies and individual core co ## 📋 Requirements -React Native apps may target iOS 13.4 and Android 5.0 (API 21) or newer. You may use Windows, macOS, or Linux as your development operating system, though building and running iOS apps is limited to macOS. Tools like [Expo](https://expo.dev) can be used to work around this. +React Native apps may target iOS 13.4 and Android 6.0 (API 23) or newer. You may use Windows, macOS, or Linux as your development operating system, though building and running iOS apps is limited to macOS. Tools like [Expo](https://expo.dev) can be used to work around this. ## 🎉 Building your first React Native app diff --git a/build.gradle.kts b/build.gradle.kts index 982f7bc422e9..e24bf6467328 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,6 +11,7 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.download) apply false alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.binary.compatibility.validator) apply true } val reactAndroidProperties = java.util.Properties() @@ -19,9 +20,23 @@ File("$rootDir/packages/react-native/ReactAndroid/gradle.properties").inputStrea reactAndroidProperties.load(it) } +fun getListReactAndroidProperty(name: String) = reactAndroidProperties.getProperty(name).split(",") + +apiValidation { + ignoredPackages.addAll( + getListReactAndroidProperty("binaryCompatibilityValidator.ignoredPackages")) + ignoredClasses.addAll(getListReactAndroidProperty("binaryCompatibilityValidator.ignoredClasses")) + nonPublicMarkers.addAll( + getListReactAndroidProperty("binaryCompatibilityValidator.nonPublicMarkers")) + validationDisabled = + reactAndroidProperties + .getProperty("binaryCompatibilityValidator.validationDisabled") + ?.toBoolean() == true +} + version = - if (project.hasProperty("isNightly") && - (project.property("isNightly") as? String).toBoolean()) { + if (project.hasProperty("isSnapshot") && + (project.property("isSnapshot") as? String).toBoolean()) { "${reactAndroidProperties.getProperty("VERSION_NAME")}-SNAPSHOT" } else { reactAndroidProperties.getProperty("VERSION_NAME") @@ -30,7 +45,7 @@ version = group = "com.facebook.react" val ndkPath by extra(System.getenv("ANDROID_NDK")) -val ndkVersion by extra(System.getenv("ANDROID_NDK_VERSION") ?: "25.1.8937393") +val ndkVersion by extra(System.getenv("ANDROID_NDK_VERSION") ?: libs.versions.ndkVersion.get()) val sonatypeUsername = findProperty("SONATYPE_USERNAME")?.toString() val sonatypePassword = findProperty("SONATYPE_PASSWORD")?.toString() @@ -74,21 +89,10 @@ tasks.register("build") { dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":build")) } -tasks.register("publishAllInsideNpmPackage") { - description = - "Publish all the artifacts to be available inside the NPM package in the `android` folder." - // Due to size constraints of NPM, we publish only react-native and hermes-engine inside - // the NPM package. - dependsOn(":packages:react-native:ReactAndroid:installArchives") - dependsOn(":packages:react-native:ReactAndroid:hermes-engine:installArchives") -} - tasks.register("publishAllToMavenTempLocal") { description = "Publish all the artifacts to be available inside a Maven Local repository on /tmp." dependsOn(":packages:react-native:ReactAndroid:publishAllPublicationsToMavenTempLocalRepository") // We don't publish the external-artifacts to Maven Local as CircleCI is using it via workspace. - dependsOn( - ":packages:react-native:ReactAndroid:flipper-integration:publishAllPublicationsToMavenTempLocalRepository") dependsOn( ":packages:react-native:ReactAndroid:hermes-engine:publishAllPublicationsToMavenTempLocalRepository") } @@ -97,7 +101,6 @@ tasks.register("publishAllToSonatype") { description = "Publish all the artifacts to Sonatype (Maven Central or Snapshot repository)" dependsOn(":packages:react-native:ReactAndroid:publishToSonatype") dependsOn(":packages:react-native:ReactAndroid:external-artifacts:publishToSonatype") - dependsOn(":packages:react-native:ReactAndroid:flipper-integration:publishToSonatype") dependsOn(":packages:react-native:ReactAndroid:hermes-engine:publishToSonatype") } @@ -106,11 +109,11 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole """ ******************************************************************************** INFO: You're using Hermes from nightly as you set - + react.internal.useHermesNightly=true - + in the ./gradle.properties file. - + That's fine for local development, but you should not commit this change. ******************************************************************************** """ diff --git a/flow-typed/npm/chromium-edge-launcher_v1.x.x.js b/flow-typed/npm/@rnx-kit/chromium-edge-launcher_v1.x.x.js similarity index 96% rename from flow-typed/npm/chromium-edge-launcher_v1.x.x.js rename to flow-typed/npm/@rnx-kit/chromium-edge-launcher_v1.x.x.js index dc3e9962ab83..4ee3ba0d5df3 100644 --- a/flow-typed/npm/chromium-edge-launcher_v1.x.x.js +++ b/flow-typed/npm/@rnx-kit/chromium-edge-launcher_v1.x.x.js @@ -9,7 +9,7 @@ * @oncall react_native */ -declare module 'chromium-edge-launcher' { +declare module '@rnx-kit/chromium-edge-launcher' { import typeof fs from 'fs'; import typeof childProcess from 'child_process'; import type {ChildProcess} from 'child_process'; diff --git a/flow-typed/npm/babel-traverse_v7.x.x.js b/flow-typed/npm/babel-traverse_v7.x.x.js index 2e3520dd23b9..b35fd7863068 100644 --- a/flow-typed/npm/babel-traverse_v7.x.x.js +++ b/flow-typed/npm/babel-traverse_v7.x.x.js @@ -293,9 +293,6 @@ declare module '@babel/traverse' { dereference(): void; } - declare function getNodePathType(node: BabelNode): NodePath<>; - declare function getNodePathType(nodes: Array): Array>; - declare type Opts = {...}; declare export class NodePath<+TNode: BabelNode = BabelNode> { @@ -733,7 +730,7 @@ declare module '@babel/traverse' { get>( key: TKey, context?: boolean | TraversalContext, - ): $Call; + ): TNode[TKey] extends BabelNode ? NodePath<> : Array>; get( key: string, diff --git a/flow-typed/npm/babel-types_v7.x.x.js b/flow-typed/npm/babel-types_v7.x.x.js index 74249fe3c2fd..6f344941bc71 100644 --- a/flow-typed/npm/babel-types_v7.x.x.js +++ b/flow-typed/npm/babel-types_v7.x.x.js @@ -3443,308 +3443,308 @@ declare module "@babel/types" { declare export function tsTypeParameterInstantiation(params: Array): BabelNodeTSTypeParameterInstantiation; declare export function tsTypeParameterDeclaration(params: Array): BabelNodeTSTypeParameterDeclaration; declare export function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name: string): BabelNodeTSTypeParameter; - declare export function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ArrayExpression'); - declare export function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'AssignmentExpression'); - declare export function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BinaryExpression'); - declare export function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'InterpreterDirective'); - declare export function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Directive'); - declare export function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DirectiveLiteral'); - declare export function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BlockStatement'); - declare export function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BreakStatement'); - declare export function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'CallExpression'); - declare export function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'CatchClause'); - declare export function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ConditionalExpression'); - declare export function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ContinueStatement'); - declare export function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DebuggerStatement'); - declare export function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DoWhileStatement'); - declare export function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EmptyStatement'); - declare export function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExpressionStatement'); - declare export function isFile(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'File'); - declare export function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ForInStatement'); - declare export function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ForStatement'); - declare export function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'FunctionDeclaration'); - declare export function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'FunctionExpression'); - declare export function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Identifier'); - declare export function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'IfStatement'); - declare export function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'LabeledStatement'); - declare export function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'StringLiteral'); - declare export function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NumericLiteral'); - declare export function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NullLiteral'); - declare export function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BooleanLiteral'); - declare export function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'RegExpLiteral'); - declare export function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'LogicalExpression'); - declare export function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'MemberExpression'); - declare export function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NewExpression'); - declare export function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Program'); - declare export function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectExpression'); - declare export function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectMethod'); - declare export function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectProperty'); - declare export function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'RestElement'); - declare export function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ReturnStatement'); - declare export function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'SequenceExpression'); - declare export function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ParenthesizedExpression'); - declare export function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'SwitchCase'); - declare export function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'SwitchStatement'); - declare export function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ThisExpression'); - declare export function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ThrowStatement'); - declare export function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TryStatement'); - declare export function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'UnaryExpression'); - declare export function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'UpdateExpression'); - declare export function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'VariableDeclaration'); - declare export function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'VariableDeclarator'); - declare export function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'WhileStatement'); - declare export function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'WithStatement'); - declare export function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'AssignmentPattern'); - declare export function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ArrayPattern'); - declare export function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ArrowFunctionExpression'); - declare export function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassBody'); - declare export function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassExpression'); - declare export function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassDeclaration'); - declare export function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExportAllDeclaration'); - declare export function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExportDefaultDeclaration'); - declare export function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExportNamedDeclaration'); - declare export function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExportSpecifier'); - declare export function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ForOfStatement'); - declare export function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ImportDeclaration'); - declare export function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ImportDefaultSpecifier'); - declare export function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ImportNamespaceSpecifier'); - declare export function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ImportSpecifier'); - declare export function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'MetaProperty'); - declare export function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassMethod'); - declare export function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectPattern'); - declare export function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'SpreadElement'); - declare export function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Super'); - declare export function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TaggedTemplateExpression'); - declare export function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TemplateElement'); - declare export function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TemplateLiteral'); - declare export function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'YieldExpression'); - declare export function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'AwaitExpression'); - declare export function isImport(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Import'); - declare export function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BigIntLiteral'); - declare export function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExportNamespaceSpecifier'); - declare export function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'OptionalMemberExpression'); - declare export function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'OptionalCallExpression'); - declare export function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassProperty'); - declare export function isClassAccessorProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassAccessorProperty'); - declare export function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassPrivateProperty'); - declare export function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassPrivateMethod'); - declare export function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'PrivateName'); - declare export function isStaticBlock(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'StaticBlock'); - declare export function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'AnyTypeAnnotation'); - declare export function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ArrayTypeAnnotation'); - declare export function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BooleanTypeAnnotation'); - declare export function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BooleanLiteralTypeAnnotation'); - declare export function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NullLiteralTypeAnnotation'); - declare export function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ClassImplements'); - declare export function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareClass'); - declare export function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareFunction'); - declare export function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareInterface'); - declare export function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareModule'); - declare export function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareModuleExports'); - declare export function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareTypeAlias'); - declare export function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareOpaqueType'); - declare export function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareVariable'); - declare export function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareExportDeclaration'); - declare export function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclareExportAllDeclaration'); - declare export function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DeclaredPredicate'); - declare export function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExistsTypeAnnotation'); - declare export function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'FunctionTypeAnnotation'); - declare export function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'FunctionTypeParam'); - declare export function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'GenericTypeAnnotation'); - declare export function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'InferredPredicate'); - declare export function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'InterfaceExtends'); - declare export function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'InterfaceDeclaration'); - declare export function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'InterfaceTypeAnnotation'); - declare export function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'IntersectionTypeAnnotation'); - declare export function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'MixedTypeAnnotation'); - declare export function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EmptyTypeAnnotation'); - declare export function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NullableTypeAnnotation'); - declare export function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NumberLiteralTypeAnnotation'); - declare export function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NumberTypeAnnotation'); - declare export function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectTypeAnnotation'); - declare export function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectTypeInternalSlot'); - declare export function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectTypeCallProperty'); - declare export function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectTypeIndexer'); - declare export function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectTypeProperty'); - declare export function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ObjectTypeSpreadProperty'); - declare export function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'OpaqueType'); - declare export function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'QualifiedTypeIdentifier'); - declare export function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'StringLiteralTypeAnnotation'); - declare export function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'StringTypeAnnotation'); - declare export function isSymbolTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'SymbolTypeAnnotation'); - declare export function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ThisTypeAnnotation'); - declare export function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TupleTypeAnnotation'); - declare export function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TypeofTypeAnnotation'); - declare export function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TypeAlias'); - declare export function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TypeAnnotation'); - declare export function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TypeCastExpression'); - declare export function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TypeParameter'); - declare export function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TypeParameterDeclaration'); - declare export function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TypeParameterInstantiation'); - declare export function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'UnionTypeAnnotation'); - declare export function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Variance'); - declare export function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'VoidTypeAnnotation'); - declare export function isEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumDeclaration'); - declare export function isEnumBooleanBody(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumBooleanBody'); - declare export function isEnumNumberBody(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumNumberBody'); - declare export function isEnumStringBody(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumStringBody'); - declare export function isEnumSymbolBody(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumSymbolBody'); - declare export function isEnumBooleanMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumBooleanMember'); - declare export function isEnumNumberMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumNumberMember'); - declare export function isEnumStringMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumStringMember'); - declare export function isEnumDefaultedMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'EnumDefaultedMember'); - declare export function isIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'IndexedAccessType'); - declare export function isOptionalIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'OptionalIndexedAccessType'); - declare export function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXAttribute'); - declare export function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXClosingElement'); - declare export function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXElement'); - declare export function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXEmptyExpression'); - declare export function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXExpressionContainer'); - declare export function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXSpreadChild'); - declare export function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXIdentifier'); - declare export function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXMemberExpression'); - declare export function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXNamespacedName'); - declare export function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXOpeningElement'); - declare export function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXSpreadAttribute'); - declare export function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXText'); - declare export function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXFragment'); - declare export function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXOpeningFragment'); - declare export function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'JSXClosingFragment'); - declare export function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Noop'); - declare export function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Placeholder'); - declare export function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'V8IntrinsicIdentifier'); - declare export function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ArgumentPlaceholder'); - declare export function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'BindExpression'); - declare export function isImportAttribute(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ImportAttribute'); - declare export function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'Decorator'); - declare export function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DoExpression'); - declare export function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ExportDefaultSpecifier'); - declare export function isRecordExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'RecordExpression'); - declare export function isTupleExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TupleExpression'); - declare export function isDecimalLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'DecimalLiteral'); - declare export function isModuleExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'ModuleExpression'); - declare export function isTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TopicReference'); - declare export function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'PipelineTopicExpression'); - declare export function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'PipelineBareFunction'); - declare export function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'PipelinePrimaryTopicReference'); - declare export function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSParameterProperty'); - declare export function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSDeclareFunction'); - declare export function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSDeclareMethod'); - declare export function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSQualifiedName'); - declare export function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSCallSignatureDeclaration'); - declare export function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSConstructSignatureDeclaration'); - declare export function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSPropertySignature'); - declare export function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSMethodSignature'); - declare export function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSIndexSignature'); - declare export function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSAnyKeyword'); - declare export function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSBooleanKeyword'); - declare export function isTSBigIntKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSBigIntKeyword'); - declare export function isTSIntrinsicKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSIntrinsicKeyword'); - declare export function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSNeverKeyword'); - declare export function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSNullKeyword'); - declare export function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSNumberKeyword'); - declare export function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSObjectKeyword'); - declare export function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSStringKeyword'); - declare export function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSSymbolKeyword'); - declare export function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSUndefinedKeyword'); - declare export function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSUnknownKeyword'); - declare export function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSVoidKeyword'); - declare export function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSThisType'); - declare export function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSFunctionType'); - declare export function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSConstructorType'); - declare export function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeReference'); - declare export function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypePredicate'); - declare export function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeQuery'); - declare export function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeLiteral'); - declare export function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSArrayType'); - declare export function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTupleType'); - declare export function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSOptionalType'); - declare export function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSRestType'); - declare export function isTSNamedTupleMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSNamedTupleMember'); - declare export function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSUnionType'); - declare export function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSIntersectionType'); - declare export function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSConditionalType'); - declare export function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSInferType'); - declare export function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSParenthesizedType'); - declare export function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeOperator'); - declare export function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSIndexedAccessType'); - declare export function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSMappedType'); - declare export function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSLiteralType'); - declare export function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSExpressionWithTypeArguments'); - declare export function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSInterfaceDeclaration'); - declare export function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSInterfaceBody'); - declare export function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeAliasDeclaration'); - declare export function isTSInstantiationExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSInstantiationExpression'); - declare export function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSAsExpression'); - declare export function isTSSatisfiesExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSSatisfiesExpression'); - declare export function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeAssertion'); - declare export function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSEnumDeclaration'); - declare export function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSEnumMember'); - declare export function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSModuleDeclaration'); - declare export function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSModuleBlock'); - declare export function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSImportType'); - declare export function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSImportEqualsDeclaration'); - declare export function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSExternalModuleReference'); - declare export function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSNonNullExpression'); - declare export function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSExportAssignment'); - declare export function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSNamespaceExportDeclaration'); - declare export function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeAnnotation'); - declare export function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeParameterInstantiation'); - declare export function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeParameterDeclaration'); - declare export function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'TSTypeParameter'); - declare export function isStandardized(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ArrayExpression' || node.type === 'AssignmentExpression' || node.type === 'BinaryExpression' || node.type === 'InterpreterDirective' || node.type === 'Directive' || node.type === 'DirectiveLiteral' || node.type === 'BlockStatement' || node.type === 'BreakStatement' || node.type === 'CallExpression' || node.type === 'CatchClause' || node.type === 'ConditionalExpression' || node.type === 'ContinueStatement' || node.type === 'DebuggerStatement' || node.type === 'DoWhileStatement' || node.type === 'EmptyStatement' || node.type === 'ExpressionStatement' || node.type === 'File' || node.type === 'ForInStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'Identifier' || node.type === 'IfStatement' || node.type === 'LabeledStatement' || node.type === 'StringLiteral' || node.type === 'NumericLiteral' || node.type === 'NullLiteral' || node.type === 'BooleanLiteral' || node.type === 'RegExpLiteral' || node.type === 'LogicalExpression' || node.type === 'MemberExpression' || node.type === 'NewExpression' || node.type === 'Program' || node.type === 'ObjectExpression' || node.type === 'ObjectMethod' || node.type === 'ObjectProperty' || node.type === 'RestElement' || node.type === 'ReturnStatement' || node.type === 'SequenceExpression' || node.type === 'ParenthesizedExpression' || node.type === 'SwitchCase' || node.type === 'SwitchStatement' || node.type === 'ThisExpression' || node.type === 'ThrowStatement' || node.type === 'TryStatement' || node.type === 'UnaryExpression' || node.type === 'UpdateExpression' || node.type === 'VariableDeclaration' || node.type === 'VariableDeclarator' || node.type === 'WhileStatement' || node.type === 'WithStatement' || node.type === 'AssignmentPattern' || node.type === 'ArrayPattern' || node.type === 'ArrowFunctionExpression' || node.type === 'ClassBody' || node.type === 'ClassExpression' || node.type === 'ClassDeclaration' || node.type === 'ExportAllDeclaration' || node.type === 'ExportDefaultDeclaration' || node.type === 'ExportNamedDeclaration' || node.type === 'ExportSpecifier' || node.type === 'ForOfStatement' || node.type === 'ImportDeclaration' || node.type === 'ImportDefaultSpecifier' || node.type === 'ImportNamespaceSpecifier' || node.type === 'ImportSpecifier' || node.type === 'MetaProperty' || node.type === 'ClassMethod' || node.type === 'ObjectPattern' || node.type === 'SpreadElement' || node.type === 'Super' || node.type === 'TaggedTemplateExpression' || node.type === 'TemplateElement' || node.type === 'TemplateLiteral' || node.type === 'YieldExpression' || node.type === 'AwaitExpression' || node.type === 'Import' || node.type === 'BigIntLiteral' || node.type === 'ExportNamespaceSpecifier' || node.type === 'OptionalMemberExpression' || node.type === 'OptionalCallExpression' || node.type === 'ClassProperty' || node.type === 'ClassAccessorProperty' || node.type === 'ClassPrivateProperty' || node.type === 'ClassPrivateMethod' || node.type === 'PrivateName' || node.type === 'StaticBlock')); - declare export function isExpression(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ArrayExpression' || node.type === 'AssignmentExpression' || node.type === 'BinaryExpression' || node.type === 'CallExpression' || node.type === 'ConditionalExpression' || node.type === 'FunctionExpression' || node.type === 'Identifier' || node.type === 'StringLiteral' || node.type === 'NumericLiteral' || node.type === 'NullLiteral' || node.type === 'BooleanLiteral' || node.type === 'RegExpLiteral' || node.type === 'LogicalExpression' || node.type === 'MemberExpression' || node.type === 'NewExpression' || node.type === 'ObjectExpression' || node.type === 'SequenceExpression' || node.type === 'ParenthesizedExpression' || node.type === 'ThisExpression' || node.type === 'UnaryExpression' || node.type === 'UpdateExpression' || node.type === 'ArrowFunctionExpression' || node.type === 'ClassExpression' || node.type === 'MetaProperty' || node.type === 'Super' || node.type === 'TaggedTemplateExpression' || node.type === 'TemplateLiteral' || node.type === 'YieldExpression' || node.type === 'AwaitExpression' || node.type === 'Import' || node.type === 'BigIntLiteral' || node.type === 'OptionalMemberExpression' || node.type === 'OptionalCallExpression' || node.type === 'TypeCastExpression' || node.type === 'JSXElement' || node.type === 'JSXFragment' || node.type === 'BindExpression' || node.type === 'DoExpression' || node.type === 'RecordExpression' || node.type === 'TupleExpression' || node.type === 'DecimalLiteral' || node.type === 'ModuleExpression' || node.type === 'TopicReference' || node.type === 'PipelineTopicExpression' || node.type === 'PipelineBareFunction' || node.type === 'PipelinePrimaryTopicReference' || node.type === 'TSInstantiationExpression' || node.type === 'TSAsExpression' || node.type === 'TSSatisfiesExpression' || node.type === 'TSTypeAssertion' || node.type === 'TSNonNullExpression')); - declare export function isBinary(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'BinaryExpression' || node.type === 'LogicalExpression')); - declare export function isScopable(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'BlockStatement' || node.type === 'CatchClause' || node.type === 'DoWhileStatement' || node.type === 'ForInStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'Program' || node.type === 'ObjectMethod' || node.type === 'SwitchStatement' || node.type === 'WhileStatement' || node.type === 'ArrowFunctionExpression' || node.type === 'ClassExpression' || node.type === 'ClassDeclaration' || node.type === 'ForOfStatement' || node.type === 'ClassMethod' || node.type === 'ClassPrivateMethod' || node.type === 'StaticBlock' || node.type === 'TSModuleBlock')); - declare export function isBlockParent(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'BlockStatement' || node.type === 'CatchClause' || node.type === 'DoWhileStatement' || node.type === 'ForInStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'Program' || node.type === 'ObjectMethod' || node.type === 'SwitchStatement' || node.type === 'WhileStatement' || node.type === 'ArrowFunctionExpression' || node.type === 'ForOfStatement' || node.type === 'ClassMethod' || node.type === 'ClassPrivateMethod' || node.type === 'StaticBlock' || node.type === 'TSModuleBlock')); - declare export function isBlock(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'BlockStatement' || node.type === 'Program' || node.type === 'TSModuleBlock')); - declare export function isStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'BlockStatement' || node.type === 'BreakStatement' || node.type === 'ContinueStatement' || node.type === 'DebuggerStatement' || node.type === 'DoWhileStatement' || node.type === 'EmptyStatement' || node.type === 'ExpressionStatement' || node.type === 'ForInStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'IfStatement' || node.type === 'LabeledStatement' || node.type === 'ReturnStatement' || node.type === 'SwitchStatement' || node.type === 'ThrowStatement' || node.type === 'TryStatement' || node.type === 'VariableDeclaration' || node.type === 'WhileStatement' || node.type === 'WithStatement' || node.type === 'ClassDeclaration' || node.type === 'ExportAllDeclaration' || node.type === 'ExportDefaultDeclaration' || node.type === 'ExportNamedDeclaration' || node.type === 'ForOfStatement' || node.type === 'ImportDeclaration' || node.type === 'DeclareClass' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareModuleExports' || node.type === 'DeclareTypeAlias' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareVariable' || node.type === 'DeclareExportDeclaration' || node.type === 'DeclareExportAllDeclaration' || node.type === 'InterfaceDeclaration' || node.type === 'OpaqueType' || node.type === 'TypeAlias' || node.type === 'EnumDeclaration' || node.type === 'TSDeclareFunction' || node.type === 'TSInterfaceDeclaration' || node.type === 'TSTypeAliasDeclaration' || node.type === 'TSEnumDeclaration' || node.type === 'TSModuleDeclaration' || node.type === 'TSImportEqualsDeclaration' || node.type === 'TSExportAssignment' || node.type === 'TSNamespaceExportDeclaration')); - declare export function isTerminatorless(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'BreakStatement' || node.type === 'ContinueStatement' || node.type === 'ReturnStatement' || node.type === 'ThrowStatement' || node.type === 'YieldExpression' || node.type === 'AwaitExpression')); - declare export function isCompletionStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'BreakStatement' || node.type === 'ContinueStatement' || node.type === 'ReturnStatement' || node.type === 'ThrowStatement')); - declare export function isConditional(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ConditionalExpression' || node.type === 'IfStatement')); - declare export function isLoop(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'DoWhileStatement' || node.type === 'ForInStatement' || node.type === 'ForStatement' || node.type === 'WhileStatement' || node.type === 'ForOfStatement')); - declare export function isWhile(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'DoWhileStatement' || node.type === 'WhileStatement')); - declare export function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ExpressionStatement' || node.type === 'ParenthesizedExpression' || node.type === 'TypeCastExpression')); - declare export function isFor(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ForInStatement' || node.type === 'ForStatement' || node.type === 'ForOfStatement')); - declare export function isForXStatement(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ForInStatement' || node.type === 'ForOfStatement')); - declare export function isFunction(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ObjectMethod' || node.type === 'ArrowFunctionExpression' || node.type === 'ClassMethod' || node.type === 'ClassPrivateMethod')); - declare export function isFunctionParent(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ObjectMethod' || node.type === 'ArrowFunctionExpression' || node.type === 'ClassMethod' || node.type === 'ClassPrivateMethod' || node.type === 'StaticBlock' || node.type === 'TSModuleBlock')); - declare export function isPureish(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'StringLiteral' || node.type === 'NumericLiteral' || node.type === 'NullLiteral' || node.type === 'BooleanLiteral' || node.type === 'RegExpLiteral' || node.type === 'ArrowFunctionExpression' || node.type === 'BigIntLiteral' || node.type === 'DecimalLiteral')); - declare export function isDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'FunctionDeclaration' || node.type === 'VariableDeclaration' || node.type === 'ClassDeclaration' || node.type === 'ExportAllDeclaration' || node.type === 'ExportDefaultDeclaration' || node.type === 'ExportNamedDeclaration' || node.type === 'ImportDeclaration' || node.type === 'DeclareClass' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareModuleExports' || node.type === 'DeclareTypeAlias' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareVariable' || node.type === 'DeclareExportDeclaration' || node.type === 'DeclareExportAllDeclaration' || node.type === 'InterfaceDeclaration' || node.type === 'OpaqueType' || node.type === 'TypeAlias' || node.type === 'EnumDeclaration' || node.type === 'TSDeclareFunction' || node.type === 'TSInterfaceDeclaration' || node.type === 'TSTypeAliasDeclaration' || node.type === 'TSEnumDeclaration' || node.type === 'TSModuleDeclaration')); - declare export function isPatternLike(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'Identifier' || node.type === 'RestElement' || node.type === 'AssignmentPattern' || node.type === 'ArrayPattern' || node.type === 'ObjectPattern' || node.type === 'TSAsExpression' || node.type === 'TSSatisfiesExpression' || node.type === 'TSTypeAssertion' || node.type === 'TSNonNullExpression')); - declare export function isLVal(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'Identifier' || node.type === 'MemberExpression' || node.type === 'RestElement' || node.type === 'AssignmentPattern' || node.type === 'ArrayPattern' || node.type === 'ObjectPattern' || node.type === 'TSParameterProperty' || node.type === 'TSAsExpression' || node.type === 'TSSatisfiesExpression' || node.type === 'TSTypeAssertion' || node.type === 'TSNonNullExpression')); - declare export function isTSEntityName(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'Identifier' || node.type === 'TSQualifiedName')); - declare export function isLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'StringLiteral' || node.type === 'NumericLiteral' || node.type === 'NullLiteral' || node.type === 'BooleanLiteral' || node.type === 'RegExpLiteral' || node.type === 'TemplateLiteral' || node.type === 'BigIntLiteral' || node.type === 'DecimalLiteral')); - declare export function isImmutable(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'StringLiteral' || node.type === 'NumericLiteral' || node.type === 'NullLiteral' || node.type === 'BooleanLiteral' || node.type === 'BigIntLiteral' || node.type === 'JSXAttribute' || node.type === 'JSXClosingElement' || node.type === 'JSXElement' || node.type === 'JSXExpressionContainer' || node.type === 'JSXSpreadChild' || node.type === 'JSXOpeningElement' || node.type === 'JSXText' || node.type === 'JSXFragment' || node.type === 'JSXOpeningFragment' || node.type === 'JSXClosingFragment' || node.type === 'DecimalLiteral')); - declare export function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ObjectMethod' || node.type === 'ObjectProperty' || node.type === 'ObjectTypeInternalSlot' || node.type === 'ObjectTypeCallProperty' || node.type === 'ObjectTypeIndexer' || node.type === 'ObjectTypeProperty' || node.type === 'ObjectTypeSpreadProperty')); - declare export function isMethod(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ObjectMethod' || node.type === 'ClassMethod' || node.type === 'ClassPrivateMethod')); - declare export function isObjectMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ObjectMethod' || node.type === 'ObjectProperty')); - declare export function isProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ObjectProperty' || node.type === 'ClassProperty' || node.type === 'ClassAccessorProperty' || node.type === 'ClassPrivateProperty')); - declare export function isUnaryLike(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'UnaryExpression' || node.type === 'SpreadElement')); - declare export function isPattern(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'AssignmentPattern' || node.type === 'ArrayPattern' || node.type === 'ObjectPattern')); - declare export function isClass(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ClassExpression' || node.type === 'ClassDeclaration')); - declare export function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ExportAllDeclaration' || node.type === 'ExportDefaultDeclaration' || node.type === 'ExportNamedDeclaration' || node.type === 'ImportDeclaration')); - declare export function isExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ExportAllDeclaration' || node.type === 'ExportDefaultDeclaration' || node.type === 'ExportNamedDeclaration')); - declare export function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ExportSpecifier' || node.type === 'ImportDefaultSpecifier' || node.type === 'ImportNamespaceSpecifier' || node.type === 'ImportSpecifier' || node.type === 'ExportNamespaceSpecifier' || node.type === 'ExportDefaultSpecifier')); - declare export function isAccessor(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ClassAccessorProperty')); - declare export function isPrivate(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'ClassPrivateProperty' || node.type === 'ClassPrivateMethod' || node.type === 'PrivateName')); - declare export function isFlow(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'AnyTypeAnnotation' || node.type === 'ArrayTypeAnnotation' || node.type === 'BooleanTypeAnnotation' || node.type === 'BooleanLiteralTypeAnnotation' || node.type === 'NullLiteralTypeAnnotation' || node.type === 'ClassImplements' || node.type === 'DeclareClass' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareModuleExports' || node.type === 'DeclareTypeAlias' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareVariable' || node.type === 'DeclareExportDeclaration' || node.type === 'DeclareExportAllDeclaration' || node.type === 'DeclaredPredicate' || node.type === 'ExistsTypeAnnotation' || node.type === 'FunctionTypeAnnotation' || node.type === 'FunctionTypeParam' || node.type === 'GenericTypeAnnotation' || node.type === 'InferredPredicate' || node.type === 'InterfaceExtends' || node.type === 'InterfaceDeclaration' || node.type === 'InterfaceTypeAnnotation' || node.type === 'IntersectionTypeAnnotation' || node.type === 'MixedTypeAnnotation' || node.type === 'EmptyTypeAnnotation' || node.type === 'NullableTypeAnnotation' || node.type === 'NumberLiteralTypeAnnotation' || node.type === 'NumberTypeAnnotation' || node.type === 'ObjectTypeAnnotation' || node.type === 'ObjectTypeInternalSlot' || node.type === 'ObjectTypeCallProperty' || node.type === 'ObjectTypeIndexer' || node.type === 'ObjectTypeProperty' || node.type === 'ObjectTypeSpreadProperty' || node.type === 'OpaqueType' || node.type === 'QualifiedTypeIdentifier' || node.type === 'StringLiteralTypeAnnotation' || node.type === 'StringTypeAnnotation' || node.type === 'SymbolTypeAnnotation' || node.type === 'ThisTypeAnnotation' || node.type === 'TupleTypeAnnotation' || node.type === 'TypeofTypeAnnotation' || node.type === 'TypeAlias' || node.type === 'TypeAnnotation' || node.type === 'TypeCastExpression' || node.type === 'TypeParameter' || node.type === 'TypeParameterDeclaration' || node.type === 'TypeParameterInstantiation' || node.type === 'UnionTypeAnnotation' || node.type === 'Variance' || node.type === 'VoidTypeAnnotation' || node.type === 'EnumDeclaration' || node.type === 'EnumBooleanBody' || node.type === 'EnumNumberBody' || node.type === 'EnumStringBody' || node.type === 'EnumSymbolBody' || node.type === 'EnumBooleanMember' || node.type === 'EnumNumberMember' || node.type === 'EnumStringMember' || node.type === 'EnumDefaultedMember' || node.type === 'IndexedAccessType' || node.type === 'OptionalIndexedAccessType')); - declare export function isFlowType(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'AnyTypeAnnotation' || node.type === 'ArrayTypeAnnotation' || node.type === 'BooleanTypeAnnotation' || node.type === 'BooleanLiteralTypeAnnotation' || node.type === 'NullLiteralTypeAnnotation' || node.type === 'ExistsTypeAnnotation' || node.type === 'FunctionTypeAnnotation' || node.type === 'GenericTypeAnnotation' || node.type === 'InterfaceTypeAnnotation' || node.type === 'IntersectionTypeAnnotation' || node.type === 'MixedTypeAnnotation' || node.type === 'EmptyTypeAnnotation' || node.type === 'NullableTypeAnnotation' || node.type === 'NumberLiteralTypeAnnotation' || node.type === 'NumberTypeAnnotation' || node.type === 'ObjectTypeAnnotation' || node.type === 'StringLiteralTypeAnnotation' || node.type === 'StringTypeAnnotation' || node.type === 'SymbolTypeAnnotation' || node.type === 'ThisTypeAnnotation' || node.type === 'TupleTypeAnnotation' || node.type === 'TypeofTypeAnnotation' || node.type === 'UnionTypeAnnotation' || node.type === 'VoidTypeAnnotation' || node.type === 'IndexedAccessType' || node.type === 'OptionalIndexedAccessType')); - declare export function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'AnyTypeAnnotation' || node.type === 'BooleanTypeAnnotation' || node.type === 'NullLiteralTypeAnnotation' || node.type === 'MixedTypeAnnotation' || node.type === 'EmptyTypeAnnotation' || node.type === 'NumberTypeAnnotation' || node.type === 'StringTypeAnnotation' || node.type === 'SymbolTypeAnnotation' || node.type === 'ThisTypeAnnotation' || node.type === 'VoidTypeAnnotation')); - declare export function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'DeclareClass' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareModuleExports' || node.type === 'DeclareTypeAlias' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareVariable' || node.type === 'DeclareExportDeclaration' || node.type === 'DeclareExportAllDeclaration' || node.type === 'InterfaceDeclaration' || node.type === 'OpaqueType' || node.type === 'TypeAlias')); - declare export function isFlowPredicate(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'DeclaredPredicate' || node.type === 'InferredPredicate')); - declare export function isEnumBody(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'EnumBooleanBody' || node.type === 'EnumNumberBody' || node.type === 'EnumStringBody' || node.type === 'EnumSymbolBody')); - declare export function isEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'EnumBooleanMember' || node.type === 'EnumNumberMember' || node.type === 'EnumStringMember' || node.type === 'EnumDefaultedMember')); - declare export function isJSX(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'JSXAttribute' || node.type === 'JSXClosingElement' || node.type === 'JSXElement' || node.type === 'JSXEmptyExpression' || node.type === 'JSXExpressionContainer' || node.type === 'JSXSpreadChild' || node.type === 'JSXIdentifier' || node.type === 'JSXMemberExpression' || node.type === 'JSXNamespacedName' || node.type === 'JSXOpeningElement' || node.type === 'JSXSpreadAttribute' || node.type === 'JSXText' || node.type === 'JSXFragment' || node.type === 'JSXOpeningFragment' || node.type === 'JSXClosingFragment')); - declare export function isMiscellaneous(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'Noop' || node.type === 'Placeholder' || node.type === 'V8IntrinsicIdentifier')); - declare export function isTypeScript(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'TSParameterProperty' || node.type === 'TSDeclareFunction' || node.type === 'TSDeclareMethod' || node.type === 'TSQualifiedName' || node.type === 'TSCallSignatureDeclaration' || node.type === 'TSConstructSignatureDeclaration' || node.type === 'TSPropertySignature' || node.type === 'TSMethodSignature' || node.type === 'TSIndexSignature' || node.type === 'TSAnyKeyword' || node.type === 'TSBooleanKeyword' || node.type === 'TSBigIntKeyword' || node.type === 'TSIntrinsicKeyword' || node.type === 'TSNeverKeyword' || node.type === 'TSNullKeyword' || node.type === 'TSNumberKeyword' || node.type === 'TSObjectKeyword' || node.type === 'TSStringKeyword' || node.type === 'TSSymbolKeyword' || node.type === 'TSUndefinedKeyword' || node.type === 'TSUnknownKeyword' || node.type === 'TSVoidKeyword' || node.type === 'TSThisType' || node.type === 'TSFunctionType' || node.type === 'TSConstructorType' || node.type === 'TSTypeReference' || node.type === 'TSTypePredicate' || node.type === 'TSTypeQuery' || node.type === 'TSTypeLiteral' || node.type === 'TSArrayType' || node.type === 'TSTupleType' || node.type === 'TSOptionalType' || node.type === 'TSRestType' || node.type === 'TSNamedTupleMember' || node.type === 'TSUnionType' || node.type === 'TSIntersectionType' || node.type === 'TSConditionalType' || node.type === 'TSInferType' || node.type === 'TSParenthesizedType' || node.type === 'TSTypeOperator' || node.type === 'TSIndexedAccessType' || node.type === 'TSMappedType' || node.type === 'TSLiteralType' || node.type === 'TSExpressionWithTypeArguments' || node.type === 'TSInterfaceDeclaration' || node.type === 'TSInterfaceBody' || node.type === 'TSTypeAliasDeclaration' || node.type === 'TSInstantiationExpression' || node.type === 'TSAsExpression' || node.type === 'TSSatisfiesExpression' || node.type === 'TSTypeAssertion' || node.type === 'TSEnumDeclaration' || node.type === 'TSEnumMember' || node.type === 'TSModuleDeclaration' || node.type === 'TSModuleBlock' || node.type === 'TSImportType' || node.type === 'TSImportEqualsDeclaration' || node.type === 'TSExternalModuleReference' || node.type === 'TSNonNullExpression' || node.type === 'TSExportAssignment' || node.type === 'TSNamespaceExportDeclaration' || node.type === 'TSTypeAnnotation' || node.type === 'TSTypeParameterInstantiation' || node.type === 'TSTypeParameterDeclaration' || node.type === 'TSTypeParameter')); - declare export function isTSTypeElement(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'TSCallSignatureDeclaration' || node.type === 'TSConstructSignatureDeclaration' || node.type === 'TSPropertySignature' || node.type === 'TSMethodSignature' || node.type === 'TSIndexSignature')); - declare export function isTSType(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'TSAnyKeyword' || node.type === 'TSBooleanKeyword' || node.type === 'TSBigIntKeyword' || node.type === 'TSIntrinsicKeyword' || node.type === 'TSNeverKeyword' || node.type === 'TSNullKeyword' || node.type === 'TSNumberKeyword' || node.type === 'TSObjectKeyword' || node.type === 'TSStringKeyword' || node.type === 'TSSymbolKeyword' || node.type === 'TSUndefinedKeyword' || node.type === 'TSUnknownKeyword' || node.type === 'TSVoidKeyword' || node.type === 'TSThisType' || node.type === 'TSFunctionType' || node.type === 'TSConstructorType' || node.type === 'TSTypeReference' || node.type === 'TSTypePredicate' || node.type === 'TSTypeQuery' || node.type === 'TSTypeLiteral' || node.type === 'TSArrayType' || node.type === 'TSTupleType' || node.type === 'TSOptionalType' || node.type === 'TSRestType' || node.type === 'TSUnionType' || node.type === 'TSIntersectionType' || node.type === 'TSConditionalType' || node.type === 'TSInferType' || node.type === 'TSParenthesizedType' || node.type === 'TSTypeOperator' || node.type === 'TSIndexedAccessType' || node.type === 'TSMappedType' || node.type === 'TSLiteralType' || node.type === 'TSExpressionWithTypeArguments' || node.type === 'TSImportType')); - declare export function isTSBaseType(node: ?Object, opts?: ?Object): boolean %checks (node != null && (node.type === 'TSAnyKeyword' || node.type === 'TSBooleanKeyword' || node.type === 'TSBigIntKeyword' || node.type === 'TSIntrinsicKeyword' || node.type === 'TSNeverKeyword' || node.type === 'TSNullKeyword' || node.type === 'TSNumberKeyword' || node.type === 'TSObjectKeyword' || node.type === 'TSStringKeyword' || node.type === 'TSSymbolKeyword' || node.type === 'TSUndefinedKeyword' || node.type === 'TSUnknownKeyword' || node.type === 'TSVoidKeyword' || node.type === 'TSThisType' || node.type === 'TSLiteralType')); - declare export function isNumberLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'NumericLiteral'); - declare export function isRegexLiteral(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'RegExpLiteral'); - declare export function isRestProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'RestElement'); - declare export function isSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node != null && node.type === 'SpreadElement'); + declare export function isArrayExpression(node: ?Object, opts?: ?Object): node is ArrayExpression; + declare export function isAssignmentExpression(node: ?Object, opts?: ?Object): node is AssignmentExpression; + declare export function isBinaryExpression(node: ?Object, opts?: ?Object): node is BinaryExpression; + declare export function isInterpreterDirective(node: ?Object, opts?: ?Object): node is InterpreterDirective; + declare export function isDirective(node: ?Object, opts?: ?Object): node is Directive; + declare export function isDirectiveLiteral(node: ?Object, opts?: ?Object): node is DirectiveLiteral; + declare export function isBlockStatement(node: ?Object, opts?: ?Object): node is BlockStatement; + declare export function isBreakStatement(node: ?Object, opts?: ?Object): node is BreakStatement; + declare export function isCallExpression(node: ?Object, opts?: ?Object): node is CallExpression; + declare export function isCatchClause(node: ?Object, opts?: ?Object): node is CatchClause; + declare export function isConditionalExpression(node: ?Object, opts?: ?Object): node is ConditionalExpression; + declare export function isContinueStatement(node: ?Object, opts?: ?Object): node is ContinueStatement; + declare export function isDebuggerStatement(node: ?Object, opts?: ?Object): node is DebuggerStatement; + declare export function isDoWhileStatement(node: ?Object, opts?: ?Object): node is DoWhileStatement; + declare export function isEmptyStatement(node: ?Object, opts?: ?Object): node is EmptyStatement; + declare export function isExpressionStatement(node: ?Object, opts?: ?Object): node is ExpressionStatement; + declare export function isFile(node: ?Object, opts?: ?Object): node is File; + declare export function isForInStatement(node: ?Object, opts?: ?Object): node is ForInStatement; + declare export function isForStatement(node: ?Object, opts?: ?Object): node is ForStatement; + declare export function isFunctionDeclaration(node: ?Object, opts?: ?Object): node is FunctionDeclaration; + declare export function isFunctionExpression(node: ?Object, opts?: ?Object): node is FunctionExpression; + declare export function isIdentifier(node: ?Object, opts?: ?Object): node is Identifier; + declare export function isIfStatement(node: ?Object, opts?: ?Object): node is IfStatement; + declare export function isLabeledStatement(node: ?Object, opts?: ?Object): node is LabeledStatement; + declare export function isStringLiteral(node: ?Object, opts?: ?Object): node is StringLiteral; + declare export function isNumericLiteral(node: ?Object, opts?: ?Object): node is NumericLiteral; + declare export function isNullLiteral(node: ?Object, opts?: ?Object): node is NullLiteral; + declare export function isBooleanLiteral(node: ?Object, opts?: ?Object): node is BooleanLiteral; + declare export function isRegExpLiteral(node: ?Object, opts?: ?Object): node is RegExpLiteral; + declare export function isLogicalExpression(node: ?Object, opts?: ?Object): node is LogicalExpression; + declare export function isMemberExpression(node: ?Object, opts?: ?Object): node is MemberExpression; + declare export function isNewExpression(node: ?Object, opts?: ?Object): node is NewExpression; + declare export function isProgram(node: ?Object, opts?: ?Object): node is Program; + declare export function isObjectExpression(node: ?Object, opts?: ?Object): node is ObjectExpression; + declare export function isObjectMethod(node: ?Object, opts?: ?Object): node is ObjectMethod; + declare export function isObjectProperty(node: ?Object, opts?: ?Object): node is ObjectProperty; + declare export function isRestElement(node: ?Object, opts?: ?Object): node is RestElement; + declare export function isReturnStatement(node: ?Object, opts?: ?Object): node is ReturnStatement; + declare export function isSequenceExpression(node: ?Object, opts?: ?Object): node is SequenceExpression; + declare export function isParenthesizedExpression(node: ?Object, opts?: ?Object): node is ParenthesizedExpression; + declare export function isSwitchCase(node: ?Object, opts?: ?Object): node is SwitchCase; + declare export function isSwitchStatement(node: ?Object, opts?: ?Object): node is SwitchStatement; + declare export function isThisExpression(node: ?Object, opts?: ?Object): node is ThisExpression; + declare export function isThrowStatement(node: ?Object, opts?: ?Object): node is ThrowStatement; + declare export function isTryStatement(node: ?Object, opts?: ?Object): node is TryStatement; + declare export function isUnaryExpression(node: ?Object, opts?: ?Object): node is UnaryExpression; + declare export function isUpdateExpression(node: ?Object, opts?: ?Object): node is UpdateExpression; + declare export function isVariableDeclaration(node: ?Object, opts?: ?Object): node is VariableDeclaration; + declare export function isVariableDeclarator(node: ?Object, opts?: ?Object): node is VariableDeclarator; + declare export function isWhileStatement(node: ?Object, opts?: ?Object): node is WhileStatement; + declare export function isWithStatement(node: ?Object, opts?: ?Object): node is WithStatement; + declare export function isAssignmentPattern(node: ?Object, opts?: ?Object): node is AssignmentPattern; + declare export function isArrayPattern(node: ?Object, opts?: ?Object): node is ArrayPattern; + declare export function isArrowFunctionExpression(node: ?Object, opts?: ?Object): node is ArrowFunctionExpression; + declare export function isClassBody(node: ?Object, opts?: ?Object): node is ClassBody; + declare export function isClassExpression(node: ?Object, opts?: ?Object): node is ClassExpression; + declare export function isClassDeclaration(node: ?Object, opts?: ?Object): node is ClassDeclaration; + declare export function isExportAllDeclaration(node: ?Object, opts?: ?Object): node is ExportAllDeclaration; + declare export function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): node is ExportDefaultDeclaration; + declare export function isExportNamedDeclaration(node: ?Object, opts?: ?Object): node is ExportNamedDeclaration; + declare export function isExportSpecifier(node: ?Object, opts?: ?Object): node is ExportSpecifier; + declare export function isForOfStatement(node: ?Object, opts?: ?Object): node is ForOfStatement; + declare export function isImportDeclaration(node: ?Object, opts?: ?Object): node is ImportDeclaration; + declare export function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): node is ImportDefaultSpecifier; + declare export function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): node is ImportNamespaceSpecifier; + declare export function isImportSpecifier(node: ?Object, opts?: ?Object): node is ImportSpecifier; + declare export function isMetaProperty(node: ?Object, opts?: ?Object): node is MetaProperty; + declare export function isClassMethod(node: ?Object, opts?: ?Object): node is ClassMethod; + declare export function isObjectPattern(node: ?Object, opts?: ?Object): node is ObjectPattern; + declare export function isSpreadElement(node: ?Object, opts?: ?Object): node is SpreadElement; + declare export function isSuper(node: ?Object, opts?: ?Object): node is Super; + declare export function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): node is TaggedTemplateExpression; + declare export function isTemplateElement(node: ?Object, opts?: ?Object): node is TemplateElement; + declare export function isTemplateLiteral(node: ?Object, opts?: ?Object): node is TemplateLiteral; + declare export function isYieldExpression(node: ?Object, opts?: ?Object): node is YieldExpression; + declare export function isAwaitExpression(node: ?Object, opts?: ?Object): node is AwaitExpression; + declare export function isImport(node: ?Object, opts?: ?Object): node is Import; + declare export function isBigIntLiteral(node: ?Object, opts?: ?Object): node is BigIntLiteral; + declare export function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): node is ExportNamespaceSpecifier; + declare export function isOptionalMemberExpression(node: ?Object, opts?: ?Object): node is OptionalMemberExpression; + declare export function isOptionalCallExpression(node: ?Object, opts?: ?Object): node is OptionalCallExpression; + declare export function isClassProperty(node: ?Object, opts?: ?Object): node is ClassProperty; + declare export function isClassAccessorProperty(node: ?Object, opts?: ?Object): node is ClassAccessorProperty; + declare export function isClassPrivateProperty(node: ?Object, opts?: ?Object): node is ClassPrivateProperty; + declare export function isClassPrivateMethod(node: ?Object, opts?: ?Object): node is ClassPrivateMethod; + declare export function isPrivateName(node: ?Object, opts?: ?Object): node is PrivateName; + declare export function isStaticBlock(node: ?Object, opts?: ?Object): node is StaticBlock; + declare export function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): node is AnyTypeAnnotation; + declare export function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): node is ArrayTypeAnnotation; + declare export function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): node is BooleanTypeAnnotation; + declare export function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): node is BooleanLiteralTypeAnnotation; + declare export function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): node is NullLiteralTypeAnnotation; + declare export function isClassImplements(node: ?Object, opts?: ?Object): node is ClassImplements; + declare export function isDeclareClass(node: ?Object, opts?: ?Object): node is DeclareClass; + declare export function isDeclareFunction(node: ?Object, opts?: ?Object): node is DeclareFunction; + declare export function isDeclareInterface(node: ?Object, opts?: ?Object): node is DeclareInterface; + declare export function isDeclareModule(node: ?Object, opts?: ?Object): node is DeclareModule; + declare export function isDeclareModuleExports(node: ?Object, opts?: ?Object): node is DeclareModuleExports; + declare export function isDeclareTypeAlias(node: ?Object, opts?: ?Object): node is DeclareTypeAlias; + declare export function isDeclareOpaqueType(node: ?Object, opts?: ?Object): node is DeclareOpaqueType; + declare export function isDeclareVariable(node: ?Object, opts?: ?Object): node is DeclareVariable; + declare export function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): node is DeclareExportDeclaration; + declare export function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): node is DeclareExportAllDeclaration; + declare export function isDeclaredPredicate(node: ?Object, opts?: ?Object): node is DeclaredPredicate; + declare export function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): node is ExistsTypeAnnotation; + declare export function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): node is FunctionTypeAnnotation; + declare export function isFunctionTypeParam(node: ?Object, opts?: ?Object): node is FunctionTypeParam; + declare export function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): node is GenericTypeAnnotation; + declare export function isInferredPredicate(node: ?Object, opts?: ?Object): node is InferredPredicate; + declare export function isInterfaceExtends(node: ?Object, opts?: ?Object): node is InterfaceExtends; + declare export function isInterfaceDeclaration(node: ?Object, opts?: ?Object): node is InterfaceDeclaration; + declare export function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): node is InterfaceTypeAnnotation; + declare export function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): node is IntersectionTypeAnnotation; + declare export function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): node is MixedTypeAnnotation; + declare export function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): node is EmptyTypeAnnotation; + declare export function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): node is NullableTypeAnnotation; + declare export function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): node is NumberLiteralTypeAnnotation; + declare export function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): node is NumberTypeAnnotation; + declare export function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): node is ObjectTypeAnnotation; + declare export function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): node is ObjectTypeInternalSlot; + declare export function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): node is ObjectTypeCallProperty; + declare export function isObjectTypeIndexer(node: ?Object, opts?: ?Object): node is ObjectTypeIndexer; + declare export function isObjectTypeProperty(node: ?Object, opts?: ?Object): node is ObjectTypeProperty; + declare export function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): node is ObjectTypeSpreadProperty; + declare export function isOpaqueType(node: ?Object, opts?: ?Object): node is OpaqueType; + declare export function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): node is QualifiedTypeIdentifier; + declare export function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): node is StringLiteralTypeAnnotation; + declare export function isStringTypeAnnotation(node: ?Object, opts?: ?Object): node is StringTypeAnnotation; + declare export function isSymbolTypeAnnotation(node: ?Object, opts?: ?Object): node is SymbolTypeAnnotation; + declare export function isThisTypeAnnotation(node: ?Object, opts?: ?Object): node is ThisTypeAnnotation; + declare export function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): node is TupleTypeAnnotation; + declare export function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): node is TypeofTypeAnnotation; + declare export function isTypeAlias(node: ?Object, opts?: ?Object): node is TypeAlias; + declare export function isTypeAnnotation(node: ?Object, opts?: ?Object): node is TypeAnnotation; + declare export function isTypeCastExpression(node: ?Object, opts?: ?Object): node is TypeCastExpression; + declare export function isTypeParameter(node: ?Object, opts?: ?Object): node is TypeParameter; + declare export function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): node is TypeParameterDeclaration; + declare export function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): node is TypeParameterInstantiation; + declare export function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): node is UnionTypeAnnotation; + declare export function isVariance(node: ?Object, opts?: ?Object): node is Variance; + declare export function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): node is VoidTypeAnnotation; + declare export function isEnumDeclaration(node: ?Object, opts?: ?Object): node is EnumDeclaration; + declare export function isEnumBooleanBody(node: ?Object, opts?: ?Object): node is EnumBooleanBody; + declare export function isEnumNumberBody(node: ?Object, opts?: ?Object): node is EnumNumberBody; + declare export function isEnumStringBody(node: ?Object, opts?: ?Object): node is EnumStringBody; + declare export function isEnumSymbolBody(node: ?Object, opts?: ?Object): node is EnumSymbolBody; + declare export function isEnumBooleanMember(node: ?Object, opts?: ?Object): node is EnumBooleanMember; + declare export function isEnumNumberMember(node: ?Object, opts?: ?Object): node is EnumNumberMember; + declare export function isEnumStringMember(node: ?Object, opts?: ?Object): node is EnumStringMember; + declare export function isEnumDefaultedMember(node: ?Object, opts?: ?Object): node is EnumDefaultedMember; + declare export function isIndexedAccessType(node: ?Object, opts?: ?Object): node is IndexedAccessType; + declare export function isOptionalIndexedAccessType(node: ?Object, opts?: ?Object): node is OptionalIndexedAccessType; + declare export function isJSXAttribute(node: ?Object, opts?: ?Object): node is JSXAttribute; + declare export function isJSXClosingElement(node: ?Object, opts?: ?Object): node is JSXClosingElement; + declare export function isJSXElement(node: ?Object, opts?: ?Object): node is JSXElement; + declare export function isJSXEmptyExpression(node: ?Object, opts?: ?Object): node is JSXEmptyExpression; + declare export function isJSXExpressionContainer(node: ?Object, opts?: ?Object): node is JSXExpressionContainer; + declare export function isJSXSpreadChild(node: ?Object, opts?: ?Object): node is JSXSpreadChild; + declare export function isJSXIdentifier(node: ?Object, opts?: ?Object): node is JSXIdentifier; + declare export function isJSXMemberExpression(node: ?Object, opts?: ?Object): node is JSXMemberExpression; + declare export function isJSXNamespacedName(node: ?Object, opts?: ?Object): node is JSXNamespacedName; + declare export function isJSXOpeningElement(node: ?Object, opts?: ?Object): node is JSXOpeningElement; + declare export function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): node is JSXSpreadAttribute; + declare export function isJSXText(node: ?Object, opts?: ?Object): node is JSXText; + declare export function isJSXFragment(node: ?Object, opts?: ?Object): node is JSXFragment; + declare export function isJSXOpeningFragment(node: ?Object, opts?: ?Object): node is JSXOpeningFragment; + declare export function isJSXClosingFragment(node: ?Object, opts?: ?Object): node is JSXClosingFragment; + declare export function isNoop(node: ?Object, opts?: ?Object): node is Noop; + declare export function isPlaceholder(node: ?Object, opts?: ?Object): node is Placeholder; + declare export function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): node is V8IntrinsicIdentifier; + declare export function isArgumentPlaceholder(node: ?Object, opts?: ?Object): node is ArgumentPlaceholder; + declare export function isBindExpression(node: ?Object, opts?: ?Object): node is BindExpression; + declare export function isImportAttribute(node: ?Object, opts?: ?Object): node is ImportAttribute; + declare export function isDecorator(node: ?Object, opts?: ?Object): node is Decorator; + declare export function isDoExpression(node: ?Object, opts?: ?Object): node is DoExpression; + declare export function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): node is ExportDefaultSpecifier; + declare export function isRecordExpression(node: ?Object, opts?: ?Object): node is RecordExpression; + declare export function isTupleExpression(node: ?Object, opts?: ?Object): node is TupleExpression; + declare export function isDecimalLiteral(node: ?Object, opts?: ?Object): node is DecimalLiteral; + declare export function isModuleExpression(node: ?Object, opts?: ?Object): node is ModuleExpression; + declare export function isTopicReference(node: ?Object, opts?: ?Object): node is TopicReference; + declare export function isPipelineTopicExpression(node: ?Object, opts?: ?Object): node is PipelineTopicExpression; + declare export function isPipelineBareFunction(node: ?Object, opts?: ?Object): node is PipelineBareFunction; + declare export function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): node is PipelinePrimaryTopicReference; + declare export function isTSParameterProperty(node: ?Object, opts?: ?Object): node is TSParameterProperty; + declare export function isTSDeclareFunction(node: ?Object, opts?: ?Object): node is TSDeclareFunction; + declare export function isTSDeclareMethod(node: ?Object, opts?: ?Object): node is TSDeclareMethod; + declare export function isTSQualifiedName(node: ?Object, opts?: ?Object): node is TSQualifiedName; + declare export function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): node is TSCallSignatureDeclaration; + declare export function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): node is TSConstructSignatureDeclaration; + declare export function isTSPropertySignature(node: ?Object, opts?: ?Object): node is TSPropertySignature; + declare export function isTSMethodSignature(node: ?Object, opts?: ?Object): node is TSMethodSignature; + declare export function isTSIndexSignature(node: ?Object, opts?: ?Object): node is TSIndexSignature; + declare export function isTSAnyKeyword(node: ?Object, opts?: ?Object): node is TSAnyKeyword; + declare export function isTSBooleanKeyword(node: ?Object, opts?: ?Object): node is TSBooleanKeyword; + declare export function isTSBigIntKeyword(node: ?Object, opts?: ?Object): node is TSBigIntKeyword; + declare export function isTSIntrinsicKeyword(node: ?Object, opts?: ?Object): node is TSIntrinsicKeyword; + declare export function isTSNeverKeyword(node: ?Object, opts?: ?Object): node is TSNeverKeyword; + declare export function isTSNullKeyword(node: ?Object, opts?: ?Object): node is TSNullKeyword; + declare export function isTSNumberKeyword(node: ?Object, opts?: ?Object): node is TSNumberKeyword; + declare export function isTSObjectKeyword(node: ?Object, opts?: ?Object): node is TSObjectKeyword; + declare export function isTSStringKeyword(node: ?Object, opts?: ?Object): node is TSStringKeyword; + declare export function isTSSymbolKeyword(node: ?Object, opts?: ?Object): node is TSSymbolKeyword; + declare export function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): node is TSUndefinedKeyword; + declare export function isTSUnknownKeyword(node: ?Object, opts?: ?Object): node is TSUnknownKeyword; + declare export function isTSVoidKeyword(node: ?Object, opts?: ?Object): node is TSVoidKeyword; + declare export function isTSThisType(node: ?Object, opts?: ?Object): node is TSThisType; + declare export function isTSFunctionType(node: ?Object, opts?: ?Object): node is TSFunctionType; + declare export function isTSConstructorType(node: ?Object, opts?: ?Object): node is TSConstructorType; + declare export function isTSTypeReference(node: ?Object, opts?: ?Object): node is TSTypeReference; + declare export function isTSTypePredicate(node: ?Object, opts?: ?Object): node is TSTypePredicate; + declare export function isTSTypeQuery(node: ?Object, opts?: ?Object): node is TSTypeQuery; + declare export function isTSTypeLiteral(node: ?Object, opts?: ?Object): node is TSTypeLiteral; + declare export function isTSArrayType(node: ?Object, opts?: ?Object): node is TSArrayType; + declare export function isTSTupleType(node: ?Object, opts?: ?Object): node is TSTupleType; + declare export function isTSOptionalType(node: ?Object, opts?: ?Object): node is TSOptionalType; + declare export function isTSRestType(node: ?Object, opts?: ?Object): node is TSRestType; + declare export function isTSNamedTupleMember(node: ?Object, opts?: ?Object): node is TSNamedTupleMember; + declare export function isTSUnionType(node: ?Object, opts?: ?Object): node is TSUnionType; + declare export function isTSIntersectionType(node: ?Object, opts?: ?Object): node is TSIntersectionType; + declare export function isTSConditionalType(node: ?Object, opts?: ?Object): node is TSConditionalType; + declare export function isTSInferType(node: ?Object, opts?: ?Object): node is TSInferType; + declare export function isTSParenthesizedType(node: ?Object, opts?: ?Object): node is TSParenthesizedType; + declare export function isTSTypeOperator(node: ?Object, opts?: ?Object): node is TSTypeOperator; + declare export function isTSIndexedAccessType(node: ?Object, opts?: ?Object): node is TSIndexedAccessType; + declare export function isTSMappedType(node: ?Object, opts?: ?Object): node is TSMappedType; + declare export function isTSLiteralType(node: ?Object, opts?: ?Object): node is TSLiteralType; + declare export function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): node is TSExpressionWithTypeArguments; + declare export function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): node is TSInterfaceDeclaration; + declare export function isTSInterfaceBody(node: ?Object, opts?: ?Object): node is TSInterfaceBody; + declare export function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): node is TSTypeAliasDeclaration; + declare export function isTSInstantiationExpression(node: ?Object, opts?: ?Object): node is TSInstantiationExpression; + declare export function isTSAsExpression(node: ?Object, opts?: ?Object): node is TSAsExpression; + declare export function isTSSatisfiesExpression(node: ?Object, opts?: ?Object): node is TSSatisfiesExpression; + declare export function isTSTypeAssertion(node: ?Object, opts?: ?Object): node is TSTypeAssertion; + declare export function isTSEnumDeclaration(node: ?Object, opts?: ?Object): node is TSEnumDeclaration; + declare export function isTSEnumMember(node: ?Object, opts?: ?Object): node is TSEnumMember; + declare export function isTSModuleDeclaration(node: ?Object, opts?: ?Object): node is TSModuleDeclaration; + declare export function isTSModuleBlock(node: ?Object, opts?: ?Object): node is TSModuleBlock; + declare export function isTSImportType(node: ?Object, opts?: ?Object): node is TSImportType; + declare export function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): node is TSImportEqualsDeclaration; + declare export function isTSExternalModuleReference(node: ?Object, opts?: ?Object): node is TSExternalModuleReference; + declare export function isTSNonNullExpression(node: ?Object, opts?: ?Object): node is TSNonNullExpression; + declare export function isTSExportAssignment(node: ?Object, opts?: ?Object): node is TSExportAssignment; + declare export function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): node is TSNamespaceExportDeclaration; + declare export function isTSTypeAnnotation(node: ?Object, opts?: ?Object): node is TSTypeAnnotation; + declare export function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): node is TSTypeParameterInstantiation; + declare export function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): node is TSTypeParameterDeclaration; + declare export function isTSTypeParameter(node: ?Object, opts?: ?Object): node is TSTypeParameter; + declare export function isStandardized(node: ?Object, opts?: ?Object): node is (ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassAccessorProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock); + declare export function isExpression(node: ?Object, opts?: ?Object): node is (ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSInstantiationExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression); + declare export function isBinary(node: ?Object, opts?: ?Object): node is (BinaryExpression | LogicalExpression); + declare export function isScopable(node: ?Object, opts?: ?Object): node is (BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock); + declare export function isBlockParent(node: ?Object, opts?: ?Object): node is (BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock); + declare export function isBlock(node: ?Object, opts?: ?Object): node is (BlockStatement | Program | TSModuleBlock); + declare export function isStatement(node: ?Object, opts?: ?Object): node is (BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration); + declare export function isTerminatorless(node: ?Object, opts?: ?Object): node is (BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression); + declare export function isCompletionStatement(node: ?Object, opts?: ?Object): node is (BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement); + declare export function isConditional(node: ?Object, opts?: ?Object): node is (ConditionalExpression | IfStatement); + declare export function isLoop(node: ?Object, opts?: ?Object): node is (DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement); + declare export function isWhile(node: ?Object, opts?: ?Object): node is (DoWhileStatement | WhileStatement); + declare export function isExpressionWrapper(node: ?Object, opts?: ?Object): node is (ExpressionStatement | ParenthesizedExpression | TypeCastExpression); + declare export function isFor(node: ?Object, opts?: ?Object): node is (ForInStatement | ForStatement | ForOfStatement); + declare export function isForXStatement(node: ?Object, opts?: ?Object): node is (ForInStatement | ForOfStatement); + declare export function isFunction(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod); + declare export function isFunctionParent(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock); + declare export function isPureish(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral); + declare export function isDeclaration(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration); + declare export function isPatternLike(node: ?Object, opts?: ?Object): node is (Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression); + declare export function isLVal(node: ?Object, opts?: ?Object): node is (Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression); + declare export function isTSEntityName(node: ?Object, opts?: ?Object): node is (Identifier | TSQualifiedName); + declare export function isLiteral(node: ?Object, opts?: ?Object): node is (StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral); + declare export function isImmutable(node: ?Object, opts?: ?Object): node is (StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral); + declare export function isUserWhitespacable(node: ?Object, opts?: ?Object): node is (ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty); + declare export function isMethod(node: ?Object, opts?: ?Object): node is (ObjectMethod | ClassMethod | ClassPrivateMethod); + declare export function isObjectMember(node: ?Object, opts?: ?Object): node is (ObjectMethod | ObjectProperty); + declare export function isProperty(node: ?Object, opts?: ?Object): node is (ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty); + declare export function isUnaryLike(node: ?Object, opts?: ?Object): node is (UnaryExpression | SpreadElement); + declare export function isPattern(node: ?Object, opts?: ?Object): node is (AssignmentPattern | ArrayPattern | ObjectPattern); + declare export function isClass(node: ?Object, opts?: ?Object): node is (ClassExpression | ClassDeclaration); + declare export function isModuleDeclaration(node: ?Object, opts?: ?Object): node is (ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration); + declare export function isExportDeclaration(node: ?Object, opts?: ?Object): node is (ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration); + declare export function isModuleSpecifier(node: ?Object, opts?: ?Object): node is (ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier); + declare export function isAccessor(node: ?Object, opts?: ?Object): node is (ClassAccessorProperty); + declare export function isPrivate(node: ?Object, opts?: ?Object): node is (ClassPrivateProperty | ClassPrivateMethod | PrivateName); + declare export function isFlow(node: ?Object, opts?: ?Object): node is (AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType); + declare export function isFlowType(node: ?Object, opts?: ?Object): node is (AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType); + declare export function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): node is (AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation); + declare export function isFlowDeclaration(node: ?Object, opts?: ?Object): node is (DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias); + declare export function isFlowPredicate(node: ?Object, opts?: ?Object): node is (DeclaredPredicate | InferredPredicate); + declare export function isEnumBody(node: ?Object, opts?: ?Object): node is (EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody); + declare export function isEnumMember(node: ?Object, opts?: ?Object): node is (EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember); + declare export function isJSX(node: ?Object, opts?: ?Object): node is (JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment); + declare export function isMiscellaneous(node: ?Object, opts?: ?Object): node is (Noop | Placeholder | V8IntrinsicIdentifier); + declare export function isTypeScript(node: ?Object, opts?: ?Object): node is (TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSInterfaceDeclaration | TSInterfaceBody | TSTypeAliasDeclaration | TSInstantiationExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSEnumDeclaration | TSEnumMember | TSModuleDeclaration | TSModuleBlock | TSImportType | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | TSExportAssignment | TSNamespaceExportDeclaration | TSTypeAnnotation | TSTypeParameterInstantiation | TSTypeParameterDeclaration | TSTypeParameter); + declare export function isTSTypeElement(node: ?Object, opts?: ?Object): node is (TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature); + declare export function isTSType(node: ?Object, opts?: ?Object): node is (TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType); + declare export function isTSBaseType(node: ?Object, opts?: ?Object): node is (TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSLiteralType); + declare export function isNumberLiteral(node: ?Object, opts?: ?Object): node is NumericLiteral; + declare export function isRegexLiteral(node: ?Object, opts?: ?Object): node is RegExpLiteral; + declare export function isRestProperty(node: ?Object, opts?: ?Object): node is RestElement; + declare export function isSpreadProperty(node: ?Object, opts?: ?Object): node is SpreadElement; declare export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation declare export function createUnionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation declare export function createFlowUnionType(types: Array): BabelNodeUnionTypeAnnotation @@ -3796,18 +3796,18 @@ declare module "@babel/types" { declare export function is(type: string, n: BabelNode, opts: Object): boolean; declare export function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean declare export function isBlockScoped(node: BabelNode): boolean - declare export function isLet(node: BabelNode): boolean %checks (node.type === 'VariableDeclaration') + declare export function isLet(node: BabelNode): node is VariableDeclaration declare export function isNode(node: ?Object): boolean declare export function isNodesEquivalent(a: any, b: any): boolean declare export function isPlaceholderType(placeholderType: string, targetType: string): boolean declare export function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean - declare export function isScope(node: BabelNode, parent: BabelNode): boolean %checks (node.type === 'BlockStatement' || node.type === 'CatchClause' || node.type === 'DoWhileStatement' || node.type === 'ForInStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'Program' || node.type === 'ObjectMethod' || node.type === 'SwitchStatement' || node.type === 'WhileStatement' || node.type === 'ArrowFunctionExpression' || node.type === 'ClassExpression' || node.type === 'ClassDeclaration' || node.type === 'ForOfStatement' || node.type === 'ClassMethod' || node.type === 'ClassPrivateMethod' || node.type === 'TSModuleBlock') + declare export function isScope(node: BabelNode, parent: BabelNode): node is (BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | TSModuleBlock) declare export function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean declare export function isType(nodetype: ?string, targetType: string): boolean declare export function isValidES3Identifier(name: string): boolean declare export function isValidES3Identifier(name: string): boolean declare export function isValidIdentifier(name: string): boolean - declare export function isVar(node: BabelNode): boolean %checks (node.type === 'VariableDeclaration') + declare export function isVar(node: BabelNode): node is VariableDeclaration declare export function matchesPattern(node: ?BabelNode, match: string | Array, allowPartial?: boolean): boolean declare export function validate(n: BabelNode, key: string, value: mixed): void; declare export type Node = BabelNode; diff --git a/flow-typed/npm/chrome-launcher_v0.15.x.js b/flow-typed/npm/chrome-launcher_v0.15.x.js index 8f18f971b5cd..e520c5716c78 100644 --- a/flow-typed/npm/chrome-launcher_v0.15.x.js +++ b/flow-typed/npm/chrome-launcher_v0.15.x.js @@ -44,6 +44,9 @@ declare module 'chrome-launcher' { declare class Launcher { getChromePath(): string; launch(options: Options): Promise; + Launcher: { + defaultFlags(): Array, + }; } declare module.exports: Launcher; diff --git a/flow-typed/npm/data-uri-to-buffer_v6.x.x.js b/flow-typed/npm/data-uri-to-buffer_v6.x.x.js new file mode 100644 index 000000000000..b8d97331050f --- /dev/null +++ b/flow-typed/npm/data-uri-to-buffer_v6.x.x.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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +declare module 'data-uri-to-buffer' { + declare interface ParsedDataURI { + type: string; + typeFull: string; + charset: TextDecoder$availableEncodings; + buffer: ArrayBuffer; + } + + declare export function dataUriToBuffer(uri: string | URL): ParsedDataURI; +} diff --git a/flow-typed/npm/mkdirp_v0.5.x.js b/flow-typed/npm/mkdirp_v0.5.x.js new file mode 100644 index 000000000000..79522197f961 --- /dev/null +++ b/flow-typed/npm/mkdirp_v0.5.x.js @@ -0,0 +1,18 @@ +// flow-typed signature: b1b274e8ae71623bf11c20224c446842 +// flow-typed version: c6154227d1/mkdirp_v0.5.x/flow_>=v0.104.x + +declare module 'mkdirp' { + declare type Options = number | { + mode?: number, + fs?: mixed, + ... + }; + + declare type Callback = (err: ?Error, path: ?string) => void; + + declare module.exports: { + (path: string, options?: Options | Callback, callback?: Callback): void, + sync(path: string, options?: Options): void, + ... + }; +} 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/flow-typed/npm/parseargs_v0.11.x.js b/flow-typed/npm/parseargs_v0.11.x.js index 396865dca4fc..51832ac1caa3 100644 --- a/flow-typed/npm/parseargs_v0.11.x.js +++ b/flow-typed/npm/parseargs_v0.11.x.js @@ -10,31 +10,30 @@ */ declare module '@pkgjs/parseargs' { - declare type ParseArgsOptionConfig = { - type: 'string' | 'boolean', - short?: string, - multiple?: boolean, - }; - - declare type ParseArgsOptionsConfig = { - [longOption: string]: ParseArgsOptionConfig, - }; - - declare export type ParseArgsConfig = { + declare export function parseArgs< + TOptions: {[string]: util$ParseArgsOption} = {}, + >(config: { + args?: Array, + options?: TOptions, strict?: boolean, allowPositionals?: boolean, - tokens?: boolean, - options?: ParseArgsOptionsConfig, - args?: string[], + tokens?: false, + }): { + values: util$ParseArgsOptionsToValues, + positionals: Array, }; - declare type ParsedResults = { - values: { - [longOption: string]: void | string | boolean | Array, - }, - positionals: string[], - ... + declare export function parseArgs< + TOptions: {[string]: util$ParseArgsOption} = {}, + >(config: { + args?: Array, + options?: TOptions, + strict?: boolean, + allowPositionals?: boolean, + tokens: true, + }): { + values: util$ParseArgsOptionsToValues, + positionals: Array, + tokens: Array, }; - - declare export function parseArgs(config: ParseArgsConfig): ParsedResults; } diff --git a/flow-typed/npm/selfsigned_v2.x.x.js b/flow-typed/npm/selfsigned_v2.x.x.js new file mode 100644 index 000000000000..be353372f138 --- /dev/null +++ b/flow-typed/npm/selfsigned_v2.x.x.js @@ -0,0 +1,101 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 + */ + +declare module 'selfsigned' { + declare interface SelfsignedOptions { + /** + * The number of days before expiration + * + * @default 365 */ + days?: number; + + /** + * The date before which the certificate should not be valid + * + * @default now */ + notBeforeDate?: Date; + + /** + * the size for the private key in bits + * @default 1024 + */ + keySize?: number; + /** + * additional extensions for the certificate + */ + extensions?: mixed[]; + /** + * The signature algorithm sha256 or sha1 + * @default "sha1" + */ + algorithm?: string; + /** + * include PKCS#7 as part of the output + * @default false + */ + pkcs7?: boolean; + /** + * generate client cert signed by the original key + * @default false + */ + clientCertificate?: boolean; + /** + * client certificate's common name + * @default "John Doe jdoe123" + */ + clientCertificateCN?: string; + /** + * the size for the client private key in bits + * @default 1024 + */ + clientCertificateKeySize?: number; + } + + declare interface GenerateResult { + private: string; + public: string; + cert: string; + fingerprint: string; + } + + declare export function generate( + attrs?: pki$CertificateField[], + opts?: SelfsignedOptions, + ): GenerateResult; + + declare export function generate( + attrs?: pki$CertificateField[], + opts?: SelfsignedOptions, + /** Optional callback, if not provided the generation is synchronous */ + done?: (err: void | Error, result: GenerateResult) => mixed, + ): void; + + // definitions from node-forge's `pki` and `asn1` namespaces + declare interface pki$CertificateFieldOptions { + name?: string | void; + type?: string | void; + shortName?: string | void; + } + + declare enum asn1$Class { + UNIVERSAL = 0x00, + APPLICATION = 0x40, + CONTEXT_SPECIFIC = 0x80, + PRIVATE = 0xc0, + } + + declare interface pki$CertificateField extends pki$CertificateFieldOptions { + valueConstructed?: boolean | void; + valueTagClass?: asn1$Class | void; + value?: mixed[] | string | void; + extensions?: mixed[] | void; + } +} diff --git a/flow-typed/npm/serve-static_v1.x.x.js b/flow-typed/npm/serve-static_v1.x.x.js new file mode 100644 index 000000000000..5267abd4894d --- /dev/null +++ b/flow-typed/npm/serve-static_v1.x.x.js @@ -0,0 +1,122 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 'serve-static' { + import type {NextHandleFunction} from 'connect'; + import type http from 'http'; + + declare export type Options = $ReadOnly<{ + /** + * Enable or disable accepting ranged requests, defaults to true. Disabling + * this will not send `Accept-Ranges` and ignore the contents of the + * `Range` request header. + */ + acceptRanges?: boolean, + + /** + * Enable or disable setting `Cache-Control` response header, defaults to + * true. Disabling this will ignore the `immutable` and `maxAge` options. + */ + cacheControl?: boolean, + + /** + * Set how "dotfiles" are treated when encountered. A dotfile is a file or + * directory that begins with a dot ("."). + * + * Note this check is done on the path itself without checking if the path + * actually exists on the disk. If `root` is specified, only the dotfiles + * above the root are checked (i.e. the root itself can be within a dotfile + * when when set to "deny"). + * + * The default value is 'ignore'. + * + * 'allow' No special treatment for dotfiles + * 'deny' Send a 403 for any request for a dotfile + * 'ignore' Pretend like the dotfile does not exist and call next() + */ + dotfiles?: string, + + /** + * Enable or disable etag generation, defaults to true. + */ + etag?: boolean, + + /** + * Set file extension fallbacks. When set, if a file is not found, the + * given extensions will be added to the file name and search for. + * The first that exists will be served. Example: ['html', 'htm']. + * + * The default value is false. + */ + extensions?: Array | false, + + /** + * Let client errors fall-through as unhandled requests, otherwise forward + * a client error. + * + * The default value is true. + */ + fallthrough?: boolean, + + /** + * Enable or disable the immutable directive in the `Cache-Control` response + * header. + * + * If enabled, the `maxAge` option should also be specified to enable + * caching. The immutable directive will prevent supported clients from + * making conditional requests during the life of the maxAge option to + * check if the file has changed. + */ + immutable?: boolean, + + /** + * By default this module will send "index.html" files in response to a + * request on a directory. To disable this set false or to supply a new + * index pass a string or an array in preferred order. + */ + index?: boolean | string | Array, + + /** + * Enable or disable `Last-Modified` header, defaults to true. Uses the file + * system's last modified value. + */ + lastModified?: boolean, + + /** + * Provide a max-age in milliseconds for http caching, defaults to 0. This + * can also be a string accepted by the `ms` module. + */ + maxAge?: number | string, + + /** + * Redirect to trailing "/" when the pathname is a dir. Defaults to true. + */ + redirect?: boolean, + + /** + * Function to set custom headers on response. Alterations to the headers + * need to occur synchronously. + * + * The function is called as `fn(res, path, stat)`, where the arguments are: + * `res` the response object + * `path` the file path that is being sent + * `stat` the stat object of the file that is being sent + */ + setHeaders?: (res: http.ServerResponse, path: string, stat: any) => any, + }>; + + declare type serveStatic = ( + root: string, + options?: Options, + ) => NextHandleFunction; + + declare module.exports: serveStatic; +} diff --git a/flow-typed/npm/shelljs_v0.x.x.js b/flow-typed/npm/shelljs_v0.x.x.js new file mode 100644 index 000000000000..b1bff7b8402d --- /dev/null +++ b/flow-typed/npm/shelljs_v0.x.x.js @@ -0,0 +1,348 @@ +/** + * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + * + * @flow + * @format + */ + +'use strict'; + +// https://github.com/flow-typed/flow-typed/blob/master/definitions/npm/shelljs_v0.7.x/flow_v0.28.x-v0.32.x/shelljs_v0.7.x.js + +declare type $npm$shelljs$Array = Array & $npm$shelljs$Result; +declare type $npm$shelljs$Async = Class; +declare type $npm$shelljs$Pattern = RegExp | String | string; +declare type $npm$shelljs$String = String & $npm$shelljs$Result; + +declare interface $npm$shelljs$Config { + fatal: boolean; + globOpts: { + nodir: boolean, + ... + }; + silent: boolean; + verbose: boolean; +} +declare interface $npm$shelljs$Env { + [key: string]: string; +} + +declare type $npm$shelljs$OptionsPoly = { + [keys: Flags]: boolean, + ... +}; +declare interface $npm$shelljs$ExecThen { + (code: number, stdout: string, stderr: string): void; +} +declare type $npm$shelljs$ExecOptionsPoly = T & { + async?: boolean, + silent?: boolean, + ... +}; +declare type $npm$shelljs$ExecOpts = + $npm$shelljs$ExecOptionsPoly; +declare type $npm$shelljs$ExecOptsSync = + $npm$shelljs$ExecOptionsPoly; +declare type $npm$shelljs$GrepOpts = $npm$shelljs$OptionsPoly<'-l' | '-v'>; +declare type $npm$shelljs$SedOpts = $npm$shelljs$OptionsPoly<'-i'>; +declare type $npm$shelljs$SortOpts = $npm$shelljs$OptionsPoly<'-n' | '-r'>; +declare type $npm$shelljs$TestOpts = + | '-b' + | '-c' + | '-d' + | '-e' + | '-f' + | '-L' + | '-p' + | '-S'; +declare type $npm$shelljs$TouchOpts = { + [key: '-a' | '-c' | '-m']: boolean, + '-d'?: string, + '-r'?: string, + ... +}; + +// dupe from flow lib until we can import +declare interface $npm$shelljs$FileStats { + atime: Date; + birthtime: Date; // FIXME: add to flow lib + blksize: number; + blocks: number; + ctime: Date; + dev: number; + gid: number; + ino: number; + mode: number; + mtime: Date; + name: string; // NOTE: specific to shelljs + nlink: number; + rdev: number; + size: number; + uid: number; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isDirectory(): boolean; + isFIFO(): boolean; + isFile(): boolean; + isSocket(): boolean; + isSymbolicLink(): boolean; +} + +declare interface $npm$shelljs$Result { + code: number; + stdout: string; + stderr: string; + to(file: string): $npm$shelljs$String; + toEnd(file: string): $npm$shelljs$String; + cat: (rest: void) => $npm$shelljs$String; + exec: (( + cmd: string, + opts: $npm$shelljs$ExecOpts & {async: true, ...}, + then: $npm$shelljs$ExecThen, + rest: void, + ) => $npm$shelljs$Async) & + (( + cmd: string, + opts: $npm$shelljs$ExecOpts & {async: true, ...}, + rest: void, + ) => $npm$shelljs$Async) & + (( + cmd: string, + opts: $npm$shelljs$ExecOptsSync, + rest: void, + ) => $npm$shelljs$String) & + ((cmd: string, rest: void) => $npm$shelljs$String) & + (( + cmd: string, + then: $npm$shelljs$ExecThen, + rest: void, + ) => $npm$shelljs$Async); + grep: (( + opts: $npm$shelljs$GrepOpts, + rx: $npm$shelljs$Pattern, + rest: void, + ) => $npm$shelljs$String) & + ((rx: $npm$shelljs$Pattern, rest: void) => $npm$shelljs$String); + head: ((num: number, rest: void) => $npm$shelljs$String) & + ((rest: void) => $npm$shelljs$String); + sed: ( + rx: $npm$shelljs$Pattern, + subst: string, + rest: void, + ) => $npm$shelljs$String; + sort: ((opts: $npm$shelljs$SortOpts, rest: void) => $npm$shelljs$String) & + ((rest: void) => $npm$shelljs$String); + tail: ((num: number, rest: void) => $npm$shelljs$String) & + ((rest: void) => $npm$shelljs$String); +} + +// $FlowFixMe[unsupported-syntax] +declare module 'shelljs' { + declare export type ShellArray = $npm$shelljs$Array; + declare export type ShellAsync = $npm$shelljs$Async; + declare export type ShellOptionsPoly = + $npm$shelljs$OptionsPoly; + declare export type ShellConfig = $npm$shelljs$Config; + declare export type ShellEnv = $npm$shelljs$Env; + declare export type ShellFileStats = $npm$shelljs$FileStats; + declare export type ShellPattern = $npm$shelljs$Pattern; + declare export type ShellResult = $npm$shelljs$Result; + declare export type ShellString = $npm$shelljs$String; + + declare export type ChmodOpts = ShellOptionsPoly<'-R' | '-c' | '-v'>; + declare export type CpOpts = ShellOptionsPoly< + '-P' | '-L' | '-R' | '-f' | '-n', + >; + declare export type DirsOpts = '-c'; + declare export // FIXME + type DirsIdx = + | '-0' + | '-1' + | '-2' + | '-3' + | '-4' + | '-5' + | '-6' + | '-7' + | '-8' + | '-9' + | '-10' + | '-11' + | '-12' + | '-13' + | '-14' + | '-15' + | '-16' + | '-17' + | '-18' + | '-19' + | '-20' + | '-21' + | '-22' + | '-23' + | '-24' + | '-25' + | '-26' + | '-27' + | '-28' + | '-29' + | '-30' + | '-31' + | '+0' + | '+1' + | '+2' + | '+3' + | '+4' + | '+5' + | '+6' + | '+7' + | '+8' + | '+9' + | '+10' + | '+11' + | '+12' + | '+13' + | '+14' + | '+15' + | '+16' + | '+17' + | '+18' + | '+19' + | '+20' + | '+21' + | '+22' + | '+23' + | '+24' + | '+25' + | '+26' + | '+27' + | '+28' + | '+29' + | '+30' + | '+31'; + declare export type ExecOpts = $npm$shelljs$ExecOpts; + declare export type ExecOptsSync = $npm$shelljs$ExecOptsSync; + declare export type ExecThen = $npm$shelljs$ExecThen; + declare export type GrepOpts = $npm$shelljs$GrepOpts; + declare export type LnOpts = ShellOptionsPoly<'-f' | '-s'>; + declare export type LsOpts = ShellOptionsPoly<'-A' | '-R' | '-d' | '-l'>; + declare export type MkdirOpts = ShellOptionsPoly<'-p'>; + declare export type MvOpts = ShellOptionsPoly<'-f' | '-n'>; + declare export type PopdOpts = ShellOptionsPoly<'-n'>; + declare export type PushdOpts = ShellOptionsPoly<'-n'>; + declare export type RmOpts = ShellOptionsPoly<'-f' | '-r'>; + declare export type SedOpts = $npm$shelljs$SedOpts; + declare export type SortOpts = $npm$shelljs$SortOpts; + declare export type TestOpts = $npm$shelljs$TestOpts; + declare export type TouchOpts = $npm$shelljs$TouchOpts; + + declare module.exports: { + ShellString: (( + stdout: string, + stderr?: string, + code?: number, + ) => ShellString) & + ((stdout: T[], stderr?: string, code?: number) => ShellArray), + config: ShellConfig, + env: ShellEnv, + cat: (glob: string, ...rest: string[]) => ShellString, + cd: ((dir: string, rest: void) => ShellString) & + ((rest: void) => ShellString), + chmod: (( + opts: ChmodOpts, + mode: number | string, + glob: string, + ...rest: string[] + ) => ShellString) & + ((mode: number | string, glob: string, ...rest: string[]) => ShellString), + cp: (( + opts: CpOpts, + src: string, + next: string, + ...rest: string[] + ) => ShellString) & + ((src: string, next: string, ...rest: string[]) => ShellString), + dirs: ((idxOrOpts: DirsIdx | DirsOpts, rest: void) => string[]) & + ((rest: void) => string[]), + echo: (...rest: (number | string | String)[]) => ShellString, // FIXME: consider allowing more input types + error: (rest: void) => ?string, + exec: (( + cmd: string, + opts: ExecOpts & {async: true, ...}, + then: ExecThen, + rest: void, + ) => ShellAsync) & + (( + cmd: string, + opts: ExecOpts & {async: true, ...}, + rest: void, + ) => ShellAsync) & + ((cmd: string, opts: ExecOptsSync, rest: void) => ShellString) & + ((cmd: string, rest: void) => ShellString) & + ((cmd: string, then: ExecThen, rest: void) => ShellAsync), + exit: ((code: number, rest: void) => void) & ((rest: void) => void), + find: (glob: string, ...rest: string[]) => ShellArray, + grep: (( + opts: GrepOpts, + rx: ShellPattern, + glob: string, + ...rest: string[] + ) => ShellString) & + ((rx: ShellPattern, glob: string, ...rest: string[]) => ShellString), + head: ((num: number, glob: string, ...rest: string[]) => ShellString) & + ((glob: string, ...rest: string[]) => ShellString), + ln: ((opts: LnOpts, src: string, tgt: string, rest: void) => ShellString) & + ((src: string, tgt: string, rest: void) => ShellString), + ls: (( + opts: LsOpts & {'-l': true, ...}, + glob: string, + ...rest: string[] + ) => ShellArray) & + ((opts: LsOpts, glob: string, ...rest: string[]) => ShellArray) & + ((glob: string, ...rest: string[]) => ShellArray), + mkdir: ((opts: MkdirOpts, dir: string, ...rest: string[]) => ShellString) & + ((dir: string, ...rest: string[]) => ShellString), + mv: (( + opts: MvOpts, + src: string, + next: string, + ...rest: string[] + ) => ShellString) & + ((src: string, next: string, ...rest: string[]) => ShellString), + popd: ((opts: PopdOpts, idx: string, rest: void) => string[]) & + ((opts: PopdOpts, rest: void) => string[]) & + ((idx: string, rest: void) => string[]) & + ((rest: void) => string[]), + pushd: ((opts: PushdOpts, dirOrIdx: string, rest: void) => string[]) & + ((dirOrIdx: string, rest: void) => string[]), + pwd: (rest: void) => ShellString, + rm: ((opts: RmOpts, glob: string, ...rest: string[]) => ShellString) & + ((glob: string, ...rest: string[]) => ShellString), + sed: (( + opts: SedOpts, + rx: ShellPattern, + subst: string, + glob: string, + ...rest: string[] + ) => ShellString) & + (( + rx: ShellPattern, + subst: string, + glob: string, + ...rest: string[] + ) => ShellString), + set: ((exitOnError: '-e' | '+e', rest: void) => void) & + ((verbose: '-v' | '+v', rest: void) => void) & + ((disableGlobbing: '-f' | '+f', rest: void) => void), + sort: ((opts: SortOpts, glob: string, ...rest: string[]) => ShellString) & + ((glob: string, ...rest: string[]) => ShellString), + tail: ((num: number, glob: string, ...rest: string[]) => ShellString) & + ((glob: string, ...rest: string[]) => ShellString), + tempdir: (rest: void) => string, + test: (mode: TestOpts, path: string, rest: void) => boolean, + touch: ((opts: TouchOpts, glob: string, ...rest: string[]) => ShellString) & + ((glob: string, ...rest: string[]) => ShellString), + which: (cmd: string, rest: void) => ShellString, + ... + }; +} diff --git a/flow-typed/npm/signedsource_v1.x.x.js b/flow-typed/npm/signedsource_v1.x.x.js new file mode 100644 index 000000000000..2bebd077442d --- /dev/null +++ b/flow-typed/npm/signedsource_v1.x.x.js @@ -0,0 +1,19 @@ +/** + * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + * + * @format + * @flow strict + */ + +declare module 'signedsource' { + declare type SignedSource = { + TokenNotFoundError: Error, + getSigningToken(): string, + isSigned(data: string): boolean, + signFile(data: string): string, + verifySignature(data: string): boolean, + [key: string]: mixed, + }; + + declare module.exports: SignedSource; +} diff --git a/flow-typed/npm/undici_v5.x.x.js b/flow-typed/npm/undici_v5.x.x.js new file mode 100644 index 000000000000..48360acd2330 --- /dev/null +++ b/flow-typed/npm/undici_v5.x.x.js @@ -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 + * @oncall react_native + */ + +// Very incomplete types for the undici package. + +declare interface undici$Agent$Options { + connect?: tls$connectOptions; +} + +declare module 'undici' { + declare export class Dispatcher extends events$EventEmitter { + constructor(): void; + } + + declare export class Agent extends Dispatcher { + constructor(opts?: undici$Agent$Options): void; + } +} diff --git a/flow-typed/npm/wait-for-expect_v3.x.x.js b/flow-typed/npm/wait-for-expect_v3.x.x.js new file mode 100644 index 000000000000..3220e66276f1 --- /dev/null +++ b/flow-typed/npm/wait-for-expect_v3.x.x.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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +declare module 'wait-for-expect' { + declare export default (( + expectation: () => void | Promise, + timeout?: number, + interval?: number, + ) => Promise) & { + defaults: { + timeout: number, + interval: number, + }, + }; +} diff --git a/flow-typed/npm/ws_v7.x.x.js b/flow-typed/npm/ws_v7.x.x.js index c2759dbb18c4..f05b8fac03d4 100644 --- a/flow-typed/npm/ws_v7.x.x.js +++ b/flow-typed/npm/ws_v7.x.x.js @@ -125,6 +125,7 @@ declare type ws$WebSocketOptions = { createConnection?: | ((options: net$connectOptions, callback?: () => mixed) => net$Socket) | ((options: tls$connectOptions, callback?: () => mixed) => tls$TLSSocket), + rejectUnauthorized?: boolean, }; declare type ws$CloseListener = (code: number, reason: string) => mixed; diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135c49b7..d64cd4917707 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d11cdd907dd9..2ea3535dc058 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index fcb6fca147c0..1aa94a426907 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 6689b85beecd..7101f8e4676f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/jest.config.js b/jest.config.js index 41298f39217c..eb43b0845add 100644 --- a/jest.config.js +++ b/jest.config.js @@ -31,8 +31,10 @@ module.exports = { testPathIgnorePatterns: [ '/node_modules/', '/packages/react-native/template', + '/packages/react-native/sdks', '/packages/react-native/Libraries/Renderer', '/packages/rn-tester/e2e', + '/packages/react-native-test-renderer/src', ], transformIgnorePatterns: ['node_modules/(?!@react-native/)'], haste: { @@ -46,6 +48,7 @@ module.exports = { '/packages/react-native/jest/ReactNativeInternalFeatureFlagsMock.js', }, moduleFileExtensions: ['fb.js'].concat(defaults.moduleFileExtensions), + modulePathIgnorePatterns: ['scripts/.*/__fixtures__/'], unmockedModulePathPatterns: [ 'node_modules/react/', 'packages/react-native/Libraries/Renderer', @@ -55,7 +58,10 @@ module.exports = { 'denodeify', ], testEnvironment: 'node', - collectCoverageFrom: ['packages/react-native/Libraries/**/*.js'], + collectCoverageFrom: [ + 'packages/react-native/Libraries/**/*.js', + 'packages/react-native/src/**/*.js', + ], coveragePathIgnorePatterns: [ '/__tests__/', '/vendor/', diff --git a/jest/preprocessor.js b/jest/preprocessor.js index ae9f6dd90b93..940806557638 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -12,6 +12,8 @@ 'use strict'; +/* eslint-disable lint/sort-imports */ + const metroBabelRegister = require('metro-babel-register'); const nullthrows = require('nullthrows'); const createCacheKeyFunction = @@ -36,6 +38,16 @@ const {only: _, ...nodeBabelOptions} = metroBabelRegister.config([]); require('../scripts/build/babel-register').registerForMonorepo(); const transformer = require('@react-native/metro-babel-transformer'); +// Set BUILD_EXCLUDE_BABEL_REGISTER (see ../scripts/build/babel-register.js) to +// prevent inline Babel registration in code under test, normally required when +// running from source, but not in combination with the Jest transformer. +const babelPluginPreventBabelRegister = [ + require.resolve('babel-plugin-transform-define'), + { + 'process.env.BUILD_EXCLUDE_BABEL_REGISTER': true, + }, +]; + module.exports = { process(src /*: string */, file /*: string */) /*: {code: string, ...} */ { if (nodeFiles.test(file)) { @@ -44,6 +56,10 @@ module.exports = { filename: file, sourceType: 'script', ...nodeBabelOptions, + plugins: [ + ...(nodeBabelOptions.plugins ?? []), + babelPluginPreventBabelRegister, + ], ast: false, }); } @@ -76,6 +92,7 @@ module.exports = { plugins: [ // TODO(moti): Replace with require('metro-transform-plugins').inlineRequiresPlugin when available in OSS require('babel-preset-fbjs/plugins/inline-requires'), + babelPluginPreventBabelRegister, ], sourceType: 'module', }); diff --git a/package.json b/package.json index 6735766f6cc5..e5e21a3dbb01 100644 --- a/package.json +++ b/package.json @@ -14,28 +14,31 @@ "android": "cd packages/rn-tester && npm run android", "build-android": "./gradlew :packages:react-native:ReactAndroid:build", "build": "node ./scripts/build/build.js", - "bump-all-updated-packages": "node ./scripts/monorepo/bump-all-updated-packages", "clang-format": "clang-format -i --glob=*/**/*.{h,cpp,m,mm}", "clean": "node ./scripts/build/clean.js", "flow-check": "flow check", "flow": "flow", "format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"", "format": "npm run prettier && npm run clang-format", + "featureflags-check": "cd packages/react-native && yarn featureflags-check", + "featureflags-update": "cd packages/react-native && yarn featureflags-update", "lint-ci": "./scripts/circleci/analyze_code.sh && yarn shellcheck", "lint-java": "node ./scripts/lint-java.js", "lint": "eslint .", "prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"", + "print-packages": "node ./scripts/monorepo/print", "shellcheck": "./scripts/circleci/analyze_scripts.sh", "start": "cd packages/rn-tester && npm run start", + "set-version": "node ./scripts/releases/set-version", "test-android": "./gradlew :packages:react-native:ReactAndroid:test", "test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"", - "test-e2e-local-clean": "node ./scripts/test-e2e-local-clean.js", - "test-e2e-local": "node ./scripts/test-e2e-local.js", + "test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js", + "test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js", "test-ios": "./scripts/objc-test.sh test", "test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types", "test-typescript": "dtslint packages/react-native/types", "test": "jest", - "trigger-react-native-release": "node ./scripts/trigger-react-native-release.js", + "trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js", "update-lock": "npx yarn-deduplicate" }, "workspaces": [ @@ -55,11 +58,11 @@ "@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.74.88", + "@react-native/metro-config": "0.74.88", "@tsconfig/node18": "1.0.1", - "@types/react": "^18.0.18", - "@typescript-eslint/parser": "^5.57.1", + "@types/react": "^18.2.6", + "@typescript-eslint/parser": "^7.1.1", "ansi-styles": "^4.2.1", "async": "^3.2.2", "babel-plugin-minify-dead-code-elimination": "^0.5.2", @@ -74,7 +77,7 @@ "eslint-plugin-babel": "^5.3.1", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-ft-flow": "^2.0.1", - "eslint-plugin-jest": "^26.5.3", + "eslint-plugin-jest": "^27.9.0", "eslint-plugin-jsx-a11y": "^6.6.0", "eslint-plugin-lint": "^1.0.0", "eslint-plugin-prettier": "^4.2.1", @@ -83,22 +86,24 @@ "eslint-plugin-react-native": "^4.0.0", "eslint-plugin-redundant-undefined": "^0.4.0", "eslint-plugin-relay": "^1.8.3", - "flow-api-translator": "0.15.0", - "flow-bin": "^0.217.0", + "flow-api-translator": "0.19.1", + "flow-bin": "^0.228.0", "glob": "^7.1.1", - "hermes-eslint": "0.15.0", + "hermes-eslint": "0.19.1", + "hermes-transform": "0.19.1", "inquirer": "^7.1.0", "jest": "^29.6.3", "jest-junit": "^10.0.0", "jscodeshift": "^0.14.0", - "metro-babel-register": "0.79.1", - "metro-memory-fs": "0.79.1", + "metro-babel-register": "^0.80.0", + "metro-memory-fs": "^0.80.0", "micromatch": "^4.0.4", "mkdirp": "^0.5.1", "mock-fs": "^5.1.4", + "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", "prettier": "2.8.8", - "prettier-plugin-hermes-parser": "0.14.0", + "prettier-plugin-hermes-parser": "0.19.1", "react": "18.2.0", "react-test-renderer": "18.2.0", "rimraf": "^3.0.2", @@ -107,5 +112,6 @@ "supports-color": "^7.1.0", "typescript": "5.0.4", "ws": "^6.2.2" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/packages/assets/package.json b/packages/assets/package.json index c8e5100a2cc4..745d99aad9a7 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.74.88", "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/__tests__/index-test.js b/packages/babel-plugin-codegen/__tests__/index-test.js index 20195b5ea403..1f73d1975786 100644 --- a/packages/babel-plugin-codegen/__tests__/index-test.js +++ b/packages/babel-plugin-codegen/__tests__/index-test.js @@ -10,9 +10,9 @@ 'use strict'; -const {transform: babelTransform} = require('@babel/core'); -const fixtures = require('../__test_fixtures__/fixtures.js'); const failures = require('../__test_fixtures__/failures.js'); +const fixtures = require('../__test_fixtures__/fixtures.js'); +const {transform: babelTransform} = require('@babel/core'); const transform = (fixture, filename) => babelTransform(fixture, { diff --git a/packages/babel-plugin-codegen/index.js b/packages/babel-plugin-codegen/index.js index 4314e6d50eb5..77de6b77b33a 100644 --- a/packages/babel-plugin-codegen/index.js +++ b/packages/babel-plugin-codegen/index.js @@ -76,7 +76,16 @@ function isCodegenDeclaration(declaration) { ) { return true; } else if ( - declaration.type === 'TypeCastExpression' && + (declaration.type === 'TypeCastExpression' || + declaration.type === 'AsExpression') && + declaration.expression && + declaration.expression.callee && + declaration.expression.callee.name && + declaration.expression.callee.name === 'codegenNativeComponent' + ) { + return true; + } else if ( + declaration.type === 'TSAsExpression' && declaration.expression && declaration.expression.callee && declaration.expression.callee.name && diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 3d85ab95eba7..f73312884fa2 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.74.88", "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" @@ -18,7 +25,7 @@ "index.js" ], "dependencies": { - "@react-native/codegen": "*" + "@react-native/codegen": "0.74.88" }, "devDependencies": { "@babel/core": "^7.20.0" diff --git a/packages/community-cli-plugin/README.md b/packages/community-cli-plugin/README.md index 3cf597929eb1..aebbf39d106f 100644 --- a/packages/community-cli-plugin/README.md +++ b/packages/community-cli-plugin/README.md @@ -59,6 +59,7 @@ npx react-native bundle --entry-file [options] | `--minify [boolean]` | Allows overriding whether bundle is minified. Defaults to `false` if `--dev` is set. Disabling minification can be useful for speeding up production builds for testing purposes. | | `--bundle-output ` | Specify the path to store the resulting bundle. | | `--bundle-encoding ` | Specify the encoding for writing the bundle (). | +| `--resolver-option ` | Custom resolver options of the form key=value. URL-encoded. May be specified multiple times. | | `--sourcemap-output ` | Specify the path to store the source map file for the resulting bundle. | | `--sourcemap-sources-root ` | Set the root path for source map entries. | | `--sourcemap-use-absolute-path` | Report `SourceMapURL` using its full path. | diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 3f47a0363900..966143d83082 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -1,12 +1,12 @@ { "name": "@react-native/community-cli-plugin", - "version": "0.73.1", + "version": "0.74.88", "description": "Core CLI commands for React Native", "keywords": [ "react-native", "tools" ], - "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/buid-scripts#readme", + "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/community-cli-plugin#readme", "bugs": "https://github.com/facebook/react-native/issues", "repository": { "type": "git", @@ -22,20 +22,21 @@ "dist" ], "dependencies": { - "@react-native/dev-middleware": "^0.73.0", - "@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-community/cli-server-api": "13.6.9", + "@react-native-community/cli-tools": "13.6.9", + "@react-native/dev-middleware": "0.74.88", + "@react-native/metro-babel-transformer": "0.74.88", "chalk": "^4.0.0", "execa": "^5.1.1", - "metro": "0.79.1", - "metro-config": "0.79.1", - "metro-core": "0.79.1", + "metro": "^0.80.3", + "metro-config": "^0.80.3", + "metro-core": "^0.80.3", "node-fetch": "^2.2.0", + "querystring": "^0.2.1", "readline": "^1.3.0" }, "devDependencies": { - "metro-resolver": "0.79.1" + "metro-resolver": "^0.80.3" }, "engines": { "node": ">=18" diff --git a/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathAndroid-test.js b/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathAndroid-test.js index 3f5074674e3f..27ce49565abc 100644 --- a/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathAndroid-test.js +++ b/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathAndroid-test.js @@ -11,10 +11,10 @@ import getAssetDestPathAndroid from '../getAssetDestPathAndroid'; -jest.dontMock('../getAssetDestPathAndroid').dontMock('../assetPathUtils'); - const path = require('path'); +jest.dontMock('../getAssetDestPathAndroid').dontMock('../assetPathUtils'); + describe('getAssetDestPathAndroid', () => { test('should use the right destination folder', () => { const asset = { diff --git a/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathIOS-test.js b/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathIOS-test.js index 1e807f123913..2709141eba79 100644 --- a/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathIOS-test.js +++ b/packages/community-cli-plugin/src/commands/bundle/__tests__/getAssetDestPathIOS-test.js @@ -11,10 +11,10 @@ import getAssetDestPathIOS from '../getAssetDestPathIOS'; -jest.dontMock('../getAssetDestPathIOS'); - const path = require('path'); +jest.dontMock('../getAssetDestPathIOS'); + describe('getAssetDestPathIOS', () => { test('should build correct path', () => { const asset = { diff --git a/packages/community-cli-plugin/src/commands/bundle/assetCatalogIOS.js b/packages/community-cli-plugin/src/commands/bundle/assetCatalogIOS.js index 7b6c1acb0176..8ef0b9d35adb 100644 --- a/packages/community-cli-plugin/src/commands/bundle/assetCatalogIOS.js +++ b/packages/community-cli-plugin/src/commands/bundle/assetCatalogIOS.js @@ -11,16 +11,16 @@ import type {AssetData} from 'metro/src/Assets'; -import path from 'path'; -import fs from 'fs'; import assetPathUtils from './assetPathUtils'; +import fs from 'fs'; +import path from 'path'; export function cleanAssetCatalog(catalogDir: string): void { const files = fs .readdirSync(catalogDir) .filter(file => file.endsWith('.imageset')); for (const file of files) { - fs.rmSync(path.join(catalogDir, file)); + fs.rmSync(path.join(catalogDir, file), {recursive: true, force: true}); } } diff --git a/packages/community-cli-plugin/src/commands/bundle/buildBundle.js b/packages/community-cli-plugin/src/commands/bundle/buildBundle.js index 525f46748bb8..98aac3b8fa5c 100644 --- a/packages/community-cli-plugin/src/commands/bundle/buildBundle.js +++ b/packages/community-cli-plugin/src/commands/bundle/buildBundle.js @@ -10,17 +10,18 @@ */ import type {Config} from '@react-native-community/cli-types'; -import type {RequestOptions} from 'metro/src/shared/types.flow'; import type {ConfigT} from 'metro-config'; +import type {RequestOptions} from 'metro/src/shared/types.flow'; +import loadMetroConfig from '../../utils/loadMetroConfig'; +import parseKeyValueParamArray from '../../utils/parseKeyValueParamArray'; +import saveAssets from './saveAssets'; +import {logger} from '@react-native-community/cli-tools'; +import chalk from 'chalk'; import Server from 'metro/src/Server'; import metroBundle from 'metro/src/shared/output/bundle'; import metroRamBundle from 'metro/src/shared/output/RamBundle'; import path from 'path'; -import chalk from 'chalk'; -import saveAssets from './saveAssets'; -import loadMetroConfig from '../../utils/loadMetroConfig'; -import {logger} from '@react-native-community/cli-tools'; export type BundleCommandArgs = { assetsDest?: string, @@ -42,6 +43,7 @@ export type BundleCommandArgs = { verbose: boolean, unstableTransformProfile: string, indexedRamBundle?: boolean, + resolverOption?: Array, }; async function buildBundle( @@ -64,6 +66,10 @@ async function buildBundleWithConfig( config: ConfigT, bundleImpl: typeof metroBundle | typeof metroRamBundle = metroBundle, ): Promise { + const customResolverOptions = parseKeyValueParamArray( + args.resolverOption ?? [], + ); + if (config.resolver.platforms.indexOf(args.platform) === -1) { logger.error( `Invalid platform ${ @@ -99,6 +105,7 @@ async function buildBundleWithConfig( minify: args.minify !== undefined ? args.minify : !args.dev, platform: args.platform, unstable_transformProfile: args.unstableTransformProfile, + customResolverOptions, }; const server = new Server(config); diff --git a/packages/community-cli-plugin/src/commands/bundle/getAssetDestPathAndroid.js b/packages/community-cli-plugin/src/commands/bundle/getAssetDestPathAndroid.js index 20f9ec781c3c..5e005112ce62 100644 --- a/packages/community-cli-plugin/src/commands/bundle/getAssetDestPathAndroid.js +++ b/packages/community-cli-plugin/src/commands/bundle/getAssetDestPathAndroid.js @@ -11,8 +11,8 @@ import type {PackagerAsset} from './assetPathUtils'; -import path from 'path'; import assetPathUtils from './assetPathUtils'; +import path from 'path'; function getAssetDestPathAndroid(asset: PackagerAsset, scale: number): string { const androidFolder = assetPathUtils.getAndroidResourceFolderName( diff --git a/packages/community-cli-plugin/src/commands/bundle/index.js b/packages/community-cli-plugin/src/commands/bundle/index.js index 6a480c4e333a..1e8522a845cf 100644 --- a/packages/community-cli-plugin/src/commands/bundle/index.js +++ b/packages/community-cli-plugin/src/commands/bundle/index.js @@ -11,8 +11,8 @@ import type {Command} from '@react-native-community/cli-types'; -import path from 'path'; import buildBundle from './buildBundle'; +import path from 'path'; export type {BundleCommandArgs} from './buildBundle'; @@ -114,6 +114,13 @@ const bundleCommand: Command = { description: 'Path to the CLI configuration file', parse: (val: string): string => path.resolve(val), }, + { + name: '--resolver-option ', + description: + 'Custom resolver options of the form key=value. URL-encoded. May be specified multiple times.', + parse: (val: string, previous: Array = []): Array => + previous.concat([val]), + }, ], }; diff --git a/packages/community-cli-plugin/src/commands/bundle/saveAssets.js b/packages/community-cli-plugin/src/commands/bundle/saveAssets.js index b4183c31e056..1aae31542fdc 100644 --- a/packages/community-cli-plugin/src/commands/bundle/saveAssets.js +++ b/packages/community-cli-plugin/src/commands/bundle/saveAssets.js @@ -11,9 +11,6 @@ import type {AssetData} from 'metro/src/Assets'; -import {logger} from '@react-native-community/cli-tools'; -import fs from 'fs'; -import path from 'path'; import { cleanAssetCatalog, getImageSet, @@ -23,6 +20,9 @@ import { import filterPlatformAssetScales from './filterPlatformAssetScales'; import getAssetDestPathAndroid from './getAssetDestPathAndroid'; import getAssetDestPathIOS from './getAssetDestPathIOS'; +import {logger} from '@react-native-community/cli-tools'; +import fs from 'fs'; +import path from 'path'; type CopiedFiles = { [src: string]: string, diff --git a/packages/community-cli-plugin/src/commands/ram-bundle/index.js b/packages/community-cli-plugin/src/commands/ram-bundle/index.js index 1cf978ffc8d4..eeed0819cfec 100644 --- a/packages/community-cli-plugin/src/commands/ram-bundle/index.js +++ b/packages/community-cli-plugin/src/commands/ram-bundle/index.js @@ -9,12 +9,12 @@ * @oncall react_native */ -import type {Command, Config} from '@react-native-community/cli-types'; import type {BundleCommandArgs} from '../bundle'; +import type {Command, Config} from '@react-native-community/cli-types'; -import metroRamBundle from 'metro/src/shared/output/RamBundle'; import bundleCommand from '../bundle'; import buildBundle from '../bundle/buildBundle'; +import metroRamBundle from 'metro/src/shared/output/RamBundle'; const ramBundleCommand: Command = { name: 'ram-bundle', diff --git a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js index 7ac9a6cffbc7..1278832bc0f6 100644 --- a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js +++ b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js @@ -11,39 +11,34 @@ import type {Config} from '@react-native-community/cli-types'; +import {KeyPressHandler} from '../../utils/KeyPressHandler'; 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'; const CTRL_D = '\u0004'; export default function attachKeyHandlers({ cliConfig, - serverInstance, devServerUrl, messageSocket, + experimentalDebuggerFrontend, }: { cliConfig: Config, devServerUrl: string, - serverInstance: http$Server | https$Server, messageSocket: $ReadOnly<{ broadcast: (type: string, params?: Record | null) => void, ... }>, + experimentalDebuggerFrontend: boolean, }) { if (process.stdin.isTTY !== true) { logger.debug('Interactive mode is not supported in this environment'); return; } - readline.emitKeypressEvents(process.stdin); - // $FlowIgnore[prop-missing] - process.stdin.setRawMode(true); - const execaOptions = { env: {FORCE_COLOR: chalk.supportsColor ? 'true' : 'false'}, }; @@ -51,12 +46,12 @@ export default function attachKeyHandlers({ const onPress = async (key: string) => { switch (key) { case 'r': - messageSocket.broadcast('reload', null); logger.info('Reloading connected app(s)...'); + messageSocket.broadcast('reload', null); break; case 'd': - messageSocket.broadcast('devMenu', null); logger.info('Opening Dev Menu...'); + messageSocket.broadcast('devMenu', null); break; case 'i': logger.info('Opening app on iOS...'); @@ -83,30 +78,35 @@ 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: 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( - ` -${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, Hermes only)`] + : []), + `${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..7cc22efb6618 100644 --- a/packages/community-cli-plugin/src/commands/start/index.js +++ b/packages/community-cli-plugin/src/commands/start/index.js @@ -11,8 +11,8 @@ import type {Command} from '@react-native-community/cli-types'; -import path from 'path'; import runServer from './runServer'; +import path from 'path'; export type {StartCommandArgs} from './runServer'; @@ -95,6 +95,13 @@ const startCommand: Command = { name: '--no-interactive', description: 'Disables interactive mode', }, + { + 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.', + }, ], }; diff --git a/packages/community-cli-plugin/src/commands/start/runServer.js b/packages/community-cli-plugin/src/commands/start/runServer.js index 587f755501c6..7b11adc629b5 100644 --- a/packages/community-cli-plugin/src/commands/start/runServer.js +++ b/packages/community-cli-plugin/src/commands/start/runServer.js @@ -14,25 +14,26 @@ import type {Reporter} from 'metro/src/lib/reporting'; import type {TerminalReportableEvent} from 'metro/src/lib/TerminalReporter'; import typeof TerminalReporter from 'metro/src/lib/TerminalReporter'; -import chalk from 'chalk'; -import Metro from 'metro'; -import {Terminal} from 'metro-core'; -import path from 'path'; -import {createDevMiddleware} from '@react-native/dev-middleware'; +import isDevServerRunning from '../../utils/isDevServerRunning'; +import loadMetroConfig from '../../utils/loadMetroConfig'; +import attachKeyHandlers from './attachKeyHandlers'; import { createDevServerMiddleware, indexPageMiddleware, } from '@react-native-community/cli-server-api'; import {logger, version} from '@react-native-community/cli-tools'; - -import isDevServerRunning from '../../utils/isDevServerRunning'; -import loadMetroConfig from '../../utils/loadMetroConfig'; -import attachKeyHandlers from './attachKeyHandlers'; +import {createDevMiddleware} from '@react-native/dev-middleware'; +import chalk from 'chalk'; +import Metro from 'metro'; +import {Terminal} from 'metro-core'; +import path from 'path'; +import url from 'url'; export type StartCommandArgs = { assetPlugins?: string[], cert?: string, customLogReporterPath?: string, + experimentalDebugger: boolean, host?: string, https?: boolean, maxWorkers?: number, @@ -62,23 +63,18 @@ async function runServer( projectRoot: args.projectRoot, sourceExts: args.sourceExts, }); - const host = args.host?.length ? args.host : 'localhost'; + const hostname = args.host?.length ? args.host : 'localhost'; const { projectRoot, server: {port}, watchFolders, } = metroConfig; - const scheme = args.https === true ? 'https' : 'http'; - const devServerUrl = `${scheme}://${host}:${port}`; + const protocol = args.https === true ? 'https' : 'http'; + const devServerUrl = url.format({protocol, hostname, port}); logger.info(`Welcome to React Native v${ctx.reactNativeVersion}`); - const serverStatus = await isDevServerRunning( - scheme, - host, - port, - projectRoot, - ); + const serverStatus = await isDevServerRunning(devServerUrl, projectRoot); if (serverStatus === 'matched_server_running') { logger.info( @@ -108,7 +104,7 @@ async function runServer( messageSocketEndpoint, eventsSocketEndpoint, } = createDevServerMiddleware({ - host, + host: hostname, port, watchFolders, }); @@ -118,7 +114,7 @@ async function runServer( logger, unstable_experiments: { // NOTE: Only affects the /open-debugger endpoint - enableCustomDebuggerFrontend: true, + enableNewDebugger: args.experimentalDebugger, }, }); @@ -137,8 +133,8 @@ async function runServer( attachKeyHandlers({ cliConfig: ctx, devServerUrl, - serverInstance, messageSocket: messageSocketEndpoint, + experimentalDebuggerFrontend: args.experimentalDebugger, }); } }, diff --git a/packages/community-cli-plugin/src/utils/isDevServerRunning.js b/packages/community-cli-plugin/src/utils/isDevServerRunning.js index 7478857ba081..7f154afd0799 100644 --- a/packages/community-cli-plugin/src/utils/isDevServerRunning.js +++ b/packages/community-cli-plugin/src/utils/isDevServerRunning.js @@ -23,19 +23,19 @@ import fetch from 'node-fetch'; * - `unknown`: An error was encountered; attempt server creation anyway. */ export default async function isDevServerRunning( - scheme: string, - host: string, - port: number, + devServerUrl: string, projectRoot: string, ): Promise< 'not_running' | 'matched_server_running' | 'port_taken' | 'unknown', > { + const {hostname, port} = new URL(devServerUrl); + try { - if (!(await isPortOccupied(host, port))) { + if (!(await isPortOccupied(hostname, port))) { return 'not_running'; } - const statusResponse = await fetch(`${scheme}://${host}:${port}/status`); + const statusResponse = await fetch(`${devServerUrl}/status`); const body = await statusResponse.text(); return body === 'packager-status:running' && @@ -47,7 +47,10 @@ export default async function isDevServerRunning( } } -async function isPortOccupied(host: string, port: number): Promise { +async function isPortOccupied( + hostname: string, + port: string, +): Promise { let result = false; const server = net.createServer(); @@ -67,6 +70,6 @@ async function isPortOccupied(host: string, port: number): Promise { server.once('close', () => { resolve(result); }); - server.listen({host, port}); + server.listen({host: hostname, port}); }); } diff --git a/packages/community-cli-plugin/src/utils/loadMetroConfig.js b/packages/community-cli-plugin/src/utils/loadMetroConfig.js index ce3b6f36f428..d3eaeb93bba8 100644 --- a/packages/community-cli-plugin/src/utils/loadMetroConfig.js +++ b/packages/community-cli-plugin/src/utils/loadMetroConfig.js @@ -12,10 +12,10 @@ import type {Config} from '@react-native-community/cli-types'; import type {ConfigT, InputConfigT, YargArguments} from 'metro-config'; -import path from 'path'; -import {loadConfig, mergeConfig, resolveConfig} from 'metro-config'; -import {CLIError, logger} from '@react-native-community/cli-tools'; import {reactNativePlatformResolver} from './metroPlatformResolver'; +import {CLIError, logger} from '@react-native-community/cli-tools'; +import {loadConfig, mergeConfig, resolveConfig} from 'metro-config'; +import path from 'path'; export type {Config}; @@ -29,7 +29,10 @@ export type ConfigLoadingContext = $ReadOnly<{ /** * Get the config options to override based on RN CLI inputs. */ -function getOverrideConfig(ctx: ConfigLoadingContext): InputConfigT { +function getOverrideConfig( + ctx: ConfigLoadingContext, + config: ConfigT, +): InputConfigT { const outOfTreePlatforms = Object.keys(ctx.platforms).filter( platform => ctx.platforms[platform].npmPackageName, ); @@ -46,6 +49,7 @@ function getOverrideConfig(ctx: ConfigLoadingContext): InputConfigT { }, {}, ), + config.resolver?.resolveRequest, ); } @@ -62,6 +66,7 @@ function getOverrideConfig(ctx: ConfigLoadingContext): InputConfigT { ...outOfTreePlatforms.map(platform => require.resolve( `${ctx.platforms[platform].npmPackageName}/Libraries/Core/InitializeCore`, + {paths: [ctx.root]}, ), ), ], @@ -79,8 +84,6 @@ export default async function loadMetroConfig( ctx: ConfigLoadingContext, options: YargArguments = {}, ): Promise { - const overrideConfig = getOverrideConfig(ctx); - const cwd = ctx.root; const projectConfig = await resolveConfig(options.config, cwd); @@ -105,11 +108,12 @@ This warning will be removed in future (https://github.com/facebook/metro/issues } } - return mergeConfig( - await loadConfig({ - cwd, - ...options, - }), - overrideConfig, - ); + const config = await loadConfig({ + cwd, + ...options, + }); + + const overrideConfig = getOverrideConfig(ctx, config); + + return mergeConfig(config, overrideConfig); } diff --git a/packages/community-cli-plugin/src/utils/metroPlatformResolver.js b/packages/community-cli-plugin/src/utils/metroPlatformResolver.js index e03264f0c644..134ce7d2dad3 100644 --- a/packages/community-cli-plugin/src/utils/metroPlatformResolver.js +++ b/packages/community-cli-plugin/src/utils/metroPlatformResolver.js @@ -25,9 +25,12 @@ import type {CustomResolver} from 'metro-resolver'; * macos: 'react-native-macos' * } */ -export function reactNativePlatformResolver(platformImplementations: { - [platform: string]: string, -}): CustomResolver { +export function reactNativePlatformResolver( + platformImplementations: { + [platform: string]: string, + }, + customResolver: ?CustomResolver, +): CustomResolver { return (context, moduleName, platform) => { let modifiedModuleName = moduleName; if (platform != null && platformImplementations[platform]) { @@ -39,6 +42,9 @@ export function reactNativePlatformResolver(platformImplementations: { }/${modifiedModuleName.slice('react-native/'.length)}`; } } + if (customResolver) { + return customResolver(context, modifiedModuleName, platform); + } return context.resolveRequest(context, modifiedModuleName, platform); }; } diff --git a/packages/community-cli-plugin/src/utils/parseKeyValueParamArray.js b/packages/community-cli-plugin/src/utils/parseKeyValueParamArray.js new file mode 100644 index 000000000000..021529007aed --- /dev/null +++ b/packages/community-cli-plugin/src/utils/parseKeyValueParamArray.js @@ -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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +import querystring from 'querystring'; + +export default function parseKeyValueParamArray( + keyValueArray: $ReadOnlyArray, +): Record { + const result = {}; + + for (const item of keyValueArray) { + if (item.indexOf('=') === -1) { + throw new Error('Expected parameter to include "=" but found: ' + item); + } + if (item.indexOf('&') !== -1) { + throw new Error('Parameter cannot include "&" but found: ' + item); + } + Object.assign(result, querystring.parse(item)); + } + + return result; +} diff --git a/packages/debugger-frontend/BUILD_INFO b/packages/debugger-frontend/BUILD_INFO index fe942450d1b2..ccaa289b9792 100644 --- a/packages/debugger-frontend/BUILD_INFO +++ b/packages/debugger-frontend/BUILD_INFO @@ -1,9 +1,9 @@ -@generated SignedSource<<8a0bac4cfdcc3cd44a4f7136f2611ebb>> -Git revision: 0ffb687b8e049769d2e7162ba8d7205c90e4110c +@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/README.md b/packages/debugger-frontend/README.md index e9e228a6a6e4..741ba72a3011 100644 --- a/packages/debugger-frontend/README.md +++ b/packages/debugger-frontend/README.md @@ -11,12 +11,27 @@ This package is internal to React Native and is intended to be used via [`@react The package exports the absolute path to the directory containing the frontend assets. ```js - const frontendPath = require('@react-native/debugger-frontend'); // Pass frontendPath to a static server, etc ``` -## Updating the frontend assets +## Contributing + +### Source repo + +Source code for this package lives in the [facebookexperimental/rn-chrome-devtools-frontend](https://github.com/facebookexperimental/rn-chrome-devtools-frontend) repo. See below for how we build and check in changes. + +### Updating the frontend assets + +The compiled assets for the debugger frontend are periodically checked into this package under the `dist/` folder. To update these, run `node scripts/debugger-frontend/sync-and-build` from the root of your `react-native` checkout. + +```sh +# For main +node scripts/debugger-frontend/sync-and-build --branch main + +# For stable branches (e.g. '0.73-stable') +node scripts/debugger-frontend/sync-and-build --branch 0.73-stable +``` -The compiled frontend assets are checked into the React Native repo. Run `node scripts/debugger-frontend/sync-and-build` from the root of your `react-native` checkout to update them. +By default, this will clone and build from [facebookexperimental/rn-chrome-devtools-frontend](https://github.com/facebookexperimental/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 000000000000..5c125de5d897 Binary files /dev/null and b/packages/debugger-frontend/dist/third-party/front_end/Images/favicon.ico differ 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/i18n/locales/en-US.json b/packages/debugger-frontend/dist/third-party/front_end/core/i18n/locales/en-US.json index 5ae98cd338e1..9f9b24aa6230 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/core/i18n/locales/en-US.json +++ b/packages/debugger-frontend/dist/third-party/front_end/core/i18n/locales/en-US.json @@ -1 +1 @@ -{"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 | 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/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/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/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/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..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 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 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/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/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()}); 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) + diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index 55ff9250d0b2..cc04b73cf6b6 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.74.88", "description": "Debugger frontend for React Native based on Chrome DevTools", "keywords": [ "react-native", diff --git a/packages/dev-middleware/README.md b/packages/dev-middleware/README.md index 6edfa45dcf38..417f87e1de52 100644 --- a/packages/dev-middleware/README.md +++ b/packages/dev-middleware/README.md @@ -58,6 +58,10 @@ Returns the list of available WebSocket targets for all connected React Native a Returns version metadata used by Chrome DevTools. +#### GET `/debugger-frontend` + +Subpaths of this endpoint are reserved to serve the JavaScript debugger frontend. + #### POST `/open-debugger` Open the JavaScript debugger for a given CDP target (direct Hermes debugging). diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index cf44092dc1cc..1eb6d35b1dd8 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.74.88", "description": "Dev server middleware for React Native", "keywords": [ "react-native", @@ -23,16 +23,25 @@ ], "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "^0.73.0", + "@react-native/debugger-frontend": "0.74.88", + "@rnx-kit/chromium-edge-launcher": "^1.0.0", "chrome-launcher": "^0.15.2", - "chromium-edge-launcher": "^1.0.0", "connect": "^3.6.5", "debug": "^2.2.0", "node-fetch": "^2.2.0", + "nullthrows": "^1.1.1", + "open": "^7.0.3", + "selfsigned": "^2.4.1", "serve-static": "^1.13.1", - "temp-dir": "^2.0.0" + "temp-dir": "^2.0.0", + "ws": "^6.2.2" }, "engines": { "node": ">=18" + }, + "devDependencies": { + "data-uri-to-buffer": "^6.0.1", + "undici": "^5.27.2", + "wait-for-expect": "^3.0.2" } } diff --git a/packages/dev-middleware/src/__tests__/FetchUtils.js b/packages/dev-middleware/src/__tests__/FetchUtils.js new file mode 100644 index 000000000000..9de0a10161bd --- /dev/null +++ b/packages/dev-middleware/src/__tests__/FetchUtils.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. + * + * @flow strict-local + * @format + * @oncall react_native + */ + +import type {JSONSerializable} from '../inspector-proxy/types'; +import typeof * as NodeFetch from 'node-fetch'; + +import https from 'https'; +import {Agent} from 'undici'; + +/** + * A version of `fetch` that is usable with the HTTPS server created in + * ServerUtils (which uses a self-signed certificate). + */ +export async function fetchLocal( + url: string, + options?: Parameters[1] & {dispatcher?: mixed}, +): ReturnType { + return await fetch(url, { + ...options, + // Node's native `fetch` comes from undici and supports the same options, + // including `dispatcher` which we use to make it accept self-signed + // certificates. + dispatcher: + options?.dispatcher ?? + new Agent({ + connect: { + rejectUnauthorized: false, + }, + }), + }); +} + +export async function fetchJson(url: string): Promise { + const response = await fetchLocal(url); + if (!response.ok) { + throw new Error(`HTTP ${response.status} ${response.statusText}`); + } + return response.json(); +} + +export function allowSelfSignedCertsInNodeFetch(): void { + jest.mock('node-fetch', () => { + const originalModule = jest.requireActual('node-fetch'); + const nodeFetch = originalModule.default; + return { + __esModule: true, + ...originalModule, + default: (url, options) => { + if ( + (url instanceof URL && url.protocol === 'https:') || + (typeof url === 'string' && url.startsWith('https:')) + ) { + const agent = new https.Agent({ + rejectUnauthorized: false, + }); + return nodeFetch(url.toString(), {agent, ...options}); + } + return nodeFetch(url, options); + }, + }; + }); +} diff --git a/packages/dev-middleware/src/__tests__/InspectorDebuggerUtils.js b/packages/dev-middleware/src/__tests__/InspectorDebuggerUtils.js new file mode 100644 index 000000000000..98fbe08d0b1e --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorDebuggerUtils.js @@ -0,0 +1,122 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {JSONSerializable} from '../inspector-proxy/types'; +import type { + CdpMessageToTarget, + CdpResponseFromTarget, +} from './InspectorProtocolUtils'; + +import nullthrows from 'nullthrows'; +import until from 'wait-for-expect'; +import WebSocket from 'ws'; + +export class DebuggerAgent { + #ws: ?WebSocket; + #readyPromise: Promise; + + constructor(url: string, signal?: AbortSignal) { + const ws = new WebSocket(url, { + // The mock server uses a self-signed certificate. + rejectUnauthorized: false, + }); + this.#ws = ws; + ws.on('message', data => { + this.__handle(JSON.parse(data.toString())); + }); + if (signal != null) { + signal.addEventListener('abort', () => { + this.close(); + }); + } + this.#readyPromise = new Promise((resolve, reject) => { + ws.once('open', () => { + resolve(); + }); + ws.once('error', error => { + reject(error); + }); + }); + } + + __handle(message: JSONSerializable): void {} + + send(message: JSONSerializable) { + if (!this.#ws) { + return; + } + this.#ws.send(JSON.stringify(message)); + } + + ready(): Promise { + return this.#readyPromise; + } + + close() { + if (!this.#ws) { + return; + } + try { + this.#ws.terminate(); + } catch {} + this.#ws = null; + } + + // $FlowIgnore[unsafe-getters-setters] + get socket(): WebSocket { + return nullthrows(this.#ws); + } +} + +export class DebuggerMock extends DebuggerAgent { + // Empty handlers + +handle: JestMockFn<[message: JSONSerializable], void> = jest.fn(); + + __handle(message: JSONSerializable): void { + this.handle(message); + } + + async sendAndGetResponse( + message: CdpMessageToTarget, + ): Promise { + const originalHandleCallsArray = this.handle.mock.calls; + const originalHandleCallCount = originalHandleCallsArray.length; + this.send(message); + await until(() => + expect(this.handle).toHaveBeenCalledWith( + expect.objectContaining({ + id: message.id, + }), + ), + ); + // Find the first matching handle call that wasn't already in the mock calls + // array before we sent the message. + const newHandleCalls = + originalHandleCallsArray === this.handle.mock.calls + ? this.handle.mock.calls.slice(originalHandleCallCount) + : this.handle.mock.calls; + // $FlowIgnore[incompatible-use] + // $FlowIgnore[prop-missing] + const [response] = newHandleCalls.find(args => args[0].id === message.id); + // $FlowIgnore[incompatible-return] + // $FlowIgnore[incompatible-indexer] + return response; + } +} + +export async function createDebuggerMock( + url: string, + signal: AbortSignal, +): Promise { + const debuggerMock = new DebuggerMock(url, signal); + await debuggerMock.ready(); + return debuggerMock; +} diff --git a/packages/dev-middleware/src/__tests__/InspectorDeviceUtils.js b/packages/dev-middleware/src/__tests__/InspectorDeviceUtils.js new file mode 100644 index 000000000000..0ccf1f397127 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorDeviceUtils.js @@ -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-local + * @format + * @oncall react_native + */ + +import type { + ConnectRequest, + DisconnectRequest, + GetPagesRequest, + GetPagesResponse, + JSONSerializable, + MessageFromDevice, + MessageToDevice, + WrappedEvent, +} from '../inspector-proxy/types'; + +import WebSocket from 'ws'; + +export class DeviceAgent { + #ws: ?WebSocket; + #readyPromise: Promise; + + constructor(url: string, signal?: AbortSignal) { + const ws = new WebSocket(url, { + // The mock server uses a self-signed certificate. + rejectUnauthorized: false, + }); + this.#ws = ws; + ws.on('message', data => { + this.__handle(JSON.parse(data.toString())); + }); + if (signal != null) { + signal.addEventListener('abort', () => { + this.close(); + }); + } + this.#readyPromise = new Promise((resolve, reject) => { + ws.once('open', () => { + resolve(); + }); + ws.once('error', error => { + reject(error); + }); + }); + } + + __handle(message: MessageToDevice): void {} + + send(message: MessageFromDevice) { + if (!this.#ws) { + return; + } + this.#ws.send(JSON.stringify(message)); + } + + ready(): Promise { + return this.#readyPromise; + } + + close() { + if (!this.#ws) { + return; + } + try { + this.#ws.terminate(); + } catch {} + this.#ws = null; + } + + sendWrappedEvent(pageId: string, event: JSONSerializable) { + this.send({ + event: 'wrappedEvent', + payload: { + pageId, + wrappedEvent: JSON.stringify(event), + }, + }); + } +} + +export class DeviceMock extends DeviceAgent { + // Empty handlers + +connect: JestMockFn<[message: ConnectRequest], void> = jest.fn(); + +disconnect: JestMockFn<[message: DisconnectRequest], void> = jest.fn(); + +getPages: JestMockFn< + [message: GetPagesRequest], + | GetPagesResponse['payload'] + | Promise + | void, + > = jest.fn(); + +wrappedEvent: JestMockFn<[message: WrappedEvent], void> = jest.fn(); + +wrappedEventParsed: JestMockFn< + [payload: {...WrappedEvent['payload'], wrappedEvent: JSONSerializable}], + void, + > = jest.fn(); + + __handle(message: MessageToDevice): void { + switch (message.event) { + case 'connect': + this.connect(message); + break; + case 'disconnect': + this.disconnect(message); + break; + case 'getPages': + const result = this.getPages(message); + this.#sendPayloadIfNonNull('getPages', result); + break; + case 'wrappedEvent': + this.wrappedEvent(message); + this.wrappedEventParsed({ + ...message.payload, + wrappedEvent: JSON.parse(message.payload.wrappedEvent), + }); + break; + default: + (message: empty); + throw new Error(`Unhandled event ${message.event}`); + } + } + + #sendPayloadIfNonNull( + event: Event, + maybePayload: + | MessageFromDevice['payload'] + | Promise + | void, + ) { + if (maybePayload == null) { + return; + } + if (maybePayload instanceof Promise) { + // eslint-disable-next-line no-void + void maybePayload.then(payload => { + if (!payload) { + return; + } + // $FlowFixMe[incompatible-call] TODO(moti) Figure out the right way to type maybePayload generically + this.send({event, payload}); + }); + return; + } + // $FlowFixMe[incompatible-call] TODO(moti) Figure out the right way to type maybePayload generically + this.send({event, payload: maybePayload}); + } +} + +export async function createDeviceMock( + url: string, + signal: AbortSignal, +): Promise { + const device = new DeviceMock(url, signal); + await device.ready(); + return device; +} diff --git a/packages/dev-middleware/src/__tests__/InspectorProtocolUtils.js b/packages/dev-middleware/src/__tests__/InspectorProtocolUtils.js new file mode 100644 index 000000000000..b537323e7f47 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorProtocolUtils.js @@ -0,0 +1,158 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 { + JSONSerializable, + PageDescription, + PageFromDevice, +} from '../inspector-proxy/types'; +import type {DebuggerMock} from './InspectorDebuggerUtils'; +import type {DeviceMock} from './InspectorDeviceUtils'; + +import {fetchJson} from './FetchUtils'; +import {createDebuggerMock} from './InspectorDebuggerUtils'; +import {createDeviceMock} from './InspectorDeviceUtils'; +import {dataUriToBuffer} from 'data-uri-to-buffer'; +import until from 'wait-for-expect'; + +export type CdpMessageFromTarget = $ReadOnly<{ + method: string, + id?: number, + params?: JSONSerializable, +}>; + +export type CdpResponseFromTarget = $ReadOnly<{ + id: number, + result: JSONSerializable, +}>; + +export type CdpMessageToTarget = $ReadOnly<{ + method: string, + id: number, + params?: JSONSerializable, +}>; + +/** + * Send a CDP message from from the target with the given pageId to the debugger. + * Returns the message as received by the debugger. + */ +export async function sendFromTargetToDebugger( + device: DeviceMock, + debugger_: DebuggerMock, + pageId: string, + message: Message, +): Promise { + const originalHandleCallsArray = debugger_.handle.mock.calls; + const originalHandleCallCount = originalHandleCallsArray.length; + device.sendWrappedEvent(pageId, message); + await until(() => + expect(debugger_.handle).toBeCalledWith( + expect.objectContaining({ + method: message.method, + }), + ), + ); + // Find the first handle call that wasn't already in the mock calls array + // before we sent the message. + const newHandleCalls = + originalHandleCallsArray === debugger_.handle.mock.calls + ? debugger_.handle.mock.calls.slice(originalHandleCallCount) + : debugger_.handle.mock.calls; + // $FlowIgnore[incompatible-type] + const [receivedMessage]: [Message] = newHandleCalls.find( + // $FlowIgnore[incompatible-call] + (call: [Message]) => call[0].method === message.method, + ); + return receivedMessage; +} + +/** + * Send a CDP message from the debugger to the target with the given pageId. + * Returns the message as received by the target. + */ +export async function sendFromDebuggerToTarget( + debugger_: DebuggerMock, + device: DeviceMock, + pageId: string, + message: Message, +): Promise { + const originalEventCallsArray = device.wrappedEventParsed.mock.calls; + const originalEventCallCount = originalEventCallsArray.length; + debugger_.send(message); + await until(() => + expect(device.wrappedEventParsed).toBeCalledWith({ + pageId, + wrappedEvent: expect.objectContaining({id: message.id}), + }), + ); + // Find the first handle call that wasn't already in the mock calls array + // before we sent the message. + const newEventCalls = + originalEventCallsArray === device.wrappedEventParsed.mock.calls + ? device.wrappedEventParsed.mock.calls.slice(originalEventCallCount) + : device.wrappedEventParsed.mock.calls; + // $FlowIgnore[incompatible-use] + const [receivedMessage] = newEventCalls.find( + // $FlowIgnore[prop-missing] + // $FlowIgnore[incompatible-use] + call => call[0].wrappedEvent.id === message.id, + ); + // $FlowIgnore[incompatible-return] + return receivedMessage.wrappedEvent; +} + +export function parseJsonFromDataUri(uri: string): T { + expect(uri).toMatch(/^data:/); + const parsedUri = dataUriToBuffer(uri); + expect(parsedUri.type).toBe('application/json'); + return JSON.parse( + new TextDecoder(parsedUri.charset).decode(parsedUri.buffer), + ); +} + +export async function createAndConnectTarget( + serverRef: $ReadOnly<{ + serverBaseUrl: string, + serverBaseWsUrl: string, + ... + }>, + signal: AbortSignal, + page: PageFromDevice, +): Promise<{device: DeviceMock, debugger_: DebuggerMock}> { + let device; + let debugger_; + try { + device = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device&name=foo&app=bar`, + signal, + ); + device.getPages.mockImplementation(() => [page]); + + let pageList: Array = []; + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList).toHaveLength(1); + }); + const [{webSocketDebuggerUrl}] = pageList; + expect(webSocketDebuggerUrl).toBeDefined(); + + debugger_ = await createDebuggerMock(webSocketDebuggerUrl, signal); + await until(() => expect(device.connect).toBeCalled()); + } catch (e) { + device?.close(); + debugger_?.close(); + throw e; + } + return {device, debugger_}; +} diff --git a/packages/dev-middleware/src/__tests__/InspectorProxyCdpRewritingHacks-test.js b/packages/dev-middleware/src/__tests__/InspectorProxyCdpRewritingHacks-test.js new file mode 100644 index 000000000000..51545ecd9be7 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorProxyCdpRewritingHacks-test.js @@ -0,0 +1,544 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {TargetCapabilityFlags} from '../inspector-proxy/types'; + +import {allowSelfSignedCertsInNodeFetch} from './FetchUtils'; +import { + createAndConnectTarget, + parseJsonFromDataUri, + sendFromDebuggerToTarget, + sendFromTargetToDebugger, +} from './InspectorProtocolUtils'; +import {withAbortSignalForEachTest} from './ResourceUtils'; +import { + serveStaticJson, + serveStaticText, + withServerForEachTest, +} from './ServerUtils'; +import {createHash} from 'crypto'; +import fs from 'fs'; +import path from 'path'; + +const fsPromise = fs.promises; + +// WebSocket is unreliable when using fake timers. +jest.useRealTimers(); + +jest.setTimeout(10000); + +beforeAll(() => { + // inspector-proxy uses node-fetch for source map fetching. + allowSelfSignedCertsInNodeFetch(); + + jest.resetModules(); +}); + +describe.each(['HTTP', 'HTTPS'])( + 'inspector proxy CDP rewriting hacks over %s', + protocol => { + const serverRef = withServerForEachTest({ + logger: undefined, + projectRoot: __dirname, + secure: protocol === 'HTTPS', + }); + const autoCleanup = withAbortSignalForEachTest(); + afterEach(() => { + jest.clearAllMocks(); + }); + + test('source map fetching in Debugger.scriptParsed', async () => { + serverRef.app.use( + '/source-map', + serveStaticJson({ + version: 3, + // Mojibake insurance. + file: '\u2757.js', + }), + ); + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + const scriptParsedMessage = await sendFromTargetToDebugger( + device, + debugger_, + 'page1', + { + method: 'Debugger.scriptParsed', + params: { + sourceMapURL: `${serverRef.serverBaseUrl}/source-map`, + }, + }, + ); + expect( + parseJsonFromDataUri(scriptParsedMessage.params.sourceMapURL), + ).toEqual({version: 3, file: '\u2757.js'}); + } finally { + device.close(); + debugger_.close(); + } + }); + + test('handling of failure to fetch source map', async () => { + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + const scriptParsedMessage = await sendFromTargetToDebugger( + device, + debugger_, + 'page1', + { + method: 'Debugger.scriptParsed', + params: { + sourceMapURL: `${serverRef.serverBaseUrl}/source-map-missing`, + }, + }, + ); + + // We don't rewrite the message in this case. + expect(scriptParsedMessage.params.sourceMapURL).toEqual( + `${serverRef.serverBaseUrl}/source-map-missing`, + ); + + // We send an error through to the debugger as a console message. + expect(debugger_.handle).toBeCalledWith( + expect.objectContaining({ + method: 'Runtime.consoleAPICalled', + params: { + args: [ + { + type: 'string', + value: expect.stringMatching('Failed to fetch source map'), + }, + ], + executionContextId: 0, + type: 'error', + }, + }), + ); + } finally { + device.close(); + debugger_.close(); + } + }); + + describe.each(['10.0.2.2', '10.0.3.2'])( + '%s aliasing to and from localhost', + sourceHost => { + test('in source map fetching during Debugger.scriptParsed', async () => { + serverRef.app.use('/source-map', serveStaticJson({version: 3})); + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + const scriptParsedMessage = await sendFromTargetToDebugger( + device, + debugger_, + 'page1', + { + method: 'Debugger.scriptParsed', + params: { + sourceMapURL: `${protocol.toLowerCase()}://${sourceHost}:${ + serverRef.port + }/source-map`, + }, + }, + ); + expect( + parseJsonFromDataUri(scriptParsedMessage.params.sourceMapURL), + ).toEqual({version: 3}); + } finally { + device.close(); + debugger_.close(); + } + }); + + test('in Debugger.setBreakpointByUrl', async () => { + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + const scriptParsedMessage = await sendFromTargetToDebugger( + device, + debugger_, + 'page1', + { + method: 'Debugger.scriptParsed', + params: { + url: `${protocol.toLowerCase()}://${sourceHost}:${ + serverRef.port + }/some/file.js`, + }, + }, + ); + expect(scriptParsedMessage.params.url).toEqual( + `${protocol.toLowerCase()}://localhost:${ + serverRef.port + }/some/file.js`, + ); + + const setBreakpointByUrlMessage = await sendFromDebuggerToTarget( + debugger_, + device, + 'page1', + { + id: 100, + method: 'Debugger.setBreakpointByUrl', + params: { + lineNumber: 1, + url: `${protocol.toLowerCase()}://localhost:${ + serverRef.port + }/some/file.js`, + }, + }, + ); + expect(setBreakpointByUrlMessage.params.url).toEqual( + `${protocol.toLowerCase()}://${sourceHost}:${ + serverRef.port + }/some/file.js`, + ); + + const setBreakpointByUrlRegexMessage = + await sendFromDebuggerToTarget(debugger_, device, 'page1', { + id: 200, + method: 'Debugger.setBreakpointByUrl', + params: { + lineNumber: 1, + urlRegex: 'localhost:1000|localhost:2000', + }, + }); + expect(setBreakpointByUrlRegexMessage.params.urlRegex).toEqual( + `${sourceHost}:1000|${sourceHost}:2000`, + ); + } finally { + device.close(); + debugger_.close(); + } + }); + }, + ); + + test('rewrites alphanumeric script IDs to file:// URIs', async () => { + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + const scriptParsedMessage = await sendFromTargetToDebugger( + device, + debugger_, + 'page1', + { + method: 'Debugger.scriptParsed', + params: { + url: 'abcde12345', + }, + }, + ); + expect(scriptParsedMessage.params.url).toBe('file://abcde12345'); + } finally { + device.close(); + debugger_.close(); + } + }); + + describe('Debugger.getScriptSource', () => { + test('fetches source from server', async () => { + serverRef.app.use('/source', serveStaticText('foo')); + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + await sendFromTargetToDebugger(device, debugger_, 'page1', { + method: 'Debugger.scriptParsed', + params: { + scriptId: 'script1', + url: `${serverRef.serverBaseUrl}/source`, + startLine: 0, + endLine: 0, + startColumn: 0, + endColumn: 0, + hash: createHash('sha256').update('foo').digest('hex'), + }, + }); + const response = await debugger_.sendAndGetResponse({ + id: 1, + method: 'Debugger.getScriptSource', + params: { + scriptId: 'script1', + }, + }); + expect(response.result).toEqual( + expect.objectContaining({scriptSource: 'foo'}), + ); + // The device does not receive the getScriptSource request, since it + // is handled by the proxy. + expect(device.wrappedEventParsed).not.toBeCalledWith({ + pageId: 'page1', + wrappedEvent: expect.objectContaining({ + method: 'Debugger.getScriptSource', + }), + }); + } finally { + device.close(); + debugger_.close(); + } + }); + + test('reads source from disk', async () => { + // Should be just 'foo\n', but the newline can get mangled by the OS + // and/or SCM, so let's read the source of truth from disk. + const fileRealContents = await fsPromise.readFile( + path.join(__dirname, '__fixtures__', 'mock-source-file.txt'), + 'utf8', + ); + + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + await sendFromTargetToDebugger(device, debugger_, 'page1', { + method: 'Debugger.scriptParsed', + params: { + scriptId: 'script1', + url: '__fixtures__/mock-source-file.txt', + startLine: 0, + endLine: 0, + startColumn: 0, + endColumn: 0, + hash: createHash('sha256').update(fileRealContents).digest('hex'), + }, + }); + const response = await debugger_.sendAndGetResponse({ + id: 1, + method: 'Debugger.getScriptSource', + params: { + scriptId: 'script1', + }, + }); + expect(response.result).toEqual( + expect.objectContaining({scriptSource: fileRealContents}), + ); + // The device does not receive the getScriptSource request, since it + // is handled by the proxy. + expect(device.wrappedEventParsed).not.toBeCalledWith({ + pageId: 'page1', + wrappedEvent: expect.objectContaining({ + method: 'Debugger.getScriptSource', + }), + }); + } finally { + device.close(); + debugger_.close(); + } + }); + + test.each(['url', 'file'])( + 'reports %s fetch error back to debugger', + async resourceType => { + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + try { + await sendFromTargetToDebugger(device, debugger_, 'page1', { + method: 'Debugger.scriptParsed', + params: { + scriptId: 'script1', + url: + resourceType === 'url' + ? `${serverRef.serverBaseUrl}/source-missing` + : '__fixtures__/mock-source-file.does-not-exist', + startLine: 0, + endLine: 0, + startColumn: 0, + endColumn: 0, + hash: createHash('sha256').update('foo').digest('hex'), + }, + }); + const response = await debugger_.sendAndGetResponse({ + id: 1, + method: 'Debugger.getScriptSource', + params: { + scriptId: 'script1', + }, + }); + + // We mark the request as failed. + expect(response).toEqual({ + id: 1, + result: { + error: { + message: expect.stringMatching( + `Failed to fetch source ${resourceType}`, + ), + }, + }, + }); + + // We also send an error through to the debugger as a console message. + expect(debugger_.handle).toBeCalledWith( + expect.objectContaining({ + method: 'Runtime.consoleAPICalled', + params: { + args: [ + { + type: 'string', + value: expect.stringMatching( + `Failed to fetch source ${resourceType}`, + ), + }, + ], + executionContextId: 0, + type: 'error', + }, + }), + ); + + // The device does not receive the getScriptSource request, since it + // is handled by the proxy. + expect(device.wrappedEventParsed).not.toBeCalledWith({ + pageId: 'page1', + wrappedEvent: expect.objectContaining({ + method: 'Debugger.getScriptSource', + }), + }); + } finally { + device.close(); + debugger_.close(); + } + }, + ); + }); + + describe("disabled when target has 'nativeSourceCodeFetching' capability flag", () => { + const pageDescription = { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + capabilities: { + nativeSourceCodeFetching: true, + }, + vm: 'bar-vm', + }; + + describe('Debugger.scriptParsed', () => { + test('should forward event directly to client (does not rewrite sourceMapURL host)', async () => { + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + pageDescription, + ); + try { + const message = { + method: 'Debugger.scriptParsed', + params: { + sourceMapURL: `${protocol.toLowerCase()}://10.0.2.2:${ + serverRef.port + }/source-map`, + }, + }; + await sendFromTargetToDebugger(device, debugger_, 'page1', message); + + expect(debugger_.handle).toBeCalledWith(message); + } finally { + device.close(); + debugger_.close(); + } + }); + }); + + describe('Debugger.getScriptSource', () => { + test('should forward request directly to device (does not read source from disk in proxy)', async () => { + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + pageDescription, + ); + try { + const message = { + id: 1, + method: 'Debugger.getScriptSource', + params: { + scriptId: 'script1', + }, + }; + await sendFromDebuggerToTarget(debugger_, device, 'page1', message); + + expect(device.wrappedEventParsed).toBeCalledWith({ + pageId: 'page1', + wrappedEvent: message, + }); + } finally { + device.close(); + debugger_.close(); + } + }); + }); + }); + }, +); diff --git a/packages/dev-middleware/src/__tests__/InspectorProxyCdpTransport-test.js b/packages/dev-middleware/src/__tests__/InspectorProxyCdpTransport-test.js new file mode 100644 index 000000000000..6d76d304e846 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorProxyCdpTransport-test.js @@ -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-local + * @format + * @oncall react_native + */ + +import type {PageDescription} from '../inspector-proxy/types'; + +import {fetchJson} from './FetchUtils'; +import {createDebuggerMock} from './InspectorDebuggerUtils'; +import {createDeviceMock} from './InspectorDeviceUtils'; +import {withAbortSignalForEachTest} from './ResourceUtils'; +import {withServerForEachTest} from './ServerUtils'; +import until from 'wait-for-expect'; + +// WebSocket is unreliable when using fake timers. +jest.useRealTimers(); + +jest.setTimeout(10000); + +describe.each(['HTTP', 'HTTPS'])( + 'inspector proxy CDP transport over %s', + protocol => { + const serverRef = withServerForEachTest({ + logger: undefined, + projectRoot: '', + secure: protocol === 'HTTPS', + }); + const autoCleanup = withAbortSignalForEachTest(); + afterEach(() => { + jest.clearAllMocks(); + }); + + test('connection/disconnection and message from debugger to device', async () => { + const device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + try { + device1.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ]); + + let pageList: Array = []; + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList).toHaveLength(1); + }); + const [{webSocketDebuggerUrl}] = pageList; + expect(webSocketDebuggerUrl).toBeDefined(); + + const debugger_ = await createDebuggerMock( + webSocketDebuggerUrl, + autoCleanup.signal, + ); + try { + await until(() => expect(device1.connect).toBeCalled()); + + debugger_.send({ + method: 'Runtime.enable', + id: 0, + }); + + await until(() => expect(device1.wrappedEvent).toBeCalled()); + + expect(device1.wrappedEventParsed).toBeCalledWith({ + pageId: 'page1', + wrappedEvent: { + method: 'Runtime.enable', + id: 0, + }, + }); + + debugger_.close(); + + await until(() => expect(device1.disconnect).toBeCalled()); + } finally { + debugger_.close(); + } + } finally { + device1.close(); + } + }); + + test('message and disconnection from device to debugger', async () => { + const device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + try { + device1.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ]); + + let pageList: Array = []; + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList).toHaveLength(1); + }); + const [{webSocketDebuggerUrl}] = pageList; + expect(webSocketDebuggerUrl).toBeDefined(); + + const debugger_ = await createDebuggerMock( + webSocketDebuggerUrl, + autoCleanup.signal, + ); + let debuggerSocketClosed = false; + debugger_.socket.once('close', () => { + debuggerSocketClosed = true; + }); + try { + await until(() => expect(device1.connect).toBeCalled()); + + device1.sendWrappedEvent('page1', { + id: 0, + }); + + await until(() => expect(debugger_.handle).toBeCalledWith({id: 0})); + + device1.close(); + + await until(() => expect(debuggerSocketClosed).toBe(true)); + } finally { + debugger_.close(); + } + } finally { + device1.close(); + } + }); + }, +); diff --git a/packages/dev-middleware/src/__tests__/InspectorProxyCustomMessageHandler-test.js b/packages/dev-middleware/src/__tests__/InspectorProxyCustomMessageHandler-test.js new file mode 100644 index 000000000000..92c0eab475b3 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorProxyCustomMessageHandler-test.js @@ -0,0 +1,394 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {fetchJson} from './FetchUtils'; +import {createDebuggerMock} from './InspectorDebuggerUtils'; +import {createDeviceMock} from './InspectorDeviceUtils'; +import {createAndConnectTarget} from './InspectorProtocolUtils'; +import {withAbortSignalForEachTest} from './ResourceUtils'; +import {baseUrlForServer, createServer} from './ServerUtils'; +import invariant from 'invariant'; +import until from 'wait-for-expect'; + +// WebSocket is unreliable when using fake timers. +jest.useRealTimers(); + +jest.setTimeout(10000); + +describe('inspector proxy device message middleware', () => { + const autoCleanup = withAbortSignalForEachTest(); + const page = { + id: 'page1', + app: 'bar-app', + title: 'bar-title', + vm: 'bar-vm', + }; + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('middleware is created with device, debugger, and page information', async () => { + const createCustomMessageHandler = jest.fn().mockImplementation(() => null); + const {server} = await createServer({ + logger: undefined, + projectRoot: '', + unstable_customInspectorMessageHandler: createCustomMessageHandler, + }); + + let device, debugger_; + try { + ({device, debugger_} = await createAndConnectTarget( + serverRefUrls(server), + autoCleanup.signal, + page, + )); + + // Ensure the middleware was created with the device information + await until(() => + expect(createCustomMessageHandler).toBeCalledWith( + expect.objectContaining({ + page: expect.objectContaining({ + ...page, + capabilities: expect.any(Object), + }), + device: expect.objectContaining({ + appId: expect.any(String), + id: expect.any(String), + name: expect.any(String), + sendMessage: expect.any(Function), + }), + debugger: expect.objectContaining({ + userAgent: null, + sendMessage: expect.any(Function), + }), + }), + ), + ); + } finally { + device?.close(); + debugger_?.close(); + await closeServer(server); + } + }); + + test('middleware is created with device, debugger, and page information for synthetic reloadable page', async () => { + const createCustomMessageHandler = jest.fn().mockImplementation(() => null); + const {server} = await createServer({ + logger: undefined, + projectRoot: '', + unstable_customInspectorMessageHandler: createCustomMessageHandler, + }); + const {serverBaseUrl, serverBaseWsUrl} = serverRefUrls(server); + + let device, debugger_; + try { + device = await createDeviceMock( + `${serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + // Mock the device to return a normal React (Native) page + device.getPages.mockImplementation(() => [ + { + ...page, + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + }, + ]); + + // Retrieve the full page list from device + let pageList; + await until(async () => { + pageList = (await fetchJson( + `${serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList.length).toBeGreaterThan(0); + }); + invariant(pageList != null, ''); + + // Find the synthetic page + const syntheticPage = pageList.find( + ({title}) => + // NOTE: Magic string used for the synthetic page that has a stable ID + title === 'React Native Experimental (Improved Chrome Reloads)', + ); + expect(syntheticPage).not.toBeUndefined(); + + // Connect the debugger to this synthetic page + debugger_ = await createDebuggerMock( + syntheticPage.webSocketDebuggerUrl, + autoCleanup.signal, + ); + + // Ensure the middleware was created with the device information + await until(() => + expect(createCustomMessageHandler).toBeCalledWith( + expect.objectContaining({ + page: expect.objectContaining({ + id: expect.any(String), + title: syntheticPage.title, + vm: syntheticPage.vm, + app: expect.any(String), + capabilities: expect.any(Object), + }), + device: expect.objectContaining({ + appId: expect.any(String), + id: expect.any(String), + name: expect.any(String), + sendMessage: expect.any(Function), + }), + debugger: expect.objectContaining({ + userAgent: null, + sendMessage: expect.any(Function), + }), + }), + ), + ); + } finally { + device?.close(); + debugger_?.close(); + await closeServer(server); + } + }); + + test('send message functions are passing messages to sockets', async () => { + const handleDebuggerMessage = jest.fn(); + const handleDeviceMessage = jest.fn(); + const createCustomMessageHandler = jest.fn().mockImplementation(() => ({ + handleDebuggerMessage, + handleDeviceMessage, + })); + + const {server} = await createServer({ + logger: undefined, + projectRoot: '', + unstable_customInspectorMessageHandler: createCustomMessageHandler, + }); + + let device, debugger_; + try { + ({device, debugger_} = await createAndConnectTarget( + serverRefUrls(server), + autoCleanup.signal, + page, + )); + + // Ensure the middleware was created with the send message methods + await until(() => + expect(createCustomMessageHandler).toBeCalledWith( + expect.objectContaining({ + device: expect.objectContaining({ + sendMessage: expect.any(Function), + }), + debugger: expect.objectContaining({ + sendMessage: expect.any(Function), + }), + }), + ), + ); + + // Send a message to the device + createCustomMessageHandler.mock.calls[0][0].device.sendMessage({ + id: 1, + }); + // Ensure the device received the message + await until(() => + expect(device.wrappedEvent).toBeCalledWith({ + event: 'wrappedEvent', + payload: { + pageId: page.id, + wrappedEvent: JSON.stringify({id: 1}), + }, + }), + ); + + // Send a message to the debugger + createCustomMessageHandler.mock.calls[0][0].debugger.sendMessage({ + id: 2, + }); + // Ensure the debugger received the message + await until(() => + expect(debugger_.handle).toBeCalledWith({ + id: 2, + }), + ); + } finally { + device?.close(); + debugger_?.close(); + await closeServer(server); + } + }); + + test('device message is passed to message middleware', async () => { + const handleDeviceMessage = jest.fn(); + const {server} = await createServer({ + logger: undefined, + projectRoot: '', + unstable_customInspectorMessageHandler: () => ({ + handleDeviceMessage, + handleDebuggerMessage() {}, + }), + }); + + let device, debugger_; + try { + ({device, debugger_} = await createAndConnectTarget( + serverRefUrls(server), + autoCleanup.signal, + page, + )); + + // Send a message from the device, and ensure the middleware received it + device.sendWrappedEvent(page.id, {id: 1337}); + + // Ensure the debugger received the message + await until(() => expect(debugger_.handle).toBeCalledWith({id: 1337})); + // Ensure the middleware received the message + await until(() => expect(handleDeviceMessage).toBeCalled()); + } finally { + device?.close(); + debugger_?.close(); + await closeServer(server); + } + }); + + test('device message stops propagating when handled by middleware', async () => { + const handleDeviceMessage = jest.fn(); + const {server} = await createServer({ + logger: undefined, + projectRoot: '', + unstable_customInspectorMessageHandler: () => ({ + handleDeviceMessage, + handleDebuggerMessage() {}, + }), + }); + + let device, debugger_; + try { + ({device, debugger_} = await createAndConnectTarget( + serverRefUrls(server), + autoCleanup.signal, + page, + )); + + // Stop the first message from propagating by returning true (once) from middleware + handleDeviceMessage.mockReturnValueOnce(true); + + // Send the first message which should NOT be received by the debugger + device.sendWrappedEvent(page.id, {id: -1}); + await until(() => expect(handleDeviceMessage).toBeCalled()); + + // Send the second message which should be received by the debugger + device.sendWrappedEvent(page.id, {id: 1337}); + + // Ensure only the last message was received by the debugger + await until(() => expect(debugger_.handle).toBeCalledWith({id: 1337})); + // Ensure the first message was not received by the debugger + expect(debugger_.handle).not.toBeCalledWith({id: -1}); + } finally { + device?.close(); + debugger_?.close(); + await closeServer(server); + } + }); + + test('debugger message is passed to message middleware', async () => { + const handleDebuggerMessage = jest.fn(); + const {server} = await createServer({ + logger: undefined, + projectRoot: '', + unstable_customInspectorMessageHandler: () => ({ + handleDeviceMessage() {}, + handleDebuggerMessage, + }), + }); + + let device, debugger_; + try { + ({device, debugger_} = await createAndConnectTarget( + serverRefUrls(server), + autoCleanup.signal, + page, + )); + + // Send a message from the debugger + const message = { + method: 'Runtime.enable', + id: 1337, + }; + debugger_.send(message); + + // Ensure the device received the message + await until(() => expect(device.wrappedEvent).toBeCalled()); + // Ensure the middleware received the message + await until(() => expect(handleDebuggerMessage).toBeCalledWith(message)); + } finally { + device?.close(); + debugger_?.close(); + await closeServer(server); + } + }); + + test('debugger message stops propagating when handled by middleware', async () => { + const handleDebuggerMessage = jest.fn(); + const {server} = await createServer({ + logger: undefined, + projectRoot: '', + unstable_customInspectorMessageHandler: () => ({ + handleDeviceMessage() {}, + handleDebuggerMessage, + }), + }); + + let device, debugger_; + try { + ({device, debugger_} = await createAndConnectTarget( + serverRefUrls(server), + autoCleanup.signal, + page, + )); + + // Stop the first message from propagating by returning true (once) from middleware + handleDebuggerMessage.mockReturnValueOnce(true); + + // Send the first emssage which should not be received by the device + debugger_.send({id: -1}); + // Send the second message which should be received by the device + debugger_.send({id: 1337}); + + // Ensure only the last message was received by the device + await until(() => + expect(device.wrappedEvent).toBeCalledWith({ + event: 'wrappedEvent', + payload: {pageId: page.id, wrappedEvent: JSON.stringify({id: 1337})}, + }), + ); + // Ensure the first message was not received by the device + expect(device.wrappedEvent).not.toBeCalledWith({id: -1}); + } finally { + device?.close(); + debugger_?.close(); + await closeServer(server); + } + }); +}); + +function serverRefUrls(server: http$Server | https$Server) { + return { + serverBaseUrl: baseUrlForServer(server, 'http'), + serverBaseWsUrl: baseUrlForServer(server, 'ws'), + }; +} + +async function closeServer(server: http$Server | https$Server): Promise { + return new Promise(resolve => server.close(() => resolve())); +} diff --git a/packages/dev-middleware/src/__tests__/InspectorProxyHttpApi-test.js b/packages/dev-middleware/src/__tests__/InspectorProxyHttpApi-test.js new file mode 100644 index 000000000000..e5501b8e3ceb --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorProxyHttpApi-test.js @@ -0,0 +1,377 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 { + JsonPagesListResponse, + JsonVersionResponse, +} from '../inspector-proxy/types'; + +import {fetchJson, fetchLocal} from './FetchUtils'; +import {createDeviceMock} from './InspectorDeviceUtils'; +import {withAbortSignalForEachTest} from './ResourceUtils'; +import {withServerForEachTest} from './ServerUtils'; + +import nullthrows from 'nullthrows'; + +// Must be greater than or equal to PAGES_POLLING_INTERVAL in `InspectorProxy.js`. +const PAGES_POLLING_DELAY = 1000; + +jest.useFakeTimers(); + +describe('inspector proxy HTTP API', () => { + const serverRef = withServerForEachTest({ + logger: undefined, + projectRoot: '', + }); + const autoCleanup = withAbortSignalForEachTest(); + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('/json/version endpoint', () => { + test('returns version', async () => { + const json = await fetchJson( + `${serverRef.serverBaseUrl}/json/version`, + ); + expect(json).toMatchSnapshot(); + }); + }); + + describe.each(['/json', '/json/list'])('%s endpoint', endpoint => { + test('empty on start', async () => { + const json = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + expect(json).toEqual([]); + }); + + test('updates page details through polling', async () => { + const device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + try { + device1.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ]); + + jest.advanceTimersByTime(PAGES_POLLING_DELAY); + + const jsonBefore = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + + device1.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1-updated', + title: 'bar-title-updated', + vm: 'bar-vm-updated', + }, + ]); + + jest.advanceTimersByTime(PAGES_POLLING_DELAY); + + const jsonAfter = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + + expect(jsonBefore).toEqual([ + expect.objectContaining({ + id: 'device1-page1', + title: 'bar-title', + vm: 'bar-vm', + }), + ]); + + expect(jsonAfter).toEqual([ + expect.objectContaining({ + id: 'device1-page1-updated', + title: 'bar-title-updated', + vm: 'bar-vm-updated', + }), + ]); + } finally { + device1.close(); + } + }); + + test('returns to empty on device disconnect', async () => { + const device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + try { + device1.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ]); + + jest.advanceTimersByTime(PAGES_POLLING_DELAY); + + const jsonBefore = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + + device1.close(); + + const jsonAfter = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + + expect(jsonBefore).toEqual([ + expect.objectContaining({ + id: 'device1-page1', + title: 'bar-title', + vm: 'bar-vm', + }), + ]); + + expect(jsonAfter).toEqual([]); + } finally { + device1.close(); + } + }); + + test('reports pages from two connected devices', async () => { + const device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + + device1.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ]); + + const device2 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device2&name=foo&app=bar`, + autoCleanup.signal, + ); + device2.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ]); + + // Ensure polling has happened a few times + jest.advanceTimersByTime(10 * PAGES_POLLING_DELAY); + + try { + const json = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + expect(json).toEqual([ + { + description: 'bar-app', + deviceName: 'foo', + devtoolsFrontendUrl: expect.any(String), + faviconUrl: 'https://reactjs.org/favicon.ico', + id: 'device1-page1', + reactNative: { + capabilities: {}, + logicalDeviceId: 'device1', + }, + title: 'bar-title', + type: 'node', + vm: 'bar-vm', + webSocketDebuggerUrl: expect.any(String), + }, + { + description: 'bar-app', + deviceName: 'foo', + devtoolsFrontendUrl: expect.any(String), + faviconUrl: 'https://reactjs.org/favicon.ico', + id: 'device2-page1', + reactNative: { + capabilities: {}, + logicalDeviceId: 'device2', + }, + title: 'bar-title', + type: 'node', + vm: 'bar-vm', + webSocketDebuggerUrl: expect.any(String), + }, + ]); + } finally { + device1.close(); + device2.close(); + } + }); + + test('removes pages with duplicate IDs', async () => { + const device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + try { + device1.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + { + app: 'bar-app-other', + id: 'page1', + title: 'bar-title-other', + vm: 'bar-vm-other', + }, + ]); + + jest.advanceTimersByTime(PAGES_POLLING_DELAY); + + const json = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + + expect(json).toEqual([ + expect.objectContaining({ + id: 'device1-page1', + title: 'bar-title-other', + vm: 'bar-vm-other', + }), + ]); + } finally { + device1.close(); + } + }); + + describe('HTTP vs HTTPS', () => { + const secureServerRef = withServerForEachTest({ + logger: undefined, + projectRoot: '', + secure: true, + }); + + test('uses `wss` scheme and param if server is HTTPS', async () => { + const page = { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }; + + let deviceHttp, deviceHttps; + + try { + deviceHttp = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + deviceHttp.getPages.mockImplementation(() => [page]); + + deviceHttps = await createDeviceMock( + `${secureServerRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + deviceHttps.getPages.mockImplementation(() => [page]); + + jest.advanceTimersByTime(PAGES_POLLING_DELAY); + + const [pageHttp] = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + const [pageHttps] = await fetchJson( + `${secureServerRef.serverBaseUrl}${endpoint}`, + ); + + expect(pageHttp.webSocketDebuggerUrl).toMatch(/^ws:\/\//); + expect(pageHttps.webSocketDebuggerUrl).toMatch(/^wss:\/\//); + expect(pageHttp.devtoolsFrontendUrl).toMatch(/[&?]ws=/); + expect(pageHttps.devtoolsFrontendUrl).toMatch(/[&?]wss=/); + } finally { + deviceHttp?.close(); + deviceHttps?.close(); + } + }); + }); + + test('handles Unicode data safely', async () => { + const device = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + try { + device.getPages.mockImplementation(() => [ + { + app: 'bar-app 📱', + id: 'page1 🛂', + title: 'bar-title 📰', + vm: 'bar-vm 🤖', + }, + ]); + + jest.advanceTimersByTime(PAGES_POLLING_DELAY); + + const json = await fetchJson( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + expect(json).toEqual([ + expect.objectContaining({ + description: 'bar-app 📱', + deviceName: 'foo', + id: 'device1-page1 🛂', + title: 'bar-title 📰', + vm: 'bar-vm 🤖', + }), + ]); + } finally { + device.close(); + } + }); + + test('includes a valid Content-Length header', async () => { + // NOTE: This test is needed because chrome://inspect's HTTP client is picky + // and doesn't accept responses without a Content-Length header. + const device = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + try { + device.getPages.mockImplementation(() => [ + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ]); + + jest.advanceTimersByTime(PAGES_POLLING_DELAY); + + const response = await fetchLocal( + `${serverRef.serverBaseUrl}${endpoint}`, + ); + expect(response.headers.get('Content-Length')).not.toBeNull(); + } finally { + device.close(); + } + }); + }); +}); diff --git a/packages/dev-middleware/src/__tests__/InspectorProxyReactNativeReloads-test.js b/packages/dev-middleware/src/__tests__/InspectorProxyReactNativeReloads-test.js new file mode 100644 index 000000000000..a89ddbd08ed5 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/InspectorProxyReactNativeReloads-test.js @@ -0,0 +1,485 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {fetchJson} from './FetchUtils'; +import {createDebuggerMock} from './InspectorDebuggerUtils'; +import {createDeviceMock} from './InspectorDeviceUtils'; +import {createAndConnectTarget} from './InspectorProtocolUtils'; +import {withAbortSignalForEachTest} from './ResourceUtils'; +import {withServerForEachTest} from './ServerUtils'; +import invariant from 'invariant'; +import until from 'wait-for-expect'; + +// WebSocket is unreliable when using fake timers. +jest.useRealTimers(); + +jest.setTimeout(10000); + +describe('inspector proxy React Native reloads', () => { + const serverRef = withServerForEachTest({ + logger: undefined, + projectRoot: '', + }); + const autoCleanup = withAbortSignalForEachTest(); + afterEach(() => { + jest.clearAllMocks(); + }); + + test('routing messages from the debugger to the latest React Native page', async () => { + let device1, debugger_; + try { + /*** + * Connect a device with one React Native page. + */ + device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-initial', + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + vm: 'vm', + }, + ]); + let pageList; + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList.length).toBeGreaterThan(0); + }); + invariant(pageList != null, ''); + + /*** + * The proxy reports *two* pages. + */ + const syntheticPage = pageList.find( + ({title}) => + // NOTE: Magic string used for the synthetic page that has a stable ID + title === 'React Native Experimental (Improved Chrome Reloads)', + ); + const originalPage = pageList.find( + ({title}) => title === 'React Native (mock)', + ); + expect(syntheticPage).not.toBeUndefined(); + expect(originalPage).not.toBeUndefined(); + expect(originalPage.id).toContain('originalPage-initial'); + expect(syntheticPage.id).not.toEqual(originalPage.id); + + // Connect to the synthetic page + debugger_ = await createDebuggerMock( + syntheticPage.webSocketDebuggerUrl, + autoCleanup.signal, + ); + + debugger_.send({ + method: 'Console.enable', + id: 0, + }); + + await until(() => + expect(device1.wrappedEventParsed).toBeCalledWith({ + pageId: 'originalPage-initial', + wrappedEvent: { + method: 'Console.enable', + id: 0, + }, + }), + ); + + /** + * Replace our original page with a new one. + */ + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-updated', + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + vm: 'vm', + }, + ]); + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList).toContainEqual( + expect.objectContaining({ + id: expect.stringContaining('originalPage-updated'), + }), + ); + }); + + /** + * We can reuse our existing debugger connection to the synthetic page. + * Messages will be routed to the updated page. + */ + debugger_.send({ + method: 'Console.disable', + id: 1, + }); + + await until(() => + expect(device1.wrappedEventParsed).toBeCalledWith({ + pageId: 'originalPage-updated', + wrappedEvent: { + method: 'Console.disable', + id: 1, + }, + }), + ); + } finally { + device1?.close(); + debugger_?.close(); + } + }); + + test('routing messages from the latest React Native page to the debugger', async () => { + let device1, debugger_; + try { + /*** + * Connect a device with one React Native page. + */ + device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-initial', + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + vm: 'vm', + }, + ]); + let pageList; + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList.length).toBeGreaterThan(0); + }); + invariant(pageList != null, ''); + + /*** + * The proxy reports *two* pages. + */ + const syntheticPage = pageList.find( + ({title}) => + // NOTE: Magic string used for the synthetic page that has a stable ID + title === 'React Native Experimental (Improved Chrome Reloads)', + ); + const originalPage = pageList.find( + ({title}) => title === 'React Native (mock)', + ); + expect(syntheticPage).not.toBeUndefined(); + expect(originalPage).not.toBeUndefined(); + expect(originalPage.id).toContain('originalPage-initial'); + expect(syntheticPage.id).not.toEqual(originalPage.id); + + // Connect to the synthetic page + debugger_ = await createDebuggerMock( + syntheticPage.webSocketDebuggerUrl, + autoCleanup.signal, + ); + + device1.sendWrappedEvent('originalPage-initial', { + error: 'Mock error', + }); + + await until(() => + expect(debugger_.handle).toBeCalledWith({ + error: 'Mock error', + }), + ); + + /** + * Replace our original page with a new one. + */ + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-updated', + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + vm: 'vm', + }, + ]); + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList).toContainEqual( + expect.objectContaining({ + id: expect.stringContaining('originalPage-updated'), + }), + ); + }); + + /** + * We can reuse our existing debugger connection to the synthetic page. + * Messages from the updated page will be routed to the debugger. + */ + device1.sendWrappedEvent('originalPage-initial', { + error: 'Another mock error', + }); + + await until(() => + expect(debugger_.handle).toBeCalledWith({ + error: 'Another mock error', + }), + ); + } finally { + device1?.close(); + debugger_?.close(); + } + }); + + test('injecting setup messages after a reload', async () => { + let device1, debugger_; + try { + /*** + * Connect a device with one React Native page. + */ + device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-initial', + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + vm: 'vm', + }, + ]); + let pageList; + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList.length).toBeGreaterThan(0); + }); + invariant(pageList != null, ''); + + const syntheticPage = pageList.find( + ({title}) => + // NOTE: Magic string used for the synthetic page that has a stable ID + title === 'React Native Experimental (Improved Chrome Reloads)', + ); + expect(syntheticPage).not.toBeUndefined(); + + // Connect to the synthetic page + debugger_ = await createDebuggerMock( + syntheticPage.webSocketDebuggerUrl, + autoCleanup.signal, + ); + + /** + * Replace our original page with a new one. + */ + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-updated', + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + vm: 'vm', + }, + ]); + + /** + * The new page receives setup messages from the proxy. + */ + device1.wrappedEventParsed.mockClear(); + await until(async () => { + expect(device1.wrappedEventParsed).toBeCalledWith({ + pageId: 'originalPage-updated', + wrappedEvent: { + method: 'Runtime.enable', + id: expect.any(Number), + }, + }); + expect(device1.wrappedEventParsed).toBeCalledWith({ + pageId: 'originalPage-updated', + wrappedEvent: { + method: 'Debugger.enable', + id: expect.any(Number), + }, + }); + }); + + /** + * When the new page notifies us about the new execution context, the + * proxy first injects a notification about the old context(s) going + * away, and also asks the new page to resume (under the assumption that + * it starts in a paused state). + */ + device1.sendWrappedEvent('originalPage-updated', { + method: 'Runtime.executionContextCreated', + }); + debugger_.handle.mockClear(); + device1.wrappedEventParsed.mockClear(); + await until(() => { + expect(debugger_.handle.mock.calls).toEqual([ + // NOTE: The messages need to arrive in this exact order. + [ + { + method: 'Runtime.executionContextsCleared', + }, + ], + [ + expect.objectContaining({ + method: 'Runtime.executionContextCreated', + }), + ], + ]); + }); + await until(() => { + expect(device1.wrappedEventParsed).toBeCalledWith({ + pageId: 'originalPage-updated', + wrappedEvent: expect.objectContaining({ + method: 'Debugger.resume', + id: expect.any(Number), + }), + }); + }); + } finally { + device1?.close(); + debugger_?.close(); + } + }); + + test('device disconnect event results in a nonstandard "reload" message to the debugger', async () => { + const {device, debugger_} = await createAndConnectTarget( + serverRef, + autoCleanup.signal, + { + app: 'bar-app', + id: 'page1', + title: 'bar-title', + vm: 'bar-vm', + }, + ); + + try { + device.send({ + event: 'disconnect', + payload: { + pageId: 'page1', + }, + }); + await until(() => + expect(debugger_.handle).toBeCalledWith({ + method: 'reload', + }), + ); + } finally { + device.close(); + } + }); + + test("disabled when target has 'nativePageReloads' capability flag", async () => { + let device1; + try { + /*** + * Connect a device with one React Native page. + */ + device1 = await createDeviceMock( + `${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`, + autoCleanup.signal, + ); + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-initial', + // NOTE: 'React' is a magic string used to detect React Native pages + // in legacy mode. + title: 'React Native (mock)', + capabilities: { + nativePageReloads: true, + }, + vm: 'vm', + }, + ]); + let pageList; + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList.length).toBeGreaterThan(0); + }); + invariant(pageList != null, ''); + + /** + * The proxy reports just one page, without the synthetic page reported + * in legacy mode. + */ + + expect(pageList).toEqual([ + expect.objectContaining({ + id: expect.stringContaining('originalPage-initial'), + title: 'React Native (mock)', + }), + ]); + + /** + * Replace our original page with a new one. + */ + device1.getPages.mockImplementation(() => [ + { + app: 'bar', + id: 'originalPage-updated', + // NOTE: 'React' is a magic string used to detect React Native pages. + title: 'React Native (mock)', + capabilities: { + nativePageReloads: true, + }, + vm: 'vm', + }, + ]); + await until(async () => { + pageList = (await fetchJson( + `${serverRef.serverBaseUrl}/json`, + // $FlowIgnore[unclear-type] + ): any); + expect(pageList).toContainEqual( + expect.objectContaining({ + id: expect.stringContaining('originalPage-updated'), + }), + ); + }); + + /** + * There's still just one page reported. + */ + expect(pageList).toEqual([ + expect.objectContaining({ + id: expect.stringContaining('originalPage-updated'), + title: 'React Native (mock)', + }), + ]); + } finally { + device1?.close(); + } + }); +}); diff --git a/packages/dev-middleware/src/__tests__/ResourceUtils.js b/packages/dev-middleware/src/__tests__/ResourceUtils.js new file mode 100644 index 000000000000..0ad12756c64c --- /dev/null +++ b/packages/dev-middleware/src/__tests__/ResourceUtils.js @@ -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-local + * @format + * @oncall react_native + */ + +export function withAbortSignalForEachTest(): $ReadOnly<{signal: AbortSignal}> { + const ref: {signal: AbortSignal} = { + // $FlowIgnore[unsafe-getters-setters] + get signal() { + throw new Error( + 'The return value of withAbortSignalForEachTest is lazily initialized and can only be accessed in tests.', + ); + }, + }; + let controller; + beforeEach(() => { + controller = new AbortController(); + Object.defineProperty(ref, 'signal', { + value: controller.signal, + }); + }); + afterEach(() => { + controller.abort(); + }); + return ref; +} diff --git a/packages/dev-middleware/src/__tests__/ServerUtils.js b/packages/dev-middleware/src/__tests__/ServerUtils.js new file mode 100644 index 000000000000..bcc3db08115c --- /dev/null +++ b/packages/dev-middleware/src/__tests__/ServerUtils.js @@ -0,0 +1,162 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {JSONSerializable} from '../inspector-proxy/types'; +import type {HandleFunction} from 'connect'; + +import {createDevMiddleware} from '../'; +import connect from 'connect'; +import http from 'http'; +import https from 'https'; +import * as selfsigned from 'selfsigned'; +import url from 'url'; + +type CreateDevMiddlewareOptions = Parameters[0]; +type CreateServerOptions = { + ...Omit, + secure?: boolean, +}; +type ConnectApp = ReturnType; + +export function withServerForEachTest(options: CreateServerOptions): $ReadOnly<{ + serverBaseUrl: string, + serverBaseWsUrl: string, + app: ConnectApp, + port: number, +}> { + const EAGER_ACCESS_ERROR_MESSAGE = + 'The return value of withServerForEachTest is lazily initialized and can only be accessed in tests.'; + const ref: { + serverBaseUrl: string, + serverBaseWsUrl: string, + app: ConnectApp, + port: number, + } = { + // $FlowIgnore[unsafe-getters-setters] + get serverBaseUrl() { + throw new Error(EAGER_ACCESS_ERROR_MESSAGE); + }, + // $FlowIgnore[unsafe-getters-setters] + get serverBaseWsUrl() { + throw new Error(EAGER_ACCESS_ERROR_MESSAGE); + }, + // $FlowIgnore[unsafe-getters-setters] + get app() { + throw new Error(EAGER_ACCESS_ERROR_MESSAGE); + }, + // $FlowIgnore[unsafe-getters-setters] + get port() { + throw new Error(EAGER_ACCESS_ERROR_MESSAGE); + }, + }; + let server: http$Server | https$Server; + let app: ConnectApp; + beforeEach(async () => { + ({server, app} = await createServer(options)); + const serverBaseUrl = baseUrlForServer( + server, + options.secure ?? false ? 'https' : 'http', + ); + const serverBaseWsUrl = baseUrlForServer( + server, + options.secure ?? false ? 'wss' : 'ws', + ); + Object.defineProperty(ref, 'serverBaseUrl', {value: serverBaseUrl}); + Object.defineProperty(ref, 'serverBaseWsUrl', {value: serverBaseWsUrl}); + Object.defineProperty(ref, 'app', {value: app}); + Object.defineProperty(ref, 'port', {value: server.address().port}); + }); + afterEach(done => { + server.close(() => done()); + }); + return ref; +} + +export async function createServer(options: CreateServerOptions): Promise<{ + server: http$Server | https$Server, + app: ReturnType, +}> { + const app = connect(); + const {secure = false, ...devMiddlewareOptions} = options; + let httpServer; + if (secure) { + const {cert, private: key} = selfsigned.generate( + [{name: 'commonName', value: 'localhost'}], + {days: 1}, + ); + httpServer = https.createServer( + {cert, key}, + // $FlowFixMe[incompatible-call] The types for `connect` and `https` are subtly incompatible as written. + app, + ); + } else { + httpServer = http.createServer(app); + } + + return new Promise((resolve, reject) => { + httpServer.once('error', reject); + httpServer.listen(() => { + const {middleware, websocketEndpoints} = createDevMiddleware({ + ...devMiddlewareOptions, + serverBaseUrl: baseUrlForServer(httpServer, secure ? 'https' : 'http'), + }); + app.use(middleware); + httpServer.on('upgrade', (request, socket, head) => { + const {pathname} = url.parse(request.url); + if (pathname != null && websocketEndpoints[pathname]) { + websocketEndpoints[pathname].handleUpgrade( + request, + socket, + head, + ws => { + websocketEndpoints[pathname].emit('connection', ws, request); + }, + ); + } else { + socket.destroy(); + } + }); + resolve({server: httpServer, app}); + }); + }); +} + +export function baseUrlForServer( + server: http$Server | https$Server, + scheme: string, +): string { + const address = server.address(); + // Assumption: `server` is local and listening on `localhost`. We can't use + // the IP address because HTTPS requires a hostname. + return `${scheme}://localhost:${address.port}`; +} + +export function serveStaticJson(json: JSONSerializable): HandleFunction { + return (req, res, next) => { + if (req.method !== 'GET') { + next(); + return; + } + res.writeHead(200, {'Content-Type': 'application/json'}); + res.end(JSON.stringify(json)); + }; +} + +export function serveStaticText(text: string): HandleFunction { + return (req, res, next) => { + if (req.method !== 'GET') { + next(); + return; + } + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end(text); + }; +} diff --git a/packages/dev-middleware/src/__tests__/__fixtures__/mock-source-file.txt b/packages/dev-middleware/src/__tests__/__fixtures__/mock-source-file.txt new file mode 100644 index 000000000000..257cc5642cb1 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/__fixtures__/mock-source-file.txt @@ -0,0 +1 @@ +foo diff --git a/packages/dev-middleware/src/__tests__/__snapshots__/InspectorProxyHttpApi-test.js.snap b/packages/dev-middleware/src/__tests__/__snapshots__/InspectorProxyHttpApi-test.js.snap new file mode 100644 index 000000000000..8c0813b40720 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/__snapshots__/InspectorProxyHttpApi-test.js.snap @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`inspector proxy HTTP API /json/version endpoint returns version 1`] = ` +Object { + "Browser": "Mobile JavaScript", + "Protocol-Version": "1.1", +} +`; diff --git a/packages/dev-middleware/src/__tests__/getDevToolsFrontendUrl-test.js b/packages/dev-middleware/src/__tests__/getDevToolsFrontendUrl-test.js new file mode 100644 index 000000000000..3d0818efc257 --- /dev/null +++ b/packages/dev-middleware/src/__tests__/getDevToolsFrontendUrl-test.js @@ -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-local + * @format + * @oncall react_native + */ + +import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl'; + +describe('getDevToolsFrontendUrl', () => { + const webSocketDebuggerUrl = + 'ws://localhost:8081/inspector/debug?device=1a9372c&page=-1'; + + describe('given an absolute devServerUrl', () => { + const devServerUrl = 'http://localhost:8081'; + + it('should return a valid url for all experiments off', async () => { + const experiments = { + enableNetworkInspector: false, + enableNewDebugger: false, + enableOpenDebuggerRedirect: false, + }; + const actual = getDevToolsFrontendUrl( + experiments, + webSocketDebuggerUrl, + devServerUrl, + ); + const url = new URL(actual); + expect(url.host).toBe('localhost:8081'); + expect(url.pathname).toBe('/debugger-frontend/rn_inspector.html'); + expect(url.searchParams.get('ws')).toBe( + 'localhost:8081/inspector/debug?device=1a9372c&page=-1', + ); + }); + + it('should return a valid url for enableNetworkInspector experiment on', async () => { + const experiments = { + enableNetworkInspector: true, + enableNewDebugger: true, + enableOpenDebuggerRedirect: false, + }; + const actual = getDevToolsFrontendUrl( + experiments, + webSocketDebuggerUrl, + devServerUrl, + ); + const url = new URL(actual); + expect(url.host).toBe('localhost:8081'); + expect(url.pathname).toBe('/debugger-frontend/rn_inspector.html'); + expect(url.searchParams.get('unstable_enableNetworkPanel')).toBe('true'); + expect(url.searchParams.get('ws')).toBe( + 'localhost:8081/inspector/debug?device=1a9372c&page=-1', + ); + }); + }); + + describe('given a relative devServerUrl', () => { + const relativeDevServerUrl = ''; + + function assertValidRelativeURL(relativeURL: string): URL { + const anyBaseURL = new URL('https://www.example.com'); + try { + // By definition, a valid relative URL must be valid when combined with any base URL + return new URL(relativeURL, anyBaseURL); + } catch (e) { + throw new Error(`Relative URL is invalid: ${relativeURL}`, {cause: e}); + } + } + + it('should return a valid url for all experiments off', async () => { + const experiments = { + enableNetworkInspector: false, + enableNewDebugger: false, + enableOpenDebuggerRedirect: false, + }; + const actual = getDevToolsFrontendUrl( + experiments, + webSocketDebuggerUrl, + relativeDevServerUrl, + ); + const url = assertValidRelativeURL(actual); + expect(url.pathname).toBe('/debugger-frontend/rn_inspector.html'); + expect(url.searchParams.get('ws')).toBe( + 'localhost:8081/inspector/debug?device=1a9372c&page=-1', + ); + }); + + it('should return a valid url for enableNetworkInspector experiment on', async () => { + const experiments = { + enableNetworkInspector: true, + enableNewDebugger: true, + enableOpenDebuggerRedirect: false, + }; + const actual = getDevToolsFrontendUrl( + experiments, + webSocketDebuggerUrl, + relativeDevServerUrl, + ); + const url = assertValidRelativeURL(actual); + expect(url.pathname).toBe('/debugger-frontend/rn_inspector.html'); + expect(url.searchParams.get('unstable_enableNetworkPanel')).toBe('true'); + expect(url.searchParams.get('ws')).toBe( + 'localhost:8081/inspector/debug?device=1a9372c&page=-1', + ); + }); + }); +}); diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js index 2e5cf12b1c28..8766811b8885 100644 --- a/packages/dev-middleware/src/createDevMiddleware.js +++ b/packages/dev-middleware/src/createDevMiddleware.js @@ -9,20 +9,21 @@ * @oncall react_native */ -import type {NextHandleFunction} from 'connect'; +import type {CreateCustomMessageHandlerFn} from './inspector-proxy/CustomMessageHandler'; import type {BrowserLauncher} from './types/BrowserLauncher'; import type {EventReporter} from './types/EventReporter'; import type {Experiments, ExperimentsConfig} from './types/Experiments'; import type {Logger} from './types/Logger'; +import type {NextHandleFunction} from 'connect'; +import InspectorProxy from './inspector-proxy/InspectorProxy'; +import deprecated_openFlipperMiddleware from './middleware/deprecated_openFlipperMiddleware'; +import openDebuggerMiddleware from './middleware/openDebuggerMiddleware'; +import DefaultBrowserLauncher from './utils/DefaultBrowserLauncher'; import reactNativeDebuggerFrontendPath from '@react-native/debugger-frontend'; import connect from 'connect'; import path from 'path'; -// $FlowFixMe[untyped-import] TODO: type serve-static import serveStaticMiddleware from 'serve-static'; -import openDebuggerMiddleware from './middleware/openDebuggerMiddleware'; -import InspectorProxy from './inspector-proxy/InspectorProxy'; -import DefaultBrowserLauncher from './utils/DefaultBrowserLauncher'; type Options = $ReadOnly<{ projectRoot: string, @@ -59,6 +60,14 @@ type Options = $ReadOnly<{ * This is an unstable API with no semver guarantees. */ unstable_experiments?: ExperimentsConfig, + + /** + * Create custom handler to add support for unsupported CDP events, or debuggers. + * This handler is instantiated per logical device and debugger pair. + * + * This is an unstable API with no semver guarantees. + */ + unstable_customInspectorMessageHandler?: CreateCustomMessageHandlerFn, }>; type DevMiddlewareAPI = $ReadOnly<{ @@ -73,6 +82,7 @@ export default function createDevMiddleware({ unstable_browserLauncher = DefaultBrowserLauncher, unstable_eventReporter, unstable_experiments: experimentConfig = {}, + unstable_customInspectorMessageHandler, }: Options): DevMiddlewareAPI { const experiments = getExperiments(experimentConfig); @@ -81,19 +91,24 @@ export default function createDevMiddleware({ serverBaseUrl, unstable_eventReporter, experiments, + unstable_customInspectorMessageHandler, ); 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 +126,8 @@ export default function createDevMiddleware({ function getExperiments(config: ExperimentsConfig): Experiments { return { - enableCustomDebuggerFrontend: config.enableCustomDebuggerFrontend ?? false, + enableNewDebugger: config.enableNewDebugger ?? false, enableOpenDebuggerRedirect: config.enableOpenDebuggerRedirect ?? false, + enableNetworkInspector: config.enableNetworkInspector ?? false, }; } diff --git a/packages/dev-middleware/src/index.flow.js b/packages/dev-middleware/src/index.flow.js index 4060a2bb2d4c..7afbbdbd8894 100644 --- a/packages/dev-middleware/src/index.flow.js +++ b/packages/dev-middleware/src/index.flow.js @@ -13,3 +13,8 @@ export {default as createDevMiddleware} from './createDevMiddleware'; export type {BrowserLauncher, LaunchedBrowser} from './types/BrowserLauncher'; export type {EventReporter, ReportableEvent} from './types/EventReporter'; +export type { + CustomMessageHandler, + CustomMessageHandlerConnection, + CreateCustomMessageHandlerFn, +} from './inspector-proxy/CustomMessageHandler'; diff --git a/packages/dev-middleware/src/inspector-proxy/CustomMessageHandler.js b/packages/dev-middleware/src/inspector-proxy/CustomMessageHandler.js new file mode 100644 index 000000000000..1c3dd473b7c1 --- /dev/null +++ b/packages/dev-middleware/src/inspector-proxy/CustomMessageHandler.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. + * + * @flow strict-local + * @format + */ + +import type {JSONSerializable, Page} from './types'; + +type ExposedDevice = $ReadOnly<{ + appId: string, + id: string, + name: string, + sendMessage: (message: JSONSerializable) => void, +}>; + +type ExposedDebugger = $ReadOnly<{ + userAgent: string | null, + sendMessage: (message: JSONSerializable) => void, +}>; + +export type CustomMessageHandlerConnection = $ReadOnly<{ + page: Page, + device: ExposedDevice, + debugger: ExposedDebugger, +}>; + +export type CreateCustomMessageHandlerFn = ( + connection: CustomMessageHandlerConnection, +) => ?CustomMessageHandler; + +/** + * The device message middleware allows implementers to handle unsupported CDP messages. + * It is instantiated per device and may contain state that is specific to that device. + * The middleware can also mark messages from the device or debugger as handled, which stops propagating. + */ +export interface CustomMessageHandler { + /** + * Handle a CDP message coming from the device. + * This is invoked before the message is sent to the debugger. + * When returning true, the message is considered handled and will not be sent to the debugger. + */ + handleDeviceMessage(message: JSONSerializable): true | void; + + /** + * Handle a CDP message coming from the debugger. + * This is invoked before the message is sent to the device. + * When returning true, the message is considered handled and will not be sent to the device. + */ + handleDebuggerMessage(message: JSONSerializable): true | void; +} diff --git a/packages/dev-middleware/src/inspector-proxy/Device.js b/packages/dev-middleware/src/inspector-proxy/Device.js index 9666fa222ed9..b4ef0ad731ca 100644 --- a/packages/dev-middleware/src/inspector-proxy/Device.js +++ b/packages/dev-middleware/src/inspector-proxy/Device.js @@ -9,23 +9,29 @@ * @oncall react_native */ +import type {EventReporter} from '../types/EventReporter'; +import type { + CDPClientMessage, + CDPRequest, + CDPResponse, + CDPServerMessage, +} from './cdp-types/messages'; +import type { + CreateCustomMessageHandlerFn, + CustomMessageHandler, +} from './CustomMessageHandler'; import type { - DebuggerRequest, - ErrorResponse, - GetScriptSourceRequest, - GetScriptSourceResponse, MessageFromDevice, MessageToDevice, Page, - SetBreakpointByUrlRequest, + TargetCapabilityFlags, } from './types'; import DeviceEventReporter from './DeviceEventReporter'; import * as fs from 'fs'; -import * as path from 'path'; import fetch from 'node-fetch'; +import * as path from 'path'; import WS from 'ws'; -import type {EventReporter} from '../types/EventReporter'; const debug = require('debug')('Metro:InspectorProxy'); @@ -34,7 +40,7 @@ const PAGES_POLLING_INTERVAL = 1000; // Android's stock emulator and other emulators such as genymotion use a standard localhost alias. const EMULATOR_LOCALHOST_ADDRESSES: Array = ['10.0.2.2', '10.0.3.2']; -// Prefix for script URLs that are alphanumeric IDs. See comment in _processMessageFromDevice method for +// Prefix for script URLs that are alphanumeric IDs. See comment in #processMessageFromDeviceLegacy method for // more details. const FILE_PREFIX = 'file://'; @@ -49,6 +55,11 @@ type DebuggerInfo = { userAgent: string | null, }; +type DebuggerConnection = { + ...DebuggerInfo, + customHandler: ?CustomMessageHandler, +}; + const REACT_NATIVE_RELOADABLE_PAGE_ID = '-1'; /** @@ -57,41 +68,46 @@ const REACT_NATIVE_RELOADABLE_PAGE_ID = '-1'; */ export default class Device { // ID of the device. - _id: string; + #id: string; // Name of the device. - _name: string; + #name: string; // Package name of the app. - _app: string; + #app: string; // Stores socket connection between Inspector Proxy and device. - _deviceSocket: WS; + #deviceSocket: WS; - // Stores last list of device's pages. - _pages: Array; + // Stores the most recent listing of device's pages, keyed by the `id` field. + #pages: $ReadOnlyMap; // Stores information about currently connected debugger (if any). - _debuggerConnection: ?DebuggerInfo = null; + #debuggerConnection: ?DebuggerConnection = null; // Last known Page ID of the React Native page. // This is used by debugger connections that don't have PageID specified // (and will interact with the latest React Native page). - _lastConnectedReactNativePage: ?Page = null; + #lastConnectedLegacyReactNativePage: ?Page = null; // Whether we are in the middle of a reload in the REACT_NATIVE_RELOADABLE_PAGE. - _isReloading: boolean = false; + #isLegacyPageReloading: boolean = false; // The previous "GetPages" message, for deduplication in debug logs. - _lastGetPagesMessage: string = ''; + #lastGetPagesMessage: string = ''; // Mapping built from scriptParsed events and used to fetch file content in `Debugger.getScriptSource`. - _scriptIdToSourcePathMapping: Map = new Map(); + #scriptIdToSourcePathMapping: Map = new Map(); // Root of the project used for relative to absolute source path conversion. - _projectRoot: string; + #projectRoot: string; + + #deviceEventReporter: ?DeviceEventReporter; + + #pagesPollingIntervalId: ReturnType; - _deviceEventReporter: ?DeviceEventReporter; + // The device message middleware factory function allowing implementers to handle unsupported CDP messages. + #createCustomMessageHandler: ?CreateCustomMessageHandlerFn; constructor( id: string, @@ -100,69 +116,69 @@ export default class Device { socket: WS, projectRoot: string, eventReporter: ?EventReporter, + createMessageMiddleware: ?CreateCustomMessageHandlerFn, ) { - this._id = id; - this._name = name; - this._app = app; - this._pages = []; - this._deviceSocket = socket; - this._projectRoot = projectRoot; - this._deviceEventReporter = eventReporter + this.#id = id; + this.#name = name; + this.#app = app; + this.#pages = new Map(); + this.#deviceSocket = socket; + this.#projectRoot = projectRoot; + this.#deviceEventReporter = eventReporter ? new DeviceEventReporter(eventReporter, { deviceId: id, deviceName: name, appId: app, }) : null; + this.#createCustomMessageHandler = createMessageMiddleware; // $FlowFixMe[incompatible-call] - this._deviceSocket.on('message', (message: string) => { + this.#deviceSocket.on('message', (message: string) => { const parsedMessage = JSON.parse(message); if (parsedMessage.event === 'getPages') { // There's a 'getPages' message every second, so only show them if they change - if (message !== this._lastGetPagesMessage) { + if (message !== this.#lastGetPagesMessage) { debug( '(Debugger) (Proxy) <- (Device), getPages ping has changed: ' + message, ); - this._lastGetPagesMessage = message; + this.#lastGetPagesMessage = message; } } else { debug('(Debugger) (Proxy) <- (Device): ' + message); } - this._handleMessageFromDevice(parsedMessage); + this.#handleMessageFromDevice(parsedMessage); }); - this._deviceSocket.on('close', () => { - this._deviceEventReporter?.logDisconnection('device'); + // Sends 'getPages' request to device every PAGES_POLLING_INTERVAL milliseconds. + this.#pagesPollingIntervalId = setInterval( + () => this.#sendMessageToDevice({event: 'getPages'}), + PAGES_POLLING_INTERVAL, + ); + this.#deviceSocket.on('close', () => { + this.#deviceEventReporter?.logDisconnection('device'); // Device disconnected - close debugger connection. - if (this._debuggerConnection) { - this._debuggerConnection.socket.close(); - this._debuggerConnection = null; + if (this.#debuggerConnection) { + this.#debuggerConnection.socket.close(); + this.#debuggerConnection = null; } + clearInterval(this.#pagesPollingIntervalId); }); - - this._setPagesPolling(); } getName(): string { - return this._name; + return this.#name; } getApp(): string { - return this._app; + return this.#app; } - getPagesList(): Array { - if (this._lastConnectedReactNativePage) { - const reactNativeReloadablePage = { - id: REACT_NATIVE_RELOADABLE_PAGE_ID, - title: 'React Native Experimental (Improved Chrome Reloads)', - vm: "don't use", - app: this._app, - }; - return this._pages.concat(reactNativeReloadablePage); + getPagesList(): $ReadOnlyArray { + if (this.#lastConnectedLegacyReactNativePage) { + return [...this.#pages.values(), this.#createSyntheticPage()]; } else { - return this._pages; + return [...this.#pages.values()]; } } @@ -178,17 +194,17 @@ export default class Device { }>, ) { // Clear any commands we were waiting on. - this._deviceEventReporter?.logDisconnection('debugger'); + this.#deviceEventReporter?.logDisconnection('debugger'); - this._deviceEventReporter?.logConnection('debugger', { + this.#deviceEventReporter?.logConnection('debugger', { pageId, frontendUserAgent: metadata.userAgent, }); // Disconnect current debugger if we already have debugger connected. - if (this._debuggerConnection) { - this._debuggerConnection.socket.close(); - this._debuggerConnection = null; + if (this.#debuggerConnection) { + this.#debuggerConnection.socket.close(); + this.#debuggerConnection = null; } const debuggerInfo = { @@ -196,15 +212,68 @@ export default class Device { prependedFilePrefix: false, pageId, userAgent: metadata.userAgent, + customHandler: null, }; - this._debuggerConnection = debuggerInfo; - debug(`Got new debugger connection for page ${pageId} of ${this._name}`); + // TODO(moti): Handle null case explicitly, e.g. refuse to connect to + // unknown pages. + const page: ?Page = + pageId === REACT_NATIVE_RELOADABLE_PAGE_ID + ? this.#createSyntheticPage() + : this.#pages.get(pageId); + + this.#debuggerConnection = debuggerInfo; - this._sendMessageToDevice({ + debug(`Got new debugger connection for page ${pageId} of ${this.#name}`); + + if (page && this.#debuggerConnection && this.#createCustomMessageHandler) { + this.#debuggerConnection.customHandler = this.#createCustomMessageHandler( + { + page, + debugger: { + userAgent: debuggerInfo.userAgent, + sendMessage: message => { + try { + const payload = JSON.stringify(message); + debug('(Debugger) <- (Proxy) (Device): ' + payload); + socket.send(payload); + } catch {} + }, + }, + device: { + appId: this.#app, + id: this.#id, + name: this.#name, + sendMessage: message => { + try { + const payload = JSON.stringify({ + event: 'wrappedEvent', + payload: { + pageId: this.#mapToDevicePageId(pageId), + wrappedEvent: JSON.stringify(message), + }, + }); + debug('(Debugger) -> (Proxy) (Device): ' + payload); + this.#deviceSocket.send(payload); + } catch {} + }, + }, + }, + ); + + if (this.#debuggerConnection.customHandler) { + debug('Created new custom message handler for debugger connection'); + } else { + debug( + 'Skipping new custom message handler for debugger connection, factory function returned null', + ); + } + } + + this.#sendMessageToDevice({ event: 'connect', payload: { - pageId: this._mapToDevicePageId(pageId), + pageId: this.#mapToDevicePageId(pageId), }, }); @@ -212,36 +281,48 @@ export default class Device { socket.on('message', (message: string) => { debug('(Debugger) -> (Proxy) (Device): ' + message); const debuggerRequest = JSON.parse(message); - this._deviceEventReporter?.logRequest(debuggerRequest, 'debugger', { - pageId: this._debuggerConnection?.pageId ?? null, + this.#deviceEventReporter?.logRequest(debuggerRequest, 'debugger', { + pageId: this.#debuggerConnection?.pageId ?? null, frontendUserAgent: metadata.userAgent, }); - const handled = this._interceptMessageFromDebugger( - debuggerRequest, - debuggerInfo, - socket, - ); + let processedReq = debuggerRequest; - if (!handled) { - this._sendMessageToDevice({ + if ( + this.#debuggerConnection?.customHandler?.handleDebuggerMessage( + debuggerRequest, + ) === true + ) { + return; + } + + if (!page || !this.#pageHasCapability(page, 'nativeSourceCodeFetching')) { + processedReq = this.#interceptClientMessageForSourceFetching( + debuggerRequest, + debuggerInfo, + socket, + ); + } + + if (processedReq) { + this.#sendMessageToDevice({ event: 'wrappedEvent', payload: { - pageId: this._mapToDevicePageId(pageId), - wrappedEvent: JSON.stringify(debuggerRequest), + pageId: this.#mapToDevicePageId(pageId), + wrappedEvent: JSON.stringify(processedReq), }, }); } }); socket.on('close', () => { - debug(`Debugger for page ${pageId} and ${this._name} disconnected.`); - this._deviceEventReporter?.logDisconnection('debugger'); - this._sendMessageToDevice({ + debug(`Debugger for page ${pageId} and ${this.#name} disconnected.`); + this.#deviceEventReporter?.logDisconnection('debugger'); + this.#sendMessageToDevice({ event: 'disconnect', payload: { - pageId: this._mapToDevicePageId(pageId), + pageId: this.#mapToDevicePageId(pageId), }, }); - this._debuggerConnection = null; + this.#debuggerConnection = null; }); // $FlowFixMe[method-unbinding] @@ -264,19 +345,19 @@ export default class Device { */ handleDuplicateDeviceConnection(newDevice: Device) { if ( - this._app !== newDevice.getApp() || - this._name !== newDevice.getName() + this.#app !== newDevice.getApp() || + this.#name !== newDevice.getName() ) { - this._deviceSocket.close(); - this._debuggerConnection?.socket.close(); + this.#deviceSocket.close(); + this.#debuggerConnection?.socket.close(); } - const oldDebugger = this._debuggerConnection; - this._debuggerConnection = null; + const oldDebugger = this.#debuggerConnection; + this.#debuggerConnection = null; if (oldDebugger) { oldDebugger.socket.removeAllListeners(); - this._deviceSocket.close(); + this.#deviceSocket.close(); newDevice.handleDebuggerConnection( oldDebugger.socket, oldDebugger.pageId, @@ -287,26 +368,74 @@ export default class Device { } } + /** + * Returns `true` if a page supports the given target capability flag. + */ + #pageHasCapability(page: Page, flag: $Keys): boolean { + return page.capabilities[flag] === true; + } + + /** + * Returns the synthetic "React Native Experimental (Improved Chrome Reloads)" page. + */ + #createSyntheticPage(): Page { + return { + id: REACT_NATIVE_RELOADABLE_PAGE_ID, + title: 'React Native Experimental (Improved Chrome Reloads)', + vm: "don't use", + app: this.#app, + capabilities: {}, + }; + } + // Handles messages received from device: - // 1. For getPages responses updates local _pages list. + // 1. For getPages responses updates local #pages list. // 2. All other messages are forwarded to debugger as wrappedEvent. // // In the future more logic will be added to this method for modifying // some of the messages (like updating messages with source maps and file // locations). - _handleMessageFromDevice(message: MessageFromDevice) { + #handleMessageFromDevice(message: MessageFromDevice) { if (message.event === 'getPages') { - this._pages = message.payload; + this.#pages = new Map( + message.payload.map(({capabilities, ...page}) => [ + page.id, + { + ...page, + capabilities: capabilities ?? {}, + }, + ]), + ); + if (message.payload.length !== this.#pages.size) { + const duplicateIds = new Set(); + const idsSeen = new Set(); + for (const page of message.payload) { + if (!idsSeen.has(page.id)) { + idsSeen.add(page.id); + } else { + duplicateIds.add(page.id); + } + } + debug( + `Received duplicate page IDs from device: ${[...duplicateIds].join( + ', ', + )}`, + ); + } - // Check if device have new React Native page. + // Check if device has a new legacy React Native page. // There is usually no more than 2-3 pages per device so this operation // is not expensive. // TODO(hypuk): It is better for VM to send update event when new page is // created instead of manually checking this on every getPages result. - for (let i = 0; i < this._pages.length; ++i) { - if (this._pages[i].title.indexOf('React') >= 0) { - if (this._pages[i].id !== this._lastConnectedReactNativePage?.id) { - this._newReactNativePage(this._pages[i]); + for (const page of this.#pages.values()) { + if (this.#pageHasCapability(page, 'nativePageReloads')) { + continue; + } + + if (page.title.includes('React')) { + if (page.id !== this.#lastConnectedLegacyReactNativePage?.id) { + this.#newLegacyReactNativePage(page); break; } } @@ -315,88 +444,102 @@ export default class Device { // Device sends disconnect events only when page is reloaded or // if debugger socket was disconnected. const pageId = message.payload.pageId; - const debuggerSocket = this._debuggerConnection - ? this._debuggerConnection.socket + // TODO(moti): Handle null case explicitly, e.g. swallow disconnect events + // for unknown pages. + const page: ?Page = this.#pages.get(pageId); + + if (page != null && this.#pageHasCapability(page, 'nativePageReloads')) { + return; + } + + const debuggerSocket = this.#debuggerConnection + ? this.#debuggerConnection.socket : null; if (debuggerSocket && debuggerSocket.readyState === WS.OPEN) { if ( - this._debuggerConnection != null && - this._debuggerConnection.pageId !== REACT_NATIVE_RELOADABLE_PAGE_ID + this.#debuggerConnection != null && + this.#debuggerConnection.pageId !== REACT_NATIVE_RELOADABLE_PAGE_ID ) { - debug(`Page ${pageId} is reloading.`); + debug(`Legacy page ${pageId} is reloading.`); debuggerSocket.send(JSON.stringify({method: 'reload'})); } } } else if (message.event === 'wrappedEvent') { - if (this._debuggerConnection == null) { + if (this.#debuggerConnection == null) { return; } // FIXME: Is it possible that we received message for pageID that does not // correspond to current debugger connection? + // TODO(moti): yes, fix multi-debugger case - const debuggerSocket = this._debuggerConnection.socket; + const debuggerSocket = this.#debuggerConnection.socket; if (debuggerSocket == null || debuggerSocket.readyState !== WS.OPEN) { // TODO(hypuk): Send error back to device? return; } const parsedPayload = JSON.parse(message.payload.wrappedEvent); + const pageId = this.#debuggerConnection?.pageId ?? null; if ('id' in parsedPayload) { - this._deviceEventReporter?.logResponse(parsedPayload, 'device', { - pageId: this._debuggerConnection?.pageId ?? null, - frontendUserAgent: this._debuggerConnection?.userAgent ?? null, + this.#deviceEventReporter?.logResponse(parsedPayload, 'device', { + pageId, + frontendUserAgent: this.#debuggerConnection?.userAgent ?? null, }); } - if (this._debuggerConnection) { + const debuggerConnection = this.#debuggerConnection; + if (debuggerConnection != null) { + if ( + debuggerConnection.customHandler?.handleDeviceMessage( + parsedPayload, + ) === true + ) { + return; + } + // Wrapping just to make flow happy :) // $FlowFixMe[unused-promise] - this._processMessageFromDevice( + this.#processMessageFromDeviceLegacy( parsedPayload, - this._debuggerConnection, + debuggerConnection, + pageId, ).then(() => { const messageToSend = JSON.stringify(parsedPayload); debuggerSocket.send(messageToSend); }); + } else { + debuggerSocket.send(message.payload.wrappedEvent); } } } // Sends single message to device. - _sendMessageToDevice(message: MessageToDevice) { + #sendMessageToDevice(message: MessageToDevice) { try { if (message.event !== 'getPages') { debug('(Debugger) (Proxy) -> (Device): ' + JSON.stringify(message)); } - this._deviceSocket.send(JSON.stringify(message)); + this.#deviceSocket.send(JSON.stringify(message)); } catch (error) {} } - // Sends 'getPages' request to device every PAGES_POLLING_INTERVAL milliseconds. - _setPagesPolling() { - setInterval( - () => this._sendMessageToDevice({event: 'getPages'}), - PAGES_POLLING_INTERVAL, - ); - } - // We received new React Native Page ID. - _newReactNativePage(page: Page) { + #newLegacyReactNativePage(page: Page) { debug(`React Native page updated to ${page.id}`); if ( - this._debuggerConnection == null || - this._debuggerConnection.pageId !== REACT_NATIVE_RELOADABLE_PAGE_ID + this.#debuggerConnection == null || + this.#debuggerConnection.pageId !== REACT_NATIVE_RELOADABLE_PAGE_ID ) { // We can just remember new page ID without any further actions if no // debugger is currently attached or attached debugger is not // "Reloadable React Native" connection. - this._lastConnectedReactNativePage = page; + this.#lastConnectedLegacyReactNativePage = page; return; } - const oldPageId = this._lastConnectedReactNativePage?.id; - this._lastConnectedReactNativePage = page; - this._isReloading = true; + const oldPageId = this.#lastConnectedLegacyReactNativePage?.id; + this.#lastConnectedLegacyReactNativePage = page; + this.#isLegacyPageReloading = true; // We already had a debugger connected to React Native page and a // new one appeared - in this case we need to emulate execution context @@ -404,7 +547,7 @@ export default class Device { // page. if (oldPageId != null) { - this._sendMessageToDevice({ + this.#sendMessageToDevice({ event: 'disconnect', payload: { pageId: oldPageId, @@ -412,7 +555,7 @@ export default class Device { }); } - this._sendMessageToDevice({ + this.#sendMessageToDevice({ event: 'connect', payload: { pageId: page.id, @@ -425,14 +568,14 @@ export default class Device { ]; for (const message of toSend) { - this._deviceEventReporter?.logRequest(message, 'proxy', { - pageId: this._debuggerConnection?.pageId ?? null, - frontendUserAgent: this._debuggerConnection?.userAgent ?? null, + this.#deviceEventReporter?.logRequest(message, 'proxy', { + pageId: this.#debuggerConnection?.pageId ?? null, + frontendUserAgent: this.#debuggerConnection?.userAgent ?? null, }); - this._sendMessageToDevice({ + this.#sendMessageToDevice({ event: 'wrappedEvent', payload: { - pageId: this._mapToDevicePageId(page.id), + pageId: this.#mapToDevicePageId(page.id), wrappedEvent: JSON.stringify(message), }, }); @@ -440,17 +583,28 @@ export default class Device { } // Allows to make changes in incoming message from device. - async _processMessageFromDevice( - payload: {method: string, params: {sourceMapURL: string, url: string}}, - debuggerInfo: DebuggerInfo, + async #processMessageFromDeviceLegacy( + payload: CDPServerMessage, + debuggerInfo: DebuggerConnection, + pageId: ?string, ) { + // TODO(moti): Handle null case explicitly, or ideally associate a copy + // of the page metadata object with the connection so this can never be + // null. + const page: ?Page = pageId != null ? this.#pages.get(pageId) : null; + // Replace Android addresses for scriptParsed event. - if (payload.method === 'Debugger.scriptParsed') { - const params = payload.params || {}; + if ( + (!page || !this.#pageHasCapability(page, 'nativeSourceCodeFetching')) && + payload.method === 'Debugger.scriptParsed' && + payload.params != null + ) { + const params = payload.params; if ('sourceMapURL' in params) { for (let i = 0; i < EMULATOR_LOCALHOST_ADDRESSES.length; ++i) { const address = EMULATOR_LOCALHOST_ADDRESSES[i]; - if (params.sourceMapURL.indexOf(address) >= 0) { + if (params.sourceMapURL.includes(address)) { + // $FlowFixMe[cannot-write] payload.params.sourceMapURL = params.sourceMapURL.replace( address, 'localhost', @@ -459,7 +613,7 @@ export default class Device { } } - const sourceMapURL = this._tryParseHTTPURL(params.sourceMapURL); + const sourceMapURL = this.#tryParseHTTPURL(params.sourceMapURL); if (sourceMapURL) { // Some debug clients do not support fetching HTTP URLs. If the // message headed to the debug client identifies the source map with @@ -467,12 +621,13 @@ export default class Device { // Data URL (which is more widely supported) before passing the // message to the debug client. try { - const sourceMap = await this._fetchText(sourceMapURL); + const sourceMap = await this.#fetchText(sourceMapURL); + // $FlowFixMe[cannot-write] payload.params.sourceMapURL = 'data:application/json;charset=utf-8;base64,' + new Buffer(sourceMap).toString('base64'); } catch (exception) { - this._sendErrorToDebugger( + this.#sendErrorToDebugger( `Failed to fetch source map ${params.sourceMapURL}: ${exception.message}`, ); } @@ -482,6 +637,7 @@ export default class Device { for (let i = 0; i < EMULATOR_LOCALHOST_ADDRESSES.length; ++i) { const address = EMULATOR_LOCALHOST_ADDRESSES[i]; if (params.url.indexOf(address) >= 0) { + // $FlowFixMe[cannot-write] payload.params.url = params.url.replace(address, 'localhost'); debuggerInfo.originalSourceURLAddress = address; } @@ -492,20 +648,21 @@ export default class Device { // Chrome to not download source maps. In this case we want to prepend script ID // with 'file://' prefix. if (payload.params.url.match(/^[0-9a-z]+$/)) { + // $FlowFixMe[cannot-write] payload.params.url = FILE_PREFIX + payload.params.url; debuggerInfo.prependedFilePrefix = true; } // $FlowFixMe[prop-missing] if (params.scriptId != null) { - this._scriptIdToSourcePathMapping.set(params.scriptId, params.url); + this.#scriptIdToSourcePathMapping.set(params.scriptId, params.url); } } } if ( payload.method === 'Runtime.executionContextCreated' && - this._isReloading + this.#isLegacyPageReloading ) { // The new context is ready. First notify Chrome that we've reloaded so // it'll resend its breakpoints. If we do this earlier, we may not be @@ -522,102 +679,118 @@ export default class Device { // This is not an issue in VSCode/Nuclide where the IDE knows to resume // at its convenience. const resumeMessage = {method: 'Debugger.resume', id: 0}; - this._deviceEventReporter?.logRequest(resumeMessage, 'proxy', { - pageId: this._debuggerConnection?.pageId ?? null, - frontendUserAgent: this._debuggerConnection?.userAgent ?? null, + this.#deviceEventReporter?.logRequest(resumeMessage, 'proxy', { + pageId: this.#debuggerConnection?.pageId ?? null, + frontendUserAgent: this.#debuggerConnection?.userAgent ?? null, }); - this._sendMessageToDevice({ + this.#sendMessageToDevice({ event: 'wrappedEvent', payload: { - pageId: this._mapToDevicePageId(debuggerInfo.pageId), + pageId: this.#mapToDevicePageId(debuggerInfo.pageId), wrappedEvent: JSON.stringify(resumeMessage), }, }); - this._isReloading = false; + this.#isLegacyPageReloading = false; } } - // Allows to make changes in incoming messages from debugger. Returns a boolean - // indicating whether the message has been handled locally (i.e. does not need - // to be forwarded to the target). - _interceptMessageFromDebugger( - req: DebuggerRequest, - debuggerInfo: DebuggerInfo, + /** + * Intercept an incoming message from a connected debugger. Returns either an + * original/replacement CDP message object, or `null` (will forward nothing + * to the target). + */ + #interceptClientMessageForSourceFetching( + req: CDPClientMessage, + debuggerInfo: DebuggerConnection, socket: WS, - ): boolean { - if (req.method === 'Debugger.setBreakpointByUrl') { - this._processDebuggerSetBreakpointByUrl(req, debuggerInfo); - } else if (req.method === 'Debugger.getScriptSource') { - this._processDebuggerGetScriptSource(req, socket); - return true; + ): CDPClientMessage | null { + switch (req.method) { + case 'Debugger.setBreakpointByUrl': + return this.#processDebuggerSetBreakpointByUrl(req, debuggerInfo); + case 'Debugger.getScriptSource': + // Sends response to debugger via side-effect + this.#processDebuggerGetScriptSource(req, socket); + return null; + default: + return req; } - return false; } - _processDebuggerSetBreakpointByUrl( - req: SetBreakpointByUrlRequest, - debuggerInfo: DebuggerInfo, - ) { + #processDebuggerSetBreakpointByUrl( + req: CDPRequest<'Debugger.setBreakpointByUrl'>, + debuggerInfo: DebuggerConnection, + ): CDPRequest<'Debugger.setBreakpointByUrl'> { // If we replaced Android emulator's address to localhost we need to change it back. if (debuggerInfo.originalSourceURLAddress != null) { - if (req.params.url != null) { - req.params.url = req.params.url.replace( + const processedReq = {...req, params: {...req.params}}; + if (processedReq.params.url != null) { + processedReq.params.url = processedReq.params.url.replace( 'localhost', debuggerInfo.originalSourceURLAddress, ); if ( - req.params.url && - req.params.url.startsWith(FILE_PREFIX) && + processedReq.params.url && + processedReq.params.url.startsWith(FILE_PREFIX) && debuggerInfo.prependedFilePrefix ) { - // Remove fake URL prefix if we modified URL in _processMessageFromDevice. + // Remove fake URL prefix if we modified URL in #processMessageFromDeviceLegacy. // $FlowFixMe[incompatible-use] - req.params.url = req.params.url.slice(FILE_PREFIX.length); + processedReq.params.url = processedReq.params.url.slice( + FILE_PREFIX.length, + ); } } - if (req.params.urlRegex != null) { - req.params.urlRegex = req.params.urlRegex.replace( + if (processedReq.params.urlRegex != null) { + processedReq.params.urlRegex = processedReq.params.urlRegex.replace( /localhost/g, // $FlowFixMe[incompatible-call] debuggerInfo.originalSourceURLAddress, ); } + return processedReq; } + return req; } - _processDebuggerGetScriptSource(req: GetScriptSourceRequest, socket: WS) { + #processDebuggerGetScriptSource( + req: CDPRequest<'Debugger.getScriptSource'>, + socket: WS, + ): void { const sendSuccessResponse = (scriptSource: string) => { - const result: GetScriptSourceResponse = {scriptSource}; - const response = {id: req.id, result}; + const result = {scriptSource}; + const response: CDPResponse<'Debugger.getScriptSource'> = { + id: req.id, + result, + }; socket.send(JSON.stringify(response)); - this._deviceEventReporter?.logResponse(response, 'proxy', { - pageId: this._debuggerConnection?.pageId ?? null, - frontendUserAgent: this._debuggerConnection?.userAgent ?? null, + this.#deviceEventReporter?.logResponse(response, 'proxy', { + pageId: this.#debuggerConnection?.pageId ?? null, + frontendUserAgent: this.#debuggerConnection?.userAgent ?? null, }); }; const sendErrorResponse = (error: string) => { // Tell the client that the request failed - const result: ErrorResponse = {error: {message: error}}; + const result = {error: {message: error}}; const response = {id: req.id, result}; socket.send(JSON.stringify(response)); // Send to the console as well, so the user can see it - this._sendErrorToDebugger(error); - this._deviceEventReporter?.logResponse(response, 'proxy', { - pageId: this._debuggerConnection?.pageId ?? null, - frontendUserAgent: this._debuggerConnection?.userAgent ?? null, + this.#sendErrorToDebugger(error); + this.#deviceEventReporter?.logResponse(response, 'proxy', { + pageId: this.#debuggerConnection?.pageId ?? null, + frontendUserAgent: this.#debuggerConnection?.userAgent ?? null, }); }; - const pathToSource = this._scriptIdToSourcePathMapping.get( + const pathToSource = this.#scriptIdToSourcePathMapping.get( req.params.scriptId, ); if (pathToSource != null) { - const httpURL = this._tryParseHTTPURL(pathToSource); + const httpURL = this.#tryParseHTTPURL(pathToSource); if (httpURL) { - this._fetchText(httpURL).then( + this.#fetchText(httpURL).then( text => sendSuccessResponse(text), err => sendErrorResponse( @@ -628,7 +801,7 @@ export default class Device { let file; try { file = fs.readFileSync( - path.resolve(this._projectRoot, pathToSource), + path.resolve(this.#projectRoot, pathToSource), 'utf8', ); } catch (err) { @@ -643,18 +816,18 @@ export default class Device { } } - _mapToDevicePageId(pageId: string): string { + #mapToDevicePageId(pageId: string): string { if ( pageId === REACT_NATIVE_RELOADABLE_PAGE_ID && - this._lastConnectedReactNativePage != null + this.#lastConnectedLegacyReactNativePage != null ) { - return this._lastConnectedReactNativePage.id; + return this.#lastConnectedLegacyReactNativePage.id; } else { return pageId; } } - _tryParseHTTPURL(url: string): ?URL { + #tryParseHTTPURL(url: string): ?URL { let parsedURL: ?URL; try { parsedURL = new URL(url); @@ -670,13 +843,12 @@ export default class Device { // Fetch text, raising an exception if the text could not be fetched, // or is too large. - async _fetchText(url: URL): Promise { - if (url.hostname !== 'localhost') { - throw new Error('remote fetches not permitted'); - } - + async #fetchText(url: URL): Promise { // $FlowFixMe[incompatible-call] Suppress arvr node-fetch flow error const response = await fetch(url); + if (!response.ok) { + throw new Error('HTTP ' + response.status + ' ' + response.statusText); + } const text = await response.text(); // Restrict the length to well below the 500MB limit for nodejs (leaving // room some some later manipulation, e.g. base64 or wrapping in JSON) @@ -686,8 +858,8 @@ export default class Device { return text; } - _sendErrorToDebugger(message: string) { - const debuggerSocket = this._debuggerConnection?.socket; + #sendErrorToDebugger(message: string) { + const debuggerSocket = this.#debuggerConnection?.socket; if (debuggerSocket && debuggerSocket.readyState === WS.OPEN) { debuggerSocket.send( JSON.stringify({ diff --git a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js index e87761709322..57462b9df562 100644 --- a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js +++ b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js @@ -9,6 +9,8 @@ */ import type {EventReporter} from '../types/EventReporter'; +import type {CDPResponse} from './cdp-types/messages'; + import TTLCache from '@isaacs/ttlcache'; type PendingCommand = { @@ -30,9 +32,9 @@ type RequestMetadata = $ReadOnly<{ }>; class DeviceEventReporter { - _eventReporter: EventReporter; + #eventReporter: EventReporter; - _pendingCommands: TTLCache = new TTLCache({ + #pendingCommands: TTLCache = new TTLCache({ ttl: 10000, dispose: ( command: PendingCommand, @@ -43,15 +45,15 @@ class DeviceEventReporter { // TODO: Report clobbering ('set') using a dedicated error code return; } - this._logExpiredCommand(command); + this.#logExpiredCommand(command); }, }); - _metadata: DeviceMetadata; + #metadata: DeviceMetadata; constructor(eventReporter: EventReporter, metadata: DeviceMetadata) { - this._eventReporter = eventReporter; - this._metadata = metadata; + this.#eventReporter = eventReporter; + this.#metadata = metadata; } logRequest( @@ -59,7 +61,7 @@ class DeviceEventReporter { origin: 'debugger' | 'proxy', metadata: RequestMetadata, ): void { - this._pendingCommands.set(req.id, { + this.#pendingCommands.set(req.id, { method: req.method, requestOrigin: origin, requestTime: Date.now(), @@ -68,20 +70,16 @@ class DeviceEventReporter { } logResponse( - res: $ReadOnly<{ - id: number, - error?: {message: string, data?: mixed}, - ... - }>, + res: CDPResponse<>, origin: 'device' | 'proxy', metadata: $ReadOnly<{ pageId: string | null, frontendUserAgent: string | null, }>, ): void { - const pendingCommand = this._pendingCommands.get(res.id); + const pendingCommand = this.#pendingCommands.get(res.id); if (!pendingCommand) { - this._eventReporter.logEvent({ + this.#eventReporter.logEvent({ type: 'debugger_command', protocol: 'CDP', requestOrigin: null, @@ -90,22 +88,22 @@ class DeviceEventReporter { errorCode: 'UNMATCHED_REQUEST_ID', responseOrigin: 'proxy', timeSinceStart: null, - appId: this._metadata.appId, - deviceId: this._metadata.deviceId, - deviceName: this._metadata.deviceName, + appId: this.#metadata.appId, + deviceId: this.#metadata.deviceId, + deviceName: this.#metadata.deviceName, pageId: metadata.pageId, frontendUserAgent: metadata.frontendUserAgent, }); return; } const timeSinceStart = Date.now() - pendingCommand.requestTime; - this._pendingCommands.delete(res.id); + this.#pendingCommands.delete(res.id); if (res.error) { let {message} = res.error; if ('data' in res.error) { message += ` (${String(res.error.data)})`; } - this._eventReporter.logEvent({ + this.#eventReporter.logEvent({ type: 'debugger_command', requestOrigin: pendingCommand.requestOrigin, method: pendingCommand.method, @@ -115,15 +113,15 @@ class DeviceEventReporter { errorDetails: message, responseOrigin: origin, timeSinceStart, - appId: this._metadata.appId, - deviceId: this._metadata.deviceId, - deviceName: this._metadata.deviceName, + appId: this.#metadata.appId, + deviceId: this.#metadata.deviceId, + deviceName: this.#metadata.deviceName, pageId: pendingCommand.metadata.pageId, frontendUserAgent: pendingCommand.metadata.frontendUserAgent, }); return; } - this._eventReporter.logEvent({ + this.#eventReporter.logEvent({ type: 'debugger_command', protocol: 'CDP', requestOrigin: pendingCommand.requestOrigin, @@ -131,9 +129,9 @@ class DeviceEventReporter { status: 'success', responseOrigin: origin, timeSinceStart, - appId: this._metadata.appId, - deviceId: this._metadata.deviceId, - deviceName: this._metadata.deviceName, + appId: this.#metadata.appId, + deviceId: this.#metadata.deviceId, + deviceName: this.#metadata.deviceName, pageId: pendingCommand.metadata.pageId, frontendUserAgent: pendingCommand.metadata.frontendUserAgent, }); @@ -146,19 +144,19 @@ class DeviceEventReporter { frontendUserAgent: string | null, }>, ) { - this._eventReporter.logEvent({ + this.#eventReporter.logEvent({ type: 'connect_debugger_frontend', status: 'success', - appId: this._metadata.appId, - deviceName: this._metadata.deviceName, - deviceId: this._metadata.deviceId, + appId: this.#metadata.appId, + deviceName: this.#metadata.deviceName, + deviceId: this.#metadata.deviceId, pageId: metadata.pageId, frontendUserAgent: metadata.frontendUserAgent, }); } logDisconnection(disconnectedEntity: 'device' | 'debugger') { - const eventReporter = this._eventReporter; + const eventReporter = this.#eventReporter; if (!eventReporter) { return; } @@ -166,8 +164,8 @@ class DeviceEventReporter { disconnectedEntity === 'device' ? 'DEVICE_DISCONNECTED' : 'DEBUGGER_DISCONNECTED'; - for (const pendingCommand of this._pendingCommands.values()) { - this._eventReporter.logEvent({ + for (const pendingCommand of this.#pendingCommands.values()) { + this.#eventReporter.logEvent({ type: 'debugger_command', protocol: 'CDP', requestOrigin: pendingCommand.requestOrigin, @@ -176,18 +174,18 @@ class DeviceEventReporter { errorCode, responseOrigin: 'proxy', timeSinceStart: Date.now() - pendingCommand.requestTime, - appId: this._metadata.appId, - deviceId: this._metadata.deviceId, - deviceName: this._metadata.deviceName, + appId: this.#metadata.appId, + deviceId: this.#metadata.deviceId, + deviceName: this.#metadata.deviceName, pageId: pendingCommand.metadata.pageId, frontendUserAgent: pendingCommand.metadata.frontendUserAgent, }); } - this._pendingCommands.clear(); + this.#pendingCommands.clear(); } - _logExpiredCommand(pendingCommand: PendingCommand): void { - this._eventReporter.logEvent({ + #logExpiredCommand(pendingCommand: PendingCommand): void { + this.#eventReporter.logEvent({ type: 'debugger_command', protocol: 'CDP', requestOrigin: pendingCommand.requestOrigin, @@ -196,9 +194,9 @@ class DeviceEventReporter { errorCode: 'TIMED_OUT', responseOrigin: 'proxy', timeSinceStart: Date.now() - pendingCommand.requestTime, - appId: this._metadata.appId, - deviceId: this._metadata.deviceId, - deviceName: this._metadata.deviceName, + appId: this.#metadata.appId, + deviceId: this.#metadata.deviceId, + deviceName: this.#metadata.deviceName, pageId: pendingCommand.metadata.pageId, frontendUserAgent: pendingCommand.metadata.frontendUserAgent, }); diff --git a/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js b/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js index 0cfb55a05ff1..9b9916dc220d 100644 --- a/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js +++ b/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js @@ -9,19 +9,21 @@ * @oncall react_native */ +import type {EventReporter} from '../types/EventReporter'; +import type {Experiments} from '../types/Experiments'; +import type {CreateCustomMessageHandlerFn} from './CustomMessageHandler'; import type { JsonPagesListResponse, JsonVersionResponse, Page, PageDescription, } from './types'; -import type {EventReporter} from '../types/EventReporter'; -import type {Experiments} from '../types/Experiments'; import type {IncomingMessage, ServerResponse} from 'http'; +import Device from './Device'; +import nullthrows from 'nullthrows'; import url from 'url'; import WS from 'ws'; -import Device from './Device'; const debug = require('debug')('Metro:InspectorProxy'); @@ -42,43 +44,48 @@ export interface InspectorProxyQueries { */ export default class InspectorProxy implements InspectorProxyQueries { // Root of the project used for relative to absolute source path conversion. - _projectRoot: string; + #projectRoot: string; /** The base URL to the dev server from the developer machine. */ - _serverBaseUrl: string; + #serverBaseUrl: string; // Maps device ID to Device instance. - _devices: Map; + #devices: Map; // Internal counter for device IDs -- just gets incremented for each new device. - _deviceCounter: number = 0; + #deviceCounter: number = 0; + + #eventReporter: ?EventReporter; - _eventReporter: ?EventReporter; + #experiments: Experiments; - _experiments: Experiments; + // custom message handler factory allowing implementers to handle unsupported CDP messages. + #customMessageHandler: ?CreateCustomMessageHandlerFn; constructor( projectRoot: string, serverBaseUrl: string, eventReporter: ?EventReporter, experiments: Experiments, + customMessageHandler: ?CreateCustomMessageHandlerFn, ) { - this._projectRoot = projectRoot; - this._serverBaseUrl = serverBaseUrl; - this._devices = new Map(); - this._eventReporter = eventReporter; - this._experiments = experiments; + this.#projectRoot = projectRoot; + this.#serverBaseUrl = serverBaseUrl; + this.#devices = new Map(); + this.#eventReporter = eventReporter; + this.#experiments = experiments; + this.#customMessageHandler = customMessageHandler; } getPageDescriptions(): Array { // Build list of pages from all devices. let result: Array = []; - Array.from(this._devices.entries()).forEach(([deviceId, device]) => { + Array.from(this.#devices.entries()).forEach(([deviceId, device]) => { result = result.concat( device .getPagesList() .map((page: Page) => - this._buildPageDescription(deviceId, device, page), + this.#buildPageDescription(deviceId, device, page), ), ); }); @@ -94,13 +101,14 @@ 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) { - this._sendJsonResponse(response, { + this.#sendJsonResponse(response, this.getPageDescriptions()); + } else if (pathname === PAGES_LIST_JSON_VERSION_URL) { + this.#sendJsonResponse(response, { Browser: 'Mobile JavaScript', 'Protocol-Version': '1.1', }); @@ -113,19 +121,19 @@ export default class InspectorProxy implements InspectorProxyQueries { [path: string]: WS.Server, } { return { - [WS_DEVICE_URL]: this._createDeviceConnectionWSServer(), - [WS_DEBUGGER_URL]: this._createDebuggerConnectionWSServer(), + [WS_DEVICE_URL]: this.#createDeviceConnectionWSServer(), + [WS_DEBUGGER_URL]: this.#createDebuggerConnectionWSServer(), }; } // Converts page information received from device into PageDescription object // that is sent to debugger. - _buildPageDescription( + #buildPageDescription( deviceId: string, device: Device, page: Page, ): PageDescription { - const {host, protocol} = new URL(this._serverBaseUrl); + const {host, protocol} = new URL(this.#serverBaseUrl); const webSocketScheme = protocol === 'https:' ? 'wss' : 'ws'; const webSocketUrlWithoutProtocol = `${host}${WS_DEBUGGER_URL}?device=${deviceId}&page=${page.id}`; @@ -148,12 +156,16 @@ export default class InspectorProxy implements InspectorProxyQueries { webSocketDebuggerUrl, vm: page.vm, deviceName: device.getName(), + reactNative: { + logicalDeviceId: deviceId, + capabilities: nullthrows(page.capabilities), + }, }; } // Sends object as response to HTTP request. // Just serializes object using JSON and sets required headers. - _sendJsonResponse( + #sendJsonResponse( response: ServerResponse, object: JsonPagesListResponse | JsonVersionResponse, ) { @@ -161,7 +173,7 @@ export default class InspectorProxy implements InspectorProxyQueries { response.writeHead(200, { 'Content-Type': 'application/json; charset=UTF-8', 'Cache-Control': 'no-cache', - 'Content-Length': data.length.toString(), + 'Content-Length': Buffer.byteLength(data).toString(), Connection: 'close', }); response.end(data); @@ -172,43 +184,47 @@ export default class InspectorProxy implements InspectorProxyQueries { // HTTP GET params. // For each new websocket connection we parse device and app names and create // new instance of Device class. - _createDeviceConnectionWSServer(): ws$WebSocketServer { + #createDeviceConnectionWSServer(): ws$WebSocketServer { const wss = new WS.Server({ noServer: true, perMessageDeflate: true, + // Don't crash on exceptionally large messages - assume the device is + // well-behaved and the debugger is prepared to handle large messages. + maxPayload: 0, }); // $FlowFixMe[value-as-type] wss.on('connection', async (socket: WS, req) => { try { - const fallbackDeviceId = String(this._deviceCounter++); + const fallbackDeviceId = String(this.#deviceCounter++); const query = url.parse(req.url || '', true).query || {}; const deviceId = query.device || fallbackDeviceId; const deviceName = query.name || 'Unknown'; const appName = query.app || 'Unknown'; - const oldDevice = this._devices.get(deviceId); + const oldDevice = this.#devices.get(deviceId); const newDevice = new Device( deviceId, deviceName, appName, socket, - this._projectRoot, - this._eventReporter, + this.#projectRoot, + this.#eventReporter, + this.#customMessageHandler, ); if (oldDevice) { oldDevice.handleDuplicateDeviceConnection(newDevice); } - this._devices.set(deviceId, newDevice); + this.#devices.set(deviceId, newDevice); debug( `Got new connection: name=${deviceName}, app=${appName}, device=${deviceId}`, ); socket.on('close', () => { - this._devices.delete(deviceId); + this.#devices.delete(deviceId); debug(`Device ${deviceName} disconnected.`); }); } catch (e) { @@ -224,10 +240,13 @@ export default class InspectorProxy implements InspectorProxyQueries { // in /json response. // When debugger connects we try to parse device and page IDs from the query and pass // websocket object to corresponding Device instance. - _createDebuggerConnectionWSServer(): ws$WebSocketServer { + #createDebuggerConnectionWSServer(): ws$WebSocketServer { const wss = new WS.Server({ noServer: true, perMessageDeflate: false, + // Don't crash on exceptionally large messages - assume the debugger is + // well-behaved and the device is prepared to handle large messages. + maxPayload: 0, }); // $FlowFixMe[value-as-type] wss.on('connection', async (socket: WS, req) => { @@ -240,18 +259,18 @@ export default class InspectorProxy implements InspectorProxyQueries { throw new Error('Incorrect URL - must provide device and page IDs'); } - const device = this._devices.get(deviceId); + const device = this.#devices.get(deviceId); if (device == null) { throw new Error('Unknown device with ID ' + deviceId); } device.handleDebuggerConnection(socket, pageId, { - userAgent: req.headers['user-agent'] ?? null, + userAgent: req.headers['user-agent'] ?? query.userAgent ?? null, }); } catch (e) { console.error(e); socket.close(INTERNAL_ERROR_CODE, e?.toString() ?? 'Unknown error'); - this._eventReporter?.logEvent({ + this.#eventReporter?.logEvent({ type: 'connect_debugger_frontend', status: 'error', error: e, diff --git a/packages/dev-middleware/src/inspector-proxy/cdp-types/messages.js b/packages/dev-middleware/src/inspector-proxy/cdp-types/messages.js new file mode 100644 index 000000000000..79eb1458a995 --- /dev/null +++ b/packages/dev-middleware/src/inspector-proxy/cdp-types/messages.js @@ -0,0 +1,52 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {Commands, Events} from './protocol'; + +// Note: A CDP event is a JSON-RPC notification with no `id` member. +export type CDPEvent = 'unknown'> = $ReadOnly<{ + method: TEvent, + params: Events[TEvent], +}>; + +export type CDPRequest = 'unknown'> = $ReadOnly<{ + method: TCommand, + params: Commands[TCommand]['paramsType'], + id: number, +}>; + +export type CDPResponse = 'unknown'> = + | $ReadOnly<{ + result: Commands[TCommand]['resultType'], + id: number, + }> + | $ReadOnly<{ + error: CDPRequestError, + id: number, + }>; + +export type CDPRequestError = $ReadOnly<{ + code: number, + message: string, + data?: mixed, +}>; + +export type CDPClientMessage = + | CDPRequest<'Debugger.getScriptSource'> + | CDPRequest<'Debugger.scriptParsed'> + | CDPRequest<'Debugger.setBreakpointByUrl'> + | CDPRequest<>; + +export type CDPServerMessage = + | CDPEvent<'Debugger.scriptParsed'> + | CDPEvent<> + | CDPResponse<'Debugger.getScriptSource'> + | CDPResponse<>; diff --git a/packages/dev-middleware/src/inspector-proxy/cdp-types/protocol.js b/packages/dev-middleware/src/inspector-proxy/cdp-types/protocol.js new file mode 100644 index 000000000000..4b7500c4070b --- /dev/null +++ b/packages/dev-middleware/src/inspector-proxy/cdp-types/protocol.js @@ -0,0 +1,106 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 + */ + +// Adapted from https://github.com/ChromeDevTools/devtools-protocol/blob/master/types/protocol.d.ts + +type integer = number; + +export interface Debugger { + GetScriptSourceParams: $ReadOnly<{ + /** + * Id of the script to get source for. + */ + scriptId: string, + }>; + + GetScriptSourceResult: $ReadOnly<{ + /** + * Script source (empty in case of Wasm bytecode). + */ + scriptSource: string, + + /** + * Wasm bytecode. (Encoded as a base64 string when passed over JSON) + */ + bytecode?: string, + }>; + + SetBreakpointByUrlParams: $ReadOnly<{ + /** + * Line number to set breakpoint at. + */ + lineNumber: integer, + + /** + * URL of the resources to set breakpoint on. + */ + url?: string, + + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or + * `urlRegex` must be specified. + */ + urlRegex?: string, + + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string, + + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: integer, + + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the + * breakpoint if this expression evaluates to true. + */ + condition?: string, + }>; + + ScriptParsedEvent: $ReadOnly<{ + /** + * Identifier of the script parsed. + */ + scriptId: string, + + /** + * URL or name of the script parsed (if any). + */ + url: string, + + /** + * URL of source map associated with script (if any). + */ + sourceMapURL: string, + }>; +} + +export type Events = { + 'Debugger.scriptParsed': Debugger['ScriptParsedEvent'], + [method: string]: mixed, +}; + +export type Commands = { + 'Debugger.getScriptSource': { + paramsType: Debugger['GetScriptSourceParams'], + resultType: Debugger['GetScriptSourceResult'], + }, + 'Debugger.setBreakpointByUrl': { + paramsType: Debugger['SetBreakpointByUrlParams'], + resultType: void, + }, + [method: string]: { + paramsType: mixed, + resultType: mixed, + }, +}; diff --git a/packages/dev-middleware/src/inspector-proxy/types.js b/packages/dev-middleware/src/inspector-proxy/types.js index 94b21aba10e8..a89bfc9a914d 100644 --- a/packages/dev-middleware/src/inspector-proxy/types.js +++ b/packages/dev-middleware/src/inspector-proxy/types.js @@ -4,57 +4,85 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format * @oncall react_native */ +/** + * A capability flag disables a specific feature/hack in the InspectorProxy + * layer by indicating that the target supports one or more modern CDP features. + */ +export type TargetCapabilityFlags = $ReadOnly<{ + /** + * The target supports a stable page representation across reloads. + * + * In the proxy, this disables legacy page reload emulation and the + * additional '(Experimental)' target in `/json/list`. + * + * In the launch flow, this allows targets to be matched directly by `appId`. + */ + nativePageReloads?: boolean, + + /** + * The target supports fetching source code and source maps. + * + * In the proxy, this disables source fetching emulation and host rewrites. + */ + nativeSourceCodeFetching?: boolean, + + /** + * The target supports native network inspection. + * + * In the proxy, this disables intercepting and storing network requests. + */ + nativeNetworkInspection?: boolean, +}>; + // Page information received from the device. New page is created for // each new instance of VM and can appear when user reloads React Native // application. -export type Page = { + +export type PageFromDevice = $ReadOnly<{ id: string, title: string, vm: string, app: string, - ... -}; + capabilities?: TargetCapabilityFlags, +}>; + +export type Page = Required; // Chrome Debugger Protocol message/event passed between device and debugger. -export type WrappedEvent = { +export type WrappedEvent = $ReadOnly<{ event: 'wrappedEvent', - payload: { + payload: $ReadOnly<{ pageId: string, wrappedEvent: string, - ... - }, - ... -}; + }>, +}>; // Request sent from Inspector Proxy to Device when new debugger is connected // to particular page. -export type ConnectRequest = { +export type ConnectRequest = $ReadOnly<{ event: 'connect', - payload: {pageId: string, ...}, - ... -}; + payload: $ReadOnly<{pageId: string}>, +}>; // Request sent from Inspector Proxy to Device to notify that debugger is // disconnected. -export type DisconnectRequest = { +export type DisconnectRequest = $ReadOnly<{ event: 'disconnect', - payload: {pageId: string, ...}, - ... -}; + payload: $ReadOnly<{pageId: string}>, +}>; // Request sent from Inspector Proxy to Device to get a list of pages. -export type GetPagesRequest = {event: 'getPages', ...}; +export type GetPagesRequest = {event: 'getPages'}; // Response to GetPagesRequest containing a list of page infos. export type GetPagesResponse = { event: 'getPages', - payload: Array, - ... + payload: $ReadOnlyArray, }; // Union type for all possible messages sent from device to Inspector Proxy. @@ -71,7 +99,7 @@ export type MessageToDevice = | DisconnectRequest; // Page description object that is sent in response to /json HTTP request from debugger. -export type PageDescription = { +export type PageDescription = $ReadOnly<{ id: string, description: string, title: string, @@ -79,57 +107,28 @@ export type PageDescription = { devtoolsFrontendUrl: string, type: string, webSocketDebuggerUrl: string, - ... -}; + deviceName: string, + vm: string, + // Metadata specific to React Native + reactNative: $ReadOnly<{ + logicalDeviceId: string, + capabilities: Page['capabilities'], + }>, +}>; + export type JsonPagesListResponse = Array; // Response to /json/version HTTP request from the debugger specifying browser type and // Chrome protocol version. -export type JsonVersionResponse = { +export type JsonVersionResponse = $ReadOnly<{ Browser: string, 'Protocol-Version': string, - ... -}; - -/** - * Types were exported from https://github.com/ChromeDevTools/devtools-protocol/blob/master/types/protocol.d.ts - */ - -export type SetBreakpointByUrlRequest = { - id: number, - method: 'Debugger.setBreakpointByUrl', - params: { - lineNumber: number, - url?: string, - urlRegex?: string, - scriptHash?: string, - columnNumber?: number, - condition?: string, - }, -}; - -export type GetScriptSourceRequest = { - id: number, - method: 'Debugger.getScriptSource', - params: { - scriptId: string, - }, -}; - -export type GetScriptSourceResponse = { - scriptSource: string, - /** - * Wasm bytecode. - */ - bytecode?: string, -}; - -export type ErrorResponse = { - error: { - message: string, - }, -}; - -export type DebuggerRequest = - | SetBreakpointByUrlRequest - | GetScriptSourceRequest; +}>; + +export type JSONSerializable = + | boolean + | number + | string + | null + | $ReadOnlyArray + | {+[string]: JSONSerializable}; 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..da6c6bc5c25b --- /dev/null +++ b/packages/dev-middleware/src/middleware/deprecated_openFlipperMiddleware.js @@ -0,0 +1,68 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {Logger} from '../types/Logger'; +import type {NextHandleFunction} from 'connect'; +import type {IncomingMessage, ServerResponse} from 'http'; + +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.", + ); + logger?.info( + 'In React Native 0.74, Flipper is no longer included for new React ' + + 'Native projects. The Flipper React Native plugin is also ' + + 'unsupported. You can continue to use Flipper to debug ' + + "your app's JavaScript code, however we recommend switching to " + + 'a modern alternative.\nSee ' + + 'https://reactnative.dev/docs/debugging#opening-the-debugger.', + ); + 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..1f3b4d743585 100644 --- a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js +++ b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js @@ -9,16 +9,16 @@ * @oncall react_native */ -import type {NextHandleFunction} from 'connect'; -import type {IncomingMessage, ServerResponse} from 'http'; import type {InspectorProxyQueries} from '../inspector-proxy/InspectorProxy'; import type {BrowserLauncher, LaunchedBrowser} from '../types/BrowserLauncher'; import type {EventReporter} from '../types/EventReporter'; import type {Experiments} from '../types/Experiments'; import type {Logger} from '../types/Logger'; +import type {NextHandleFunction} from 'connect'; +import type {IncomingMessage, ServerResponse} from 'http'; -import url from 'url'; import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl'; +import url from 'url'; const debuggerInstances = new Map(); @@ -57,24 +57,33 @@ export default function openDebuggerMiddleware({ (experiments.enableOpenDebuggerRedirect && req.method === 'GET') ) { const {query} = url.parse(req.url, true); - const {appId} = query; + const {appId, device}: {appId?: string, device?: string, ...} = query; const targets = inspectorProxy.getPageDescriptions().filter( // Only use targets with better reloading support app => - app.title === 'React Native Experimental (Improved Chrome Reloads)', + app.title === 'React Native Experimental (Improved Chrome Reloads)' || + app.reactNative.capabilities?.nativePageReloads === true, ); + let target; const launchType: 'launch' | 'redirect' = req.method === 'POST' ? 'launch' : 'redirect'; - if (typeof appId === 'string') { + if (typeof appId === 'string' || typeof device === 'string') { logger?.info( (launchType === 'launch' ? 'Launching' : 'Redirecting to') + - ' JS debugger...', + ' JS debugger (experimental)...', ); - target = targets.find(_target => _target.description === appId); + if (typeof device === 'string') { + target = targets.find( + _target => _target.reactNative.logicalDeviceId === device, + ); + } + if (!target && typeof appId === 'string') { + target = targets.find(_target => _target.description === appId); + } } else { logger?.info( (launchType === 'launch' ? 'Launching' : 'Redirecting to') + @@ -101,14 +110,18 @@ export default function openDebuggerMiddleware({ try { switch (launchType) { case 'launch': - await debuggerInstances.get(appId)?.kill(); + const frontendInstanceId = + device != null + ? 'device:' + device + : 'app:' + (appId ?? ''); + await debuggerInstances.get(frontendInstanceId)?.kill(); debuggerInstances.set( - appId, + frontendInstanceId, await browserLauncher.launchDebuggerAppWindow( getDevToolsFrontendUrl( + experiments, target.webSocketDebuggerUrl, serverBaseUrl, - experiments, ), ), ); @@ -117,10 +130,10 @@ export default function openDebuggerMiddleware({ case 'redirect': res.writeHead(302, { Location: getDevToolsFrontendUrl( + experiments, target.webSocketDebuggerUrl, // Use a relative URL. '', - experiments, ), }); res.end(); @@ -132,7 +145,8 @@ export default function openDebuggerMiddleware({ type: 'launch_debugger_frontend', launchType, status: 'success', - appId, + appId: appId ?? null, + deviceId: device ?? null, }); return; } catch (e) { diff --git a/packages/dev-middleware/src/types/EventReporter.js b/packages/dev-middleware/src/types/EventReporter.js index ec8e77d521b0..51ae36d081dd 100644 --- a/packages/dev-middleware/src/types/EventReporter.js +++ b/packages/dev-middleware/src/types/EventReporter.js @@ -36,7 +36,7 @@ export type ReportableEvent = type: 'launch_debugger_frontend', launchType: 'launch' | 'redirect', ... - | SuccessResult<{appId: string}> + | SuccessResult<{appId: string | null, deviceId: string | null}> | ErrorResult | CodedErrorResult<'NO_APPS_FOUND'>, } diff --git a/packages/dev-middleware/src/types/Experiments.js b/packages/dev-middleware/src/types/Experiments.js index 8e0db090f44f..c5c2c9af439b 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, @@ -22,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/DefaultBrowserLauncher.js b/packages/dev-middleware/src/utils/DefaultBrowserLauncher.js index 9e2b728dd33f..9438d3f07408 100644 --- a/packages/dev-middleware/src/utils/DefaultBrowserLauncher.js +++ b/packages/dev-middleware/src/utils/DefaultBrowserLauncher.js @@ -15,8 +15,8 @@ import {promises as fs} from 'fs'; import path from 'path'; import osTempDir from 'temp-dir'; +const {Launcher: EdgeLauncher} = require('@rnx-kit/chromium-edge-launcher'); const ChromeLauncher = require('chrome-launcher'); -const {Launcher: EdgeLauncher} = require('chromium-edge-launcher'); /** * Default `BrowserLauncher` implementation which opens URLs on the host @@ -51,12 +51,23 @@ const DefaultBrowserLauncher: BrowserLauncher = { `react-native-debugger-frontend-${browserType}`, ); const launchedChrome = await ChromeLauncher.launch({ - chromePath, chromeFlags: [ + ...ChromeLauncher.Launcher.defaultFlags().filter( + /** + * This flag controls whether Chrome treats a visually covered (occluded) tab + * as "backgrounded". We launch CDT as a single tab/window via `--app`, so we + * do want Chrome to treat our tab as "backgrounded" when the UI is covered. + * Omitting this flag allows "visibilitychange" events to fire properly. + */ + flag => flag !== '--disable-backgrounding-occluded-windows', + ), `--app=${url}`, `--user-data-dir=${userDataDir}`, '--window-size=1200,600', + '--guest', ], + chromePath, + ignoreDefaultFlags: true, }); return { diff --git a/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js b/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js index 4d95f18bf484..4623616292fe 100644 --- a/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js +++ b/packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js @@ -12,37 +12,27 @@ 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( + experiments: Experiments, 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`; - if (experiments.enableCustomDebuggerFrontend) { - const urlBase = `${devServerUrl}/debugger-frontend/rn_inspector.html`; - return `${urlBase}?${scheme}=${encodeURIComponent( - webSocketUrlWithoutProtocol, - )}&sources.hide_add_folder=true`; + const searchParams = new URLSearchParams([ + [scheme, webSocketUrlWithoutProtocol], + ['sources.hide_add_folder', 'true'], + ]); + if (experiments.enableNetworkInspector) { + searchParams.append('unstable_enableNetworkPanel', '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 + '?' + searchParams.toString(); } diff --git a/packages/eslint-config-react-native/index.js b/packages/eslint-config-react-native/index.js index 8de08008e5c9..b1d0ee3cf366 100644 --- a/packages/eslint-config-react-native/index.js +++ b/packages/eslint-config-react-native/index.js @@ -220,6 +220,7 @@ module.exports = { 'no-catch-shadow': 1, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) 'no-delete-var': 1, // disallow deletion of variables + 'no-global-assign': 2, // disallow assignments to native objects or read-only global variables 'no-label-var': 1, // disallow labels that share a name with a variable 'no-shadow': 1, // disallow declaration of variables already declared in the outer scope 'no-shadow-restricted-names': 1, // disallow shadowing of names such as arguments @@ -254,7 +255,6 @@ module.exports = { // These rules are purely matters of style and are quite subjective. 'key-spacing': 0, - 'keyword-spacing': 1, // enforce spacing before and after keywords 'jsx-quotes': [1, 'prefer-double'], // enforces the usage of double quotes for all JSX attribute values which doesn’t contain a double quote 'comma-spacing': 0, 'no-multi-spaces': 0, diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index 343b5f2e27bc..ebcfc9c90b7f 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.74.88", "description": "ESLint config for React Native", "license": "MIT", "repository": { @@ -22,13 +22,13 @@ "dependencies": { "@babel/core": "^7.20.0", "@babel/eslint-parser": "^7.20.0", - "@react-native/eslint-plugin": "^0.73.0", - "@typescript-eslint/eslint-plugin": "^5.57.1", - "@typescript-eslint/parser": "^5.57.1", + "@react-native/eslint-plugin": "0.74.88", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-ft-flow": "^2.0.1", - "eslint-plugin-jest": "^26.5.3", + "eslint-plugin-jest": "^27.9.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/packages/eslint-plugin-react-native/__tests__/platform-colors-test.js b/packages/eslint-plugin-react-native/__tests__/platform-colors-test.js index 76e799f3cb5b..fceb13bb7acd 100644 --- a/packages/eslint-plugin-react-native/__tests__/platform-colors-test.js +++ b/packages/eslint-plugin-react-native/__tests__/platform-colors-test.js @@ -10,9 +10,8 @@ 'use strict'; -const ESLintTester = require('./eslint-tester.js'); - const rule = require('../platform-colors.js'); +const ESLintTester = require('./eslint-tester.js'); const eslintTester = new ESLintTester(); diff --git a/packages/eslint-plugin-react-native/package.json b/packages/eslint-plugin-react-native/package.json index 3b098f815728..ee19742435f1 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.74.88", "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/__tests__/react-native-modules-test.js b/packages/eslint-plugin-specs/__tests__/react-native-modules-test.js index ae3b5c62ac66..0704665af237 100644 --- a/packages/eslint-plugin-specs/__tests__/react-native-modules-test.js +++ b/packages/eslint-plugin-specs/__tests__/react-native-modules-test.js @@ -10,9 +10,8 @@ 'use strict'; -const ESLintTester = require('./eslint-tester.js'); - const rule = require('../react-native-modules'); +const ESLintTester = require('./eslint-tester.js'); const NATIVE_MODULES_DIR = __dirname; diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index 3c5c534e2359..70123e2460bd 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.74.88", "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" @@ -24,8 +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": "*", - "flow-parser": "^0.206.0", + "@react-native/codegen": "0.74.88", "make-dir": "^2.1.0", "pirates": "^4.0.1", "source-map-support": "0.5.0" diff --git a/packages/eslint-plugin-specs/react-native-modules.js b/packages/eslint-plugin-specs/react-native-modules.js index 9f142919d9e0..7cbcc03eef26 100644 --- a/packages/eslint-plugin-specs/react-native-modules.js +++ b/packages/eslint-plugin-specs/react-native-modules.js @@ -10,8 +10,8 @@ 'use strict'; -const path = require('path'); const withBabelRegister = require('./with-babel-register'); +const path = require('path'); // We use the prepack hook before publishing package to set this value to true const PACKAGE_USAGE = false; @@ -154,7 +154,7 @@ function rule(context) { const [parsingErrors, tryParse] = createParserErrorCapturer(); const sourceCode = context.getSourceCode().getText(); - const ast = parser.getAst(sourceCode); + const ast = parser.getAst(sourceCode, filename); tryParse(() => { buildModuleSchema( diff --git a/packages/eslint-plugin-specs/with-babel-register/disk-cache.js b/packages/eslint-plugin-specs/with-babel-register/disk-cache.js index c84003677527..a468c7b6d715 100644 --- a/packages/eslint-plugin-specs/with-babel-register/disk-cache.js +++ b/packages/eslint-plugin-specs/with-babel-register/disk-cache.js @@ -8,10 +8,10 @@ * @oncall react_native */ -const path = require('path'); const fs = require('fs'); -const os = require('os'); const {sync: makeDirSync} = require('make-dir'); +const os = require('os'); +const path = require('path'); const packageJson = JSON.parse( fs.readFileSync(require.resolve('../package.json'), 'utf8'), diff --git a/packages/eslint-plugin-specs/with-babel-register/index.js b/packages/eslint-plugin-specs/with-babel-register/index.js index e4fe1450367b..77f9fb6e1bfb 100644 --- a/packages/eslint-plugin-specs/with-babel-register/index.js +++ b/packages/eslint-plugin-specs/with-babel-register/index.js @@ -8,13 +8,13 @@ * @oncall react_native */ +const diskCache = require('./disk-cache'); const babel = require('@babel/core'); -const {OptionManager, DEFAULT_EXTENSIONS} = require('@babel/core'); -const sourceMapSupport = require('source-map-support'); -const {addHook} = require('pirates'); -const path = require('path'); +const {DEFAULT_EXTENSIONS, OptionManager} = require('@babel/core'); const fs = require('fs'); -const diskCache = require('./disk-cache'); +const path = require('path'); +const {addHook} = require('pirates'); +const sourceMapSupport = require('source-map-support'); function compile(sourceMapManager, cache, options, code, filename) { const opts = new OptionManager().init({ diff --git a/packages/hermes-inspector-msggen/__tests__/header-writer-test.js b/packages/hermes-inspector-msggen/__tests__/header-writer-test.js index 5ba2bb2a1158..e793c803cdfc 100644 --- a/packages/hermes-inspector-msggen/__tests__/header-writer-test.js +++ b/packages/hermes-inspector-msggen/__tests__/header-writer-test.js @@ -5,15 +5,15 @@ * LICENSE file in the root directory of this source tree. */ -import {expectCodeIsEqual, FakeWritable} from '../src/TestHelpers'; +import { Command } from '../src/Command'; +import { Event } from '../src/Event'; import { emitNotificationDecl, emitRequestDecl, emitResponseDecl, emitTypeDecl, } from '../src/HeaderWriter'; -import { Event } from '../src/Event'; -import { Command } from '../src/Command'; +import {FakeWritable, expectCodeIsEqual} from '../src/TestHelpers'; import { Type } from '../src/Type'; let stream = null; diff --git a/packages/hermes-inspector-msggen/__tests__/implementation-writer-test.js b/packages/hermes-inspector-msggen/__tests__/implementation-writer-test.js index 6ad01e08231a..8d83a9cc67c5 100644 --- a/packages/hermes-inspector-msggen/__tests__/implementation-writer-test.js +++ b/packages/hermes-inspector-msggen/__tests__/implementation-writer-test.js @@ -5,15 +5,15 @@ * LICENSE file in the root directory of this source tree. */ -import {expectCodeIsEqual, FakeWritable} from '../src/TestHelpers'; +import { Command } from '../src/Command'; +import { Event } from '../src/Event'; import { emitNotificationDef, emitRequestDef, emitResponseDef, emitTypeDef, } from '../src/ImplementationWriter'; -import { Event } from '../src/Event'; -import { Command } from '../src/Command'; +import {FakeWritable, expectCodeIsEqual} from '../src/TestHelpers'; import { Type } from '../src/Type'; let stream = null; diff --git a/packages/hermes-inspector-msggen/package.json b/packages/hermes-inspector-msggen/package.json index 0124f83b5419..a0b17d22c92b 100644 --- a/packages/hermes-inspector-msggen/package.json +++ b/packages/hermes-inspector-msggen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/hermes-inspector-msggen", - "version": "0.72.0", + "version": "0.74.88", "private": true, "description": "Hermes Inspector Message Generator for React Native", "license": "MIT", diff --git a/packages/hermes-inspector-msggen/src/Command.js b/packages/hermes-inspector-msggen/src/Command.js index feed094bb12d..f6da8dffa8c6 100644 --- a/packages/hermes-inspector-msggen/src/Command.js +++ b/packages/hermes-inspector-msggen/src/Command.js @@ -8,8 +8,8 @@ * @format */ -import {Property} from './Property'; import {toCppNamespace, toCppType} from './Converters'; +import {Property} from './Property'; export class Command { domain: string; diff --git a/packages/hermes-inspector-msggen/src/Event.js b/packages/hermes-inspector-msggen/src/Event.js index 10e9ee97422e..bb9f2c4f5658 100644 --- a/packages/hermes-inspector-msggen/src/Event.js +++ b/packages/hermes-inspector-msggen/src/Event.js @@ -8,8 +8,8 @@ * @format */ -import {Property} from './Property'; import {toCppNamespace, toCppType} from './Converters'; +import {Property} from './Property'; export class Event { domain: string; diff --git a/packages/hermes-inspector-msggen/src/HeaderWriter.js b/packages/hermes-inspector-msggen/src/HeaderWriter.js index 49e20c62b33f..612e44e783a5 100644 --- a/packages/hermes-inspector-msggen/src/HeaderWriter.js +++ b/packages/hermes-inspector-msggen/src/HeaderWriter.js @@ -8,14 +8,13 @@ * @format */ -import {Writable} from 'stream'; - +import {Command} from './Command'; +import {toCppNamespace} from './Converters'; +import {Event} from './Event'; import {GeneratedHeader} from './GeneratedHeader'; import {Property} from './Property'; import {PropsType, Type} from './Type'; -import {Command} from './Command'; -import {Event} from './Event'; -import {toCppNamespace} from './Converters'; +import {Writable} from 'stream'; export class HeaderWriter { stream: Writable; diff --git a/packages/hermes-inspector-msggen/src/ImplementationWriter.js b/packages/hermes-inspector-msggen/src/ImplementationWriter.js index 955b8f352bd8..030cee099f05 100644 --- a/packages/hermes-inspector-msggen/src/ImplementationWriter.js +++ b/packages/hermes-inspector-msggen/src/ImplementationWriter.js @@ -8,12 +8,11 @@ * @format */ -import {Writable} from 'stream'; - -import {GeneratedHeader} from './GeneratedHeader'; -import {PropsType, Type} from './Type'; import {Command} from './Command'; import {Event} from './Event'; +import {GeneratedHeader} from './GeneratedHeader'; +import {PropsType, Type} from './Type'; +import {Writable} from 'stream'; export class ImplementationWriter { stream: Writable; diff --git a/packages/hermes-inspector-msggen/src/Property.js b/packages/hermes-inspector-msggen/src/Property.js index fdad9bc6f7b3..a67391603575 100644 --- a/packages/hermes-inspector-msggen/src/Property.js +++ b/packages/hermes-inspector-msggen/src/Property.js @@ -9,10 +9,10 @@ */ import { + type JsTypeString, jsTypeToCppType, toCppNamespace, toCppType, - type JsTypeString, } from './Converters'; export class Property { diff --git a/packages/hermes-inspector-msggen/src/Type.js b/packages/hermes-inspector-msggen/src/Type.js index eef2a4265a81..9371fbce0f2a 100644 --- a/packages/hermes-inspector-msggen/src/Type.js +++ b/packages/hermes-inspector-msggen/src/Type.js @@ -8,8 +8,8 @@ * @format */ -import {Property} from './Property'; import {jsTypeToCppType, toCppNamespace, toCppType} from './Converters'; +import {Property} from './Property'; export class Type { domain: string; diff --git a/packages/hermes-inspector-msggen/src/index.js b/packages/hermes-inspector-msggen/src/index.js index dd6c488f6050..761390faca7c 100644 --- a/packages/hermes-inspector-msggen/src/index.js +++ b/packages/hermes-inspector-msggen/src/index.js @@ -8,24 +8,20 @@ * @format */ -import fs from 'fs'; - -import yargs from 'yargs'; - import {Command} from './Command'; import {Event} from './Event'; import {Graph} from './Graph'; -import {Property} from './Property'; -import {PropsType, Type} from './Type'; - import {HeaderWriter} from './HeaderWriter'; import {ImplementationWriter} from './ImplementationWriter'; +import {Property} from './Property'; +import {PropsType, Type} from './Type'; +import fs from 'fs'; +import yargs from 'yargs'; +const custom = require('../src/custom.json'); // $FlowFixMe[cannot-resolve-module] : this isn't a module, just a JSON file. const standard = require('devtools-protocol/json/js_protocol.json'); -const custom = require('../src/custom.json'); - type Descriptor = {| types: Array, commands: Array, diff --git a/packages/metro-config/.gitignore b/packages/metro-config/.gitignore new file mode 100644 index 000000000000..40d93a0332c9 --- /dev/null +++ b/packages/metro-config/.gitignore @@ -0,0 +1,5 @@ +# Dependencies +/node_modules + +# Build output +/dist diff --git a/packages/metro-config/index.js b/packages/metro-config/index.js deleted file mode 100644 index 2abf2c8757d4..000000000000 --- a/packages/metro-config/index.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. 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 - * @noformat - */ - -/*:: import type {ConfigT} from 'metro-config'; */ - -const {getDefaultConfig: getBaseConfig, mergeConfig} = require('metro-config'); - -const INTERNAL_CALLSITES_REGEX = new RegExp( - [ - '/Libraries/BatchedBridge/MessageQueue\\.js$', - '/Libraries/Core/.+\\.js$', - '/Libraries/LogBox/.+\\.js$', - '/Libraries/Network/.+\\.js$', - '/Libraries/Pressability/.+\\.js$', - '/Libraries/Renderer/implementations/.+\\.js$', - '/Libraries/Utilities/.+\\.js$', - '/Libraries/vendor/.+\\.js$', - '/Libraries/WebSocket/.+\\.js$', - '/Libraries/YellowBox/.+\\.js$', - '/metro-runtime/.+\\.js$', - '/node_modules/@babel/runtime/.+\\.js$', - '/node_modules/event-target-shim/.+\\.js$', - '/node_modules/invariant/.+\\.js$', - '/node_modules/react-devtools-core/.+\\.js$', - '/node_modules/react-native/index.js$', - '/node_modules/react-refresh/.+\\.js$', - '/node_modules/scheduler/.+\\.js$', - '^\\[native code\\]$', - ].join('|'), -); - -/** - * Get the base Metro configuration for a React Native project. - */ -function getDefaultConfig( - projectRoot /*: string */ -) /*: ConfigT */ { - const config = { - resolver: { - resolverMainFields: ['react-native', 'browser', 'main'], - platforms: ['android', 'ios'], - unstable_conditionNames: ['require', 'import', 'react-native'], - }, - serializer: { - // Note: This option is overridden in cli-plugin-metro (getOverrideConfig) - getModulesRunBeforeMainModule: () => [ - require.resolve('react-native/Libraries/Core/InitializeCore'), - ], - getPolyfills: () => require('@react-native/js-polyfills')(), - }, - server: { - port: Number(process.env.RCT_METRO_PORT) || 8081, - }, - symbolicator: { - customizeFrame: (frame /*: $ReadOnly<{file: ?string, ...}>*/) => { - const collapse = Boolean( - frame.file && INTERNAL_CALLSITES_REGEX.test(frame.file), - ); - return {collapse}; - }, - }, - transformer: { - allowOptionalDependencies: true, - assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry', - asyncRequireModulePath: require.resolve( - 'metro-runtime/src/modules/asyncRequire', - ), - babelTransformerPath: require.resolve( - '@react-native/metro-babel-transformer', - ), - getTransformOptions: async () => ({ - transform: { - experimentalImportSupport: false, - inlineRequires: true, - }, - }), - }, - watchFolders: [], - }; - - // Set global hook so that the CLI can detect when this config has been loaded - global.__REACT_NATIVE_METRO_CONFIG_LOADED = true; - - return mergeConfig( - getBaseConfig.getDefaultValues(projectRoot), - config, - ); -} - -module.exports = {getDefaultConfig, mergeConfig}; diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index 39e03521aa32..7a60e3fd515a 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.74.88", "description": "Metro configuration for React Native.", "license": "MIT", "repository": { @@ -9,16 +9,26 @@ "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", + "exports": { + ".": "./src/index.js", + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], "dependencies": { - "@react-native/metro-babel-transformer": "^0.73.11", - "@react-native/js-polyfills": "^0.73.0", - "metro-config": "0.79.1", - "metro-runtime": "0.79.1" + "@react-native/js-polyfills": "0.74.88", + "@react-native/metro-babel-transformer": "0.74.88", + "metro-config": "^0.80.3", + "metro-runtime": "^0.80.3" } } diff --git a/packages/metro-config/src/index.flow.js b/packages/metro-config/src/index.flow.js new file mode 100644 index 000000000000..6aad1cb74da2 --- /dev/null +++ b/packages/metro-config/src/index.flow.js @@ -0,0 +1,94 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {ConfigT} from 'metro-config'; + +import {getDefaultConfig as getBaseConfig, mergeConfig} from 'metro-config'; + +const INTERNAL_CALLSITES_REGEX = new RegExp( + [ + '/Libraries/BatchedBridge/MessageQueue\\.js$', + '/Libraries/Core/.+\\.js$', + '/Libraries/LogBox/.+\\.js$', + '/Libraries/Network/.+\\.js$', + '/Libraries/Pressability/.+\\.js$', + '/Libraries/Renderer/implementations/.+\\.js$', + '/Libraries/Utilities/.+\\.js$', + '/Libraries/vendor/.+\\.js$', + '/Libraries/WebSocket/.+\\.js$', + '/Libraries/YellowBox/.+\\.js$', + '/metro-runtime/.+\\.js$', + '/node_modules/@babel/runtime/.+\\.js$', + '/node_modules/event-target-shim/.+\\.js$', + '/node_modules/invariant/.+\\.js$', + '/node_modules/react-devtools-core/.+\\.js$', + '/node_modules/react-native/index.js$', + '/node_modules/react-refresh/.+\\.js$', + '/node_modules/scheduler/.+\\.js$', + '^\\[native code\\]$', + ].join('|'), +); + +export {mergeConfig} from 'metro-config'; + +/** + * Get the base Metro configuration for a React Native project. + */ +export function getDefaultConfig(projectRoot: string): ConfigT { + const config = { + resolver: { + resolverMainFields: ['react-native', 'browser', 'main'], + platforms: ['android', 'ios'], + unstable_conditionNames: ['require', 'import', 'react-native'], + }, + serializer: { + // Note: This option is overridden in cli-plugin-metro (getOverrideConfig) + getModulesRunBeforeMainModule: () => [ + require.resolve('react-native/Libraries/Core/InitializeCore'), + ], + // $FlowFixMe[untyped-import] + getPolyfills: () => require('@react-native/js-polyfills')(), + }, + server: { + port: Number(process.env.RCT_METRO_PORT) || 8081, + }, + symbolicator: { + customizeFrame: (frame: $ReadOnly<{file: ?string, ...}>) => { + const collapse = Boolean( + frame.file != null && INTERNAL_CALLSITES_REGEX.test(frame.file), + ); + return {collapse}; + }, + }, + transformer: { + allowOptionalDependencies: true, + assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry', + asyncRequireModulePath: require.resolve( + 'metro-runtime/src/modules/asyncRequire', + ), + babelTransformerPath: require.resolve( + '@react-native/metro-babel-transformer', + ), + getTransformOptions: async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, + }, + }), + }, + watchFolders: [], + }; + + // Set global hook so that the CLI can detect when this config has been loaded + global.__REACT_NATIVE_METRO_CONFIG_LOADED = true; + + return mergeConfig(getBaseConfig.getDefaultValues(projectRoot), config); +} diff --git a/packages/metro-config/src/index.js b/packages/metro-config/src/index.js new file mode 100644 index 000000000000..b1cd97b5d455 --- /dev/null +++ b/packages/metro-config/src/index.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 + * @oncall react_native + */ + +/*:: +export type * from './index.flow'; +*/ + +if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) { + require('../../../scripts/build/babel-register').registerForMonorepo(); +} + +export * from './index.flow'; diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index ab3fa6fd89f2..a8da2b972a6d 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.74.88", "description": "Color normalization for React Native.", "license": "MIT", "repository": { @@ -9,9 +9,11 @@ "directory": "packages/normalize-color" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/normalize-color#readme", - "keywords": ["color", "normalization", "normalize-colors", "react-native"], - "bugs": "https://github.com/facebook/react-native/issues", - "engines": { - "node": ">=18" - } + "keywords": [ + "color", + "normalization", + "normalize-colors", + "react-native" + ], + "bugs": "https://github.com/facebook/react-native/issues" } diff --git a/packages/polyfills/Object.es8.js b/packages/polyfills/Object.es8.js deleted file mode 100644 index 4925f6e2dee0..000000000000 --- a/packages/polyfills/Object.es8.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @polyfill - * @nolint - */ - -(function () { - 'use strict'; - - const hasOwnProperty = Object.prototype.hasOwnProperty; - - /** - * Returns an array of the given object's own enumerable entries. - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries - */ - if (typeof Object.entries !== 'function') { - Object.entries = function (object) { - // `null` and `undefined` values are not allowed. - if (object == null) { - throw new TypeError('Object.entries called on non-object'); - } - - const entries = []; - for (const key in object) { - if (hasOwnProperty.call(object, key)) { - entries.push([key, object[key]]); - } - } - return entries; - }; - } - - /** - * Returns an array of the given object's own enumerable entries. - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values - */ - if (typeof Object.values !== 'function') { - Object.values = function (object) { - // `null` and `undefined` values are not allowed. - if (object == null) { - throw new TypeError('Object.values called on non-object'); - } - - const values = []; - for (const key in object) { - if (hasOwnProperty.call(object, key)) { - values.push(object[key]); - } - } - return values; - }; - } -})(); diff --git a/packages/polyfills/__tests__/Object.es8-test.js b/packages/polyfills/__tests__/Object.es8-test.js deleted file mode 100644 index c53512f17561..000000000000 --- a/packages/polyfills/__tests__/Object.es8-test.js +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and 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 jsinfra - */ - -'use strict'; - -describe('Object (ES8)', () => { - beforeEach(() => { - delete Object.entries; - delete Object.values; - jest.resetModules(); - require('../Object.es8'); - }); - - describe('Object.entries', () => { - it('should have a length of 1', () => { - expect(Object.entries.length).toBe(1); - }); - - it('should check for type', () => { - expect(Object.entries.bind(null, null)).toThrow( - TypeError('Object.entries called on non-object'), - ); - expect(Object.entries.bind(null, undefined)).toThrow( - TypeError('Object.entries called on non-object'), - ); - expect(Object.entries.bind(null, [])).not.toThrow(); - expect(Object.entries.bind(null, () => {})).not.toThrow(); - expect(Object.entries.bind(null, {})).not.toThrow(); - expect(Object.entries.bind(null, 'abc')).not.toThrow(); - }); - - it('should return enumerable entries', () => { - const foo = Object.defineProperties( - {}, - { - x: {value: 10, enumerable: true}, - y: {value: 20}, - }, - ); - - expect(Object.entries(foo)).toEqual([['x', 10]]); - - const bar = {x: 10, y: 20}; - expect(Object.entries(bar)).toEqual([ - ['x', 10], - ['y', 20], - ]); - }); - - it('should work with proto-less objects', () => { - const foo = Object.create(null, { - x: {value: 10, enumerable: true}, - y: {value: 20}, - }); - - expect(Object.entries(foo)).toEqual([['x', 10]]); - }); - - it('should return only own entries', () => { - const foo = Object.create( - {z: 30}, - { - x: {value: 10, enumerable: true}, - y: {value: 20}, - }, - ); - - expect(Object.entries(foo)).toEqual([['x', 10]]); - }); - - it('should convert to object primitive string', () => { - expect(Object.entries('ab')).toEqual([ - ['0', 'a'], - ['1', 'b'], - ]); - }); - }); - - describe('Object.values', () => { - it('should have a length of 1', () => { - expect(Object.values.length).toBe(1); - }); - - it('should check for type', () => { - expect(Object.values.bind(null, null)).toThrow( - TypeError('Object.values called on non-object'), - ); - expect(Object.values.bind(null, [])).not.toThrow(); - expect(Object.values.bind(null, () => {})).not.toThrow(); - expect(Object.values.bind(null, {})).not.toThrow(); - }); - - it('should return enumerable values', () => { - const foo = Object.defineProperties( - {}, - { - x: {value: 10, enumerable: true}, - y: {value: 20}, - }, - ); - - expect(Object.values(foo)).toEqual([10]); - - const bar = {x: 10, y: 20}; - expect(Object.values(bar)).toEqual([10, 20]); - }); - - it('should work with proto-less objects', () => { - const foo = Object.create(null, { - x: {value: 10, enumerable: true}, - y: {value: 20}, - }); - - expect(Object.values(foo)).toEqual([10]); - }); - - it('should return only own values', () => { - const foo = Object.create( - {z: 30}, - { - x: {value: 10, enumerable: true}, - y: {value: 20}, - }, - ); - - expect(Object.values(foo)).toEqual([10]); - }); - - it('should convert to object primitive string', () => { - expect(Object.values('ab')).toEqual(['a', 'b']); - }); - }); -}); diff --git a/packages/polyfills/index.js b/packages/polyfills/index.js index 5979051ac301..90aa1dc08343 100644 --- a/packages/polyfills/index.js +++ b/packages/polyfills/index.js @@ -12,5 +12,4 @@ module.exports = () => [ require.resolve('./console.js'), require.resolve('./error-guard.js'), - require.resolve('./Object.es8.js'), ]; diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 8cefc9909f6b..66cf37b5ebe3 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.74.88", "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..3d14041b05bc 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.74.88", "description": "Babel preset for React Native applications", "main": "src/index.js", "repository": { @@ -18,6 +18,7 @@ "@babel/plugin-proposal-async-generator-functions": "^7.0.0", "@babel/plugin-proposal-class-properties": "^7.18.0", "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.0", "@babel/plugin-proposal-numeric-separator": "^7.0.0", "@babel/plugin-proposal-object-rest-spread": "^7.20.0", @@ -53,7 +54,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.74.88", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" }, diff --git a/packages/react-native-babel-preset/src/configs/main.js b/packages/react-native-babel-preset/src/configs/main.js index e921b1b15eab..4a483730e8ab 100644 --- a/packages/react-native-babel-preset/src/configs/main.js +++ b/packages/react-native-babel-preset/src/configs/main.js @@ -147,6 +147,18 @@ const getPreset = (src, options) => { {loose: true}, ]); } + if ( + !isHermes && + (isNull || + src.indexOf('??=') !== -1 || + src.indexOf('||=') !== -1 || + src.indexOf('&&=') !== -1) + ) { + extraPlugins.push([ + require('@babel/plugin-proposal-logical-assignment-operators'), + {loose: true}, + ]); + } if (options && options.dev && !options.useTransformReactJSXExperimental) { extraPlugins.push([require('@babel/plugin-transform-react-jsx-source')]); diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index 0862b76d176f..fcd90a29701d 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.74.88", "description": "Babel transformer for React Native applications.", "main": "src/index.js", "repository": { @@ -16,8 +16,8 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.20.0", - "@react-native/babel-preset": "*", - "hermes-parser": "0.15.0", + "@react-native/babel-preset": "0.74.88", + "hermes-parser": "0.19.1", "nullthrows": "^1.1.1" }, "peerDependencies": { diff --git a/packages/react-native-babel-transformer/src/index.js b/packages/react-native-babel-transformer/src/index.js index 8cc902378954..b82be63b12fe 100644 --- a/packages/react-native-babel-transformer/src/index.js +++ b/packages/react-native-babel-transformer/src/index.js @@ -24,9 +24,9 @@ import type { */ const {parseSync, transformFromAstSync} = require('@babel/core'); +const makeHMRConfig = require('@react-native/babel-preset/src/configs/hmr'); const crypto = require('crypto'); const fs = require('fs'); -const makeHMRConfig = require('@react-native/babel-preset/src/configs/hmr'); const nullthrows = require('nullthrows'); const path = require('path'); @@ -202,12 +202,13 @@ const transform /*: BabelTransformer['transform'] */ = ({ // You get this behavior by default when using Babel's `transform` method directly. cloneInputAst: false, }; - const sourceAst = + const sourceAst /*: BabelNodeFile */ = isTypeScriptSource(filename) || isTSXSource(filename) || !options.hermesParser ? parseSync(src, babelConfig) - : require('hermes-parser').parse(src, { + : // $FlowFixMe[incompatible-exact] + require('hermes-parser').parse(src, { babel: true, sourceType: babelConfig.sourceType, }); diff --git a/packages/react-native-bots/dangerfile.js b/packages/react-native-bots/dangerfile.js index 55994da24521..032a788e4214 100644 --- a/packages/react-native-bots/dangerfile.js +++ b/packages/react-native-bots/dangerfile.js @@ -9,9 +9,12 @@ 'use strict'; +/* eslint-disable lint/sort-imports */ +// The 'danger' package seems to have some side effects that make it unsafe +// to reorder. + const {danger, fail, /*message,*/ warn} = require('danger'); const includes = require('lodash.includes'); -const eslint = require('@seadub/danger-plugin-eslint'); const fetch = require('node-fetch'); const {validate: validateChangelog} = require('@rnx-kit/rn-changelog-generator').default; @@ -99,10 +102,6 @@ if (isMergeRefStable) { }); } -// Ensures that eslint is run from root folder and that it can find .eslintrc -process.chdir('../../'); -eslint.default(); - // Wait for statuses and post a message if there are failures. async function handleStatuses() { const regex = /Test Suites: \d+ failed/; @@ -182,4 +181,4 @@ async function handleStatuses() { } } -handleStatuses(); +// handleStatuses(); diff --git a/packages/react-native-bots/package.json b/packages/react-native-bots/package.json index 40dfe8c2c18e..754b2e86dfbc 100644 --- a/packages/react-native-bots/package.json +++ b/packages/react-native-bots/package.json @@ -1,7 +1,7 @@ { "name": "@react-native/bots", "description": "React Native Bots", - "version": "0.0.0", + "version": "0.74.88", "private": true, "license": "MIT", "repository": { @@ -15,9 +15,7 @@ }, "devDependencies": { "@rnx-kit/rn-changelog-generator": "^0.4.0", - "@seadub/danger-plugin-eslint": "^3.0.2", "danger": "^11.2.1", - "eslint": "^8.19.0", "lodash.includes": "^4.3.0", "minimatch": "^3.0.4" }, diff --git a/packages/react-native-bots/report-bundle-size.js b/packages/react-native-bots/report-bundle-size.js index 35d1f468c423..411332cf26da 100644 --- a/packages/react-native-bots/report-bundle-size.js +++ b/packages/react-native-bots/report-bundle-size.js @@ -18,12 +18,12 @@ const { GITHUB_SHA, } = process.env; -const fs = require('fs'); const datastore = require('./datastore'); const { createOrUpdateComment, validateEnvironment: validateEnvironmentForMakeComment, } = require('./make-comment'); +const fs = require('fs'); /** * Generates and submits a comment. If this is run on the main or release branch, data is diff --git a/packages/react-native-codegen-typescript-test/package.json b/packages/react-native-codegen-typescript-test/package.json index 24f37ab65cf2..e5ff95e2ccf6 100644 --- a/packages/react-native-codegen-typescript-test/package.json +++ b/packages/react-native-codegen-typescript-test/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/codegen-typescript-test", - "version": "0.0.1", + "version": "0.74.88", "private": true, "description": "TypeScript related unit test for @react-native/codegen", "license": "MIT", @@ -19,7 +19,7 @@ "prepare": "yarn run build" }, "dependencies": { - "@react-native/codegen": "*" + "@react-native/codegen": "0.74.88" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/ArrayPropsNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/ArrayPropsNativeComponent.js index 95806046fae0..1b46fd1b88e4 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/ArrayPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/ArrayPropsNativeComponent.js @@ -8,21 +8,22 @@ * @flow strict-local */ +import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; import type { DimensionValue, EdgeInsetsValue, PointValue, } from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; -import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; -import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type { - Int32, Float, + Int32, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; + import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/BooleanPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/BooleanPropNativeComponent.js index f42d3ef33b45..31d277596837 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/BooleanPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/BooleanPropNativeComponent.js @@ -8,10 +8,11 @@ * @flow strict-local */ -import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; + +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/ColorPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/ColorPropNativeComponent.js index a83dd75323a3..09ad4baeee36 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/ColorPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/ColorPropNativeComponent.js @@ -8,10 +8,11 @@ * @flow strict-local */ -import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; + +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/DimensionPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/DimensionPropNativeComponent.js index 5cd34dd81a4e..4ca8fc37a2a3 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/DimensionPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/DimensionPropNativeComponent.js @@ -8,10 +8,11 @@ * @flow strict-local */ -import type {DimensionValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {DimensionValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; + +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js index 08dba01767c5..95a701647558 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js @@ -9,9 +9,10 @@ */ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/EnumPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/EnumPropNativeComponent.js index 121435c30543..d4394e662e24 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/EnumPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/EnumPropNativeComponent.js @@ -8,10 +8,11 @@ * @flow strict-local */ -import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; + +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js index 59086b66b855..8e0b0fc5d7c1 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js @@ -8,14 +8,15 @@ * @flow strict-local */ +import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; import type { - Int32, BubblingEventHandler, + Int32, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; + import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; type OnChangeEvent = $ReadOnly<{| location: { diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/EventPropsNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/EventPropsNativeComponent.js index 5b5d4a9cfeec..4d414adbcebc 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/EventPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/EventPropsNativeComponent.js @@ -8,16 +8,17 @@ * @flow strict-local */ +import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; import type { - Int32, - Float, BubblingEventHandler, DirectEventHandler, + Float, + Int32, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; + import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; type OnChangeEvent = $ReadOnly<{| value: boolean, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/FloatPropsNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/FloatPropsNativeComponent.js index db170d5961ee..1bd65ccd564d 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/FloatPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/FloatPropsNativeComponent.js @@ -8,13 +8,14 @@ * @flow strict-local */ +import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; import type { - WithDefault, Float, + WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; + import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/ImagePropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/ImagePropNativeComponent.js index 77f56799d8c5..8c08d112f70e 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/ImagePropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/ImagePropNativeComponent.js @@ -8,11 +8,12 @@ * @flow strict-local */ -import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/IntegerPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/IntegerPropNativeComponent.js index cbffaa601743..8f7400a8f055 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/IntegerPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/IntegerPropNativeComponent.js @@ -8,13 +8,14 @@ * @flow strict-local */ +import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; import type { - WithDefault, Int32, + WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; + import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/InterfaceOnlyNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/InterfaceOnlyNativeComponent.js index 4832d0608e72..8a5e39ce000a 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/InterfaceOnlyNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/InterfaceOnlyNativeComponent.js @@ -8,13 +8,14 @@ * @flow strict-local */ +import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; import type { BubblingEventHandler, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; + import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/MixedPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/MixedPropNativeComponent.js index 41169339f738..883ff8a398e1 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/MixedPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/MixedPropNativeComponent.js @@ -9,10 +9,11 @@ */ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; import type {UnsafeMixed} from 'react-native/Libraries/Types/CodegenTypes'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/MultiNativePropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/MultiNativePropNativeComponent.js index 3ff7f1f41041..af1b2fb1eba9 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/MultiNativePropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/MultiNativePropNativeComponent.js @@ -8,12 +8,13 @@ * @flow strict-local */ -import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; -import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; -import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; +import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; + +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js index a8ba611ce933..6ac37dda0ce9 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js @@ -9,9 +9,10 @@ */ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/ObjectPropsNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/ObjectPropsNativeComponent.js index 09c518fc1a46..85ad5d590aee 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/ObjectPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/ObjectPropsNativeComponent.js @@ -10,15 +10,16 @@ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; -import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; +import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; import type { - Int32, Float, + Int32, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; + import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; type ObjectArrayPropType = $ReadOnly<{| array: $ReadOnlyArray, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/PointPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/PointPropNativeComponent.js index 7c27ce01958a..772e079c032c 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/PointPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/PointPropNativeComponent.js @@ -8,10 +8,11 @@ * @flow strict-local */ -import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; + +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/components/StringPropNativeComponent.js b/packages/react-native-codegen/e2e/__test_fixtures__/components/StringPropNativeComponent.js index a34d17dab94c..3246f622970e 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/components/StringPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/components/StringPropNativeComponent.js @@ -8,10 +8,11 @@ * @flow strict-local */ -import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; + +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| ...ViewProps, diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeArrayTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeArrayTurboModule.js index 5b7d621a6557..c132fce4776b 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeArrayTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeArrayTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type ArrayType = string; diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeBooleanTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeBooleanTurboModule.js index a898b1302883..2eeae4e6c537 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeBooleanTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeBooleanTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type Boolean = boolean; diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeCallbackTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeCallbackTurboModule.js index 71bb14cf72f8..5bac9222bebb 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeCallbackTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeCallbackTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type String = string; diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js index 1dbeeec74d8e..1a24614fecdb 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type StateType = {| diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNullableTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNullableTurboModule.js index e56e0346ad1d..41b524a86817 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNullableTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNullableTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export interface Spec extends TurboModule { diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNumberTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNumberTurboModule.js index e47a31a2d3ed..ac86df6b053f 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNumberTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeNumberTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type Number = number; diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeObjectTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeObjectTurboModule.js index e3b2d5df8c5a..7dbc21c6c816 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeObjectTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeObjectTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type GenericObject = Object; diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeOptionalObjectTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeOptionalObjectTurboModule.js index 692bd52ff73c..37d1a5c47cb4 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeOptionalObjectTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeOptionalObjectTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export interface Spec extends TurboModule { diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePartialAnnotationTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePartialAnnotationTurboModule.js index 42b15f68d47c..3e01c1cc5edb 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePartialAnnotationTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePartialAnnotationTurboModule.js @@ -11,6 +11,7 @@ 'use strict'; import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type SomeObj = {| diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePromiseTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePromiseTurboModule.js index 610b3bab899a..023524505d6e 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePromiseTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativePromiseTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type String = string; diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModule.js index 12496b4ec75d..57871b1035a9 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModule.js @@ -12,6 +12,7 @@ import type { RootTag, TurboModule, } from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; type Animal = {| diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleArrays.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleArrays.js index d320bd2fb338..940cc75fd8c5 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleArrays.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleArrays.js @@ -12,6 +12,7 @@ import type { RootTag, TurboModule, } from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; type Animal = {| diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullable.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullable.js index 2a736f08e927..a96b0ae731d8 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullable.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullable.js @@ -12,6 +12,7 @@ import type { RootTag, TurboModule, } from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; type Animal = ?{| diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullableAndOptional.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullableAndOptional.js index b8981a22ab2d..fb5b66631f3d 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullableAndOptional.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleNullableAndOptional.js @@ -12,6 +12,7 @@ import type { RootTag, TurboModule, } from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; type Animal = ?{| diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleOptional.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleOptional.js index d1b56f989388..820e99a5cad1 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleOptional.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeSampleTurboModuleOptional.js @@ -12,6 +12,7 @@ import type { RootTag, TurboModule, } from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; type Animal = {| diff --git a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeStringTurboModule.js b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeStringTurboModule.js index b78372382b82..810351eb1aad 100644 --- a/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeStringTurboModule.js +++ b/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeStringTurboModule.js @@ -9,6 +9,7 @@ */ import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; + import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; export type String = string; diff --git a/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentDescriptorH-test.js b/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentDescriptorH-test.js index 3e12f2afa956..8ddac9a7b8cd 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentDescriptorH-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentDescriptorH-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GenerateComponentDescriptorH'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; @@ -25,7 +25,13 @@ fixtures.forEach(fixture => { it(`GenerateComponentDescriptorH can generate for '${fixture}'`, () => { const libName = 'RNCodegenModuleFixtures'; const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`); - const output = generator.generate(libName, schema); + const output = generator.generate( + libName, + schema, + undefined, + false, + `react/renderer/components/${libName}/`, + ); expect(Object.fromEntries(output)).toMatchSnapshot(); }); }); diff --git a/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentHObjCpp-test.js b/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentHObjCpp-test.js index 50959ea33a80..0fefa3b2c988 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentHObjCpp-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GenerateComponentHObjCpp-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GenerateComponentHObjCpp'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; diff --git a/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterCpp-test.js b/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterCpp-test.js index 177ec1dccb9e..62976215b011 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterCpp-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterCpp-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GenerateEventEmitterCpp'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; @@ -25,7 +25,13 @@ fixtures.forEach(fixture => { it(`GenerateEventEmitterCpp can generate for '${fixture}'`, () => { const libName = 'RNCodegenModuleFixtures'; const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`); - const output = generator.generate(libName, schema); + const output = generator.generate( + libName, + schema, + undefined, + false, + `react/renderer/components/${libName}/`, + ); expect(Object.fromEntries(output)).toMatchSnapshot(); }); }); diff --git a/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterH-test.js b/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterH-test.js index 962c57ef4041..2be17160beba 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterH-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterH-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GenerateEventEmitterH'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; diff --git a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsCpp-test.js b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsCpp-test.js index b6d0f5e9792b..37af11c17d2e 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsCpp-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsCpp-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GeneratePropsCpp'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; @@ -25,7 +25,13 @@ fixtures.forEach(fixture => { it(`GeneratePropsCpp can generate for '${fixture}'`, () => { const libName = 'RNCodegenModuleFixtures'; const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`); - const output = generator.generate(libName, schema); + const output = generator.generate( + libName, + schema, + '', + false, + `react/renderer/components/${libName}/`, + ); expect(Object.fromEntries(output)).toMatchSnapshot(); }); }); diff --git a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsH-test.js b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsH-test.js index 6c60a966c345..41588ee3c02d 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsH-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsH-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GeneratePropsH'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; diff --git a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaDelegate-test.js b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaDelegate-test.js index 3a3a2135cb22..9384ad968ccc 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaDelegate-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaDelegate-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GeneratePropsJavaDelegate'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; diff --git a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaInterface-test.js b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaInterface-test.js index 14a807fd02b4..1cc29a6b7ccb 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaInterface-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaInterface-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GeneratePropsJavaInterface'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; diff --git a/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeCpp-test.js b/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeCpp-test.js index a7a766b1a56b..6a5f508d9013 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeCpp-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeCpp-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GenerateShadowNodeCpp'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; @@ -24,7 +24,13 @@ fixtures.forEach(fixture => { it(`GenerateShadowNodeCpp can generate for '${fixture}'`, () => { const libName = 'RNCodegenModuleFixtures'; const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`); - const output = generator.generate(libName, schema, undefined, false); + const output = generator.generate( + libName, + schema, + '', + false, + `react/renderer/components/${libName}/`, + ); expect(Object.fromEntries(output)).toMatchSnapshot(); }); }); diff --git a/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeH-test.js b/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeH-test.js index 87cc703a17aa..543732fad465 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeH-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeH-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GenerateShadowNodeH'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; @@ -24,7 +24,13 @@ fixtures.forEach(fixture => { it(`GenerateShadowNodeH can generate for '${fixture}'`, () => { const libName = 'RNCodegenModuleFixtures'; const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`); - const output = generator.generate(libName, schema, undefined, false); + const output = generator.generate( + libName, + schema, + '', + false, + `react/renderer/components/${libName}/`, + ); expect(Object.fromEntries(output)).toMatchSnapshot(); }); }); diff --git a/packages/react-native-codegen/e2e/__tests__/components/GenerateViewConfigJs-test.js b/packages/react-native-codegen/e2e/__tests__/components/GenerateViewConfigJs-test.js index 833866e473df..a5ab0bb74151 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/GenerateViewConfigJs-test.js +++ b/packages/react-native-codegen/e2e/__tests__/components/GenerateViewConfigJs-test.js @@ -11,8 +11,8 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); const generator = require('../../../src/generators/components/GenerateViewConfigJs'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap index 74f0e533357b..46757e6c95c0 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap @@ -16,14 +16,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -44,14 +46,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using BooleanPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -72,14 +76,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ColorPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -100,14 +106,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using DimensionPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -128,14 +136,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using EdgeInsetsPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -156,14 +166,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using EnumPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -184,14 +196,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using EventNestedObjectPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -212,14 +226,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using EventPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -240,14 +256,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using FloatPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -268,14 +286,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ImagePropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -296,14 +316,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using IntegerPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -324,14 +346,16 @@ Object { #include #include +#include + +namespace facebook::react { -namespace facebook { -namespace react { +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -352,14 +376,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using MixedPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -380,14 +406,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using MultiNativePropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -408,14 +436,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using NoPropsNoEventsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -436,14 +466,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ObjectPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -464,14 +496,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using PointPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -492,14 +526,16 @@ Object { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using StringPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void RNCodegenModuleFixtures_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap index 433dcad81d40..a53541759bf3 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap @@ -15,11 +15,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,11 +37,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -63,11 +59,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -87,11 +81,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -111,11 +103,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -135,11 +125,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -159,8 +147,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { void EventNestedObjectPropsNativeComponentViewEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -180,8 +167,7 @@ void EventNestedObjectPropsNativeComponentViewEventEmitter::onChange(OnChange $e }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -201,11 +187,10 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { void EventPropsNativeComponentViewEventEmitter::onChange(OnChange $event) const { - dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { + dispatchEvent(\\"paperDirectName\\", [$event=std::move($event)](jsi::Runtime &runtime) { auto $payload = jsi::Object(runtime); $payload.setProperty(runtime, \\"value\\", $event.value); $payload.setProperty(runtime, \\"source\\", $event.source); @@ -226,7 +211,7 @@ void EventPropsNativeComponentViewEventEmitter::onEventDirect(OnEventDirect $eve void EventPropsNativeComponentViewEventEmitter::onEventDirectWithPaperName(OnEventDirectWithPaperName $event) const { - dispatchEvent(\\"eventDirectWithPaperName\\", [$event=std::move($event)](jsi::Runtime &runtime) { + dispatchEvent(\\"paperDirectName\\", [$event=std::move($event)](jsi::Runtime &runtime) { auto $payload = jsi::Object(runtime); $payload.setProperty(runtime, \\"value\\", $event.value); return $payload; @@ -235,7 +220,7 @@ void EventPropsNativeComponentViewEventEmitter::onEventDirectWithPaperName(OnEve void EventPropsNativeComponentViewEventEmitter::onOrientationChange(OnOrientationChange $event) const { - dispatchEvent(\\"orientationChange\\", [$event=std::move($event)](jsi::Runtime &runtime) { + dispatchEvent(\\"paperBubblingName\\", [$event=std::move($event)](jsi::Runtime &runtime) { auto $payload = jsi::Object(runtime); $payload.setProperty(runtime, \\"orientation\\", toString($event.orientation)); return $payload; @@ -253,15 +238,14 @@ void EventPropsNativeComponentViewEventEmitter::onEnd(OnEnd $event) const { void EventPropsNativeComponentViewEventEmitter::onEventBubblingWithPaperName(OnEventBubblingWithPaperName $event) const { - dispatchEvent(\\"eventBubblingWithPaperName\\", [](jsi::Runtime &runtime) { + dispatchEvent(\\"paperBubblingName\\", [](jsi::Runtime &runtime) { auto $payload = jsi::Object(runtime); return $payload; }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -281,11 +265,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -305,11 +287,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -329,11 +309,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -353,8 +331,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { void InterfaceOnlyNativeComponentViewEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -364,8 +341,7 @@ void InterfaceOnlyNativeComponentViewEventEmitter::onChange(OnChange $event) con }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -385,11 +361,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -409,11 +383,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -433,11 +405,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -457,11 +427,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -481,11 +449,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -505,11 +471,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap index 57f16617fe96..9ae54de91b30 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap @@ -16,8 +16,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -25,8 +24,7 @@ class ArrayPropsNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -47,8 +45,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -56,8 +53,7 @@ class BooleanPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -78,8 +74,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -87,8 +82,7 @@ class ColorPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -109,8 +103,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -118,8 +111,7 @@ class DimensionPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +132,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EdgeInsetsPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -149,8 +140,7 @@ class EdgeInsetsPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -171,8 +161,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EnumPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -180,8 +169,7 @@ class EnumPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -202,8 +190,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EventNestedObjectPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -223,8 +210,7 @@ class EventNestedObjectPropsNativeComponentViewEventEmitter : public ViewEventEm }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -245,8 +231,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EventPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -301,8 +286,7 @@ class EventPropsNativeComponentViewEventEmitter : public ViewEventEmitter { void onEventBubblingWithPaperName(OnEventBubblingWithPaperName value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -323,8 +307,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -332,8 +315,7 @@ class FloatPropsNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -354,8 +336,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -363,8 +344,7 @@ class ImagePropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -385,8 +365,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -394,8 +373,7 @@ class IntegerPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -416,8 +394,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -427,8 +404,7 @@ class InterfaceOnlyNativeComponentViewEventEmitter : public ViewEventEmitter { }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -449,8 +425,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -458,8 +433,7 @@ class MixedPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -480,8 +454,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiNativePropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -489,8 +462,7 @@ class MultiNativePropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -511,8 +483,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -520,8 +491,7 @@ class NoPropsNoEventsNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -542,8 +512,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ObjectPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -551,8 +520,7 @@ class ObjectPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -573,8 +541,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -582,8 +549,7 @@ class PointPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -604,8 +570,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -613,8 +578,7 @@ class StringPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap index bcb7abfc4404..84ae14b514f5 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap @@ -18,8 +18,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps( const PropsParserContext &context, @@ -40,8 +39,7 @@ ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps( arrayOfObjects(convertRawProp(context, rawProps, \\"arrayOfObjects\\", sourceProps.arrayOfObjects, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -62,8 +60,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps( const PropsParserContext &context, @@ -74,8 +71,7 @@ BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps( disabledNullable(convertRawProp(context, rawProps, \\"disabledNullable\\", sourceProps.disabledNullable, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -96,8 +92,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps( const PropsParserContext &context, @@ -107,8 +102,7 @@ ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps( tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -130,8 +124,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps( const PropsParserContext &context, @@ -141,8 +134,7 @@ DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps( marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -163,8 +155,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps( const PropsParserContext &context, @@ -174,8 +165,7 @@ EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -196,8 +186,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps( const PropsParserContext &context, @@ -208,8 +197,7 @@ EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps( intervals(convertRawProp(context, rawProps, \\"intervals\\", sourceProps.intervals, {EnumPropNativeComponentViewIntervals::Intervals0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -230,8 +218,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComponentViewProps( const PropsParserContext &context, @@ -241,8 +228,7 @@ EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComp disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -263,8 +249,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps( const PropsParserContext &context, @@ -274,8 +259,7 @@ EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -296,8 +280,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps( const PropsParserContext &context, @@ -313,8 +296,7 @@ FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps( blurRadiusNullable(convertRawProp(context, rawProps, \\"blurRadiusNullable\\", sourceProps.blurRadiusNullable, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -336,8 +318,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps( const PropsParserContext &context, @@ -347,8 +328,7 @@ ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps( thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -369,8 +349,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps( const PropsParserContext &context, @@ -382,8 +361,7 @@ IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps( progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -404,8 +382,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps( const PropsParserContext &context, @@ -415,8 +392,7 @@ InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps( title(convertRawProp(context, rawProps, \\"title\\", sourceProps.title, {\\"\\"})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -438,8 +414,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps( const PropsParserContext &context, @@ -449,8 +424,7 @@ MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps( mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -472,8 +446,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps( const PropsParserContext &context, @@ -486,8 +459,7 @@ MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -508,8 +480,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps( const PropsParserContext &context, @@ -519,8 +490,7 @@ NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -542,8 +512,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps( const PropsParserContext &context, @@ -555,8 +524,7 @@ ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps( objectPrimitiveRequiredProp(convertRawProp(context, rawProps, \\"objectPrimitiveRequiredProp\\", sourceProps.objectPrimitiveRequiredProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -577,8 +545,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { PointPropNativeComponentViewProps::PointPropNativeComponentViewProps( const PropsParserContext &context, @@ -588,8 +555,7 @@ PointPropNativeComponentViewProps::PointPropNativeComponentViewProps( startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -610,8 +576,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { StringPropNativeComponentViewProps::StringPropNativeComponentViewProps( const PropsParserContext &context, @@ -622,8 +587,7 @@ StringPropNativeComponentViewProps::StringPropNativeComponentViewProps( defaultValue(convertRawProp(context, rawProps, \\"defaultValue\\", sourceProps.defaultValue, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap index 83866b74863d..50a2d4dbae28 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap @@ -24,8 +24,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentViewSizesMask = uint32_t; @@ -83,7 +82,7 @@ static inline std::string toString(const ArrayPropsNativeComponentViewSizesMask return result; } struct ArrayPropsNativeComponentViewObjectStruct { - std::string prop; + std::string prop{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewObjectStruct &result) { @@ -110,8 +109,8 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu struct ArrayPropsNativeComponentViewArrayOfObjectsStruct { - Float prop1; - int prop2; + Float prop1{0.0}; + int prop2{0}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewArrayOfObjectsStruct &result) { @@ -161,8 +160,7 @@ class ArrayPropsNativeComponentViewProps final : public ViewProps { std::vector arrayOfObjects{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -183,8 +181,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentViewProps final : public ViewProps { public: @@ -197,8 +194,7 @@ class BooleanPropNativeComponentViewProps final : public ViewProps { bool disabledNullable{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -220,8 +216,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentViewProps final : public ViewProps { public: @@ -233,8 +228,7 @@ class ColorPropNativeComponentViewProps final : public ViewProps { SharedColor tintColor{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -256,8 +250,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentViewProps final : public ViewProps { public: @@ -269,8 +262,7 @@ class DimensionPropNativeComponentViewProps final : public ViewProps { YGValue marginBack{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -291,8 +283,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EdgeInsetsPropNativeComponentViewProps final : public ViewProps { public: @@ -304,8 +295,7 @@ class EdgeInsetsPropNativeComponentViewProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -326,8 +316,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class EnumPropNativeComponentViewAlignment { Top, Center, BottomRight }; @@ -388,8 +377,7 @@ class EnumPropNativeComponentViewProps final : public ViewProps { EnumPropNativeComponentViewIntervals intervals{EnumPropNativeComponentViewIntervals::Intervals0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -410,8 +398,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps { public: @@ -423,8 +410,7 @@ class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -445,8 +431,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventPropsNativeComponentViewProps final : public ViewProps { public: @@ -458,8 +443,7 @@ class EventPropsNativeComponentViewProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -480,8 +464,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropsNativeComponentViewProps final : public ViewProps { public: @@ -499,8 +482,7 @@ class FloatPropsNativeComponentViewProps final : public ViewProps { Float blurRadiusNullable{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -522,8 +504,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentViewProps final : public ViewProps { public: @@ -535,8 +516,7 @@ class ImagePropNativeComponentViewProps final : public ViewProps { ImageSource thumbImage{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -557,8 +537,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentViewProps final : public ViewProps { public: @@ -572,8 +551,7 @@ class IntegerPropNativeComponentViewProps final : public ViewProps { int progress3{10}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -594,8 +572,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyNativeComponentViewProps final : public ViewProps { public: @@ -607,8 +584,7 @@ class InterfaceOnlyNativeComponentViewProps final : public ViewProps { std::string title{\\"\\"}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -629,8 +605,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentViewProps final : public ViewProps { public: @@ -642,8 +617,7 @@ class MixedPropNativeComponentViewProps final : public ViewProps { folly::dynamic mixedProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -667,8 +641,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiNativePropNativeComponentViewProps final : public ViewProps { public: @@ -683,8 +656,7 @@ class MultiNativePropNativeComponentViewProps final : public ViewProps { Point point{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -705,8 +677,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsNativeComponentViewProps final : public ViewProps { public: @@ -718,8 +689,7 @@ class NoPropsNoEventsNativeComponentViewProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -746,8 +716,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class ObjectPropsNativeComponentStringEnumProp { Small, Large }; @@ -787,12 +756,12 @@ static inline std::string toString(const ObjectPropsNativeComponentIntEnumProp & } } struct ObjectPropsNativeComponentObjectPropStruct { - std::string stringProp; - bool booleanProp; - Float floatProp; - int intProp; - ObjectPropsNativeComponentStringEnumProp stringEnumProp; - ObjectPropsNativeComponentIntEnumProp intEnumProp; + std::string stringProp{\\"\\"}; + bool booleanProp{false}; + Float floatProp{0.0}; + int intProp{0}; + ObjectPropsNativeComponentStringEnumProp stringEnumProp{ObjectPropsNativeComponentStringEnumProp::Small}; + ObjectPropsNativeComponentIntEnumProp intEnumProp{ObjectPropsNativeComponentIntEnumProp::IntEnumProp0}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPropStruct &result) { @@ -829,7 +798,7 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectPropStr } struct ObjectPropsNativeComponentObjectArrayPropStruct { - std::vector array; + std::vector array{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectArrayPropStruct &result) { @@ -846,9 +815,9 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectArrayPr } struct ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct { - ImageSource image; - SharedColor color; - Point point; + ImageSource image{}; + SharedColor color{}; + Point point{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &result) { @@ -883,8 +852,7 @@ class ObjectPropsNativeComponentProps final : public ViewProps { ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -906,8 +874,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentViewProps final : public ViewProps { public: @@ -919,8 +886,7 @@ class PointPropNativeComponentViewProps final : public ViewProps { Point startPoint{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -941,8 +907,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropNativeComponentViewProps final : public ViewProps { public: @@ -955,8 +920,7 @@ class StringPropNativeComponentViewProps final : public ViewProps { std::string defaultValue{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap index 224a02cc2ca7..71b984b27fe4 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap @@ -14,13 +14,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ArrayPropsNativeComponentViewComponentName[] = \\"ArrayPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,13 +37,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char BooleanPropNativeComponentViewComponentName[] = \\"BooleanPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -64,13 +60,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ColorPropNativeComponentViewComponentName[] = \\"ColorPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -89,13 +83,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char DimensionPropNativeComponentViewComponentName[] = \\"DimensionPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -114,13 +106,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EdgeInsetsPropNativeComponentViewComponentName[] = \\"EdgeInsetsPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -139,13 +129,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EnumPropNativeComponentViewComponentName[] = \\"EnumPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -164,13 +152,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventNestedObjectPropsNativeComponentViewComponentName[] = \\"EventNestedObjectPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -189,13 +175,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventPropsNativeComponentViewComponentName[] = \\"EventPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -214,13 +198,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char FloatPropsNativeComponentViewComponentName[] = \\"FloatPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -239,13 +221,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ImagePropNativeComponentViewComponentName[] = \\"ImagePropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -264,13 +244,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char IntegerPropNativeComponentViewComponentName[] = \\"IntegerPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -289,13 +267,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -314,13 +290,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MixedPropNativeComponentViewComponentName[] = \\"MixedPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -339,13 +313,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MultiNativePropNativeComponentViewComponentName[] = \\"MultiNativePropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -364,13 +336,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char NoPropsNoEventsNativeComponentViewComponentName[] = \\"NoPropsNoEventsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -389,13 +359,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ObjectPropsNativeComponentComponentName[] = \\"ObjectPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -414,13 +382,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char PointPropNativeComponentViewComponentName[] = \\"PointPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -439,13 +405,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char StringPropNativeComponentViewComponentName[] = \\"StringPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap index d4d33cc34ad9..0d9839e13568 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap @@ -20,8 +20,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ArrayPropsNativeComponentViewComponentName[]; @@ -34,8 +33,7 @@ using ArrayPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentViewEventEmitter, ArrayPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -60,8 +58,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char BooleanPropNativeComponentViewComponentName[]; @@ -74,8 +71,7 @@ using BooleanPropNativeComponentViewShadowNode = ConcreteViewShadowNode< BooleanPropNativeComponentViewEventEmitter, BooleanPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -100,8 +96,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ColorPropNativeComponentViewComponentName[]; @@ -114,8 +109,7 @@ using ColorPropNativeComponentViewShadowNode = ConcreteViewShadowNode< ColorPropNativeComponentViewEventEmitter, ColorPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +134,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char DimensionPropNativeComponentViewComponentName[]; @@ -154,8 +147,7 @@ using DimensionPropNativeComponentViewShadowNode = ConcreteViewShadowNode< DimensionPropNativeComponentViewEventEmitter, DimensionPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -180,8 +172,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EdgeInsetsPropNativeComponentViewComponentName[]; @@ -194,8 +185,7 @@ using EdgeInsetsPropNativeComponentViewShadowNode = ConcreteViewShadowNode< EdgeInsetsPropNativeComponentViewEventEmitter, EdgeInsetsPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -220,8 +210,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EnumPropNativeComponentViewComponentName[]; @@ -234,8 +223,7 @@ using EnumPropNativeComponentViewShadowNode = ConcreteViewShadowNode< EnumPropNativeComponentViewEventEmitter, EnumPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -260,8 +248,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventNestedObjectPropsNativeComponentViewComponentName[]; @@ -274,8 +261,7 @@ using EventNestedObjectPropsNativeComponentViewShadowNode = ConcreteViewShadowNo EventNestedObjectPropsNativeComponentViewEventEmitter, EventNestedObjectPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -300,8 +286,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventPropsNativeComponentViewComponentName[]; @@ -314,8 +299,7 @@ using EventPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< EventPropsNativeComponentViewEventEmitter, EventPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -340,8 +324,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char FloatPropsNativeComponentViewComponentName[]; @@ -354,8 +337,7 @@ using FloatPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< FloatPropsNativeComponentViewEventEmitter, FloatPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -380,8 +362,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ImagePropNativeComponentViewComponentName[]; @@ -394,8 +375,7 @@ using ImagePropNativeComponentViewShadowNode = ConcreteViewShadowNode< ImagePropNativeComponentViewEventEmitter, ImagePropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -420,8 +400,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char IntegerPropNativeComponentViewComponentName[]; @@ -434,8 +413,7 @@ using IntegerPropNativeComponentViewShadowNode = ConcreteViewShadowNode< IntegerPropNativeComponentViewEventEmitter, IntegerPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -460,13 +438,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -491,8 +467,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MixedPropNativeComponentViewComponentName[]; @@ -505,8 +480,7 @@ using MixedPropNativeComponentViewShadowNode = ConcreteViewShadowNode< MixedPropNativeComponentViewEventEmitter, MixedPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -531,8 +505,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MultiNativePropNativeComponentViewComponentName[]; @@ -545,8 +518,7 @@ using MultiNativePropNativeComponentViewShadowNode = ConcreteViewShadowNode< MultiNativePropNativeComponentViewEventEmitter, MultiNativePropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -571,8 +543,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char NoPropsNoEventsNativeComponentViewComponentName[]; @@ -585,8 +556,7 @@ using NoPropsNoEventsNativeComponentViewShadowNode = ConcreteViewShadowNode< NoPropsNoEventsNativeComponentViewEventEmitter, NoPropsNoEventsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -611,8 +581,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ObjectPropsNativeComponentComponentName[]; @@ -625,8 +594,7 @@ using ObjectPropsNativeComponentShadowNode = ConcreteViewShadowNode< ObjectPropsNativeComponentEventEmitter, ObjectPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -651,8 +619,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char PointPropNativeComponentViewComponentName[]; @@ -665,8 +632,7 @@ using PointPropNativeComponentViewShadowNode = ConcreteViewShadowNode< PointPropNativeComponentViewEventEmitter, PointPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -691,8 +657,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char StringPropNativeComponentViewComponentName[]; @@ -705,8 +670,7 @@ using StringPropNativeComponentViewShadowNode = ConcreteViewShadowNode< StringPropNativeComponentViewEventEmitter, StringPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap index fcfb25d973f4..d74bb73cc85e 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap @@ -294,7 +294,7 @@ export const __INTERNAL_VIEW_CONFIG = { uiViewClassName: 'EventPropsNativeComponentView', bubblingEventTypes: { - paperDirectName: { + topPaperDirectName: { phasedRegistrationNames: { captured: 'onChangeCapture', bubbled: 'onChange', @@ -308,7 +308,7 @@ export const __INTERNAL_VIEW_CONFIG = { }, }, - paperBubblingName: { + topPaperBubblingName: { phasedRegistrationNames: { captured: 'onEventBubblingWithPaperNameCapture', bubbled: 'onEventBubblingWithPaperName', @@ -321,11 +321,11 @@ export const __INTERNAL_VIEW_CONFIG = { registrationName: 'onEventDirect', }, - paperDirectName: { + topPaperDirectName: { registrationName: 'onEventDirectWithPaperName', }, - paperBubblingName: { + topPaperBubblingName: { registrationName: 'onOrientationChange', }, }, diff --git a/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleCpp-test.js b/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleCpp-test.js index 662a8fd0ddb3..b105c40966a6 100644 --- a/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleCpp-test.js +++ b/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleCpp-test.js @@ -11,12 +11,12 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); +import type {SchemaType} from '../../../src/CodegenSchema'; + const generator = require('../../../src/generators/modules/GenerateModuleCpp'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); -import type {SchemaType} from '../../../src/CodegenSchema'; - const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/modules`; const parser = new FlowParser(); diff --git a/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleH-test.js b/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleH-test.js index 51b6c8e37b67..ae9364936ecd 100644 --- a/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleH-test.js +++ b/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleH-test.js @@ -11,12 +11,12 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); +import type {SchemaType} from '../../../src/CodegenSchema'; + const generator = require('../../../src/generators/modules/GenerateModuleH'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); -import type {SchemaType} from '../../../src/CodegenSchema'; - const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/modules`; const parser = new FlowParser(); diff --git a/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleObjCpp-test.js b/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleObjCpp-test.js index 9e0434286073..607afcf771bf 100644 --- a/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleObjCpp-test.js +++ b/packages/react-native-codegen/e2e/__tests__/modules/GenerateModuleObjCpp-test.js @@ -11,12 +11,12 @@ 'use strict'; -const {FlowParser} = require('../../../src/parsers/flow/parser'); +import type {SchemaType} from '../../../src/CodegenSchema'; + const generator = require('../../../src/generators/modules/GenerateModuleObjCpp'); +const {FlowParser} = require('../../../src/parsers/flow/parser'); const fs = require('fs'); -import type {SchemaType} from '../../../src/CodegenSchema'; - const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/modules`; const parser = new FlowParser(); diff --git a/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleCpp-test.js.snap index 34993ada7eac..21946d645994 100644 --- a/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleCpp-test.js.snap @@ -12,8 +12,7 @@ exports[`GenerateModuleCpp can generate a header file NativeModule specs with as #include \\"RNCodegenModuleFixturesJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value __hostFunction_NativeArrayTurboModuleCxxSpecJSI_getArray(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getArray( @@ -818,8 +817,7 @@ NativeStringTurboModuleCxxSpecJSI::NativeStringTurboModuleCxxSpecJSI(std::shared } -} // namespace react -} // namespace facebook +} // namespace facebook::react " `; @@ -835,8 +833,7 @@ exports[`GenerateModuleCpp can generate an implementation file NativeModule spec #include \\"RNCodegenModuleFixturesJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value __hostFunction_NativeArrayTurboModuleCxxSpecJSI_getArray(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getArray( @@ -1641,7 +1638,6 @@ NativeStringTurboModuleCxxSpecJSI::NativeStringTurboModuleCxxSpecJSI(std::shared } -} // namespace react -} // namespace facebook +} // namespace facebook::react " `; diff --git a/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleH-test.js.snap index fb9a915712a9..5473654dc10c 100644 --- a/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleH-test.js.snap @@ -15,8 +15,7 @@ exports[`GenerateModuleH can generate a header file NativeModule specs 1`] = ` #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JSI_EXPORT NativeArrayTurboModuleCxxSpecJSI : public TurboModule { @@ -42,7 +41,7 @@ public: protected: NativeArrayTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeArrayTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeArrayTurboModuleCxxSpecJSI { @@ -105,7 +104,7 @@ public: protected: NativeBooleanTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeBooleanTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeBooleanTurboModuleCxxSpecJSI { @@ -160,7 +159,7 @@ public: protected: NativeCallbackTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeCallbackTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeCallbackTurboModuleCxxSpecJSI { @@ -195,7 +194,7 @@ private: #pragma mark - NativeEnumTurboModuleStatusRegularEnum -enum NativeEnumTurboModuleStatusRegularEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusRegularEnum { Active, Paused, Off }; template <> struct Bridging { @@ -227,7 +226,7 @@ struct Bridging { #pragma mark - NativeEnumTurboModuleStatusStrEnum -enum NativeEnumTurboModuleStatusStrEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusStrEnum { Active, Paused, Off }; template <> struct Bridging { @@ -259,7 +258,7 @@ struct Bridging { #pragma mark - NativeEnumTurboModuleStatusNumEnum -enum NativeEnumTurboModuleStatusNumEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusNumEnum { Active, Paused, Off }; template <> struct Bridging { @@ -291,7 +290,7 @@ struct Bridging { #pragma mark - NativeEnumTurboModuleStatusFractionEnum -enum NativeEnumTurboModuleStatusFractionEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusFractionEnum { Active, Paused, Off }; template <> struct Bridging { @@ -324,7 +323,7 @@ struct Bridging { #pragma mark - NativeEnumTurboModuleBaseStateType template -struct NativeEnumTurboModuleBaseStateType { +struct [[deprecated(\\"Use NativeEnumTurboModuleStateType instead.\\")]] NativeEnumTurboModuleBaseStateType { P0 state; bool operator==(const NativeEnumTurboModuleBaseStateType &other) const { return state == other.state; @@ -332,7 +331,7 @@ struct NativeEnumTurboModuleBaseStateType { }; template -struct NativeEnumTurboModuleBaseStateTypeBridging { +struct [[deprecated(\\"Use NativeEnumTurboModuleStateTypeBridging instead.\\")]] NativeEnumTurboModuleBaseStateTypeBridging { static NativeEnumTurboModuleBaseStateType fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -363,7 +362,7 @@ struct NativeEnumTurboModuleBaseStateTypeBridging { #pragma mark - NativeEnumTurboModuleBaseStateTypeWithEnums template -struct NativeEnumTurboModuleBaseStateTypeWithEnums { +struct [[deprecated(\\"Use NativeEnumTurboModuleStateTypeWithEnums instead.\\")]] NativeEnumTurboModuleBaseStateTypeWithEnums { P0 state; P1 regular; P2 str; @@ -375,7 +374,7 @@ struct NativeEnumTurboModuleBaseStateTypeWithEnums { }; template -struct NativeEnumTurboModuleBaseStateTypeWithEnumsBridging { +struct [[deprecated(\\"Use NativeEnumTurboModuleStateTypeWithEnumsBridging instead.\\")]] NativeEnumTurboModuleBaseStateTypeWithEnumsBridging { static NativeEnumTurboModuleBaseStateTypeWithEnums fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -402,11 +401,11 @@ struct NativeEnumTurboModuleBaseStateTypeWithEnumsBridging { return bridging::toJs(rt, value); } - static int numToJs(jsi::Runtime &rt, P3 value) { + static jsi::Value numToJs(jsi::Runtime &rt, P3 value) { return bridging::toJs(rt, value); } - static double fractionToJs(jsi::Runtime &rt, P4 value) { + static jsi::Value fractionToJs(jsi::Runtime &rt, P4 value) { return bridging::toJs(rt, value); } #endif @@ -425,6 +424,115 @@ struct NativeEnumTurboModuleBaseStateTypeWithEnumsBridging { } }; + +#pragma mark - NativeEnumTurboModuleStateType + +template +struct NativeEnumTurboModuleStateType { + P0 state; + bool operator==(const NativeEnumTurboModuleStateType &other) const { + return state == other.state; + } +}; + +template +struct NativeEnumTurboModuleStateTypeBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String stateToJs(jsi::Runtime &rt, decltype(types.state) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"state\\", bridging::toJs(rt, value.state, jsInvoker)); + return result; + } +}; + + + +#pragma mark - NativeEnumTurboModuleStateTypeWithEnums + +template +struct NativeEnumTurboModuleStateTypeWithEnums { + P0 state; + P1 regular; + P2 str; + P3 num; + P4 fraction; + bool operator==(const NativeEnumTurboModuleStateTypeWithEnums &other) const { + return state == other.state && regular == other.regular && str == other.str && num == other.num && fraction == other.fraction; + } +}; + +template +struct NativeEnumTurboModuleStateTypeWithEnumsBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"regular\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"str\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"num\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"fraction\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String stateToJs(jsi::Runtime &rt, decltype(types.state) value) { + return bridging::toJs(rt, value); + } + + static jsi::String regularToJs(jsi::Runtime &rt, decltype(types.regular) value) { + return bridging::toJs(rt, value); + } + + static jsi::String strToJs(jsi::Runtime &rt, decltype(types.str) value) { + return bridging::toJs(rt, value); + } + + static jsi::Value numToJs(jsi::Runtime &rt, decltype(types.num) value) { + return bridging::toJs(rt, value); + } + + static jsi::Value fractionToJs(jsi::Runtime &rt, decltype(types.fraction) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"state\\", bridging::toJs(rt, value.state, jsInvoker)); + result.setProperty(rt, \\"regular\\", bridging::toJs(rt, value.regular, jsInvoker)); + result.setProperty(rt, \\"str\\", bridging::toJs(rt, value.str, jsInvoker)); + result.setProperty(rt, \\"num\\", bridging::toJs(rt, value.num, jsInvoker)); + result.setProperty(rt, \\"fraction\\", bridging::toJs(rt, value.fraction, jsInvoker)); + return result; + } +}; + class JSI_EXPORT NativeEnumTurboModuleCxxSpecJSI : public TurboModule { protected: NativeEnumTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); @@ -432,9 +540,9 @@ protected: public: virtual jsi::String getStatusRegular(jsi::Runtime &rt, jsi::Object statusProp) = 0; virtual jsi::String getStatusStr(jsi::Runtime &rt, jsi::Object statusProp) = 0; - virtual int getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) = 0; - virtual double getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) = 0; - virtual jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, int c, double d) = 0; + virtual jsi::Value getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) = 0; + virtual jsi::Value getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) = 0; + virtual jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, jsi::Value c, jsi::Value d) = 0; virtual jsi::Object getStateTypeWithEnums(jsi::Runtime &rt, jsi::Object paramOfTypeWithEnums) = 0; }; @@ -451,7 +559,7 @@ public: protected: NativeEnumTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeEnumTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeEnumTurboModuleCxxSpecJSI { @@ -475,23 +583,23 @@ private: return bridging::callFromJs( rt, &T::getStatusStr, jsInvoker_, instance_, std::move(statusProp)); } - int getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) override { + jsi::Value getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) override { static_assert( bridging::getParameterCount(&T::getStatusNum) == 2, \\"Expected getStatusNum(...) to have 2 parameters\\"); - return bridging::callFromJs( + return bridging::callFromJs( rt, &T::getStatusNum, jsInvoker_, instance_, std::move(statusProp)); } - double getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) override { + jsi::Value getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) override { static_assert( bridging::getParameterCount(&T::getStatusFraction) == 2, \\"Expected getStatusFraction(...) to have 2 parameters\\"); - return bridging::callFromJs( + return bridging::callFromJs( rt, &T::getStatusFraction, jsInvoker_, instance_, std::move(statusProp)); } - jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, int c, double d) override { + jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, jsi::Value c, jsi::Value d) override { static_assert( bridging::getParameterCount(&T::getStateType) == 5, \\"Expected getStateType(...) to have 5 parameters\\"); @@ -542,7 +650,7 @@ public: protected: NativeNullableTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeNullableTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeNullableTurboModuleCxxSpecJSI { @@ -629,7 +737,7 @@ public: protected: NativeNumberTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeNumberTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeNumberTurboModuleCxxSpecJSI { @@ -687,7 +795,7 @@ public: protected: NativeObjectTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeObjectTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeObjectTurboModuleCxxSpecJSI { @@ -765,7 +873,7 @@ public: protected: NativeOptionalObjectTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeOptionalObjectTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeOptionalObjectTurboModuleCxxSpecJSI { @@ -794,7 +902,7 @@ private: #pragma mark - NativePartialAnnotationTurboModuleBaseSomeObj template -struct NativePartialAnnotationTurboModuleBaseSomeObj { +struct [[deprecated(\\"Use NativePartialAnnotationTurboModuleSomeObj instead.\\")]] NativePartialAnnotationTurboModuleBaseSomeObj { P0 a; P1 b; bool operator==(const NativePartialAnnotationTurboModuleBaseSomeObj &other) const { @@ -803,7 +911,7 @@ struct NativePartialAnnotationTurboModuleBaseSomeObj { }; template -struct NativePartialAnnotationTurboModuleBaseSomeObjBridging { +struct [[deprecated(\\"Use NativePartialAnnotationTurboModuleSomeObjBridging instead.\\")]] NativePartialAnnotationTurboModuleBaseSomeObjBridging { static NativePartialAnnotationTurboModuleBaseSomeObj fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -837,6 +945,55 @@ struct NativePartialAnnotationTurboModuleBaseSomeObjBridging { } }; + +#pragma mark - NativePartialAnnotationTurboModuleSomeObj + +template +struct NativePartialAnnotationTurboModuleSomeObj { + P0 a; + P1 b; + bool operator==(const NativePartialAnnotationTurboModuleSomeObj &other) const { + return a == other.a && b == other.b; + } +}; + +template +struct NativePartialAnnotationTurboModuleSomeObjBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"a\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"b\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String aToJs(jsi::Runtime &rt, decltype(types.a) value) { + return bridging::toJs(rt, value); + } + + static bool bToJs(jsi::Runtime &rt, decltype(types.b) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"a\\", bridging::toJs(rt, value.a, jsInvoker)); + if (value.b) { + result.setProperty(rt, \\"b\\", bridging::toJs(rt, value.b.value(), jsInvoker)); + } + return result; + } +}; + class JSI_EXPORT NativePartialAnnotationTurboModuleCxxSpecJSI : public TurboModule { protected: NativePartialAnnotationTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); @@ -861,7 +1018,7 @@ public: protected: NativePartialAnnotationTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativePartialAnnotationTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativePartialAnnotationTurboModuleCxxSpecJSI { @@ -932,7 +1089,7 @@ public: protected: NativePromiseTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativePromiseTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativePromiseTurboModuleCxxSpecJSI { @@ -969,7 +1126,7 @@ private: #pragma mark - SampleTurboModuleBaseAnimal template -struct SampleTurboModuleBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleAnimal instead.\\")]] SampleTurboModuleBaseAnimal { P0 name; bool operator==(const SampleTurboModuleBaseAnimal &other) const { return name == other.name; @@ -977,7 +1134,7 @@ struct SampleTurboModuleBaseAnimal { }; template -struct SampleTurboModuleBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleAnimalBridging instead.\\")]] SampleTurboModuleBaseAnimalBridging { static SampleTurboModuleBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -1003,6 +1160,46 @@ struct SampleTurboModuleBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleAnimal + +template +struct SampleTurboModuleAnimal { + P0 name; + bool operator==(const SampleTurboModuleAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name, jsInvoker)); + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); @@ -1036,7 +1233,7 @@ public: protected: NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleCxxSpecJSI { @@ -1161,7 +1358,7 @@ private: #pragma mark - SampleTurboModuleArraysBaseAnimal template -struct SampleTurboModuleArraysBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleArraysAnimal instead.\\")]] SampleTurboModuleArraysBaseAnimal { P0 name; bool operator==(const SampleTurboModuleArraysBaseAnimal &other) const { return name == other.name; @@ -1169,7 +1366,7 @@ struct SampleTurboModuleArraysBaseAnimal { }; template -struct SampleTurboModuleArraysBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleArraysAnimalBridging instead.\\")]] SampleTurboModuleArraysBaseAnimalBridging { static SampleTurboModuleArraysBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -1195,6 +1392,46 @@ struct SampleTurboModuleArraysBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleArraysAnimal + +template +struct SampleTurboModuleArraysAnimal { + P0 name; + bool operator==(const SampleTurboModuleArraysAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleArraysAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name, jsInvoker)); + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleArraysCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleArraysCxxSpecJSI(std::shared_ptr jsInvoker); @@ -1228,7 +1465,7 @@ public: protected: NativeSampleTurboModuleArraysCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleArraysCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleArraysCxxSpecJSI { @@ -1353,7 +1590,7 @@ private: #pragma mark - SampleTurboModuleNullableBaseAnimal template -struct SampleTurboModuleNullableBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleNullableAnimal instead.\\")]] SampleTurboModuleNullableBaseAnimal { P0 name; bool operator==(const SampleTurboModuleNullableBaseAnimal &other) const { return name == other.name; @@ -1361,7 +1598,7 @@ struct SampleTurboModuleNullableBaseAnimal { }; template -struct SampleTurboModuleNullableBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleNullableAnimalBridging instead.\\")]] SampleTurboModuleNullableBaseAnimalBridging { static SampleTurboModuleNullableBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -1387,6 +1624,46 @@ struct SampleTurboModuleNullableBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleNullableAnimal + +template +struct SampleTurboModuleNullableAnimal { + P0 name; + bool operator==(const SampleTurboModuleNullableAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleNullableAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static std::optional nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name, jsInvoker)); + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleNullableCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleNullableCxxSpecJSI(std::shared_ptr jsInvoker); @@ -1420,7 +1697,7 @@ public: protected: NativeSampleTurboModuleNullableCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleNullableCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleNullableCxxSpecJSI { @@ -1545,7 +1822,7 @@ private: #pragma mark - SampleTurboModuleNullableAndOptionalBaseAnimal template -struct SampleTurboModuleNullableAndOptionalBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleNullableAndOptionalAnimal instead.\\")]] SampleTurboModuleNullableAndOptionalBaseAnimal { P0 name; bool operator==(const SampleTurboModuleNullableAndOptionalBaseAnimal &other) const { return name == other.name; @@ -1553,7 +1830,7 @@ struct SampleTurboModuleNullableAndOptionalBaseAnimal { }; template -struct SampleTurboModuleNullableAndOptionalBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleNullableAndOptionalAnimalBridging instead.\\")]] SampleTurboModuleNullableAndOptionalBaseAnimalBridging { static SampleTurboModuleNullableAndOptionalBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -1581,6 +1858,48 @@ struct SampleTurboModuleNullableAndOptionalBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleNullableAndOptionalAnimal + +template +struct SampleTurboModuleNullableAndOptionalAnimal { + P0 name; + bool operator==(const SampleTurboModuleNullableAndOptionalAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleNullableAndOptionalAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static std::optional nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + if (value.name) { + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name.value(), jsInvoker)); + } + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleNullableAndOptionalCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleNullableAndOptionalCxxSpecJSI(std::shared_ptr jsInvoker); @@ -1614,7 +1933,7 @@ public: protected: NativeSampleTurboModuleNullableAndOptionalCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleNullableAndOptionalCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleNullableAndOptionalCxxSpecJSI { @@ -1739,7 +2058,7 @@ private: #pragma mark - SampleTurboModuleOptionalBaseAnimal template -struct SampleTurboModuleOptionalBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleOptionalAnimal instead.\\")]] SampleTurboModuleOptionalBaseAnimal { P0 name; bool operator==(const SampleTurboModuleOptionalBaseAnimal &other) const { return name == other.name; @@ -1747,7 +2066,7 @@ struct SampleTurboModuleOptionalBaseAnimal { }; template -struct SampleTurboModuleOptionalBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleOptionalAnimalBridging instead.\\")]] SampleTurboModuleOptionalBaseAnimalBridging { static SampleTurboModuleOptionalBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -1775,6 +2094,48 @@ struct SampleTurboModuleOptionalBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleOptionalAnimal + +template +struct SampleTurboModuleOptionalAnimal { + P0 name; + bool operator==(const SampleTurboModuleOptionalAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleOptionalAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + if (value.name) { + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name.value(), jsInvoker)); + } + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleOptionalCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleOptionalCxxSpecJSI(std::shared_ptr jsInvoker); @@ -1808,7 +2169,7 @@ public: protected: NativeSampleTurboModuleOptionalCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleOptionalCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleOptionalCxxSpecJSI { @@ -1951,7 +2312,7 @@ public: protected: NativeStringTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeStringTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeStringTurboModuleCxxSpecJSI { @@ -1983,8 +2344,7 @@ private: Delegate delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react " `; @@ -2003,8 +2363,7 @@ exports[`GenerateModuleH can generate a header file NativeModule specs with assu #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JSI_EXPORT NativeArrayTurboModuleCxxSpecJSI : public TurboModule { @@ -2030,7 +2389,7 @@ public: protected: NativeArrayTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeArrayTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeArrayTurboModuleCxxSpecJSI { @@ -2093,7 +2452,7 @@ public: protected: NativeBooleanTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeBooleanTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeBooleanTurboModuleCxxSpecJSI { @@ -2148,7 +2507,7 @@ public: protected: NativeCallbackTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeCallbackTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeCallbackTurboModuleCxxSpecJSI { @@ -2183,7 +2542,7 @@ private: #pragma mark - NativeEnumTurboModuleStatusRegularEnum -enum NativeEnumTurboModuleStatusRegularEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusRegularEnum { Active, Paused, Off }; template <> struct Bridging { @@ -2215,7 +2574,7 @@ struct Bridging { #pragma mark - NativeEnumTurboModuleStatusStrEnum -enum NativeEnumTurboModuleStatusStrEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusStrEnum { Active, Paused, Off }; template <> struct Bridging { @@ -2247,7 +2606,7 @@ struct Bridging { #pragma mark - NativeEnumTurboModuleStatusNumEnum -enum NativeEnumTurboModuleStatusNumEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusNumEnum { Active, Paused, Off }; template <> struct Bridging { @@ -2279,7 +2638,7 @@ struct Bridging { #pragma mark - NativeEnumTurboModuleStatusFractionEnum -enum NativeEnumTurboModuleStatusFractionEnum { Active, Paused, Off }; +enum class NativeEnumTurboModuleStatusFractionEnum { Active, Paused, Off }; template <> struct Bridging { @@ -2296,49 +2655,156 @@ struct Bridging { } } - static jsi::Value toJs(jsi::Runtime &rt, NativeEnumTurboModuleStatusFractionEnum value) { - if (value == NativeEnumTurboModuleStatusFractionEnum::Active) { - return bridging::toJs(rt, 0.2f); - } else if (value == NativeEnumTurboModuleStatusFractionEnum::Paused) { - return bridging::toJs(rt, 0.1f); - } else if (value == NativeEnumTurboModuleStatusFractionEnum::Off) { - return bridging::toJs(rt, 0f); - } else { - throw jsi::JSError(rt, \\"No appropriate enum member found for enum value\\"); - } + static jsi::Value toJs(jsi::Runtime &rt, NativeEnumTurboModuleStatusFractionEnum value) { + if (value == NativeEnumTurboModuleStatusFractionEnum::Active) { + return bridging::toJs(rt, 0.2f); + } else if (value == NativeEnumTurboModuleStatusFractionEnum::Paused) { + return bridging::toJs(rt, 0.1f); + } else if (value == NativeEnumTurboModuleStatusFractionEnum::Off) { + return bridging::toJs(rt, 0f); + } else { + throw jsi::JSError(rt, \\"No appropriate enum member found for enum value\\"); + } + } +}; + +#pragma mark - NativeEnumTurboModuleBaseStateType + +template +struct [[deprecated(\\"Use NativeEnumTurboModuleStateType instead.\\")]] NativeEnumTurboModuleBaseStateType { + P0 state; + bool operator==(const NativeEnumTurboModuleBaseStateType &other) const { + return state == other.state; + } +}; + +template +struct [[deprecated(\\"Use NativeEnumTurboModuleStateTypeBridging instead.\\")]] NativeEnumTurboModuleBaseStateTypeBridging { + static NativeEnumTurboModuleBaseStateType fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + NativeEnumTurboModuleBaseStateType result{ + bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String stateToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const NativeEnumTurboModuleBaseStateType &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"state\\", bridging::toJs(rt, value.state, jsInvoker)); + return result; + } +}; + + + +#pragma mark - NativeEnumTurboModuleBaseStateTypeWithEnums + +template +struct [[deprecated(\\"Use NativeEnumTurboModuleStateTypeWithEnums instead.\\")]] NativeEnumTurboModuleBaseStateTypeWithEnums { + P0 state; + P1 regular; + P2 str; + P3 num; + P4 fraction; + bool operator==(const NativeEnumTurboModuleBaseStateTypeWithEnums &other) const { + return state == other.state && regular == other.regular && str == other.str && num == other.num && fraction == other.fraction; + } +}; + +template +struct [[deprecated(\\"Use NativeEnumTurboModuleStateTypeWithEnumsBridging instead.\\")]] NativeEnumTurboModuleBaseStateTypeWithEnumsBridging { + static NativeEnumTurboModuleBaseStateTypeWithEnums fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + NativeEnumTurboModuleBaseStateTypeWithEnums result{ + bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"regular\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"str\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"num\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"fraction\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String stateToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } + + static jsi::String regularToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } + + static jsi::String strToJs(jsi::Runtime &rt, P2 value) { + return bridging::toJs(rt, value); + } + + static jsi::Value numToJs(jsi::Runtime &rt, P3 value) { + return bridging::toJs(rt, value); + } + + static jsi::Value fractionToJs(jsi::Runtime &rt, P4 value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const NativeEnumTurboModuleBaseStateTypeWithEnums &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"state\\", bridging::toJs(rt, value.state, jsInvoker)); + result.setProperty(rt, \\"regular\\", bridging::toJs(rt, value.regular, jsInvoker)); + result.setProperty(rt, \\"str\\", bridging::toJs(rt, value.str, jsInvoker)); + result.setProperty(rt, \\"num\\", bridging::toJs(rt, value.num, jsInvoker)); + result.setProperty(rt, \\"fraction\\", bridging::toJs(rt, value.fraction, jsInvoker)); + return result; } }; - -#pragma mark - NativeEnumTurboModuleBaseStateType + + +#pragma mark - NativeEnumTurboModuleStateType template -struct NativeEnumTurboModuleBaseStateType { +struct NativeEnumTurboModuleStateType { P0 state; - bool operator==(const NativeEnumTurboModuleBaseStateType &other) const { + bool operator==(const NativeEnumTurboModuleStateType &other) const { return state == other.state; } }; -template -struct NativeEnumTurboModuleBaseStateTypeBridging { - static NativeEnumTurboModuleBaseStateType fromJs( +template +struct NativeEnumTurboModuleStateTypeBridging { + static T types; + + static T fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - NativeEnumTurboModuleBaseStateType result{ - bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker)}; + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker)}; return result; } #ifdef DEBUG - static jsi::String stateToJs(jsi::Runtime &rt, P0 value) { + static jsi::String stateToJs(jsi::Runtime &rt, decltype(types.state) value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const NativeEnumTurboModuleBaseStateType &value, + const T &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); result.setProperty(rt, \\"state\\", bridging::toJs(rt, value.state, jsInvoker)); @@ -2348,60 +2814,62 @@ struct NativeEnumTurboModuleBaseStateTypeBridging { -#pragma mark - NativeEnumTurboModuleBaseStateTypeWithEnums +#pragma mark - NativeEnumTurboModuleStateTypeWithEnums template -struct NativeEnumTurboModuleBaseStateTypeWithEnums { +struct NativeEnumTurboModuleStateTypeWithEnums { P0 state; P1 regular; P2 str; P3 num; P4 fraction; - bool operator==(const NativeEnumTurboModuleBaseStateTypeWithEnums &other) const { + bool operator==(const NativeEnumTurboModuleStateTypeWithEnums &other) const { return state == other.state && regular == other.regular && str == other.str && num == other.num && fraction == other.fraction; } }; -template -struct NativeEnumTurboModuleBaseStateTypeWithEnumsBridging { - static NativeEnumTurboModuleBaseStateTypeWithEnums fromJs( +template +struct NativeEnumTurboModuleStateTypeWithEnumsBridging { + static T types; + + static T fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - NativeEnumTurboModuleBaseStateTypeWithEnums result{ - bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"regular\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"str\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"num\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"fraction\\"), jsInvoker)}; + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"state\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"regular\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"str\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"num\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"fraction\\"), jsInvoker)}; return result; } #ifdef DEBUG - static jsi::String stateToJs(jsi::Runtime &rt, P0 value) { + static jsi::String stateToJs(jsi::Runtime &rt, decltype(types.state) value) { return bridging::toJs(rt, value); } - static jsi::String regularToJs(jsi::Runtime &rt, P1 value) { + static jsi::String regularToJs(jsi::Runtime &rt, decltype(types.regular) value) { return bridging::toJs(rt, value); } - static jsi::String strToJs(jsi::Runtime &rt, P2 value) { + static jsi::String strToJs(jsi::Runtime &rt, decltype(types.str) value) { return bridging::toJs(rt, value); } - static int numToJs(jsi::Runtime &rt, P3 value) { + static jsi::Value numToJs(jsi::Runtime &rt, decltype(types.num) value) { return bridging::toJs(rt, value); } - static double fractionToJs(jsi::Runtime &rt, P4 value) { + static jsi::Value fractionToJs(jsi::Runtime &rt, decltype(types.fraction) value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const NativeEnumTurboModuleBaseStateTypeWithEnums &value, + const T &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); result.setProperty(rt, \\"state\\", bridging::toJs(rt, value.state, jsInvoker)); @@ -2420,9 +2888,9 @@ protected: public: virtual jsi::String getStatusRegular(jsi::Runtime &rt, jsi::Object statusProp) = 0; virtual jsi::String getStatusStr(jsi::Runtime &rt, jsi::Object statusProp) = 0; - virtual int getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) = 0; - virtual double getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) = 0; - virtual jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, int c, double d) = 0; + virtual jsi::Value getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) = 0; + virtual jsi::Value getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) = 0; + virtual jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, jsi::Value c, jsi::Value d) = 0; virtual jsi::Object getStateTypeWithEnums(jsi::Runtime &rt, jsi::Object paramOfTypeWithEnums) = 0; }; @@ -2439,7 +2907,7 @@ public: protected: NativeEnumTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeEnumTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeEnumTurboModuleCxxSpecJSI { @@ -2463,23 +2931,23 @@ private: return bridging::callFromJs( rt, &T::getStatusStr, jsInvoker_, instance_, std::move(statusProp)); } - int getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) override { + jsi::Value getStatusNum(jsi::Runtime &rt, jsi::Object statusProp) override { static_assert( bridging::getParameterCount(&T::getStatusNum) == 2, \\"Expected getStatusNum(...) to have 2 parameters\\"); - return bridging::callFromJs( + return bridging::callFromJs( rt, &T::getStatusNum, jsInvoker_, instance_, std::move(statusProp)); } - double getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) override { + jsi::Value getStatusFraction(jsi::Runtime &rt, jsi::Object statusProp) override { static_assert( bridging::getParameterCount(&T::getStatusFraction) == 2, \\"Expected getStatusFraction(...) to have 2 parameters\\"); - return bridging::callFromJs( + return bridging::callFromJs( rt, &T::getStatusFraction, jsInvoker_, instance_, std::move(statusProp)); } - jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, int c, double d) override { + jsi::Object getStateType(jsi::Runtime &rt, jsi::String a, jsi::String b, jsi::Value c, jsi::Value d) override { static_assert( bridging::getParameterCount(&T::getStateType) == 5, \\"Expected getStateType(...) to have 5 parameters\\"); @@ -2530,7 +2998,7 @@ public: protected: NativeNullableTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeNullableTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeNullableTurboModuleCxxSpecJSI { @@ -2617,7 +3085,7 @@ public: protected: NativeNumberTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeNumberTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeNumberTurboModuleCxxSpecJSI { @@ -2675,7 +3143,7 @@ public: protected: NativeObjectTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeObjectTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeObjectTurboModuleCxxSpecJSI { @@ -2753,7 +3221,7 @@ public: protected: NativeOptionalObjectTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeOptionalObjectTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeOptionalObjectTurboModuleCxxSpecJSI { @@ -2782,7 +3250,7 @@ private: #pragma mark - NativePartialAnnotationTurboModuleBaseSomeObj template -struct NativePartialAnnotationTurboModuleBaseSomeObj { +struct [[deprecated(\\"Use NativePartialAnnotationTurboModuleSomeObj instead.\\")]] NativePartialAnnotationTurboModuleBaseSomeObj { P0 a; P1 b; bool operator==(const NativePartialAnnotationTurboModuleBaseSomeObj &other) const { @@ -2791,7 +3259,7 @@ struct NativePartialAnnotationTurboModuleBaseSomeObj { }; template -struct NativePartialAnnotationTurboModuleBaseSomeObjBridging { +struct [[deprecated(\\"Use NativePartialAnnotationTurboModuleSomeObjBridging instead.\\")]] NativePartialAnnotationTurboModuleBaseSomeObjBridging { static NativePartialAnnotationTurboModuleBaseSomeObj fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -2825,6 +3293,55 @@ struct NativePartialAnnotationTurboModuleBaseSomeObjBridging { } }; + +#pragma mark - NativePartialAnnotationTurboModuleSomeObj + +template +struct NativePartialAnnotationTurboModuleSomeObj { + P0 a; + P1 b; + bool operator==(const NativePartialAnnotationTurboModuleSomeObj &other) const { + return a == other.a && b == other.b; + } +}; + +template +struct NativePartialAnnotationTurboModuleSomeObjBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"a\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"b\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String aToJs(jsi::Runtime &rt, decltype(types.a) value) { + return bridging::toJs(rt, value); + } + + static bool bToJs(jsi::Runtime &rt, decltype(types.b) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"a\\", bridging::toJs(rt, value.a, jsInvoker)); + if (value.b) { + result.setProperty(rt, \\"b\\", bridging::toJs(rt, value.b.value(), jsInvoker)); + } + return result; + } +}; + class JSI_EXPORT NativePartialAnnotationTurboModuleCxxSpecJSI : public TurboModule { protected: NativePartialAnnotationTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); @@ -2849,7 +3366,7 @@ public: protected: NativePartialAnnotationTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativePartialAnnotationTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativePartialAnnotationTurboModuleCxxSpecJSI { @@ -2920,7 +3437,7 @@ public: protected: NativePromiseTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativePromiseTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativePromiseTurboModuleCxxSpecJSI { @@ -2957,7 +3474,7 @@ private: #pragma mark - SampleTurboModuleBaseAnimal template -struct SampleTurboModuleBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleAnimal instead.\\")]] SampleTurboModuleBaseAnimal { P0 name; bool operator==(const SampleTurboModuleBaseAnimal &other) const { return name == other.name; @@ -2965,7 +3482,7 @@ struct SampleTurboModuleBaseAnimal { }; template -struct SampleTurboModuleBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleAnimalBridging instead.\\")]] SampleTurboModuleBaseAnimalBridging { static SampleTurboModuleBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -2991,6 +3508,46 @@ struct SampleTurboModuleBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleAnimal + +template +struct SampleTurboModuleAnimal { + P0 name; + bool operator==(const SampleTurboModuleAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name, jsInvoker)); + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); @@ -3024,7 +3581,7 @@ public: protected: NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleCxxSpecJSI { @@ -3149,7 +3706,7 @@ private: #pragma mark - SampleTurboModuleArraysBaseAnimal template -struct SampleTurboModuleArraysBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleArraysAnimal instead.\\")]] SampleTurboModuleArraysBaseAnimal { P0 name; bool operator==(const SampleTurboModuleArraysBaseAnimal &other) const { return name == other.name; @@ -3157,7 +3714,7 @@ struct SampleTurboModuleArraysBaseAnimal { }; template -struct SampleTurboModuleArraysBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleArraysAnimalBridging instead.\\")]] SampleTurboModuleArraysBaseAnimalBridging { static SampleTurboModuleArraysBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -3183,6 +3740,46 @@ struct SampleTurboModuleArraysBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleArraysAnimal + +template +struct SampleTurboModuleArraysAnimal { + P0 name; + bool operator==(const SampleTurboModuleArraysAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleArraysAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name, jsInvoker)); + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleArraysCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleArraysCxxSpecJSI(std::shared_ptr jsInvoker); @@ -3216,7 +3813,7 @@ public: protected: NativeSampleTurboModuleArraysCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleArraysCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleArraysCxxSpecJSI { @@ -3341,7 +3938,7 @@ private: #pragma mark - SampleTurboModuleNullableBaseAnimal template -struct SampleTurboModuleNullableBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleNullableAnimal instead.\\")]] SampleTurboModuleNullableBaseAnimal { P0 name; bool operator==(const SampleTurboModuleNullableBaseAnimal &other) const { return name == other.name; @@ -3349,7 +3946,7 @@ struct SampleTurboModuleNullableBaseAnimal { }; template -struct SampleTurboModuleNullableBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleNullableAnimalBridging instead.\\")]] SampleTurboModuleNullableBaseAnimalBridging { static SampleTurboModuleNullableBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -3375,6 +3972,46 @@ struct SampleTurboModuleNullableBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleNullableAnimal + +template +struct SampleTurboModuleNullableAnimal { + P0 name; + bool operator==(const SampleTurboModuleNullableAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleNullableAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static std::optional nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name, jsInvoker)); + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleNullableCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleNullableCxxSpecJSI(std::shared_ptr jsInvoker); @@ -3408,7 +4045,7 @@ public: protected: NativeSampleTurboModuleNullableCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleNullableCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleNullableCxxSpecJSI { @@ -3533,7 +4170,7 @@ private: #pragma mark - SampleTurboModuleNullableAndOptionalBaseAnimal template -struct SampleTurboModuleNullableAndOptionalBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleNullableAndOptionalAnimal instead.\\")]] SampleTurboModuleNullableAndOptionalBaseAnimal { P0 name; bool operator==(const SampleTurboModuleNullableAndOptionalBaseAnimal &other) const { return name == other.name; @@ -3541,7 +4178,7 @@ struct SampleTurboModuleNullableAndOptionalBaseAnimal { }; template -struct SampleTurboModuleNullableAndOptionalBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleNullableAndOptionalAnimalBridging instead.\\")]] SampleTurboModuleNullableAndOptionalBaseAnimalBridging { static SampleTurboModuleNullableAndOptionalBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -3569,6 +4206,48 @@ struct SampleTurboModuleNullableAndOptionalBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleNullableAndOptionalAnimal + +template +struct SampleTurboModuleNullableAndOptionalAnimal { + P0 name; + bool operator==(const SampleTurboModuleNullableAndOptionalAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleNullableAndOptionalAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static std::optional nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + if (value.name) { + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name.value(), jsInvoker)); + } + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleNullableAndOptionalCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleNullableAndOptionalCxxSpecJSI(std::shared_ptr jsInvoker); @@ -3602,7 +4281,7 @@ public: protected: NativeSampleTurboModuleNullableAndOptionalCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleNullableAndOptionalCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleNullableAndOptionalCxxSpecJSI { @@ -3727,7 +4406,7 @@ private: #pragma mark - SampleTurboModuleOptionalBaseAnimal template -struct SampleTurboModuleOptionalBaseAnimal { +struct [[deprecated(\\"Use SampleTurboModuleOptionalAnimal instead.\\")]] SampleTurboModuleOptionalBaseAnimal { P0 name; bool operator==(const SampleTurboModuleOptionalBaseAnimal &other) const { return name == other.name; @@ -3735,7 +4414,7 @@ struct SampleTurboModuleOptionalBaseAnimal { }; template -struct SampleTurboModuleOptionalBaseAnimalBridging { +struct [[deprecated(\\"Use SampleTurboModuleOptionalAnimalBridging instead.\\")]] SampleTurboModuleOptionalBaseAnimalBridging { static SampleTurboModuleOptionalBaseAnimal fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -3763,6 +4442,48 @@ struct SampleTurboModuleOptionalBaseAnimalBridging { } }; + +#pragma mark - SampleTurboModuleOptionalAnimal + +template +struct SampleTurboModuleOptionalAnimal { + P0 name; + bool operator==(const SampleTurboModuleOptionalAnimal &other) const { + return name == other.name; + } +}; + +template +struct SampleTurboModuleOptionalAnimalBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + if (value.name) { + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name.value(), jsInvoker)); + } + return result; + } +}; + class JSI_EXPORT NativeSampleTurboModuleOptionalCxxSpecJSI : public TurboModule { protected: NativeSampleTurboModuleOptionalCxxSpecJSI(std::shared_ptr jsInvoker); @@ -3796,7 +4517,7 @@ public: protected: NativeSampleTurboModuleOptionalCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleOptionalCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleOptionalCxxSpecJSI { @@ -3939,7 +4660,7 @@ public: protected: NativeStringTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeStringTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeStringTurboModuleCxxSpecJSI { @@ -3971,7 +4692,6 @@ private: Delegate delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react " `; diff --git a/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleObjCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleObjCpp-test.js.snap index a1238aa502e1..a59e8e0a1d0a 100644 --- a/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleObjCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/modules/__snapshots__/GenerateModuleObjCpp-test.js.snap @@ -37,17 +37,15 @@ exports[`GenerateModuleObjCpp can generate a header file NativeModule specs 1`] b:(NSArray *)b; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeArrayTurboModule' - */ - class JSI_EXPORT NativeArrayTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeArrayTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeArrayTurboModule' + */ + class JSI_EXPORT NativeArrayTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeArrayTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeBooleanTurboModuleSpec @@ -55,17 +53,15 @@ namespace facebook { - (NSNumber *)getBooleanWithAlias:(BOOL)arg; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeBooleanTurboModule' - */ - class JSI_EXPORT NativeBooleanTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeBooleanTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeBooleanTurboModule' + */ + class JSI_EXPORT NativeBooleanTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeBooleanTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeCallbackTurboModuleSpec @@ -73,17 +69,15 @@ namespace facebook { - (void)getValueWithCallbackWithAlias:(RCTResponseSenderBlock)c; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeCallbackTurboModule' - */ - class JSI_EXPORT NativeCallbackTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeCallbackTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeCallbackTurboModule' + */ + class JSI_EXPORT NativeCallbackTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeCallbackTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeEnumTurboModule { struct StateType { @@ -131,17 +125,15 @@ namespace JS { - (NSDictionary *)getStateTypeWithEnums:(JS::NativeEnumTurboModule::StateTypeWithEnums &)paramOfTypeWithEnums; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeEnumTurboModule' - */ - class JSI_EXPORT NativeEnumTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeEnumTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeEnumTurboModule' + */ + class JSI_EXPORT NativeEnumTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeEnumTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeNullableTurboModuleSpec @@ -154,17 +146,15 @@ namespace facebook { reject:(RCTPromiseRejectBlock)reject; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeNullableTurboModule' - */ - class JSI_EXPORT NativeNullableTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeNullableTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeNullableTurboModule' + */ + class JSI_EXPORT NativeNullableTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeNullableTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeNumberTurboModuleSpec @@ -172,17 +162,15 @@ namespace facebook { - (NSNumber *)getNumberWithAlias:(double)arg; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeNumberTurboModule' - */ - class JSI_EXPORT NativeNumberTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeNumberTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeNumberTurboModule' + */ + class JSI_EXPORT NativeNumberTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeNumberTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeObjectTurboModule { struct SpecDifficultObjectAE { @@ -343,17 +331,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeObjectTurboModule' - */ - class JSI_EXPORT NativeObjectTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeObjectTurboModule' + */ + class JSI_EXPORT NativeObjectTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeOptionalObjectTurboModule { struct ConstantsEEE { @@ -448,7 +434,7 @@ namespace JS { struct Builder { struct Input { std::optional D; - id _Nullable A; + id _Nullable A; std::optional E; NSString *F; }; @@ -477,17 +463,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeOptionalObjectTurboModule' - */ - class JSI_EXPORT NativeOptionalObjectTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeOptionalObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeOptionalObjectTurboModule' + */ + class JSI_EXPORT NativeOptionalObjectTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeOptionalObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativePartialAnnotationTurboModule { struct SpecGetSomeObjFromPartialSomeObjValue { @@ -545,17 +529,15 @@ namespace JS { value2:(JS::NativePartialAnnotationTurboModule::SpecGetPartialPartialValue2 &)value2; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativePartialAnnotationTurboModule' - */ - class JSI_EXPORT NativePartialAnnotationTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativePartialAnnotationTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativePartialAnnotationTurboModule' + */ + class JSI_EXPORT NativePartialAnnotationTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativePartialAnnotationTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativePromiseTurboModuleSpec @@ -567,17 +549,15 @@ namespace facebook { reject:(RCTPromiseRejectBlock)reject; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativePromiseTurboModule' - */ - class JSI_EXPORT NativePromiseTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativePromiseTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativePromiseTurboModule' + */ + class JSI_EXPORT NativePromiseTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativePromiseTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModule { struct SpecGetObjectShapeArg { @@ -659,17 +639,15 @@ getValuegetValuegetValuegetValuegetValuey:(NSString *)getValuegetValuegetValuege - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule' - */ - class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule' + */ + class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleArrays { struct ConstantsIdElement { @@ -749,17 +727,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleArrays' - */ - class JSI_EXPORT NativeSampleTurboModuleArraysSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleArraysSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleArrays' + */ + class JSI_EXPORT NativeSampleTurboModuleArraysSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleArraysSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleNullable { struct SpecGetObjectShapeArg { @@ -841,17 +817,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleNullable' - */ - class JSI_EXPORT NativeSampleTurboModuleNullableSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleNullableSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleNullable' + */ + class JSI_EXPORT NativeSampleTurboModuleNullableSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleNullableSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleNullableAndOptional { struct SpecGetObjectShapeArg { @@ -933,17 +907,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleNullableAndOptional' - */ - class JSI_EXPORT NativeSampleTurboModuleNullableAndOptionalSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleNullableAndOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleNullableAndOptional' + */ + class JSI_EXPORT NativeSampleTurboModuleNullableAndOptionalSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleNullableAndOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleOptional { struct SpecGetObjectShapeArg { @@ -1025,17 +997,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleOptional' - */ - class JSI_EXPORT NativeSampleTurboModuleOptionalSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleOptional' + */ + class JSI_EXPORT NativeSampleTurboModuleOptionalSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeStringTurboModuleSpec @@ -1043,17 +1013,15 @@ namespace facebook { - (NSString *)getStringWithAlias:(NSString *)arg; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeStringTurboModule' - */ - class JSI_EXPORT NativeStringTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeStringTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeStringTurboModule' + */ + class JSI_EXPORT NativeStringTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeStringTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @@ -1415,17 +1383,15 @@ NS_ASSUME_NONNULL_BEGIN b:(NSArray *)b; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeArrayTurboModule' - */ - class JSI_EXPORT NativeArrayTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeArrayTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeArrayTurboModule' + */ + class JSI_EXPORT NativeArrayTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeArrayTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeBooleanTurboModuleSpec @@ -1433,17 +1399,15 @@ namespace facebook { - (NSNumber *)getBooleanWithAlias:(BOOL)arg; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeBooleanTurboModule' - */ - class JSI_EXPORT NativeBooleanTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeBooleanTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeBooleanTurboModule' + */ + class JSI_EXPORT NativeBooleanTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeBooleanTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeCallbackTurboModuleSpec @@ -1451,17 +1415,15 @@ namespace facebook { - (void)getValueWithCallbackWithAlias:(RCTResponseSenderBlock)c; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeCallbackTurboModule' - */ - class JSI_EXPORT NativeCallbackTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeCallbackTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeCallbackTurboModule' + */ + class JSI_EXPORT NativeCallbackTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeCallbackTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeEnumTurboModule { struct StateType { @@ -1509,17 +1471,15 @@ namespace JS { - (NSDictionary *)getStateTypeWithEnums:(JS::NativeEnumTurboModule::StateTypeWithEnums &)paramOfTypeWithEnums; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeEnumTurboModule' - */ - class JSI_EXPORT NativeEnumTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeEnumTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeEnumTurboModule' + */ + class JSI_EXPORT NativeEnumTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeEnumTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeNullableTurboModuleSpec @@ -1532,17 +1492,15 @@ namespace facebook { reject:(RCTPromiseRejectBlock)reject; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeNullableTurboModule' - */ - class JSI_EXPORT NativeNullableTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeNullableTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeNullableTurboModule' + */ + class JSI_EXPORT NativeNullableTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeNullableTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeNumberTurboModuleSpec @@ -1550,17 +1508,15 @@ namespace facebook { - (NSNumber *)getNumberWithAlias:(double)arg; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeNumberTurboModule' - */ - class JSI_EXPORT NativeNumberTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeNumberTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeNumberTurboModule' + */ + class JSI_EXPORT NativeNumberTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeNumberTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeObjectTurboModule { struct SpecDifficultObjectAE { @@ -1721,17 +1677,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeObjectTurboModule' - */ - class JSI_EXPORT NativeObjectTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeObjectTurboModule' + */ + class JSI_EXPORT NativeObjectTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeOptionalObjectTurboModule { struct ConstantsEEE { @@ -1826,7 +1780,7 @@ namespace JS { struct Builder { struct Input { std::optional D; - id _Nullable A; + id _Nullable A; std::optional E; NSString *F; }; @@ -1855,17 +1809,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeOptionalObjectTurboModule' - */ - class JSI_EXPORT NativeOptionalObjectTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeOptionalObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeOptionalObjectTurboModule' + */ + class JSI_EXPORT NativeOptionalObjectTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeOptionalObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativePartialAnnotationTurboModule { struct SpecGetSomeObjFromPartialSomeObjValue { @@ -1923,17 +1875,15 @@ namespace JS { value2:(JS::NativePartialAnnotationTurboModule::SpecGetPartialPartialValue2 &)value2; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativePartialAnnotationTurboModule' - */ - class JSI_EXPORT NativePartialAnnotationTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativePartialAnnotationTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativePartialAnnotationTurboModule' + */ + class JSI_EXPORT NativePartialAnnotationTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativePartialAnnotationTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativePromiseTurboModuleSpec @@ -1945,17 +1895,15 @@ namespace facebook { reject:(RCTPromiseRejectBlock)reject; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativePromiseTurboModule' - */ - class JSI_EXPORT NativePromiseTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativePromiseTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativePromiseTurboModule' + */ + class JSI_EXPORT NativePromiseTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativePromiseTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModule { struct SpecGetObjectShapeArg { @@ -2037,17 +1985,15 @@ getValuegetValuegetValuegetValuegetValuey:(NSString *)getValuegetValuegetValuege - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule' - */ - class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule' + */ + class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleArrays { struct ConstantsIdElement { @@ -2127,17 +2073,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleArrays' - */ - class JSI_EXPORT NativeSampleTurboModuleArraysSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleArraysSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleArrays' + */ + class JSI_EXPORT NativeSampleTurboModuleArraysSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleArraysSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleNullable { struct SpecGetObjectShapeArg { @@ -2219,17 +2163,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleNullable' - */ - class JSI_EXPORT NativeSampleTurboModuleNullableSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleNullableSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleNullable' + */ + class JSI_EXPORT NativeSampleTurboModuleNullableSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleNullableSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleNullableAndOptional { struct SpecGetObjectShapeArg { @@ -2311,17 +2253,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleNullableAndOptional' - */ - class JSI_EXPORT NativeSampleTurboModuleNullableAndOptionalSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleNullableAndOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleNullableAndOptional' + */ + class JSI_EXPORT NativeSampleTurboModuleNullableAndOptionalSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleNullableAndOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeSampleTurboModuleOptional { struct SpecGetObjectShapeArg { @@ -2403,17 +2343,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModuleOptional' - */ - class JSI_EXPORT NativeSampleTurboModuleOptionalSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModuleOptional' + */ + class JSI_EXPORT NativeSampleTurboModuleOptionalSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeStringTurboModuleSpec @@ -2421,17 +2359,15 @@ namespace facebook { - (NSString *)getStringWithAlias:(NSString *)arg; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeStringTurboModule' - */ - class JSI_EXPORT NativeStringTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeStringTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeStringTurboModule' + */ + class JSI_EXPORT NativeStringTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeStringTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @@ -2772,9 +2708,8 @@ exports[`GenerateModuleObjCpp can generate an implementation file NativeModule s #import \\"RNCodegenModuleFixtures.h\\" -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeArrayTurboModuleSpecJSI_getArray(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, ArrayKind, \\"getArray\\", @selector(getArray:), args, count); } @@ -2787,9 +2722,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ArrayKind, \\"getArrayWithAlias\\", @selector(getArrayWithAlias:b:), args, count); } - NativeArrayTurboModuleSpecJSI::NativeArrayTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeArrayTurboModuleSpecJSI::NativeArrayTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getArray\\"] = MethodMetadata {1, __hostFunction_NativeArrayTurboModuleSpecJSI_getArray}; @@ -2798,13 +2733,11 @@ namespace facebook { methodMap_[\\"getArrayWithAlias\\"] = MethodMetadata {2, __hostFunction_NativeArrayTurboModuleSpecJSI_getArrayWithAlias}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeBooleanTurboModuleSpecJSI_getBoolean(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, BooleanKind, \\"getBoolean\\", @selector(getBoolean:), args, count); } @@ -2813,21 +2746,19 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, BooleanKind, \\"getBooleanWithAlias\\", @selector(getBooleanWithAlias:), args, count); } - NativeBooleanTurboModuleSpecJSI::NativeBooleanTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeBooleanTurboModuleSpecJSI::NativeBooleanTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getBoolean\\"] = MethodMetadata {1, __hostFunction_NativeBooleanTurboModuleSpecJSI_getBoolean}; methodMap_[\\"getBooleanWithAlias\\"] = MethodMetadata {1, __hostFunction_NativeBooleanTurboModuleSpecJSI_getBooleanWithAlias}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeCallbackTurboModuleSpecJSI_getValueWithCallback(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"getValueWithCallback\\", @selector(getValueWithCallback:), args, count); } @@ -2836,17 +2767,16 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"getValueWithCallbackWithAlias\\", @selector(getValueWithCallbackWithAlias:), args, count); } - NativeCallbackTurboModuleSpecJSI::NativeCallbackTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeCallbackTurboModuleSpecJSI::NativeCallbackTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getValueWithCallback\\"] = MethodMetadata {1, __hostFunction_NativeCallbackTurboModuleSpecJSI_getValueWithCallback}; methodMap_[\\"getValueWithCallbackWithAlias\\"] = MethodMetadata {1, __hostFunction_NativeCallbackTurboModuleSpecJSI_getValueWithCallbackWithAlias}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativeEnumTurboModule_StateType) + (RCTManagedPointer *)JS_NativeEnumTurboModule_StateType:(id)json { @@ -2859,9 +2789,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeEnumTurboModuleSpecJSI_getStatusRegular(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, StringKind, \\"getStatusRegular\\", @selector(getStatusRegular:), args, count); } @@ -2886,9 +2815,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getStateTypeWithEnums\\", @selector(getStateTypeWithEnums:), args, count); } - NativeEnumTurboModuleSpecJSI::NativeEnumTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeEnumTurboModuleSpecJSI::NativeEnumTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getStatusRegular\\"] = MethodMetadata {1, __hostFunction_NativeEnumTurboModuleSpecJSI_getStatusRegular}; setMethodArgConversionSelector(@\\"getStatusRegular\\", 0, @\\"JS_NativeEnumTurboModule_StateType:\\"); @@ -2906,13 +2835,11 @@ namespace facebook { methodMap_[\\"getStateTypeWithEnums\\"] = MethodMetadata {1, __hostFunction_NativeEnumTurboModuleSpecJSI_getStateTypeWithEnums}; setMethodArgConversionSelector(@\\"getStateTypeWithEnums\\", 0, @\\"JS_NativeEnumTurboModule_StateTypeWithEnums:\\"); - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeNullableTurboModuleSpecJSI_getBool(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, BooleanKind, \\"getBool\\", @selector(getBool:), args, count); } @@ -2937,9 +2864,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, PromiseKind, \\"getValueWithPromise\\", @selector(getValueWithPromise:reject:), args, count); } - NativeNullableTurboModuleSpecJSI::NativeNullableTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeNullableTurboModuleSpecJSI::NativeNullableTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getBool\\"] = MethodMetadata {1, __hostFunction_NativeNullableTurboModuleSpecJSI_getBool}; @@ -2957,13 +2884,11 @@ namespace facebook { methodMap_[\\"getValueWithPromise\\"] = MethodMetadata {0, __hostFunction_NativeNullableTurboModuleSpecJSI_getValueWithPromise}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeNumberTurboModuleSpecJSI_getNumber(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, NumberKind, \\"getNumber\\", @selector(getNumber:), args, count); } @@ -2972,17 +2897,16 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, NumberKind, \\"getNumberWithAlias\\", @selector(getNumberWithAlias:), args, count); } - NativeNumberTurboModuleSpecJSI::NativeNumberTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeNumberTurboModuleSpecJSI::NativeNumberTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getNumber\\"] = MethodMetadata {1, __hostFunction_NativeNumberTurboModuleSpecJSI_getNumber}; methodMap_[\\"getNumberWithAlias\\"] = MethodMetadata {1, __hostFunction_NativeNumberTurboModuleSpecJSI_getNumberWithAlias}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativeObjectTurboModule_SpecDifficultObjectAE) + (RCTManagedPointer *)JS_NativeObjectTurboModule_SpecDifficultObjectAE:(id)json { @@ -2995,9 +2919,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeObjectTurboModuleSpecJSI_getGenericObject(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getGenericObject\\", @selector(getGenericObject:), args, count); } @@ -3018,9 +2941,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeObjectTurboModuleSpecJSI::NativeObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeObjectTurboModuleSpecJSI::NativeObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getGenericObject\\"] = MethodMetadata {1, __hostFunction_NativeObjectTurboModuleSpecJSI_getGenericObject}; @@ -3035,25 +2958,22 @@ namespace facebook { methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeObjectTurboModuleSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeOptionalObjectTurboModuleSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeOptionalObjectTurboModuleSpecJSI::NativeOptionalObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeOptionalObjectTurboModuleSpecJSI::NativeOptionalObjectTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeOptionalObjectTurboModuleSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativePartialAnnotationTurboModule_SpecGetSomeObjFromPartialSomeObjValue) + (RCTManagedPointer *)JS_NativePartialAnnotationTurboModule_SpecGetSomeObjFromPartialSomeObjValue:(id)json { @@ -3072,9 +2992,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativePartialAnnotationTurboModuleSpecJSI_getSomeObj(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getSomeObj\\", @selector(getSomeObj), args, count); } @@ -3091,9 +3010,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getPartialPartial\\", @selector(getPartialPartial:value2:), args, count); } - NativePartialAnnotationTurboModuleSpecJSI::NativePartialAnnotationTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativePartialAnnotationTurboModuleSpecJSI::NativePartialAnnotationTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getSomeObj\\"] = MethodMetadata {0, __hostFunction_NativePartialAnnotationTurboModuleSpecJSI_getSomeObj}; @@ -3106,13 +3025,11 @@ namespace facebook { methodMap_[\\"getPartialPartial\\"] = MethodMetadata {2, __hostFunction_NativePartialAnnotationTurboModuleSpecJSI_getPartialPartial}; setMethodArgConversionSelector(@\\"getPartialPartial\\", 0, @\\"JS_NativePartialAnnotationTurboModule_SpecGetPartialPartialValue1:\\"); setMethodArgConversionSelector(@\\"getPartialPartial\\", 1, @\\"JS_NativePartialAnnotationTurboModule_SpecGetPartialPartialValue2:\\"); - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativePromiseTurboModuleSpecJSI_getValueWithPromise(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, PromiseKind, \\"getValueWithPromise\\", @selector(getValueWithPromise:resolve:reject:), args, count); } @@ -3121,17 +3038,16 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, PromiseKind, \\"getValueWithPromiseWithAlias\\", @selector(getValueWithPromiseWithAlias:resolve:reject:), args, count); } - NativePromiseTurboModuleSpecJSI::NativePromiseTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativePromiseTurboModuleSpecJSI::NativePromiseTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getValueWithPromise\\"] = MethodMetadata {1, __hostFunction_NativePromiseTurboModuleSpecJSI_getValueWithPromise}; methodMap_[\\"getValueWithPromiseWithAlias\\"] = MethodMetadata {1, __hostFunction_NativePromiseTurboModuleSpecJSI_getValueWithPromiseWithAlias}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativeSampleTurboModule_SpecGetObjectShapeArg) + (RCTManagedPointer *)JS_NativeSampleTurboModule_SpecGetObjectShapeArg:(id)json { @@ -3144,9 +3060,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } @@ -3199,9 +3114,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc}; @@ -3240,13 +3155,11 @@ namespace facebook { methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleArraysSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } @@ -3299,9 +3212,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeSampleTurboModuleArraysSpecJSI::NativeSampleTurboModuleArraysSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleArraysSpecJSI::NativeSampleTurboModuleArraysSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleArraysSpecJSI_voidFunc}; @@ -3340,9 +3253,8 @@ namespace facebook { methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleArraysSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativeSampleTurboModuleNullable_SpecGetObjectShapeArg) + (RCTManagedPointer *)JS_NativeSampleTurboModuleNullable_SpecGetObjectShapeArg:(id)json { @@ -3355,9 +3267,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleNullableSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } @@ -3410,9 +3321,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeSampleTurboModuleNullableSpecJSI::NativeSampleTurboModuleNullableSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleNullableSpecJSI::NativeSampleTurboModuleNullableSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleNullableSpecJSI_voidFunc}; @@ -3451,9 +3362,8 @@ namespace facebook { methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleNullableSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativeSampleTurboModuleNullableAndOptional_SpecGetObjectShapeArg) + (RCTManagedPointer *)JS_NativeSampleTurboModuleNullableAndOptional_SpecGetObjectShapeArg:(id)json { @@ -3466,9 +3376,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleNullableAndOptionalSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } @@ -3521,9 +3430,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeSampleTurboModuleNullableAndOptionalSpecJSI::NativeSampleTurboModuleNullableAndOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleNullableAndOptionalSpecJSI::NativeSampleTurboModuleNullableAndOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleNullableAndOptionalSpecJSI_voidFunc}; @@ -3562,9 +3471,8 @@ namespace facebook { methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleNullableAndOptionalSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativeSampleTurboModuleOptional_SpecGetObjectShapeArg) + (RCTManagedPointer *)JS_NativeSampleTurboModuleOptional_SpecGetObjectShapeArg:(id)json { @@ -3577,9 +3485,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleOptionalSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } @@ -3632,9 +3539,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeSampleTurboModuleOptionalSpecJSI::NativeSampleTurboModuleOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleOptionalSpecJSI::NativeSampleTurboModuleOptionalSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleOptionalSpecJSI_voidFunc}; @@ -3673,13 +3580,11 @@ namespace facebook { methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleOptionalSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeStringTurboModuleSpecJSI_getString(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, StringKind, \\"getString\\", @selector(getString:), args, count); } @@ -3688,16 +3593,15 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, StringKind, \\"getStringWithAlias\\", @selector(getStringWithAlias:), args, count); } - NativeStringTurboModuleSpecJSI::NativeStringTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeStringTurboModuleSpecJSI::NativeStringTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getString\\"] = MethodMetadata {1, __hostFunction_NativeStringTurboModuleSpecJSI_getString}; methodMap_[\\"getStringWithAlias\\"] = MethodMetadata {1, __hostFunction_NativeStringTurboModuleSpecJSI_getStringWithAlias}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react " `; diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 45f23b160b78..d2044a518ac4 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.74.88", "description": "Code generation tools for React Native", "license": "MIT", "repository": { @@ -30,9 +30,13 @@ ], "dependencies": { "@babel/parser": "^7.20.0", - "flow-parser": "^0.206.0", + "glob": "^7.1.1", + "hermes-parser": "0.19.1", + "invariant": "^2.2.4", "jscodeshift": "^0.14.0", - "nullthrows": "^1.1.1" + "mkdirp": "^0.5.1", + "nullthrows": "^1.1.1", + "yargs": "^17.6.2" }, "devDependencies": { "@babel/core": "^7.20.0", @@ -46,10 +50,8 @@ "@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", + "hermes-estree": "0.19.1", "micromatch": "^4.0.4", - "mkdirp": "^0.5.1", "prettier": "2.8.8", "rimraf": "^3.0.2" }, diff --git a/packages/react-native-codegen/scripts/oss/build.sh b/packages/react-native-codegen/scripts/oss/build.sh index 215911a34588..84daf5dea68f 100755 --- a/packages/react-native-codegen/scripts/oss/build.sh +++ b/packages/react-native-codegen/scripts/oss/build.sh @@ -29,9 +29,10 @@ EDEN_SAFE_MV="mv" if [ -x "$(command -v eden)" ]; then pushd "$THIS_DIR" - # Detect if we are in an EdenFS checkout + # Detect if we are in an EdenFS checkout, but be sure to use /bin/cp + # incase users have GNU coreutils installed which is incompatible with -X if [[ "$OSTYPE" == "darwin"* ]] && eden info; then - EDEN_SAFE_MV="cp -R -X" + EDEN_SAFE_MV="/bin/cp -R -X" fi popd >/dev/null @@ -60,7 +61,7 @@ else if [ "$OSTYPE" = "msys" ] || [ "$OSTYPE" = "cygwin" ]; then tar cf - --exclude='*.lock' "$CODEGEN_DIR" | (cd "$TMP_DIR" && tar xvf - ); else - cp -R "$CODEGEN_DIR/." "$TMP_DIR"; + /bin/cp -R "$CODEGEN_DIR/." "$TMP_DIR"; fi pushd "$TMP_DIR" >/dev/null diff --git a/packages/react-native-codegen/src/CodegenSchema.d.ts b/packages/react-native-codegen/src/CodegenSchema.d.ts index 3482172d9900..306067eb5a56 100644 --- a/packages/react-native-codegen/src/CodegenSchema.d.ts +++ b/packages/react-native-codegen/src/CodegenSchema.d.ts @@ -199,7 +199,16 @@ export type CommandParamTypeAnnotation = | Int32TypeAnnotation | DoubleTypeAnnotation | FloatTypeAnnotation - | StringTypeAnnotation; + | StringTypeAnnotation + | { + readonly type: 'ArrayTypeAnnotation'; + readonly elementType: + | Int32TypeAnnotation + | DoubleTypeAnnotation + | FloatTypeAnnotation + | BooleanTypeAnnotation + | StringTypeAnnotation + }; export interface ReservedTypeAnnotation { readonly type: 'ReservedTypeAnnotation'; diff --git a/packages/react-native-codegen/src/CodegenSchema.js b/packages/react-native-codegen/src/CodegenSchema.js index 1708e8939b4e..d286d3a79fdc 100644 --- a/packages/react-native-codegen/src/CodegenSchema.js +++ b/packages/react-native-codegen/src/CodegenSchema.js @@ -213,7 +213,8 @@ export type CommandParamTypeAnnotation = | Int32TypeAnnotation | DoubleTypeAnnotation | FloatTypeAnnotation - | StringTypeAnnotation; + | StringTypeAnnotation + | ArrayTypeAnnotation; export type ReservedTypeAnnotation = $ReadOnly<{ type: 'ReservedTypeAnnotation', diff --git a/packages/react-native-codegen/src/SchemaValidator.js b/packages/react-native-codegen/src/SchemaValidator.js index 87ded8848457..dc59d9cd77b2 100644 --- a/packages/react-native-codegen/src/SchemaValidator.js +++ b/packages/react-native-codegen/src/SchemaValidator.js @@ -10,10 +10,10 @@ 'use strict'; -const nullthrows = require('nullthrows'); - import type {SchemaType} from './CodegenSchema'; +const nullthrows = require('nullthrows'); + function getErrors(schema: SchemaType): $ReadOnlyArray { const errors = new Set(); diff --git a/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js b/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js index 4d18b80c4d8d..a983168311f8 100644 --- a/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js +++ b/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js @@ -11,11 +11,11 @@ 'use strict'; +import type {SchemaType} from '../CodegenSchema.js'; + const fixtures = require('../generators/components/__test_fixtures__/fixtures.js'); const schemaValidator = require('../SchemaValidator.js'); -import type {SchemaType} from '../CodegenSchema.js'; - const simpleProp = { name: 'disabled', optional: true, diff --git a/packages/react-native-codegen/src/cli/combine/__tests__/combine-utils-test.js b/packages/react-native-codegen/src/cli/combine/__tests__/combine-utils-test.js index 84acd9ee5562..7f523b758229 100644 --- a/packages/react-native-codegen/src/cli/combine/__tests__/combine-utils-test.js +++ b/packages/react-native-codegen/src/cli/combine/__tests__/combine-utils-test.js @@ -11,67 +11,7 @@ 'use-strict'; -const {parseArgs, filterJSFile} = require('../combine-utils.js'); - -describe('parseArgs', () => { - const nodeBin = 'node'; - const combineApp = 'app'; - const schemaJson = 'schema.json'; - const specFile1 = 'NativeSpec.js'; - const specFile2 = 'SpecNativeComponent.js'; - - describe('when no platform provided', () => { - it('returns null platform, schema and fileList', () => { - const {platform, outfile, fileList} = parseArgs([ - nodeBin, - combineApp, - schemaJson, - specFile1, - specFile2, - ]); - - expect(platform).toBeNull(); - expect(outfile).toBe(schemaJson); - expect(fileList).toStrictEqual([specFile1, specFile2]); - }); - }); - - describe('when platform passed with --platform', () => { - it('returns the platform, the schema and the fileList', () => { - const {platform, outfile, fileList} = parseArgs([ - nodeBin, - combineApp, - '--platform', - 'ios', - schemaJson, - specFile1, - specFile2, - ]); - - expect(platform).toBe('ios'); - expect(outfile).toBe(schemaJson); - expect(fileList).toStrictEqual([specFile1, specFile2]); - }); - }); - - describe('when platform passed with -p', () => { - it('returns the platform, the schema and the fileList', () => { - const {platform, outfile, fileList} = parseArgs([ - nodeBin, - combineApp, - '-p', - 'android', - schemaJson, - specFile1, - specFile2, - ]); - - expect(platform).toBe('android'); - expect(outfile).toBe(schemaJson); - expect(fileList).toStrictEqual([specFile1, specFile2]); - }); - }); -}); +const {filterJSFile} = require('../combine-utils.js'); describe('filterJSFile', () => { describe('When the file is not a Spec file', () => { @@ -103,9 +43,19 @@ describe('filterJSFile', () => { }); describe('When the file is NativeSampleTurboModule', () => { - it('returns false', () => { + it('returns true', () => { const file = 'NativeSampleTurboModule.js'; const result = filterJSFile(file); + expect(result).toBeTruthy(); + }); + + it('returns false, when excluded', () => { + const file = 'NativeSampleTurboModule.js'; + const result = filterJSFile( + file, + null, + new RegExp('NativeSampleTurboModule'), + ); expect(result).toBeFalsy(); }); }); diff --git a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js index 6aeff3418a2a..f2c98912efeb 100644 --- a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js +++ b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js @@ -11,45 +11,29 @@ '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 { + combineSchemasInFileListAndWriteToFile, +} = require('./combine-js-to-schema'); +const yargs = require('yargs'); -const {platform, outfile, fileList} = parseArgs(process.argv); +const argv = yargs + .option('p', { + alias: 'platform', + }) + .option('e', { + alias: 'exclude', + }) + .parseSync(); -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 [outfile, ...fileList] = argv._; +const platform: ?string = argv.platform; +const exclude: string = argv.exclude; +const excludeRegExp: ?RegExp = + exclude != null && exclude !== '' ? new RegExp(exclude) : null; -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); -} +combineSchemasInFileListAndWriteToFile( + fileList, + platform != null ? platform.toLowerCase() : platform, + outfile, + excludeRegExp, +); diff --git a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js index a2dcef55c43d..108edf99d813 100644 --- a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js +++ b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js @@ -13,7 +13,9 @@ import type {SchemaType} from '../../CodegenSchema.js'; const {FlowParser} = require('../../parsers/flow/parser'); const {TypeScriptParser} = require('../../parsers/typescript/parser'); +const {filterJSFile} = require('./combine-utils'); const fs = require('fs'); +const glob = require('glob'); const path = require('path'); const flowParser = new FlowParser(); @@ -46,4 +48,60 @@ function combineSchemas(files: Array): SchemaType { ); } -module.exports = combineSchemas; +function expandDirectoriesIntoFiles( + fileList: Array, + platform: ?string, + exclude: ?RegExp, +): Array { + return fileList + .flatMap(file => { + if (!fs.lstatSync(file).isDirectory()) { + return [file]; + } + const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file; + return 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, exclude)); +} + +function combineSchemasInFileList( + fileList: Array, + platform: ?string, + exclude: ?RegExp, +): SchemaType { + const expandedFileList = expandDirectoriesIntoFiles( + fileList, + platform, + exclude, + ); + const combined = combineSchemas(expandedFileList); + 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.', + ); + } + return combined; +} + +function combineSchemasInFileListAndWriteToFile( + fileList: Array, + platform: ?string, + outfile: string, + exclude: ?RegExp, +): void { + const combined = combineSchemasInFileList(fileList, platform, exclude); + const formattedSchema = JSON.stringify(combined, null, 2); + fs.writeFileSync(outfile, formattedSchema); +} + +module.exports = { + combineSchemas, + combineSchemasInFileList, + combineSchemasInFileListAndWriteToFile, +}; diff --git a/packages/react-native-codegen/src/cli/combine/combine-schemas-cli.js b/packages/react-native-codegen/src/cli/combine/combine-schemas-cli.js new file mode 100644 index 000000000000..f7a7b6f6ef0a --- /dev/null +++ b/packages/react-native-codegen/src/cli/combine/combine-schemas-cli.js @@ -0,0 +1,87 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 { + ComponentSchema, + NativeModuleSchema, + SchemaType, +} from '../../CodegenSchema.js'; + +const assert = require('assert'); +const fs = require('fs'); +const yargs = require('yargs'); + +const argv = yargs + .option('p', { + alias: 'platform', + type: 'string', + demandOption: true, + }) + .option('o', { + alias: 'output', + }) + .option('s', { + alias: 'schema-query', + }) + .parseSync(); + +const platform: string = argv.platform.toLowerCase(); +const output: string = argv.output; +const schemaQuery: string = argv.s; + +if (!['ios', 'android'].includes(platform)) { + throw new Error(`Invalid platform ${platform}`); +} + +if (!schemaQuery.startsWith('@')) { + throw new Error( + "The argument provided to --schema-query must be a filename that starts with '@'.", + ); +} + +const schemaQueryOutputFile = schemaQuery.replace(/^@/, ''); +const schemaQueryOutput = fs.readFileSync(schemaQueryOutputFile, 'utf8'); + +const schemaFiles = schemaQueryOutput.split(' '); +const modules: { + [hasteModuleName: string]: NativeModuleSchema | ComponentSchema, +} = {}; +const specNameToFile: {[hasteModuleName: string]: string} = {}; + +for (const file of schemaFiles) { + const schema: SchemaType = JSON.parse(fs.readFileSync(file, 'utf8')); + + if (schema.modules) { + for (const specName in schema.modules) { + const module = schema.modules[specName]; + if (modules[specName]) { + assert.deepEqual( + module, + modules[specName], + `App contained two specs with the same file name '${specName}'. Schemas: ${specNameToFile[specName]}, ${file}. Please rename one of the specs.`, + ); + } + + if ( + module.excludedPlatforms && + module.excludedPlatforms.indexOf(platform) >= 0 + ) { + continue; + } + + modules[specName] = module; + specNameToFile[specName] = file; + } + } +} + +fs.writeFileSync(output, JSON.stringify({modules}, null, 2)); diff --git a/packages/react-native-codegen/src/cli/combine/combine-utils.js b/packages/react-native-codegen/src/cli/combine/combine-utils.js index 5dad6e041b6b..8f120fb687f6 100644 --- a/packages/react-native-codegen/src/cli/combine/combine-utils.js +++ b/packages/react-native-codegen/src/cli/combine/combine-utils.js @@ -13,28 +13,6 @@ 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: @@ -43,19 +21,21 @@ function parseArgs(args: string[]): { * Returns: `true` if the file can be used to generate some code; `false` otherwise * */ -function filterJSFile(file: string, currentPlatform: ?string): boolean { +function filterJSFile( + file: string, + currentPlatform: ?string, + excludeRegExp: ?RegExp, +): 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 isNotExcluded = excludeRegExp == null || !excludeRegExp.test(file); const isNotTSTypeDefinition = !file.endsWith('.d.ts'); const isValidCandidate = isSpecFile && isNotNativeUIManager && - isNotNativeSampleTurboModule && + isNotExcluded && isNotTest && isNotTSTypeDefinition; @@ -80,6 +60,5 @@ function filterJSFile(file: string, currentPlatform: ?string): boolean { } module.exports = { - parseArgs, filterJSFile, }; diff --git a/packages/react-native-codegen/src/cli/parser/parser.js b/packages/react-native-codegen/src/cli/parser/parser.js index 40a599c9ff9c..850e27fff4c8 100644 --- a/packages/react-native-codegen/src/cli/parser/parser.js +++ b/packages/react-native-codegen/src/cli/parser/parser.js @@ -10,9 +10,9 @@ 'use strict'; -const path = require('path'); const {FlowParser} = require('../../parsers/flow/parser'); const {TypeScriptParser} = require('../../parsers/typescript/parser'); +const path = require('path'); const flowParser = new FlowParser(); const typescriptParser = new TypeScriptParser(); diff --git a/packages/react-native-codegen/src/generators/RNCodegen.d.ts b/packages/react-native-codegen/src/generators/RNCodegen.d.ts index 9cf647abfcce..f73eb2e0fa51 100644 --- a/packages/react-native-codegen/src/generators/RNCodegen.d.ts +++ b/packages/react-native-codegen/src/generators/RNCodegen.d.ts @@ -14,6 +14,7 @@ export type ViewGeneratorFunction = (libraryName: string, schema: SchemaType) => type LibraryGeneratorNames = | 'generateComponentDescriptorH' + | 'generateComponentDescriptorCpp' | 'generateComponentHObjCpp' | 'generateEventEmitterCpp' | 'generateEventEmitterH' diff --git a/packages/react-native-codegen/src/generators/RNCodegen.js b/packages/react-native-codegen/src/generators/RNCodegen.js index 61441c715dc2..d363ceb0957c 100644 --- a/packages/react-native-codegen/src/generators/RNCodegen.js +++ b/packages/react-native-codegen/src/generators/RNCodegen.js @@ -16,34 +16,38 @@ TODO: - ViewConfigs should spread in View's valid attributes */ -const fs = require('fs'); +import type {SchemaType} from '../CodegenSchema'; + +const schemaValidator = require('../SchemaValidator.js'); +const generateComponentDescriptorCpp = require('./components/GenerateComponentDescriptorCpp.js'); 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 generatePropsJavaDelegate = require('./components/GeneratePropsJavaDelegate.js'); +const generatePropsJavaInterface = require('./components/GeneratePropsJavaInterface.js'); +const generateShadowNodeCpp = require('./components/GenerateShadowNodeCpp.js'); +const generateShadowNodeH = require('./components/GenerateShadowNodeH.js'); const generateStateCpp = require('./components/GenerateStateCpp.js'); const generateStateH = require('./components/GenerateStateH.js'); -const generateModuleH = require('./modules/GenerateModuleH.js'); +const generateTests = require('./components/GenerateTests.js'); +const generateThirdPartyFabricComponentsProviderH = require('./components/GenerateThirdPartyFabricComponentsProviderH.js'); +const generateThirdPartyFabricComponentsProviderObjCpp = require('./components/GenerateThirdPartyFabricComponentsProviderObjCpp.js'); +const generateViewConfigJs = require('./components/GenerateViewConfigJs.js'); const generateModuleCpp = require('./modules/GenerateModuleCpp.js'); -const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp'); +const generateModuleH = require('./modules/GenerateModuleH.js'); 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 generateModuleObjCpp = require('./modules/GenerateModuleObjCpp'); +const fs = require('fs'); const path = require('path'); -const schemaValidator = require('../SchemaValidator.js'); const ALL_GENERATORS = { generateComponentDescriptorH: generateComponentDescriptorH.generate, + generateComponentDescriptorCpp: generateComponentDescriptorCpp.generate, generateComponentHObjCpp: generateComponentHObjCpp.generate, generateEventEmitterCpp: generateEventEmitterCpp.generate, generateEventEmitterH: generateEventEmitterH.generate, @@ -69,19 +73,19 @@ const ALL_GENERATORS = { 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, + useLocalIncludePaths?: boolean, }>; type SchemasOptions = $ReadOnly<{ schemas: {[string]: SchemaType}, outputDirectory: string, + supportedApplePlatforms?: {[string]: {[string]: boolean}}, }>; type LibraryGenerators = @@ -124,6 +128,7 @@ const LIBRARY_GENERATORS = { componentsAndroid: [ // JNI/C++ files generateComponentDescriptorH.generate, + generateComponentDescriptorCpp.generate, generateEventEmitterCpp.generate, generateEventEmitterH.generate, generatePropsCpp.generate, @@ -138,6 +143,7 @@ const LIBRARY_GENERATORS = { ], componentsIOS: [ generateComponentDescriptorH.generate, + generateComponentDescriptorCpp.generate, generateEventEmitterCpp.generate, generateEventEmitterH.generate, generateComponentHObjCpp.generate, @@ -232,16 +238,24 @@ module.exports = { outputDirectory, packageName, assumeNonnull, + useLocalIncludePaths, }: LibraryOptions, {generators, test}: LibraryConfig, ): boolean { schemaValidator.validate(schema); + const defaultHeaderPrefix = 'react/renderer/components'; + const headerPrefix = + useLocalIncludePaths === true + ? '' + : `${defaultHeaderPrefix}/${libraryName}/`; function composePath(intermediate: string) { return path.join(outputDirectory, intermediate, libraryName); } - const componentIOSOutput = composePath('react/renderer/components/'); + const componentIOSOutput = composePath( + useLocalIncludePaths === true ? '' : defaultHeaderPrefix, + ); const modulesIOSOutput = composePath('./'); const outputFoldersForGenerators = { @@ -262,21 +276,25 @@ module.exports = { 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], - }); - }, - ); + generator( + libraryName, + schema, + packageName, + assumeNonnull, + headerPrefix, + ).forEach((contents: string, fileName: string) => { + generatedFiles.push({ + name: fileName, + content: contents, + outputDir: outputFoldersForGenerators[name], + }); + }); } } return checkOrWriteFiles(generatedFiles, test); }, generateFromSchemas( - {schemas, outputDirectory}: SchemasOptions, + {schemas, outputDirectory, supportedApplePlatforms}: SchemasOptions, {generators, test}: SchemasConfig, ): boolean { Object.keys(schemas).forEach(libraryName => @@ -287,13 +305,15 @@ module.exports = { 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, - }); - }); + generator(schemas, supportedApplePlatforms).forEach( + (contents: string, fileName: string) => { + generatedFiles.push({ + name: fileName, + content: contents, + outputDir: outputDirectory, + }); + }, + ); } } return checkOrWriteFiles(generatedFiles, test); diff --git a/packages/react-native-codegen/src/generators/TypeUtils/Cxx/index.js b/packages/react-native-codegen/src/generators/TypeUtils/Cxx/index.js new file mode 100644 index 000000000000..fcde7828a856 --- /dev/null +++ b/packages/react-native-codegen/src/generators/TypeUtils/Cxx/index.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. + * + * @flow strict + * @format + * @oncall react_native + */ + +function wrapOptional(type: string, isRequired: boolean): string { + return isRequired ? type : `std::optional<${type}>`; +} + +module.exports = { + wrapOptional, +}; diff --git a/packages/react-native-codegen/src/generators/TypeUtils/Java/index.js b/packages/react-native-codegen/src/generators/TypeUtils/Java/index.js new file mode 100644 index 000000000000..6253ea37d4d2 --- /dev/null +++ b/packages/react-native-codegen/src/generators/TypeUtils/Java/index.js @@ -0,0 +1,27 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 + */ + +const objectTypeForPrimitiveType = { + boolean: 'Boolean', + double: 'Double', + float: 'Float', + int: 'Integer', +}; + +function wrapOptional(type: string, isRequired: boolean): string { + return isRequired + ? type + : `@Nullable ${objectTypeForPrimitiveType[type] ?? type}`; +} + +module.exports = { + wrapOptional, +}; diff --git a/packages/react-native-codegen/src/generators/TypeUtils/Objective-C/index.js b/packages/react-native-codegen/src/generators/TypeUtils/Objective-C/index.js new file mode 100644 index 000000000000..529bfe64a9ad --- /dev/null +++ b/packages/react-native-codegen/src/generators/TypeUtils/Objective-C/index.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. + * + * @flow strict + * @format + * @oncall react_native + */ + +function wrapOptional(type: string, isRequired: boolean): string { + return isRequired ? type : `${type} _Nullable`; +} + +module.exports = { + wrapOptional, +}; diff --git a/packages/react-native-codegen/src/generators/__tests__/RNCodegen-test.js b/packages/react-native-codegen/src/generators/__tests__/RNCodegen-test.js index 44a70349ab2e..5ac188624903 100644 --- a/packages/react-native-codegen/src/generators/__tests__/RNCodegen-test.js +++ b/packages/react-native-codegen/src/generators/__tests__/RNCodegen-test.js @@ -11,8 +11,8 @@ 'use strict'; -const rnCodegen = require('../RNCodegen.js'); const fixture = require('../__test_fixtures__/fixtures.js'); +const rnCodegen = require('../RNCodegen.js'); const packageName = 'na'; describe('RNCodegen.generate', () => { @@ -46,6 +46,7 @@ describe('RNCodegen.generate', () => { 'EventEmitters.h': componentsOutputDir, 'EventEmitters.cpp': componentsOutputDir, 'ComponentDescriptors.h': componentsOutputDir, + 'ComponentDescriptors.cpp': componentsOutputDir, }; let receivedDir = path.dirname(location); diff --git a/packages/react-native-codegen/src/generators/components/ComponentsGeneratorUtils.js b/packages/react-native-codegen/src/generators/components/ComponentsGeneratorUtils.js index c43768a15934..3a0138224c0b 100644 --- a/packages/react-native-codegen/src/generators/components/ComponentsGeneratorUtils.js +++ b/packages/react-native-codegen/src/generators/components/ComponentsGeneratorUtils.js @@ -11,26 +11,24 @@ 'use strict'; import type {NamedShape, PropTypeAnnotation} from '../../CodegenSchema'; - import type { - StringTypeAnnotation, - ReservedPropTypeAnnotation, - ObjectTypeAnnotation, - Int32TypeAnnotation, - FloatTypeAnnotation, - DoubleTypeAnnotation, BooleanTypeAnnotation, + DoubleTypeAnnotation, + FloatTypeAnnotation, + Int32TypeAnnotation, + ObjectTypeAnnotation, + ReservedPropTypeAnnotation, + StringTypeAnnotation, } from '../../CodegenSchema'; +const {getEnumName} = require('../Utils'); const { + generateStructName, getCppTypeForAnnotation, getEnumMaskName, - generateStructName, getImports, } = require('./CppHelpers.js'); -const {getEnumName} = require('../Utils'); - function getNativeTypeFromAnnotation( componentName: string, prop: diff --git a/packages/react-native-codegen/src/generators/components/ComponentsProviderUtils.js b/packages/react-native-codegen/src/generators/components/ComponentsProviderUtils.js new file mode 100644 index 000000000000..0ee2c4afa76a --- /dev/null +++ b/packages/react-native-codegen/src/generators/components/ComponentsProviderUtils.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 + * @format + */ + +const APPLE_PLATFORMS_MACRO_MAP = { + ios: 'TARGET_OS_IOS', + macos: 'TARGET_OS_OSX', + tvos: 'TARGET_OS_TV', + visionos: 'TARGET_OS_VISION', +}; + +/** + * Adds compiler macros to the file template to exclude unsupported platforms. + */ +function generateSupportedApplePlatformsMacro( + fileTemplate: string, + supportedPlatformsMap: ?{[string]: boolean}, +): string { + if (!supportedPlatformsMap) { + return fileTemplate; + } + + // According to Podspec Syntax Reference, when `platform` or `deployment_target` is not specified, it defaults to all platforms. + // https://guides.cocoapods.org/syntax/podspec.html#platform + const everyPlatformIsUnsupported = Object.keys(supportedPlatformsMap).every( + platform => supportedPlatformsMap[platform] === false, + ); + + if (everyPlatformIsUnsupported) { + return fileTemplate; + } + + const compilerMacroString = Object.keys(supportedPlatformsMap) + .reduce((acc: string[], platform) => { + if (!supportedPlatformsMap[platform]) { + return [...acc, `!${APPLE_PLATFORMS_MACRO_MAP[platform]}`]; + } + return acc; + }, []) + .join(' && '); + + if (!compilerMacroString) { + return fileTemplate; + } + + return `#if ${compilerMacroString} +${fileTemplate} +#endif +`; +} + +module.exports = { + generateSupportedApplePlatformsMacro, +}; diff --git a/packages/react-native-codegen/src/generators/components/CppHelpers.js b/packages/react-native-codegen/src/generators/components/CppHelpers.js index ccecb1bcd080..d1bf2f61599a 100644 --- a/packages/react-native-codegen/src/generators/components/CppHelpers.js +++ b/packages/react-native-codegen/src/generators/components/CppHelpers.js @@ -166,6 +166,14 @@ function getEnumMaskName(enumName: string): string { return `${enumName}Mask`; } +function getDefaultInitializerString( + componentName: string, + prop: NamedShape, +): string { + const defaultValue = convertDefaultTypeToString(componentName, prop); + return `{${defaultValue}}`; +} + function convertDefaultTypeToString( componentName: string, prop: NamedShape, @@ -256,7 +264,21 @@ function convertDefaultTypeToString( } } +const IncludeTemplate = ({ + headerPrefix, + file, +}: { + headerPrefix: string, + file: string, +}): string => { + if (headerPrefix === '') { + return `#include "${file}"`; + } + return `#include <${headerPrefix}${file}>`; +}; + module.exports = { + getDefaultInitializerString, convertDefaultTypeToString, getCppArrayTypeForAnnotation, getCppTypeForAnnotation, @@ -265,4 +287,5 @@ module.exports = { toIntEnumValueName, generateStructName, generateEventStructName, + IncludeTemplate, }; diff --git a/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorCpp.js b/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorCpp.js new file mode 100644 index 000000000000..794e04765742 --- /dev/null +++ b/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorCpp.js @@ -0,0 +1,101 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 {IncludeTemplate} = require('./CppHelpers'); + +// File path -> contents +type FilesOutput = Map; + +const FileTemplate = ({ + libraryName, + componentRegistrations, + headerPrefix, +}: { + libraryName: string, + componentRegistrations: string, + headerPrefix: 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: GenerateComponentDescriptorCpp.js + */ + +${IncludeTemplate({headerPrefix, file: 'ComponentDescriptors.h'})} +#include +#include + +namespace facebook::react { + +void ${libraryName}_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +${componentRegistrations} +} + +} // namespace facebook::react +`; + +const ComponentRegistrationTemplate = ({className}: {className: string}) => + ` +registry->add(concreteComponentDescriptorProvider<${className}ComponentDescriptor>()); +`.trim(); + +module.exports = { + generate( + libraryName: string, + schema: SchemaType, + packageName?: string, + assumeNonnull: boolean = false, + headerPrefix?: string, + ): FilesOutput { + const fileName = 'ComponentDescriptors.cpp'; + + const componentRegistrations = 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 ComponentRegistrationTemplate({className: componentName}); + }) + .join('\n'); + }) + .filter(Boolean) + .join('\n'); + + const replacedTemplate = FileTemplate({ + libraryName, + componentRegistrations, + headerPrefix: headerPrefix ?? '', + }); + + return new Map([[fileName, replacedTemplate]]); + }, +}; diff --git a/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js b/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js index a7c795622f90..0a68446cd1af 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js @@ -12,15 +12,19 @@ import type {SchemaType} from '../../CodegenSchema'; +const {IncludeTemplate} = require('./CppHelpers'); + // File path -> contents type FilesOutput = Map; const FileTemplate = ({ - componentDescriptors, libraryName, + componentDefinitions, + headerPrefix, }: { - componentDescriptors: string, libraryName: string, + componentDefinitions: string, + headerPrefix: string, }) => ` /** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). @@ -33,19 +37,21 @@ const FileTemplate = ({ #pragma once -#include +${IncludeTemplate({headerPrefix, file: 'ShadowNodes.h'})} #include +#include + +namespace facebook::react { -namespace facebook { -namespace react { +${componentDefinitions} -${componentDescriptors} +void ${libraryName}_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); -} // namespace react -} // namespace facebook +} // namespace facebook::react `; -const ComponentTemplate = ({className}: {className: string}) => +const ComponentDefinitionTemplate = ({className}: {className: string}) => ` using ${className}ComponentDescriptor = ConcreteComponentDescriptor<${className}ShadowNode>; `.trim(); @@ -56,10 +62,11 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'ComponentDescriptors.h'; - const componentDescriptors = Object.keys(schema.modules) + const componentDefinitions = Object.keys(schema.modules) .map(moduleName => { const module = schema.modules[moduleName]; if (module.type !== 'Component') { @@ -78,7 +85,7 @@ module.exports = { return; } - return ComponentTemplate({className: componentName}); + return ComponentDefinitionTemplate({className: componentName}); }) .join('\n'); }) @@ -86,8 +93,9 @@ module.exports = { .join('\n'); const replacedTemplate = FileTemplate({ - componentDescriptors, libraryName, + componentDefinitions, + headerPrefix: headerPrefix ?? '', }); return new Map([[fileName, replacedTemplate]]); diff --git a/packages/react-native-codegen/src/generators/components/GenerateComponentHObjCpp.js b/packages/react-native-codegen/src/generators/components/GenerateComponentHObjCpp.js index ee619f4617f7..79724d1810eb 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateComponentHObjCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateComponentHObjCpp.js @@ -11,11 +11,11 @@ 'use strict'; import type { - NamedShape, + CommandParamTypeAnnotation, CommandTypeAnnotation, ComponentShape, + NamedShape, SchemaType, - CommandParamTypeAnnotation, } from '../../CodegenSchema'; type FilesOutput = Map; @@ -171,6 +171,8 @@ function getObjCParamType(param: Param): string { return 'NSInteger'; case 'StringTypeAnnotation': return 'NSString *'; + case 'ArrayTypeAnnotation': + return 'const NSArray *'; default: (typeAnnotation.type: empty); throw new Error('Received invalid param type annotation'); @@ -199,6 +201,8 @@ function getObjCExpectedKindParamType(param: Param): string { return '[NSNumber class]'; case 'StringTypeAnnotation': return '[NSString class]'; + case 'ArrayTypeAnnotation': + return '[NSArray class]'; default: (typeAnnotation.type: empty); throw new Error('Received invalid param type annotation'); @@ -227,6 +231,8 @@ function getReadableExpectedKindParamType(param: Param): string { return 'number'; case 'StringTypeAnnotation': return 'string'; + case 'ArrayTypeAnnotation': + return 'array'; default: (typeAnnotation.type: empty); throw new Error('Received invalid param type annotation'); @@ -258,6 +264,8 @@ function getObjCRightHandAssignmentParamType( return `[(NSNumber *)arg${index} intValue]`; case 'StringTypeAnnotation': return `(NSString *)arg${index}`; + case 'ArrayTypeAnnotation': + return `(NSArray *)arg${index}`; default: (typeAnnotation.type: empty); throw new Error('Received invalid param type annotation'); @@ -372,6 +380,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'RCTComponentViewHelpers.h'; diff --git a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js index 7a43aea0a2b5..2f2a829d1995 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js @@ -10,18 +10,17 @@ 'use strict'; import type {EventTypeShape} from '../../CodegenSchema'; - -const {generateEventStructName} = require('./CppHelpers'); -const {indent} = require('../Utils'); - import type { ComponentShape, - NamedShape, EventTypeAnnotation, - SchemaType, + NamedShape, ObjectTypeAnnotation, + SchemaType, } from '../../CodegenSchema'; +const {indent} = require('../Utils'); +const {IncludeTemplate, generateEventStructName} = require('./CppHelpers'); + // File path -> contents type FilesOutput = Map; @@ -32,12 +31,12 @@ type ComponentCollection = $ReadOnly<{ const FileTemplate = ({ events, - libraryName, extraIncludes, + headerPrefix, }: { events: string, - libraryName: string, extraIncludes: Set, + headerPrefix: string, }) => ` /** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). @@ -48,14 +47,12 @@ const FileTemplate = ({ * ${'@'}generated by codegen project: GenerateEventEmitterCpp.js */ -#include +${IncludeTemplate({headerPrefix, file: 'EventEmitters.h'})} ${[...extraIncludes].join('\n')} -namespace facebook { -namespace react { +namespace facebook::react { ${events} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ @@ -372,9 +369,10 @@ function generateEvent( // 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, - )}`; + const dispatchEventName = + event.paperTopLevelNameDeprecated != null + ? event.paperTopLevelNameDeprecated + : `${event.name[2].toLowerCase()}${event.name.slice(3)}`; if (event.typeAnnotation.argument) { const implementation = ` @@ -414,6 +412,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const moduleComponents: ComponentCollection = Object.keys(schema.modules) .map(moduleName => { @@ -445,9 +444,9 @@ module.exports = { const fileName = 'EventEmitters.cpp'; const replacedTemplate = FileTemplate({ - libraryName, events: componentEmitters, extraIncludes, + headerPrefix: headerPrefix ?? '', }); return new Map([[fileName, replacedTemplate]]); diff --git a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js index b5d55033f063..0e753e24d2c5 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js @@ -10,24 +10,23 @@ 'use strict'; -const nullthrows = require('nullthrows'); - -const { - getImports, - getCppArrayTypeForAnnotation, - getCppTypeForAnnotation, - generateEventStructName, -} = require('./CppHelpers'); -const {indent, toSafeCppString} = require('../Utils'); - import type { ComponentShape, + EventTypeAnnotation, EventTypeShape, NamedShape, - EventTypeAnnotation, SchemaType, } from '../../CodegenSchema'; +const {indent, toSafeCppString} = require('../Utils'); +const { + generateEventStructName, + getCppArrayTypeForAnnotation, + getCppTypeForAnnotation, + getImports, +} = require('./CppHelpers'); +const nullthrows = require('nullthrows'); + // File path -> contents type FilesOutput = Map; type StructsMap = Map; @@ -57,11 +56,9 @@ const FileTemplate = ({ #include ${[...extraIncludes].join('\n')} -namespace facebook { -namespace react { +namespace facebook::react { ${componentEmitters} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ @@ -314,6 +311,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const moduleComponents: ComponentCollection = Object.keys(schema.modules) .map(moduleName => { diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js b/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js index ad9d6aac61f4..d925abce9984 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js @@ -11,19 +11,24 @@ 'use strict'; import type {ComponentShape, SchemaType} from '../../CodegenSchema'; -const {convertDefaultTypeToString, getImports} = require('./CppHelpers'); + +const { + IncludeTemplate, + convertDefaultTypeToString, + getImports, +} = require('./CppHelpers'); // File path -> contents type FilesOutput = Map; const FileTemplate = ({ - libraryName, imports, componentClasses, + headerPrefix, }: { - libraryName: string, imports: string, componentClasses: string, + headerPrefix: string, }) => ` /** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). @@ -34,16 +39,14 @@ const FileTemplate = ({ * ${'@'}generated by codegen project: GeneratePropsCpp.js */ -#include +${IncludeTemplate({headerPrefix, file: 'Props.h'})} ${imports} -namespace facebook { -namespace react { +namespace facebook::react { ${componentClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ @@ -105,6 +108,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'Props.cpp'; const allImports: Set = new Set([ @@ -152,8 +156,8 @@ module.exports = { const replacedTemplate = FileTemplate({ componentClasses: componentProps, - libraryName, imports: Array.from(allImports).sort().join('\n').trim(), + headerPrefix: headerPrefix ?? '', }); return new Map([[fileName, replacedTemplate]]); diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js index 479c82cd50aa..e8af50435546 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js @@ -10,28 +10,25 @@ 'use strict'; import type {ComponentShape} from '../../CodegenSchema'; +import type { + ExtendsPropsShape, + NamedShape, + PropTypeAnnotation, + SchemaType, +} from '../../CodegenSchema'; +const {getEnumName, toSafeCppString} = require('../Utils'); const { - getNativeTypeFromAnnotation, getLocalImports, + getNativeTypeFromAnnotation, } = require('./ComponentsGeneratorUtils.js'); - const { - convertDefaultTypeToString, - getEnumMaskName, generateStructName, + getDefaultInitializerString, + getEnumMaskName, 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; @@ -55,13 +52,11 @@ const FileTemplate = ({ ${imports} -namespace facebook { -namespace react { +namespace facebook::react { ${componentClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ClassTemplate = ({ @@ -461,13 +456,21 @@ function generateEnumString( function generatePropsString( componentName: string, props: $ReadOnlyArray>, + nameParts: $ReadOnlyArray, ) { return props .map(prop => { - const nativeType = getNativeTypeFromAnnotation(componentName, prop, []); - const defaultValue = convertDefaultTypeToString(componentName, prop); + const nativeType = getNativeTypeFromAnnotation( + componentName, + prop, + nameParts, + ); + const defaultInitializer = getDefaultInitializerString( + componentName, + prop, + ); - return `${nativeType} ${prop.name}{${defaultValue}};`; + return `${nativeType} ${prop.name}${defaultInitializer};`; }) .join('\n' + ' '); } @@ -634,16 +637,11 @@ function generateStruct( ): void { const structNameParts = nameParts; const structName = generateStructName(componentName, structNameParts); - - const fields = properties - .map(property => { - return `${getNativeTypeFromAnnotation( - componentName, - property, - structNameParts, - )} ${property.name};`; - }) - .join('\n' + ' '); + const fields = generatePropsString( + componentName, + properties, + structNameParts, + ); properties.forEach((property: NamedShape) => { const name = property.name; @@ -711,6 +709,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'Props.h'; @@ -742,6 +741,7 @@ module.exports = { const propsString = generatePropsString( componentName, component.props, + [], ); const extendString = getClassExtendString(component); const extendsImports = getExtendsImports(component.extendsProps); diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js index 68875b3b6caa..e45a4df573bc 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js @@ -10,19 +10,19 @@ 'use strict'; import type {CommandParamTypeAnnotation} from '../../CodegenSchema'; - import type { - NamedShape, CommandTypeAnnotation, ComponentShape, + NamedShape, PropTypeAnnotation, SchemaType, } from '../../CodegenSchema'; + const { + getDelegateJavaClassName, getImports, - toSafeJavaString, getInterfaceJavaClassName, - getDelegateJavaClassName, + toSafeJavaString, } = require('./JavaHelpers'); // File path -> contents @@ -202,6 +202,8 @@ function getCommandArgJavaType( return `args.getInt(${index})`; case 'StringTypeAnnotation': return `args.getString(${index})`; + case 'ArrayTypeAnnotation': + return `args.getArray(${index})`; default: (typeAnnotation.type: empty); throw new Error(`Receieved invalid type: ${typeAnnotation.type}`); @@ -295,6 +297,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { // TODO: This doesn't support custom package name yet. const normalizedPackageName = 'com.facebook.react.viewmanagers'; diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js index a71f9b696ede..28888b203e24 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js @@ -10,18 +10,18 @@ 'use strict'; import type {CommandParamTypeAnnotation} from '../../CodegenSchema'; - import type { - NamedShape, CommandTypeAnnotation, ComponentShape, + NamedShape, PropTypeAnnotation, SchemaType, } from '../../CodegenSchema'; + const { getImports, - toSafeJavaString, getInterfaceJavaClassName, + toSafeJavaString, } = require('./JavaHelpers'); // File path -> contents @@ -171,6 +171,8 @@ function getCommandArgJavaType(param: NamedShape) { return 'int'; case 'StringTypeAnnotation': return 'String'; + case 'ArrayTypeAnnotation': + return 'ReadableArray'; default: (typeAnnotation.type: empty); throw new Error('Receieved invalid typeAnnotation'); @@ -235,6 +237,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { // TODO: This doesn't support custom package name yet. const normalizedPackageName = 'com.facebook.react.viewmanagers'; diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js index 7aaa6d297bf5..6f5e19e88fd2 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js @@ -11,17 +11,17 @@ 'use strict'; import type { - ReservedPropTypeAnnotation, - NamedShape, - ObjectTypeAnnotation, + ArrayTypeAnnotation, BooleanTypeAnnotation, - StringTypeAnnotation, DoubleTypeAnnotation, FloatTypeAnnotation, Int32TypeAnnotation, - PropTypeAnnotation, MixedTypeAnnotation, - ArrayTypeAnnotation, + NamedShape, + ObjectTypeAnnotation, + PropTypeAnnotation, + ReservedPropTypeAnnotation, + StringTypeAnnotation, } from '../../../CodegenSchema'; const {capitalize} = require('../../Utils'); diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/index.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/index.js index 66b11f26c8c3..a60583debc54 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/index.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/index.js @@ -12,8 +12,8 @@ import type {SchemaType} from '../../../CodegenSchema'; -const PojoCollector = require('./PojoCollector'); const {capitalize} = require('../../Utils'); +const PojoCollector = require('./PojoCollector'); const {serializePojo} = require('./serializePojo'); type FilesOutput = Map; diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/serializePojo.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/serializePojo.js index f9f7234931fe..7ca6df11d081 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/serializePojo.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/serializePojo.js @@ -11,6 +11,7 @@ 'use strict'; import type {Pojo, PojoProperty, PojoTypeAnnotation} from './PojoCollector'; + const {capitalize} = require('../../Utils'); type ImportCollector = ($import: string) => void; diff --git a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js index 82cb8ffd5ab5..c6d9f7b738f6 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js @@ -12,15 +12,17 @@ import type {SchemaType} from '../../CodegenSchema'; +const {IncludeTemplate} = require('./CppHelpers'); + // File path -> contents type FilesOutput = Map; const FileTemplate = ({ - libraryName, componentNames, + headerPrefix, }: { - libraryName: string, componentNames: string, + headerPrefix: string, }) => ` /** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). @@ -31,15 +33,13 @@ const FileTemplate = ({ * ${'@'}generated by codegen project: GenerateShadowNodeCpp.js */ -#include +${IncludeTemplate({headerPrefix, file: 'ShadowNodes.h'})} -namespace facebook { -namespace react { +namespace facebook::react { ${componentNames} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({className}: {className: string}) => @@ -53,6 +53,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'ShadowNodes.cpp'; @@ -87,7 +88,7 @@ module.exports = { const replacedTemplate = FileTemplate({ componentNames, - libraryName, + headerPrefix: headerPrefix ?? '', }); return new Map([[fileName, replacedTemplate]]); diff --git a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js index 3e7cf71117ef..8218495e9400 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js @@ -12,17 +12,17 @@ import type {SchemaType} from '../../CodegenSchema'; +const {IncludeTemplate} = require('./CppHelpers'); + // File path -> contents type FilesOutput = Map; const FileTemplate = ({ - imports, - libraryName, componentClasses, + headerPrefix, }: { - imports: string, - libraryName: string, componentClasses: string, + headerPrefix: string, }) => ` /** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). @@ -35,18 +35,17 @@ const FileTemplate = ({ #pragma once -${imports}#include -#include +${IncludeTemplate({headerPrefix, file: 'EventEmitters.h'})} +${IncludeTemplate({headerPrefix, file: 'Props.h'})} +${IncludeTemplate({headerPrefix, file: 'States.h'})} #include #include -namespace facebook { -namespace react { +namespace facebook::react { ${componentClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ @@ -74,6 +73,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'ShadowNodes.h'; @@ -111,12 +111,9 @@ module.exports = { .filter(Boolean) .join('\n\n'); - const eventEmitterImport = `#include \n`; - const replacedTemplate = FileTemplate({ componentClasses: moduleResults, - libraryName, - imports: eventEmitterImport, + headerPrefix: headerPrefix ?? '', }); return new Map([[fileName, replacedTemplate]]); diff --git a/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js b/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js index 36c843398192..87d734a10a7a 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js @@ -12,15 +12,17 @@ import type {SchemaType} from '../../CodegenSchema'; +const {IncludeTemplate} = require('./CppHelpers'); + // File path -> contents type FilesOutput = Map; const FileTemplate = ({ - libraryName, stateClasses, + headerPrefix, }: { - libraryName: string, stateClasses: string, + headerPrefix: string, }) => ` /** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). @@ -30,15 +32,13 @@ const FileTemplate = ({ * * ${'@'}generated by codegen project: GenerateStateCpp.js */ -#include +${IncludeTemplate({headerPrefix, file: 'States.h'})} -namespace facebook { -namespace react { +namespace facebook::react { ${stateClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const StateTemplate = ({stateName}: {stateName: string}) => ''; @@ -49,6 +49,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'States.cpp'; @@ -83,8 +84,8 @@ module.exports = { .join('\n'); const replacedTemplate = FileTemplate({ - libraryName, stateClasses, + headerPrefix: headerPrefix ?? '', }); return new Map([[fileName, replacedTemplate]]); diff --git a/packages/react-native-codegen/src/generators/components/GenerateStateH.js b/packages/react-native-codegen/src/generators/components/GenerateStateH.js index 658142eaea04..3aee725fca30 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateStateH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateStateH.js @@ -39,13 +39,11 @@ const FileTemplate = ({ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { ${stateClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `.trim(); const StateTemplate = ({stateName}: {stateName: string}) => @@ -72,6 +70,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'States.h'; diff --git a/packages/react-native-codegen/src/generators/components/GenerateTests.js b/packages/react-native-codegen/src/generators/components/GenerateTests.js index 95f51da618d3..8017f933ef44 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateTests.js +++ b/packages/react-native-codegen/src/generators/components/GenerateTests.js @@ -12,9 +12,8 @@ import type {ComponentShape, PropTypeAnnotation} from '../../CodegenSchema'; import type {SchemaType} from '../../CodegenSchema'; -const {getImports} = require('./CppHelpers'); - const {toSafeCppString} = require('../Utils'); +const {getImports} = require('./CppHelpers'); type FilesOutput = Map; type PropValueType = string | number | boolean; @@ -172,6 +171,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const fileName = 'Tests.cpp'; const allImports = new Set([ diff --git a/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderH.js b/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderH.js index 40b168372af7..cc42edb5a04b 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderH.js @@ -12,6 +12,10 @@ import type {SchemaType} from '../../CodegenSchema'; +const { + generateSupportedApplePlatformsMacro, +} = require('./ComponentsProviderUtils'); + // File path -> contents type FilesOutput = Map; @@ -35,11 +39,12 @@ extern "C" { #endif Class RCTThirdPartyFabricComponentsProvider(const char *name); - +#if RCT_NEW_ARCH_ENABLED #ifndef RCT_DYNAMIC_FRAMEWORKS ${lookupFuncs} +#endif #endif #ifdef __cplusplus @@ -62,13 +67,18 @@ Class ${className}Cls(void) __attribute__((used)); // `.trim(); module.exports = { - generate(schemas: {[string]: SchemaType}): FilesOutput { + generate( + schemas: {[string]: SchemaType}, + supportedApplePlatforms?: {[string]: {[string]: boolean}}, + ): FilesOutput { const fileName = 'RCTThirdPartyFabricComponentsProvider.h'; const lookupFuncs = Object.keys(schemas) .map(libraryName => { const schema = schemas[libraryName]; - return Object.keys(schema.modules) + const librarySupportedApplePlatforms = + supportedApplePlatforms?.[libraryName]; + const generatedLookup = Object.keys(schema.modules) .map(moduleName => { const module = schema.modules[moduleName]; if (module.type !== 'Component') { @@ -99,6 +109,11 @@ module.exports = { }) .filter(Boolean) .join('\n'); + + return generateSupportedApplePlatformsMacro( + generatedLookup, + librarySupportedApplePlatforms, + ); }) .join('\n'); diff --git a/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js b/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js index 06e964845d3f..ad99c964437e 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js @@ -12,6 +12,10 @@ import type {SchemaType} from '../../CodegenSchema'; +const { + generateSupportedApplePlatformsMacro, +} = require('./ComponentsProviderUtils'); + // File path -> contents type FilesOutput = Map; @@ -34,9 +38,11 @@ const FileTemplate = ({lookupMap}: {lookupMap: string}) => ` Class RCTThirdPartyFabricComponentsProvider(const char *name) { static std::unordered_map sFabricComponentsClassMap = { + #if RCT_NEW_ARCH_ENABLED #ifndef RCT_DYNAMIC_FRAMEWORKS ${lookupMap} #endif + #endif }; auto p = sFabricComponentsClassMap.find(name); @@ -58,13 +64,19 @@ const LookupMapTemplate = ({ {"${className}", ${className}Cls}, // ${libraryName}`; module.exports = { - generate(schemas: {[string]: SchemaType}): FilesOutput { + generate( + schemas: {[string]: SchemaType}, + supportedApplePlatforms?: {[string]: {[string]: boolean}}, + ): FilesOutput { const fileName = 'RCTThirdPartyFabricComponentsProvider.mm'; const lookupMap = Object.keys(schemas) .map(libraryName => { const schema = schemas[libraryName]; - return Object.keys(schema.modules) + const librarySupportedApplePlatforms = + supportedApplePlatforms?.[libraryName]; + + const generatedLookup = Object.keys(schema.modules) .map(moduleName => { const module = schema.modules[moduleName]; if (module.type !== 'Component') { @@ -96,7 +108,13 @@ module.exports = { return componentTemplates.length > 0 ? componentTemplates : null; }) - .filter(Boolean); + .filter(Boolean) + .join('\n'); + + return generateSupportedApplePlatformsMacro( + generatedLookup, + librarySupportedApplePlatforms, + ); }) .join('\n'); diff --git a/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js b/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js index c8d96823129b..f09b38c7885f 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js +++ b/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js @@ -197,7 +197,7 @@ function generateBubblingEventInfo( ) { return j.property( 'init', - j.identifier(nameOveride || normalizeInputEventName(event.name)), + j.identifier(normalizeInputEventName(nameOveride || event.name)), j.objectExpression([ j.property( 'init', @@ -221,7 +221,7 @@ function generateDirectEventInfo( ) { return j.property( 'init', - j.identifier(nameOveride || normalizeInputEventName(event.name)), + j.identifier(normalizeInputEventName(nameOveride || event.name)), j.objectExpression([ j.property( 'init', diff --git a/packages/react-native-codegen/src/generators/components/JavaHelpers.js b/packages/react-native-codegen/src/generators/components/JavaHelpers.js index 48556d47db66..9b835bb6f918 100644 --- a/packages/react-native-codegen/src/generators/components/JavaHelpers.js +++ b/packages/react-native-codegen/src/generators/components/JavaHelpers.js @@ -127,6 +127,15 @@ function getImports( } }); + component.commands.forEach(command => { + command.typeAnnotation.params.forEach(param => { + const cmdParamType = param.typeAnnotation.type; + if (cmdParamType === 'ArrayTypeAnnotation') { + imports.add('import com.facebook.react.bridge.ReadableArray;'); + } + }); + }); + return imports; } diff --git a/packages/react-native-codegen/src/generators/components/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/generators/components/__test_fixtures__/fixtures.js index 65f7a46d25ba..9121c8ad6878 100644 --- a/packages/react-native-codegen/src/generators/components/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/generators/components/__test_fixtures__/fixtures.js @@ -871,6 +871,38 @@ const OBJECT_PROPS: SchemaType = { default: 0, }, }, + { + name: 'stringUserDefaultProp', + optional: true, + typeAnnotation: { + type: 'StringTypeAnnotation', + default: 'user_default', + }, + }, + { + name: 'booleanUserDefaultProp', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + default: true, + }, + }, + { + name: 'floatUserDefaultProp', + optional: true, + typeAnnotation: { + type: 'FloatTypeAnnotation', + default: 3.14, + }, + }, + { + name: 'intUserDefaultProp', + optional: true, + typeAnnotation: { + type: 'Int32TypeAnnotation', + default: 9999, + }, + }, { name: 'stringEnumProp', optional: true, @@ -1726,6 +1758,28 @@ const COMMANDS_AND_PROPS: SchemaType = { }, }, }, + { + name: 'addItems', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: [ + { + name: 'items', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, + }, ], }, }, diff --git a/packages/react-native-codegen/src/generators/components/__tests__/GenerateComponentDescriptorCpp-test.js b/packages/react-native-codegen/src/generators/components/__tests__/GenerateComponentDescriptorCpp-test.js new file mode 100644 index 000000000000..ebef5169033a --- /dev/null +++ b/packages/react-native-codegen/src/generators/components/__tests__/GenerateComponentDescriptorCpp-test.js @@ -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-local + * @format + * @oncall react_native + */ + +'use strict'; + +const fixtures = require('../__test_fixtures__/fixtures.js'); +const generator = require('../GenerateComponentDescriptorCpp.js'); + +describe('GenerateComponentDescriptorCpp', () => { + Object.keys(fixtures) + .sort() + .forEach(fixtureName => { + const fixture = fixtures[fixtureName]; + + it(`can generate fixture ${fixtureName}`, () => { + expect( + generator.generate( + fixtureName, + fixture, + '', + false, + `react/renderer/components/${fixtureName}/`, + ), + ).toMatchSnapshot(); + }); + }); +}); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/GenerateComponentDescriptorH-test.js b/packages/react-native-codegen/src/generators/components/__tests__/GenerateComponentDescriptorH-test.js index 4074282cc57a..e82eddd170c3 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/GenerateComponentDescriptorH-test.js +++ b/packages/react-native-codegen/src/generators/components/__tests__/GenerateComponentDescriptorH-test.js @@ -21,7 +21,15 @@ describe('GenerateComponentDescriptorH', () => { const fixture = fixtures[fixtureName]; it(`can generate fixture ${fixtureName}`, () => { - expect(generator.generate(fixtureName, fixture)).toMatchSnapshot(); + expect( + generator.generate( + fixtureName, + fixture, + '', + false, + `react/renderer/components/${fixtureName}/`, + ), + ).toMatchSnapshot(); }); }); }); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/GenerateEventEmitterCpp-test.js b/packages/react-native-codegen/src/generators/components/__tests__/GenerateEventEmitterCpp-test.js index 11c6328ab729..65edf61ff7c5 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/GenerateEventEmitterCpp-test.js +++ b/packages/react-native-codegen/src/generators/components/__tests__/GenerateEventEmitterCpp-test.js @@ -21,7 +21,15 @@ describe('GenerateEventEmitterCpp', () => { const fixture = fixtures[fixtureName]; it(`can generate fixture ${fixtureName}`, () => { - expect(generator.generate(fixtureName, fixture)).toMatchSnapshot(); + expect( + generator.generate( + fixtureName, + fixture, + '', + false, + `react/renderer/components/${fixtureName}/`, + ), + ).toMatchSnapshot(); }); }); }); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/GeneratePropsCpp-test.js b/packages/react-native-codegen/src/generators/components/__tests__/GeneratePropsCpp-test.js index ff77b09ca49b..0ee57230d1c1 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/GeneratePropsCpp-test.js +++ b/packages/react-native-codegen/src/generators/components/__tests__/GeneratePropsCpp-test.js @@ -21,7 +21,15 @@ describe('GeneratePropsCpp', () => { const fixture = fixtures[fixtureName]; it(`can generate fixture ${fixtureName}`, () => { - expect(generator.generate(fixtureName, fixture)).toMatchSnapshot(); + expect( + generator.generate( + fixtureName, + fixture, + '', + false, + `react/renderer/components/${fixtureName}/`, + ), + ).toMatchSnapshot(); }); }); }); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeCpp-test.js b/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeCpp-test.js index 3acb8162fe65..71903e8b92e3 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeCpp-test.js +++ b/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeCpp-test.js @@ -22,7 +22,13 @@ describe('GenerateShadowNodeCpp', () => { it(`can generate fixture ${fixtureName}`, () => { expect( - generator.generate(fixtureName, fixture, 'SampleSpec'), + generator.generate( + fixtureName, + fixture, + 'SampleSpec', + false, + `react/renderer/components/${fixtureName}/`, + ), ).toMatchSnapshot(); }); }); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeH-test.js b/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeH-test.js index cafe5cf886f7..0ab80f0b559e 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeH-test.js +++ b/packages/react-native-codegen/src/generators/components/__tests__/GenerateShadowNodeH-test.js @@ -21,7 +21,15 @@ describe('GenerateShadowNodeH', () => { const fixture = fixtures[fixtureName]; it(`can generate fixture ${fixtureName}`, () => { - expect(generator.generate(fixtureName, fixture)).toMatchSnapshot(); + expect( + generator.generate( + fixtureName, + fixture, + '', + false, + `react/renderer/components/${fixtureName}/`, + ), + ).toMatchSnapshot(); }); }); }); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/GenerateStateCpp-test.js b/packages/react-native-codegen/src/generators/components/__tests__/GenerateStateCpp-test.js index 1ccba96ba02d..218bf057b4aa 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/GenerateStateCpp-test.js +++ b/packages/react-native-codegen/src/generators/components/__tests__/GenerateStateCpp-test.js @@ -21,7 +21,15 @@ describe('GenerateStateCpp', () => { const fixture = fixtures[fixtureName]; it(`can generate fixture ${fixtureName}`, () => { - expect(generator.generate(fixtureName, fixture)).toMatchSnapshot(); + expect( + generator.generate( + fixtureName, + fixture, + '', + false, + `react/renderer/components/${fixtureName}/`, + ), + ).toMatchSnapshot(); }); }); }); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorCpp-test.js.snap new file mode 100644 index 000000000000..84accf396ae9 --- /dev/null +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorCpp-test.js.snap @@ -0,0 +1,816 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`GenerateComponentDescriptorCpp can generate fixture ARRAY_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void ARRAY_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture ARRAY_PROPS_WITH_NESTED_OBJECT 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void ARRAY_PROPS_WITH_NESTED_OBJECT_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture BOOLEAN_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void BOOLEAN_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture COLOR_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void COLOR_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture COMMANDS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void COMMANDS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture COMMANDS_AND_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void COMMANDS_AND_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture DIMENSION_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void DIMENSION_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture DOUBLE_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void DOUBLE_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void EVENT_NESTED_OBJECT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture EVENT_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void EVENT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture EVENTS_WITH_PAPER_NAME 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void EVENTS_WITH_PAPER_NAME_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { + +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture EXCLUDE_ANDROID 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void EXCLUDE_ANDROID_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture EXCLUDE_ANDROID_IOS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void EXCLUDE_ANDROID_IOS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture FLOAT_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void FLOAT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture IMAGE_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void IMAGE_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture INSETS_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void INSETS_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture INT32_ENUM_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void INT32_ENUM_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture INTEGER_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void INTEGER_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture INTERFACE_ONLY 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void INTERFACE_ONLY_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { + +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture MIXED_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void MIXED_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture MULTI_NATIVE_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void MULTI_NATIVE_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture NO_PROPS_NO_EVENTS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void NO_PROPS_NO_EVENTS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture OBJECT_PROPS 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void OBJECT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture POINT_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void POINT_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture STRING_ENUM_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void STRING_ENUM_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture STRING_PROP 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void STRING_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void TWO_COMPONENTS_DIFFERENT_FILES_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; + +exports[`GenerateComponentDescriptorCpp can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = ` +Map { + "ComponentDescriptors.cpp" => " +/** + * 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: GenerateComponentDescriptorCpp.js + */ + +#include +#include +#include + +namespace facebook::react { + +void TWO_COMPONENTS_SAME_FILE_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry) { +registry->add(concreteComponentDescriptorProvider()); +registry->add(concreteComponentDescriptorProvider()); +} + +} // namespace facebook::react +", +} +`; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap index 72653d4c56f2..605f4a219389 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap @@ -16,14 +16,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void ARRAY_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -44,14 +46,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void ARRAY_PROPS_WITH_NESTED_OBJECT_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -72,14 +76,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using BooleanPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void BOOLEAN_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -100,14 +106,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ColorPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void COLOR_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -128,14 +136,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using CommandNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void COMMANDS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -156,14 +166,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using CommandNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void COMMANDS_AND_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -184,14 +196,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using DimensionPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void DIMENSION_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -212,14 +226,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using DoublePropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void DOUBLE_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -240,14 +256,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using EventsNestedObjectNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void EVENT_NESTED_OBJECT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -268,14 +286,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using EventsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void EVENT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -296,14 +316,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +void EVENTS_WITH_PAPER_NAME_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -324,14 +346,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ExcludedAndroidComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void EXCLUDE_ANDROID_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -352,14 +376,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ExcludedAndroidIosComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void EXCLUDE_ANDROID_IOS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -380,15 +406,17 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ExcludedIosComponentComponentDescriptor = ConcreteComponentDescriptor; using MultiFileIncludedNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -409,14 +437,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using FloatPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void FLOAT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -437,14 +467,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ImagePropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void IMAGE_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -465,14 +497,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using InsetsPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void INSETS_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -493,14 +527,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using Int32EnumPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void INT32_ENUM_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -521,14 +557,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using IntegerPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void INTEGER_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -549,14 +587,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +void INTERFACE_ONLY_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -577,14 +617,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using MixedPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void MIXED_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -605,14 +647,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ImageColorPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void MULTI_NATIVE_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -633,14 +677,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using NoPropsNoEventsComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void NO_PROPS_NO_EVENTS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -661,14 +707,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using ObjectPropsComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void OBJECT_PROPS_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -689,14 +737,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using PointPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void POINT_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -717,14 +767,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using StringEnumPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void STRING_ENUM_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -745,14 +797,16 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using StringPropComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void STRING_PROP_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -773,15 +827,17 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using MultiFile1NativeComponentComponentDescriptor = ConcreteComponentDescriptor; using MultiFile2NativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void TWO_COMPONENTS_DIFFERENT_FILES_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; @@ -802,15 +858,17 @@ Map { #include #include +#include -namespace facebook { -namespace react { +namespace facebook::react { using MultiComponent1NativeComponentComponentDescriptor = ConcreteComponentDescriptor; using MultiComponent2NativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +void TWO_COMPONENTS_SAME_FILE_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); + +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentHObjCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentHObjCpp-test.js.snap index b232a9446ff1..c8b74b0aeb27 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentHObjCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentHObjCpp-test.js.snap @@ -222,6 +222,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol RCTCommandNativeComponentViewProtocol - (void)handleRootTag:(double)rootTag; - (void)hotspotUpdate:(NSInteger)x y:(NSInteger)y; +- (void)addItems:(const NSArray *)items; @end RCT_EXTERN inline void RCTCommandNativeComponentHandleCommand( @@ -277,6 +278,26 @@ NSObject *arg1 = args[1]; return; } +if ([commandName isEqualToString:@\\"addItems\\"]) { +#if RCT_DEBUG + if ([args count] != 1) { + RCTLogError(@\\"%@ command %@ received %d arguments, expected %d.\\", @\\"CommandNativeComponent\\", commandName, (int)[args count], 1); + return; + } +#endif + + NSObject *arg0 = args[0]; +#if RCT_DEBUG + if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSArray class], @\\"array\\", @\\"CommandNativeComponent\\", commandName, @\\"1st\\")) { + return; + } +#endif + const NSArray * items = (NSArray *)arg0; + + [componentView addItems:items]; + return; +} + #if RCT_DEBUG RCTLogError(@\\"%@ received command %@, which is not a supported command.\\", @\\"CommandNativeComponent\\", commandName); #endif diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap index 2ec6051506ea..ff3dea1de62b 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap @@ -15,11 +15,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,11 +37,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -63,11 +59,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -87,11 +81,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -111,11 +103,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -135,11 +125,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -159,11 +147,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -183,11 +169,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -207,8 +191,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { void EventsNestedObjectNativeComponentEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -228,8 +211,7 @@ void EventsNestedObjectNativeComponentEventEmitter::onChange(OnChange $event) co }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -249,8 +231,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { void EventsNativeComponentEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -357,8 +338,7 @@ void EventsNativeComponentEventEmitter::onEventWithMixedPropAttribute(OnEventWit }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -378,11 +358,10 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { void InterfaceOnlyComponentEventEmitter::onChange(OnChange $event) const { - dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { + dispatchEvent(\\"paperChange\\", [$event=std::move($event)](jsi::Runtime &runtime) { auto $payload = jsi::Object(runtime); $payload.setProperty(runtime, \\"value\\", $event.value); return $payload; @@ -391,15 +370,14 @@ void InterfaceOnlyComponentEventEmitter::onChange(OnChange $event) const { void InterfaceOnlyComponentEventEmitter::onDirectChange(OnDirectChange $event) const { - dispatchEvent(\\"directChange\\", [$event=std::move($event)](jsi::Runtime &runtime) { + dispatchEvent(\\"paperDirectChange\\", [$event=std::move($event)](jsi::Runtime &runtime) { auto $payload = jsi::Object(runtime); $payload.setProperty(runtime, \\"value\\", $event.value); return $payload; }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -419,11 +397,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -443,11 +419,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -467,12 +441,10 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -492,11 +464,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -516,11 +486,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -540,11 +508,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -564,11 +530,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -588,11 +552,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -612,8 +574,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { void InterfaceOnlyComponentEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -623,8 +584,7 @@ void InterfaceOnlyComponentEventEmitter::onChange(OnChange $event) const { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -644,11 +604,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -668,11 +626,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -692,11 +648,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -716,11 +670,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -740,11 +692,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -764,11 +714,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -788,11 +736,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -812,12 +758,10 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -837,12 +781,10 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap index ca4237ab4d74..b6de40820ccb 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap @@ -16,8 +16,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -25,8 +24,7 @@ class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -47,8 +45,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -56,8 +53,7 @@ class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -78,8 +74,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -87,8 +82,7 @@ class BooleanPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -109,8 +103,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -118,8 +111,7 @@ class ColorPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +132,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -149,8 +140,7 @@ class CommandNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -171,8 +161,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -180,8 +169,7 @@ class CommandNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -202,8 +190,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -211,8 +198,7 @@ class DimensionPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -233,8 +219,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class DoublePropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -242,8 +227,7 @@ class DoublePropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -264,8 +248,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNestedObjectNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -285,8 +268,7 @@ class EventsNestedObjectNativeComponentEventEmitter : public ViewEventEmitter { }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -307,8 +289,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -381,8 +362,7 @@ class EventsNativeComponentEventEmitter : public ViewEventEmitter { void onEventWithMixedPropAttribute(OnEventWithMixedPropAttribute value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -403,8 +383,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -420,8 +399,7 @@ class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { void onDirectChange(OnDirectChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -442,8 +420,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -451,8 +428,7 @@ class ExcludedAndroidComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -473,8 +449,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidIosComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -482,8 +457,7 @@ class ExcludedAndroidIosComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -504,8 +478,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedIosComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -520,8 +493,7 @@ class MultiFileIncludedNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -542,8 +514,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -551,8 +522,7 @@ class FloatPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -573,8 +543,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -582,8 +551,7 @@ class ImagePropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -604,8 +572,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class InsetsPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -613,8 +580,7 @@ class InsetsPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -635,8 +601,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class Int32EnumPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -644,8 +609,7 @@ class Int32EnumPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -666,8 +630,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -675,8 +638,7 @@ class IntegerPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -697,8 +659,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -708,8 +669,7 @@ class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -730,8 +690,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -739,8 +698,7 @@ class MixedPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -761,8 +719,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ImageColorPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -770,8 +727,7 @@ class ImageColorPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -792,8 +748,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -801,8 +756,7 @@ class NoPropsNoEventsComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -823,8 +777,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ObjectPropsEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -832,8 +785,7 @@ class ObjectPropsEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -854,8 +806,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -863,8 +814,7 @@ class PointPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -885,8 +835,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class StringEnumPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -894,8 +843,7 @@ class StringEnumPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -916,8 +864,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -925,8 +872,7 @@ class StringPropComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -947,8 +893,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiFile1NativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -963,8 +908,7 @@ class MultiFile2NativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -985,8 +929,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiComponent1NativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -1001,8 +944,7 @@ class MultiComponent2NativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap index 2dd8e73764b4..8d21560f105d 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap @@ -18,8 +18,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( const PropsParserContext &context, @@ -40,8 +39,7 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( arrayOfArrayOfObject(convertRawProp(context, rawProps, \\"arrayOfArrayOfObject\\", sourceProps.arrayOfArrayOfObject, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -62,8 +60,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( const PropsParserContext &context, @@ -73,8 +70,7 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( nativePrimitives(convertRawProp(context, rawProps, \\"nativePrimitives\\", sourceProps.nativePrimitives, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -95,8 +91,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { BooleanPropNativeComponentProps::BooleanPropNativeComponentProps( const PropsParserContext &context, @@ -106,8 +101,7 @@ BooleanPropNativeComponentProps::BooleanPropNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -128,8 +122,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ColorPropNativeComponentProps::ColorPropNativeComponentProps( const PropsParserContext &context, @@ -139,8 +132,7 @@ ColorPropNativeComponentProps::ColorPropNativeComponentProps( tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -161,8 +153,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { CommandNativeComponentProps::CommandNativeComponentProps( const PropsParserContext &context, @@ -172,8 +163,7 @@ CommandNativeComponentProps::CommandNativeComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -194,8 +184,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { CommandNativeComponentProps::CommandNativeComponentProps( const PropsParserContext &context, @@ -205,8 +194,7 @@ CommandNativeComponentProps::CommandNativeComponentProps( accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -228,8 +216,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { DimensionPropNativeComponentProps::DimensionPropNativeComponentProps( const PropsParserContext &context, @@ -239,8 +226,7 @@ DimensionPropNativeComponentProps::DimensionPropNativeComponentProps( marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -261,8 +247,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { DoublePropNativeComponentProps::DoublePropNativeComponentProps( const PropsParserContext &context, @@ -277,8 +262,7 @@ DoublePropNativeComponentProps::DoublePropNativeComponentProps( blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -299,8 +283,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps( const PropsParserContext &context, @@ -310,8 +293,7 @@ EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -332,8 +314,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventsNativeComponentProps::EventsNativeComponentProps( const PropsParserContext &context, @@ -343,8 +324,7 @@ EventsNativeComponentProps::EventsNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -365,8 +345,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( const PropsParserContext &context, @@ -376,8 +355,7 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -398,8 +376,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ExcludedAndroidComponentProps::ExcludedAndroidComponentProps( const PropsParserContext &context, @@ -409,8 +386,7 @@ ExcludedAndroidComponentProps::ExcludedAndroidComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -431,8 +407,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ExcludedAndroidIosComponentProps::ExcludedAndroidIosComponentProps( const PropsParserContext &context, @@ -442,8 +417,7 @@ ExcludedAndroidIosComponentProps::ExcludedAndroidIosComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -464,8 +438,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ExcludedIosComponentProps::ExcludedIosComponentProps( const PropsParserContext &context, @@ -482,8 +455,7 @@ MultiFileIncludedNativeComponentProps::MultiFileIncludedNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -504,8 +476,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { FloatPropNativeComponentProps::FloatPropNativeComponentProps( const PropsParserContext &context, @@ -520,8 +491,7 @@ FloatPropNativeComponentProps::FloatPropNativeComponentProps( blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -543,8 +513,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ImagePropNativeComponentProps::ImagePropNativeComponentProps( const PropsParserContext &context, @@ -554,8 +523,7 @@ ImagePropNativeComponentProps::ImagePropNativeComponentProps( thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -576,8 +544,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InsetsPropNativeComponentProps::InsetsPropNativeComponentProps( const PropsParserContext &context, @@ -587,8 +554,7 @@ InsetsPropNativeComponentProps::InsetsPropNativeComponentProps( contentInset(convertRawProp(context, rawProps, \\"contentInset\\", sourceProps.contentInset, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -609,8 +575,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { Int32EnumPropsNativeComponentProps::Int32EnumPropsNativeComponentProps( const PropsParserContext &context, @@ -620,8 +585,7 @@ Int32EnumPropsNativeComponentProps::Int32EnumPropsNativeComponentProps( maxInterval(convertRawProp(context, rawProps, \\"maxInterval\\", sourceProps.maxInterval, {Int32EnumPropsNativeComponentMaxInterval::MaxInterval0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -642,8 +606,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { IntegerPropNativeComponentProps::IntegerPropNativeComponentProps( const PropsParserContext &context, @@ -655,8 +618,7 @@ IntegerPropNativeComponentProps::IntegerPropNativeComponentProps( progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -677,8 +639,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( const PropsParserContext &context, @@ -688,8 +649,7 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -711,8 +671,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MixedPropNativeComponentProps::MixedPropNativeComponentProps( const PropsParserContext &context, @@ -722,8 +681,7 @@ MixedPropNativeComponentProps::MixedPropNativeComponentProps( mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -745,8 +703,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ImageColorPropNativeComponentProps::ImageColorPropNativeComponentProps( const PropsParserContext &context, @@ -759,8 +716,7 @@ ImageColorPropNativeComponentProps::ImageColorPropNativeComponentProps( point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -781,8 +737,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { NoPropsNoEventsComponentProps::NoPropsNoEventsComponentProps( const PropsParserContext &context, @@ -792,8 +747,7 @@ NoPropsNoEventsComponentProps::NoPropsNoEventsComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -815,8 +769,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ObjectPropsProps::ObjectPropsProps( const PropsParserContext &context, @@ -826,8 +779,7 @@ ObjectPropsProps::ObjectPropsProps( objectProp(convertRawProp(context, rawProps, \\"objectProp\\", sourceProps.objectProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -848,8 +800,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { PointPropNativeComponentProps::PointPropNativeComponentProps( const PropsParserContext &context, @@ -859,8 +810,7 @@ PointPropNativeComponentProps::PointPropNativeComponentProps( startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -881,8 +831,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { StringEnumPropsNativeComponentProps::StringEnumPropsNativeComponentProps( const PropsParserContext &context, @@ -892,8 +841,7 @@ StringEnumPropsNativeComponentProps::StringEnumPropsNativeComponentProps( alignment(convertRawProp(context, rawProps, \\"alignment\\", sourceProps.alignment, {StringEnumPropsNativeComponentAlignment::Center})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -914,8 +862,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { StringPropComponentProps::StringPropComponentProps( const PropsParserContext &context, @@ -926,8 +873,7 @@ StringPropComponentProps::StringPropComponentProps( accessibilityRole(convertRawProp(context, rawProps, \\"accessibilityRole\\", sourceProps.accessibilityRole, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -948,8 +894,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MultiFile1NativeComponentProps::MultiFile1NativeComponentProps( const PropsParserContext &context, @@ -966,8 +911,7 @@ MultiFile2NativeComponentProps::MultiFile2NativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -988,8 +932,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MultiComponent1NativeComponentProps::MultiComponent1NativeComponentProps( const PropsParserContext &context, @@ -1006,8 +949,7 @@ MultiComponent2NativeComponentProps::MultiComponent2NativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap index d22ef6b85965..fea966233c4e 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap @@ -23,8 +23,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentSizesMask = uint32_t; @@ -82,7 +81,7 @@ static inline std::string toString(const ArrayPropsNativeComponentSizesMask &val return result; } struct ArrayPropsNativeComponentObjectStruct { - std::string stringProp; + std::string stringProp{\\"\\"}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentObjectStruct &result) { @@ -109,7 +108,7 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu struct ArrayPropsNativeComponentArrayObjectStruct { - std::string stringProp; + std::string stringProp{\\"\\"}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayObjectStruct &result) { @@ -136,7 +135,7 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu struct ArrayPropsNativeComponentArrayStruct { - std::vector object; + std::vector object{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayStruct &result) { @@ -163,7 +162,7 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu struct ArrayPropsNativeComponentArrayOfArrayOfObjectStruct { - std::string stringProp; + std::string stringProp{\\"\\"}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayOfArrayOfObjectStruct &result) { @@ -213,8 +212,7 @@ class ArrayPropsNativeComponentProps final : public ViewProps { std::vector> arrayOfArrayOfObject{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -241,13 +239,12 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct ArrayPropsNativeComponentNativePrimitivesStruct { - std::vector colors; - std::vector srcs; - std::vector points; + std::vector colors{}; + std::vector srcs{}; + std::vector points{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentNativePrimitivesStruct &result) { @@ -290,8 +287,7 @@ class ArrayPropsNativeComponentProps final : public ViewProps { std::vector nativePrimitives{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -312,8 +308,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentProps final : public ViewProps { public: @@ -325,8 +320,7 @@ class BooleanPropNativeComponentProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -348,8 +342,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentProps final : public ViewProps { public: @@ -361,8 +354,7 @@ class ColorPropNativeComponentProps final : public ViewProps { SharedColor tintColor{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -383,8 +375,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentProps final : public ViewProps { public: @@ -396,8 +387,7 @@ class CommandNativeComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -418,8 +408,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentProps final : public ViewProps { public: @@ -431,8 +420,7 @@ class CommandNativeComponentProps final : public ViewProps { std::string accessibilityHint{\\"\\"}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -454,8 +442,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentProps final : public ViewProps { public: @@ -467,8 +454,7 @@ class DimensionPropNativeComponentProps final : public ViewProps { YGValue marginBack{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -489,8 +475,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DoublePropNativeComponentProps final : public ViewProps { public: @@ -507,8 +492,7 @@ class DoublePropNativeComponentProps final : public ViewProps { double blurRadius6{0.0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -529,8 +513,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNestedObjectNativeComponentProps final : public ViewProps { public: @@ -542,8 +525,7 @@ class EventsNestedObjectNativeComponentProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -564,8 +546,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNativeComponentProps final : public ViewProps { public: @@ -577,8 +558,7 @@ class EventsNativeComponentProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -599,8 +579,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentProps final : public ViewProps { public: @@ -612,8 +591,7 @@ class InterfaceOnlyComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -634,8 +612,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidComponentProps final : public ViewProps { public: @@ -647,8 +624,7 @@ class ExcludedAndroidComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -669,8 +645,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidIosComponentProps final : public ViewProps { public: @@ -682,8 +657,7 @@ class ExcludedAndroidIosComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -704,8 +678,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedIosComponentProps final : public ViewProps { public: @@ -727,8 +700,7 @@ class MultiFileIncludedNativeComponentProps final : public ViewProps { bool disabled{true}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -749,8 +721,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropNativeComponentProps final : public ViewProps { public: @@ -767,8 +738,7 @@ class FloatPropNativeComponentProps final : public ViewProps { Float blurRadius6{0.0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -790,8 +760,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentProps final : public ViewProps { public: @@ -803,8 +772,7 @@ class ImagePropNativeComponentProps final : public ViewProps { ImageSource thumbImage{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -826,8 +794,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InsetsPropNativeComponentProps final : public ViewProps { public: @@ -839,8 +806,7 @@ class InsetsPropNativeComponentProps final : public ViewProps { EdgeInsets contentInset{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -861,8 +827,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class Int32EnumPropsNativeComponentMaxInterval { MaxInterval0 = 0, MaxInterval1 = 1, MaxInterval2 = 2 }; @@ -901,8 +866,7 @@ class Int32EnumPropsNativeComponentProps final : public ViewProps { Int32EnumPropsNativeComponentMaxInterval maxInterval{Int32EnumPropsNativeComponentMaxInterval::MaxInterval0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -923,8 +887,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentProps final : public ViewProps { public: @@ -938,8 +901,7 @@ class IntegerPropNativeComponentProps final : public ViewProps { int progress3{10}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -960,8 +922,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentProps final : public ViewProps { public: @@ -973,8 +934,7 @@ class InterfaceOnlyComponentProps final : public ViewProps { std::string accessibilityHint{\\"\\"}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -995,8 +955,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentProps final : public ViewProps { public: @@ -1008,8 +967,7 @@ class MixedPropNativeComponentProps final : public ViewProps { folly::dynamic mixedProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1033,8 +991,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImageColorPropNativeComponentProps final : public ViewProps { public: @@ -1049,8 +1006,7 @@ class ImageColorPropNativeComponentProps final : public ViewProps { Point point{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1071,8 +1027,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsComponentProps final : public ViewProps { public: @@ -1084,8 +1039,7 @@ class NoPropsNoEventsComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1112,8 +1066,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class ObjectPropsStringEnumProp { Option1 }; @@ -1147,7 +1100,7 @@ static inline std::string toString(const ObjectPropsIntEnumProp &value) { } } struct ObjectPropsObjectPropObjectArrayPropStruct { - std::vector array; + std::vector array{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropObjectArrayPropStruct &result) { @@ -1164,9 +1117,9 @@ static inline std::string toString(const ObjectPropsObjectPropObjectArrayPropStr } struct ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct { - ImageSource image; - SharedColor color; - Point point; + ImageSource image{}; + SharedColor color{}; + Point point{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct &result) { @@ -1191,7 +1144,7 @@ static inline std::string toString(const ObjectPropsObjectPropObjectPrimitiveReq } struct ObjectPropsObjectPropNestedPropANestedPropBStruct { - std::string nestedPropC; + std::string nestedPropC{\\"\\"}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedPropANestedPropBStruct &result) { @@ -1208,7 +1161,7 @@ static inline std::string toString(const ObjectPropsObjectPropNestedPropANestedP } struct ObjectPropsObjectPropNestedPropAStruct { - ObjectPropsObjectPropNestedPropANestedPropBStruct nestedPropB; + ObjectPropsObjectPropNestedPropANestedPropBStruct nestedPropB{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedPropAStruct &result) { @@ -1225,7 +1178,7 @@ static inline std::string toString(const ObjectPropsObjectPropNestedPropAStruct } struct ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct { - std::string stringProp; + std::string stringProp{\\"\\"}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct &result) { @@ -1252,7 +1205,7 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu struct ObjectPropsObjectPropNestedArrayAsPropertyStruct { - std::vector arrayProp; + std::vector arrayProp{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedArrayAsPropertyStruct &result) { @@ -1269,16 +1222,20 @@ static inline std::string toString(const ObjectPropsObjectPropNestedArrayAsPrope } struct ObjectPropsObjectPropStruct { - std::string stringProp; - bool booleanProp; - Float floatProp; - int intProp; - ObjectPropsStringEnumProp stringEnumProp; - ObjectPropsIntEnumProp intEnumProp; - ObjectPropsObjectPropObjectArrayPropStruct objectArrayProp; - ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp; - ObjectPropsObjectPropNestedPropAStruct nestedPropA; - ObjectPropsObjectPropNestedArrayAsPropertyStruct nestedArrayAsProperty; + std::string stringProp{\\"\\"}; + bool booleanProp{false}; + Float floatProp{0.0}; + int intProp{0}; + std::string stringUserDefaultProp{\\"user_default\\"}; + bool booleanUserDefaultProp{true}; + Float floatUserDefaultProp{3.14}; + int intUserDefaultProp{9999}; + ObjectPropsStringEnumProp stringEnumProp{ObjectPropsStringEnumProp::Option1}; + ObjectPropsIntEnumProp intEnumProp{ObjectPropsIntEnumProp::IntEnumProp0}; + ObjectPropsObjectPropObjectArrayPropStruct objectArrayProp{}; + ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{}; + ObjectPropsObjectPropNestedPropAStruct nestedPropA{}; + ObjectPropsObjectPropNestedArrayAsPropertyStruct nestedArrayAsProperty{}; }; static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropStruct &result) { @@ -1300,6 +1257,22 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu if (tmp_intProp != map.end()) { fromRawValue(context, tmp_intProp->second, result.intProp); } + auto tmp_stringUserDefaultProp = map.find(\\"stringUserDefaultProp\\"); + if (tmp_stringUserDefaultProp != map.end()) { + fromRawValue(context, tmp_stringUserDefaultProp->second, result.stringUserDefaultProp); + } + auto tmp_booleanUserDefaultProp = map.find(\\"booleanUserDefaultProp\\"); + if (tmp_booleanUserDefaultProp != map.end()) { + fromRawValue(context, tmp_booleanUserDefaultProp->second, result.booleanUserDefaultProp); + } + auto tmp_floatUserDefaultProp = map.find(\\"floatUserDefaultProp\\"); + if (tmp_floatUserDefaultProp != map.end()) { + fromRawValue(context, tmp_floatUserDefaultProp->second, result.floatUserDefaultProp); + } + auto tmp_intUserDefaultProp = map.find(\\"intUserDefaultProp\\"); + if (tmp_intUserDefaultProp != map.end()) { + fromRawValue(context, tmp_intUserDefaultProp->second, result.intUserDefaultProp); + } auto tmp_stringEnumProp = map.find(\\"stringEnumProp\\"); if (tmp_stringEnumProp != map.end()) { fromRawValue(context, tmp_stringEnumProp->second, result.stringEnumProp); @@ -1339,8 +1312,7 @@ class ObjectPropsProps final : public ViewProps { ObjectPropsObjectPropStruct objectProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1362,8 +1334,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentProps final : public ViewProps { public: @@ -1375,8 +1346,7 @@ class PointPropNativeComponentProps final : public ViewProps { Point startPoint{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1397,8 +1367,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class StringEnumPropsNativeComponentAlignment { Top, Center, BottomRight }; @@ -1428,8 +1397,7 @@ class StringEnumPropsNativeComponentProps final : public ViewProps { StringEnumPropsNativeComponentAlignment alignment{StringEnumPropsNativeComponentAlignment::Center}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1450,8 +1418,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropComponentProps final : public ViewProps { public: @@ -1464,8 +1431,7 @@ class StringPropComponentProps final : public ViewProps { std::string accessibilityRole{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1486,8 +1452,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiFile1NativeComponentProps final : public ViewProps { public: @@ -1509,8 +1474,7 @@ class MultiFile2NativeComponentProps final : public ViewProps { bool disabled{true}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1531,8 +1495,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiComponent1NativeComponentProps final : public ViewProps { public: @@ -1554,8 +1517,7 @@ class MultiComponent2NativeComponentProps final : public ViewProps { bool disabled{true}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaDelegate-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaDelegate-test.js.snap index 9bec5993102b..3e4de5ef9848 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaDelegate-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaDelegate-test.js.snap @@ -271,6 +271,9 @@ public class CommandNativeComponentManagerDelegate { void setAccessibilityHint(T view, @Nullable String value); void handleRootTag(T view, double rootTag); void hotspotUpdate(T view, int x, int y); + void addItems(T view, ReadableArray items); } ", } diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaPojo-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaPojo-test.js.snap index 47ce16d68f18..fe1eaec379e5 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaPojo-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaPojo-test.js.snap @@ -1024,6 +1024,10 @@ public class ObjectPropsPropsObjectProp { private boolean mBooleanProp; private float mFloatProp; private int mIntProp; + private @Nullable String mStringUserDefaultProp; + private boolean mBooleanUserDefaultProp; + private float mFloatUserDefaultProp; + private int mIntUserDefaultProp; private @Nullable String mStringEnumProp; private @Nullable Integer mIntEnumProp; private ObjectPropsPropsObjectPropObjectArrayProp mObjectArrayProp; @@ -1047,6 +1051,22 @@ public class ObjectPropsPropsObjectProp { return mIntProp; } @DoNotStrip + public @Nullable String getStringUserDefaultProp() { + return mStringUserDefaultProp; + } + @DoNotStrip + public boolean getBooleanUserDefaultProp() { + return mBooleanUserDefaultProp; + } + @DoNotStrip + public float getFloatUserDefaultProp() { + return mFloatUserDefaultProp; + } + @DoNotStrip + public int getIntUserDefaultProp() { + return mIntUserDefaultProp; + } + @DoNotStrip public @Nullable String getStringEnumProp() { return mStringEnumProp; } diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap index 6172d9ae6257..fb6c6404a1ee 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap @@ -14,13 +14,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ArrayPropsNativeComponentComponentName[] = \\"ArrayPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,13 +37,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ArrayPropsNativeComponentComponentName[] = \\"ArrayPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -64,13 +60,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char BooleanPropNativeComponentComponentName[] = \\"BooleanPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -89,13 +83,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ColorPropNativeComponentComponentName[] = \\"ColorPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -114,13 +106,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char CommandNativeComponentComponentName[] = \\"CommandNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -139,13 +129,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char CommandNativeComponentComponentName[] = \\"CommandNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -164,13 +152,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char DimensionPropNativeComponentComponentName[] = \\"DimensionPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -189,13 +175,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char DoublePropNativeComponentComponentName[] = \\"DoublePropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -214,13 +198,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventsNestedObjectNativeComponentComponentName[] = \\"EventsNestedObjectNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -239,13 +221,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventsNativeComponentComponentName[] = \\"EventsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -264,13 +244,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -289,13 +267,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ExcludedAndroidComponentComponentName[] = \\"ExcludedAndroidComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -314,13 +290,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ExcludedAndroidIosComponentComponentName[] = \\"ExcludedAndroidIosComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -339,14 +313,12 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ExcludedIosComponentComponentName[] = \\"ExcludedIosComponent\\"; extern const char MultiFileIncludedNativeComponentComponentName[] = \\"MultiFileIncludedNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -365,13 +337,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char FloatPropNativeComponentComponentName[] = \\"FloatPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -390,13 +360,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ImagePropNativeComponentComponentName[] = \\"ImagePropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -415,13 +383,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char InsetsPropNativeComponentComponentName[] = \\"InsetsPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -440,13 +406,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char Int32EnumPropsNativeComponentComponentName[] = \\"Int32EnumPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -465,13 +429,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char IntegerPropNativeComponentComponentName[] = \\"IntegerPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -490,13 +452,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -515,13 +475,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MixedPropNativeComponentComponentName[] = \\"MixedPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -540,13 +498,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ImageColorPropNativeComponentComponentName[] = \\"ImageColorPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -565,13 +521,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char NoPropsNoEventsComponentComponentName[] = \\"NoPropsNoEventsComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -590,13 +544,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ObjectPropsComponentName[] = \\"ObjectProps\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -615,13 +567,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char PointPropNativeComponentComponentName[] = \\"PointPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -640,13 +590,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char StringEnumPropsNativeComponentComponentName[] = \\"StringEnumPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -665,13 +613,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char StringPropComponentComponentName[] = \\"StringPropComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -690,14 +636,12 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MultiFile1NativeComponentComponentName[] = \\"MultiFile1NativeComponent\\"; extern const char MultiFile2NativeComponentComponentName[] = \\"MultiFile2NativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -716,14 +660,12 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MultiComponent1NativeComponentComponentName[] = \\"MultiComponent1NativeComponent\\"; extern const char MultiComponent2NativeComponentComponentName[] = \\"MultiComponent2NativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap index f8e76bfa9e41..00c65ca1865c 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap @@ -20,8 +20,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[]; @@ -34,8 +33,7 @@ using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentEventEmitter, ArrayPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -60,8 +58,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[]; @@ -74,8 +71,7 @@ using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentEventEmitter, ArrayPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -100,8 +96,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char BooleanPropNativeComponentComponentName[]; @@ -114,8 +109,7 @@ using BooleanPropNativeComponentShadowNode = ConcreteViewShadowNode< BooleanPropNativeComponentEventEmitter, BooleanPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +134,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ColorPropNativeComponentComponentName[]; @@ -154,8 +147,7 @@ using ColorPropNativeComponentShadowNode = ConcreteViewShadowNode< ColorPropNativeComponentEventEmitter, ColorPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -180,8 +172,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char CommandNativeComponentComponentName[]; @@ -194,8 +185,7 @@ using CommandNativeComponentShadowNode = ConcreteViewShadowNode< CommandNativeComponentEventEmitter, CommandNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -220,8 +210,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char CommandNativeComponentComponentName[]; @@ -234,8 +223,7 @@ using CommandNativeComponentShadowNode = ConcreteViewShadowNode< CommandNativeComponentEventEmitter, CommandNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -260,8 +248,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char DimensionPropNativeComponentComponentName[]; @@ -274,8 +261,7 @@ using DimensionPropNativeComponentShadowNode = ConcreteViewShadowNode< DimensionPropNativeComponentEventEmitter, DimensionPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -300,8 +286,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char DoublePropNativeComponentComponentName[]; @@ -314,8 +299,7 @@ using DoublePropNativeComponentShadowNode = ConcreteViewShadowNode< DoublePropNativeComponentEventEmitter, DoublePropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -340,8 +324,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventsNestedObjectNativeComponentComponentName[]; @@ -354,8 +337,7 @@ using EventsNestedObjectNativeComponentShadowNode = ConcreteViewShadowNode< EventsNestedObjectNativeComponentEventEmitter, EventsNestedObjectNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -380,8 +362,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventsNativeComponentComponentName[]; @@ -394,8 +375,7 @@ using EventsNativeComponentShadowNode = ConcreteViewShadowNode< EventsNativeComponentEventEmitter, EventsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -420,13 +400,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -451,8 +429,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ExcludedAndroidComponentComponentName[]; @@ -465,8 +442,7 @@ using ExcludedAndroidComponentShadowNode = ConcreteViewShadowNode< ExcludedAndroidComponentEventEmitter, ExcludedAndroidComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -491,8 +467,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ExcludedAndroidIosComponentComponentName[]; @@ -505,8 +480,7 @@ using ExcludedAndroidIosComponentShadowNode = ConcreteViewShadowNode< ExcludedAndroidIosComponentEventEmitter, ExcludedAndroidIosComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -531,8 +505,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ExcludedIosComponentComponentName[]; @@ -556,8 +529,7 @@ using MultiFileIncludedNativeComponentShadowNode = ConcreteViewShadowNode< MultiFileIncludedNativeComponentEventEmitter, MultiFileIncludedNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -582,8 +554,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char FloatPropNativeComponentComponentName[]; @@ -596,8 +567,7 @@ using FloatPropNativeComponentShadowNode = ConcreteViewShadowNode< FloatPropNativeComponentEventEmitter, FloatPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -622,8 +592,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ImagePropNativeComponentComponentName[]; @@ -636,8 +605,7 @@ using ImagePropNativeComponentShadowNode = ConcreteViewShadowNode< ImagePropNativeComponentEventEmitter, ImagePropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -662,8 +630,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char InsetsPropNativeComponentComponentName[]; @@ -676,8 +643,7 @@ using InsetsPropNativeComponentShadowNode = ConcreteViewShadowNode< InsetsPropNativeComponentEventEmitter, InsetsPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -702,8 +668,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char Int32EnumPropsNativeComponentComponentName[]; @@ -716,8 +681,7 @@ using Int32EnumPropsNativeComponentShadowNode = ConcreteViewShadowNode< Int32EnumPropsNativeComponentEventEmitter, Int32EnumPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -742,8 +706,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char IntegerPropNativeComponentComponentName[]; @@ -756,8 +719,7 @@ using IntegerPropNativeComponentShadowNode = ConcreteViewShadowNode< IntegerPropNativeComponentEventEmitter, IntegerPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -782,13 +744,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -813,8 +773,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MixedPropNativeComponentComponentName[]; @@ -827,8 +786,7 @@ using MixedPropNativeComponentShadowNode = ConcreteViewShadowNode< MixedPropNativeComponentEventEmitter, MixedPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -853,8 +811,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ImageColorPropNativeComponentComponentName[]; @@ -867,8 +824,7 @@ using ImageColorPropNativeComponentShadowNode = ConcreteViewShadowNode< ImageColorPropNativeComponentEventEmitter, ImageColorPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -893,8 +849,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char NoPropsNoEventsComponentComponentName[]; @@ -907,8 +862,7 @@ using NoPropsNoEventsComponentShadowNode = ConcreteViewShadowNode< NoPropsNoEventsComponentEventEmitter, NoPropsNoEventsComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -933,8 +887,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ObjectPropsComponentName[]; @@ -947,8 +900,7 @@ using ObjectPropsShadowNode = ConcreteViewShadowNode< ObjectPropsEventEmitter, ObjectPropsState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -973,8 +925,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char PointPropNativeComponentComponentName[]; @@ -987,8 +938,7 @@ using PointPropNativeComponentShadowNode = ConcreteViewShadowNode< PointPropNativeComponentEventEmitter, PointPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1013,8 +963,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char StringEnumPropsNativeComponentComponentName[]; @@ -1027,8 +976,7 @@ using StringEnumPropsNativeComponentShadowNode = ConcreteViewShadowNode< StringEnumPropsNativeComponentEventEmitter, StringEnumPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1053,8 +1001,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char StringPropComponentComponentName[]; @@ -1067,8 +1014,7 @@ using StringPropComponentShadowNode = ConcreteViewShadowNode< StringPropComponentEventEmitter, StringPropComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1093,8 +1039,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MultiFile1NativeComponentComponentName[]; @@ -1118,8 +1063,7 @@ using MultiFile2NativeComponentShadowNode = ConcreteViewShadowNode< MultiFile2NativeComponentEventEmitter, MultiFile2NativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1144,8 +1088,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MultiComponent1NativeComponentComponentName[]; @@ -1169,8 +1112,7 @@ using MultiComponent2NativeComponentShadowNode = ConcreteViewShadowNode< MultiComponent2NativeComponentEventEmitter, MultiComponent2NativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap index 81112bcefb78..0a4a8d39f160 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap @@ -13,13 +13,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -37,13 +35,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -61,13 +57,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -85,13 +79,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -109,13 +101,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -133,13 +123,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -157,13 +145,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -181,13 +167,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -205,13 +189,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -229,13 +211,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -253,13 +233,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -277,13 +255,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -301,13 +277,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -325,13 +299,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -349,13 +321,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -373,13 +343,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -397,13 +365,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -421,13 +387,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -445,13 +409,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -469,13 +431,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -493,13 +453,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -517,13 +475,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -541,13 +497,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -565,13 +519,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -589,13 +541,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -613,13 +563,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -637,13 +585,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -661,13 +607,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -685,13 +629,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap index c295dcfc57a1..58b9b1d9ca3d 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap @@ -18,8 +18,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentState { public: @@ -36,8 +35,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -59,8 +57,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentState { public: @@ -77,8 +74,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -100,8 +96,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentState { public: @@ -118,8 +113,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -141,8 +135,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentState { public: @@ -159,8 +152,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -182,8 +174,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentState { public: @@ -200,8 +191,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -223,8 +213,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentState { public: @@ -241,8 +230,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -264,8 +252,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentState { public: @@ -282,8 +269,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -305,8 +291,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class DoublePropNativeComponentState { public: @@ -323,8 +308,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -346,8 +330,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class EventsNestedObjectNativeComponentState { public: @@ -364,8 +347,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -387,8 +369,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class EventsNativeComponentState { public: @@ -405,8 +386,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -428,13 +408,11 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -456,8 +434,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidComponentState { public: @@ -474,8 +451,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -497,8 +473,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidIosComponentState { public: @@ -515,8 +490,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -538,8 +512,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedIosComponentState { public: @@ -571,8 +544,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -594,8 +566,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropNativeComponentState { public: @@ -612,8 +583,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -635,8 +605,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentState { public: @@ -653,8 +622,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -676,8 +644,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class InsetsPropNativeComponentState { public: @@ -694,8 +661,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -717,8 +683,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class Int32EnumPropsNativeComponentState { public: @@ -735,8 +700,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -758,8 +722,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentState { public: @@ -776,8 +739,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -799,13 +761,11 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -827,8 +787,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentState { public: @@ -845,8 +804,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -868,8 +826,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ImageColorPropNativeComponentState { public: @@ -886,8 +843,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -909,8 +865,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsComponentState { public: @@ -927,8 +882,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -950,8 +904,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ObjectPropsState { public: @@ -968,8 +921,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -991,8 +943,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentState { public: @@ -1009,8 +960,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1032,8 +982,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class StringEnumPropsNativeComponentState { public: @@ -1050,8 +999,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1073,8 +1021,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class StringPropComponentState { public: @@ -1091,8 +1038,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1114,8 +1060,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class MultiFile1NativeComponentState { public: @@ -1147,8 +1092,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1170,8 +1114,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class MultiComponent1NativeComponentState { public: @@ -1203,7 +1146,6 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderH-test.js.snap index f1b25981b317..e20b751dda78 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderH-test.js.snap @@ -22,7 +22,7 @@ extern \\"C\\" { #endif Class RCTThirdPartyFabricComponentsProvider(const char *name); - +#if RCT_NEW_ARCH_ENABLED #ifndef RCT_DYNAMIC_FRAMEWORKS Class NoPropsNoEventsComponentCls(void) __attribute__((used)); // NO_PROPS_NO_EVENTS @@ -57,6 +57,7 @@ Class ExcludedAndroidComponentCls(void) __attribute__( Class MultiFileIncludedNativeComponentCls(void) __attribute__((used)); // EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES +#endif #endif #ifdef __cplusplus diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderObjCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderObjCpp-test.js.snap index eb6d622917a2..7543550f9946 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderObjCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderObjCpp-test.js.snap @@ -21,6 +21,7 @@ Map { Class RCTThirdPartyFabricComponentsProvider(const char *name) { static std::unordered_map sFabricComponentsClassMap = { + #if RCT_NEW_ARCH_ENABLED #ifndef RCT_DYNAMIC_FRAMEWORKS {\\"NoPropsNoEventsComponent\\", NoPropsNoEventsComponentCls}, // NO_PROPS_NO_EVENTS @@ -70,7 +71,8 @@ Class RCTThirdPartyFabricComponentsProvider(const char {\\"MultiComponent1NativeComponent\\", MultiComponent1NativeComponentCls}, // TWO_COMPONENTS_SAME_FILE, {\\"MultiComponent2NativeComponent\\", MultiComponent2NativeComponentCls}, // TWO_COMPONENTS_SAME_FILE - {\\"MultiFile1NativeComponent\\", MultiFile1NativeComponentCls}, // TWO_COMPONENTS_DIFFERENT_FILES, + {\\"MultiFile1NativeComponent\\", MultiFile1NativeComponentCls}, // TWO_COMPONENTS_DIFFERENT_FILES + {\\"MultiFile2NativeComponent\\", MultiFile2NativeComponentCls}, // TWO_COMPONENTS_DIFFERENT_FILES {\\"CommandNativeComponent\\", CommandNativeComponentCls}, // COMMANDS @@ -82,6 +84,7 @@ Class RCTThirdPartyFabricComponentsProvider(const char {\\"MultiFileIncludedNativeComponent\\", MultiFileIncludedNativeComponentCls}, // EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES #endif + #endif }; auto p = sFabricComponentsClassMap.find(name); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap index e88cd1abe901..8212d94634c7 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap @@ -234,6 +234,10 @@ export const Commands = { hotspotUpdate(ref, x, y) { dispatchCommand(ref, \\"hotspotUpdate\\", [x, y]); + }, + + addItems(ref, items) { + dispatchCommand(ref, \\"addItems\\", [items]); } }; ", @@ -468,7 +472,7 @@ export const __INTERNAL_VIEW_CONFIG = { uiViewClassName: 'RCTInterfaceOnlyComponent', bubblingEventTypes: { - paperChange: { + topPaperChange: { phasedRegistrationNames: { captured: 'onChangeCapture', bubbled: 'onChange', @@ -477,7 +481,7 @@ export const __INTERNAL_VIEW_CONFIG = { }, directEventTypes: { - paperDirectChange: { + topPaperDirectChange: { registrationName: 'onDirectChange', }, }, diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleCpp.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleCpp.js index fa02920516e5..e435945e5c7f 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleCpp.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleCpp.js @@ -11,19 +11,19 @@ 'use strict'; import type { - SchemaType, - Nullable, NamedShape, - NativeModulePropertyShape, + NativeModuleEnumMap, NativeModuleFunctionTypeAnnotation, NativeModuleParamTypeAnnotation, + NativeModulePropertyShape, NativeModuleTypeAnnotation, - NativeModuleEnumMap, + Nullable, + SchemaType, } from '../../CodegenSchema'; - import type {AliasResolver} from './Utils'; -const {createAliasResolver, getModules} = require('./Utils'); + const {unwrapNullable} = require('../../parsers/parsers-commons'); +const {createAliasResolver, getModules} = require('./Utils'); type FilesOutput = Map; @@ -101,14 +101,12 @@ const FileTemplate = ({ #include "${libraryName}JSI.h" -namespace facebook { -namespace react { +namespace facebook::react { ${modules} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; }; @@ -236,6 +234,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const nativeModules = getModules(schema); diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleH.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleH.js index e2107bde8f8f..6cfbdd060972 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleH.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleH.js @@ -10,33 +10,33 @@ 'use strict'; import type { - NativeModuleBaseTypeAnnotation, NamedShape, + NativeModuleBaseTypeAnnotation, } from '../../CodegenSchema'; - import type { - Nullable, - SchemaType, - NativeModuleTypeAnnotation, - NativeModuleFunctionTypeAnnotation, - NativeModulePropertyShape, NativeModuleAliasMap, NativeModuleEnumMap, NativeModuleEnumMembers, NativeModuleEnumMemberType, + NativeModuleFunctionTypeAnnotation, + NativeModulePropertyShape, + NativeModuleTypeAnnotation, + Nullable, + SchemaType, } from '../../CodegenSchema'; - import type {AliasResolver} from './Utils'; +const {unwrapNullable} = require('../../parsers/parsers-commons'); +const {wrapOptional} = require('../TypeUtils/Cxx'); const {getEnumName, toSafeCppString} = require('../Utils'); - +const {indent} = require('../Utils'); const { createAliasResolver, - getModules, getAreEnumMembersInteger, + getModules, + isArrayRecursiveMember, + isDirectRecursiveMember, } = require('./Utils'); -const {indent} = require('../Utils'); -const {unwrapNullable} = require('../../parsers/parsers-commons'); type FilesOutput = Map; @@ -83,7 +83,7 @@ public: protected: ${hasteModuleName}CxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{${hasteModuleName}CxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public ${hasteModuleName}CxxSpecJSI { @@ -120,18 +120,17 @@ const FileTemplate = ({ #include #include -namespace facebook { -namespace react { +namespace facebook::react { ${modules.join('\n\n')} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; }; function translatePrimitiveJSTypeToCpp( moduleName: string, + parentObjectAliasName: ?string, nullableTypeAnnotation: Nullable, optional: boolean, createErrorMessage: (typeName: string) => string, @@ -141,22 +140,21 @@ function translatePrimitiveJSTypeToCpp( const [typeAnnotation, nullable] = unwrapNullable( nullableTypeAnnotation, ); - const isRequired = !optional && !nullable; - + const isRecursiveType = isDirectRecursiveMember( + parentObjectAliasName, + nullableTypeAnnotation, + ); + const isRequired = (!optional && !nullable) || isRecursiveType; 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'); + return wrapOptional('double', isRequired); default: (realTypeAnnotation.name: empty); throw new Error(createErrorMessage(realTypeAnnotation.name)); @@ -164,53 +162,49 @@ function translatePrimitiveJSTypeToCpp( case 'VoidTypeAnnotation': return 'void'; case 'StringTypeAnnotation': - return wrap('jsi::String'); + return wrapOptional('jsi::String', isRequired); case 'NumberTypeAnnotation': - return wrap('double'); + return wrapOptional('double', isRequired); case 'DoubleTypeAnnotation': - return wrap('double'); + return wrapOptional('double', isRequired); case 'FloatTypeAnnotation': - return wrap('double'); + return wrapOptional('double', isRequired); case 'Int32TypeAnnotation': - return wrap('int'); + return wrapOptional('int', isRequired); case 'BooleanTypeAnnotation': - return wrap('bool'); + return wrapOptional('bool', isRequired); case 'EnumDeclaration': switch (realTypeAnnotation.memberType) { case 'NumberTypeAnnotation': - return getAreEnumMembersInteger( - enumMap[realTypeAnnotation.name].members, - ) - ? wrap('int') - : wrap('double'); + return wrapOptional('jsi::Value', isRequired); case 'StringTypeAnnotation': - return wrap('jsi::String'); + return wrapOptional('jsi::String', isRequired); default: throw new Error(createErrorMessage(realTypeAnnotation.type)); } case 'GenericObjectTypeAnnotation': - return wrap('jsi::Object'); + return wrapOptional('jsi::Object', isRequired); case 'UnionTypeAnnotation': switch (typeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrap('double'); + return wrapOptional('double', isRequired); case 'ObjectTypeAnnotation': - return wrap('jsi::Object'); + return wrapOptional('jsi::Object', isRequired); case 'StringTypeAnnotation': - return wrap('jsi::String'); + return wrapOptional('jsi::String', isRequired); default: throw new Error(createErrorMessage(realTypeAnnotation.type)); } case 'ObjectTypeAnnotation': - return wrap('jsi::Object'); + return wrapOptional('jsi::Object', isRequired); case 'ArrayTypeAnnotation': - return wrap('jsi::Array'); + return wrapOptional('jsi::Array', isRequired); case 'FunctionTypeAnnotation': - return wrap('jsi::Function'); + return wrapOptional('jsi::Function', isRequired); case 'PromiseTypeAnnotation': - return wrap('jsi::Value'); + return wrapOptional('jsi::Value', isRequired); case 'MixedTypeAnnotation': - return wrap('jsi::Value'); + return wrapOptional('jsi::Value', isRequired); default: (realTypeAnnotation.type: empty); throw new Error(createErrorMessage(realTypeAnnotation.type)); @@ -224,10 +218,12 @@ function createStructsString( enumMap: NativeModuleEnumMap, ): string { const getCppType = ( + parentObjectAlias: string, v: NamedShape>, ) => translatePrimitiveJSTypeToCpp( moduleName, + parentObjectAlias, v.typeAnnotation, false, typeName => `Unsupported type for param "${v.name}". Found: ${typeName}`, @@ -235,33 +231,36 @@ function createStructsString( 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) { + // TODO: T171006733 [Begin] Remove deprecated Cxx TMs structs after a new release. + return ( + Object.keys(aliasMap) + .map(alias => { + const value = aliasMap[alias]; + if (value.properties.length === 0) { + return ''; + } + const structName = `${moduleName}Base${alias}`; + const structNameNew = `${moduleName}${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(alias, v)} ${ + v.name + }ToJs(jsi::Runtime &rt, P${i} value) { return bridging::toJs(rt, value); }`, - ) - .join('\n\n'); - return ` + ) + .join('\n\n'); + return ` #pragma mark - ${structName} template <${templateParameterWithTypename}> -struct ${structName} { +struct [[deprecated("Use ${structNameNew} instead.")]] ${structName} { ${value.properties.map((v, i) => ' P' + i + ' ' + v.name).join(';\n')}; bool operator==(const ${structName} &other) const { return ${value.properties @@ -271,7 +270,7 @@ ${value.properties.map((v, i) => ' P' + i + ' ' + v.name).join(';\n')}; }; template <${templateParameterWithTypename}> -struct ${structName}Bridging { +struct [[deprecated("Use ${structNameNew}Bridging instead.")]] ${structName}Bridging { static ${structName}<${templateParameter}> fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -311,8 +310,121 @@ ${value.properties }; `; - }) - .join('\n'); + }) + .join('\n') + + // TODO: T171006733 [End] Remove deprecated Cxx TMs structs after a new release. + Object.keys(aliasMap) + .map(alias => { + const value = aliasMap[alias]; + if (value.properties.length === 0) { + return ''; + } + const structName = `${moduleName}${alias}`; + const templateParameter = value.properties.filter( + v => + !isDirectRecursiveMember(alias, v.typeAnnotation) && + !isArrayRecursiveMember(alias, v.typeAnnotation), + ); + const templateParameterWithTypename = templateParameter + .map((v, i) => `typename P${i}`) + .join(', '); + const templateParameterWithoutTypename = templateParameter + .map((v, i) => `P${i}`) + .join(', '); + let i = -1; + const templateMemberTypes = value.properties.map(v => { + if (isDirectRecursiveMember(alias, v.typeAnnotation)) { + return `std::unique_ptr<${structName}<${templateParameterWithoutTypename}>> ${v.name}`; + } else if (isArrayRecursiveMember(alias, v.typeAnnotation)) { + const [nullable] = unwrapNullable( + v.typeAnnotation, + ); + return ( + (nullable + ? `std::optional>>` + : `std::vector<${structName}<${templateParameterWithoutTypename}>>`) + + ` ${v.name}` + ); + } else { + i++; + return `P${i} ${v.name}`; + } + }); + const debugParameterConversion = value.properties + .map( + v => ` static ${getCppType(alias, v)} ${ + v.name + }ToJs(jsi::Runtime &rt, decltype(types.${v.name}) value) { + return bridging::toJs(rt, value); + }`, + ) + .join('\n\n'); + return ` +#pragma mark - ${structName} + +template <${templateParameterWithTypename}> +struct ${structName} { +${templateMemberTypes.map(v => ' ' + v).join(';\n')}; + bool operator==(const ${structName} &other) const { + return ${value.properties + .map(v => `${v.name} == other.${v.name}`) + .join(' && ')}; + } +}; + +template +struct ${structName}Bridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ +${value.properties + .map(v => { + if (isDirectRecursiveMember(alias, v.typeAnnotation)) { + return ` value.hasProperty(rt, "${v.name}") ? std::make_unique(bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)) : nullptr`; + } else { + return ` 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 T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); +${value.properties + .map(v => { + if (isDirectRecursiveMember(alias, v.typeAnnotation)) { + return ` if (value.${v.name}) { + result.setProperty(rt, "${v.name}", bridging::toJs(rt, *value.${v.name}, jsInvoker)); + }`; + } else 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'; @@ -346,7 +458,7 @@ const EnumTemplate = ({ return ` #pragma mark - ${enumName} -enum ${enumName} { ${values} }; +enum class ${enumName} { ${values} }; template <> struct Bridging<${enumName}> { @@ -449,6 +561,7 @@ function translatePropertyToCpp( const paramTypes = propTypeAnnotation.params.map(param => { const translatedParam = translatePrimitiveJSTypeToCpp( moduleName, + null, param.typeAnnotation, param.optional, typeName => @@ -461,6 +574,7 @@ function translatePropertyToCpp( const returnType = translatePrimitiveJSTypeToCpp( moduleName, + null, propTypeAnnotation.returnTypeAnnotation, false, typeName => `Unsupported return type for ${prop.name}. Found: ${typeName}`, @@ -493,6 +607,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const nativeModules = getModules(schema); diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleJavaSpec.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleJavaSpec.js index 02ccc2668989..7f19db7e5d95 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleJavaSpec.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleJavaSpec.js @@ -11,18 +11,19 @@ 'use strict'; import type { - Nullable, NamedShape, - SchemaType, - NativeModulePropertyShape, - NativeModuleReturnTypeAnnotation, NativeModuleFunctionTypeAnnotation, NativeModuleParamTypeAnnotation, + NativeModulePropertyShape, + NativeModuleReturnTypeAnnotation, + Nullable, + SchemaType, } from '../../CodegenSchema'; - import type {AliasResolver} from './Utils'; -const {createAliasResolver, getModules} = require('./Utils'); + const {unwrapNullable} = require('../../parsers/parsers-commons'); +const {wrapOptional} = require('../TypeUtils/Java'); +const {createAliasResolver, getModules} = require('./Utils'); type FilesOutput = Map; @@ -111,13 +112,8 @@ function translateFunctionParamToJavaType( 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; + if (!isRequired) { + imports.add('javax.annotation.Nullable'); } // FIXME: support class alias for args @@ -130,41 +126,41 @@ function translateFunctionParamToJavaType( case 'ReservedTypeAnnotation': switch (realTypeAnnotation.name) { case 'RootTag': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); default: (realTypeAnnotation.name: empty); throw new Error(createErrorMessage(realTypeAnnotation.name)); } case 'StringTypeAnnotation': - return wrapNullable('String'); + return wrapOptional('String', isRequired); case 'NumberTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'FloatTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'DoubleTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'Int32TypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'BooleanTypeAnnotation': - return wrapNullable('boolean', 'Boolean'); + return wrapOptional('boolean', isRequired); case 'EnumDeclaration': switch (realTypeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'StringTypeAnnotation': - return wrapNullable('String'); + return wrapOptional('String', isRequired); default: throw new Error(createErrorMessage(realTypeAnnotation.type)); } case 'UnionTypeAnnotation': switch (typeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'ObjectTypeAnnotation': imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapNullable('ReadableMap'); + return wrapOptional('ReadableMap', isRequired); case 'StringTypeAnnotation': - return wrapNullable('String'); + return wrapOptional('String', isRequired); default: throw new Error( `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, @@ -172,17 +168,17 @@ function translateFunctionParamToJavaType( } case 'ObjectTypeAnnotation': imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapNullable('ReadableMap'); + return wrapOptional('ReadableMap', isRequired); case 'GenericObjectTypeAnnotation': // Treat this the same as ObjectTypeAnnotation for now. imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapNullable('ReadableMap'); + return wrapOptional('ReadableMap', isRequired); case 'ArrayTypeAnnotation': imports.add('com.facebook.react.bridge.ReadableArray'); - return wrapNullable('ReadableArray'); + return wrapOptional('ReadableArray', isRequired); case 'FunctionTypeAnnotation': imports.add('com.facebook.react.bridge.Callback'); - return wrapNullable('Callback'); + return wrapOptional('Callback', isRequired); default: (realTypeAnnotation.type: 'MixedTypeAnnotation'); throw new Error(createErrorMessage(realTypeAnnotation.type)); @@ -200,14 +196,12 @@ function translateFunctionReturnTypeToJavaType( nullableReturnTypeAnnotation, ); - function wrapNullable(javaType: string, nullableType?: string) { - if (nullable) { - imports.add('javax.annotation.Nullable'); - return `@Nullable ${nullableType ?? javaType}`; - } - return javaType; + if (nullable) { + imports.add('javax.annotation.Nullable'); } + const isRequired = !nullable; + // FIXME: support class alias for args let realTypeAnnotation = returnTypeAnnotation; if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { @@ -218,7 +212,7 @@ function translateFunctionReturnTypeToJavaType( case 'ReservedTypeAnnotation': switch (realTypeAnnotation.name) { case 'RootTag': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); default: (realTypeAnnotation.name: empty); throw new Error(createErrorMessage(realTypeAnnotation.name)); @@ -228,35 +222,35 @@ function translateFunctionReturnTypeToJavaType( case 'PromiseTypeAnnotation': return 'void'; case 'StringTypeAnnotation': - return wrapNullable('String'); + return wrapOptional('String', isRequired); case 'NumberTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'FloatTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'DoubleTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'Int32TypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'BooleanTypeAnnotation': - return wrapNullable('boolean', 'Boolean'); + return wrapOptional('boolean', isRequired); case 'EnumDeclaration': switch (realTypeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'StringTypeAnnotation': - return wrapNullable('String'); + return wrapOptional('String', isRequired); default: throw new Error(createErrorMessage(realTypeAnnotation.type)); } case 'UnionTypeAnnotation': switch (realTypeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapNullable('double', 'Double'); + return wrapOptional('double', isRequired); case 'ObjectTypeAnnotation': imports.add('com.facebook.react.bridge.WritableMap'); - return wrapNullable('WritableMap'); + return wrapOptional('WritableMap', isRequired); case 'StringTypeAnnotation': - return wrapNullable('String'); + return wrapOptional('String', isRequired); default: throw new Error( `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, @@ -264,13 +258,13 @@ function translateFunctionReturnTypeToJavaType( } case 'ObjectTypeAnnotation': imports.add('com.facebook.react.bridge.WritableMap'); - return wrapNullable('WritableMap'); + return wrapOptional('WritableMap', isRequired); case 'GenericObjectTypeAnnotation': imports.add('com.facebook.react.bridge.WritableMap'); - return wrapNullable('WritableMap'); + return wrapOptional('WritableMap', isRequired); case 'ArrayTypeAnnotation': imports.add('com.facebook.react.bridge.WritableArray'); - return wrapNullable('WritableArray'); + return wrapOptional('WritableArray', isRequired); default: (realTypeAnnotation.type: 'MixedTypeAnnotation'); throw new Error(createErrorMessage(realTypeAnnotation.type)); @@ -441,6 +435,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const files = new Map(); const nativeModules = getModules(schema); diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleJniCpp.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleJniCpp.js index ad23221bc4ce..d4544873fa2a 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleJniCpp.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleJniCpp.js @@ -11,18 +11,18 @@ 'use strict'; import type { - Nullable, NamedShape, - SchemaType, + NativeModuleFunctionTypeAnnotation, + NativeModuleParamTypeAnnotation, NativeModulePropertyShape, NativeModuleReturnTypeAnnotation, - NativeModuleParamTypeAnnotation, - NativeModuleFunctionTypeAnnotation, + Nullable, + SchemaType, } from '../../CodegenSchema'; - import type {AliasResolver} from './Utils'; -const {createAliasResolver, getModules} = require('./Utils'); + const {unwrapNullable} = require('../../parsers/parsers-commons'); +const {createAliasResolver, getModules} = require('./Utils'); type FilesOutput = Map; @@ -108,8 +108,7 @@ const FileTemplate = ({ #include ${include} -namespace facebook { -namespace react { +namespace facebook::react { ${modules} @@ -118,8 +117,7 @@ ${moduleLookups.map(ModuleLookupTemplate).join('\n')} return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react `; }; @@ -424,6 +422,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const nativeModules = getModules(schema); diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js index fb9808075545..0bb2b35d15cb 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js @@ -12,10 +12,10 @@ import type {SchemaType} from '../../CodegenSchema'; -type FilesOutput = Map; - const {getModules} = require('./Utils'); +type FilesOutput = Map; + const ModuleClassDeclarationTemplate = ({ hasteModuleName, }: $ReadOnly<{hasteModuleName: string}>) => { @@ -49,16 +49,14 @@ const HeaderFileTemplate = ({ #include #include -namespace facebook { -namespace react { +namespace facebook::react { ${modules} JSI_EXPORT std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react `; }; @@ -93,10 +91,13 @@ target_link_libraries( ${libraryName !== 'rncore' ? 'react_codegen_rncore' : ''} react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -121,6 +122,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean = false, + headerPrefix?: string, ): FilesOutput { const nativeModules = getModules(schema); const modules = Object.keys(nativeModules) diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/StructCollector.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/StructCollector.js index ef7af6ae44a1..d85d093948ad 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/StructCollector.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/StructCollector.js @@ -11,29 +11,28 @@ 'use strict'; import type { - Nullable, - NativeModuleObjectTypeAnnotation, - NativeModuleStringTypeAnnotation, - NativeModuleNumberTypeAnnotation, - NativeModuleInt32TypeAnnotation, - NativeModuleDoubleTypeAnnotation, - NativeModuleFloatTypeAnnotation, + NativeModuleArrayTypeAnnotation, + NativeModuleBaseTypeAnnotation, NativeModuleBooleanTypeAnnotation, + NativeModuleDoubleTypeAnnotation, NativeModuleEnumDeclaration, + NativeModuleFloatTypeAnnotation, NativeModuleGenericObjectTypeAnnotation, - ReservedTypeAnnotation, + NativeModuleInt32TypeAnnotation, + NativeModuleNumberTypeAnnotation, + NativeModuleObjectTypeAnnotation, + NativeModuleStringTypeAnnotation, NativeModuleTypeAliasTypeAnnotation, - NativeModuleArrayTypeAnnotation, - NativeModuleBaseTypeAnnotation, + Nullable, + ReservedTypeAnnotation, } from '../../../CodegenSchema'; - import type {AliasResolver} from '../Utils'; -const {capitalize} = require('../../Utils'); const { unwrapNullable, wrapNullable, } = require('../../../parsers/parsers-commons'); +const {capitalize} = require('../../Utils'); type StructContext = 'CONSTANTS' | 'REGULAR'; diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js index 0fa67683e662..ad7918d686f8 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js @@ -10,14 +10,17 @@ 'use strict'; -const {getSafePropertyName, getNamespacedStructName} = require('../Utils'); -const {capitalize} = require('../../../Utils'); - import type {Nullable} from '../../../../CodegenSchema'; -import type {StructTypeAnnotation, ConstantsStruct} from '../StructCollector'; +import type {ConstantsStruct, StructTypeAnnotation} from '../StructCollector'; import type {StructSerilizationOutput} from './serializeStruct'; const {unwrapNullable} = require('../../../../parsers/parsers-commons'); +const {wrapOptional: wrapCxxOptional} = require('../../../TypeUtils/Cxx'); +const { + wrapOptional: wrapObjCOptional, +} = require('../../../TypeUtils/Objective-C'); +const {capitalize} = require('../../../Utils'); +const {getNamespacedStructName, getSafePropertyName} = require('../Utils'); const StructTemplate = ({ hasteModuleName, @@ -79,15 +82,12 @@ function toObjCType( ): 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'); + return wrapCxxOptional('double', isRequired); default: (typeAnnotation.name: empty); throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); @@ -95,19 +95,19 @@ function toObjCType( case 'StringTypeAnnotation': return 'NSString *'; case 'NumberTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'FloatTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'Int32TypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'DoubleTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'BooleanTypeAnnotation': - return wrapOptional('bool'); + return wrapCxxOptional('bool', isRequired); case 'EnumDeclaration': switch (typeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'StringTypeAnnotation': return 'NSString *'; default: @@ -116,17 +116,18 @@ function toObjCType( ); } case 'GenericObjectTypeAnnotation': - return isRequired ? 'id ' : 'id _Nullable '; + return wrapObjCOptional('id', isRequired); case 'ArrayTypeAnnotation': if (typeAnnotation.elementType == null) { - return isRequired ? 'id ' : 'id _Nullable '; + return wrapObjCOptional('id', isRequired); } - return wrapOptional( + return wrapCxxOptional( `std::vector<${toObjCType( hasteModuleName, typeAnnotation.elementType, )}>`, + isRequired, ); case 'TypeAliasTypeAnnotation': const structName = capitalize(typeAnnotation.name); @@ -134,7 +135,7 @@ function toObjCType( hasteModuleName, structName, ); - return wrapOptional(`${namespacedStructName}::Builder`); + return wrapCxxOptional(`${namespacedStructName}::Builder`, isRequired); default: (typeAnnotation.type: empty); throw new Error( diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js index e6c73c733888..9ea93a1da7a1 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js @@ -10,14 +10,17 @@ 'use strict'; -const {getSafePropertyName, getNamespacedStructName} = require('../Utils'); -const {capitalize} = require('../../../Utils'); - import type {Nullable} from '../../../../CodegenSchema'; -import type {StructTypeAnnotation, RegularStruct} from '../StructCollector'; +import type {RegularStruct, StructTypeAnnotation} from '../StructCollector'; import type {StructSerilizationOutput} from './serializeStruct'; const {unwrapNullable} = require('../../../../parsers/parsers-commons'); +const {wrapOptional: wrapCxxOptional} = require('../../../TypeUtils/Cxx'); +const { + wrapOptional: wrapObjCOptional, +} = require('../../../TypeUtils/Objective-C'); +const {capitalize} = require('../../../Utils'); +const {getNamespacedStructName, getSafePropertyName} = require('../Utils'); const StructTemplate = ({ hasteModuleName, @@ -70,15 +73,12 @@ function toObjCType( ): 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'); + return wrapCxxOptional('double', isRequired); default: (typeAnnotation.name: empty); throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); @@ -86,19 +86,19 @@ function toObjCType( case 'StringTypeAnnotation': return 'NSString *'; case 'NumberTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'FloatTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'Int32TypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'DoubleTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'BooleanTypeAnnotation': - return wrapOptional('bool'); + return wrapCxxOptional('bool', isRequired); case 'EnumDeclaration': switch (typeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapOptional('double'); + return wrapCxxOptional('double', isRequired); case 'StringTypeAnnotation': return 'NSString *'; default: @@ -107,16 +107,17 @@ function toObjCType( ); } case 'GenericObjectTypeAnnotation': - return isRequired ? 'id ' : 'id _Nullable'; + return wrapObjCOptional('id', isRequired); case 'ArrayTypeAnnotation': if (typeAnnotation.elementType == null) { - return isRequired ? 'id ' : 'id _Nullable'; + return wrapObjCOptional('id', isRequired); } - return wrapOptional( + return wrapCxxOptional( `facebook::react::LazyVector<${toObjCType( hasteModuleName, typeAnnotation.elementType, )}>`, + isRequired, ); case 'TypeAliasTypeAnnotation': const structName = capitalize(typeAnnotation.name); @@ -124,7 +125,7 @@ function toObjCType( hasteModuleName, structName, ); - return wrapOptional(namespacedStructName); + return wrapCxxOptional(namespacedStructName, isRequired); default: (typeAnnotation.type: empty); throw new Error( diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/index.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/index.js index 9524327b8713..ce4c1048cd36 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/index.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/index.js @@ -10,16 +10,14 @@ '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'); +const {StructCollector} = require('./StructCollector'); type FilesOutput = Map; @@ -37,17 +35,15 @@ const ModuleDeclarationTemplate = ({ ${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`; +namespace facebook::react { + /** + * ObjC++ class for module '${hasteModuleName}' + */ + class JSI_EXPORT ${hasteModuleName}SpecJSI : public ObjCTurboModule { + public: + ${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react`; const HeaderFileTemplate = ({ moduleDeclarations, @@ -122,6 +118,7 @@ module.exports = { schema: SchemaType, packageName?: string, assumeNonnull: boolean, + headerPrefix?: string, ): FilesOutput { const nativeModules = getModules(schema); diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/serializeMethod.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/serializeMethod.js index 9dcf621c7096..14f0ed724c78 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/serializeMethod.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/serializeMethod.js @@ -11,23 +11,23 @@ 'use strict'; import type { - Nullable, NamedShape, NativeModuleParamTypeAnnotation, - NativeModuleReturnTypeAnnotation, NativeModulePropertyShape, + NativeModuleReturnTypeAnnotation, + Nullable, } 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, + wrapNullable, } = require('../../../parsers/parsers-commons'); +const {wrapOptional} = require('../../TypeUtils/Objective-C'); +const {capitalize} = require('../../Utils'); +const {getNamespacedStructName} = require('./Utils'); +const invariant = require('invariant'); const ProtocolMethodTemplate = ({ returnObjCType, @@ -189,11 +189,7 @@ function getParamObjCType( ): $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 isRequired = !param.optional && !nullable; const isStruct = (objCType: string) => ({ isStruct: true, @@ -221,7 +217,7 @@ function getParamObjCType( * type Animal = {}; * Array => NSArray, etc. */ - return notStruct(wrapIntoNullableIfNeeded('NSArray *')); + return notStruct(wrapOptional('NSArray *', !nullable)); } } @@ -252,7 +248,7 @@ function getParamObjCType( case 'ReservedTypeAnnotation': switch (structTypeAnnotation.name) { case 'RootTag': - return notStruct(notRequired ? 'NSNumber *' : 'double'); + return notStruct(isRequired ? 'double' : 'NSNumber *'); default: (structTypeAnnotation.name: empty); throw new Error( @@ -260,30 +256,30 @@ function getParamObjCType( ); } case 'StringTypeAnnotation': - return notStruct(wrapIntoNullableIfNeeded('NSString *')); + return notStruct(wrapOptional('NSString *', !nullable)); case 'NumberTypeAnnotation': - return notStruct(notRequired ? 'NSNumber *' : 'double'); + return notStruct(isRequired ? 'double' : 'NSNumber *'); case 'FloatTypeAnnotation': - return notStruct(notRequired ? 'NSNumber *' : 'double'); + return notStruct(isRequired ? 'float' : 'NSNumber *'); case 'DoubleTypeAnnotation': - return notStruct(notRequired ? 'NSNumber *' : 'double'); + return notStruct(isRequired ? 'double' : 'NSNumber *'); case 'Int32TypeAnnotation': - return notStruct(notRequired ? 'NSNumber *' : 'double'); + return notStruct(isRequired ? 'NSInteger' : 'NSNumber *'); case 'BooleanTypeAnnotation': - return notStruct(notRequired ? 'NSNumber *' : 'BOOL'); + return notStruct(isRequired ? 'BOOL' : 'NSNumber *'); case 'EnumDeclaration': switch (typeAnnotation.memberType) { case 'NumberTypeAnnotation': - return notStruct(notRequired ? 'NSNumber *' : 'double'); + return notStruct(isRequired ? 'double' : 'NSNumber *'); case 'StringTypeAnnotation': - return notStruct(wrapIntoNullableIfNeeded('NSString *')); + return notStruct(wrapOptional('NSString *', !nullable)); default: throw new Error( `Unsupported enum type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, ); } case 'GenericObjectTypeAnnotation': - return notStruct(wrapIntoNullableIfNeeded('NSDictionary *')); + return notStruct(wrapOptional('NSDictionary *', !nullable)); default: (structTypeAnnotation.type: empty); throw new Error( @@ -297,10 +293,7 @@ function getReturnObjCType( nullableTypeAnnotation: Nullable, ): string { const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - - function wrapIntoNullableIfNeeded(generatedType: string) { - return nullable ? `${generatedType} _Nullable` : generatedType; - } + const isRequired = !nullable; switch (typeAnnotation.type) { case 'VoidTypeAnnotation': @@ -308,24 +301,25 @@ function getReturnObjCType( case 'PromiseTypeAnnotation': return 'void'; case 'ObjectTypeAnnotation': - return wrapIntoNullableIfNeeded('NSDictionary *'); + return wrapOptional('NSDictionary *', isRequired); case 'TypeAliasTypeAnnotation': - return wrapIntoNullableIfNeeded('NSDictionary *'); + return wrapOptional('NSDictionary *', isRequired); case 'ArrayTypeAnnotation': if (typeAnnotation.elementType == null) { - return wrapIntoNullableIfNeeded('NSArray> *'); + return wrapOptional('NSArray> *', isRequired); } - return wrapIntoNullableIfNeeded( + return wrapOptional( `NSArray<${getReturnObjCType( methodName, typeAnnotation.elementType, )}> *`, + isRequired, ); case 'ReservedTypeAnnotation': switch (typeAnnotation.name) { case 'RootTag': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); default: (typeAnnotation.name: empty); throw new Error( @@ -335,23 +329,23 @@ function getReturnObjCType( case 'StringTypeAnnotation': // TODO: Can NSString * returns not be _Nullable? // In the legacy codegen, we don't surround NSSTring * with _Nullable - return wrapIntoNullableIfNeeded('NSString *'); + return wrapOptional('NSString *', isRequired); case 'NumberTypeAnnotation': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); case 'FloatTypeAnnotation': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); case 'DoubleTypeAnnotation': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); case 'Int32TypeAnnotation': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); case 'BooleanTypeAnnotation': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); case 'EnumDeclaration': switch (typeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); case 'StringTypeAnnotation': - return wrapIntoNullableIfNeeded('NSString *'); + return wrapOptional('NSString *', isRequired); default: throw new Error( `Unsupported enum return type for ${methodName}. Found: ${typeAnnotation.type}`, @@ -360,20 +354,20 @@ function getReturnObjCType( case 'UnionTypeAnnotation': switch (typeAnnotation.memberType) { case 'NumberTypeAnnotation': - return wrapIntoNullableIfNeeded('NSNumber *'); + return wrapOptional('NSNumber *', isRequired); case 'ObjectTypeAnnotation': - return wrapIntoNullableIfNeeded('NSDictionary *'); + return wrapOptional('NSDictionary *', isRequired); case 'StringTypeAnnotation': // TODO: Can NSString * returns not be _Nullable? // In the legacy codegen, we don't surround NSSTring * with _Nullable - return wrapIntoNullableIfNeeded('NSString *'); + return wrapOptional('NSString *', isRequired); default: throw new Error( `Unsupported union return type for ${methodName}, found: ${typeAnnotation.memberType}"`, ); } case 'GenericObjectTypeAnnotation': - return wrapIntoNullableIfNeeded('NSDictionary *'); + return wrapOptional('NSDictionary *', isRequired); default: (typeAnnotation.type: 'MixedTypeAnnotation'); throw new Error( diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/source/serializeModule.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/source/serializeModule.js index 2d9eb34d2564..62cc5e204ff0 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/source/serializeModule.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleObjCpp/source/serializeModule.js @@ -10,11 +10,11 @@ 'use strict'; -import type {Struct} from '../StructCollector'; import type { MethodSerializationOutput, StructParameterRecord, } from '../serializeMethod'; +import type {Struct} from '../StructCollector'; const ModuleTemplate = ({ hasteModuleName, @@ -29,34 +29,32 @@ const ModuleTemplate = ({ 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')} +namespace facebook::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`; + ${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 facebook::react`; const RCTCxxConvertCategoryTemplate = ({ hasteModuleName, diff --git a/packages/react-native-codegen/src/generators/modules/Utils.js b/packages/react-native-codegen/src/generators/modules/Utils.js index 8d172d32abc8..20e7a482b245 100644 --- a/packages/react-native-codegen/src/generators/modules/Utils.js +++ b/packages/react-native-codegen/src/generators/modules/Utils.js @@ -11,13 +11,16 @@ 'use strict'; import type { - SchemaType, NativeModuleAliasMap, + NativeModuleEnumMembers, NativeModuleObjectTypeAnnotation, NativeModuleSchema, - NativeModuleEnumMembers, + NativeModuleTypeAnnotation, + Nullable, + SchemaType, } from '../../CodegenSchema'; +const {unwrapNullable} = require('../../parsers/parsers-commons'); const invariant = require('invariant'); export type AliasResolver = ( @@ -48,6 +51,33 @@ function getModules( ); } +function isDirectRecursiveMember( + parentObjectAliasName: ?string, + nullableTypeAnnotation: Nullable, +): boolean { + const [typeAnnotation] = unwrapNullable( + nullableTypeAnnotation, + ); + return ( + parentObjectAliasName !== undefined && + typeAnnotation.name === parentObjectAliasName + ); +} + +function isArrayRecursiveMember( + parentObjectAliasName: ?string, + nullableTypeAnnotation: Nullable, +): boolean { + const [typeAnnotation] = unwrapNullable( + nullableTypeAnnotation, + ); + return ( + parentObjectAliasName !== undefined && + typeAnnotation.type === 'ArrayTypeAnnotation' && + typeAnnotation.elementType?.name === parentObjectAliasName + ); +} + function getAreEnumMembersInteger(members: NativeModuleEnumMembers): boolean { return !members.some(m => `${m.value}`.includes('.')); } @@ -56,4 +86,6 @@ module.exports = { createAliasResolver, getModules, getAreEnumMembersInteger, + isDirectRecursiveMember, + isArrayRecursiveMember, }; diff --git a/packages/react-native-codegen/src/generators/modules/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/generators/modules/__test_fixtures__/fixtures.js index 8f96919d4c38..387126e40ed8 100644 --- a/packages/react-native-codegen/src/generators/modules/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/generators/modules/__test_fixtures__/fixtures.js @@ -1569,7 +1569,117 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = { NativeSampleTurboModule: { type: 'NativeModule', aliasMap: { - ObjectAlias: { + ConstantsStruct: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'const1', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + { + name: 'const2', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + name: 'const3', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + CustomHostObject: { + type: 'ObjectTypeAnnotation', + properties: [], + }, + BinaryTreeNode: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'left', + optional: true, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'BinaryTreeNode', + }, + }, + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + name: 'right', + optional: true, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'BinaryTreeNode', + }, + }, + ], + }, + GraphNode: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'label', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'neighbors', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'GraphNode', + }, + }, + }, + ], + }, + ObjectStruct: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'a', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + name: 'b', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'c', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + }, + ], + }, + ValueStruct: { type: 'ObjectTypeAnnotation', properties: [ { @@ -1579,56 +1689,141 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = { type: 'NumberTypeAnnotation', }, }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'z', + optional: false, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + }, + ], + }, + MenuItem: { + type: 'ObjectTypeAnnotation', + properties: [ + { + name: 'label', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'onPress', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'flag', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'shortcut', + optional: true, + typeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + }, + { + name: 'items', + optional: true, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'TypeAliasTypeAnnotation', + name: 'MenuItem', + }, + }, + }, ], }, }, enumMap: { - NumEnum: { + EnumInt: { + name: 'EnumInt', type: 'EnumDeclarationWithMembers', - name: 'NumEnum', memberType: 'NumberTypeAnnotation', members: [ { - name: 'ONE', - value: '1', + name: 'IA', + value: '23', }, { - name: 'TWO', - value: '2', + name: 'IB', + value: '42', }, ], }, - FloatEnum: { + EnumFloat: { + name: 'EnumFloat', type: 'EnumDeclarationWithMembers', - name: 'FloatEnum', memberType: 'NumberTypeAnnotation', members: [ { - name: 'POINT_ZERO', - value: '0.0', + name: 'FA', + value: '1.23', }, { - name: 'POINT_ONE', - value: '0.1', + name: 'FB', + value: '4.56', }, + ], + }, + EnumNone: { + name: 'EnumNone', + type: 'EnumDeclarationWithMembers', + memberType: 'StringTypeAnnotation', + members: [ { - name: 'POINT_TWO', - value: '0.2', + name: 'NA', + value: 'NA', + }, + { + name: 'NB', + value: 'NB', }, ], }, - StringEnum: { + EnumStr: { + name: 'EnumStr', type: 'EnumDeclarationWithMembers', - name: 'StringEnum', memberType: 'StringTypeAnnotation', members: [ { - name: 'HELLO', - value: 'hello', + name: 'SA', + value: 's---a', }, { - name: 'GoodBye', - value: 'goodbye', + name: 'SB', + value: 's---b', }, ], }, @@ -1636,147 +1831,574 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = { spec: { properties: [ { - name: 'getMixed', + name: 'getArray', optional: false, typeAnnotation: { type: 'FunctionTypeAnnotation', returnTypeAnnotation: { - type: 'MixedTypeAnnotation', + type: 'ArrayTypeAnnotation', }, params: [ { name: 'arg', optional: false, typeAnnotation: { - type: 'MixedTypeAnnotation', + type: 'ArrayTypeAnnotation', }, }, ], }, }, { - name: 'getNullableNumberFromNullableAlias', + name: 'getBool', optional: false, typeAnnotation: { type: 'FunctionTypeAnnotation', returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, + type: 'BooleanTypeAnnotation', }, params: [ { - name: 'a', + name: 'arg', optional: false, typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectAlias', - }, + type: 'BooleanTypeAnnotation', }, }, ], }, }, { - name: 'getEnums', + name: 'getConstants', optional: false, typeAnnotation: { type: 'FunctionTypeAnnotation', returnTypeAnnotation: { - type: 'StringTypeAnnotation', + type: 'TypeAliasTypeAnnotation', + name: 'ConstantsStruct', + }, + params: [], + }, + }, + { + name: 'getCustomEnum', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + name: 'EnumInt', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', }, params: [ { - name: 'enumInt', + name: 'arg', optional: false, typeAnnotation: { - name: 'NumEnum', + name: 'EnumInt', type: 'EnumDeclaration', memberType: 'NumberTypeAnnotation', }, }, + ], + }, + }, + { + name: 'getCustomHostObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'CustomHostObject', + }, + params: [], + }, + }, + { + name: 'consumeCustomHostObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ { - name: 'enumFloat', + name: 'customHostObject', optional: false, typeAnnotation: { - name: 'FloatEnum', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', + type: 'TypeAliasTypeAnnotation', + name: 'CustomHostObject', }, }, + ], + }, + }, + { + name: 'getBinaryTreeNode', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'BinaryTreeNode', + }, + params: [ { - name: 'enumString', + name: 'arg', optional: false, typeAnnotation: { - name: 'StringEnum', - type: 'EnumDeclaration', - memberType: 'StringTypeAnnotation', + type: 'TypeAliasTypeAnnotation', + name: 'BinaryTreeNode', }, }, ], }, }, { - name: 'getUnion', + name: 'getGraphNode', optional: false, typeAnnotation: { type: 'FunctionTypeAnnotation', returnTypeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'ObjectTypeAnnotation', + type: 'TypeAliasTypeAnnotation', + name: 'GraphNode', }, params: [ { - name: 'chooseInt', + name: 'arg', optional: false, typeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'NumberTypeAnnotation', + type: 'TypeAliasTypeAnnotation', + name: 'GraphNode', }, }, - { - name: 'chooseFloat', - optional: false, + ], + }, + }, + { + name: 'getNumEnum', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + name: 'EnumFloat', + type: 'EnumDeclaration', + memberType: 'NumberTypeAnnotation', + }, + params: [ + { + name: 'arg', + optional: false, typeAnnotation: { - type: 'UnionTypeAnnotation', + name: 'EnumInt', + type: 'EnumDeclaration', memberType: 'NumberTypeAnnotation', }, }, + ], + }, + }, + { + name: 'getStrEnum', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + name: 'EnumStr', + type: 'EnumDeclaration', + memberType: 'StringTypeAnnotation', + }, + params: [ { - name: 'chooseObject', + name: 'arg', + optional: false, + typeAnnotation: { + name: 'EnumNone', + type: 'EnumDeclaration', + memberType: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getMap', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'GenericObjectTypeAnnotation', + dictionaryValueType: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'GenericObjectTypeAnnotation', + dictionaryValueType: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + }, + }, + ], + }, + }, + { + name: 'getNumber', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NumberTypeAnnotation', + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getObject', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + }, + ], + }, + }, + { + name: 'getSet', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'ArrayTypeAnnotation', + elementType: { + type: 'NumberTypeAnnotation', + }, + }, + }, + ], + }, + }, + { + name: 'getString', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getUnion', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'StringTypeAnnotation', + }, + params: [ + { + name: 'x', optional: false, typeAnnotation: { type: 'UnionTypeAnnotation', - memberType: 'ObjectTypeAnnotation', + memberType: 'NumberTypeAnnotation', }, }, { - name: 'chooseString', + name: 'y', optional: false, typeAnnotation: { type: 'UnionTypeAnnotation', memberType: 'StringTypeAnnotation', }, }, + { + name: 'z', + optional: false, + typeAnnotation: { + type: 'UnionTypeAnnotation', + memberType: 'ObjectTypeAnnotation', + }, + }, ], }, }, { - name: 'getEnumReturn', + name: 'getValue', optional: false, typeAnnotation: { type: 'FunctionTypeAnnotation', returnTypeAnnotation: { - type: 'EnumDeclaration', - name: 'NumEnum', - memberType: 'NumberTypeAnnotation', + type: 'TypeAliasTypeAnnotation', + name: 'ValueStruct', + }, + params: [ + { + name: 'x', + optional: false, + typeAnnotation: { + type: 'NumberTypeAnnotation', + }, + }, + { + name: 'y', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + { + name: 'z', + optional: false, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + }, + ], + }, + }, + { + name: 'getValueWithCallback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + name: 'callback', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + name: 'value', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + ], + }, + }, + { + name: 'getValueWithPromise', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'PromiseTypeAnnotation', + elementType: { + type: 'StringTypeAnnotation', + }, + }, + params: [ + { + name: 'error', + optional: false, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'getWithWithOptionalArgs', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'NullableTypeAnnotation', + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + params: [ + { + name: 'optionalArg', + optional: true, + typeAnnotation: { + type: 'BooleanTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'voidFunc', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + { + name: 'setMenu', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + name: 'menuItem', + optional: false, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'MenuItem', + }, + }, + ], + }, + }, + { + name: 'emitCustomDeviceEvent', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [ + { + name: 'eventName', + optional: false, + typeAnnotation: { + type: 'StringTypeAnnotation', + }, + }, + ], + }, + }, + { + name: 'voidFuncThrows', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', }, params: [], }, }, + + { + name: 'getObjectThrows', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + }, + ], + }, + }, + { + name: 'voidFuncAssert', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + params: [], + }, + }, + { + name: 'getObjectAssert', + optional: false, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + returnTypeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + params: [ + { + name: 'arg', + optional: false, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: 'ObjectStruct', + }, + }, + ], + }, + }, ], }, moduleName: 'SampleTurboModuleCxx', diff --git a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleCpp-test.js.snap b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleCpp-test.js.snap index b04d1afa0b57..cef33f44c2ef 100644 --- a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleCpp-test.js.snap @@ -13,8 +13,7 @@ Map { #include \\"SampleWithUppercaseNameJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { @@ -24,8 +23,7 @@ NativeSampleTurboModuleCxxSpecJSI::NativeSampleTurboModuleCxxSpecJSI(std::shared } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -43,8 +41,7 @@ Map { #include \\"complex_objectsJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_difficult(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->difficult( @@ -106,8 +103,7 @@ NativeSampleTurboModuleCxxSpecJSI::NativeSampleTurboModuleCxxSpecJSI(std::shared } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -125,57 +121,210 @@ Map { #include \\"cxx_only_native_modulesJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getMixed(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getMixed( +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getArray(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getArray( rt, - jsi::Value(rt, args[0]) + args[0].asObject(rt).asArray(rt) ); } -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNullableNumberFromNullableAlias(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - auto result = static_cast(&turboModule)->getNullableNumberFromNullableAlias( +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getBool(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getBool( rt, - args[0].isNull() || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asObject(rt)) + args[0].asBool() ); - return result ? jsi::Value(std::move(*result)) : jsi::Value::null(); } -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getEnums(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getEnums( +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getConstants( + rt + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getCustomEnum(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getCustomEnum( rt, - args[0].asNumber(), - args[1].asNumber(), - args[2].asString(rt) + args[0].asNumber() + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getCustomHostObject(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getCustomHostObject( + rt + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_consumeCustomHostObject(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->consumeCustomHostObject( + rt, + args[0].asObject(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getBinaryTreeNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getBinaryTreeNode( + rt, + args[0].asObject(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getGraphNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getGraphNode( + rt, + args[0].asObject(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNumEnum(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getNumEnum( + rt, + args[0].asNumber() + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getStrEnum(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getStrEnum( + rt, + args[0].asString(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getMap(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getMap( + rt, + args[0].asObject(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNumber(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getNumber( + rt, + args[0].asNumber() + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObject(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getObject( + rt, + args[0].asObject(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getSet(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getSet( + rt, + args[0].asObject(rt).asArray(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getString(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getString( + rt, + args[0].asString(rt) ); } static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getUnion(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getUnion( rt, args[0].asNumber(), - args[1].asNumber(), - args[2].asObject(rt), - args[3].asString(rt) + args[1].asString(rt), + args[2].asObject(rt) ); } -static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getEnumReturn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getEnumReturn( +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getValue( + rt, + args[0].asNumber(), + args[1].asString(rt), + args[2].asObject(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithCallback(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->getValueWithCallback( + rt, + args[0].asObject(rt).asFunction(rt) + ); + return jsi::Value::undefined(); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithPromise(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getValueWithPromise( + rt, + args[0].asBool() + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getWithWithOptionalArgs(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + auto result = static_cast(&turboModule)->getWithWithOptionalArgs( + rt, + count <= 0 || args[0].isNull() || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asBool()) + ); + return result ? jsi::Value(std::move(*result)) : jsi::Value::null(); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFunc(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->voidFunc( rt ); + return jsi::Value::undefined(); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_setMenu(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->setMenu( + rt, + args[0].asObject(rt) + ); + return jsi::Value::undefined(); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_emitCustomDeviceEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->emitCustomDeviceEvent( + rt, + args[0].asString(rt) + ); + return jsi::Value::undefined(); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncThrows(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->voidFuncThrows( + rt + ); + return jsi::Value::undefined(); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectThrows(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getObjectThrows( + rt, + args[0].asObject(rt) + ); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncAssert(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->voidFuncAssert( + rt + ); + return jsi::Value::undefined(); +} +static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectAssert(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getObjectAssert( + rt, + args[0].asObject(rt) + ); } NativeSampleTurboModuleCxxSpecJSI::NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker) : TurboModule(\\"SampleTurboModuleCxx\\", jsInvoker) { - methodMap_[\\"getMixed\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getMixed}; - methodMap_[\\"getNullableNumberFromNullableAlias\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNullableNumberFromNullableAlias}; - methodMap_[\\"getEnums\\"] = MethodMetadata {3, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getEnums}; - methodMap_[\\"getUnion\\"] = MethodMetadata {4, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getUnion}; - methodMap_[\\"getEnumReturn\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getEnumReturn}; + methodMap_[\\"getArray\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getArray}; + methodMap_[\\"getBool\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getBool}; + methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getConstants}; + methodMap_[\\"getCustomEnum\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getCustomEnum}; + methodMap_[\\"getCustomHostObject\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getCustomHostObject}; + methodMap_[\\"consumeCustomHostObject\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_consumeCustomHostObject}; + methodMap_[\\"getBinaryTreeNode\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getBinaryTreeNode}; + methodMap_[\\"getGraphNode\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getGraphNode}; + methodMap_[\\"getNumEnum\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNumEnum}; + methodMap_[\\"getStrEnum\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getStrEnum}; + methodMap_[\\"getMap\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getMap}; + methodMap_[\\"getNumber\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getNumber}; + methodMap_[\\"getObject\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObject}; + methodMap_[\\"getSet\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getSet}; + methodMap_[\\"getString\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getString}; + methodMap_[\\"getUnion\\"] = MethodMetadata {3, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getUnion}; + methodMap_[\\"getValue\\"] = MethodMetadata {3, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValue}; + methodMap_[\\"getValueWithCallback\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithCallback}; + methodMap_[\\"getValueWithPromise\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getValueWithPromise}; + methodMap_[\\"getWithWithOptionalArgs\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getWithWithOptionalArgs}; + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFunc}; + methodMap_[\\"setMenu\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_setMenu}; + methodMap_[\\"emitCustomDeviceEvent\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_emitCustomDeviceEvent}; + methodMap_[\\"voidFuncThrows\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncThrows}; + methodMap_[\\"getObjectThrows\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectThrows}; + methodMap_[\\"voidFuncAssert\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFuncAssert}; + methodMap_[\\"getObjectAssert\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getObjectAssert}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -193,8 +342,7 @@ Map { #include \\"empty_native_modulesJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { @@ -204,8 +352,7 @@ NativeSampleTurboModuleCxxSpecJSI::NativeSampleTurboModuleCxxSpecJSI(std::shared } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -223,8 +370,7 @@ Map { #include \\"native_modules_with_type_aliasesJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value __hostFunction_AliasTurboModuleCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getConstants( @@ -246,8 +392,7 @@ AliasTurboModuleCxxSpecJSI::AliasTurboModuleCxxSpecJSI(std::shared_ptr(&turboModule)->getConstants( @@ -351,8 +495,7 @@ NativeExceptionsManagerCxxSpecJSI::NativeExceptionsManagerCxxSpecJSI(std::shared } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -370,8 +513,7 @@ Map { #include \\"simple_native_modulesJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getConstants( @@ -480,8 +622,7 @@ NativeSampleTurboModuleCxxSpecJSI::NativeSampleTurboModuleCxxSpecJSI(std::shared } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -499,8 +640,7 @@ Map { #include \\"two_modules_different_filesJSI.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value __hostFunction_NativeSampleTurboModuleCxxSpecJSI_voidFunc(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->voidFunc( @@ -532,8 +672,7 @@ NativeSampleTurboModule2CxxSpecJSI::NativeSampleTurboModule2CxxSpecJSI(std::shar } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleH-test.js.snap b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleH-test.js.snap index 20fb6911293a..8fcc178ac211 100644 --- a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleH-test.js.snap +++ b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleH-test.js.snap @@ -16,8 +16,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { @@ -41,7 +40,7 @@ public: protected: NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleCxxSpecJSI { @@ -58,8 +57,7 @@ private: Delegate delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -80,8 +78,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { @@ -111,7 +108,7 @@ public: protected: NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleCxxSpecJSI { @@ -183,8 +180,7 @@ private: Delegate delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -205,381 +201,1306 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -#pragma mark - SampleTurboModuleCxxNumEnum +#pragma mark - SampleTurboModuleCxxEnumInt -enum SampleTurboModuleCxxNumEnum { ONE, TWO }; +enum class SampleTurboModuleCxxEnumInt { IA, IB }; template <> -struct Bridging { - static SampleTurboModuleCxxNumEnum fromJs(jsi::Runtime &rt, const jsi::Value &rawValue) { +struct Bridging { + static SampleTurboModuleCxxEnumInt fromJs(jsi::Runtime &rt, const jsi::Value &rawValue) { double value = (double)rawValue.asNumber(); - if (value == 1) { - return SampleTurboModuleCxxNumEnum::ONE; - } else if (value == 2) { - return SampleTurboModuleCxxNumEnum::TWO; + if (value == 23) { + return SampleTurboModuleCxxEnumInt::IA; + } else if (value == 42) { + return SampleTurboModuleCxxEnumInt::IB; } else { throw jsi::JSError(rt, \\"No appropriate enum member found for value\\"); } } - static jsi::Value toJs(jsi::Runtime &rt, SampleTurboModuleCxxNumEnum value) { - if (value == SampleTurboModuleCxxNumEnum::ONE) { - return bridging::toJs(rt, 1); - } else if (value == SampleTurboModuleCxxNumEnum::TWO) { - return bridging::toJs(rt, 2); + static jsi::Value toJs(jsi::Runtime &rt, SampleTurboModuleCxxEnumInt value) { + if (value == SampleTurboModuleCxxEnumInt::IA) { + return bridging::toJs(rt, 23); + } else if (value == SampleTurboModuleCxxEnumInt::IB) { + return bridging::toJs(rt, 42); } else { throw jsi::JSError(rt, \\"No appropriate enum member found for enum value\\"); } } }; -#pragma mark - SampleTurboModuleCxxFloatEnum +#pragma mark - SampleTurboModuleCxxEnumFloat -enum SampleTurboModuleCxxFloatEnum { POINT_ZERO, POINT_ONE, POINT_TWO }; +enum class SampleTurboModuleCxxEnumFloat { FA, FB }; template <> -struct Bridging { - static SampleTurboModuleCxxFloatEnum fromJs(jsi::Runtime &rt, const jsi::Value &rawValue) { +struct Bridging { + static SampleTurboModuleCxxEnumFloat fromJs(jsi::Runtime &rt, const jsi::Value &rawValue) { double value = (double)rawValue.asNumber(); - if (value == 0.0f) { - return SampleTurboModuleCxxFloatEnum::POINT_ZERO; - } else if (value == 0.1f) { - return SampleTurboModuleCxxFloatEnum::POINT_ONE; - } else if (value == 0.2f) { - return SampleTurboModuleCxxFloatEnum::POINT_TWO; + if (value == 1.23f) { + return SampleTurboModuleCxxEnumFloat::FA; + } else if (value == 4.56f) { + return SampleTurboModuleCxxEnumFloat::FB; } else { throw jsi::JSError(rt, \\"No appropriate enum member found for value\\"); } } - static jsi::Value toJs(jsi::Runtime &rt, SampleTurboModuleCxxFloatEnum value) { - if (value == SampleTurboModuleCxxFloatEnum::POINT_ZERO) { - return bridging::toJs(rt, 0.0f); - } else if (value == SampleTurboModuleCxxFloatEnum::POINT_ONE) { - return bridging::toJs(rt, 0.1f); - } else if (value == SampleTurboModuleCxxFloatEnum::POINT_TWO) { - return bridging::toJs(rt, 0.2f); + static jsi::Value toJs(jsi::Runtime &rt, SampleTurboModuleCxxEnumFloat value) { + if (value == SampleTurboModuleCxxEnumFloat::FA) { + return bridging::toJs(rt, 1.23f); + } else if (value == SampleTurboModuleCxxEnumFloat::FB) { + return bridging::toJs(rt, 4.56f); } else { throw jsi::JSError(rt, \\"No appropriate enum member found for enum value\\"); } } }; -#pragma mark - SampleTurboModuleCxxStringEnum +#pragma mark - SampleTurboModuleCxxEnumNone -enum SampleTurboModuleCxxStringEnum { HELLO, GoodBye }; +enum class SampleTurboModuleCxxEnumNone { NA, NB }; template <> -struct Bridging { - static SampleTurboModuleCxxStringEnum fromJs(jsi::Runtime &rt, const jsi::String &rawValue) { +struct Bridging { + static SampleTurboModuleCxxEnumNone fromJs(jsi::Runtime &rt, const jsi::String &rawValue) { std::string value = rawValue.utf8(rt); - if (value == \\"hello\\") { - return SampleTurboModuleCxxStringEnum::HELLO; - } else if (value == \\"goodbye\\") { - return SampleTurboModuleCxxStringEnum::GoodBye; + if (value == \\"NA\\") { + return SampleTurboModuleCxxEnumNone::NA; + } else if (value == \\"NB\\") { + return SampleTurboModuleCxxEnumNone::NB; } else { throw jsi::JSError(rt, \\"No appropriate enum member found for value\\"); } } - static jsi::String toJs(jsi::Runtime &rt, SampleTurboModuleCxxStringEnum value) { - if (value == SampleTurboModuleCxxStringEnum::HELLO) { - return bridging::toJs(rt, \\"hello\\"); - } else if (value == SampleTurboModuleCxxStringEnum::GoodBye) { - return bridging::toJs(rt, \\"goodbye\\"); + static jsi::String toJs(jsi::Runtime &rt, SampleTurboModuleCxxEnumNone value) { + if (value == SampleTurboModuleCxxEnumNone::NA) { + return bridging::toJs(rt, \\"NA\\"); + } else if (value == SampleTurboModuleCxxEnumNone::NB) { + return bridging::toJs(rt, \\"NB\\"); + } else { + throw jsi::JSError(rt, \\"No appropriate enum member found for enum value\\"); + } + } +}; + +#pragma mark - SampleTurboModuleCxxEnumStr + +enum class SampleTurboModuleCxxEnumStr { SA, SB }; + +template <> +struct Bridging { + static SampleTurboModuleCxxEnumStr fromJs(jsi::Runtime &rt, const jsi::String &rawValue) { + std::string value = rawValue.utf8(rt); + if (value == \\"s---a\\") { + return SampleTurboModuleCxxEnumStr::SA; + } else if (value == \\"s---b\\") { + return SampleTurboModuleCxxEnumStr::SB; + } else { + throw jsi::JSError(rt, \\"No appropriate enum member found for value\\"); + } + } + + static jsi::String toJs(jsi::Runtime &rt, SampleTurboModuleCxxEnumStr value) { + if (value == SampleTurboModuleCxxEnumStr::SA) { + return bridging::toJs(rt, \\"s---a\\"); + } else if (value == SampleTurboModuleCxxEnumStr::SB) { + return bridging::toJs(rt, \\"s---b\\"); } else { throw jsi::JSError(rt, \\"No appropriate enum member found for enum value\\"); } } }; -#pragma mark - SampleTurboModuleCxxBaseObjectAlias +#pragma mark - SampleTurboModuleCxxBaseConstantsStruct -template -struct SampleTurboModuleCxxBaseObjectAlias { - P0 x; - bool operator==(const SampleTurboModuleCxxBaseObjectAlias &other) const { - return x == other.x; +template +struct [[deprecated(\\"Use SampleTurboModuleCxxConstantsStruct instead.\\")]] SampleTurboModuleCxxBaseConstantsStruct { + P0 const1; + P1 const2; + P2 const3; + bool operator==(const SampleTurboModuleCxxBaseConstantsStruct &other) const { + return const1 == other.const1 && const2 == other.const2 && const3 == other.const3; } }; -template -struct SampleTurboModuleCxxBaseObjectAliasBridging { - static SampleTurboModuleCxxBaseObjectAlias fromJs( +template +struct [[deprecated(\\"Use SampleTurboModuleCxxConstantsStructBridging instead.\\")]] SampleTurboModuleCxxBaseConstantsStructBridging { + static SampleTurboModuleCxxBaseConstantsStruct fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - SampleTurboModuleCxxBaseObjectAlias result{ - bridging::fromJs(rt, value.getProperty(rt, \\"x\\"), jsInvoker)}; + SampleTurboModuleCxxBaseConstantsStruct result{ + bridging::fromJs(rt, value.getProperty(rt, \\"const1\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"const2\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"const3\\"), jsInvoker)}; return result; } #ifdef DEBUG - static double xToJs(jsi::Runtime &rt, P0 value) { + static bool const1ToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } + + static double const2ToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } + + static jsi::String const3ToJs(jsi::Runtime &rt, P2 value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const SampleTurboModuleCxxBaseObjectAlias &value, + const SampleTurboModuleCxxBaseConstantsStruct &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); - result.setProperty(rt, \\"x\\", bridging::toJs(rt, value.x, jsInvoker)); + result.setProperty(rt, \\"const1\\", bridging::toJs(rt, value.const1, jsInvoker)); + result.setProperty(rt, \\"const2\\", bridging::toJs(rt, value.const2, jsInvoker)); + result.setProperty(rt, \\"const3\\", bridging::toJs(rt, value.const3, jsInvoker)); return result; } }; -class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { -protected: - NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); -public: - virtual jsi::Value getMixed(jsi::Runtime &rt, jsi::Value arg) = 0; - virtual std::optional getNullableNumberFromNullableAlias(jsi::Runtime &rt, std::optional a) = 0; - virtual jsi::String getEnums(jsi::Runtime &rt, int enumInt, double enumFloat, jsi::String enumString) = 0; - virtual jsi::Object getUnion(jsi::Runtime &rt, double chooseInt, double chooseFloat, jsi::Object chooseObject, jsi::String chooseString) = 0; - virtual int getEnumReturn(jsi::Runtime &rt) = 0; -}; -template -class JSI_EXPORT NativeSampleTurboModuleCxxSpec : public TurboModule { -public: - jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.get(rt, propName); - } +#pragma mark - SampleTurboModuleCxxBaseBinaryTreeNode - static constexpr std::string_view kModuleName = \\"SampleTurboModuleCxx\\"; +template +struct [[deprecated(\\"Use SampleTurboModuleCxxBinaryTreeNode instead.\\")]] SampleTurboModuleCxxBaseBinaryTreeNode { + P0 left; + P1 value; + P2 right; + bool operator==(const SampleTurboModuleCxxBaseBinaryTreeNode &other) const { + return left == other.left && value == other.value && right == other.right; + } +}; -protected: - NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} +template +struct [[deprecated(\\"Use SampleTurboModuleCxxBinaryTreeNodeBridging instead.\\")]] SampleTurboModuleCxxBaseBinaryTreeNodeBridging { + static SampleTurboModuleCxxBaseBinaryTreeNode fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + SampleTurboModuleCxxBaseBinaryTreeNode result{ + bridging::fromJs(rt, value.getProperty(rt, \\"left\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"value\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"right\\"), jsInvoker)}; + return result; + } -private: - class Delegate : public NativeSampleTurboModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeSampleTurboModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} +#ifdef DEBUG + static jsi::Object leftToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } - jsi::Value getMixed(jsi::Runtime &rt, jsi::Value arg) override { - static_assert( - bridging::getParameterCount(&T::getMixed) == 2, - \\"Expected getMixed(...) to have 2 parameters\\"); + static double valueToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } - return bridging::callFromJs( - rt, &T::getMixed, jsInvoker_, instance_, std::move(arg)); - } - std::optional getNullableNumberFromNullableAlias(jsi::Runtime &rt, std::optional a) override { - static_assert( - bridging::getParameterCount(&T::getNullableNumberFromNullableAlias) == 2, - \\"Expected getNullableNumberFromNullableAlias(...) to have 2 parameters\\"); + static jsi::Object rightToJs(jsi::Runtime &rt, P2 value) { + return bridging::toJs(rt, value); + } +#endif - return bridging::callFromJs>( - rt, &T::getNullableNumberFromNullableAlias, jsInvoker_, instance_, std::move(a)); + static jsi::Object toJs( + jsi::Runtime &rt, + const SampleTurboModuleCxxBaseBinaryTreeNode &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + if (value.left) { + result.setProperty(rt, \\"left\\", bridging::toJs(rt, value.left.value(), jsInvoker)); } - jsi::String getEnums(jsi::Runtime &rt, int enumInt, double enumFloat, jsi::String enumString) override { - static_assert( - bridging::getParameterCount(&T::getEnums) == 4, - \\"Expected getEnums(...) to have 4 parameters\\"); - - return bridging::callFromJs( - rt, &T::getEnums, jsInvoker_, instance_, std::move(enumInt), std::move(enumFloat), std::move(enumString)); + result.setProperty(rt, \\"value\\", bridging::toJs(rt, value.value, jsInvoker)); + if (value.right) { + result.setProperty(rt, \\"right\\", bridging::toJs(rt, value.right.value(), jsInvoker)); } - jsi::Object getUnion(jsi::Runtime &rt, double chooseInt, double chooseFloat, jsi::Object chooseObject, jsi::String chooseString) override { - static_assert( - bridging::getParameterCount(&T::getUnion) == 5, - \\"Expected getUnion(...) to have 5 parameters\\"); + return result; + } +}; - return bridging::callFromJs( - rt, &T::getUnion, jsInvoker_, instance_, std::move(chooseInt), std::move(chooseFloat), std::move(chooseObject), std::move(chooseString)); - } - int getEnumReturn(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getEnumReturn) == 1, - \\"Expected getEnumReturn(...) to have 1 parameters\\"); - return bridging::callFromJs( - rt, &T::getEnumReturn, jsInvoker_, instance_); - } - private: - T *instance_; - }; +#pragma mark - SampleTurboModuleCxxBaseGraphNode - Delegate delegate_; +template +struct [[deprecated(\\"Use SampleTurboModuleCxxGraphNode instead.\\")]] SampleTurboModuleCxxBaseGraphNode { + P0 label; + P1 neighbors; + bool operator==(const SampleTurboModuleCxxBaseGraphNode &other) const { + return label == other.label && neighbors == other.neighbors; + } }; -} // namespace react -} // namespace facebook -", -} -`; - -exports[`GenerateModuleH can generate fixture empty_native_modules 1`] = ` -Map { - "empty_native_modulesJSI.h" => "/** - * 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 - */ +template +struct [[deprecated(\\"Use SampleTurboModuleCxxGraphNodeBridging instead.\\")]] SampleTurboModuleCxxBaseGraphNodeBridging { + static SampleTurboModuleCxxBaseGraphNode fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + SampleTurboModuleCxxBaseGraphNode result{ + bridging::fromJs(rt, value.getProperty(rt, \\"label\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"neighbors\\"), jsInvoker)}; + return result; + } -#pragma once +#ifdef DEBUG + static jsi::String labelToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } -#include -#include + static jsi::Array neighborsToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } +#endif -namespace facebook { -namespace react { + static jsi::Object toJs( + jsi::Runtime &rt, + const SampleTurboModuleCxxBaseGraphNode &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"label\\", bridging::toJs(rt, value.label, jsInvoker)); + if (value.neighbors) { + result.setProperty(rt, \\"neighbors\\", bridging::toJs(rt, value.neighbors.value(), jsInvoker)); + } + return result; + } +}; - class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { -protected: - NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); -public: - +#pragma mark - SampleTurboModuleCxxBaseObjectStruct +template +struct [[deprecated(\\"Use SampleTurboModuleCxxObjectStruct instead.\\")]] SampleTurboModuleCxxBaseObjectStruct { + P0 a; + P1 b; + P2 c; + bool operator==(const SampleTurboModuleCxxBaseObjectStruct &other) const { + return a == other.a && b == other.b && c == other.c; + } }; -template -class JSI_EXPORT NativeSampleTurboModuleCxxSpec : public TurboModule { -public: - jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.get(rt, propName); +template +struct [[deprecated(\\"Use SampleTurboModuleCxxObjectStructBridging instead.\\")]] SampleTurboModuleCxxBaseObjectStructBridging { + static SampleTurboModuleCxxBaseObjectStruct fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + SampleTurboModuleCxxBaseObjectStruct result{ + bridging::fromJs(rt, value.getProperty(rt, \\"a\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"b\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"c\\"), jsInvoker)}; + return result; } - static constexpr std::string_view kModuleName = \\"SampleTurboModule\\"; - -protected: - NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} - -private: - class Delegate : public NativeSampleTurboModuleCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeSampleTurboModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} +#ifdef DEBUG + static double aToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } - + static jsi::String bToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } - private: - T *instance_; - }; + static std::optional cToJs(jsi::Runtime &rt, P2 value) { + return bridging::toJs(rt, value); + } +#endif - Delegate delegate_; + static jsi::Object toJs( + jsi::Runtime &rt, + const SampleTurboModuleCxxBaseObjectStruct &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"a\\", bridging::toJs(rt, value.a, jsInvoker)); + result.setProperty(rt, \\"b\\", bridging::toJs(rt, value.b, jsInvoker)); + if (value.c) { + result.setProperty(rt, \\"c\\", bridging::toJs(rt, value.c.value(), jsInvoker)); + } + return result; + } }; -} // namespace react -} // namespace facebook -", -} -`; - -exports[`GenerateModuleH can generate fixture native_modules_with_type_aliases 1`] = ` -Map { - "native_modules_with_type_aliasesJSI.h" => "/** - * 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 { - -#pragma mark - AliasTurboModuleBaseOptions +#pragma mark - SampleTurboModuleCxxBaseValueStruct -template -struct AliasTurboModuleBaseOptions { - P0 offset; - P1 size; - P2 displaySize; - P3 resizeMode; - P4 allowExternalStorage; - bool operator==(const AliasTurboModuleBaseOptions &other) const { - return offset == other.offset && size == other.size && displaySize == other.displaySize && resizeMode == other.resizeMode && allowExternalStorage == other.allowExternalStorage; +template +struct [[deprecated(\\"Use SampleTurboModuleCxxValueStruct instead.\\")]] SampleTurboModuleCxxBaseValueStruct { + P0 x; + P1 y; + P2 z; + bool operator==(const SampleTurboModuleCxxBaseValueStruct &other) const { + return x == other.x && y == other.y && z == other.z; } }; -template -struct AliasTurboModuleBaseOptionsBridging { - static AliasTurboModuleBaseOptions fromJs( +template +struct [[deprecated(\\"Use SampleTurboModuleCxxValueStructBridging instead.\\")]] SampleTurboModuleCxxBaseValueStructBridging { + static SampleTurboModuleCxxBaseValueStruct fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - AliasTurboModuleBaseOptions result{ - bridging::fromJs(rt, value.getProperty(rt, \\"offset\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"size\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"displaySize\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"resizeMode\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"allowExternalStorage\\"), jsInvoker)}; + SampleTurboModuleCxxBaseValueStruct result{ + bridging::fromJs(rt, value.getProperty(rt, \\"x\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"y\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"z\\"), jsInvoker)}; return result; } #ifdef DEBUG - static jsi::Object offsetToJs(jsi::Runtime &rt, P0 value) { - return bridging::toJs(rt, value); - } - - static jsi::Object sizeToJs(jsi::Runtime &rt, P1 value) { - return bridging::toJs(rt, value); - } - - static jsi::Object displaySizeToJs(jsi::Runtime &rt, P2 value) { + static double xToJs(jsi::Runtime &rt, P0 value) { return bridging::toJs(rt, value); } - static jsi::String resizeModeToJs(jsi::Runtime &rt, P3 value) { + static jsi::String yToJs(jsi::Runtime &rt, P1 value) { return bridging::toJs(rt, value); } - static bool allowExternalStorageToJs(jsi::Runtime &rt, P4 value) { + static jsi::Object zToJs(jsi::Runtime &rt, P2 value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const AliasTurboModuleBaseOptions &value, + const SampleTurboModuleCxxBaseValueStruct &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); - result.setProperty(rt, \\"offset\\", bridging::toJs(rt, value.offset, jsInvoker)); - result.setProperty(rt, \\"size\\", bridging::toJs(rt, value.size, jsInvoker)); - if (value.displaySize) { - result.setProperty(rt, \\"displaySize\\", bridging::toJs(rt, value.displaySize.value(), jsInvoker)); - } - if (value.resizeMode) { - result.setProperty(rt, \\"resizeMode\\", bridging::toJs(rt, value.resizeMode.value(), jsInvoker)); - } - if (value.allowExternalStorage) { - result.setProperty(rt, \\"allowExternalStorage\\", bridging::toJs(rt, value.allowExternalStorage.value(), jsInvoker)); - } + result.setProperty(rt, \\"x\\", bridging::toJs(rt, value.x, jsInvoker)); + result.setProperty(rt, \\"y\\", bridging::toJs(rt, value.y, jsInvoker)); + result.setProperty(rt, \\"z\\", bridging::toJs(rt, value.z, jsInvoker)); return result; } }; -class JSI_EXPORT AliasTurboModuleCxxSpecJSI : public TurboModule { -protected: - AliasTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); + + +#pragma mark - SampleTurboModuleCxxBaseMenuItem + +template +struct [[deprecated(\\"Use SampleTurboModuleCxxMenuItem instead.\\")]] SampleTurboModuleCxxBaseMenuItem { + P0 label; + P1 onPress; + P2 shortcut; + P3 items; + bool operator==(const SampleTurboModuleCxxBaseMenuItem &other) const { + return label == other.label && onPress == other.onPress && shortcut == other.shortcut && items == other.items; + } +}; + +template +struct [[deprecated(\\"Use SampleTurboModuleCxxMenuItemBridging instead.\\")]] SampleTurboModuleCxxBaseMenuItemBridging { + static SampleTurboModuleCxxBaseMenuItem fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + SampleTurboModuleCxxBaseMenuItem result{ + bridging::fromJs(rt, value.getProperty(rt, \\"label\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"onPress\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"shortcut\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"items\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String labelToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } + + static jsi::Function onPressToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } + + static std::optional shortcutToJs(jsi::Runtime &rt, P2 value) { + return bridging::toJs(rt, value); + } + + static jsi::Array itemsToJs(jsi::Runtime &rt, P3 value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const SampleTurboModuleCxxBaseMenuItem &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"label\\", bridging::toJs(rt, value.label, jsInvoker)); + result.setProperty(rt, \\"onPress\\", bridging::toJs(rt, value.onPress, jsInvoker)); + if (value.shortcut) { + result.setProperty(rt, \\"shortcut\\", bridging::toJs(rt, value.shortcut.value(), jsInvoker)); + } + if (value.items) { + result.setProperty(rt, \\"items\\", bridging::toJs(rt, value.items.value(), jsInvoker)); + } + return result; + } +}; + + +#pragma mark - SampleTurboModuleCxxConstantsStruct + +template +struct SampleTurboModuleCxxConstantsStruct { + P0 const1; + P1 const2; + P2 const3; + bool operator==(const SampleTurboModuleCxxConstantsStruct &other) const { + return const1 == other.const1 && const2 == other.const2 && const3 == other.const3; + } +}; + +template +struct SampleTurboModuleCxxConstantsStructBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"const1\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"const2\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"const3\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static bool const1ToJs(jsi::Runtime &rt, decltype(types.const1) value) { + return bridging::toJs(rt, value); + } + + static double const2ToJs(jsi::Runtime &rt, decltype(types.const2) value) { + return bridging::toJs(rt, value); + } + + static jsi::String const3ToJs(jsi::Runtime &rt, decltype(types.const3) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"const1\\", bridging::toJs(rt, value.const1, jsInvoker)); + result.setProperty(rt, \\"const2\\", bridging::toJs(rt, value.const2, jsInvoker)); + result.setProperty(rt, \\"const3\\", bridging::toJs(rt, value.const3, jsInvoker)); + return result; + } +}; + + + + +#pragma mark - SampleTurboModuleCxxBinaryTreeNode + +template +struct SampleTurboModuleCxxBinaryTreeNode { + std::unique_ptr> left; + P0 value; + std::unique_ptr> right; + bool operator==(const SampleTurboModuleCxxBinaryTreeNode &other) const { + return left == other.left && value == other.value && right == other.right; + } +}; + +template +struct SampleTurboModuleCxxBinaryTreeNodeBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + value.hasProperty(rt, \\"left\\") ? std::make_unique(bridging::fromJs(rt, value.getProperty(rt, \\"left\\"), jsInvoker)) : nullptr, + bridging::fromJs(rt, value.getProperty(rt, \\"value\\"), jsInvoker), + value.hasProperty(rt, \\"right\\") ? std::make_unique(bridging::fromJs(rt, value.getProperty(rt, \\"right\\"), jsInvoker)) : nullptr}; + return result; + } + +#ifdef DEBUG + static jsi::Object leftToJs(jsi::Runtime &rt, decltype(types.left) value) { + return bridging::toJs(rt, value); + } + + static double valueToJs(jsi::Runtime &rt, decltype(types.value) value) { + return bridging::toJs(rt, value); + } + + static jsi::Object rightToJs(jsi::Runtime &rt, decltype(types.right) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + if (value.left) { + result.setProperty(rt, \\"left\\", bridging::toJs(rt, *value.left, jsInvoker)); + } + result.setProperty(rt, \\"value\\", bridging::toJs(rt, value.value, jsInvoker)); + if (value.right) { + result.setProperty(rt, \\"right\\", bridging::toJs(rt, *value.right, jsInvoker)); + } + return result; + } +}; + + + +#pragma mark - SampleTurboModuleCxxGraphNode + +template +struct SampleTurboModuleCxxGraphNode { + P0 label; + std::optional>> neighbors; + bool operator==(const SampleTurboModuleCxxGraphNode &other) const { + return label == other.label && neighbors == other.neighbors; + } +}; + +template +struct SampleTurboModuleCxxGraphNodeBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"label\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"neighbors\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String labelToJs(jsi::Runtime &rt, decltype(types.label) value) { + return bridging::toJs(rt, value); + } + + static jsi::Array neighborsToJs(jsi::Runtime &rt, decltype(types.neighbors) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"label\\", bridging::toJs(rt, value.label, jsInvoker)); + if (value.neighbors) { + result.setProperty(rt, \\"neighbors\\", bridging::toJs(rt, value.neighbors.value(), jsInvoker)); + } + return result; + } +}; + + + +#pragma mark - SampleTurboModuleCxxObjectStruct + +template +struct SampleTurboModuleCxxObjectStruct { + P0 a; + P1 b; + P2 c; + bool operator==(const SampleTurboModuleCxxObjectStruct &other) const { + return a == other.a && b == other.b && c == other.c; + } +}; + +template +struct SampleTurboModuleCxxObjectStructBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"a\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"b\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"c\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static double aToJs(jsi::Runtime &rt, decltype(types.a) value) { + return bridging::toJs(rt, value); + } + + static jsi::String bToJs(jsi::Runtime &rt, decltype(types.b) value) { + return bridging::toJs(rt, value); + } + + static std::optional cToJs(jsi::Runtime &rt, decltype(types.c) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"a\\", bridging::toJs(rt, value.a, jsInvoker)); + result.setProperty(rt, \\"b\\", bridging::toJs(rt, value.b, jsInvoker)); + if (value.c) { + result.setProperty(rt, \\"c\\", bridging::toJs(rt, value.c.value(), jsInvoker)); + } + return result; + } +}; + + + +#pragma mark - SampleTurboModuleCxxValueStruct + +template +struct SampleTurboModuleCxxValueStruct { + P0 x; + P1 y; + P2 z; + bool operator==(const SampleTurboModuleCxxValueStruct &other) const { + return x == other.x && y == other.y && z == other.z; + } +}; + +template +struct SampleTurboModuleCxxValueStructBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"x\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"y\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"z\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static double xToJs(jsi::Runtime &rt, decltype(types.x) value) { + return bridging::toJs(rt, value); + } + + static jsi::String yToJs(jsi::Runtime &rt, decltype(types.y) value) { + return bridging::toJs(rt, value); + } + + static jsi::Object zToJs(jsi::Runtime &rt, decltype(types.z) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"x\\", bridging::toJs(rt, value.x, jsInvoker)); + result.setProperty(rt, \\"y\\", bridging::toJs(rt, value.y, jsInvoker)); + result.setProperty(rt, \\"z\\", bridging::toJs(rt, value.z, jsInvoker)); + return result; + } +}; + + + +#pragma mark - SampleTurboModuleCxxMenuItem + +template +struct SampleTurboModuleCxxMenuItem { + P0 label; + P1 onPress; + P2 shortcut; + std::optional>> items; + bool operator==(const SampleTurboModuleCxxMenuItem &other) const { + return label == other.label && onPress == other.onPress && shortcut == other.shortcut && items == other.items; + } +}; + +template +struct SampleTurboModuleCxxMenuItemBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"label\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"onPress\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"shortcut\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"items\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String labelToJs(jsi::Runtime &rt, decltype(types.label) value) { + return bridging::toJs(rt, value); + } + + static jsi::Function onPressToJs(jsi::Runtime &rt, decltype(types.onPress) value) { + return bridging::toJs(rt, value); + } + + static std::optional shortcutToJs(jsi::Runtime &rt, decltype(types.shortcut) value) { + return bridging::toJs(rt, value); + } + + static jsi::Array itemsToJs(jsi::Runtime &rt, decltype(types.items) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"label\\", bridging::toJs(rt, value.label, jsInvoker)); + result.setProperty(rt, \\"onPress\\", bridging::toJs(rt, value.onPress, jsInvoker)); + if (value.shortcut) { + result.setProperty(rt, \\"shortcut\\", bridging::toJs(rt, value.shortcut.value(), jsInvoker)); + } + if (value.items) { + result.setProperty(rt, \\"items\\", bridging::toJs(rt, value.items.value(), jsInvoker)); + } + return result; + } +}; + +class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { +protected: + NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); + +public: + virtual jsi::Array getArray(jsi::Runtime &rt, jsi::Array arg) = 0; + virtual bool getBool(jsi::Runtime &rt, bool arg) = 0; + virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; + virtual jsi::Value getCustomEnum(jsi::Runtime &rt, jsi::Value arg) = 0; + virtual jsi::Object getCustomHostObject(jsi::Runtime &rt) = 0; + virtual jsi::String consumeCustomHostObject(jsi::Runtime &rt, jsi::Object customHostObject) = 0; + virtual jsi::Object getBinaryTreeNode(jsi::Runtime &rt, jsi::Object arg) = 0; + virtual jsi::Object getGraphNode(jsi::Runtime &rt, jsi::Object arg) = 0; + virtual jsi::Value getNumEnum(jsi::Runtime &rt, jsi::Value arg) = 0; + virtual jsi::String getStrEnum(jsi::Runtime &rt, jsi::String arg) = 0; + virtual jsi::Object getMap(jsi::Runtime &rt, jsi::Object arg) = 0; + virtual double getNumber(jsi::Runtime &rt, double arg) = 0; + virtual jsi::Object getObject(jsi::Runtime &rt, jsi::Object arg) = 0; + virtual jsi::Array getSet(jsi::Runtime &rt, jsi::Array arg) = 0; + virtual jsi::String getString(jsi::Runtime &rt, jsi::String arg) = 0; + virtual jsi::String getUnion(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) = 0; + virtual jsi::Object getValue(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) = 0; + virtual void getValueWithCallback(jsi::Runtime &rt, jsi::Function callback) = 0; + virtual jsi::Value getValueWithPromise(jsi::Runtime &rt, bool error) = 0; + virtual std::optional getWithWithOptionalArgs(jsi::Runtime &rt, std::optional optionalArg) = 0; + virtual void voidFunc(jsi::Runtime &rt) = 0; + virtual void setMenu(jsi::Runtime &rt, jsi::Object menuItem) = 0; + virtual void emitCustomDeviceEvent(jsi::Runtime &rt, jsi::String eventName) = 0; + virtual void voidFuncThrows(jsi::Runtime &rt) = 0; + virtual jsi::Object getObjectThrows(jsi::Runtime &rt, jsi::Object arg) = 0; + virtual void voidFuncAssert(jsi::Runtime &rt) = 0; + virtual jsi::Object getObjectAssert(jsi::Runtime &rt, jsi::Object arg) = 0; + +}; + +template +class JSI_EXPORT NativeSampleTurboModuleCxxSpec : 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 = \\"SampleTurboModuleCxx\\"; + +protected: + NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) + : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), + delegate_(reinterpret_cast(this), jsInvoker) {} + +private: + class Delegate : public NativeSampleTurboModuleCxxSpecJSI { + public: + Delegate(T *instance, std::shared_ptr jsInvoker) : + NativeSampleTurboModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} + + jsi::Array getArray(jsi::Runtime &rt, jsi::Array arg) override { + static_assert( + bridging::getParameterCount(&T::getArray) == 2, + \\"Expected getArray(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getArray, jsInvoker_, instance_, std::move(arg)); + } + bool getBool(jsi::Runtime &rt, bool arg) override { + static_assert( + bridging::getParameterCount(&T::getBool) == 2, + \\"Expected getBool(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getBool, jsInvoker_, instance_, std::move(arg)); + } + jsi::Object getConstants(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::getConstants) == 1, + \\"Expected getConstants(...) to have 1 parameters\\"); + + return bridging::callFromJs( + rt, &T::getConstants, jsInvoker_, instance_); + } + jsi::Value getCustomEnum(jsi::Runtime &rt, jsi::Value arg) override { + static_assert( + bridging::getParameterCount(&T::getCustomEnum) == 2, + \\"Expected getCustomEnum(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getCustomEnum, jsInvoker_, instance_, std::move(arg)); + } + jsi::Object getCustomHostObject(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::getCustomHostObject) == 1, + \\"Expected getCustomHostObject(...) to have 1 parameters\\"); + + return bridging::callFromJs( + rt, &T::getCustomHostObject, jsInvoker_, instance_); + } + jsi::String consumeCustomHostObject(jsi::Runtime &rt, jsi::Object customHostObject) override { + static_assert( + bridging::getParameterCount(&T::consumeCustomHostObject) == 2, + \\"Expected consumeCustomHostObject(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::consumeCustomHostObject, jsInvoker_, instance_, std::move(customHostObject)); + } + jsi::Object getBinaryTreeNode(jsi::Runtime &rt, jsi::Object arg) override { + static_assert( + bridging::getParameterCount(&T::getBinaryTreeNode) == 2, + \\"Expected getBinaryTreeNode(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getBinaryTreeNode, jsInvoker_, instance_, std::move(arg)); + } + jsi::Object getGraphNode(jsi::Runtime &rt, jsi::Object arg) override { + static_assert( + bridging::getParameterCount(&T::getGraphNode) == 2, + \\"Expected getGraphNode(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getGraphNode, jsInvoker_, instance_, std::move(arg)); + } + jsi::Value getNumEnum(jsi::Runtime &rt, jsi::Value arg) override { + static_assert( + bridging::getParameterCount(&T::getNumEnum) == 2, + \\"Expected getNumEnum(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getNumEnum, jsInvoker_, instance_, std::move(arg)); + } + jsi::String getStrEnum(jsi::Runtime &rt, jsi::String arg) override { + static_assert( + bridging::getParameterCount(&T::getStrEnum) == 2, + \\"Expected getStrEnum(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getStrEnum, jsInvoker_, instance_, std::move(arg)); + } + jsi::Object getMap(jsi::Runtime &rt, jsi::Object arg) override { + static_assert( + bridging::getParameterCount(&T::getMap) == 2, + \\"Expected getMap(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getMap, jsInvoker_, instance_, std::move(arg)); + } + double getNumber(jsi::Runtime &rt, double arg) override { + static_assert( + bridging::getParameterCount(&T::getNumber) == 2, + \\"Expected getNumber(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getNumber, jsInvoker_, instance_, std::move(arg)); + } + jsi::Object getObject(jsi::Runtime &rt, jsi::Object arg) override { + static_assert( + bridging::getParameterCount(&T::getObject) == 2, + \\"Expected getObject(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getObject, jsInvoker_, instance_, std::move(arg)); + } + jsi::Array getSet(jsi::Runtime &rt, jsi::Array arg) override { + static_assert( + bridging::getParameterCount(&T::getSet) == 2, + \\"Expected getSet(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getSet, jsInvoker_, instance_, std::move(arg)); + } + jsi::String getString(jsi::Runtime &rt, jsi::String arg) override { + static_assert( + bridging::getParameterCount(&T::getString) == 2, + \\"Expected getString(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getString, jsInvoker_, instance_, std::move(arg)); + } + jsi::String getUnion(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) override { + static_assert( + bridging::getParameterCount(&T::getUnion) == 4, + \\"Expected getUnion(...) to have 4 parameters\\"); + + return bridging::callFromJs( + rt, &T::getUnion, jsInvoker_, instance_, std::move(x), std::move(y), std::move(z)); + } + jsi::Object getValue(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) override { + static_assert( + bridging::getParameterCount(&T::getValue) == 4, + \\"Expected getValue(...) to have 4 parameters\\"); + + return bridging::callFromJs( + rt, &T::getValue, jsInvoker_, instance_, std::move(x), std::move(y), std::move(z)); + } + void getValueWithCallback(jsi::Runtime &rt, jsi::Function callback) override { + static_assert( + bridging::getParameterCount(&T::getValueWithCallback) == 2, + \\"Expected getValueWithCallback(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getValueWithCallback, jsInvoker_, instance_, std::move(callback)); + } + jsi::Value getValueWithPromise(jsi::Runtime &rt, bool error) override { + static_assert( + bridging::getParameterCount(&T::getValueWithPromise) == 2, + \\"Expected getValueWithPromise(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getValueWithPromise, jsInvoker_, instance_, std::move(error)); + } + std::optional getWithWithOptionalArgs(jsi::Runtime &rt, std::optional optionalArg) override { + static_assert( + bridging::getParameterCount(&T::getWithWithOptionalArgs) == 2, + \\"Expected getWithWithOptionalArgs(...) to have 2 parameters\\"); + + return bridging::callFromJs>( + rt, &T::getWithWithOptionalArgs, jsInvoker_, instance_, std::move(optionalArg)); + } + void voidFunc(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::voidFunc) == 1, + \\"Expected voidFunc(...) to have 1 parameters\\"); + + return bridging::callFromJs( + rt, &T::voidFunc, jsInvoker_, instance_); + } + void setMenu(jsi::Runtime &rt, jsi::Object menuItem) override { + static_assert( + bridging::getParameterCount(&T::setMenu) == 2, + \\"Expected setMenu(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::setMenu, jsInvoker_, instance_, std::move(menuItem)); + } + void emitCustomDeviceEvent(jsi::Runtime &rt, jsi::String eventName) override { + static_assert( + bridging::getParameterCount(&T::emitCustomDeviceEvent) == 2, + \\"Expected emitCustomDeviceEvent(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::emitCustomDeviceEvent, jsInvoker_, instance_, std::move(eventName)); + } + void voidFuncThrows(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::voidFuncThrows) == 1, + \\"Expected voidFuncThrows(...) to have 1 parameters\\"); + + return bridging::callFromJs( + rt, &T::voidFuncThrows, jsInvoker_, instance_); + } + jsi::Object getObjectThrows(jsi::Runtime &rt, jsi::Object arg) override { + static_assert( + bridging::getParameterCount(&T::getObjectThrows) == 2, + \\"Expected getObjectThrows(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getObjectThrows, jsInvoker_, instance_, std::move(arg)); + } + void voidFuncAssert(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::voidFuncAssert) == 1, + \\"Expected voidFuncAssert(...) to have 1 parameters\\"); + + return bridging::callFromJs( + rt, &T::voidFuncAssert, jsInvoker_, instance_); + } + jsi::Object getObjectAssert(jsi::Runtime &rt, jsi::Object arg) override { + static_assert( + bridging::getParameterCount(&T::getObjectAssert) == 2, + \\"Expected getObjectAssert(...) to have 2 parameters\\"); + + return bridging::callFromJs( + rt, &T::getObjectAssert, jsInvoker_, instance_, std::move(arg)); + } + + private: + T *instance_; + }; + + Delegate delegate_; +}; + +} // namespace facebook::react +", +} +`; + +exports[`GenerateModuleH can generate fixture empty_native_modules 1`] = ` +Map { + "empty_native_modulesJSI.h" => "/** + * 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::react { + + + class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { +protected: + NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); + +public: + + +}; + +template +class JSI_EXPORT NativeSampleTurboModuleCxxSpec : 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 = \\"SampleTurboModule\\"; + +protected: + NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) + : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), + delegate_(reinterpret_cast(this), jsInvoker) {} + +private: + class Delegate : public NativeSampleTurboModuleCxxSpecJSI { + public: + Delegate(T *instance, std::shared_ptr jsInvoker) : + NativeSampleTurboModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} + + + + private: + T *instance_; + }; + + Delegate delegate_; +}; + +} // namespace facebook::react +", +} +`; + +exports[`GenerateModuleH can generate fixture native_modules_with_type_aliases 1`] = ` +Map { + "native_modules_with_type_aliasesJSI.h" => "/** + * 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::react { + + + +#pragma mark - AliasTurboModuleBaseOptions + +template +struct [[deprecated(\\"Use AliasTurboModuleOptions instead.\\")]] AliasTurboModuleBaseOptions { + P0 offset; + P1 size; + P2 displaySize; + P3 resizeMode; + P4 allowExternalStorage; + bool operator==(const AliasTurboModuleBaseOptions &other) const { + return offset == other.offset && size == other.size && displaySize == other.displaySize && resizeMode == other.resizeMode && allowExternalStorage == other.allowExternalStorage; + } +}; + +template +struct [[deprecated(\\"Use AliasTurboModuleOptionsBridging instead.\\")]] AliasTurboModuleBaseOptionsBridging { + static AliasTurboModuleBaseOptions fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + AliasTurboModuleBaseOptions result{ + bridging::fromJs(rt, value.getProperty(rt, \\"offset\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"size\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"displaySize\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"resizeMode\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"allowExternalStorage\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::Object offsetToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } + + static jsi::Object sizeToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } + + static jsi::Object displaySizeToJs(jsi::Runtime &rt, P2 value) { + return bridging::toJs(rt, value); + } + + static jsi::String resizeModeToJs(jsi::Runtime &rt, P3 value) { + return bridging::toJs(rt, value); + } + + static bool allowExternalStorageToJs(jsi::Runtime &rt, P4 value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const AliasTurboModuleBaseOptions &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"offset\\", bridging::toJs(rt, value.offset, jsInvoker)); + result.setProperty(rt, \\"size\\", bridging::toJs(rt, value.size, jsInvoker)); + if (value.displaySize) { + result.setProperty(rt, \\"displaySize\\", bridging::toJs(rt, value.displaySize.value(), jsInvoker)); + } + if (value.resizeMode) { + result.setProperty(rt, \\"resizeMode\\", bridging::toJs(rt, value.resizeMode.value(), jsInvoker)); + } + if (value.allowExternalStorage) { + result.setProperty(rt, \\"allowExternalStorage\\", bridging::toJs(rt, value.allowExternalStorage.value(), jsInvoker)); + } + return result; + } +}; + + +#pragma mark - AliasTurboModuleOptions + +template +struct AliasTurboModuleOptions { + P0 offset; + P1 size; + P2 displaySize; + P3 resizeMode; + P4 allowExternalStorage; + bool operator==(const AliasTurboModuleOptions &other) const { + return offset == other.offset && size == other.size && displaySize == other.displaySize && resizeMode == other.resizeMode && allowExternalStorage == other.allowExternalStorage; + } +}; + +template +struct AliasTurboModuleOptionsBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"offset\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"size\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"displaySize\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"resizeMode\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"allowExternalStorage\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::Object offsetToJs(jsi::Runtime &rt, decltype(types.offset) value) { + return bridging::toJs(rt, value); + } + + static jsi::Object sizeToJs(jsi::Runtime &rt, decltype(types.size) value) { + return bridging::toJs(rt, value); + } + + static jsi::Object displaySizeToJs(jsi::Runtime &rt, decltype(types.displaySize) value) { + return bridging::toJs(rt, value); + } + + static jsi::String resizeModeToJs(jsi::Runtime &rt, decltype(types.resizeMode) value) { + return bridging::toJs(rt, value); + } + + static bool allowExternalStorageToJs(jsi::Runtime &rt, decltype(types.allowExternalStorage) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"offset\\", bridging::toJs(rt, value.offset, jsInvoker)); + result.setProperty(rt, \\"size\\", bridging::toJs(rt, value.size, jsInvoker)); + if (value.displaySize) { + result.setProperty(rt, \\"displaySize\\", bridging::toJs(rt, value.displaySize.value(), jsInvoker)); + } + if (value.resizeMode) { + result.setProperty(rt, \\"resizeMode\\", bridging::toJs(rt, value.resizeMode.value(), jsInvoker)); + } + if (value.allowExternalStorage) { + result.setProperty(rt, \\"allowExternalStorage\\", bridging::toJs(rt, value.allowExternalStorage.value(), jsInvoker)); + } + return result; + } +}; + +class JSI_EXPORT AliasTurboModuleCxxSpecJSI : public TurboModule { +protected: + AliasTurboModuleCxxSpecJSI(std::shared_ptr jsInvoker); public: virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; @@ -599,7 +1520,7 @@ public: protected: AliasTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{AliasTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public AliasTurboModuleCxxSpecJSI { @@ -628,96 +1549,349 @@ private: T *instance_; }; - Delegate delegate_; -}; + Delegate delegate_; +}; + +} // namespace facebook::react +", +} +`; + +exports[`GenerateModuleH can generate fixture real_module_example 1`] = ` +Map { + "real_module_exampleJSI.h" => "/** + * 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::react { + + + +#pragma mark - CameraRollManagerBasePhotoIdentifierImage + +template +struct [[deprecated(\\"Use CameraRollManagerPhotoIdentifierImage instead.\\")]] CameraRollManagerBasePhotoIdentifierImage { + P0 uri; + P1 playableDuration; + P2 width; + P3 height; + P4 isStored; + P5 filename; + bool operator==(const CameraRollManagerBasePhotoIdentifierImage &other) const { + return uri == other.uri && playableDuration == other.playableDuration && width == other.width && height == other.height && isStored == other.isStored && filename == other.filename; + } +}; + +template +struct [[deprecated(\\"Use CameraRollManagerPhotoIdentifierImageBridging instead.\\")]] CameraRollManagerBasePhotoIdentifierImageBridging { + static CameraRollManagerBasePhotoIdentifierImage fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + CameraRollManagerBasePhotoIdentifierImage result{ + bridging::fromJs(rt, value.getProperty(rt, \\"uri\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"playableDuration\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"width\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"height\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"isStored\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"filename\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String uriToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } + + static double playableDurationToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } + + static double widthToJs(jsi::Runtime &rt, P2 value) { + return bridging::toJs(rt, value); + } + + static double heightToJs(jsi::Runtime &rt, P3 value) { + return bridging::toJs(rt, value); + } + + static bool isStoredToJs(jsi::Runtime &rt, P4 value) { + return bridging::toJs(rt, value); + } + + static jsi::String filenameToJs(jsi::Runtime &rt, P5 value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const CameraRollManagerBasePhotoIdentifierImage &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"uri\\", bridging::toJs(rt, value.uri, jsInvoker)); + result.setProperty(rt, \\"playableDuration\\", bridging::toJs(rt, value.playableDuration, jsInvoker)); + result.setProperty(rt, \\"width\\", bridging::toJs(rt, value.width, jsInvoker)); + result.setProperty(rt, \\"height\\", bridging::toJs(rt, value.height, jsInvoker)); + if (value.isStored) { + result.setProperty(rt, \\"isStored\\", bridging::toJs(rt, value.isStored.value(), jsInvoker)); + } + result.setProperty(rt, \\"filename\\", bridging::toJs(rt, value.filename, jsInvoker)); + return result; + } +}; + + + +#pragma mark - CameraRollManagerBasePhotoIdentifier + +template +struct [[deprecated(\\"Use CameraRollManagerPhotoIdentifier instead.\\")]] CameraRollManagerBasePhotoIdentifier { + P0 node; + bool operator==(const CameraRollManagerBasePhotoIdentifier &other) const { + return node == other.node; + } +}; + +template +struct [[deprecated(\\"Use CameraRollManagerPhotoIdentifierBridging instead.\\")]] CameraRollManagerBasePhotoIdentifierBridging { + static CameraRollManagerBasePhotoIdentifier fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + CameraRollManagerBasePhotoIdentifier result{ + bridging::fromJs(rt, value.getProperty(rt, \\"node\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::Object nodeToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const CameraRollManagerBasePhotoIdentifier &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"node\\", bridging::toJs(rt, value.node, jsInvoker)); + return result; + } +}; + + + +#pragma mark - CameraRollManagerBasePhotoIdentifiersPage + +template +struct [[deprecated(\\"Use CameraRollManagerPhotoIdentifiersPage instead.\\")]] CameraRollManagerBasePhotoIdentifiersPage { + P0 edges; + P1 page_info; + bool operator==(const CameraRollManagerBasePhotoIdentifiersPage &other) const { + return edges == other.edges && page_info == other.page_info; + } +}; + +template +struct [[deprecated(\\"Use CameraRollManagerPhotoIdentifiersPageBridging instead.\\")]] CameraRollManagerBasePhotoIdentifiersPageBridging { + static CameraRollManagerBasePhotoIdentifiersPage fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + CameraRollManagerBasePhotoIdentifiersPage result{ + bridging::fromJs(rt, value.getProperty(rt, \\"edges\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"page_info\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::Array edgesToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } + + static jsi::Object page_infoToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const CameraRollManagerBasePhotoIdentifiersPage &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"edges\\", bridging::toJs(rt, value.edges, jsInvoker)); + result.setProperty(rt, \\"page_info\\", bridging::toJs(rt, value.page_info, jsInvoker)); + return result; + } +}; + + + +#pragma mark - CameraRollManagerBaseGetPhotosParams + +template +struct [[deprecated(\\"Use CameraRollManagerGetPhotosParams instead.\\")]] CameraRollManagerBaseGetPhotosParams { + P0 first; + P1 after; + P2 groupName; + P3 groupTypes; + P4 assetType; + P5 maxSize; + P6 mimeTypes; + bool operator==(const CameraRollManagerBaseGetPhotosParams &other) const { + return first == other.first && after == other.after && groupName == other.groupName && groupTypes == other.groupTypes && assetType == other.assetType && maxSize == other.maxSize && mimeTypes == other.mimeTypes; + } +}; + +template +struct [[deprecated(\\"Use CameraRollManagerGetPhotosParamsBridging instead.\\")]] CameraRollManagerBaseGetPhotosParamsBridging { + static CameraRollManagerBaseGetPhotosParams fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + CameraRollManagerBaseGetPhotosParams result{ + bridging::fromJs(rt, value.getProperty(rt, \\"first\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"after\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"groupName\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"groupTypes\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"assetType\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"maxSize\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"mimeTypes\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static double firstToJs(jsi::Runtime &rt, P0 value) { + return bridging::toJs(rt, value); + } + + static jsi::String afterToJs(jsi::Runtime &rt, P1 value) { + return bridging::toJs(rt, value); + } -} // namespace react -} // namespace facebook -", -} -`; + static jsi::String groupNameToJs(jsi::Runtime &rt, P2 value) { + return bridging::toJs(rt, value); + } -exports[`GenerateModuleH can generate fixture real_module_example 1`] = ` -Map { - "real_module_exampleJSI.h" => "/** - * 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 - */ + static jsi::String groupTypesToJs(jsi::Runtime &rt, P3 value) { + return bridging::toJs(rt, value); + } -#pragma once + static jsi::String assetTypeToJs(jsi::Runtime &rt, P4 value) { + return bridging::toJs(rt, value); + } -#include -#include + static double maxSizeToJs(jsi::Runtime &rt, P5 value) { + return bridging::toJs(rt, value); + } + + static jsi::Array mimeTypesToJs(jsi::Runtime &rt, P6 value) { + return bridging::toJs(rt, value); + } +#endif -namespace facebook { -namespace react { + static jsi::Object toJs( + jsi::Runtime &rt, + const CameraRollManagerBaseGetPhotosParams &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"first\\", bridging::toJs(rt, value.first, jsInvoker)); + if (value.after) { + result.setProperty(rt, \\"after\\", bridging::toJs(rt, value.after.value(), jsInvoker)); + } + if (value.groupName) { + result.setProperty(rt, \\"groupName\\", bridging::toJs(rt, value.groupName.value(), jsInvoker)); + } + if (value.groupTypes) { + result.setProperty(rt, \\"groupTypes\\", bridging::toJs(rt, value.groupTypes.value(), jsInvoker)); + } + if (value.assetType) { + result.setProperty(rt, \\"assetType\\", bridging::toJs(rt, value.assetType.value(), jsInvoker)); + } + if (value.maxSize) { + result.setProperty(rt, \\"maxSize\\", bridging::toJs(rt, value.maxSize.value(), jsInvoker)); + } + if (value.mimeTypes) { + result.setProperty(rt, \\"mimeTypes\\", bridging::toJs(rt, value.mimeTypes.value(), jsInvoker)); + } + return result; + } +}; - -#pragma mark - CameraRollManagerBasePhotoIdentifierImage +#pragma mark - CameraRollManagerPhotoIdentifierImage template -struct CameraRollManagerBasePhotoIdentifierImage { +struct CameraRollManagerPhotoIdentifierImage { P0 uri; P1 playableDuration; P2 width; P3 height; P4 isStored; P5 filename; - bool operator==(const CameraRollManagerBasePhotoIdentifierImage &other) const { + bool operator==(const CameraRollManagerPhotoIdentifierImage &other) const { return uri == other.uri && playableDuration == other.playableDuration && width == other.width && height == other.height && isStored == other.isStored && filename == other.filename; } }; -template -struct CameraRollManagerBasePhotoIdentifierImageBridging { - static CameraRollManagerBasePhotoIdentifierImage fromJs( +template +struct CameraRollManagerPhotoIdentifierImageBridging { + static T types; + + static T fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - CameraRollManagerBasePhotoIdentifierImage result{ - bridging::fromJs(rt, value.getProperty(rt, \\"uri\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"playableDuration\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"width\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"height\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"isStored\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"filename\\"), jsInvoker)}; + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"uri\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"playableDuration\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"width\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"height\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"isStored\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"filename\\"), jsInvoker)}; return result; } #ifdef DEBUG - static jsi::String uriToJs(jsi::Runtime &rt, P0 value) { + static jsi::String uriToJs(jsi::Runtime &rt, decltype(types.uri) value) { return bridging::toJs(rt, value); } - static double playableDurationToJs(jsi::Runtime &rt, P1 value) { + static double playableDurationToJs(jsi::Runtime &rt, decltype(types.playableDuration) value) { return bridging::toJs(rt, value); } - static double widthToJs(jsi::Runtime &rt, P2 value) { + static double widthToJs(jsi::Runtime &rt, decltype(types.width) value) { return bridging::toJs(rt, value); } - static double heightToJs(jsi::Runtime &rt, P3 value) { + static double heightToJs(jsi::Runtime &rt, decltype(types.height) value) { return bridging::toJs(rt, value); } - static bool isStoredToJs(jsi::Runtime &rt, P4 value) { + static bool isStoredToJs(jsi::Runtime &rt, decltype(types.isStored) value) { return bridging::toJs(rt, value); } - static jsi::String filenameToJs(jsi::Runtime &rt, P5 value) { + static jsi::String filenameToJs(jsi::Runtime &rt, decltype(types.filename) value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const CameraRollManagerBasePhotoIdentifierImage &value, + const T &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); result.setProperty(rt, \\"uri\\", bridging::toJs(rt, value.uri, jsInvoker)); @@ -734,36 +1908,38 @@ struct CameraRollManagerBasePhotoIdentifierImageBridging { -#pragma mark - CameraRollManagerBasePhotoIdentifier +#pragma mark - CameraRollManagerPhotoIdentifier template -struct CameraRollManagerBasePhotoIdentifier { +struct CameraRollManagerPhotoIdentifier { P0 node; - bool operator==(const CameraRollManagerBasePhotoIdentifier &other) const { + bool operator==(const CameraRollManagerPhotoIdentifier &other) const { return node == other.node; } }; -template -struct CameraRollManagerBasePhotoIdentifierBridging { - static CameraRollManagerBasePhotoIdentifier fromJs( +template +struct CameraRollManagerPhotoIdentifierBridging { + static T types; + + static T fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - CameraRollManagerBasePhotoIdentifier result{ - bridging::fromJs(rt, value.getProperty(rt, \\"node\\"), jsInvoker)}; + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"node\\"), jsInvoker)}; return result; } #ifdef DEBUG - static jsi::Object nodeToJs(jsi::Runtime &rt, P0 value) { + static jsi::Object nodeToJs(jsi::Runtime &rt, decltype(types.node) value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const CameraRollManagerBasePhotoIdentifier &value, + const T &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); result.setProperty(rt, \\"node\\", bridging::toJs(rt, value.node, jsInvoker)); @@ -773,42 +1949,44 @@ struct CameraRollManagerBasePhotoIdentifierBridging { -#pragma mark - CameraRollManagerBasePhotoIdentifiersPage +#pragma mark - CameraRollManagerPhotoIdentifiersPage template -struct CameraRollManagerBasePhotoIdentifiersPage { +struct CameraRollManagerPhotoIdentifiersPage { P0 edges; P1 page_info; - bool operator==(const CameraRollManagerBasePhotoIdentifiersPage &other) const { + bool operator==(const CameraRollManagerPhotoIdentifiersPage &other) const { return edges == other.edges && page_info == other.page_info; } }; -template -struct CameraRollManagerBasePhotoIdentifiersPageBridging { - static CameraRollManagerBasePhotoIdentifiersPage fromJs( +template +struct CameraRollManagerPhotoIdentifiersPageBridging { + static T types; + + static T fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - CameraRollManagerBasePhotoIdentifiersPage result{ - bridging::fromJs(rt, value.getProperty(rt, \\"edges\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"page_info\\"), jsInvoker)}; + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"edges\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"page_info\\"), jsInvoker)}; return result; } #ifdef DEBUG - static jsi::Array edgesToJs(jsi::Runtime &rt, P0 value) { + static jsi::Array edgesToJs(jsi::Runtime &rt, decltype(types.edges) value) { return bridging::toJs(rt, value); } - static jsi::Object page_infoToJs(jsi::Runtime &rt, P1 value) { + static jsi::Object page_infoToJs(jsi::Runtime &rt, decltype(types.page_info) value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const CameraRollManagerBasePhotoIdentifiersPage &value, + const T &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); result.setProperty(rt, \\"edges\\", bridging::toJs(rt, value.edges, jsInvoker)); @@ -819,10 +1997,10 @@ struct CameraRollManagerBasePhotoIdentifiersPageBridging { -#pragma mark - CameraRollManagerBaseGetPhotosParams +#pragma mark - CameraRollManagerGetPhotosParams template -struct CameraRollManagerBaseGetPhotosParams { +struct CameraRollManagerGetPhotosParams { P0 first; P1 after; P2 groupName; @@ -830,61 +2008,63 @@ struct CameraRollManagerBaseGetPhotosParams { P4 assetType; P5 maxSize; P6 mimeTypes; - bool operator==(const CameraRollManagerBaseGetPhotosParams &other) const { + bool operator==(const CameraRollManagerGetPhotosParams &other) const { return first == other.first && after == other.after && groupName == other.groupName && groupTypes == other.groupTypes && assetType == other.assetType && maxSize == other.maxSize && mimeTypes == other.mimeTypes; } }; -template -struct CameraRollManagerBaseGetPhotosParamsBridging { - static CameraRollManagerBaseGetPhotosParams fromJs( +template +struct CameraRollManagerGetPhotosParamsBridging { + static T types; + + static T fromJs( jsi::Runtime &rt, const jsi::Object &value, const std::shared_ptr &jsInvoker) { - CameraRollManagerBaseGetPhotosParams result{ - bridging::fromJs(rt, value.getProperty(rt, \\"first\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"after\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"groupName\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"groupTypes\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"assetType\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"maxSize\\"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, \\"mimeTypes\\"), jsInvoker)}; + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"first\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"after\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"groupName\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"groupTypes\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"assetType\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"maxSize\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"mimeTypes\\"), jsInvoker)}; return result; } #ifdef DEBUG - static double firstToJs(jsi::Runtime &rt, P0 value) { + static double firstToJs(jsi::Runtime &rt, decltype(types.first) value) { return bridging::toJs(rt, value); } - static jsi::String afterToJs(jsi::Runtime &rt, P1 value) { + static jsi::String afterToJs(jsi::Runtime &rt, decltype(types.after) value) { return bridging::toJs(rt, value); } - static jsi::String groupNameToJs(jsi::Runtime &rt, P2 value) { + static jsi::String groupNameToJs(jsi::Runtime &rt, decltype(types.groupName) value) { return bridging::toJs(rt, value); } - static jsi::String groupTypesToJs(jsi::Runtime &rt, P3 value) { + static jsi::String groupTypesToJs(jsi::Runtime &rt, decltype(types.groupTypes) value) { return bridging::toJs(rt, value); } - static jsi::String assetTypeToJs(jsi::Runtime &rt, P4 value) { + static jsi::String assetTypeToJs(jsi::Runtime &rt, decltype(types.assetType) value) { return bridging::toJs(rt, value); } - static double maxSizeToJs(jsi::Runtime &rt, P5 value) { + static double maxSizeToJs(jsi::Runtime &rt, decltype(types.maxSize) value) { return bridging::toJs(rt, value); } - static jsi::Array mimeTypesToJs(jsi::Runtime &rt, P6 value) { + static jsi::Array mimeTypesToJs(jsi::Runtime &rt, decltype(types.mimeTypes) value) { return bridging::toJs(rt, value); } #endif static jsi::Object toJs( jsi::Runtime &rt, - const CameraRollManagerBaseGetPhotosParams &value, + const T &value, const std::shared_ptr &jsInvoker) { auto result = facebook::jsi::Object(rt); result.setProperty(rt, \\"first\\", bridging::toJs(rt, value.first, jsInvoker)); @@ -934,7 +2114,7 @@ public: protected: NativeCameraRollManagerCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeCameraRollManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeCameraRollManagerCxxSpecJSI { @@ -987,7 +2167,7 @@ private: #pragma mark - ExceptionsManagerBaseStackFrame template -struct ExceptionsManagerBaseStackFrame { +struct [[deprecated(\\"Use ExceptionsManagerStackFrame instead.\\")]] ExceptionsManagerBaseStackFrame { P0 column; P1 file; P2 lineNumber; @@ -999,7 +2179,7 @@ struct ExceptionsManagerBaseStackFrame { }; template -struct ExceptionsManagerBaseStackFrameBridging { +struct [[deprecated(\\"Use ExceptionsManagerStackFrameBridging instead.\\")]] ExceptionsManagerBaseStackFrameBridging { static ExceptionsManagerBaseStackFrame fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -1060,7 +2240,7 @@ struct ExceptionsManagerBaseStackFrameBridging { #pragma mark - ExceptionsManagerBaseExceptionData template -struct ExceptionsManagerBaseExceptionData { +struct [[deprecated(\\"Use ExceptionsManagerExceptionData instead.\\")]] ExceptionsManagerBaseExceptionData { P0 message; P1 originalMessage; P2 name; @@ -1075,7 +2255,7 @@ struct ExceptionsManagerBaseExceptionData { }; template -struct ExceptionsManagerBaseExceptionDataBridging { +struct [[deprecated(\\"Use ExceptionsManagerExceptionDataBridging instead.\\")]] ExceptionsManagerBaseExceptionDataBridging { static ExceptionsManagerBaseExceptionData fromJs( jsi::Runtime &rt, const jsi::Object &value, @@ -1145,6 +2325,172 @@ struct ExceptionsManagerBaseExceptionDataBridging { } }; + +#pragma mark - ExceptionsManagerStackFrame + +template +struct ExceptionsManagerStackFrame { + P0 column; + P1 file; + P2 lineNumber; + P3 methodName; + P4 collapse; + bool operator==(const ExceptionsManagerStackFrame &other) const { + return column == other.column && file == other.file && lineNumber == other.lineNumber && methodName == other.methodName && collapse == other.collapse; + } +}; + +template +struct ExceptionsManagerStackFrameBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"column\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"file\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"lineNumber\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"methodName\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"collapse\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static double columnToJs(jsi::Runtime &rt, decltype(types.column) value) { + return bridging::toJs(rt, value); + } + + static jsi::String fileToJs(jsi::Runtime &rt, decltype(types.file) value) { + return bridging::toJs(rt, value); + } + + static double lineNumberToJs(jsi::Runtime &rt, decltype(types.lineNumber) value) { + return bridging::toJs(rt, value); + } + + static jsi::String methodNameToJs(jsi::Runtime &rt, decltype(types.methodName) value) { + return bridging::toJs(rt, value); + } + + static bool collapseToJs(jsi::Runtime &rt, decltype(types.collapse) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + if (value.column) { + result.setProperty(rt, \\"column\\", bridging::toJs(rt, value.column.value(), jsInvoker)); + } + result.setProperty(rt, \\"file\\", bridging::toJs(rt, value.file, jsInvoker)); + if (value.lineNumber) { + result.setProperty(rt, \\"lineNumber\\", bridging::toJs(rt, value.lineNumber.value(), jsInvoker)); + } + result.setProperty(rt, \\"methodName\\", bridging::toJs(rt, value.methodName, jsInvoker)); + if (value.collapse) { + result.setProperty(rt, \\"collapse\\", bridging::toJs(rt, value.collapse.value(), jsInvoker)); + } + return result; + } +}; + + + +#pragma mark - ExceptionsManagerExceptionData + +template +struct ExceptionsManagerExceptionData { + P0 message; + P1 originalMessage; + P2 name; + P3 componentStack; + P4 stack; + P5 id; + P6 isFatal; + P7 extraData; + bool operator==(const ExceptionsManagerExceptionData &other) const { + return message == other.message && originalMessage == other.originalMessage && name == other.name && componentStack == other.componentStack && stack == other.stack && id == other.id && isFatal == other.isFatal && extraData == other.extraData; + } +}; + +template +struct ExceptionsManagerExceptionDataBridging { + static T types; + + static T fromJs( + jsi::Runtime &rt, + const jsi::Object &value, + const std::shared_ptr &jsInvoker) { + T result{ + bridging::fromJs(rt, value.getProperty(rt, \\"message\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"originalMessage\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"name\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"componentStack\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"stack\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"id\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"isFatal\\"), jsInvoker), + bridging::fromJs(rt, value.getProperty(rt, \\"extraData\\"), jsInvoker)}; + return result; + } + +#ifdef DEBUG + static jsi::String messageToJs(jsi::Runtime &rt, decltype(types.message) value) { + return bridging::toJs(rt, value); + } + + static jsi::String originalMessageToJs(jsi::Runtime &rt, decltype(types.originalMessage) value) { + return bridging::toJs(rt, value); + } + + static jsi::String nameToJs(jsi::Runtime &rt, decltype(types.name) value) { + return bridging::toJs(rt, value); + } + + static jsi::String componentStackToJs(jsi::Runtime &rt, decltype(types.componentStack) value) { + return bridging::toJs(rt, value); + } + + static jsi::Array stackToJs(jsi::Runtime &rt, decltype(types.stack) value) { + return bridging::toJs(rt, value); + } + + static double idToJs(jsi::Runtime &rt, decltype(types.id) value) { + return bridging::toJs(rt, value); + } + + static bool isFatalToJs(jsi::Runtime &rt, decltype(types.isFatal) value) { + return bridging::toJs(rt, value); + } + + static jsi::Object extraDataToJs(jsi::Runtime &rt, decltype(types.extraData) value) { + return bridging::toJs(rt, value); + } +#endif + + static jsi::Object toJs( + jsi::Runtime &rt, + const T &value, + const std::shared_ptr &jsInvoker) { + auto result = facebook::jsi::Object(rt); + result.setProperty(rt, \\"message\\", bridging::toJs(rt, value.message, jsInvoker)); + result.setProperty(rt, \\"originalMessage\\", bridging::toJs(rt, value.originalMessage, jsInvoker)); + result.setProperty(rt, \\"name\\", bridging::toJs(rt, value.name, jsInvoker)); + result.setProperty(rt, \\"componentStack\\", bridging::toJs(rt, value.componentStack, jsInvoker)); + result.setProperty(rt, \\"stack\\", bridging::toJs(rt, value.stack, jsInvoker)); + result.setProperty(rt, \\"id\\", bridging::toJs(rt, value.id, jsInvoker)); + result.setProperty(rt, \\"isFatal\\", bridging::toJs(rt, value.isFatal, jsInvoker)); + if (value.extraData) { + result.setProperty(rt, \\"extraData\\", bridging::toJs(rt, value.extraData.value(), jsInvoker)); + } + return result; + } +}; + class JSI_EXPORT NativeExceptionsManagerCxxSpecJSI : public TurboModule { protected: NativeExceptionsManagerCxxSpecJSI(std::shared_ptr jsInvoker); @@ -1170,7 +2516,7 @@ public: protected: NativeExceptionsManagerCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeExceptionsManagerCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeExceptionsManagerCxxSpecJSI { @@ -1226,8 +2572,7 @@ private: Delegate delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1248,13 +2593,12 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { #pragma mark - SampleTurboModuleNumEnum -enum SampleTurboModuleNumEnum { ONE, TWO }; +enum class SampleTurboModuleNumEnum { ONE, TWO }; template <> struct Bridging { @@ -1282,7 +2626,7 @@ struct Bridging { #pragma mark - SampleTurboModuleFloatEnum -enum SampleTurboModuleFloatEnum { POINT_ZERO, POINT_ONE, POINT_TWO }; +enum class SampleTurboModuleFloatEnum { POINT_ZERO, POINT_ONE, POINT_TWO }; template <> struct Bridging { @@ -1314,7 +2658,7 @@ struct Bridging { #pragma mark - SampleTurboModuleStringEnum -enum SampleTurboModuleStringEnum { HELLO, GoodBye }; +enum class SampleTurboModuleStringEnum { HELLO, GoodBye }; template <> struct Bridging { @@ -1353,11 +2697,11 @@ public: virtual jsi::Object getObject(jsi::Runtime &rt, jsi::Object arg) = 0; virtual double getRootTag(jsi::Runtime &rt, double arg) = 0; virtual jsi::Object getValue(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) = 0; - virtual int getEnumReturn(jsi::Runtime &rt) = 0; + virtual jsi::Value getEnumReturn(jsi::Runtime &rt) = 0; virtual void getValueWithCallback(jsi::Runtime &rt, jsi::Function callback) = 0; virtual jsi::Value getValueWithPromise(jsi::Runtime &rt, bool error) = 0; virtual jsi::Value getValueWithOptionalArg(jsi::Runtime &rt, std::optional parameter) = 0; - virtual jsi::String getEnums(jsi::Runtime &rt, int enumInt, double enumFloat, jsi::String enumString) = 0; + virtual jsi::String getEnums(jsi::Runtime &rt, jsi::Value enumInt, jsi::Value enumFloat, jsi::String enumString) = 0; }; @@ -1373,7 +2717,7 @@ public: protected: NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleCxxSpecJSI { @@ -1453,12 +2797,12 @@ private: return bridging::callFromJs( rt, &T::getValue, jsInvoker_, instance_, std::move(x), std::move(y), std::move(z)); } - int getEnumReturn(jsi::Runtime &rt) override { + jsi::Value getEnumReturn(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::getEnumReturn) == 1, \\"Expected getEnumReturn(...) to have 1 parameters\\"); - return bridging::callFromJs( + return bridging::callFromJs( rt, &T::getEnumReturn, jsInvoker_, instance_); } void getValueWithCallback(jsi::Runtime &rt, jsi::Function callback) override { @@ -1485,7 +2829,7 @@ private: return bridging::callFromJs( rt, &T::getValueWithOptionalArg, jsInvoker_, instance_, std::move(parameter)); } - jsi::String getEnums(jsi::Runtime &rt, int enumInt, double enumFloat, jsi::String enumString) override { + jsi::String getEnums(jsi::Runtime &rt, jsi::Value enumInt, jsi::Value enumFloat, jsi::String enumString) override { static_assert( bridging::getParameterCount(&T::getEnums) == 4, \\"Expected getEnums(...) to have 4 parameters\\"); @@ -1501,8 +2845,7 @@ private: Delegate delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1523,8 +2866,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule { @@ -1548,7 +2890,7 @@ public: protected: NativeSampleTurboModuleCxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModuleCxxSpecJSI { @@ -1595,7 +2937,7 @@ public: protected: NativeSampleTurboModule2CxxSpec(std::shared_ptr jsInvoker) : TurboModule(std::string{NativeSampleTurboModule2CxxSpec::kModuleName}, jsInvoker), - delegate_(static_cast(this), jsInvoker) {} + delegate_(reinterpret_cast(this), jsInvoker) {} private: class Delegate : public NativeSampleTurboModule2CxxSpecJSI { @@ -1627,8 +2969,7 @@ private: Delegate delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleHObjCpp-test.js.snap b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleHObjCpp-test.js.snap index fdd04f630546..d65cd4166702 100644 --- a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleHObjCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleHObjCpp-test.js.snap @@ -35,17 +35,15 @@ Map { @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule' - */ - class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule' + */ + class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react ", } @@ -197,17 +195,15 @@ namespace JS { - (NSArray> * _Nullable)getNullableArray; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule' - */ - class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule' + */ + class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react inline bool JS::NativeSampleTurboModule::SpecDifficultAE::D() const { id const p = _v[@\\"D\\"]; @@ -382,17 +378,15 @@ Map { @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule' - */ - class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule' + */ + class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react ", } @@ -499,17 +493,15 @@ namespace JS { - (void)cropImage:(JS::AliasTurboModule::Options &)cropData; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'AliasTurboModule' - */ - class JSI_EXPORT AliasTurboModuleSpecJSI : public ObjCTurboModule { - public: - AliasTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'AliasTurboModule' + */ + class JSI_EXPORT AliasTurboModuleSpecJSI : public ObjCTurboModule { + public: + AliasTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react inline double JS::AliasTurboModule::OptionsOffset::x() const { id const p = _v[@\\"x\\"]; @@ -633,17 +625,15 @@ namespace JS { reject:(RCTPromiseRejectBlock)reject; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeCameraRollManager' - */ - class JSI_EXPORT NativeCameraRollManagerSpecJSI : public ObjCTurboModule { - public: - NativeCameraRollManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeCameraRollManager' + */ + class JSI_EXPORT NativeCameraRollManagerSpecJSI : public ObjCTurboModule { + public: + NativeCameraRollManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react namespace JS { namespace NativeExceptionsManager { struct StackFrame { @@ -700,17 +690,15 @@ namespace JS { - (void)dismissRedbox; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeExceptionsManager' - */ - class JSI_EXPORT NativeExceptionsManagerSpecJSI : public ObjCTurboModule { - public: - NativeExceptionsManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeExceptionsManager' + */ + class JSI_EXPORT NativeExceptionsManagerSpecJSI : public ObjCTurboModule { + public: + NativeExceptionsManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react inline double JS::NativeCameraRollManager::GetPhotosParams::first() const { id const p = _v[@\\"first\\"]; @@ -900,17 +888,15 @@ namespace JS { - (facebook::react::ModuleConstants)getConstants; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule' - */ - class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule' + */ + class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react inline JS::NativeSampleTurboModule::Constants::Builder::Builder(const Input i) : _factory(^{ NSMutableDictionary *d = [NSMutableDictionary new]; auto const1 = i.const1.get(); @@ -963,34 +949,30 @@ Map { - (void)voidFunc; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule' - */ - class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule' + */ + class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react @protocol NativeSampleTurboModule2Spec - (void)voidFunc; @end -namespace facebook { - namespace react { - /** - * ObjC++ class for module 'NativeSampleTurboModule2' - */ - class JSI_EXPORT NativeSampleTurboModule2SpecJSI : public ObjCTurboModule { - public: - NativeSampleTurboModule2SpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; - } // namespace react -} // namespace facebook +namespace facebook::react { + /** + * ObjC++ class for module 'NativeSampleTurboModule2' + */ + class JSI_EXPORT NativeSampleTurboModule2SpecJSI : public ObjCTurboModule { + public: + NativeSampleTurboModule2SpecJSI(const ObjCTurboModule::InitParams ¶ms); + }; +} // namespace facebook::react ", diff --git a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniCpp-test.js.snap b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniCpp-test.js.snap index 177f066876aa..27f98851161d 100644 --- a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniCpp-test.js.snap @@ -14,8 +14,7 @@ Map { #include \\"SampleWithUppercaseName.h\\" -namespace facebook { -namespace react { +namespace facebook::react { @@ -31,8 +30,7 @@ std::shared_ptr SampleWithUppercaseName_ModuleProvider(const std::s return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -51,8 +49,7 @@ Map { #include \\"complex_objects.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_difficult(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { static jmethodID cachedMethodId = nullptr; @@ -107,8 +104,7 @@ std::shared_ptr complex_objects_ModuleProvider(const std::string &m return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -127,8 +123,7 @@ Map { #include \\"cxx_only_native_modules.h\\" -namespace facebook { -namespace react { +namespace facebook::react { @@ -137,8 +132,7 @@ std::shared_ptr cxx_only_native_modules_ModuleProvider(const std::s return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -157,8 +151,7 @@ Map { #include \\"empty_native_modules.h\\" -namespace facebook { -namespace react { +namespace facebook::react { @@ -174,8 +167,7 @@ std::shared_ptr empty_native_modules_ModuleProvider(const std::stri return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -194,8 +186,7 @@ Map { #include \\"native_modules_with_type_aliases.h\\" -namespace facebook { -namespace react { +namespace facebook::react { @@ -216,8 +207,7 @@ std::shared_ptr native_modules_with_type_aliases_ModuleProvider(con return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -236,8 +226,7 @@ Map { #include \\"real_module_example.h\\" -namespace facebook { -namespace react { +namespace facebook::react { @@ -306,8 +295,7 @@ std::shared_ptr real_module_example_ModuleProvider(const std::strin return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -326,8 +314,7 @@ Map { #include \\"simple_native_modules.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { static jmethodID cachedMethodId = nullptr; @@ -424,8 +411,7 @@ std::shared_ptr simple_native_modules_ModuleProvider(const std::str return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -444,8 +430,7 @@ Map { #include \\"two_modules_different_files.h\\" -namespace facebook { -namespace react { +namespace facebook::react { static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { static jmethodID cachedMethodId = nullptr; @@ -478,8 +463,7 @@ std::shared_ptr two_modules_different_files_ModuleProvider(const st return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap index cc203a0927bd..72877187166b 100644 --- a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap +++ b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap @@ -18,8 +18,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * JNI C++ class for module 'NativeSampleTurboModule' @@ -33,8 +32,7 @@ public: JSI_EXPORT std::shared_ptr SampleWithUppercaseName_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -63,10 +61,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -104,8 +105,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * JNI C++ class for module 'NativeSampleTurboModule' @@ -119,8 +119,7 @@ public: JSI_EXPORT std::shared_ptr complex_objects_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -149,10 +148,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -190,16 +192,14 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT std::shared_ptr cxx_only_native_modules_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -228,10 +228,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -269,8 +272,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * JNI C++ class for module 'NativeSampleTurboModule' @@ -284,8 +286,7 @@ public: JSI_EXPORT std::shared_ptr empty_native_modules_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -314,10 +315,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -355,8 +359,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * JNI C++ class for module 'AliasTurboModule' @@ -370,8 +373,7 @@ public: JSI_EXPORT std::shared_ptr native_modules_with_type_aliases_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -400,10 +402,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -441,8 +446,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * JNI C++ class for module 'NativeCameraRollManager' @@ -464,8 +468,7 @@ public: JSI_EXPORT std::shared_ptr real_module_example_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -494,10 +497,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -535,8 +541,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * JNI C++ class for module 'NativeSampleTurboModule' @@ -550,8 +555,7 @@ public: JSI_EXPORT std::shared_ptr simple_native_modules_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -580,10 +584,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni @@ -621,8 +628,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * JNI C++ class for module 'NativeSampleTurboModule' @@ -644,8 +650,7 @@ public: JSI_EXPORT std::shared_ptr two_modules_different_files_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react ", "jni/CMakeLists.txt" => "# Copyright (c) Meta Platforms, Inc. and affiliates. # @@ -674,10 +679,13 @@ target_link_libraries( react_codegen_rncore react_debug react_nativemodule_core + react_render_componentregistry react_render_core react_render_debug react_render_graphics react_render_imagemanager + react_render_mapbuffer + react_utils rrc_image rrc_view turbomodulejsijni diff --git a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleMm-test.js.snap b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleMm-test.js.snap index d9936be271e6..630f41fbbb2b 100644 --- a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleMm-test.js.snap +++ b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleMm-test.js.snap @@ -18,16 +18,14 @@ Map { #import \\"SampleWithUppercaseName.h\\" -namespace facebook { - namespace react { - - - NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - - } - } // namespace react -} // namespace facebook +namespace facebook::react { + + + NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + + } +} // namespace facebook::react ", } `; @@ -85,9 +83,8 @@ Map { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_difficult(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"difficult\\", @selector(difficult:), args, count); } @@ -116,9 +113,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ArrayKind, \\"getNullableArray\\", @selector(getNullableArray), args, count); } - NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"difficult\\"] = MethodMetadata {1, __hostFunction_NativeSampleTurboModuleSpecJSI_difficult}; setMethodArgConversionSelector(@\\"difficult\\", 0, @\\"JS_NativeSampleTurboModule_SpecDifficultA:\\"); @@ -139,9 +136,8 @@ namespace facebook { methodMap_[\\"getNullableArray\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_getNullableArray}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react ", } `; @@ -186,16 +182,14 @@ Map { #import \\"empty_native_modules.h\\" -namespace facebook { - namespace react { - +namespace facebook::react { + - NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - - } - } // namespace react -} // namespace facebook + NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + + } +} // namespace facebook::react ", } `; @@ -241,21 +235,19 @@ Map { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_AliasTurboModuleSpecJSI_cropImage(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"cropImage\\", @selector(cropImage:), args, count); } - AliasTurboModuleSpecJSI::AliasTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + AliasTurboModuleSpecJSI::AliasTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"cropImage\\"] = MethodMetadata {1, __hostFunction_AliasTurboModuleSpecJSI_cropImage}; setMethodArgConversionSelector(@\\"cropImage\\", 0, @\\"JS_AliasTurboModule_Options:\\"); - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react ", } `; @@ -283,9 +275,8 @@ Map { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeCameraRollManagerSpecJSI_getPhotos(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, PromiseKind, \\"getPhotos\\", @selector(getPhotos:resolve:reject:), args, count); } @@ -298,9 +289,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, PromiseKind, \\"deletePhotos\\", @selector(deletePhotos:resolve:reject:), args, count); } - NativeCameraRollManagerSpecJSI::NativeCameraRollManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeCameraRollManagerSpecJSI::NativeCameraRollManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"getPhotos\\"] = MethodMetadata {1, __hostFunction_NativeCameraRollManagerSpecJSI_getPhotos}; setMethodArgConversionSelector(@\\"getPhotos\\", 0, @\\"JS_NativeCameraRollManager_GetPhotosParams:\\"); @@ -309,9 +300,8 @@ namespace facebook { methodMap_[\\"deletePhotos\\"] = MethodMetadata {1, __hostFunction_NativeCameraRollManagerSpecJSI_deletePhotos}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react @implementation RCTCxxConvert (NativeExceptionsManager_StackFrame) + (RCTManagedPointer *)JS_NativeExceptionsManager_StackFrame:(id)json { @@ -324,9 +314,8 @@ namespace facebook { return facebook::react::managedPointer(json); } @end -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeExceptionsManagerSpecJSI_reportFatalException(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"reportFatalException\\", @selector(reportFatalException:stack:exceptionId:), args, count); } @@ -347,9 +336,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"dismissRedbox\\", @selector(dismissRedbox), args, count); } - NativeExceptionsManagerSpecJSI::NativeExceptionsManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeExceptionsManagerSpecJSI::NativeExceptionsManagerSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"reportFatalException\\"] = MethodMetadata {3, __hostFunction_NativeExceptionsManagerSpecJSI_reportFatalException}; @@ -364,9 +353,8 @@ namespace facebook { methodMap_[\\"dismissRedbox\\"] = MethodMetadata {0, __hostFunction_NativeExceptionsManagerSpecJSI_dismissRedbox}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react ", } `; @@ -389,9 +377,8 @@ Map { #import \\"simple_native_modules.h\\" -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } @@ -448,9 +435,9 @@ namespace facebook { return static_cast(turboModule).invokeObjCMethod(rt, ObjectKind, \\"getConstants\\", @selector(getConstants), args, count); } - NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc}; @@ -492,9 +479,8 @@ namespace facebook { methodMap_[\\"getConstants\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react ", } `; @@ -517,37 +503,33 @@ Map { #import \\"two_modules_different_files.h\\" -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } - NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react -namespace facebook { - namespace react { - +namespace facebook::react { + static facebook::jsi::Value __hostFunction_NativeSampleTurboModule2SpecJSI_voidFunc(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { return static_cast(turboModule).invokeObjCMethod(rt, VoidKind, \\"voidFunc\\", @selector(voidFunc), args, count); } - NativeSampleTurboModule2SpecJSI::NativeSampleTurboModule2SpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - + NativeSampleTurboModule2SpecJSI::NativeSampleTurboModule2SpecJSI(const ObjCTurboModule::InitParams ¶ms) + : ObjCTurboModule(params) { + methodMap_[\\"voidFunc\\"] = MethodMetadata {0, __hostFunction_NativeSampleTurboModule2SpecJSI_voidFunc}; - } - } // namespace react -} // namespace facebook + } +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js b/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js index 36eafbe5884a..12d42258b985 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js @@ -15,42 +15,41 @@ const { throwIfConfigNotfound, throwIfMoreThanOneConfig, } = require('../error-utils'); - const { - throwIfModuleInterfaceNotFound, - throwIfMoreThanOneModuleRegistryCalls, - throwIfModuleInterfaceIsMisnamed, - throwIfUnusedModuleInterfaceParserError, - throwIfWrongNumberOfCallExpressionArgs, - throwIfIncorrectModuleRegistryCallTypeParameterParserError, + throwIfArgumentPropsAreNull, + throwIfArrayElementTypeAnnotationIsUnsupported, + throwIfBubblingTypeIsNull, + throwIfEventHasNoName, throwIfIncorrectModuleRegistryCallArgument, - throwIfUnsupportedFunctionReturnTypeAnnotationParserError, - throwIfMoreThanOneModuleInterfaceParserError, + throwIfIncorrectModuleRegistryCallTypeParameterParserError, + throwIfModuleInterfaceIsMisnamed, + throwIfModuleInterfaceNotFound, throwIfModuleTypeIsUnsupported, - throwIfUntypedModule, - throwIfUnsupportedFunctionParamTypeAnnotationParserError, - throwIfArrayElementTypeAnnotationIsUnsupported, + throwIfMoreThanOneCodegenNativecommands, + throwIfMoreThanOneModuleInterfaceParserError, + throwIfMoreThanOneModuleRegistryCalls, throwIfPartialNotAnnotatingTypeParameter, throwIfPartialWithMoreParameter, - throwIfMoreThanOneCodegenNativecommands, - throwIfEventHasNoName, - throwIfBubblingTypeIsNull, - throwIfArgumentPropsAreNull, throwIfTypeAliasIsNotInterface, + throwIfUnsupportedFunctionParamTypeAnnotationParserError, + throwIfUnsupportedFunctionReturnTypeAnnotationParserError, + throwIfUntypedModule, + throwIfUnusedModuleInterfaceParserError, + throwIfWrongNumberOfCallExpressionArgs, } = require('../error-utils'); const { - UnsupportedModulePropertyParserError, - ModuleInterfaceNotFoundParserError, - MoreThanOneModuleRegistryCallsParserError, - MisnamedModuleInterfaceParserError, - UnusedModuleInterfaceParserError, + IncorrectModuleRegistryCallArgumentTypeParserError, IncorrectModuleRegistryCallArityParserError, IncorrectModuleRegistryCallTypeParameterParserError, - IncorrectModuleRegistryCallArgumentTypeParserError, - UnsupportedFunctionReturnTypeAnnotationParserError, - UntypedModuleRegistryCallParserError, + MisnamedModuleInterfaceParserError, + ModuleInterfaceNotFoundParserError, MoreThanOneModuleInterfaceParserError, + MoreThanOneModuleRegistryCallsParserError, UnsupportedFunctionParamTypeAnnotationParserError, + UnsupportedFunctionReturnTypeAnnotationParserError, + UnsupportedModulePropertyParserError, + UntypedModuleRegistryCallParserError, + UnusedModuleInterfaceParserError, } = require('../errors'); const {FlowParser} = require('../flow/parser'); const {TypeScriptParser} = require('../typescript/parser'); diff --git a/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js b/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js index bd62076f6e3d..44e25e768764 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js @@ -11,56 +11,54 @@ 'use-strict'; +import type {ParserType} from '../errors'; + +import {FlowParser} from '../flow/parser'; +import {MockedParser} from '../parserMock'; import { assertGenericTypeAnnotationHasExactlyOneTypeParameter, - isObjectProperty, - parseObjectProperty, - wrapNullable, - unwrapNullable, - buildSchemaFromConfigType, buildSchema, - parseModuleName, + buildSchemaFromConfigType, createComponentConfig, - propertyNames, getCommandOptions, - getOptions, getCommandTypeNameAndOptionsExpression, + getOptions, getTypeResolutionStatus, handleGenericTypeAnnotation, + isObjectProperty, + parseModuleName, + parseObjectProperty, + propertyNames, + unwrapNullable, + wrapNullable, } from '../parsers-commons'; -import type {ParserType} from '../errors'; -const {Visitor} = require('../parsers-primitives'); -const {wrapComponentSchema} = require('../schema.js'); -const {buildComponentSchema} = require('../flow/components'); -const {buildModuleSchema} = require('../parsers-commons.js'); -const { - isModuleRegistryCall, - createParserErrorCapturer, -} = require('../utils.js'); const { - ParserError, - UnsupportedObjectPropertyTypeAnnotationParserError, - UnusedModuleInterfaceParserError, - MoreThanOneModuleRegistryCallsParserError, - IncorrectModuleRegistryCallArityParserError, IncorrectModuleRegistryCallArgumentTypeParserError, - UntypedModuleRegistryCallParserError, + IncorrectModuleRegistryCallArityParserError, + MisnamedModuleInterfaceParserError, ModuleInterfaceNotFoundParserError, MoreThanOneModuleInterfaceParserError, - MisnamedModuleInterfaceParserError, + MoreThanOneModuleRegistryCallsParserError, + ParserError, + UnsupportedObjectPropertyTypeAnnotationParserError, + UntypedModuleRegistryCallParserError, + UnusedModuleInterfaceParserError, } = require('../errors'); - -import {MockedParser} from '../parserMock'; -import {FlowParser} from '../flow/parser'; +const {buildComponentSchema} = require('../flow/components'); +const {flowTranslateTypeAnnotation} = require('../flow/modules/index'); +const {buildModuleSchema} = require('../parsers-commons.js'); +const {Visitor} = require('../parsers-primitives'); +const {wrapComponentSchema} = require('../schema.js'); +const typeScriptTranslateTypeAnnotation = require('../typescript/modules/index'); +const { + createParserErrorCapturer, + isModuleRegistryCall, +} = require('../utils.js'); const parser = new MockedParser(); - const flowParser = new FlowParser(); -const {flowTranslateTypeAnnotation} = require('../flow/modules/index'); -const typeScriptTranslateTypeAnnotation = require('../typescript/modules/index'); - beforeEach(() => { jest.clearAllMocks(); }); @@ -324,6 +322,7 @@ describe('parseObjectProperty', () => { ); expect(() => parseObjectProperty( + null, // parentObject property, moduleName, types, @@ -358,6 +357,7 @@ describe('parseObjectProperty', () => { ); expect(() => parseObjectProperty( + null, // parentObject property, moduleName, types, @@ -716,7 +716,63 @@ describe('buildSchema', () => { expect(getConfigTypeSpy).toHaveBeenCalledTimes(1); expect(getConfigTypeSpy).toHaveBeenCalledWith( - parser.getAst(contents), + parser.getAst(contents, 'fileName'), + Visitor, + ); + expect(schema).toEqual({ + modules: { + Module: { + type: 'Component', + components: { + Module: { + extendsProps: [ + { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', + }, + ], + events: [], + props: [], + commands: [], + }, + }, + }, + }, + }); + }); + }); + + describe('when there is a codegenNativeComponent, using `as`', () => { + const contents = ` + import type {ViewProps} from 'ViewPropTypes'; + import type {HostComponent} from 'react-native'; + + const codegenNativeComponent = require('codegenNativeComponent'); + + export type ModuleProps = $ReadOnly<{| + ...ViewProps, + |}>; + + export default codegenNativeComponent( + 'Module', + ) as HostComponent; + `; + + it('returns a module with good properties', () => { + const schema = buildSchema( + contents, + 'fileName', + wrapComponentSchema, + buildComponentSchema, + buildModuleSchema, + Visitor, + flowParser, + flowTranslateTypeAnnotation, + ); + + expect(getConfigTypeSpy).toHaveBeenCalledTimes(1); + expect(getConfigTypeSpy).toHaveBeenCalledWith( + parser.getAst(contents, 'fileName'), Visitor, ); expect(schema).toEqual({ @@ -770,7 +826,7 @@ describe('buildSchema', () => { expect(getConfigTypeSpy).toHaveBeenCalledTimes(1); expect(getConfigTypeSpy).toHaveBeenCalledWith( - parser.getAst(contents), + parser.getAst(contents, 'fileName'), Visitor, ); expect(schema).toEqual({ @@ -1085,7 +1141,7 @@ describe('buildModuleSchema', () => { const contents = ` import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - + export interface Spec extends TurboModule { +getBool: (arg: boolean) => boolean; } export interface SpecOther extends TurboModule { @@ -1135,11 +1191,11 @@ describe('buildModuleSchema', () => { const contents = ` import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - + export interface MisnamedSpec extends TurboModule { +getArray: (a: Array) => Array; } - + export default (TurboModuleRegistry.getEnforcing( 'SampleTurboModule', ): Spec); diff --git a/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js b/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js index 770f78a04b33..02aa6b3a535f 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js @@ -17,40 +17,40 @@ import type { UnionTypeAnnotationMemberType, } from '../../CodegenSchema'; +const {UnsupportedUnionTypeAnnotationParserError} = require('../errors'); +const {extractArrayElementType} = require('../flow/components/events'); +const {FlowParser} = require('../flow/parser'); +const {MockedParser} = require('../parserMock'); +const {emitUnion} = require('../parsers-primitives'); const { + Visitor, emitArrayType, emitBoolean, emitBoolProp, + emitCommonTypes, emitDouble, emitDoubleProp, emitFloat, emitFloatProp, - emitNumber, + emitGenericObject, emitInt32, emitInt32Prop, - emitGenericObject, + emitMixed, + emitNumber, emitObject, + emitObjectProp, + emitPartial, emitPromise, emitRootTag, - emitVoid, emitString, emitStringish, - emitMixed, - emitPartial, - emitCommonTypes, - typeAliasResolution, - typeEnumResolution, - Visitor, emitStringProp, - emitObjectProp, emitUnionProp, + emitVoid, + typeAliasResolution, + typeEnumResolution, } = require('../parsers-primitives.js'); -const {MockedParser} = require('../parserMock'); -const {emitUnion} = require('../parsers-primitives'); -const {UnsupportedUnionTypeAnnotationParserError} = require('../errors'); -const {FlowParser} = require('../flow/parser'); const {TypeScriptParser} = require('../typescript/parser'); -const {extractArrayElementType} = require('../flow/components/events'); const parser = new MockedParser(); const flowParser = new FlowParser(); diff --git a/packages/react-native-codegen/src/parsers/__tests__/parsers-test.js b/packages/react-native-codegen/src/parsers/__tests__/parsers-test.js index 32eef3dcf5ca..41014b875069 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/parsers-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/parsers-test.js @@ -11,13 +11,13 @@ 'use-strict'; +import {FlowParser} from '../flow/parser'; +import {TypeScriptParser} from '../typescript/parser'; + const { UnsupportedObjectPropertyTypeAnnotationParserError, } = require('../errors'); -import {TypeScriptParser} from '../typescript/parser'; -import {FlowParser} from '../flow/parser'; - const hasteModuleName = 'moduleName'; describe('FlowParser', () => { const parser = new FlowParser(); diff --git a/packages/react-native-codegen/src/parsers/__tests__/utils-test.js b/packages/react-native-codegen/src/parsers/__tests__/utils-test.js index 65b681bc736f..31b396be3610 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/utils-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/utils-test.js @@ -11,13 +11,13 @@ 'use strict'; +const {ParserError} = require('../errors'); const { - extractNativeModuleName, createParserErrorCapturer, + extractNativeModuleName, verifyPlatforms, visit, } = require('../utils.js'); -const {ParserError} = require('../errors'); beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/react-native-codegen/src/parsers/consistency/__tests__/checkComponentSnaps-test.js b/packages/react-native-codegen/src/parsers/consistency/__tests__/checkComponentSnaps-test.js index b06dd17789c9..907de44d7d3a 100644 --- a/packages/react-native-codegen/src/parsers/consistency/__tests__/checkComponentSnaps-test.js +++ b/packages/react-native-codegen/src/parsers/consistency/__tests__/checkComponentSnaps-test.js @@ -10,13 +10,13 @@ 'use strict'; +const flowSnaps = require('../../../../src/parsers/flow/components/__tests__/__snapshots__/component-parser-test.js.snap'); +const tsSnaps = require('../../../../src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap'); +const flowFixtures = require('../../flow/components/__test_fixtures__/fixtures.js'); +const tsFixtures = require('../../typescript/components/__test_fixtures__/fixtures.js'); const {compareSnaps, compareTsArraySnaps} = require('../compareSnaps.js'); -const flowFixtures = require('../../flow/components/__test_fixtures__/fixtures.js'); -const flowSnaps = require('../../../../src/parsers/flow/components/__tests__/__snapshots__/component-parser-test.js.snap'); const flowExtraCases = []; -const tsFixtures = require('../../typescript/components/__test_fixtures__/fixtures.js'); -const tsSnaps = require('../../../../src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap'); const tsExtraCases = [ 'ARRAY2_PROP_TYPES_NO_EVENTS', 'PROPS_AND_EVENTS_WITH_INTERFACES', diff --git a/packages/react-native-codegen/src/parsers/consistency/__tests__/checkModuleSnaps-test.js b/packages/react-native-codegen/src/parsers/consistency/__tests__/checkModuleSnaps-test.js index 1e1fe3909c10..846598b46799 100644 --- a/packages/react-native-codegen/src/parsers/consistency/__tests__/checkModuleSnaps-test.js +++ b/packages/react-native-codegen/src/parsers/consistency/__tests__/checkModuleSnaps-test.js @@ -10,13 +10,13 @@ 'use strict'; +const flowSnaps = require('../../../../src/parsers/flow/modules/__tests__/__snapshots__/module-parser-snapshot-test.js.snap'); +const tsSnaps = require('../../../../src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap'); +const flowFixtures = require('../../flow/modules/__test_fixtures__/fixtures.js'); +const tsFixtures = require('../../typescript/modules/__test_fixtures__/fixtures.js'); const {compareSnaps, compareTsArraySnaps} = require('../compareSnaps.js'); -const flowFixtures = require('../../flow/modules/__test_fixtures__/fixtures.js'); -const flowSnaps = require('../../../../src/parsers/flow/modules/__tests__/__snapshots__/module-parser-snapshot-test.js.snap'); const flowExtraCases = ['PROMISE_WITH_COMMONLY_USED_TYPES']; -const tsFixtures = require('../../typescript/modules/__test_fixtures__/fixtures.js'); -const tsSnaps = require('../../../../src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap'); const tsExtraCases = [ 'NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS', 'NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE', diff --git a/packages/react-native-codegen/src/parsers/error-utils.js b/packages/react-native-codegen/src/parsers/error-utils.js index 1fedbe252991..eb11370bd004 100644 --- a/packages/react-native-codegen/src/parsers/error-utils.js +++ b/packages/react-native-codegen/src/parsers/error-utils.js @@ -11,25 +11,25 @@ 'use strict'; import type {NativeModuleTypeAnnotation} from '../CodegenSchema'; +import type {TypeDeclarationMap} from '../parsers/utils'; import type {ParserType} from './errors'; import type {Parser} from './parser'; -import type {TypeDeclarationMap} from '../parsers/utils'; const { + IncorrectModuleRegistryCallArgumentTypeParserError, + IncorrectModuleRegistryCallArityParserError, + IncorrectModuleRegistryCallTypeParameterParserError, MisnamedModuleInterfaceParserError, - UnsupportedFunctionReturnTypeAnnotationParserError, ModuleInterfaceNotFoundParserError, + MoreThanOneModuleInterfaceParserError, MoreThanOneModuleRegistryCallsParserError, - UnusedModuleInterfaceParserError, - IncorrectModuleRegistryCallArityParserError, - IncorrectModuleRegistryCallTypeParameterParserError, - IncorrectModuleRegistryCallArgumentTypeParserError, + UnsupportedArrayElementTypeAnnotationParserError, + UnsupportedFunctionParamTypeAnnotationParserError, + UnsupportedFunctionReturnTypeAnnotationParserError, + UnsupportedModulePropertyParserError, UnsupportedObjectPropertyValueTypeAnnotationParserError, UntypedModuleRegistryCallParserError, - UnsupportedModulePropertyParserError, - MoreThanOneModuleInterfaceParserError, - UnsupportedFunctionParamTypeAnnotationParserError, - UnsupportedArrayElementTypeAnnotationParserError, + UnusedModuleInterfaceParserError, } = require('./errors'); function throwIfModuleInterfaceIsMisnamed( diff --git a/packages/react-native-codegen/src/parsers/errors.js b/packages/react-native-codegen/src/parsers/errors.js index b0e42ecad955..6a13264b2c80 100644 --- a/packages/react-native-codegen/src/parsers/errors.js +++ b/packages/react-native-codegen/src/parsers/errors.js @@ -11,7 +11,6 @@ 'use strict'; import type {UnionTypeAnnotationMemberType} from '../CodegenSchema'; - import type {Parser} from './parser'; export type ParserType = 'Flow' | 'TypeScript'; @@ -218,6 +217,20 @@ class UnsupportedObjectPropertyValueTypeAnnotationParserError extends ParserErro } } +class UnsupportedObjectDirectRecursivePropertyParserError extends ParserError { + constructor( + propertyName: string, + propertyValueAST: $FlowFixMe, + nativeModuleName: string, + ) { + super( + nativeModuleName, + propertyValueAST, + `Object property '${propertyName}' is direct recursive and must be nullable.`, + ); + } +} + /** * Function parsing errors */ @@ -406,6 +419,7 @@ module.exports = { UnsupportedModulePropertyParserError, UnsupportedObjectPropertyTypeAnnotationParserError, UnsupportedObjectPropertyValueTypeAnnotationParserError, + UnsupportedObjectDirectRecursivePropertyParserError, UnusedModuleInterfaceParserError, MoreThanOneModuleRegistryCallsParserError, UntypedModuleRegistryCallParserError, diff --git a/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js index 64cefa676f6b..7b93444feca6 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js @@ -1001,10 +1001,16 @@ export type ScrollTo = ( interface NativeCommands { +scrollTo: ScrollTo; + +addOverlays: ( + viewRef: React.ElementRef, + overlayColorsReadOnly: $ReadOnlyArray, + overlayColorsArray: Array, + overlayColorsArrayAnnotation: string[], + ) => void; } export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'], + supportedCommands: ['scrollTo', 'addOverlays'], }); export default (codegenNativeComponent( diff --git a/packages/react-native-codegen/src/parsers/flow/components/__tests__/__snapshots__/component-parser-test.js.snap b/packages/react-native-codegen/src/parsers/flow/components/__tests__/__snapshots__/component-parser-test.js.snap index dbcae681e81b..c99cf8de1629 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/__tests__/__snapshots__/component-parser-test.js.snap +++ b/packages/react-native-codegen/src/parsers/flow/components/__tests__/__snapshots__/component-parser-test.js.snap @@ -4598,6 +4598,48 @@ exports[`RN Codegen Flow Parser can generate fixture COMMANDS_WITH_EXTERNAL_TYPE 'type': 'VoidTypeAnnotation' } } + }, + { + 'name': 'addOverlays', + 'optional': false, + 'typeAnnotation': { + 'type': 'FunctionTypeAnnotation', + 'params': [ + { + 'name': 'overlayColorsReadOnly', + 'optional': false, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'StringTypeAnnotation' + } + } + }, + { + 'name': 'overlayColorsArray', + 'optional': false, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'StringTypeAnnotation' + } + } + }, + { + 'name': 'overlayColorsArrayAnnotation', + 'optional': false, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'StringTypeAnnotation' + } + } + } + ], + 'returnTypeAnnotation': { + 'type': 'VoidTypeAnnotation' + } + } } ] } diff --git a/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js b/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js index e01d1ade6e1f..50f0dfdc5567 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js +++ b/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js @@ -11,9 +11,9 @@ 'use strict'; -const {FlowParser} = require('../../parser'); -const fixtures = require('../__test_fixtures__/fixtures.js'); const failureFixtures = require('../__test_fixtures__/failures.js'); +const fixtures = require('../__test_fixtures__/fixtures.js'); +const {FlowParser} = require('../../parser'); jest.mock('fs', () => ({ readFileSync: filename => { // Jest in the OSS does not allow to capture variables in closures. diff --git a/packages/react-native-codegen/src/parsers/flow/components/commands.js b/packages/react-native-codegen/src/parsers/flow/components/commands.js index bf789178d996..c8ce0b157cbc 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/commands.js +++ b/packages/react-native-codegen/src/parsers/flow/components/commands.js @@ -11,8 +11,9 @@ 'use strict'; import type { - NamedShape, + CommandParamTypeAnnotation, CommandTypeAnnotation, + NamedShape, } from '../../../CodegenSchema.js'; import type {TypeDeclarationMap} from '../../utils'; @@ -21,7 +22,24 @@ const {getValueFromTypes} = require('../utils.js'); // $FlowFixMe[unclear-type] there's no flowtype for ASTs type EventTypeAST = Object; -function buildCommandSchema(property: EventTypeAST, types: TypeDeclarationMap) { +function buildCommandSchema( + property: EventTypeAST, + types: TypeDeclarationMap, +): $ReadOnly<{ + name: string, + optional: boolean, + typeAnnotation: { + type: 'FunctionTypeAnnotation', + params: $ReadOnlyArray<{ + name: string, + optional: boolean, + typeAnnotation: CommandParamTypeAnnotation, + }>, + returnTypeAnnotation: { + type: 'VoidTypeAnnotation', + }, + }, +}> { const name = property.key.name; const optional = property.optional; const value = getValueFromTypes(property.value, types); @@ -48,7 +66,7 @@ function buildCommandSchema(property: EventTypeAST, types: TypeDeclarationMap) { paramValue.type === 'GenericTypeAnnotation' ? paramValue.id.name : paramValue.type; - let returnType; + let returnType: CommandParamTypeAnnotation; switch (type) { case 'RootTag': @@ -82,6 +100,30 @@ function buildCommandSchema(property: EventTypeAST, types: TypeDeclarationMap) { type: 'StringTypeAnnotation', }; break; + case 'Array': + case '$ReadOnlyArray': + if (!paramValue.type === 'GenericTypeAnnotation') { + throw new Error( + 'Array and $ReadOnlyArray are GenericTypeAnnotation for array', + ); + } + returnType = { + type: 'ArrayTypeAnnotation', + elementType: { + // TODO: T172453752 support complex type annotation for array element + type: paramValue.typeParameters.params[0].type, + }, + }; + break; + case 'ArrayTypeAnnotation': + returnType = { + type: 'ArrayTypeAnnotation', + elementType: { + // TODO: T172453752 support complex type annotation for array element + type: paramValue.elementType.type, + }, + }; + break; default: (type: empty); throw new Error( diff --git a/packages/react-native-codegen/src/parsers/flow/components/componentsUtils.js b/packages/react-native-codegen/src/parsers/flow/components/componentsUtils.js index e827bcecbbd7..4d6ab405eb8f 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/componentsUtils.js +++ b/packages/react-native-codegen/src/parsers/flow/components/componentsUtils.js @@ -10,10 +10,11 @@ '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'; +import type {ASTNode, PropAST, TypeDeclarationMap} from '../../utils'; + +const {verifyPropNotAlreadyDefined} = require('../../parsers-commons'); +const {getValueFromTypes} = require('../utils.js'); // $FlowFixMe[unsupported-variance-annotation] function getTypeAnnotationForArray<+T>( diff --git a/packages/react-native-codegen/src/parsers/flow/components/events.js b/packages/react-native-codegen/src/parsers/flow/components/events.js index 17b3c933b326..940706e086c3 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/events.js +++ b/packages/react-native-codegen/src/parsers/flow/components/events.js @@ -11,32 +11,32 @@ 'use strict'; import type { + EventTypeAnnotation, EventTypeShape, NamedShape, - EventTypeAnnotation, } from '../../../CodegenSchema.js'; import type {Parser} from '../../parser'; import type {EventArgumentReturnType} from '../../parsers-commons'; const { - throwIfEventHasNoName, - throwIfBubblingTypeIsNull, throwIfArgumentPropsAreNull, + throwIfBubblingTypeIsNull, + throwIfEventHasNoName, } = require('../../error-utils'); const { - getEventArgument, buildPropertiesForEvent, - handleEventHandler, emitBuildEventSchema, + getEventArgument, + handleEventHandler, } = require('../../parsers-commons'); const { emitBoolProp, emitDoubleProp, emitFloatProp, - emitMixedProp, - emitStringProp, emitInt32Prop, + emitMixedProp, emitObjectProp, + emitStringProp, emitUnionProp, } = require('../../parsers-primitives'); diff --git a/packages/react-native-codegen/src/parsers/flow/components/index.js b/packages/react-native-codegen/src/parsers/flow/components/index.js index 9b7acbba2082..0cae27b06079 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/index.js +++ b/packages/react-native-codegen/src/parsers/flow/components/index.js @@ -12,13 +12,13 @@ import type {Parser} from '../../parser'; import type {ComponentSchemaBuilderConfig} from '../../schema.js'; -const {getCommands} = require('./commands'); -const {getEvents} = require('./events'); const { - getOptions, findComponentConfig, getCommandProperties, + getOptions, } = require('../../parsers-commons'); +const {getCommands} = require('./commands'); +const {getEvents} = require('./events'); // $FlowFixMe[signature-verification-failure] there's no flowtype for AST function buildComponentSchema( diff --git a/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js index a7a81e017831..c661f988517c 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js @@ -731,10 +731,23 @@ export enum StringOptions { Three = 'three', } +export type BinaryTreeNode = { + left?: BinaryTreeNode, + value: number, + right?: BinaryTreeNode, +}; + +export type GraphNode = { + label: string, + neighbors?: Array, +}; + export interface Spec extends TurboModule { +getCallback: () => () => void; +getMixed: (arg: mixed) => mixed; +getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; + +getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; + +getGraphNode: (arg: GraphNode) => GraphNode; +getMap: (arg: {[a: string]: ?number}) => {[b: string]: ?number}; +getAnotherMap: (arg: {[string]: string}) => {[string]: string}; +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; diff --git a/packages/react-native-codegen/src/parsers/flow/modules/__tests__/__snapshots__/module-parser-snapshot-test.js.snap b/packages/react-native-codegen/src/parsers/flow/modules/__tests__/__snapshots__/module-parser-snapshot-test.js.snap index 00d66fd81de9..64e6ed07e66b 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/__tests__/__snapshots__/module-parser-snapshot-test.js.snap +++ b/packages/react-native-codegen/src/parsers/flow/modules/__tests__/__snapshots__/module-parser-snapshot-test.js.snap @@ -2,7 +2,14 @@ exports[`RN Codegen Flow Parser Fails with error message EMPTY_ENUM_NATIVE_MODULE 1`] = `"Module NativeSampleTurboModule: Failed parsing the enum SomeEnum in NativeSampleTurboModule with the 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."`; -exports[`RN Codegen Flow Parser Fails with error message MIXED_VALUES_ENUM_NATIVE_MODULE 1`] = `"Module NativeSampleTurboModule: Failed parsing the enum SomeEnum in NativeSampleTurboModule with the 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."`; +exports[`RN Codegen Flow Parser Fails with error message MIXED_VALUES_ENUM_NATIVE_MODULE 1`] = ` +"Syntax error in path/NativeSampleTurboModule.js: cannot use string initializer in number enum (19:2) + STR = 'str', + ^~~~~~~~~~~ +note: start of enum body (17:21) +export enum SomeEnum { + ^" +`; exports[`RN Codegen Flow Parser Fails with error message NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT 1`] = `"Module NativeSampleTurboModule: Generic 'Array' must have type parameters."`; @@ -44,7 +51,59 @@ exports[`RN Codegen Flow Parser can generate fixture CXX_ONLY_NATIVE_MODULE 1`] 'modules': { 'NativeSampleTurboModule': { 'type': 'NativeModule', - 'aliasMap': {}, + 'aliasMap': { + 'BinaryTreeNode': { + 'type': 'ObjectTypeAnnotation', + 'properties': [ + { + 'name': 'left', + 'optional': true, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + } + }, + { + 'name': 'value', + 'optional': false, + 'typeAnnotation': { + 'type': 'NumberTypeAnnotation' + } + }, + { + 'name': 'right', + 'optional': true, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + } + } + ] + }, + 'GraphNode': { + 'type': 'ObjectTypeAnnotation', + 'properties': [ + { + 'name': 'label', + 'optional': false, + 'typeAnnotation': { + 'type': 'StringTypeAnnotation' + } + }, + { + 'name': 'neighbors', + 'optional': true, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'GraphNode' + } + } + } + ] + } + }, 'enumMap': { 'Quality': { 'name': 'Quality', @@ -195,6 +254,48 @@ exports[`RN Codegen Flow Parser can generate fixture CXX_ONLY_NATIVE_MODULE 1`] ] } }, + { + 'name': 'getBinaryTreeNode', + 'optional': false, + 'typeAnnotation': { + 'type': 'FunctionTypeAnnotation', + 'returnTypeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + }, + 'params': [ + { + 'name': 'arg', + 'optional': false, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + } + } + ] + } + }, + { + 'name': 'getGraphNode', + 'optional': false, + 'typeAnnotation': { + 'type': 'FunctionTypeAnnotation', + 'returnTypeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'GraphNode' + }, + 'params': [ + { + 'name': 'arg', + 'optional': false, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'GraphNode' + } + } + ] + } + }, { 'name': 'getMap', 'optional': false, diff --git a/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-e2e-test.js b/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-e2e-test.js index 6cda41648a00..e66808ba6a2b 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-e2e-test.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-e2e-test.js @@ -9,22 +9,21 @@ */ import type { - NativeModuleReturnTypeAnnotation, NativeModuleBaseTypeAnnotation, - NativeModuleSchema, NativeModuleParamTypeAnnotation, + NativeModuleReturnTypeAnnotation, + NativeModuleSchema, } from '../../../../CodegenSchema'; -const invariant = require('invariant'); - -const {unwrapNullable} = require('../../../parsers-commons'); const { + MissingTypeParameterGenericParserError, + UnnamedFunctionParamParserError, UnsupportedGenericParserError, UnsupportedTypeAnnotationParserError, - UnnamedFunctionParamParserError, - MissingTypeParameterGenericParserError, } = require('../../../errors'); +const {unwrapNullable} = require('../../../parsers-commons'); const {FlowParser} = require('../../parser'); +const invariant = require('invariant'); const flowParser = new FlowParser(); @@ -85,7 +84,7 @@ describe('Flow Module Parser', () => { import type {TurboModule} from 'RCTExport'; import * as TurboModuleRegistry from 'TurboModuleRegistry'; export interface Spec extends TurboModule { - +useArg(arg: any): void; + useArg(arg: any): void; } export default TurboModuleRegistry.get('Foo'); `); @@ -99,7 +98,7 @@ describe('Flow Module Parser', () => { import type {TurboModule} from 'RCTExport'; import * as TurboModuleRegistry from 'TurboModuleRegistry'; export interface Spec extends TurboModule { - +useArg(boolean): void; + useArg(boolean): void; } export default TurboModuleRegistry.get('Foo'); `); @@ -146,7 +145,7 @@ describe('Flow Module Parser', () => { ${TYPE_ALIAS_DECLARATIONS} export interface Spec extends TurboModule { - +useArg(${annotateArg(paramName, paramType)}): void; + useArg(${annotateArg(paramName, paramType)}): void; } export default TurboModuleRegistry.get('Foo'); `); @@ -357,7 +356,7 @@ describe('Flow Module Parser', () => { type AnimalPointer = Animal; export interface Spec extends TurboModule { - +useArg(${annotateArg('arg', 'AnimalPointer')}): void; + useArg(${annotateArg('arg', 'AnimalPointer')}): void; } export default TurboModuleRegistry.get('Foo'); `); @@ -694,7 +693,7 @@ describe('Flow Module Parser', () => { import type {TurboModule} from 'RCTExport'; import * as TurboModuleRegistry from 'TurboModuleRegistry'; export interface Spec extends TurboModule { - +useArg(): void; + useArg(): void; } export default TurboModuleRegistry.get('Foo'); `); @@ -728,7 +727,7 @@ describe('Flow Module Parser', () => { ${TYPE_ALIAS_DECLARATIONS} export interface Spec extends TurboModule { - +useArg(): ${annotateRet(flowType)}; + useArg(): ${annotateRet(flowType)}; } export default TurboModuleRegistry.get('Foo'); `); diff --git a/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-snapshot-test.js b/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-snapshot-test.js index ec20817c2bfb..0fb4e8a15e6c 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-snapshot-test.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/__tests__/module-parser-snapshot-test.js @@ -11,10 +11,9 @@ 'use strict'; -const {FlowParser} = require('../../parser'); - -const fixtures = require('../__test_fixtures__/fixtures.js'); const failureFixtures = require('../__test_fixtures__/failures.js'); +const fixtures = require('../__test_fixtures__/fixtures.js'); +const {FlowParser} = require('../../parser'); const flowParser = new FlowParser(); diff --git a/packages/react-native-codegen/src/parsers/flow/modules/index.js b/packages/react-native-codegen/src/parsers/flow/modules/index.js index c50c45f2d699..93e689553239 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/index.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/index.js @@ -13,38 +13,36 @@ import type { NamedShape, NativeModuleAliasMap, - NativeModuleEnumMap, NativeModuleBaseTypeAnnotation, + NativeModuleEnumMap, NativeModuleTypeAnnotation, Nullable, } from '../../../CodegenSchema'; - import type {Parser} from '../../parser'; import type {ParserErrorCapturer, TypeDeclarationMap} from '../../utils'; const { - unwrapNullable, - wrapNullable, + UnsupportedGenericParserError, + UnsupportedTypeAnnotationParserError, +} = require('../../errors'); +const { assertGenericTypeAnnotationHasExactlyOneTypeParameter, parseObjectProperty, + unwrapNullable, + wrapNullable, } = require('../../parsers-commons'); const { emitArrayType, - emitFunction, + emitCommonTypes, emitDictionary, + emitFunction, emitPromise, emitRootTag, emitUnion, - emitCommonTypes, typeAliasResolution, typeEnumResolution, } = require('../../parsers-primitives'); -const { - UnsupportedTypeAnnotationParserError, - UnsupportedGenericParserError, -} = require('../../errors'); - function translateTypeAnnotation( hasteModuleName: string, /** @@ -178,6 +176,7 @@ function translateTypeAnnotation( property => { return tryParse(() => { return parseObjectProperty( + flowTypeAnnotation, property, hasteModuleName, types, diff --git a/packages/react-native-codegen/src/parsers/flow/parseFlowAndThrowErrors.js b/packages/react-native-codegen/src/parsers/flow/parseFlowAndThrowErrors.js new file mode 100644 index 000000000000..8ffb03422e4f --- /dev/null +++ b/packages/react-native-codegen/src/parsers/flow/parseFlowAndThrowErrors.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. + * + * @flow strict + * @format + */ + +'use strict'; + +import type {Program as ESTreeProgram} from 'hermes-estree'; + +const hermesParser = require('hermes-parser'); + +function parseFlowAndThrowErrors( + code: string, + options: $ReadOnly<{filename?: ?string}> = {}, +): ESTreeProgram { + let ast; + try { + ast = hermesParser.parse(code, { + // Produce an ESTree-compliant AST + babel: false, + // Parse Flow without a pragma + flow: 'all', + ...(options.filename != null ? {sourceFilename: options.filename} : {}), + }); + } catch (e) { + if (options.filename != null) { + e.message = `Syntax error in ${options.filename}: ${e.message}`; + } + throw e; + } + return ast; +} + +module.exports = { + parseFlowAndThrowErrors, +}; diff --git a/packages/react-native-codegen/src/parsers/flow/parser.js b/packages/react-native-codegen/src/parsers/flow/parser.js index b0d1f2df2b50..91cac322b93b 100644 --- a/packages/react-native-codegen/src/parsers/flow/parser.js +++ b/packages/react-native-codegen/src/parsers/flow/parser.js @@ -11,17 +11,17 @@ 'use strict'; import type { - UnionTypeAnnotationMemberType, - SchemaType, + ExtendsPropsShape, NamedShape, - Nullable, - NativeModuleParamTypeAnnotation, - NativeModuleEnumMemberType, - NativeModuleEnumMembers, NativeModuleAliasMap, NativeModuleEnumMap, + NativeModuleEnumMembers, + NativeModuleEnumMemberType, + NativeModuleParamTypeAnnotation, + Nullable, PropTypeAnnotation, - ExtendsPropsShape, + SchemaType, + UnionTypeAnnotationMemberType, } from '../../CodegenSchema'; import type {ParserType} from '../errors'; import type { @@ -32,44 +32,37 @@ import type { } from '../parser'; import type { ParserErrorCapturer, - TypeDeclarationMap, PropAST, + TypeDeclarationMap, 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'); - + UnsupportedObjectPropertyTypeAnnotationParserError, +} = require('../errors'); const { - buildSchema, - buildPropSchema, buildModuleSchema, + buildPropSchema, + buildSchema, handleGenericTypeAnnotation, } = require('../parsers-commons'); const {Visitor} = require('../parsers-primitives'); -const {buildComponentSchema} = require('./components'); const {wrapComponentSchema} = require('../schema.js'); - +const {buildComponentSchema} = require('./components'); +const { + flattenProperties, + getSchemaInfo, + getTypeAnnotation, +} = require('./components/componentsUtils'); +const {flowTranslateTypeAnnotation} = require('./modules'); +const {parseFlowAndThrowErrors} = require('./parseFlowAndThrowErrors'); const fs = require('fs'); +const invariant = require('invariant'); -const { - UnsupportedObjectPropertyTypeAnnotationParserError, -} = require('../errors'); +type ExtendsForProp = null | { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', +}; class FlowParser implements Parser { typeParameterInstantiation: string = 'TypeParameterInstantiation'; @@ -149,10 +142,8 @@ class FlowParser implements Parser { return this.parseString(contents, 'path/NativeSampleTurboModule.js'); } - getAst(contents: string): $FlowFixMe { - return flowParser.parse(contents, { - enums: true, - }); + getAst(contents: string, filename?: ?string): $FlowFixMe { + return parseFlowAndThrowErrors(contents, {filename}); } getFunctionTypeAnnotationParameters( diff --git a/packages/react-native-codegen/src/parsers/flow/utils.js b/packages/react-native-codegen/src/parsers/flow/utils.js index 73e71760df44..02af59166068 100644 --- a/packages/react-native-codegen/src/parsers/flow/utils.js +++ b/packages/react-native-codegen/src/parsers/flow/utils.js @@ -10,7 +10,7 @@ 'use strict'; -import type {TypeDeclarationMap, ASTNode} from '../utils'; +import type {ASTNode, TypeDeclarationMap} from '../utils'; function getValueFromTypes(value: ASTNode, types: TypeDeclarationMap): ASTNode { if (value.type === 'GenericTypeAnnotation' && types[value.id.name]) { diff --git a/packages/react-native-codegen/src/parsers/parser.js b/packages/react-native-codegen/src/parsers/parser.js index 7835107642da..4c0d0257ed54 100644 --- a/packages/react-native-codegen/src/parsers/parser.js +++ b/packages/react-native-codegen/src/parsers/parser.js @@ -11,24 +11,24 @@ 'use strict'; import type { - UnionTypeAnnotationMemberType, - SchemaType, + ExtendsPropsShape, NamedShape, - Nullable, - NativeModuleParamTypeAnnotation, - NativeModuleEnumMemberType, - NativeModuleEnumMembers, NativeModuleAliasMap, NativeModuleEnumMap, + NativeModuleEnumMembers, + NativeModuleEnumMemberType, + NativeModuleParamTypeAnnotation, + Nullable, PropTypeAnnotation, - ExtendsPropsShape, + SchemaType, + UnionTypeAnnotationMemberType, } from '../CodegenSchema'; import type {ParserType} from './errors'; import type { + ASTNode, ParserErrorCapturer, - TypeDeclarationMap, PropAST, - ASTNode, + TypeDeclarationMap, TypeResolutionStatus, } from './utils'; @@ -169,9 +169,11 @@ export interface Parser { /** * Given the content of a file, it returns an AST. * @parameter contents: the content of the file. + * @parameter filename: the name of the file, if available. + * @throws if there is a syntax error. * @returns: the AST of the file. */ - getAst(contents: string): $FlowFixMe; + getAst(contents: string, filename?: ?string): $FlowFixMe; /** * Given a FunctionTypeAnnotation, it returns an array of its parameters. diff --git a/packages/react-native-codegen/src/parsers/parserMock.js b/packages/react-native-codegen/src/parsers/parserMock.js index 1a775b3079cb..7b0cc7ed53f0 100644 --- a/packages/react-native-codegen/src/parsers/parserMock.js +++ b/packages/react-native-codegen/src/parsers/parserMock.js @@ -11,46 +11,45 @@ '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, + ExtendsPropsShape, NamedShape, - Nullable, - NativeModuleParamTypeAnnotation, - NativeModuleEnumMemberType, - NativeModuleEnumMembers, NativeModuleAliasMap, NativeModuleEnumMap, + NativeModuleEnumMembers, + NativeModuleEnumMemberType, + NativeModuleParamTypeAnnotation, + Nullable, PropTypeAnnotation, - ExtendsPropsShape, + SchemaType, + UnionTypeAnnotationMemberType, } from '../CodegenSchema'; +import type {ParserType} from './errors'; +import type { + GetSchemaInfoFN, + GetTypeAnnotationFN, + Parser, + ResolveTypeAnnotationFN, +} from './parser'; import type { ParserErrorCapturer, PropAST, TypeDeclarationMap, TypeResolutionStatus, } from './utils'; -import invariant from 'invariant'; -const {flattenProperties} = require('./typescript/components/componentsUtils'); - -const {buildPropSchema} = require('./parsers-commons'); +import invariant from 'invariant'; -// $FlowFixMe[untyped-import] there's no flowtype flow-parser -const flowParser = require('flow-parser'); const { UnsupportedObjectPropertyTypeAnnotationParserError, } = require('./errors'); +const {parseFlowAndThrowErrors} = require('./flow/parseFlowAndThrowErrors'); +const {buildPropSchema} = require('./parsers-commons'); +const {flattenProperties} = require('./typescript/components/componentsUtils'); + +type ExtendsForProp = null | { + type: 'ReactNativeBuiltInType', + knownTypeName: 'ReactNativeCoreViewProps', +}; const schemaMock = { modules: { @@ -122,10 +121,8 @@ export class MockedParser implements Parser { return schemaMock; } - getAst(contents: string): $FlowFixMe { - return flowParser.parse(contents, { - enums: true, - }); + getAst(contents: string, filename?: ?string): $FlowFixMe { + return parseFlowAndThrowErrors(contents, {filename}); } getFunctionTypeAnnotationParameters( diff --git a/packages/react-native-codegen/src/parsers/parsers-commons.js b/packages/react-native-codegen/src/parsers/parsers-commons.js index f2f5a3839d55..81b7a446aa87 100644 --- a/packages/react-native-codegen/src/parsers/parsers-commons.js +++ b/packages/react-native-codegen/src/parsers/parsers-commons.js @@ -11,69 +11,66 @@ 'use strict'; import type { - Nullable, + EventTypeAnnotation, + EventTypeShape, NamedShape, NativeModuleAliasMap, NativeModuleBaseTypeAnnotation, - NativeModuleSchema, - NativeModuleTypeAnnotation, + NativeModuleEnumMap, NativeModuleFunctionTypeAnnotation, NativeModuleParamTypeAnnotation, NativeModulePropertyShape, - SchemaType, - NativeModuleEnumMap, + NativeModuleSchema, + NativeModuleTypeAnnotation, + Nullable, + ObjectTypeAnnotation, OptionsShape, PropTypeAnnotation, - EventTypeAnnotation, - ObjectTypeAnnotation, - EventTypeShape, + SchemaType, } from '../CodegenSchema.js'; - -import type {Parser} from './parser'; import type {ParserType} from './errors'; +import type {Parser} from './parser'; +import type {ComponentSchemaBuilderConfig} from './schema.js'; import type { ParserErrorCapturer, - TypeDeclarationMap, PropAST, + TypeDeclarationMap, 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, + throwIfConfigNotfound, throwIfIncorrectModuleRegistryCallArgument, - throwIfModuleInterfaceNotFound, - throwIfMoreThanOneModuleInterfaceParserError, + throwIfIncorrectModuleRegistryCallTypeParameterParserError, throwIfModuleInterfaceIsMisnamed, + throwIfModuleInterfaceNotFound, + throwIfModuleTypeIsUnsupported, throwIfMoreThanOneCodegenNativecommands, - throwIfConfigNotfound, throwIfMoreThanOneConfig, + throwIfMoreThanOneModuleInterfaceParserError, + throwIfMoreThanOneModuleRegistryCalls, + throwIfPropertyValueTypeIsUnsupported, throwIfTypeAliasIsNotInterface, + throwIfUnsupportedFunctionParamTypeAnnotationParserError, + throwIfUnsupportedFunctionReturnTypeAnnotationParserError, + throwIfUntypedModule, + throwIfUnusedModuleInterfaceParserError, + throwIfWrongNumberOfCallExpressionArgs, } = require('./error-utils'); - const { MissingTypeParameterGenericParserError, MoreThanOneTypeParameterGenericParserError, UnnamedFunctionParamParserError, + UnsupportedObjectDirectRecursivePropertyParserError, } = require('./errors'); - +const { + createParserErrorCapturer, + extractNativeModuleName, + getConfigType, + isModuleRegistryCall, + verifyPlatforms, + visit, +} = require('./utils'); const invariant = require('invariant'); export type CommandOptions = $ReadOnly<{ @@ -175,6 +172,7 @@ function isObjectProperty(property: $FlowFixMe, language: ParserType): boolean { } function parseObjectProperty( + parentObject?: $FlowFixMe, property: $FlowFixMe, hasteModuleName: string, types: TypeDeclarationMap, @@ -195,6 +193,41 @@ function parseObjectProperty( ? property.typeAnnotation.typeAnnotation : property.value; + // Handle recursive types + if (parentObject) { + const propertyType = parser.getResolveTypeAnnotationFN()( + languageTypeAnnotation, + types, + parser, + ); + if ( + propertyType.typeResolutionStatus.successful === true && + propertyType.typeResolutionStatus.type === 'alias' && + (language === 'TypeScript' + ? parentObject.typeName && + parentObject.typeName.name === languageTypeAnnotation.typeName?.name + : parentObject.id && + parentObject.id.name === languageTypeAnnotation.id?.name) + ) { + if (!optional) { + throw new UnsupportedObjectDirectRecursivePropertyParserError( + name, + languageTypeAnnotation, + hasteModuleName, + ); + } + return { + name, + optional, + typeAnnotation: { + type: 'TypeAliasTypeAnnotation', + name: propertyType.typeResolutionStatus.name, + }, + }; + } + } + + // Handle non-recursive types const [propertyTypeAnnotation, isPropertyNullable] = unwrapNullable<$FlowFixMe>( translateTypeAnnotation( @@ -210,7 +243,7 @@ function parseObjectProperty( ); if ( - propertyTypeAnnotation.type === 'FunctionTypeAnnotation' || + (propertyTypeAnnotation.type === 'FunctionTypeAnnotation' && !cxxOnly) || propertyTypeAnnotation.type === 'PromiseTypeAnnotation' || propertyTypeAnnotation.type === 'VoidTypeAnnotation' ) { @@ -484,7 +517,7 @@ function buildSchema( return {modules: {}}; } - const ast = parser.getAst(contents); + const ast = parser.getAst(contents, filename); const configType = getConfigType(ast, Visitor); return buildSchemaFromConfigType( @@ -707,6 +740,7 @@ function findNativeComponentType( // expression so we need to go one level deeper if ( declaration.type === 'TSAsExpression' || + declaration.type === 'AsExpression' || declaration.type === 'TypeCastExpression' ) { declaration = declaration.expression; diff --git a/packages/react-native-codegen/src/parsers/parsers-primitives.js b/packages/react-native-codegen/src/parsers/parsers-primitives.js index e632570db09c..dbc2c564cc4f 100644 --- a/packages/react-native-codegen/src/parsers/parsers-primitives.js +++ b/packages/react-native-codegen/src/parsers/parsers-primitives.js @@ -11,57 +11,55 @@ 'use strict'; import type { - Nullable, BooleanTypeAnnotation, DoubleTypeAnnotation, EventTypeAnnotation, Int32TypeAnnotation, NamedShape, NativeModuleAliasMap, - NativeModuleEnumMap, NativeModuleBaseTypeAnnotation, - NativeModuleTypeAnnotation, + NativeModuleEnumDeclaration, + NativeModuleEnumMap, NativeModuleFloatTypeAnnotation, NativeModuleFunctionTypeAnnotation, NativeModuleGenericObjectTypeAnnotation, NativeModuleMixedTypeAnnotation, NativeModuleNumberTypeAnnotation, + NativeModuleObjectTypeAnnotation, NativeModulePromiseTypeAnnotation, NativeModuleTypeAliasTypeAnnotation, + NativeModuleTypeAnnotation, NativeModuleUnionTypeAnnotation, + Nullable, ObjectTypeAnnotation, ReservedTypeAnnotation, StringTypeAnnotation, VoidTypeAnnotation, - NativeModuleObjectTypeAnnotation, - NativeModuleEnumDeclaration, } from '../CodegenSchema'; import type {Parser} from './parser'; import type { ParserErrorCapturer, - TypeResolutionStatus, TypeDeclarationMap, + TypeResolutionStatus, } from './utils'; -const { - UnsupportedUnionTypeAnnotationParserError, - UnsupportedTypeAnnotationParserError, - ParserError, -} = require('./errors'); - const { throwIfArrayElementTypeAnnotationIsUnsupported, throwIfPartialNotAnnotatingTypeParameter, throwIfPartialWithMoreParameter, } = require('./error-utils'); -const {nullGuard} = require('./parsers-utils'); +const { + ParserError, + UnsupportedTypeAnnotationParserError, + UnsupportedUnionTypeAnnotationParserError, +} = require('./errors'); const { assertGenericTypeAnnotationHasExactlyOneTypeParameter, - wrapNullable, - unwrapNullable, translateFunctionTypeAnnotation, + unwrapNullable, + wrapNullable, } = require('./parsers-commons'); - +const {nullGuard} = require('./parsers-utils'); const {isModuleRegistryCall} = require('./utils'); function emitBoolean(nullable: boolean): Nullable { diff --git a/packages/react-native-codegen/src/parsers/schema.js b/packages/react-native-codegen/src/parsers/schema.js index 0fdf3c375114..2ebf6158b2dc 100644 --- a/packages/react-native-codegen/src/parsers/schema.js +++ b/packages/react-native-codegen/src/parsers/schema.js @@ -11,13 +11,13 @@ 'use strict'; import type { + CommandTypeAnnotation, EventTypeShape, + ExtendsPropsShape, NamedShape, - CommandTypeAnnotation, + OptionsShape, PropTypeAnnotation, - ExtendsPropsShape, SchemaType, - OptionsShape, } from '../CodegenSchema.js'; export type ComponentSchemaBuilderConfig = $ReadOnly<{ diff --git a/packages/react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js index 7f81b17e6cc3..ed237a0b6c9e 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js @@ -1108,13 +1108,20 @@ export type ScrollTo = ( y: Int, animated: Boolean, ) => Void; +export type AddOverlays = ( + viewRef: React.ElementRef, + overlayColorsReadOnly: ReadOnlyArray, + overlayColorsArray: Array, + overlayColorsArrayAnnotation: string[], +) => Void; interface NativeCommands { readonly scrollTo: ScrollTo; + readonly addOverlays: AddOverlays; } export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'], + supportedCommands: ['scrollTo', 'addOverlays'], }); export default codegenNativeComponent('Module') as NativeType; diff --git a/packages/react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap b/packages/react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap index 59699c28576f..5c31630cb3c8 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap +++ b/packages/react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap @@ -5303,6 +5303,48 @@ exports[`RN Codegen TypeScript Parser can generate fixture COMMANDS_WITH_EXTERNA 'type': 'VoidTypeAnnotation' } } + }, + { + 'name': 'addOverlays', + 'optional': false, + 'typeAnnotation': { + 'type': 'FunctionTypeAnnotation', + 'params': [ + { + 'name': 'overlayColorsReadOnly', + 'optional': false, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'StringTypeAnnotation' + } + } + }, + { + 'name': 'overlayColorsArray', + 'optional': false, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'StringTypeAnnotation' + } + } + }, + { + 'name': 'overlayColorsArrayAnnotation', + 'optional': false, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'StringTypeAnnotation' + } + } + } + ], + 'returnTypeAnnotation': { + 'type': 'VoidTypeAnnotation' + } + } } ] } diff --git a/packages/react-native-codegen/src/parsers/typescript/components/__tests__/typescript-component-parser-test.js b/packages/react-native-codegen/src/parsers/typescript/components/__tests__/typescript-component-parser-test.js index dd56de0b1351..cd31e4f4d71e 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/__tests__/typescript-component-parser-test.js +++ b/packages/react-native-codegen/src/parsers/typescript/components/__tests__/typescript-component-parser-test.js @@ -11,9 +11,9 @@ 'use strict'; -const {TypeScriptParser} = require('../../parser'); -const fixtures = require('../__test_fixtures__/fixtures.js'); const failureFixtures = require('../__test_fixtures__/failures.js'); +const fixtures = require('../__test_fixtures__/fixtures.js'); +const {TypeScriptParser} = require('../../parser'); jest.mock('fs', () => ({ readFileSync: filename => { // Jest in the OSS does not allow to capture variables in closures. diff --git a/packages/react-native-codegen/src/parsers/typescript/components/commands.js b/packages/react-native-codegen/src/parsers/typescript/components/commands.js index 390a6d71b960..882f7002d9a4 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/commands.js +++ b/packages/react-native-codegen/src/parsers/typescript/components/commands.js @@ -11,11 +11,13 @@ 'use strict'; import type { - NamedShape, CommandTypeAnnotation, + NamedShape, } from '../../../CodegenSchema.js'; import type {TypeDeclarationMap} from '../../utils'; + const {parseTopLevelType} = require('../parseTopLevelType'); +const {getPrimitiveTypeAnnotation} = require('./componentsUtils'); // $FlowFixMe[unclear-type] there's no flowtype for ASTs type EventTypeAST = Object; @@ -61,28 +63,34 @@ function buildCommandSchemaInternal( }; break; case 'TSBooleanKeyword': - returnType = { - type: 'BooleanTypeAnnotation', - }; - break; case 'Int32': - returnType = { - type: 'Int32TypeAnnotation', - }; - break; case 'Double': - returnType = { - type: 'DoubleTypeAnnotation', - }; - break; case 'Float': + case 'TSStringKeyword': + returnType = getPrimitiveTypeAnnotation(type); + break; + case 'Array': + case 'ReadOnlyArray': + if (!paramValue.type === 'TSTypeReference') { + throw new Error( + 'Array and ReadOnlyArray are TSTypeReference for array', + ); + } returnType = { - type: 'FloatTypeAnnotation', + type: 'ArrayTypeAnnotation', + elementType: getPrimitiveTypeAnnotation( + // TODO: T172453752 support complex type annotation for array element + paramValue.typeParameters.params[0].type, + ), }; break; - case 'TSStringKeyword': + case 'TSArrayType': returnType = { - type: 'StringTypeAnnotation', + type: 'ArrayTypeAnnotation', + elementType: { + // TODO: T172453752 support complex type annotation for array element + type: getPrimitiveTypeAnnotation(paramValue.elementType.type).type, + }, }; break; default: diff --git a/packages/react-native-codegen/src/parsers/typescript/components/componentsUtils.js b/packages/react-native-codegen/src/parsers/typescript/components/componentsUtils.js index bbe56a973e5b..f6eb2f12042d 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/componentsUtils.js +++ b/packages/react-native-codegen/src/parsers/typescript/components/componentsUtils.js @@ -9,13 +9,15 @@ */ 'use strict'; + +import type {BuildSchemaFN, Parser} from '../../parser'; +import type {ASTNode, PropAST, TypeDeclarationMap} from '../../utils'; + +const {verifyPropNotAlreadyDefined} = require('../../parsers-commons'); const { - parseTopLevelType, flattenIntersectionType, + parseTopLevelType, } = require('../parseTopLevelType'); -const {verifyPropNotAlreadyDefined} = require('../../parsers-commons'); -import type {TypeDeclarationMap, PropAST, ASTNode} from '../../utils'; -import type {BuildSchemaFN, Parser} from '../../parser'; function getUnionOfLiterals( name: string, @@ -157,6 +159,34 @@ function buildObjectType( }; } +function getPrimitiveTypeAnnotation(type: string): $FlowFixMe { + switch (type) { + 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', + }; + default: + throw new Error(`Unknown primitive type "${type}"`); + } +} + function getCommonTypeAnnotation( name: string, forArray: boolean, @@ -224,26 +254,12 @@ function getCommonTypeAnnotation( 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', - }; + return getPrimitiveTypeAnnotation(type); case 'UnsafeMixed': return { type: 'MixedTypeAnnotation', @@ -512,5 +528,6 @@ function flattenProperties( module.exports = { getSchemaInfo, getTypeAnnotation, + getPrimitiveTypeAnnotation, flattenProperties, }; diff --git a/packages/react-native-codegen/src/parsers/typescript/components/events.js b/packages/react-native-codegen/src/parsers/typescript/components/events.js index 0be6d104d580..a0672ac35704 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/events.js +++ b/packages/react-native-codegen/src/parsers/typescript/components/events.js @@ -11,35 +11,36 @@ 'use strict'; import type { + EventTypeAnnotation, EventTypeShape, NamedShape, - EventTypeAnnotation, } from '../../../CodegenSchema.js'; -import type {TypeDeclarationMap} from '../../utils'; import type {Parser} from '../../parser'; -const {flattenProperties} = require('./componentsUtils'); -const {parseTopLevelType} = require('../parseTopLevelType'); +import type {TypeDeclarationMap} from '../../utils'; + const { - throwIfEventHasNoName, - throwIfBubblingTypeIsNull, throwIfArgumentPropsAreNull, + throwIfBubblingTypeIsNull, + throwIfEventHasNoName, } = require('../../error-utils'); const { - getEventArgument, buildPropertiesForEvent, - handleEventHandler, emitBuildEventSchema, + getEventArgument, + handleEventHandler, } = require('../../parsers-commons'); const { emitBoolProp, emitDoubleProp, emitFloatProp, - emitMixedProp, - emitStringProp, emitInt32Prop, + emitMixedProp, emitObjectProp, + emitStringProp, emitUnionProp, } = require('../../parsers-primitives'); +const {parseTopLevelType} = require('../parseTopLevelType'); +const {flattenProperties} = require('./componentsUtils'); function getPropertyType( /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's * LTI update could not be added via codemod */ diff --git a/packages/react-native-codegen/src/parsers/typescript/components/extends.js b/packages/react-native-codegen/src/parsers/typescript/components/extends.js index fa0ed221a957..6e29af9caf13 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/extends.js +++ b/packages/react-native-codegen/src/parsers/typescript/components/extends.js @@ -11,6 +11,7 @@ 'use strict'; import type {TypeDeclarationMap} from '../../utils'; + const {parseTopLevelType} = require('../parseTopLevelType'); function isEvent(typeAnnotation: $FlowFixMe): boolean { diff --git a/packages/react-native-codegen/src/parsers/typescript/components/index.js b/packages/react-native-codegen/src/parsers/typescript/components/index.js index 4d3523c6a194..fa95c8f7e41b 100644 --- a/packages/react-native-codegen/src/parsers/typescript/components/index.js +++ b/packages/react-native-codegen/src/parsers/typescript/components/index.js @@ -12,14 +12,14 @@ 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, + getOptions, } = require('../../parsers-commons'); +const {getCommands} = require('./commands'); +const {getEvents} = require('./events'); +const {categorizeProps} = require('./extends'); // $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser type PropsAST = Object; diff --git a/packages/react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js index 5f6377869afb..09a26837f093 100644 --- a/packages/react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js @@ -825,10 +825,23 @@ export type ChooseFloat = 1.44 | 2.88 | 5.76; export type ChooseObject = {} | {low: string}; export type ChooseString = 'One' | 'Two' | 'Three'; +export type BinaryTreeNode = { + left?: BinaryTreeNode, + value: number, + right?: BinaryTreeNode, +}; + +export type GraphNode = { + label: string, + neighbors?: Array, +}; + 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 getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; + readonly getGraphNode: (arg: GraphNode) => GraphNode; 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; diff --git a/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap b/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap index 870a93494166..e18ec2843dd1 100644 --- a/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap +++ b/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap @@ -42,7 +42,59 @@ exports[`RN Codegen TypeScript Parser can generate fixture CXX_ONLY_NATIVE_MODUL 'modules': { 'NativeSampleTurboModule': { 'type': 'NativeModule', - 'aliasMap': {}, + 'aliasMap': { + 'BinaryTreeNode': { + 'type': 'ObjectTypeAnnotation', + 'properties': [ + { + 'name': 'left', + 'optional': true, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + } + }, + { + 'name': 'value', + 'optional': false, + 'typeAnnotation': { + 'type': 'NumberTypeAnnotation' + } + }, + { + 'name': 'right', + 'optional': true, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + } + } + ] + }, + 'GraphNode': { + 'type': 'ObjectTypeAnnotation', + 'properties': [ + { + 'name': 'label', + 'optional': false, + 'typeAnnotation': { + 'type': 'StringTypeAnnotation' + } + }, + { + 'name': 'neighbors', + 'optional': true, + 'typeAnnotation': { + 'type': 'ArrayTypeAnnotation', + 'elementType': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'GraphNode' + } + } + } + ] + } + }, 'enumMap': { 'Quality': { 'name': 'Quality', @@ -193,6 +245,48 @@ exports[`RN Codegen TypeScript Parser can generate fixture CXX_ONLY_NATIVE_MODUL ] } }, + { + 'name': 'getBinaryTreeNode', + 'optional': false, + 'typeAnnotation': { + 'type': 'FunctionTypeAnnotation', + 'returnTypeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + }, + 'params': [ + { + 'name': 'arg', + 'optional': false, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'BinaryTreeNode' + } + } + ] + } + }, + { + 'name': 'getGraphNode', + 'optional': false, + 'typeAnnotation': { + 'type': 'FunctionTypeAnnotation', + 'returnTypeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'GraphNode' + }, + 'params': [ + { + 'name': 'arg', + 'optional': false, + 'typeAnnotation': { + 'type': 'TypeAliasTypeAnnotation', + 'name': 'GraphNode' + } + } + ] + } + }, { 'name': 'getMap', 'optional': false, diff --git a/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-e2e-test.js b/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-e2e-test.js index 04b471ac808d..58b9444b46e5 100644 --- a/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-e2e-test.js +++ b/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-e2e-test.js @@ -9,22 +9,21 @@ */ import type { - NativeModuleReturnTypeAnnotation, NativeModuleBaseTypeAnnotation, - NativeModuleSchema, NativeModuleParamTypeAnnotation, + NativeModuleReturnTypeAnnotation, + NativeModuleSchema, } from '../../../../CodegenSchema'; -const invariant = require('invariant'); - -const {unwrapNullable} = require('../../../parsers-commons'); const { + MissingTypeParameterGenericParserError, + UnnamedFunctionParamParserError, UnsupportedGenericParserError, UnsupportedTypeAnnotationParserError, - UnnamedFunctionParamParserError, - MissingTypeParameterGenericParserError, } = require('../../../errors'); +const {unwrapNullable} = require('../../../parsers-commons'); const {TypeScriptParser} = require('../../parser'); +const invariant = require('invariant'); const typescriptParser = new TypeScriptParser(); diff --git a/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-snapshot-test.js b/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-snapshot-test.js index 68b1e694dbf2..d375d0bbae99 100644 --- a/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-snapshot-test.js +++ b/packages/react-native-codegen/src/parsers/typescript/modules/__tests__/typescript-module-parser-snapshot-test.js @@ -11,10 +11,9 @@ 'use strict'; -const {TypeScriptParser} = require('../../parser'); - -const fixtures = require('../__test_fixtures__/fixtures.js'); const failureFixtures = require('../__test_fixtures__/failures.js'); +const fixtures = require('../__test_fixtures__/fixtures.js'); +const {TypeScriptParser} = require('../../parser'); const typeScriptParser = new TypeScriptParser(); diff --git a/packages/react-native-codegen/src/parsers/typescript/modules/index.js b/packages/react-native-codegen/src/parsers/typescript/modules/index.js index 4668924375cc..0b92061702db 100644 --- a/packages/react-native-codegen/src/parsers/typescript/modules/index.js +++ b/packages/react-native-codegen/src/parsers/typescript/modules/index.js @@ -13,46 +13,44 @@ import type { NamedShape, NativeModuleAliasMap, - NativeModuleEnumMap, NativeModuleBaseTypeAnnotation, + NativeModuleEnumMap, NativeModuleTypeAnnotation, Nullable, } from '../../../CodegenSchema'; - import type {Parser} from '../../parser'; import type { ParserErrorCapturer, - TypeResolutionStatus, TypeDeclarationMap, + TypeResolutionStatus, } from '../../utils'; -const {flattenIntersectionType} = require('../parseTopLevelType'); -const {flattenProperties} = require('../components/componentsUtils'); +const { + UnsupportedGenericParserError, + UnsupportedTypeAnnotationParserError, +} = require('../../errors'); const {parseObjectProperty} = require('../../parsers-commons'); - const { emitArrayType, - emitFunction, + emitCommonTypes, emitDictionary, + emitFunction, emitPromise, emitRootTag, emitUnion, - emitCommonTypes, + translateArrayTypeAnnotation, typeAliasResolution, typeEnumResolution, - translateArrayTypeAnnotation, } = require('../../parsers-primitives'); - -const { - UnsupportedGenericParserError, - UnsupportedTypeAnnotationParserError, -} = require('../../errors'); +const {flattenProperties} = require('../components/componentsUtils'); +const {flattenIntersectionType} = require('../parseTopLevelType'); function translateObjectTypeAnnotation( hasteModuleName: string, /** * TODO(T108222691): Use flow-types for @babel/parser */ + typeScriptTypeAnnotation: $FlowFixMe, nullable: boolean, objectMembers: $ReadOnlyArray<$FlowFixMe>, typeResolutionStatus: TypeResolutionStatus, @@ -69,6 +67,7 @@ function translateObjectTypeAnnotation( .map>>(property => { return tryParse(() => { return parseObjectProperty( + typeScriptTypeAnnotation, property, hasteModuleName, types, @@ -269,6 +268,7 @@ function translateTypeAnnotation( return translateObjectTypeAnnotation( hasteModuleName, + typeScriptTypeAnnotation, nullable, flattenProperties([typeAnnotation], types, parser), typeResolutionStatus, @@ -284,6 +284,7 @@ function translateTypeAnnotation( case 'TSIntersectionType': { return translateObjectTypeAnnotation( hasteModuleName, + typeScriptTypeAnnotation, nullable, flattenProperties( flattenIntersectionType(typeAnnotation, types), @@ -327,6 +328,7 @@ function translateTypeAnnotation( return translateObjectTypeAnnotation( hasteModuleName, + typeScriptTypeAnnotation, nullable, typeAnnotation.members, typeResolutionStatus, diff --git a/packages/react-native-codegen/src/parsers/typescript/parser.js b/packages/react-native-codegen/src/parsers/typescript/parser.js index 9e8dc836b4ed..7262b60301bf 100644 --- a/packages/react-native-codegen/src/parsers/typescript/parser.js +++ b/packages/react-native-codegen/src/parsers/typescript/parser.js @@ -11,17 +11,17 @@ 'use strict'; import type { - UnionTypeAnnotationMemberType, - SchemaType, + ExtendsPropsShape, NamedShape, - Nullable, - NativeModuleParamTypeAnnotation, - NativeModuleEnumMembers, - NativeModuleEnumMemberType, NativeModuleAliasMap, NativeModuleEnumMap, + NativeModuleEnumMembers, + NativeModuleEnumMemberType, + NativeModuleParamTypeAnnotation, + Nullable, PropTypeAnnotation, - ExtendsPropsShape, + SchemaType, + UnionTypeAnnotationMemberType, } from '../../CodegenSchema'; import type {ParserType} from '../errors'; import type { @@ -32,39 +32,35 @@ import type { } from '../parser'; import type { ParserErrorCapturer, - TypeDeclarationMap, PropAST, + TypeDeclarationMap, 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, + UnsupportedObjectPropertyTypeAnnotationParserError, +} = require('../errors'); +const { buildModuleSchema, - extendsForProp, buildPropSchema, + buildSchema, + extendsForProp, handleGenericTypeAnnotation, } = require('../parsers-commons.js'); - -const {parseTopLevelType} = require('./parseTopLevelType'); +const {Visitor} = require('../parsers-primitives'); +const {wrapComponentSchema} = require('../schema.js'); +const {buildComponentSchema} = require('./components'); const { + flattenProperties, getSchemaInfo, getTypeAnnotation, - flattenProperties, } = require('./components/componentsUtils'); +const {typeScriptTranslateTypeAnnotation} = require('./modules'); +const {parseTopLevelType} = require('./parseTopLevelType'); +// $FlowFixMe[untyped-import] Use flow-types for @babel/parser +const babelParser = require('@babel/parser'); const fs = require('fs'); - -const { - UnsupportedObjectPropertyTypeAnnotationParserError, -} = require('../errors'); +const invariant = require('invariant'); class TypeScriptParser implements Parser { typeParameterInstantiation: string = 'TSTypeParameterInstantiation'; @@ -146,7 +142,7 @@ class TypeScriptParser implements Parser { return this.parseString(contents, 'path/NativeSampleTurboModule.ts'); } - getAst(contents: string): $FlowFixMe { + getAst(contents: string, filename?: ?string): $FlowFixMe { return babelParser.parse(contents, { sourceType: 'module', plugins: ['typescript'], diff --git a/packages/react-native-codegen/src/parsers/utils.js b/packages/react-native-codegen/src/parsers/utils.js index 5c904c6c80fe..77c302759512 100644 --- a/packages/react-native-codegen/src/parsers/utils.js +++ b/packages/react-native-codegen/src/parsers/utils.js @@ -11,7 +11,6 @@ 'use strict'; const {ParserError} = require('./errors'); - const path = require('path'); export type TypeDeclarationMap = {[declarationName: string]: $FlowFixMe}; @@ -86,6 +85,12 @@ function verifyPlatforms( return; } + if (name.endsWith('Windows')) { + excludedPlatforms.add('iOS'); + excludedPlatforms.add('android'); + return; + } + if (name.endsWith('Cxx')) { cxxOnly = true; excludedPlatforms.add('iOS'); diff --git a/packages/react-native-gradle-plugin/.gitignore b/packages/react-native-gradle-plugin/.gitignore new file mode 100644 index 000000000000..a03a24d2cd8e --- /dev/null +++ b/packages/react-native-gradle-plugin/.gitignore @@ -0,0 +1,3 @@ +build/ +react-native-gradle-plugin/build/ +settings-plugin/build/ \ No newline at end of file diff --git a/packages/react-native-gradle-plugin/build.gradle.kts b/packages/react-native-gradle-plugin/build.gradle.kts index 8934f0f30ba3..f14ffcd1726e 100644 --- a/packages/react-native-gradle-plugin/build.gradle.kts +++ b/packages/react-native-gradle-plugin/build.gradle.kts @@ -5,75 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import org.gradle.api.internal.classpath.ModuleRegistry -import org.gradle.api.tasks.testing.logging.TestExceptionFormat -import org.gradle.configurationcache.extensions.serviceOf -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { - alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.kotlin.jvm).apply(false) id("java-gradle-plugin") -} - -repositories { - google() - mavenCentral() -} - -gradlePlugin { - plugins { - create("react") { - id = "com.facebook.react" - implementationClass = "com.facebook.react.ReactPlugin" - } - } -} - -group = "com.facebook.react" - -dependencies { - implementation(gradleApi()) - - // The KGP/AGP version is defined by React Native Gradle plugin. - // Therefore we specify an implementation dep rather than a compileOnly. - implementation(libs.kotlin.gradle.plugin) - implementation(libs.android.gradle.plugin) - - implementation(libs.gson) - implementation(libs.guava) - implementation(libs.javapoet) - - testImplementation(libs.junit) - - testRuntimeOnly( - files( - serviceOf() - .getModule("gradle-tooling-api-builders") - .classpath - .asFiles - .first())) -} - -// We intentionally don't build for Java 17 as users will see a cryptic bytecode version -// error first. Instead we produce a Java 11-compatible Gradle Plugin, so that AGP can print their -// nice message showing that JDK 11 (or 17) is required first -java { targetCompatibility = JavaVersion.VERSION_11 } - -kotlin { jvmToolchain(17) } - -tasks.withType().configureEach { - kotlinOptions { - apiVersion = "1.5" - // See comment above on JDK 11 support - jvmTarget = "11" - } -} - -tasks.withType().configureEach { - testLogging { - exceptionFormat = TestExceptionFormat.FULL - showExceptions = true - showCauses = true - showStackTraces = true - } -} +} \ No newline at end of file diff --git a/packages/react-native-gradle-plugin/gradle/libs.versions.toml b/packages/react-native-gradle-plugin/gradle/libs.versions.toml index f2a1d2edab76..24a77d1f56d0 100644 --- a/packages/react-native-gradle-plugin/gradle/libs.versions.toml +++ b/packages/react-native-gradle-plugin/gradle/libs.versions.toml @@ -1,10 +1,10 @@ [versions] -agp = "8.1.1" +agp = "8.2.1" gson = "2.8.9" guava = "31.0.1-jre" javapoet = "1.13.0" junit = "4.13.2" -kotlin = "1.8.0" +kotlin = "1.9.22" [libraries] kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } diff --git a/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.jar b/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.jar index 7f93135c49b7..d64cd4917707 100644 Binary files a/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.jar and b/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.jar differ diff --git a/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.properties index d11cdd907dd9..2ea3535dc058 100644 --- a/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.properties +++ b/packages/react-native-gradle-plugin/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/packages/react-native-gradle-plugin/gradlew b/packages/react-native-gradle-plugin/gradlew index 0adc8e1a5321..1aa94a426907 100755 --- a/packages/react-native-gradle-plugin/gradlew +++ b/packages/react-native-gradle-plugin/gradlew @@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -202,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/packages/react-native-gradle-plugin/gradlew.bat b/packages/react-native-gradle-plugin/gradlew.bat index 6689b85beecd..7101f8e4676f 100644 --- a/packages/react-native-gradle-plugin/gradlew.bat +++ b/packages/react-native-gradle-plugin/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/packages/react-native-gradle-plugin/package.json b/packages/react-native-gradle-plugin/package.json index a1b8f3a2ce75..af928e7d875e 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.74.88", "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" @@ -25,9 +29,8 @@ "gradle", "gradlew", "gradlew.bat", - "src/main", - "README.md" - ], - "dependencies": {}, - "devDependencies": {} + "README.md", + "react-native-gradle-plugin", + "settings-plugin" + ] } diff --git a/packages/react-native-gradle-plugin/react-native-gradle-plugin/build.gradle.kts b/packages/react-native-gradle-plugin/react-native-gradle-plugin/build.gradle.kts new file mode 100644 index 000000000000..6e09a3e22a75 --- /dev/null +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/build.gradle.kts @@ -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. + */ + +import org.gradle.api.internal.classpath.ModuleRegistry +import org.gradle.api.tasks.testing.logging.TestExceptionFormat +import org.gradle.configurationcache.extensions.serviceOf +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.kotlin.jvm) + id("java-gradle-plugin") +} + +repositories { + google() + mavenCentral() +} + +gradlePlugin { + plugins { + create("react") { + id = "com.facebook.react" + implementationClass = "com.facebook.react.ReactPlugin" + } + create("reactrootproject") { + id = "com.facebook.react.rootproject" + implementationClass = "com.facebook.react.ReactRootProjectPlugin" + } + } +} + +group = "com.facebook.react" + +dependencies { + implementation(gradleApi()) + + // The KGP/AGP version is defined by React Native Gradle plugin. + // Therefore we specify an implementation dep rather than a compileOnly. + implementation(libs.kotlin.gradle.plugin) + implementation(libs.android.gradle.plugin) + + implementation(libs.gson) + implementation(libs.guava) + implementation(libs.javapoet) + + testImplementation(libs.junit) + + testRuntimeOnly( + files( + serviceOf() + .getModule("gradle-tooling-api-builders") + .classpath + .asFiles + .first())) +} + +// We intentionally don't build for Java 17 as users will see a cryptic bytecode version +// error first. Instead we produce a Java 11-compatible Gradle Plugin, so that AGP can print their +// nice message showing that JDK 11 (or 17) is required first +java { targetCompatibility = JavaVersion.VERSION_11 } + +kotlin { jvmToolchain(17) } + +tasks.withType().configureEach { + kotlinOptions { + apiVersion = "1.6" + // See comment above on JDK 11 support + jvmTarget = "11" + allWarningsAsErrors = true + } +} + +tasks.withType().configureEach { + testLogging { + exceptionFormat = TestExceptionFormat.FULL + showExceptions = true + showCauses = true + showStackTraces = true + } +} diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt similarity index 82% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt index 6ab11a38c079..2c5bea4099c5 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt @@ -12,8 +12,10 @@ 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.AgpConfiguratorUtils.configureNamespaceForLibraries import com.facebook.react.utils.BackwardCompatUtils.configureBackwardCompatibilityReactMap import com.facebook.react.utils.DependencyUtils.configureDependencies import com.facebook.react.utils.DependencyUtils.configureRepositories @@ -22,6 +24,7 @@ import com.facebook.react.utils.JdkConfiguratorUtils.configureJavaToolChains import com.facebook.react.utils.JsonUtils import com.facebook.react.utils.NdkConfiguratorUtils.configureReactNativeNdk import com.facebook.react.utils.ProjectUtils.needsCodegenFromPackageJson +import com.facebook.react.utils.ProjectUtils.shouldWarnIfNewArchFlagIsSetInPrealpha import com.facebook.react.utils.findPackageJsonFile import java.io.File import kotlin.system.exitProcess @@ -36,6 +39,7 @@ class ReactPlugin : Plugin { override fun apply(project: Project) { checkJvmVersion(project) val extension = project.extensions.create("react", ReactExtension::class.java, project) + checkIfNewArchFlagIsSet(project, extension) // We register a private extension on the rootProject so that project wide configs // like codegen config can be propagated from app project to libraries. @@ -64,9 +68,10 @@ class ReactPlugin : Plugin { } configureReactNativeNdk(project, extension) - configureBuildConfigFields(project, extension) + configureBuildConfigFieldsForApp(project, extension) configureDevPorts(project) configureBackwardCompatibilityReactMap(project) + configureJavaToolChains(project) project.extensions.getByType(AndroidComponentsExtension::class.java).apply { onVariants(selector().all()) { variant -> @@ -77,12 +82,11 @@ class ReactPlugin : Plugin { } // Library Only Configuration + configureBuildConfigFieldsForLibraries(project) + configureNamespaceForLibraries(project) project.pluginManager.withPlugin("com.android.library") { configureCodegen(project, extension, rootExtension, isLibrary = true) } - - // Library and App Configurations - configureJavaToolChains(project) } private fun checkJvmVersion(project: Project) { @@ -104,6 +108,23 @@ class ReactPlugin : Plugin { } } + private fun checkIfNewArchFlagIsSet(project: Project, extension: ReactExtension) { + if (project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) { + project.logger.warn( + """ + + ******************************************************************************** + + WARNING: This version of React Native is ignoring the `newArchEnabled` flag you set. Please set it to true or remove it to suppress this warning. + + + ******************************************************************************** + + """ + .trimIndent()) + } + } + /** This function sets up `react-native-codegen` in our Gradle plugin. */ @Suppress("UnstableApiUsage") private fun configureCodegen( @@ -140,6 +161,8 @@ class ReactPlugin : Plugin { val parsedPackageJson = packageJson?.let { JsonUtils.fromPackageJson(it) } val jsSrcsDirInPackageJson = parsedPackageJson?.codegenConfig?.jsSrcsDir + val includesGeneratedCode = + parsedPackageJson?.codegenConfig?.includesGeneratedCode ?: false if (jsSrcsDirInPackageJson != null) { it.jsRootDir.set(File(packageJson.parentFile, jsSrcsDirInPackageJson)) } else { @@ -147,7 +170,7 @@ class ReactPlugin : Plugin { } val needsCodegenFromPackageJson = project.needsCodegenFromPackageJson(rootExtension.root) - it.onlyIf { isLibrary || needsCodegenFromPackageJson } + it.onlyIf { (isLibrary || needsCodegenFromPackageJson) && !includesGeneratedCode } } // We create the task to generate Java code from schema. @@ -167,7 +190,11 @@ class ReactPlugin : Plugin { // Therefore, the appNeedsCodegen needs to be invoked inside this lambda. val needsCodegenFromPackageJson = project.needsCodegenFromPackageJson(rootExtension.root) - it.onlyIf { isLibrary || needsCodegenFromPackageJson } + val packageJson = findPackageJsonFile(project, rootExtension.root) + val parsedPackageJson = packageJson?.let { JsonUtils.fromPackageJson(it) } + val includesGeneratedCode = + parsedPackageJson?.codegenConfig?.includesGeneratedCode ?: false + it.onlyIf { (isLibrary || needsCodegenFromPackageJson) && !includesGeneratedCode } } // We update the android configuration to include the generated sources. diff --git a/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactRootProjectPlugin.kt b/packages/react-native-gradle-plugin/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/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-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt similarity index 98% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt index ed5551d0987f..b676d471b4c6 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt +++ b/packages/react-native-gradle-plugin/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 = 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 diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/internal/PrivateReactExtension.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/internal/PrivateReactExtension.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/internal/PrivateReactExtension.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/internal/PrivateReactExtension.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfig.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfig.kt similarity index 79% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfig.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfig.kt index 26d7f08d95d3..afd02bc06ab4 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfig.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfig.kt @@ -11,5 +11,6 @@ data class ModelCodegenConfig( val name: String?, val type: String?, val jsSrcsDir: String?, - val android: ModelCodegenConfigAndroid? + val android: ModelCodegenConfigAndroid?, + val includesGeneratedCode: Boolean?, ) diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfigAndroid.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfigAndroid.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfigAndroid.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelCodegenConfigAndroid.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelPackageJson.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelPackageJson.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelPackageJson.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/model/ModelPackageJson.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTask.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTask.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTask.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTask.kt similarity index 97% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTask.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTask.kt index 3c65387a4036..828a145b0076 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTask.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTask.kt @@ -67,6 +67,8 @@ abstract class GenerateCodegenSchemaTask : Exec() { .cliPath(workingDir), "--platform", "android", + "--exclude", + "NativeSampleTurboModule", generatedSchemaFile.get().asFile.cliPath(workingDir), jsRootDir.asFile.get().cliPath(workingDir), )) diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt similarity index 94% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt index ee680337af49..e3da9e4aa448 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareBoostTask.kt @@ -40,7 +40,7 @@ abstract class PrepareBoostTask : DefaultTask() { it.into(outputDir) } File(outputDir.asFile.get(), "boost").apply { - renameTo(File(this.parentFile, "boost_${boostVersion.get()}")) + renameTo(File(parentFile, "boost_${boostVersion.get()}")) } } } diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareGlogTask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareGlogTask.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareGlogTask.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareGlogTask.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareJSCTask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareJSCTask.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareJSCTask.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareJSCTask.kt diff --git a/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt new file mode 100644 index 000000000000..6b0739176830 --- /dev/null +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt @@ -0,0 +1,82 @@ +/* + * Copyright (c) Meta Platforms, Inc. 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.tasks.internal + +import com.facebook.react.tasks.internal.utils.PrefabPreprocessingEntry +import java.io.File +import javax.inject.Inject +import org.gradle.api.DefaultTask +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.FileSystemOperations +import org.gradle.api.file.RegularFile +import org.gradle.api.provider.ListProperty +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.OutputDirectory +import org.gradle.api.tasks.TaskAction + +/** + * A task that takes care of copying headers and filtering them so that can be consumed by the + * Prefab protocol. This task handles also the header prefixes. + * + * It currently filters out some of the Boost headers as they're not used by React Native and are + * resulting in bigger .aar (250Mb+). + * + * You should provide in input a list fo [PrefabPreprocessingEntry] that will be used by this task + * to do the necessary copy operations. + */ +abstract class PreparePrefabHeadersTask : DefaultTask() { + + @get:Input abstract val input: ListProperty + + @get:OutputDirectory abstract val outputDir: DirectoryProperty + + @get:Inject abstract val fs: FileSystemOperations + + @TaskAction + fun taskAction() { + input.get().forEach { (libraryName, pathToPrefixCouples) -> + val outputFolder: RegularFile = outputDir.file(libraryName).get() + pathToPrefixCouples.forEach { (headerPath, headerPrefix) -> + fs.copy { + it.from(headerPath) + it.include("**/*.h") + it.exclude("**/*.cpp") + it.exclude("**/*.txt") + // We don't want to copy all the boost headers as they are 250Mb+ + it.include("boost/config.hpp") + it.include("boost/config/**/*.hpp") + it.include("boost/core/*.hpp") + it.include("boost/detail/workaround.hpp") + it.include("boost/operators.hpp") + it.include("boost/preprocessor/**/*.hpp") + // Headers needed for exposing rrc_text and rrc_textinput + it.include("boost/container_hash/**/*.hpp") + it.include("boost/detail/**/*.hpp") + it.include("boost/intrusive/**/*.hpp") + it.include("boost/iterator/**/*.hpp") + it.include("boost/move/**/*.hpp") + it.include("boost/mpl/**/*.hpp") + it.include("boost/mp11/**/*.hpp") + it.include("boost/describe/**/*.hpp") + it.include("boost/preprocessor/**/*.hpp") + it.include("boost/type_traits/**/*.hpp") + it.include("boost/utility/**/*.hpp") + it.include("boost/detail/workaround.hpp") + it.include("boost/assert.hpp") + it.include("boost/static_assert.hpp") + it.include("boost/cstdint.hpp") + it.include("boost/operators.hpp") + it.include("boost/config.hpp") + it.include("boost/utility.hpp") + it.include("boost/version.hpp") + it.into(File(outputFolder.asFile, headerPrefix)) + } + } + } + } +} diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntry.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntry.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntry.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntry.kt diff --git a/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt new file mode 100644 index 000000000000..39344aac7716 --- /dev/null +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt @@ -0,0 +1,106 @@ +/* + * Copyright (c) Meta Platforms, Inc. 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.utils + +import com.android.build.api.variant.AndroidComponentsExtension +import com.android.build.gradle.LibraryExtension +import com.facebook.react.ReactExtension +import com.facebook.react.utils.ProjectUtils.isHermesEnabled +import com.facebook.react.utils.ProjectUtils.isNewArchEnabled +import java.io.File +import javax.xml.parsers.DocumentBuilder +import javax.xml.parsers.DocumentBuilderFactory +import org.gradle.api.Action +import org.gradle.api.Project +import org.gradle.api.plugins.AppliedPlugin +import org.w3c.dom.Element + +@Suppress("UnstableApiUsage") +internal object AgpConfiguratorUtils { + + fun configureBuildConfigFieldsForApp(project: Project, extension: ReactExtension) { + val action = + Action { + project.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> + ext.buildFeatures.buildConfig = true + ext.defaultConfig.buildConfigField( + "boolean", + "IS_NEW_ARCHITECTURE_ENABLED", + project.isNewArchEnabled(extension).toString()) + ext.defaultConfig.buildConfigField( + "boolean", "IS_HERMES_ENABLED", project.isHermesEnabled.toString()) + } + } + project.pluginManager.withPlugin("com.android.application", action) + 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 + + val action = + Action { + project.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> + ext.defaultConfig.resValue("integer", "react_native_dev_server_port", devServerPort) + } + } + + project.pluginManager.withPlugin("com.android.application", action) + project.pluginManager.withPlugin("com.android.library", action) + } + + fun configureNamespaceForLibraries(appProject: Project) { + appProject.rootProject.allprojects { subproject -> + subproject.pluginManager.withPlugin("com.android.library") { + subproject.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> + if (ext.namespace == null) { + val android = subproject.extensions.getByType(LibraryExtension::class.java) + val manifestFile = android.sourceSets.getByName("main").manifest.srcFile + + manifestFile + .takeIf { it.exists() } + ?.let { file -> + getPackageNameFromManifest(file)?.let { packageName -> + ext.namespace = packageName + } + } + } + } + } + } + } +} + +const val DEFAULT_DEV_SERVER_PORT = "8081" + +fun getPackageNameFromManifest(manifest: File): String? { + val factory: DocumentBuilderFactory = DocumentBuilderFactory.newInstance() + val builder: DocumentBuilder = factory.newDocumentBuilder() + + try { + val xmlDocument = builder.parse(manifest) + + val manifestElement = xmlDocument.getElementsByTagName("manifest").item(0) as? Element + val packageName = manifestElement?.getAttribute("package") + + return if (packageName.isNullOrEmpty()) null else packageName + } catch (e: Exception) { + return null + } +} diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/BackwardCompatUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/BackwardCompatUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/BackwardCompatUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/BackwardCompatUtils.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt similarity index 92% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt index eb91dc556343..aedd296d40ee 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt @@ -36,6 +36,12 @@ internal object DependencyUtils { repositories.mavenCentral { repo -> // We don't want to fetch JSC from Maven Central as there are older versions there. repo.content { it.excludeModule("org.webkit", "android-jsc") } + + // If the user provided a react.internal.mavenLocalRepo, do not attempt to load + // anything from Maven Central that is react related. + if (hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) { + repo.content { it.excludeGroup("com.facebook.react") } + } } // Android JSC is installed from npm mavenRepoFromURI(File(reactNativeDir, "../jsc-android/dist").toURI()) @@ -48,8 +54,7 @@ internal object DependencyUtils { /** * This method takes care of configuring the resolution strategy for both the app and all the 3rd * party libraries which are auto-linked. Specifically it takes care of: - * - Forcing the react-android/hermes-android/flipper-integration version to the one specified in - * the package.json + * - Forcing the react-android/hermes-android version to the one specified in the package.json * - Substituting `react-native` with `react-android` and `hermes-engine` with `hermes-android`. */ fun configureDependencies( @@ -71,7 +76,6 @@ internal object DependencyUtils { } configuration.resolutionStrategy.force( "${groupString}:react-android:${versionString}", - "${groupString}:flipper-integration:${versionString}", ) if (!(eachProject.findProperty(INTERNAL_USE_HERMES_NIGHTLY) as? String).toBoolean()) { // Contributors only: The hermes-engine version is forced only if the user has @@ -115,7 +119,7 @@ internal object DependencyUtils { fun readVersionAndGroupStrings(propertiesFile: File): Pair { val reactAndroidProperties = Properties() propertiesFile.inputStream().use { reactAndroidProperties.load(it) } - val versionStringFromFile = reactAndroidProperties[INTERNAL_VERSION_NAME] as? String ?: "" + val versionStringFromFile = (reactAndroidProperties[INTERNAL_VERSION_NAME] as? String).orEmpty() // If on a nightly, we need to fetch the -SNAPSHOT artifact from Sonatype. val versionString = if (versionStringFromFile.startsWith("0.0.0") || "-nightly-" in versionStringFromFile) { diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/FileUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/FileUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/FileUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/FileUtils.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JdkConfiguratorUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JdkConfiguratorUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JdkConfiguratorUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JdkConfiguratorUtils.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtils.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt similarity index 99% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt index 9434b5a3c52f..d24a9ee99021 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt @@ -102,6 +102,7 @@ internal object NdkConfiguratorUtils { "**/libreact_debug.so", "**/libreact_nativemodule_core.so", "**/libreact_newarchdefaults.so", + "**/libreact_cxxreactpackage.so", "**/libreact_render_componentregistry.so", "**/libreact_render_core.so", "**/libreact_render_debug.so", diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/Os.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/Os.kt similarity index 98% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/Os.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/Os.kt index 6b3fa4a3e88b..e00a793ca86d 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/Os.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/Os.kt @@ -40,6 +40,6 @@ internal object Os { if (isWindows()) { this.relativeTo(base).path } else { - this.absolutePath + absolutePath } } diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/ProjectUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/ProjectUtils.kt similarity index 86% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/ProjectUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/ProjectUtils.kt index bc04a48c4b40..62f4019ae33e 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/ProjectUtils.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/ProjectUtils.kt @@ -111,7 +111,22 @@ internal object ProjectUtils { return false } - val major = matchResult.groupValues[1].toInt() - return major > 0 && major < 1000 + val prerelease = matchResult.groupValues[4].toString() + return prerelease.contains("prealpha") } + + internal fun Project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension: ReactExtension): Boolean { + + val propertySetToFalse = + (this.hasPropertySetToFalse(NEW_ARCH_ENABLED)) || + (this.hasPropertySetToFalse(SCOPED_NEW_ARCH_ENABLED)) + + val shouldEnableNewArch = + shouldEnableNewArchForReactNativeVersion(this.reactNativeDir(extension)) + + return shouldEnableNewArch && propertySetToFalse + } + + internal fun Project.hasPropertySetToFalse(property: String): Boolean = + this.hasProperty(property) && this.property(property).toString().toBoolean() == false } diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PropertyUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PropertyUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PropertyUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PropertyUtils.kt diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/TaskUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/TaskUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/TaskUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/TaskUtils.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/TestReactExtension.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/TestReactExtension.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/TestReactExtension.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/TestReactExtension.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/BundleHermesCTaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/BundleHermesCTaskTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/BundleHermesCTaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/BundleHermesCTaskTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt similarity index 98% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt index 780710cce455..447c58aaa4cb 100644 --- a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt @@ -141,7 +141,7 @@ class GenerateCodegenArtifactsTaskTest { writeText( """ { - "name": "@a/libray", + "name": "@a/library", "codegenConfig": { "name": "an-awesome-library", "android": { @@ -174,7 +174,7 @@ class GenerateCodegenArtifactsTaskTest { writeText( """ { - "name": "@a/libray", + "name": "@a/library", "codegenConfig": { } } diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTaskTest.kt similarity index 97% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTaskTest.kt index b97c1b29a204..0d0f15992382 100644 --- a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTaskTest.kt +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenSchemaTaskTest.kt @@ -145,6 +145,8 @@ class GenerateCodegenSchemaTaskTest { File(codegenDir, "lib/cli/combine/combine-js-to-schema-cli.js").toString(), "--platform", "android", + "--exclude", + "NativeSampleTurboModule", File(outputDir, "schema.json").toString(), jsRootDir.toString(), ), @@ -180,6 +182,8 @@ class GenerateCodegenSchemaTaskTest { .path, "--platform", "android", + "--exclude", + "NativeSampleTurboModule", File(outputDir, "schema.json").relativeTo(project.projectDir).path, jsRootDir.relativeTo(project.projectDir).path, ), diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITaskTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITaskTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareBoostTaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareBoostTaskTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareBoostTaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareBoostTaskTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGlogTaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGlogTaskTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGlogTaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGlogTaskTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareJSCTaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareJSCTaskTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareJSCTaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareJSCTaskTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTaskTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTaskTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTaskTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTaskTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntryTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntryTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntryTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/utils/PrefabPreprocessingEntryTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/OsRule.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/OsRule.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/OsRule.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/OsRule.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/TaskTestUtils.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/TaskTestUtils.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/TaskTestUtils.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/TaskTestUtils.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/WithOs.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/WithOs.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/WithOs.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/WithOs.kt diff --git a/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/AgpConfiguratorUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/AgpConfiguratorUtilsTest.kt new file mode 100644 index 000000000000..1c9c07eb0b6f --- /dev/null +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/AgpConfiguratorUtilsTest.kt @@ -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. + */ + +package com.facebook.react.utils + +import java.io.File +import org.junit.Assert.* +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder + +class AgpConfiguratorUtilsTest { + + @get:Rule val tempFolder = TemporaryFolder() + + @Test + fun getPackageNameFromManifest_withEmptyFile_returnsNull() { + val mainFolder = tempFolder.newFolder("awesome-module/src/main/") + val manifest = File(mainFolder, "AndroidManifest.xml").apply { writeText("") } + + val actual = getPackageNameFromManifest(manifest) + assertNull(actual) + } + + @Test + fun getPackageNameFromManifest_withMissingPackage_returnsNull() { + val mainFolder = tempFolder.newFolder("awesome-module/src/main/") + val manifest = + File(mainFolder, "AndroidManifest.xml").apply { + writeText( + // language=xml + """ + + + """ + .trimIndent()) + } + + val actual = getPackageNameFromManifest(manifest) + assertNull(actual) + } + + @Test + fun getPackageNameFromManifest_withPackage_returnsPackage() { + val mainFolder = tempFolder.newFolder("awesome-module/src/main/") + val manifest = + File(mainFolder, "AndroidManifest.xml").apply { + writeText( + // language=xml + """ + + + """ + .trimIndent()) + } + + val actual = getPackageNameFromManifest(manifest) + assertNotNull(actual) + assertEquals("com.facebook.react", actual) + } +} diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/BackwardCompatUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/BackwardCompatUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/BackwardCompatUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/BackwardCompatUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/DependencyUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/DependencyUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/DependencyUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/DependencyUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/FileUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/FileUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/FileUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/FileUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/JsonUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/JsonUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/JsonUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/JsonUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/KotlinStdlibCompatUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/NdkConfiguratorUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/NdkConfiguratorUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/NdkConfiguratorUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/NdkConfiguratorUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/OsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/OsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/OsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/OsTest.kt diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/PathUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/PathUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/PathUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/PathUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/ProjectUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/ProjectUtilsTest.kt new file mode 100644 index 000000000000..6c87c88edac6 --- /dev/null +++ b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/ProjectUtilsTest.kt @@ -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. + */ + +package com.facebook.react.utils + +import com.facebook.react.TestReactExtension +import com.facebook.react.model.ModelCodegenConfig +import com.facebook.react.model.ModelPackageJson +import com.facebook.react.tests.createProject +import com.facebook.react.utils.ProjectUtils.getReactNativeArchitectures +import com.facebook.react.utils.ProjectUtils.isHermesEnabled +import com.facebook.react.utils.ProjectUtils.isNewArchEnabled +import com.facebook.react.utils.ProjectUtils.needsCodegenFromPackageJson +import com.facebook.react.utils.ProjectUtils.shouldWarnIfNewArchFlagIsSetInPrealpha +import java.io.File +import org.junit.Assert.* +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder + +class ProjectUtilsTest { + + @get:Rule val tempFolder = TemporaryFolder() + + @Test + fun isNewArchEnabled_returnsFalseByDefault() { + val project = createProject() + val extension = TestReactExtension(project) + assertFalse(createProject().isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withDisabled_returnsFalse() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "false") + val extension = TestReactExtension(project) + assertFalse(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withEnabled_returnsTrue() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "true") + val extension = TestReactExtension(project) + assertTrue(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withInvalid_returnsFalse() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "¯\\_(ツ)_/¯") + val extension = TestReactExtension(project) + assertFalse(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withRNVersion0_returnFalse() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.73.0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withRNVersionPrealpha_returnTrue() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-202310916" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertTrue(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withRNVersion1PrereleaseString_returnTrue() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "1.2.3-prealpha0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertTrue(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withRNVersion1PrereleaseStringDotNumber_returnTrue() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "1.2.3-prealpha.0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertTrue(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withRNVersion1PrereleaseStringDashNumber_returnTrue() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "1.2.3-prealpha-0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertTrue(project.isNewArchEnabled(extension)) + } + + @Test + fun isNewArchEnabled_withRNVersion1000_returnFalse() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "1000.0.0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.isNewArchEnabled(extension)) + } + + @Test + fun isHermesEnabled_returnsTrueByDefault() { + assertTrue(createProject().isHermesEnabled) + } + + @Test + fun isNewArchEnabled_withDisabledViaProperty_returnsFalse() { + val project = createProject() + project.extensions.extraProperties.set("hermesEnabled", "false") + assertFalse(project.isHermesEnabled) + } + + @Test + fun isHermesEnabled_withEnabledViaProperty_returnsTrue() { + val project = createProject() + project.extensions.extraProperties.set("hermesEnabled", "true") + assertTrue(project.isHermesEnabled) + } + + @Test + fun isHermesEnabled_withInvalidViaProperty_returnsTrue() { + val project = createProject() + project.extensions.extraProperties.set("hermesEnabled", "¯\\_(ツ)_/¯") + assertTrue(project.isHermesEnabled) + } + + @Test + fun isHermesEnabled_withDisabledViaExt_returnsFalse() { + val project = createProject() + val extMap = mapOf("enableHermes" to false) + project.extensions.extraProperties.set("react", extMap) + assertFalse(project.isHermesEnabled) + } + + @Test + fun isHermesEnabled_withEnabledViaExt_returnsTrue() { + val project = createProject() + val extMap = mapOf("enableHermes" to true) + project.extensions.extraProperties.set("react", extMap) + assertTrue(project.isHermesEnabled) + } + + @Test + fun isHermesEnabled_withDisabledViaExtAsString_returnsFalse() { + val project = createProject() + val extMap = mapOf("enableHermes" to "false") + project.extensions.extraProperties.set("react", extMap) + assertFalse(project.isHermesEnabled) + } + + @Test + fun isHermesEnabled_withInvalidViaExt_returnsTrue() { + val project = createProject() + val extMap = mapOf("enableHermes" to "¯\\_(ツ)_/¯") + project.extensions.extraProperties.set("react", extMap) + assertTrue(project.isHermesEnabled) + } + + @Test + fun needsCodegenFromPackageJson_withCodegenConfigInPackageJson_returnsTrue() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "name": "a-library", + "codegenConfig": {} + } + """ + .trimIndent()) + } + extension.root.set(tempFolder.root) + assertTrue(project.needsCodegenFromPackageJson(extension.root)) + } + + @Test + fun needsCodegenFromPackageJson_withMissingCodegenConfigInPackageJson_returnsFalse() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "name": "a-library" + } + """ + .trimIndent()) + } + extension.root.set(tempFolder.root) + assertFalse(project.needsCodegenFromPackageJson(extension.root)) + } + + @Test + fun needsCodegenFromPackageJson_withCodegenConfigInModel_returnsTrue() { + val project = createProject() + val model = ModelPackageJson("1000.0.0", ModelCodegenConfig(null, null, null, null, false)) + + assertTrue(project.needsCodegenFromPackageJson(model)) + } + + @Test + fun needsCodegenFromPackageJson_withMissingCodegenConfigInModel_returnsFalse() { + val project = createProject() + val model = ModelPackageJson("1000.0.0", null) + + assertFalse(project.needsCodegenFromPackageJson(model)) + } + + @Test + fun needsCodegenFromPackageJson_withMissingPackageJson_returnsFalse() { + val project = createProject() + val extension = TestReactExtension(project) + + assertFalse(project.needsCodegenFromPackageJson(extension.root)) + } + + @Test + fun getReactNativeArchitectures_withMissingProperty_returnsEmptyList() { + val project = createProject() + assertTrue(project.getReactNativeArchitectures().isEmpty()) + } + + @Test + fun getReactNativeArchitectures_withEmptyProperty_returnsEmptyList() { + val project = createProject() + project.extensions.extraProperties.set("reactNativeArchitectures", "") + assertTrue(project.getReactNativeArchitectures().isEmpty()) + } + + @Test + fun getReactNativeArchitectures_withSingleArch_returnsSingleton() { + val project = createProject() + project.extensions.extraProperties.set("reactNativeArchitectures", "x86") + + val archs = project.getReactNativeArchitectures() + assertEquals(1, archs.size) + assertEquals("x86", archs[0]) + } + + @Test + fun getReactNativeArchitectures_withMultipleArch_returnsList() { + val project = createProject() + project.extensions.extraProperties.set( + "reactNativeArchitectures", "armeabi-v7a,arm64-v8a,x86,x86_64") + + val archs = project.getReactNativeArchitectures() + assertEquals(4, archs.size) + assertEquals("armeabi-v7a", archs[0]) + assertEquals("arm64-v8a", archs[1]) + assertEquals("x86", archs[2]) + assertEquals("x86_64", archs[3]) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenNewArchIsSetToFalseAndOnPrealpha_returnTrue() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "false") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-2023100915" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertTrue(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenScopedNewArchIsSetToFalseAndOnPrealpha_returnTrue() { + val project = createProject() + project.extensions.extraProperties.set("react.newArchEnabled", "false") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-2023100915" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertTrue(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenBothAreSetToFalseAndOnPrealpha_returnTrue() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "false") + project.extensions.extraProperties.set("react.newArchEnabled", "false") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-2023100915" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertTrue(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenNewArchIsSetToTrueAndOnPrealpha_returnFalse() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "true") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-2023100915" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenScopedNewArchIsSetToTrueAndOnPrealpha_returnFalse() { + val project = createProject() + project.extensions.extraProperties.set("react.newArchEnabled", "true") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-2023100915" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenBothAreSetToTrueAndOnPrealpha_returnFalse() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "true") + project.extensions.extraProperties.set("react.newArchEnabled", "true") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-2023100915" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenNoneAreSetAndOnPrealpha_returnFalse() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.0.0-prealpha-2023100915" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenNewArchIsSetToTrueAndNotOnPrealpha_returnFalse() { + val project = createProject() + project.extensions.extraProperties.set("newxArchEnabled", "true") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.73.0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenScopedNewArchIsSetToTrueAndNotOnPrealpha_returnFalse() { + val project = createProject() + project.extensions.extraProperties.set("react.newxArchEnabled", "true") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.73.0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenBothAreSetToTrueAndNotOnPrealpha_returnFalse() { + val project = createProject() + project.extensions.extraProperties.set("newArchEnabled", "true") + project.extensions.extraProperties.set("react.newxArchEnabled", "true") + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.73.0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } + + @Test + fun shouldWarnIfNewArchFlagIsSetInPrealpha_whenNoneAreSetAndNotOnPrealpha_returnFalse() { + val project = createProject() + val extension = TestReactExtension(project) + File(tempFolder.root, "package.json").apply { + writeText( + // language=json + """ + { + "version": "0.73.0" + } + """ + .trimIndent()) + } + extension.reactNativeDir.set(tempFolder.root) + assertFalse(project.shouldWarnIfNewArchFlagIsSetInPrealpha(extension)) + } +} diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/TaskUtilsTest.kt b/packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/TaskUtilsTest.kt similarity index 100% rename from packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/TaskUtilsTest.kt rename to packages/react-native-gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/TaskUtilsTest.kt diff --git a/packages/react-native-gradle-plugin/settings-plugin/build.gradle.kts b/packages/react-native-gradle-plugin/settings-plugin/build.gradle.kts new file mode 100644 index 000000000000..dad34aaa9c4e --- /dev/null +++ b/packages/react-native-gradle-plugin/settings-plugin/build.gradle.kts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Meta Platforms, Inc. 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 org.gradle.api.tasks.testing.logging.TestExceptionFormat +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.kotlin.jvm) + id("java-gradle-plugin") +} + +repositories { + google() + mavenCentral() +} + +gradlePlugin { + plugins { + create("react.settings") { + id = "com.facebook.react.settings" + implementationClass = "com.facebook.react.ReactSettingsPlugin" + } + } +} + +group = "com.facebook.react" + +dependencies { + implementation(gradleApi()) +} + +// We intentionally don't build for Java 17 as users will see a cryptic bytecode version +// error first. Instead we produce a Java 11-compatible Gradle Plugin, so that AGP can print their +// nice message showing that JDK 11 (or 17) is required first +java { targetCompatibility = JavaVersion.VERSION_11 } + +kotlin { jvmToolchain(17) } + +tasks.withType().configureEach { + kotlinOptions { + apiVersion = "1.6" + // See comment above on JDK 11 support + jvmTarget = "11" + allWarningsAsErrors = true + } +} \ No newline at end of file diff --git a/packages/react-native-gradle-plugin/settings-plugin/src/main/kotlin/com/facebook/react/ReactSettingsPlugin.kt b/packages/react-native-gradle-plugin/settings-plugin/src/main/kotlin/com/facebook/react/ReactSettingsPlugin.kt new file mode 100644 index 000000000000..6e4da24d13f7 --- /dev/null +++ b/packages/react-native-gradle-plugin/settings-plugin/src/main/kotlin/com/facebook/react/ReactSettingsPlugin.kt @@ -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. + */ + +package com.facebook.react + +import org.gradle.api.Plugin +import org.gradle.api.initialization.Settings + +/** + * This is a stub of the com.facebook.react.settings plugin. + * + * The plugin got added in 0.75, but to make it easier for 0.74 users to upgrade to 0.75, we're + * creating a stub plugin that does nothing. This way, users can include a `id("com.facebook.react.settings")` + * in their settings.gradle file without causing a build failure on 0.74. + */ +class ReactSettingsPlugin : Plugin { + override fun apply(settings: Settings) { + // Do nothing, just register the plugin. + } +} \ No newline at end of file diff --git a/packages/react-native-gradle-plugin/settings.gradle.kts b/packages/react-native-gradle-plugin/settings.gradle.kts index 8a0ecaa26f44..b6492c8ad95e 100644 --- a/packages/react-native-gradle-plugin/settings.gradle.kts +++ b/packages/react-native-gradle-plugin/settings.gradle.kts @@ -15,4 +15,9 @@ pluginManagement { plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0") } -rootProject.name = "react-native-gradle-plugin" +include( + ":react-native-gradle-plugin", + ":settings-plugin", +) + +rootProject.name = "gradle-plugin-root" \ No newline at end of file diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareLibeventTask.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareLibeventTask.kt deleted file mode 100644 index fb00626557f3..000000000000 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PrepareLibeventTask.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. 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.tasks.internal - -import java.io.File -import org.gradle.api.DefaultTask -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* - -/** - * A task that takes care of extracting Libevent from a source folder/zip and preparing it to be - * consumed by the NDK. - */ -abstract class PrepareLibeventTask : DefaultTask() { - - @get:InputFiles abstract val libeventPath: ConfigurableFileCollection - - @get:Input abstract val libeventVersion: Property - - @get:OutputDirectory abstract val outputDir: DirectoryProperty - - @TaskAction - fun taskAction() { - project.copy { it -> - it.from(libeventPath) - it.from(project.file("src/main/jni/third-party/libevent/")) - it.include( - "libevent-${libeventVersion.get()}-stable/*.c", - "libevent-${libeventVersion.get()}-stable/*.h", - "libevent-${libeventVersion.get()}-stable/include/**/*", - "evconfig-private.h", - "event-config.h", - "CMakeLists.txt") - it.eachFile { it.path = it.path.removePrefix("libevent-${libeventVersion.get()}-stable/") } - it.includeEmptyDirs = false - it.into(outputDir) - } - File(outputDir.asFile.get(), "event-config.h").apply { - val destination = - File(this.parentFile, "include/event2/event-config.h").apply { parentFile.mkdirs() } - renameTo(destination) - } - } -} diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt deleted file mode 100644 index f3b55e091104..000000000000 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. 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.tasks.internal - -import com.facebook.react.tasks.internal.utils.PrefabPreprocessingEntry -import java.io.File -import javax.inject.Inject -import org.gradle.api.DefaultTask -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.FileSystemOperations -import org.gradle.api.file.RegularFile -import org.gradle.api.provider.ListProperty -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.OutputDirectory -import org.gradle.api.tasks.TaskAction - -/** - * A task that takes care of copying headers and filtering them so that can be consumed by the - * Prefab protocol. This task handles also the header prefixes. - * - * It currently filters out some of the Boost headers as they're not used by React Native and are - * resulting in bigger .aar (250Mb+). - * - * You should provide in input a list fo [PrefabPreprocessingEntry] that will be used by this task - * to do the necessary copy operations. - */ -abstract class PreparePrefabHeadersTask : DefaultTask() { - - @get:Input abstract val input: ListProperty - - @get:OutputDirectory abstract val outputDir: DirectoryProperty - - @get:Inject abstract val fs: FileSystemOperations - - @TaskAction - fun taskAction() { - input.get().forEach { (libraryName, pathToPrefixCouples) -> - val outputFolder: RegularFile = outputDir.file(libraryName).get() - pathToPrefixCouples.forEach { (headerPath, headerPrefix) -> - fs.copy { - it.from(headerPath) - it.include("**/*.h") - it.exclude("**/*.cpp") - it.exclude("**/*.txt") - // We don't want to copy all the boost headers as they are 250Mb+ - it.include("boost/config.hpp") - it.include("boost/config/**/*.hpp") - it.include("boost/core/*.hpp") - it.include("boost/detail/workaround.hpp") - it.include("boost/operators.hpp") - it.include("boost/preprocessor/**/*.hpp") - it.into(File(outputFolder.asFile, headerPrefix)) - } - } - } - } -} 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 deleted file mode 100644 index 0312095b0fe7..000000000000 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. 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.utils - -import com.android.build.api.variant.AndroidComponentsExtension -import com.facebook.react.ReactExtension -import com.facebook.react.utils.ProjectUtils.isHermesEnabled -import com.facebook.react.utils.ProjectUtils.isNewArchEnabled -import org.gradle.api.Action -import org.gradle.api.Project -import org.gradle.api.plugins.AppliedPlugin - -@Suppress("UnstableApiUsage") -internal object AgpConfiguratorUtils { - - fun configureBuildConfigFields(project: Project, extension: ReactExtension) { - val action = - Action { - project.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> - ext.buildFeatures.buildConfig = true - ext.defaultConfig.buildConfigField( - "boolean", - "IS_NEW_ARCHITECTURE_ENABLED", - project.isNewArchEnabled(extension).toString()) - ext.defaultConfig.buildConfigField( - "boolean", "IS_HERMES_ENABLED", project.isHermesEnabled.toString()) - } - } - project.pluginManager.withPlugin("com.android.application", action) - project.pluginManager.withPlugin("com.android.library", action) - } - - fun configureDevPorts(project: Project) { - val devServerPort = - project.properties["reactNativeDevServerPort"]?.toString() ?: DEFAULT_DEV_SERVER_PORT - val inspectorProxyPort = - project.properties["reactNativeInspectorProxyPort"]?.toString() ?: devServerPort - - val action = - Action { - project.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext -> - ext.defaultConfig.resValue("integer", "react_native_dev_server_port", devServerPort) - ext.defaultConfig.resValue( - "integer", "react_native_inspector_proxy_port", inspectorProxyPort) - } - } - - project.pluginManager.withPlugin("com.android.application", action) - project.pluginManager.withPlugin("com.android.library", action) - } -} - -const val DEFAULT_DEV_SERVER_PORT = "8081" diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareLibeventTaskTest.kt b/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareLibeventTaskTest.kt deleted file mode 100644 index f5085df947a4..000000000000 --- a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareLibeventTaskTest.kt +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. 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.tasks.internal - -import com.facebook.react.tests.createProject -import com.facebook.react.tests.createTestTask -import java.io.* -import org.junit.Assert.* -import org.junit.Rule -import org.junit.Test -import org.junit.rules.TemporaryFolder - -class PrepareLibeventTaskTest { - - @get:Rule val tempFolder = TemporaryFolder() - - @Test(expected = IllegalStateException::class) - fun prepareBoostTask_withMissingConfiguration_fails() { - val task = createTestTask() - - task.taskAction() - } - - @Test - fun prepareBoostTask_copiesCMakefile() { - val libeventPath = tempFolder.newFolder("libeventPath") - val output = tempFolder.newFolder("output") - val project = createProject() - val task = - createTestTask(project = project) { - it.libeventPath.setFrom(libeventPath) - it.libeventVersion.set("1.0.0") - it.outputDir.set(output) - } - File(project.projectDir, "src/main/jni/third-party/libevent/CMakeLists.txt").apply { - parentFile.mkdirs() - createNewFile() - } - task.taskAction() - - assertTrue(File(output, "CMakeLists.txt").exists()) - } - - @Test - fun prepareBoostTask_copiesConfigFiles() { - val libeventPath = tempFolder.newFolder("libeventPath") - val output = tempFolder.newFolder("output") - val project = createProject() - val task = - createTestTask(project = project) { - it.libeventPath.setFrom(libeventPath) - it.libeventVersion.set("1.0.0") - it.outputDir.set(output) - } - File(project.projectDir, "src/main/jni/third-party/libevent/event-config.h").apply { - parentFile.mkdirs() - createNewFile() - } - File(project.projectDir, "src/main/jni/third-party/libevent/evconfig-private.h").createNewFile() - - task.taskAction() - - assertTrue(File(output, "evconfig-private.h").exists()) - assertTrue(File(output, "include/event2/event-config.h").exists()) - } - - @Test - fun prepareBoostTask_copiesSourceFiles() { - val libeventPath = tempFolder.newFolder("libeventPath") - val output = tempFolder.newFolder("output") - val task = - createTestTask { - it.libeventPath.setFrom(libeventPath) - it.libeventVersion.set("1.0.0") - it.outputDir.set(output) - } - File(libeventPath, "libevent-1.0.0-stable/sample.c").apply { - parentFile.mkdirs() - createNewFile() - } - File(libeventPath, "libevent-1.0.0-stable/sample.h").apply { - parentFile.mkdirs() - createNewFile() - } - File(libeventPath, "libevent-1.0.0-stable/include/sample.h").apply { - parentFile.mkdirs() - createNewFile() - } - - task.taskAction() - - assertTrue(File(output, "sample.c").exists()) - assertTrue(File(output, "sample.h").exists()) - assertTrue(File(output, "include/sample.h").exists()) - } -} diff --git a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/ProjectUtilsTest.kt b/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/ProjectUtilsTest.kt deleted file mode 100644 index 3d8fd6e1d48b..000000000000 --- a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/ProjectUtilsTest.kt +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. 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.utils - -import com.facebook.react.TestReactExtension -import com.facebook.react.model.ModelCodegenConfig -import com.facebook.react.model.ModelPackageJson -import com.facebook.react.tests.createProject -import com.facebook.react.utils.ProjectUtils.getReactNativeArchitectures -import com.facebook.react.utils.ProjectUtils.isHermesEnabled -import com.facebook.react.utils.ProjectUtils.isNewArchEnabled -import com.facebook.react.utils.ProjectUtils.needsCodegenFromPackageJson -import java.io.File -import org.junit.Assert.* -import org.junit.Rule -import org.junit.Test -import org.junit.rules.TemporaryFolder - -class ProjectUtilsTest { - - @get:Rule val tempFolder = TemporaryFolder() - - @Test - fun isNewArchEnabled_returnsFalseByDefault() { - val project = createProject() - val extension = TestReactExtension(project) - assertFalse(createProject().isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withDisabled_returnsFalse() { - val project = createProject() - project.extensions.extraProperties.set("newArchEnabled", "false") - val extension = TestReactExtension(project) - assertFalse(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withEnabled_returnsTrue() { - val project = createProject() - project.extensions.extraProperties.set("newArchEnabled", "true") - val extension = TestReactExtension(project) - assertTrue(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withInvalid_returnsFalse() { - val project = createProject() - project.extensions.extraProperties.set("newArchEnabled", "¯\\_(ツ)_/¯") - val extension = TestReactExtension(project) - assertFalse(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withRNVersion0_returnFalse() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "version": "0.73.0" - } - """ - .trimIndent()) - } - extension.reactNativeDir.set(tempFolder.root) - assertFalse(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withRNVersion1_returnTrue() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "version": "1.2.3" - } - """ - .trimIndent()) - } - extension.reactNativeDir.set(tempFolder.root) - assertTrue(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withRNVersion1PrereleaseString_returnTrue() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "version": "1.2.3-prealpha0" - } - """ - .trimIndent()) - } - extension.reactNativeDir.set(tempFolder.root) - assertTrue(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withRNVersion1PrereleaseStringDotNumber_returnTrue() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "version": "1.2.3-prealpha.0" - } - """ - .trimIndent()) - } - extension.reactNativeDir.set(tempFolder.root) - assertTrue(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withRNVersion1PrereleaseStringDashNumber_returnTrue() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "version": "1.2.3-prealpha-0" - } - """ - .trimIndent()) - } - extension.reactNativeDir.set(tempFolder.root) - assertTrue(project.isNewArchEnabled(extension)) - } - - @Test - fun isNewArchEnabled_withRNVersion1000_returnFalse() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "version": "1000.0.0" - } - """ - .trimIndent()) - } - extension.reactNativeDir.set(tempFolder.root) - assertFalse(project.isNewArchEnabled(extension)) - } - - @Test - fun isHermesEnabled_returnsTrueByDefault() { - assertTrue(createProject().isHermesEnabled) - } - - @Test - fun isNewArchEnabled_withDisabledViaProperty_returnsFalse() { - val project = createProject() - project.extensions.extraProperties.set("hermesEnabled", "false") - assertFalse(project.isHermesEnabled) - } - - @Test - fun isHermesEnabled_withEnabledViaProperty_returnsTrue() { - val project = createProject() - project.extensions.extraProperties.set("hermesEnabled", "true") - assertTrue(project.isHermesEnabled) - } - - @Test - fun isHermesEnabled_withInvalidViaProperty_returnsTrue() { - val project = createProject() - project.extensions.extraProperties.set("hermesEnabled", "¯\\_(ツ)_/¯") - assertTrue(project.isHermesEnabled) - } - - @Test - fun isHermesEnabled_withDisabledViaExt_returnsFalse() { - val project = createProject() - val extMap = mapOf("enableHermes" to false) - project.extensions.extraProperties.set("react", extMap) - assertFalse(project.isHermesEnabled) - } - - @Test - fun isHermesEnabled_withEnabledViaExt_returnsTrue() { - val project = createProject() - val extMap = mapOf("enableHermes" to true) - project.extensions.extraProperties.set("react", extMap) - assertTrue(project.isHermesEnabled) - } - - @Test - fun isHermesEnabled_withDisabledViaExtAsString_returnsFalse() { - val project = createProject() - val extMap = mapOf("enableHermes" to "false") - project.extensions.extraProperties.set("react", extMap) - assertFalse(project.isHermesEnabled) - } - - @Test - fun isHermesEnabled_withInvalidViaExt_returnsTrue() { - val project = createProject() - val extMap = mapOf("enableHermes" to "¯\\_(ツ)_/¯") - project.extensions.extraProperties.set("react", extMap) - assertTrue(project.isHermesEnabled) - } - - @Test - fun needsCodegenFromPackageJson_withCodegenConfigInPackageJson_returnsTrue() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "name": "a-library", - "codegenConfig": {} - } - """ - .trimIndent()) - } - extension.root.set(tempFolder.root) - assertTrue(project.needsCodegenFromPackageJson(extension.root)) - } - - @Test - fun needsCodegenFromPackageJson_withMissingCodegenConfigInPackageJson_returnsFalse() { - val project = createProject() - val extension = TestReactExtension(project) - File(tempFolder.root, "package.json").apply { - writeText( - // language=json - """ - { - "name": "a-library" - } - """ - .trimIndent()) - } - extension.root.set(tempFolder.root) - assertFalse(project.needsCodegenFromPackageJson(extension.root)) - } - - @Test - fun needsCodegenFromPackageJson_withCodegenConfigInModel_returnsTrue() { - val project = createProject() - val model = ModelPackageJson("1000.0.0", ModelCodegenConfig(null, null, null, null)) - - assertTrue(project.needsCodegenFromPackageJson(model)) - } - - @Test - fun needsCodegenFromPackageJson_withMissingCodegenConfigInModel_returnsFalse() { - val project = createProject() - val model = ModelPackageJson("1000.0.0", null) - - assertFalse(project.needsCodegenFromPackageJson(model)) - } - - @Test - fun needsCodegenFromPackageJson_withMissingPackageJson_returnsFalse() { - val project = createProject() - val extension = TestReactExtension(project) - - assertFalse(project.needsCodegenFromPackageJson(extension.root)) - } - - @Test - fun getReactNativeArchitectures_withMissingProperty_returnsEmptyList() { - val project = createProject() - assertTrue(project.getReactNativeArchitectures().isEmpty()) - } - - @Test - fun getReactNativeArchitectures_withEmptyProperty_returnsEmptyList() { - val project = createProject() - project.extensions.extraProperties.set("reactNativeArchitectures", "") - assertTrue(project.getReactNativeArchitectures().isEmpty()) - } - - @Test - fun getReactNativeArchitectures_withSingleArch_returnsSingleton() { - val project = createProject() - project.extensions.extraProperties.set("reactNativeArchitectures", "x86") - - val archs = project.getReactNativeArchitectures() - assertEquals(1, archs.size) - assertEquals("x86", archs[0]) - } - - @Test - fun getReactNativeArchitectures_withMultipleArch_returnsList() { - val project = createProject() - project.extensions.extraProperties.set( - "reactNativeArchitectures", "armeabi-v7a,arm64-v8a,x86,x86_64") - - val archs = project.getReactNativeArchitectures() - assertEquals(4, archs.size) - assertEquals("armeabi-v7a", archs[0]) - assertEquals("arm64-v8a", archs[1]) - assertEquals("x86", archs[2]) - assertEquals("x86_64", archs[3]) - } -} diff --git a/packages/react-native-popup-menu-android/android/build.gradle.kts b/packages/react-native-popup-menu-android/android/build.gradle.kts new file mode 100644 index 000000000000..d861b977491e --- /dev/null +++ b/packages/react-native-popup-menu-android/android/build.gradle.kts @@ -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. + */ + +plugins { + id("com.facebook.react") + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + buildToolsVersion = libs.versions.buildTools.get() + namespace = "com.facebook.react.popupmenu" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { jvmTarget = "17" } +} + +dependencies { + // Build React Native from source + implementation(project(":packages:react-native:ReactAndroid")) +} diff --git a/packages/react-native-popup-menu-android/android/gradle.properties b/packages/react-native-popup-menu-android/android/gradle.properties new file mode 100644 index 000000000000..f436a7474fed --- /dev/null +++ b/packages/react-native-popup-menu-android/android/gradle.properties @@ -0,0 +1,3 @@ +# We want to have more fine grained control on the Java version for +# ReactAndroid, therefore we disable RGNP Java version alignment mechanism +react.internal.disableJavaVersionAlignment=true diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ComponentDescriptors.h b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ComponentDescriptors.h new file mode 100644 index 000000000000..af069cd67fc8 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ComponentDescriptors.h @@ -0,0 +1,20 @@ + +/** + * 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 "ShadowNodes.h" +#include + +namespace facebook::react { + +using AndroidPopupMenuComponentDescriptor = ConcreteComponentDescriptor; + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/EventEmitters.cpp b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/EventEmitters.cpp new file mode 100644 index 000000000000..0c18d59e3a63 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/EventEmitters.cpp @@ -0,0 +1,24 @@ + +/** + * 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 "EventEmitters.h" + + +namespace facebook::react { + +void AndroidPopupMenuEventEmitter::onSelectionChange(OnSelectionChange $event) const { + dispatchEvent("selectionChange", [$event=std::move($event)](jsi::Runtime &runtime) { + auto $payload = jsi::Object(runtime); + $payload.setProperty(runtime, "item", $event.item); + return $payload; + }); +} + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/EventEmitters.h b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/EventEmitters.h new file mode 100644 index 000000000000..a0387907710f --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/EventEmitters.h @@ -0,0 +1,25 @@ + +/** + * 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 + + +namespace facebook::react { +class AndroidPopupMenuEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnSelectionChange { + int item; + }; + void onSelectionChange(OnSelectionChange value) const; +}; +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/Props.cpp b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/Props.cpp new file mode 100644 index 000000000000..ddcdcff88ebf --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/Props.cpp @@ -0,0 +1,25 @@ + +/** + * 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 "Props.h" +#include +#include + +namespace facebook::react { + +AndroidPopupMenuProps::AndroidPopupMenuProps( + const PropsParserContext &context, + const AndroidPopupMenuProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + menuItems(convertRawProp(context, rawProps, "menuItems", sourceProps.menuItems, {})) + {} + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/Props.h b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/Props.h new file mode 100644 index 000000000000..191f0b15776b --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/Props.h @@ -0,0 +1,28 @@ + +/** + * 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 + +#include +#include +#include + +namespace facebook::react { + +class AndroidPopupMenuProps final : public ViewProps { + public: + AndroidPopupMenuProps() = default; + AndroidPopupMenuProps(const PropsParserContext& context, const AndroidPopupMenuProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::vector menuItems{}; +}; + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ShadowNodes.cpp b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ShadowNodes.cpp new file mode 100644 index 000000000000..5fd96dbbadaa --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ShadowNodes.cpp @@ -0,0 +1,17 @@ + +/** + * 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 "ShadowNodes.h" + +namespace facebook::react { + +extern const char AndroidPopupMenuComponentName[] = "AndroidPopupMenu"; + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ShadowNodes.h b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ShadowNodes.h new file mode 100644 index 000000000000..0fd9852b1bca --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/ShadowNodes.h @@ -0,0 +1,32 @@ + +/** + * 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 + +#include "EventEmitters.h" +#include "Props.h" +#include "States.h" +#include +#include + +namespace facebook::react { + +JSI_EXPORT extern const char AndroidPopupMenuComponentName[]; + +/* + * `ShadowNode` for component. + */ +using AndroidPopupMenuShadowNode = ConcreteViewShadowNode< + AndroidPopupMenuComponentName, + AndroidPopupMenuProps, + AndroidPopupMenuEventEmitter, + AndroidPopupMenuState>; + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/States.cpp b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/States.cpp new file mode 100644 index 000000000000..1dbb184cbddb --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/States.cpp @@ -0,0 +1,16 @@ + +/** + * 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 "States.h" + +namespace facebook::react { + + + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/States.h b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/States.h new file mode 100644 index 000000000000..62c048033b70 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/jni/react/renderer/components/ReactPopupMenuAndroidSpecs/States.h @@ -0,0 +1,34 @@ +/** + * 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::react { + +class AndroidPopupMenuState { +public: + AndroidPopupMenuState() = default; + +#ifdef ANDROID + AndroidPopupMenuState(AndroidPopupMenuState const &previousState, folly::dynamic data){}; + folly::dynamic getDynamic() const { + return {}; + }; + MapBuffer getMapBuffer() const { + return MapBufferBuilder::EMPTY(); + }; +#endif +}; + +} // namespace facebook::react diff --git a/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/PopupMenuPackage.kt b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/PopupMenuPackage.kt new file mode 100644 index 000000000000..0a351d28643e --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/PopupMenuPackage.kt @@ -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. + */ + +package com.facebook.react.popupmenu + +import com.facebook.react.BaseReactPackage +import com.facebook.react.ViewManagerOnDemandReactPackage +import com.facebook.react.bridge.ModuleSpec +import com.facebook.react.bridge.NativeModule +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.module.annotations.ReactModuleList +import com.facebook.react.module.model.ReactModuleInfoProvider +import com.facebook.react.uimanager.ViewManager + +@ReactModuleList(nativeModules = arrayOf()) +class PopupMenuPackage() : BaseReactPackage(), ViewManagerOnDemandReactPackage { + private var viewManagersMap: Map? = null + + override fun getModule(name: String, context: ReactApplicationContext): NativeModule? { + return null + } + + private fun getViewManagersMap(): Map { + val viewManagers = + viewManagersMap + ?: mapOf( + ReactPopupMenuManager.REACT_CLASS to + ModuleSpec.viewManagerSpec({ ReactPopupMenuManager() })) + viewManagersMap = viewManagers + return viewManagers + } + + protected override fun getViewManagers(context: ReactApplicationContext): List { + return ArrayList(getViewManagersMap().values) + } + + override fun getViewManagerNames(context: ReactApplicationContext): Collection { + return getViewManagersMap().keys + } + + override fun createViewManager( + reactContext: ReactApplicationContext, + viewManagerName: String + ): ViewManager<*, *>? { + val spec: ModuleSpec? = getViewManagersMap().get(viewManagerName) + return if (spec != null) (spec.getProvider().get() as ViewManager<*, *>) else null + } + + override fun getReactModuleInfoProvider(): ReactModuleInfoProvider { + return ReactModuleInfoProvider { emptyMap() } + } +} diff --git a/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/PopupMenuSelectionEvent.kt b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/PopupMenuSelectionEvent.kt new file mode 100644 index 000000000000..289b70d566c8 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/PopupMenuSelectionEvent.kt @@ -0,0 +1,36 @@ +/* + * Copyright (c) Meta Platforms, Inc. 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.popupmenu + +import com.facebook.react.bridge.Arguments +import com.facebook.react.bridge.WritableMap +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +public class PopupMenuSelectionEvent(surfaceId: Int, viewId: Int, private val item: Int) : + Event(surfaceId, viewId) { + + override fun getEventName(): String { + return EVENT_NAME + } + + override fun getEventData(): WritableMap { + val eventData: WritableMap = Arguments.createMap() + eventData.putInt("target", viewTag) + eventData.putDouble("item", item.toDouble()) + return eventData + } + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + rctEventEmitter.receiveEvent(viewTag, eventName, eventData) + } + + public companion object { + public const val EVENT_NAME: String = "topSelectionChange" + } +} diff --git a/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/ReactPopupMenuContainer.kt b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/ReactPopupMenuContainer.kt new file mode 100644 index 000000000000..6be3bfc916d0 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/ReactPopupMenuContainer.kt @@ -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. + */ + +package com.facebook.react.popupmenu + +import android.content.Context +import android.os.Build +import android.view.Menu +import android.widget.FrameLayout +import android.widget.PopupMenu +import com.facebook.react.bridge.ReactContext +import com.facebook.react.bridge.ReadableArray +import com.facebook.react.uimanager.UIManagerHelper + +public class ReactPopupMenuContainer(context: Context) : FrameLayout(context) { + private var menuItems: ReadableArray? = null + + public fun setMenuItems(items: ReadableArray?) { + menuItems = items + } + + public fun showPopupMenu() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + val view = getChildAt(0) + val popupMenu = PopupMenu(context, view) + var menu = popupMenu.menu + val items = menuItems + if (items != null) { + for (i in 0 until items.size()) { + menu.add(Menu.NONE, Menu.NONE, i, items.getString(i)) + } + } + popupMenu.setOnMenuItemClickListener { menuItem -> + val reactContext = context as ReactContext + val eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(reactContext, id) + if (eventDispatcher != null) { + val surfaceId = UIManagerHelper.getSurfaceId(reactContext) + eventDispatcher.dispatchEvent(PopupMenuSelectionEvent(surfaceId, id, menuItem.order)) + } + true + } + popupMenu.show() + } + } +} diff --git a/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/ReactPopupMenuManager.kt b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/ReactPopupMenuManager.kt new file mode 100644 index 000000000000..3758f154c874 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/popupmenu/ReactPopupMenuManager.kt @@ -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. + */ + +package com.facebook.react.popupmenu + +import com.facebook.react.bridge.ReadableArray +import com.facebook.react.module.annotations.ReactModule +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.ViewGroupManager +import com.facebook.react.uimanager.annotations.ReactProp +import com.facebook.react.viewmanagers.AndroidPopupMenuManagerInterface + +@ReactModule(name = ReactPopupMenuManager.REACT_CLASS) +public class ReactPopupMenuManager : + ViewGroupManager(), + AndroidPopupMenuManagerInterface { + override fun createViewInstance(reactContext: ThemedReactContext): ReactPopupMenuContainer { + return ReactPopupMenuContainer(reactContext) + } + + @ReactProp(name = "menuItems") + override fun setMenuItems(view: ReactPopupMenuContainer, menuItems: ReadableArray?) { + view.setMenuItems(menuItems) + } + + override fun getName(): String { + return REACT_CLASS + } + + override fun receiveCommand( + view: ReactPopupMenuContainer, + commandId: String, + items: ReadableArray? + ) { + when (commandId) { + "show" -> show(view) + else -> { + // no-op + } + } + } + + override fun show(popupMenu: ReactPopupMenuContainer) { + popupMenu.showPopupMenu() + } + + public companion object { + public const val REACT_CLASS: String = "AndroidPopupMenu" + } +} diff --git a/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/viewmanagers/AndroidPopupMenuManagerDelegate.java b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/viewmanagers/AndroidPopupMenuManagerDelegate.java new file mode 100644 index 000000000000..736b778e5948 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/viewmanagers/AndroidPopupMenuManagerDelegate.java @@ -0,0 +1,41 @@ +/** +* 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 com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.uimanager.BaseViewManagerDelegate; +import com.facebook.react.uimanager.BaseViewManagerInterface; + +public class AndroidPopupMenuManagerDelegate & AndroidPopupMenuManagerInterface> extends BaseViewManagerDelegate { + public AndroidPopupMenuManagerDelegate(U viewManager) { + super(viewManager); + } + @Override + public void setProperty(T view, String propName, @Nullable Object value) { + switch (propName) { + case "menuItems": + mViewManager.setMenuItems(view, (ReadableArray) value); + break; + default: + super.setProperty(view, propName, value); + } + } + + @Override + public void receiveCommand(T view, String commandName, ReadableArray args) { + switch (commandName) { + case "show": + mViewManager.show(view); + break; + } + } +} diff --git a/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/viewmanagers/AndroidPopupMenuManagerInterface.java b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/viewmanagers/AndroidPopupMenuManagerInterface.java new file mode 100644 index 000000000000..83e94ab5e295 --- /dev/null +++ b/packages/react-native-popup-menu-android/android/src/main/java/com/facebook/react/viewmanagers/AndroidPopupMenuManagerInterface.java @@ -0,0 +1,19 @@ +/** +* 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 com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; +import com.facebook.react.bridge.ReadableArray; + +public interface AndroidPopupMenuManagerInterface { + void setMenuItems(T view, @Nullable ReadableArray value); + void show(T view); +} diff --git a/packages/react-native-popup-menu-android/index.d.ts b/packages/react-native-popup-menu-android/index.d.ts new file mode 100644 index 000000000000..9539572f1727 --- /dev/null +++ b/packages/react-native-popup-menu-android/index.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. + * + * @format + */ + +export type {default} from './js/PopupMenuAndroid'; +export type {PopupMenuAndroidInstance} from './js/PopupMenuAndroid'; diff --git a/packages/react-native-popup-menu-android/index.js b/packages/react-native-popup-menu-android/index.js new file mode 100644 index 000000000000..f433cc133138 --- /dev/null +++ b/packages/react-native-popup-menu-android/index.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 + */ + +export {default} from './js/PopupMenuAndroid'; +export type {PopupMenuAndroidInstance} from './js/PopupMenuAndroid'; diff --git a/packages/react-native-popup-menu-android/js/PopupMenuAndroid.android.js b/packages/react-native-popup-menu-android/js/PopupMenuAndroid.android.js new file mode 100644 index 000000000000..b97d45cb5a47 --- /dev/null +++ b/packages/react-native-popup-menu-android/js/PopupMenuAndroid.android.js @@ -0,0 +1,69 @@ +/** + * Copyright (c) Meta Platforms, Inc. and 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 + */ + +import type {RefObject} from 'react'; +import type {HostComponent} from 'react-native'; +import type {SyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes'; + +import PopupMenuAndroidNativeComponent, { + Commands, +} from './PopupMenuAndroidNativeComponent.android'; +import nullthrows from 'nullthrows'; +import * as React from 'react'; +import {useCallback, useImperativeHandle, useRef} from 'react'; + +type PopupMenuSelectionEvent = SyntheticEvent< + $ReadOnly<{ + item: number, + }>, +>; + +export type PopupMenuAndroidInstance = { + +show: () => void, +}; + +type Props = { + menuItems: $ReadOnlyArray, + onSelectionChange: number => void, + children: React.Node, + instanceRef: RefObject, +}; + +export default function PopupMenuAndroid({ + menuItems, + onSelectionChange, + children, + instanceRef, +}: Props): React.Node { + const nativeRef = useRef> | null>(null); + const _onSelectionChange = useCallback( + (event: PopupMenuSelectionEvent) => { + onSelectionChange(event.nativeEvent.item); + }, + [onSelectionChange], + ); + + useImperativeHandle(instanceRef, ItemViewabilityInstance => { + return { + show() { + Commands.show(nullthrows(nativeRef.current)); + }, + }; + }); + + return ( + + {children} + + ); +} diff --git a/packages/react-native-popup-menu-android/js/PopupMenuAndroid.d.ts b/packages/react-native-popup-menu-android/js/PopupMenuAndroid.d.ts new file mode 100644 index 000000000000..8eab4875f383 --- /dev/null +++ b/packages/react-native-popup-menu-android/js/PopupMenuAndroid.d.ts @@ -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. + * + * @format + */ + +import type * as React from 'react'; +import {HostComponent} from 'react-native'; + +type PopupMenuAndroidInstance = { + show: () => void; +}; + +type Props = { + menuItems: Array; + onSelectionChange: (number) => void; + children: React.ReactNode | undefined; + instanceRef: React.ElementRef>; +}; + +declare class PopupMenuAndroid extends React.Component {} diff --git a/packages/react-native-popup-menu-android/js/PopupMenuAndroid.js b/packages/react-native-popup-menu-android/js/PopupMenuAndroid.js new file mode 100644 index 000000000000..1331d32bd297 --- /dev/null +++ b/packages/react-native-popup-menu-android/js/PopupMenuAndroid.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 + * @flow strict-local + */ + +import type {RefObject} from 'react'; +import type {Node} from 'react'; + +import * as React from 'react'; +import {StyleSheet, View} from 'react-native'; + +/** + * Common implementation for a simple stubbed view. Simply applies the view's styles to the inner + * View component and renders its children. + */ +class UnimplementedView extends React.Component<{children: Node}> { + render(): React.Node { + return ( + {this.props.children} + ); + } +} + +const styles = StyleSheet.create({ + unimplementedView: __DEV__ + ? { + alignSelf: 'flex-start', + borderColor: 'red', + borderWidth: 1, + } + : {}, +}); + +export type PopupMenuAndroidInstance = { + +show: () => void, +}; + +type Props = { + menuItems: $ReadOnlyArray, + onSelectionChange: number => void, + children: Node, + instanceRef: RefObject, +}; + +function PopupMenuAndroid(props: Props): Node { + return {props.children}; +} + +export default PopupMenuAndroid; diff --git a/packages/react-native-popup-menu-android/js/PopupMenuAndroidNativeComponent.android.js b/packages/react-native-popup-menu-android/js/PopupMenuAndroidNativeComponent.android.js new file mode 100644 index 000000000000..7558d75415bf --- /dev/null +++ b/packages/react-native-popup-menu-android/js/PopupMenuAndroidNativeComponent.android.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. + * + * @flow strict-local + * @format + */ + +import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type { + DirectEventHandler, + Int32, +} from 'react-native/Libraries/Types/CodegenTypes'; + +import * as React from 'react'; +import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + +type PopupMenuSelectionEvent = $ReadOnly<{ + item: Int32, +}>; + +type NativeProps = $ReadOnly<{ + ...ViewProps, + + //Props + menuItems?: ?$ReadOnlyArray, + + onSelectionChange?: DirectEventHandler, +}>; + +type ComponentType = HostComponent; + +interface NativeCommands { + +show: (viewRef: React.ElementRef) => void; +} + +export const Commands: NativeCommands = codegenNativeCommands({ + supportedCommands: ['show'], +}); + +export default (codegenNativeComponent( + 'AndroidPopupMenu', +): HostComponent); diff --git a/packages/react-native-popup-menu-android/package.json b/packages/react-native-popup-menu-android/package.json new file mode 100644 index 000000000000..2d968ab3283e --- /dev/null +++ b/packages/react-native-popup-menu-android/package.json @@ -0,0 +1,47 @@ +{ + "name": "@react-native/popup-menu-android", + "version": "0.74.88", + "description": "PopupMenu for the Android platform", + "main": "index.js", + "files": [ + "js", + "android", + "!android/build", + "!**/__tests__", + "!**/__fixtures__", + "!**/__mocks__" + ], + "keywords": [ + "react-native", + "android" + ], + "license": "MIT", + "devDependencies": { + "@react-native/codegen": "0.74.88" + }, + "peerDependencies": { + "@types/react": "^18.2.6", + "react": "*", + "react-native": "*" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "dependencies": { + "nullthrows": "^1.1.1" + }, + "codegenConfig": { + "name": "ReactPopupMenuAndroidSpecs", + "type": "components", + "jsSrcsDir": "js", + "outputDir": { + "android": "android" + }, + "includesGeneratedCode": true, + "android": { + "javaPackageName": "com.facebook.react.viewmanagers" + } + } +} diff --git a/packages/react-native-test-renderer/babel.config.js b/packages/react-native-test-renderer/babel.config.js new file mode 100644 index 000000000000..7cd251d78259 --- /dev/null +++ b/packages/react-native-test-renderer/babel.config.js @@ -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. + * + * @flow strict-local + * @format + */ + +module.exports = { + presets: [ + ['@babel/preset-env', {targets: {node: 'current'}}], + '@babel/preset-flow', + ], + plugins: ['@babel/plugin-transform-react-jsx'], +}; diff --git a/packages/react-native-test-renderer/jest.config.js b/packages/react-native-test-renderer/jest.config.js new file mode 100644 index 000000000000..d1c17f8cc89c --- /dev/null +++ b/packages/react-native-test-renderer/jest.config.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'; + +module.exports = { + haste: { + defaultPlatform: 'ios', + platforms: ['android', 'ios', 'native'], + }, + transform: { + '^.+\\.(js|ts|tsx)$': 'babel-jest', + }, + transformIgnorePatterns: [ + 'node_modules/(?!((jest-)?react-native|@react-native(-community)?)/)', + ], + setupFilesAfterEnv: ['./src/jest/setup-files-after-env'], + testEnvironment: './src/jest/environment', +}; diff --git a/packages/react-native-test-renderer/package.json b/packages/react-native-test-renderer/package.json new file mode 100644 index 000000000000..4de16e8c3ed1 --- /dev/null +++ b/packages/react-native-test-renderer/package.json @@ -0,0 +1,18 @@ +{ + "name": "@react-native/test-renderer", + "private": true, + "version": "0.74.88", + "description": "A Test rendering library for React Native", + "license": "MIT", + "devDependencies": { + "@babel/core": "^7.20.0", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/preset-env": "^7.20.0", + "@babel/preset-flow": "^7.20.0" + }, + "dependencies": {}, + "main": "src/index.js", + "peerDependencies": { + "jest": "^29.7.0" + } +} diff --git a/packages/react-native-test-renderer/src/index.js b/packages/react-native-test-renderer/src/index.js new file mode 100644 index 000000000000..4317334b5625 --- /dev/null +++ b/packages/react-native-test-renderer/src/index.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) Meta Platforms, Inc. 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 + * @oncall react_native + */ + +export {render} from './renderer/index.js'; + +export {ReactNativeEnvironment} from './jest/environment.js'; diff --git a/packages/react-native-test-renderer/src/jest/environment.js b/packages/react-native-test-renderer/src/jest/environment.js new file mode 100644 index 000000000000..166bba2c2140 --- /dev/null +++ b/packages/react-native-test-renderer/src/jest/environment.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'; + +const NodeEnv = require('jest-environment-node').TestEnvironment; + +module.exports = class ReactNativeEnvironment extends NodeEnv { + customExportConditions = ['require', 'react-native']; + + constructor(config, context) { + super(config, context); + } + + async setup() { + await super.setup(); + this.assignGlobals(); + this.initializeTurboModuleRegistry(); + } + + assignGlobals() { + Object.defineProperties(this.global, { + __DEV__: { + configurable: true, + enumerable: true, + value: true, + writable: true, + }, + }); + this.global.IS_REACT_ACT_ENVIRONMENT = true; + } + + initializeTurboModuleRegistry() { + const dims = {width: 100, height: 100, scale: 1, fontScale: 1}; + const DIMS = { + screen: { + ...dims, + }, + window: { + ...dims, + }, + }; + this.global.nativeModuleProxy = name => ({})[name]; + this.global.__turboModuleProxy = name => + ({ + SourceCode: {getConstants: () => ({scriptURL: ''})}, + WebSocketModule: {connect: () => {}}, + FileReaderModule: {}, + AppState: {getConstants: () => ({}), getCurrentAppState: () => ({})}, + DeviceInfo: {getConstants: () => ({Dimensions: DIMS})}, + UIManager: {getConstants: () => ({})}, + Timing: {}, + DevSettings: {}, + PlatformConstants: { + getConstants: () => ({reactNativeVersion: '1000.0.0'}), + }, + Networking: {}, + ImageLoader: {}, + NativePerformanceCxx: {}, + NativePerformanceObserverCxx: {}, + LogBox: {}, + SettingsManager: { + getConstants: () => ({settings: {}}), + }, + LinkingManager: {}, + I18n: {getConstants: () => ({})}, + })[name]; + } +}; diff --git a/packages/react-native-test-renderer/src/jest/setup-files-after-env.js b/packages/react-native-test-renderer/src/jest/setup-files-after-env.js new file mode 100644 index 000000000000..6dc49eedab97 --- /dev/null +++ b/packages/react-native-test-renderer/src/jest/setup-files-after-env.js @@ -0,0 +1,222 @@ +/** + * Copyright (c) Meta Platforms, Inc. and 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'; + +jest.requireActual('@react-native/js-polyfills/error-guard'); + +jest + .mock('react-native/Libraries/ReactNative/UIManager', () => ({ + AndroidViewPager: { + Commands: { + setPage: jest.fn(), + setPageWithoutAnimation: jest.fn(), + }, + }, + blur: jest.fn(), + createView: jest.fn(), + customBubblingEventTypes: {}, + customDirectEventTypes: {}, + getConstants: () => ({ + ViewManagerNames: [], + }), + getDefaultEventTypes: jest.fn(), + dispatchViewManagerCommand: jest.fn(), + focus: jest.fn(), + getViewManagerConfig: jest.fn(name => { + if (name === 'AndroidDrawerLayout') { + return { + Constants: { + DrawerPosition: { + Left: 10, + }, + }, + }; + } + + return {NativeProps: {}}; + }), + hasViewManagerConfig: jest.fn(name => { + return name === 'AndroidDrawerLayout'; + }), + measure: jest.fn(), + manageChildren: jest.fn(), + removeSubviewsFromContainerWithID: jest.fn(), + replaceExistingNonRootView: jest.fn(), + setChildren: jest.fn(), + updateView: jest.fn(), + AndroidDrawerLayout: { + Constants: { + DrawerPosition: { + Left: 10, + }, + }, + }, + AndroidTextInput: { + Commands: {}, + }, + ScrollView: { + Constants: {}, + }, + View: { + Constants: {}, + }, + })) + // Mock modules defined by the native layer (ex: Objective-C, Java) + .mock('react-native/Libraries/BatchedBridge/NativeModules', () => ({ + AlertManager: { + alertWithArgs: jest.fn(), + }, + AsyncLocalStorage: { + multiGet: jest.fn((keys, callback) => + process.nextTick(() => callback(null, [])), + ), + multiSet: jest.fn((entries, callback) => + process.nextTick(() => callback(null)), + ), + multiRemove: jest.fn((keys, callback) => + process.nextTick(() => callback(null)), + ), + multiMerge: jest.fn((entries, callback) => + process.nextTick(() => callback(null)), + ), + clear: jest.fn(callback => process.nextTick(() => callback(null))), + getAllKeys: jest.fn(callback => + process.nextTick(() => callback(null, [])), + ), + }, + DeviceInfo: { + getConstants() { + return { + Dimensions: { + window: { + fontScale: 2, + height: 1334, + scale: 2, + width: 750, + }, + screen: { + fontScale: 2, + height: 1334, + scale: 2, + width: 750, + }, + }, + }; + }, + }, + DevSettings: { + addMenuItem: jest.fn(), + reload: jest.fn(), + }, + ImageLoader: { + getSize: jest.fn(url => Promise.resolve([320, 240])), + prefetchImage: jest.fn(), + }, + ImageViewManager: { + getSize: jest.fn((uri, success) => + process.nextTick(() => success(320, 240)), + ), + prefetchImage: jest.fn(), + }, + KeyboardObserver: { + addListener: jest.fn(), + removeListeners: jest.fn(), + }, + Networking: { + sendRequest: jest.fn(), + abortRequest: jest.fn(), + addListener: jest.fn(), + removeListeners: jest.fn(), + }, + PlatformConstants: { + getConstants() { + return { + reactNativeVersion: { + major: 1000, + minor: 0, + patch: 0, + }, + }; + }, + }, + PushNotificationManager: { + presentLocalNotification: jest.fn(), + scheduleLocalNotification: jest.fn(), + cancelAllLocalNotifications: jest.fn(), + removeAllDeliveredNotifications: jest.fn(), + getDeliveredNotifications: jest.fn(callback => + process.nextTick(() => []), + ), + removeDeliveredNotifications: jest.fn(), + setApplicationIconBadgeNumber: jest.fn(), + getApplicationIconBadgeNumber: jest.fn(callback => + process.nextTick(() => callback(0)), + ), + cancelLocalNotifications: jest.fn(), + getScheduledLocalNotifications: jest.fn(callback => + process.nextTick(() => callback()), + ), + requestPermissions: jest.fn(() => + Promise.resolve({alert: true, badge: true, sound: true}), + ), + abandonPermissions: jest.fn(), + checkPermissions: jest.fn(callback => + process.nextTick(() => + callback({alert: true, badge: true, sound: true}), + ), + ), + getInitialNotification: jest.fn(() => Promise.resolve(null)), + addListener: jest.fn(), + removeListeners: jest.fn(), + }, + StatusBarManager: { + setColor: jest.fn(), + setStyle: jest.fn(), + setHidden: jest.fn(), + setNetworkActivityIndicatorVisible: jest.fn(), + setBackgroundColor: jest.fn(), + setTranslucent: jest.fn(), + getConstants: () => ({ + HEIGHT: 42, + }), + }, + Timing: { + createTimer: jest.fn(), + deleteTimer: jest.fn(), + }, + UIManager: {}, + BlobModule: { + getConstants: () => ({BLOB_URI_SCHEME: 'content', BLOB_URI_HOST: null}), + addNetworkingHandler: jest.fn(), + enableBlobSupport: jest.fn(), + disableBlobSupport: jest.fn(), + createFromParts: jest.fn(), + sendBlob: jest.fn(), + release: jest.fn(), + }, + WebSocketModule: { + connect: jest.fn(), + send: jest.fn(), + sendBinary: jest.fn(), + ping: jest.fn(), + close: jest.fn(), + addListener: jest.fn(), + removeListeners: jest.fn(), + }, + I18nManager: { + allowRTL: jest.fn(), + forceRTL: jest.fn(), + swapLeftAndRightInRTL: jest.fn(), + getConstants: () => ({ + isRTL: false, + doLeftAndRightSwapInRTL: true, + }), + }, + })); diff --git a/packages/react-native-test-renderer/src/renderer/__tests__/__snapshots__/render-test.js.snap b/packages/react-native-test-renderer/src/renderer/__tests__/__snapshots__/render-test.js.snap new file mode 100644 index 000000000000..edd8a0c422df --- /dev/null +++ b/packages/react-native-test-renderer/src/renderer/__tests__/__snapshots__/render-test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`render toJSON renders View props 1`] = ` + + + Hello + + + +`; + +exports[`render toJSON returns expected JSON output based on renderer component 1`] = ` + + + Hello + + + +`; diff --git a/packages/react-native-test-renderer/src/renderer/__tests__/render-test.js b/packages/react-native-test-renderer/src/renderer/__tests__/render-test.js new file mode 100644 index 000000000000..f1776daee9c8 --- /dev/null +++ b/packages/react-native-test-renderer/src/renderer/__tests__/render-test.js @@ -0,0 +1,63 @@ +/** + * Copyright (c) Meta Platforms, Inc. and 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 + */ + +'use strict'; + +import * as ReactNativeTestRenderer from '../index'; +import * as React from 'react'; +import {Text, View} from 'react-native'; +import 'react-native/Libraries/Components/View/ViewNativeComponent'; + +function TestComponent() { + return ( + + Hello + + + ); +} + +function TestComponentWithProps() { + return ( + + Hello + + + ); +} + +describe('render', () => { + describe('toJSON', () => { + it('returns expected JSON output based on renderer component', () => { + const result = ReactNativeTestRenderer.render(); + expect(result.toJSON()).toMatchSnapshot(); + }); + + it('renders View props', () => { + const result = ReactNativeTestRenderer.render(); + expect(result.toJSON()).toMatchSnapshot(); + }); + }); + + describe('findAll', () => { + it('returns all nodes matching the predicate', () => { + const result = ReactNativeTestRenderer.render(); + const textNode = result.findAll(node => { + return node.props?.text === 'Hello'; + })[0]; + expect(textNode).not.toBeUndefined(); + + const viewNodes = result.findAll(node => { + return node.viewName === 'RCTView'; + }); + expect(viewNodes.length).toBe(2); + }); + }); +}); diff --git a/packages/react-native-test-renderer/src/renderer/index.js b/packages/react-native-test-renderer/src/renderer/index.js new file mode 100644 index 000000000000..0beebea01573 --- /dev/null +++ b/packages/react-native-test-renderer/src/renderer/index.js @@ -0,0 +1,116 @@ +/** + * Copyright (c) Meta Platforms, Inc. and 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 + */ + +'use strict'; + +import type {Element, ElementType} from 'react'; + +import * as FabricUIManager from 'react-native/Libraries/ReactNative/__mocks__/FabricUIManager'; +import ReactFabric from 'react-native/Libraries/Renderer/shims/ReactFabric'; +import {act} from 'react-test-renderer'; + +type FiberPartial = { + pendingProps: { + children: $ReadOnlyArray, + ... + }, + ... +}; + +type ReactNode = { + children: ?Array, + props: {text?: string | null, ...}, + viewName: string, + instanceHandle: FiberPartial, +}; + +type RenderedNodeJSON = { + type: string, + props: {[propName: string]: any, ...}, + children: null | Array, + $$typeof?: symbol, // Optional because we add it with defineProperty(). +}; +type RenderedJSON = RenderedNodeJSON | string; + +type RenderResult = { + toJSON: () => Array | RenderedJSON | null, + findAll: (predicate: (ReactNode) => boolean) => Array, +}; + +function buildRenderResult(rootNode: ReactNode): RenderResult { + return { + toJSON: () => toJSON(rootNode), + findAll: (predicate: ReactNode => boolean) => findAll(rootNode, predicate), + }; +} + +export function render(element: Element): RenderResult { + const manager = FabricUIManager.getFabricUIManager(); + if (!manager) { + throw new Error('No FabricUIManager found'); + } + const containerTag = Math.round(Math.random() * 1000000); + act(() => { + ReactFabric.render(element, containerTag, () => {}, true); + }); + + // $FlowFixMe + const root: [ReactNode] = manager.getRoot(containerTag); + + if (root == null) { + throw new Error('No root found for containerTag ' + containerTag); + } + + return buildRenderResult(root[0]); +} + +function toJSON(node: ReactNode): RenderedJSON { + let renderedChildren = null; + if (node.children != null && node.children.length > 0) { + renderedChildren = node.children.map(c => toJSON(c)); + } + + if (node.viewName === 'RCTRawText') { + return node.props.text ?? ''; + } + + const {children: _children, ...props} = + node.instanceHandle?.pendingProps ?? {}; + const json: RenderedNodeJSON = { + type: node.viewName, + props, + children: renderedChildren, + }; + + Object.defineProperty(json, '$$typeof', { + value: Symbol.for('react.test.json'), + }); + + return json; +} + +function findAll( + node: ReactNode, + predicate: ReactNode => boolean, +): Array { + const results = []; + + if (predicate(node)) { + results.push(node); + } + + if (node.children != null && node.children.length > 0) { + for (const child of node.children) { + results.push(...findAll(child, predicate)); + } + } + + return results; +} diff --git a/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts b/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts index 89bdd3732399..bafdeb65e421 100644 --- a/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +++ b/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts @@ -74,6 +74,12 @@ export interface ActionSheetIOSStatic { failureCallback: (error: Error) => void, successCallback: (success: boolean, method: string) => void, ) => void; + + /** + * Dismisses the most upper iOS action sheet presented, if no action sheet is + * present a warning is displayed. + */ + dismissActionSheet: () => void; } export const ActionSheetIOS: ActionSheetIOSStatic; diff --git a/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js b/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js index b5959aca24f6..e970cdc06a68 100644 --- a/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js +++ b/packages/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js @@ -89,7 +89,9 @@ const ActionSheetIOS = { RCTActionSheetManager.showActionSheetWithOptions( { ...remainingOptions, + // $FlowFixMe[incompatible-call] tintColor: processedTintColor, + // $FlowFixMe[incompatible-call] cancelButtonTintColor: processedCancelButtonTintColor, destructiveButtonIndices, }, @@ -145,6 +147,10 @@ const ActionSheetIOS = { ); }, + /** + * Dismisses the most upper iOS action sheet presented, if no action sheet is + * present a warning is displayed. + */ dismissActionSheet: () => { invariant(RCTActionSheetManager, "ActionSheetManager doesn't exist"); if (typeof RCTActionSheetManager.dismissActionSheet === 'function') { diff --git a/packages/react-native/Libraries/ActionSheetIOS/NativeActionSheetManager.js b/packages/react-native/Libraries/ActionSheetIOS/NativeActionSheetManager.js index 8247ac260aff..06fec75530e4 100644 --- a/packages/react-native/Libraries/ActionSheetIOS/NativeActionSheetManager.js +++ b/packages/react-native/Libraries/ActionSheetIOS/NativeActionSheetManager.js @@ -4,51 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getConstants: () => {||}; - +showActionSheetWithOptions: ( - options: {| - +title?: ?string, - +message?: ?string, - +options: ?Array, - +destructiveButtonIndices?: ?Array, - +cancelButtonIndex?: ?number, - +anchor?: ?number, - +tintColor?: ?number, - +cancelButtonTintColor?: ?number, - +userInterfaceStyle?: ?string, - +disabledButtonIndices?: Array, - |}, - callback: (buttonIndex: number) => void, - ) => void; - +showShareActionSheetWithOptions: ( - options: {| - +message?: ?string, - +url?: ?string, - +subject?: ?string, - +anchor?: ?number, - +tintColor?: ?number, - +cancelButtonTintColor?: ?number, - +excludedActivityTypes?: ?Array, - +userInterfaceStyle?: ?string, - |}, - failureCallback: (error: {| - +domain: string, - +code: string, - +userInfo?: ?Object, - +message: string, - |}) => void, - successCallback: (completed: boolean, activityType: ?string) => void, - ) => void; - +dismissActionSheet?: () => void; -} - -export default (TurboModuleRegistry.get('ActionSheetManager'): ?Spec); +export * from '../../src/private/specs/modules/NativeActionSheetManager'; +import NativeActionSheetManager from '../../src/private/specs/modules/NativeActionSheetManager'; +export default NativeActionSheetManager; diff --git a/packages/react-native/Libraries/Alert/NativeAlertManager.js b/packages/react-native/Libraries/Alert/NativeAlertManager.js index 7f7b1cf6a9b6..33d2102f6e3d 100644 --- a/packages/react-native/Libraries/Alert/NativeAlertManager.js +++ b/packages/react-native/Libraries/Alert/NativeAlertManager.js @@ -4,32 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; - -export type Args = {| - title?: string, - message?: string, - buttons?: Array, // TODO(T67565166): have a better type - type?: string, - defaultValue?: string, - cancelButtonKey?: string, - destructiveButtonKey?: string, - preferredButtonKey?: string, - keyboardType?: string, - userInterfaceStyle?: string, -|}; - -export interface Spec extends TurboModule { - +alertWithArgs: ( - args: Args, - callback: (id: number, value: string) => void, - ) => void; -} - -export default (TurboModuleRegistry.get('AlertManager'): ?Spec); +export * from '../../src/private/specs/modules/NativeAlertManager'; +import NativeAlertManager from '../../src/private/specs/modules/NativeAlertManager'; +export default NativeAlertManager; diff --git a/packages/react-native/Libraries/Animated/Animated.js b/packages/react-native/Libraries/Animated/Animated.js index a9df993ad298..509e33880db5 100644 --- a/packages/react-native/Libraries/Animated/Animated.js +++ b/packages/react-native/Libraries/Animated/Animated.js @@ -21,9 +21,9 @@ import Platform from '../Utilities/Platform'; import AnimatedImplementation from './AnimatedImplementation'; import AnimatedMock from './AnimatedMock'; -const Animated = ((Platform.isDisableAnimations +const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations ? AnimatedMock - : AnimatedImplementation): typeof AnimatedImplementation); + : AnimatedImplementation; export default { get FlatList(): AnimatedFlatList { diff --git a/packages/react-native/Libraries/Animated/AnimatedPlatformConfig.js b/packages/react-native/Libraries/Animated/AnimatedPlatformConfig.js index fb0b52f3f1c8..c495cedb6696 100644 --- a/packages/react-native/Libraries/Animated/AnimatedPlatformConfig.js +++ b/packages/react-native/Libraries/Animated/AnimatedPlatformConfig.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ diff --git a/packages/react-native/Libraries/Animated/NativeAnimatedHelper.js b/packages/react-native/Libraries/Animated/NativeAnimatedHelper.js index a96287de26dd..17b7d23758f8 100644 --- a/packages/react-native/Libraries/Animated/NativeAnimatedHelper.js +++ b/packages/react-native/Libraries/Animated/NativeAnimatedHelper.js @@ -18,9 +18,9 @@ import type { } from './NativeAnimatedModule'; import type {InterpolationConfigType} from './nodes/AnimatedInterpolation'; +import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags'; import NativeEventEmitter from '../EventEmitter/NativeEventEmitter'; import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter'; -import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags'; import Platform from '../Utilities/Platform'; import NativeAnimatedNonTurboModule from './NativeAnimatedModule'; import NativeAnimatedTurboModule from './NativeAnimatedTurboModule'; @@ -48,10 +48,10 @@ const useSingleOpBatching = let flushQueueTimeout = null; const eventListenerGetValueCallbacks: { - [$FlowFixMe | number]: ((value: number) => void) | void, + [number]: (value: number) => void, } = {}; const eventListenerAnimationFinishedCallbacks: { - [$FlowFixMe | number]: EndCallback | void, + [number]: EndCallback, } = {}; let globalEventEmitterGetValueListener: ?EventSubscription = null; let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null; @@ -339,7 +339,7 @@ const API = { function setupGlobalEventEmitterListeners() { globalEventEmitterGetValueListener = RCTDeviceEventEmitter.addListener( 'onNativeAnimatedModuleGetValue', - function (params) { + params => { const {tag} = params; const callback = eventListenerGetValueCallbacks[tag]; if (!callback) { @@ -352,14 +352,17 @@ function setupGlobalEventEmitterListeners() { globalEventEmitterAnimationFinishedListener = RCTDeviceEventEmitter.addListener( 'onNativeAnimatedModuleAnimationFinished', - function (params) { - const {animationId} = params; - const callback = eventListenerAnimationFinishedCallbacks[animationId]; - if (!callback) { - return; + params => { + // TODO: remove Array.isArray once native changes have propagated + const animations = Array.isArray(params) ? params : [params]; + for (const animation of animations) { + const {animationId} = animation; + const callback = eventListenerAnimationFinishedCallbacks[animationId]; + if (callback) { + callback(animation); + delete eventListenerAnimationFinishedCallbacks[animationId]; + } } - callback(params); - delete eventListenerAnimationFinishedCallbacks[animationId]; }, ); } diff --git a/packages/react-native/Libraries/Animated/NativeAnimatedModule.js b/packages/react-native/Libraries/Animated/NativeAnimatedModule.js index 5094739f4fd9..74a9cbb3f464 100644 --- a/packages/react-native/Libraries/Animated/NativeAnimatedModule.js +++ b/packages/react-native/Libraries/Animated/NativeAnimatedModule.js @@ -4,74 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; -import shouldUseTurboAnimatedModule from './shouldUseTurboAnimatedModule'; - -type EndResult = {finished: boolean, value?: number, ...}; -type EndCallback = (result: EndResult) => void; -type SaveValueCallback = (value: number) => void; - -export type EventMapping = {| - nativeEventPath: Array, - animatedValueTag: ?number, -|}; - -// The config has different keys depending on the type of the Node -// TODO(T54896888): Make these types strict -export type AnimatedNodeConfig = Object; -export type AnimatingNodeConfig = Object; - -export interface Spec extends TurboModule { - +startOperationBatch: () => void; - +finishOperationBatch: () => void; - +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; - +updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void; - +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; - +startListeningToAnimatedNodeValue: (tag: number) => void; - +stopListeningToAnimatedNodeValue: (tag: number) => void; - +connectAnimatedNodes: (parentTag: number, childTag: number) => void; - +disconnectAnimatedNodes: (parentTag: number, childTag: number) => void; - +startAnimatingNode: ( - animationId: number, - nodeTag: number, - config: AnimatingNodeConfig, - endCallback: EndCallback, - ) => void; - +stopAnimation: (animationId: number) => void; - +setAnimatedNodeValue: (nodeTag: number, value: number) => void; - +setAnimatedNodeOffset: (nodeTag: number, offset: number) => void; - +flattenAnimatedNodeOffset: (nodeTag: number) => void; - +extractAnimatedNodeOffset: (nodeTag: number) => void; - +connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void; - +disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void; - +restoreDefaultValues: (nodeTag: number) => void; - +dropAnimatedNode: (tag: number) => void; - +addAnimatedEventToView: ( - viewTag: number, - eventName: string, - eventMapping: EventMapping, - ) => void; - +removeAnimatedEventFromView: ( - viewTag: number, - eventName: string, - animatedNodeTag: number, - ) => void; - - // Events - +addListener: (eventName: string) => void; - +removeListeners: (count: number) => void; - - // All of the above in a batched mode - +queueAndExecuteBatchedOperations?: (operationsAndArgs: Array) => void; -} - -const NativeModule: ?Spec = !shouldUseTurboAnimatedModule() - ? TurboModuleRegistry.get('NativeAnimatedModule') - : null; -export default NativeModule; +export * from '../../src/private/specs/modules/NativeAnimatedModule'; +import NativeAnimatedModule from '../../src/private/specs/modules/NativeAnimatedModule'; +export default NativeAnimatedModule; diff --git a/packages/react-native/Libraries/Animated/NativeAnimatedTurboModule.js b/packages/react-native/Libraries/Animated/NativeAnimatedTurboModule.js index 35a4ffa16bf5..36086746940f 100644 --- a/packages/react-native/Libraries/Animated/NativeAnimatedTurboModule.js +++ b/packages/react-native/Libraries/Animated/NativeAnimatedTurboModule.js @@ -4,75 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; -import shouldUseTurboAnimatedModule from './shouldUseTurboAnimatedModule'; - -type EndResult = {finished: boolean, value?: number, ...}; -type EndCallback = (result: EndResult) => void; -type SaveValueCallback = (value: number) => void; - -export type EventMapping = {| - nativeEventPath: Array, - animatedValueTag: ?number, -|}; - -// The config has different keys depending on the type of the Node -// TODO(T54896888): Make these types strict -export type AnimatedNodeConfig = Object; -export type AnimatingNodeConfig = Object; - -export interface Spec extends TurboModule { - +startOperationBatch: () => void; - +finishOperationBatch: () => void; - +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; - +updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void; - +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; - +startListeningToAnimatedNodeValue: (tag: number) => void; - +stopListeningToAnimatedNodeValue: (tag: number) => void; - +connectAnimatedNodes: (parentTag: number, childTag: number) => void; - +disconnectAnimatedNodes: (parentTag: number, childTag: number) => void; - +startAnimatingNode: ( - animationId: number, - nodeTag: number, - config: AnimatingNodeConfig, - endCallback: EndCallback, - ) => void; - +stopAnimation: (animationId: number) => void; - +setAnimatedNodeValue: (nodeTag: number, value: number) => void; - +setAnimatedNodeOffset: (nodeTag: number, offset: number) => void; - +flattenAnimatedNodeOffset: (nodeTag: number) => void; - +extractAnimatedNodeOffset: (nodeTag: number) => void; - +connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void; - +disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void; - +restoreDefaultValues: (nodeTag: number) => void; - +dropAnimatedNode: (tag: number) => void; - +addAnimatedEventToView: ( - viewTag: number, - eventName: string, - eventMapping: EventMapping, - ) => void; - +removeAnimatedEventFromView: ( - viewTag: number, - eventName: string, - animatedNodeTag: number, - ) => void; - - // Events - +addListener: (eventName: string) => void; - +removeListeners: (count: number) => void; - - // All of the above in a batched mode - +queueAndExecuteBatchedOperations?: (operationsAndArgs: Array) => void; -} - -const NativeModule: ?Spec = shouldUseTurboAnimatedModule() - ? TurboModuleRegistry.get('NativeAnimatedTurboModule') - : null; - -export default NativeModule; +export * from '../../src/private/specs/modules/NativeAnimatedTurboModule'; +import NativeAnimatedTurboModule from '../../src/private/specs/modules/NativeAnimatedTurboModule'; +export default NativeAnimatedTurboModule; diff --git a/packages/react-native/Libraries/Animated/__tests__/Animated-test.js b/packages/react-native/Libraries/Animated/__tests__/Animated-test.js index 96802ebf575a..b58175ac46e2 100644 --- a/packages/react-native/Libraries/Animated/__tests__/Animated-test.js +++ b/packages/react-native/Libraries/Animated/__tests__/Animated-test.js @@ -1094,9 +1094,7 @@ describe('Animated tests', () => { const listener = jest.fn(); color.addListener(listener); - const callback = jest.fn(() => { - console.log('callback', color.__getValue()); - }); + const callback = jest.fn(); const node = new AnimatedProps({style: {color}}, callback); node.__attach(); diff --git a/packages/react-native/Libraries/Animated/animations/Animation.js b/packages/react-native/Libraries/Animated/animations/Animation.js index d8e955f9fda4..c93dc21f58b7 100644 --- a/packages/react-native/Libraries/Animated/animations/Animation.js +++ b/packages/react-native/Libraries/Animated/animations/Animation.js @@ -14,11 +14,8 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig'; import type AnimatedNode from '../nodes/AnimatedNode'; import type AnimatedValue from '../nodes/AnimatedValue'; -import Platform from '../../Utilities/Platform'; import NativeAnimatedHelper from '../NativeAnimatedHelper'; -import AnimatedColor from '../nodes/AnimatedColor'; import AnimatedProps from '../nodes/AnimatedProps'; -import AnimatedValueXY from '../nodes/AnimatedValueXY'; export type EndResult = {finished: boolean, value?: number, ...}; export type EndCallback = (result: EndResult) => void; @@ -39,10 +36,11 @@ let startNativeAnimationNextId = 1; export default class Animation { __active: boolean; __isInteraction: boolean; - __nativeId: number; __onEnd: ?EndCallback; __iterations: number; + _nativeId: number; + start( fromValue: number, onUpdate: (value: number) => void, @@ -52,8 +50,8 @@ export default class Animation { ): void {} stop(): void { - if (this.__nativeId) { - NativeAnimatedHelper.API.stopAnimation(this.__nativeId); + if (this._nativeId) { + NativeAnimatedHelper.API.stopAnimation(this._nativeId); } } @@ -78,20 +76,6 @@ export default class Animation { return result; } - // Vectorized animations (animations on AnimatedValueXY, AnimatedColor nodes) - // are split into multiple animations for each component that execute in parallel. - // Calling update() on AnimatedProps when each animation completes results in - // potential flickering as all animations that are part of the vectorized animation - // may not have completed yet. For example, only the animation for the red channel of - // an animating color may have been completed, resulting in a temporary red color - // being rendered. So, for now, ignore AnimatedProps that use a vectorized animation. - if ( - Platform.OS === 'ios' && - (node instanceof AnimatedValueXY || node instanceof AnimatedColor) - ) { - return result; - } - for (const child of node.__getChildren()) { result.push(...this.__findAnimatedPropsNodes(child)); } @@ -108,9 +92,9 @@ export default class Animation { try { const config = this.__getNativeAnimationConfig(); animatedValue.__makeNative(config.platformConfig); - this.__nativeId = NativeAnimatedHelper.generateNewAnimationId(); + this._nativeId = NativeAnimatedHelper.generateNewAnimationId(); NativeAnimatedHelper.API.startAnimatingNode( - this.__nativeId, + this._nativeId, animatedValue.__getNativeTag(), config, result => { diff --git a/packages/react-native/Libraries/Animated/components/AnimatedFlatList.js b/packages/react-native/Libraries/Animated/components/AnimatedFlatList.js index a3a24355cba0..adfb86395856 100644 --- a/packages/react-native/Libraries/Animated/components/AnimatedFlatList.js +++ b/packages/react-native/Libraries/Animated/components/AnimatedFlatList.js @@ -14,22 +14,7 @@ import FlatList from '../../Lists/FlatList'; import createAnimatedComponent from '../createAnimatedComponent'; import * as React from 'react'; -/** - * @see https://github.com/facebook/react-native/commit/b8c8562 - */ -const FlatListWithEventThrottle = React.forwardRef( - // $FlowFixMe[incompatible-call] - ( - props: React.ElementConfig, - ref: - | ((null | FlatList) => mixed) - | {current: null | FlatList, ...}, - ) => , -); - -export default (createAnimatedComponent( - FlatListWithEventThrottle, -): AnimatedComponentType< +export default (createAnimatedComponent(FlatList): AnimatedComponentType< React.ElementConfig, React.ElementRef, >); diff --git a/packages/react-native/Libraries/Animated/components/AnimatedScrollView.js b/packages/react-native/Libraries/Animated/components/AnimatedScrollView.js index e2b48d0ce9af..029563d4bb90 100644 --- a/packages/react-native/Libraries/Animated/components/AnimatedScrollView.js +++ b/packages/react-native/Libraries/Animated/components/AnimatedScrollView.js @@ -30,39 +30,44 @@ type Instance = React.ElementRef; * @see https://github.com/facebook/react-native/commit/b8c8562 */ const AnimatedScrollView: AnimatedComponentType = - React.forwardRef((props, forwardedRef) => { - // (Android only) When a ScrollView has a RefreshControl and - // any `style` property set with an Animated.Value, the CSS - // gets incorrectly applied twice. This is because ScrollView - // swaps the parent/child relationship of itself and the - // RefreshControl component (see ScrollView.js for more details). - if ( - Platform.OS === 'android' && - props.refreshControl != null && - props.style != null + React.forwardRef( + function AnimatedScrollViewWithOrWithoutInvertedRefreshControl( + props, + forwardedRef, ) { - return ( - - ); - } else { - return ( - - ); - } - }); + // (Android only) When a ScrollView has a RefreshControl and + // any `style` property set with an Animated.Value, the CSS + // gets incorrectly applied twice. This is because ScrollView + // swaps the parent/child relationship of itself and the + // RefreshControl component (see ScrollView.js for more details). + if ( + Platform.OS === 'android' && + props.refreshControl != null && + props.style != null + ) { + return ( + + ); + } else { + return ( + + ); + } + }, + ); const AnimatedScrollViewWithInvertedRefreshControl = React.forwardRef( // $FlowFixMe[incompatible-call] - ( + function AnimatedScrollViewWithInvertedRefreshControl( props: { ...React.ElementConfig, // $FlowFixMe[unclear-type] Same Flow type as `refreshControl` in ScrollView @@ -71,7 +76,7 @@ const AnimatedScrollViewWithInvertedRefreshControl = React.forwardRef( forwardedRef: | {current: Instance | null, ...} | ((Instance | null) => mixed), - ) => { + ) { // Split `props` into the animate-able props for the parent (RefreshControl) // and child (ScrollView). const {intermediatePropsForRefreshControl, intermediatePropsForScrollView} = @@ -103,7 +108,7 @@ const AnimatedScrollViewWithInvertedRefreshControl = React.forwardRef( Props, Instance, >(intermediatePropsForScrollView); - const ref = useMergeRefs(scrollViewRef, forwardedRef); + const ref = useMergeRefs(scrollViewRef, forwardedRef); return ( // $FlowFixMe[incompatible-use] Investigate useAnimatedProps return value diff --git a/packages/react-native/Libraries/Animated/components/AnimatedSectionList.js b/packages/react-native/Libraries/Animated/components/AnimatedSectionList.js index 083d9be05eb3..5b2f80c2c53e 100644 --- a/packages/react-native/Libraries/Animated/components/AnimatedSectionList.js +++ b/packages/react-native/Libraries/Animated/components/AnimatedSectionList.js @@ -8,32 +8,13 @@ * @format */ -import type {SectionBase} from '../../Lists/SectionList'; import type {AnimatedComponentType} from '../createAnimatedComponent'; import SectionList from '../../Lists/SectionList'; import createAnimatedComponent from '../createAnimatedComponent'; import * as React from 'react'; -/** - * @see https://github.com/facebook/react-native/commit/b8c8562 - */ -const SectionListWithEventThrottle = React.forwardRef( - // $FlowFixMe[incompatible-call] - ( - props: React.ElementConfig, - ref: - | ((null | SectionList>) => mixed) - | { - current: null | SectionList>, - ... - }, - ) => , -); - -export default (createAnimatedComponent( - SectionListWithEventThrottle, -): AnimatedComponentType< +export default (createAnimatedComponent(SectionList): AnimatedComponentType< React.ElementConfig, React.ElementRef, >); diff --git a/packages/react-native/Libraries/Animated/createAnimatedComponent.js b/packages/react-native/Libraries/Animated/createAnimatedComponent.js index 878b1d34a439..78b66e094812 100644 --- a/packages/react-native/Libraries/Animated/createAnimatedComponent.js +++ b/packages/react-native/Libraries/Animated/createAnimatedComponent.js @@ -13,50 +13,55 @@ import useMergeRefs from '../Utilities/useMergeRefs'; import useAnimatedProps from './useAnimatedProps'; import * as React from 'react'; +// $FlowFixMe[deprecated-type] +export type AnimatedProps = $ObjMap< + Props & + $ReadOnly<{ + passthroughAnimatedPropExplicitValues?: React.ElementConfig, + }>, + () => any, +>; + export type AnimatedComponentType< - -Props: {+[string]: mixed, ...}, + Props: {...}, +Instance = mixed, -> = React.AbstractComponent< - $ObjMap< - Props & - $ReadOnly<{ - passthroughAnimatedPropExplicitValues?: React.ElementConfig< - typeof View, - >, - }>, - () => any, - >, - Instance, ->; +> = React.AbstractComponent, Instance>; export default function createAnimatedComponent( Component: React.AbstractComponent, ): AnimatedComponentType { - return React.forwardRef((props, forwardedRef) => { - const [reducedProps, callbackRef] = useAnimatedProps( - // $FlowFixMe[incompatible-call] - props, - ); - // $FlowFixMe[incompatible-call] - const ref = useMergeRefs(callbackRef, forwardedRef); - - // Some components require explicit passthrough values for animation - // to work properly. For example, if an animated component is - // transformed and Pressable, onPress will not work after transform - // without these passthrough values. - // $FlowFixMe[prop-missing] - const {passthroughAnimatedPropExplicitValues, style} = reducedProps; - const {style: passthroughStyle, ...passthroughProps} = - passthroughAnimatedPropExplicitValues ?? {}; - const mergedStyle = {...style, ...passthroughStyle}; - - return ( - - ); - }); + const AnimatedComponent = React.forwardRef, TInstance>( + (props, forwardedRef) => { + const [reducedProps, callbackRef] = useAnimatedProps( + // $FlowFixMe[incompatible-call] + props, + ); + const ref = useMergeRefs(callbackRef, forwardedRef); + + // Some components require explicit passthrough values for animation + // to work properly. For example, if an animated component is + // transformed and Pressable, onPress will not work after transform + // without these passthrough values. + // $FlowFixMe[prop-missing] + const {passthroughAnimatedPropExplicitValues, style} = reducedProps; + const {style: passthroughStyle, ...passthroughProps} = + passthroughAnimatedPropExplicitValues ?? {}; + const mergedStyle = {...style, ...passthroughStyle}; + + return ( + + ); + }, + ); + + AnimatedComponent.displayName = `Animated(${ + Component.displayName || 'Anonymous' + })`; + + return AnimatedComponent; } diff --git a/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js b/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js index 8fdc6532aeb2..840e1264ddb5 100644 --- a/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js +++ b/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js @@ -12,7 +12,7 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig'; -import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags'; +import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags'; import flattenStyle from '../../StyleSheet/flattenStyle'; import Platform from '../../Utilities/Platform'; import NativeAnimatedHelper from '../NativeAnimatedHelper'; @@ -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/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js b/packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js index c112ba99aca6..0a780617e483 100644 --- a/packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js +++ b/packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ diff --git a/packages/react-native/Libraries/Animated/useAnimatedProps.js b/packages/react-native/Libraries/Animated/useAnimatedProps.js index 2d87e367d81c..6be9fac9cd86 100644 --- a/packages/react-native/Libraries/Animated/useAnimatedProps.js +++ b/packages/react-native/Libraries/Animated/useAnimatedProps.js @@ -10,8 +10,8 @@ 'use strict'; +import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags'; import {isPublicInstance as isFabricPublicInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils'; -import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags'; import useRefEffect from '../Utilities/useRefEffect'; import {AnimatedEvent} from './AnimatedEvent'; import NativeAnimatedHelper from './NativeAnimatedHelper'; @@ -37,6 +37,7 @@ export default function useAnimatedProps( ): [ReducedProps, CallbackRef] { const [, scheduleUpdate] = useReducer(count => count + 1, 0); const onUpdateRef = useRef void>(null); + const timerRef = useRef(null); // TODO: Only invalidate `node` if animated props or `style` change. In the // previous implementation, we permitted `style` to override props with the @@ -87,6 +88,25 @@ export default function useAnimatedProps( // $FlowIgnore[not-a-function] - Assume it's still a function. // $FlowFixMe[incompatible-use] instance.setNativeProps(node.__getAnimatedValue()); + if (isFabricInstance(instance)) { + // Keeping state of Fiber tree and Shadow tree in sync. + // + // This is done by calling `scheduleUpdate` which will trigger a commit. + // However, React commit is not fast enough to drive animations. + // This is where setNativeProps comes in handy but the state between + // Fiber tree and Shadow tree needs to be kept in sync. + // The goal is to call `scheduleUpdate` as little as possible to maintain + // performance but frequently enough to keep state in sync. + // Debounce is set to 48ms, which is 3 * the duration of a frame. + // 3 frames was the highest value where flickering state was not observed. + if (timerRef.current != null) { + clearTimeout(timerRef.current); + } + timerRef.current = setTimeout(() => { + timerRef.current = null; + scheduleUpdate(); + }, 48); + } } }; diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate+Protected.h b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate+Protected.h new file mode 100644 index 000000000000..2321b43c4da9 --- /dev/null +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate+Protected.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#if defined(__cplusplus) + +#import +#import "RCTAppDelegate.h" + +@interface RCTAppDelegate () +@end + +#endif diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h index ca029d2f4ba4..d61c3d115e30 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h @@ -5,13 +5,18 @@ * LICENSE file in the root directory of this source tree. */ +#import #import +#import "RCTRootViewFactory.h" @class RCTBridge; @protocol RCTBridgeDelegate; @protocol RCTComponentViewProtocol; +@class RCTRootView; @class RCTSurfacePresenterBridgeAdapter; +NS_ASSUME_NONNULL_BEGIN + /** * The RCTAppDelegate is an utility class that implements some base configurations for all the React Native apps. * It is not mandatory to use it, but it could simplify your AppDelegate code. @@ -38,7 +43,6 @@ * - (UIViewController *)createRootViewController; * - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController; * New Architecture: - * - (BOOL)concurrentRootEnabled * - (BOOL)turboModuleEnabled; * - (BOOL)fabricEnabled; * - (NSDictionary *)prepareInitialProps @@ -53,10 +57,13 @@ @interface RCTAppDelegate : UIResponder /// The window object, used to render the UViewControllers -@property (nonatomic, strong) UIWindow *window; -@property (nonatomic, strong) RCTBridge *bridge; -@property (nonatomic, strong) NSString *moduleName; -@property (nonatomic, strong) NSDictionary *initialProps; +@property (nonatomic, strong, nonnull) UIWindow *window; +@property (nonatomic, nullable) RCTBridge *bridge; +@property (nonatomic, strong, nullable) NSString *moduleName; +@property (nonatomic, strong, nullable) NSDictionary *initialProps; +@property (nonatomic, strong, nonnull) RCTRootViewFactory *rootViewFactory; + +@property (nonatomic, nullable) RCTSurfacePresenterBridgeAdapter *bridgeAdapter; /** * It creates a `RCTBridge` using a delegate and some launch options. @@ -85,6 +92,26 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge moduleName:(NSString *)moduleName initProps:(NSDictionary *)initProps; +/** + * This method can be used to customize the rootView that is passed to React Native. + * A typical example is to override this method in the AppDelegate to change the background color. + * To achieve this, add in your `AppDelegate.mm`: + * ``` + * - (void)customizeRootView:(RCTRootView *)rootView + * { + * rootView.backgroundColor = [UIColor colorWithDynamicProvider:^UIColor *(UITraitCollection *traitCollection) { + * if ([traitCollection userInterfaceStyle] == UIUserInterfaceStyleDark) { + * return [UIColor blackColor]; + * } else { + * return [UIColor whiteColor]; + * } + * }]; + * } + * ``` + * + * @parameter: rootView - The root view to customize. + */ +- (void)customizeRootView:(RCTRootView *)rootView; /** * It creates the RootViewController. @@ -100,19 +127,9 @@ * By default, it assigns the rootView to the view property of the rootViewController * If you are not using a simple UIViewController, then there could be other methods to use to setup the rootView. * For example: UISplitViewController requires `setViewController(_:for:)` - * - * @return: void */ - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController; -/// This method controls whether the App will use RuntimeScheduler. Only applicable in the legacy architecture. -/// -/// @return: `YES` to use RuntimeScheduler, `NO` to use JavaScript scheduler. The default value is `YES`. -- (BOOL)runtimeSchedulerEnabled; - -#if RCT_NEW_ARCH_ENABLED -@property (nonatomic, strong) RCTSurfacePresenterBridgeAdapter *bridgeAdapter; - /// This method returns a map of Component Descriptors and Components classes that needs to be registered in the /// new renderer. The Component Descriptor is a string which represent the name used in JS to refer to the native /// component. The default implementation returns an empty dictionary. Subclasses can override this method to register @@ -138,8 +155,8 @@ - (BOOL)bridgelessEnabled; /// Return the bundle URL for the main bundle. -- (NSURL *)getBundleURL; - -#endif +- (NSURL *__nullable)bundleURL; @end + +NS_ASSUME_NONNULL_END diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index d16b85ce9e97..18b299b53919 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -7,19 +7,26 @@ #import "RCTAppDelegate.h" #import +#import #import #import -#import +#import +#import +#import +#import +#import +#import "RCTAppDelegate+Protected.h" #import "RCTAppSetupUtils.h" -#import "RCTLegacyInteropComponents.h" -#if RCT_NEW_ARCH_ENABLED +#if RN_DISABLE_OSS_PLUGIN_HEADER +#import +#else #import +#endif #import #import #import #import -#import #import #import #import @@ -34,86 +41,31 @@ #import #import #import -#import +#import -static NSString *const kRNConcurrentRoot = @"concurrentRoot"; - -@interface RCTAppDelegate () < - RCTTurboModuleManagerDelegate, - RCTComponentViewFactoryComponentProvider, - RCTContextContainerHandling> { - std::shared_ptr _reactNativeConfig; - facebook::react::ContextContainer::Shared _contextContainer; -} +@interface RCTAppDelegate () @end -#endif - -@interface RCTAppDelegate () { - std::shared_ptr _runtimeScheduler; -} -@end - -@implementation RCTAppDelegate { -#if RCT_NEW_ARCH_ENABLED - RCTHost *_reactHost; -#endif -} - -#if RCT_NEW_ARCH_ENABLED -- (instancetype)init -{ - if (self = [super init]) { - _contextContainer = std::make_shared(); - _reactNativeConfig = std::make_shared(); - _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); - } - return self; -} -#endif +@implementation RCTAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - BOOL enableTM = NO; - BOOL enableBridgeless = NO; -#if RCT_NEW_ARCH_ENABLED - enableTM = self.turboModuleEnabled; - enableBridgeless = self.bridgelessEnabled; -#endif + [self _setUpFeatureFlags]; - RCTAppSetupPrepareApp(application, enableTM); + RCTSetNewArchEnabled([self newArchEnabled]); + RCTAppSetupPrepareApp(application, self.turboModuleEnabled); - UIView *rootView; + self.rootViewFactory = [self createRCTRootViewFactory]; - if (enableBridgeless) { -#if RCT_NEW_ARCH_ENABLED - [self createReactHost]; - [self unstable_registerLegacyComponents]; - [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; - RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:self.moduleName - initialProperties:launchOptions]; - - RCTSurfaceHostingProxyRootView *surfaceHostingProxyRootView = [[RCTSurfaceHostingProxyRootView alloc] - initWithSurface:surface - sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact]; + UIView *rootView = [self.rootViewFactory viewWithModuleName:self.moduleName + initialProperties:self.initialProps + launchOptions:launchOptions]; - rootView = (RCTRootView *)surfaceHostingProxyRootView; -#endif - } else { - if (!self.bridge) { - self.bridge = [self createBridgeWithDelegate:self launchOptions:launchOptions]; - } -#if RCT_NEW_ARCH_ENABLED - self.bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:self.bridge - contextContainer:_contextContainer]; - self.bridge.surfacePresenter = self.bridgeAdapter.surfacePresenter; - - [self unstable_registerLegacyComponents]; + if (self.newArchEnabled || self.fabricEnabled) { [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; -#endif - NSDictionary *initProps = [self prepareInitialProps]; - rootView = [self createRootViewWithBridge:self.bridge moduleName:self.moduleName initProps:initProps]; } + [self _logWarnIfCreateRootViewWithBridgeIsOverridden]; + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [self createRootViewController]; [self setRootView:rootView toRootViewController:rootViewController]; @@ -124,6 +76,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( return YES; } +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Noop +} + - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { [NSException raise:@"RCTBridgeDelegate::sourceURLForBridge not implemented" @@ -131,19 +88,6 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge return nil; } -- (NSDictionary *)prepareInitialProps -{ - NSMutableDictionary *initProps = self.initialProps ? [self.initialProps mutableCopy] : [NSMutableDictionary new]; - -#ifdef RCT_NEW_ARCH_ENABLED - // Hardcoding the Concurrent Root as it it not recommended to - // have the concurrentRoot turned off when Fabric is enabled. - initProps[kRNConcurrentRoot] = @([self fabricEnabled]); -#endif - - return initProps; -} - - (RCTBridge *)createBridgeWithDelegate:(id)delegate launchOptions:(NSDictionary *)launchOptions { return [[RCTBridge alloc] initWithDelegate:delegate launchOptions:launchOptions]; @@ -153,10 +97,7 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge moduleName:(NSString *)moduleName initProps:(NSDictionary *)initProps { - BOOL enableFabric = NO; -#if RCT_NEW_ARCH_ENABLED - enableFabric = self.fabricEnabled; -#endif + BOOL enableFabric = self.fabricEnabled; UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, enableFabric); rootView.backgroundColor = [UIColor systemBackgroundColor]; @@ -164,6 +105,21 @@ - (UIView *)createRootViewWithBridge:(RCTBridge *)bridge return rootView; } +// TODO T173939093 - Remove _logWarnIfCreateRootViewWithBridgeIsOverridden after 0.74 is cut +- (void)_logWarnIfCreateRootViewWithBridgeIsOverridden +{ + SEL selector = @selector(createRootViewWithBridge:moduleName:initProps:); + IMP baseClassImp = method_getImplementation(class_getInstanceMethod([RCTAppDelegate class], selector)); + IMP currentClassImp = method_getImplementation(class_getInstanceMethod([self class], selector)); + if (currentClassImp != baseClassImp) { + NSString *warnMessage = + @"If you are using the `createRootViewWithBridge` to customize the root view appearence," + "for example to set the backgroundColor, please migrate to `customiseView` method.\n" + "The `createRootViewWithBridge` method is not invoked in bridgeless."; + RCTLogWarn(@"%@", warnMessage); + } +} + - (UIViewController *)createRootViewController { return [UIViewController new]; @@ -174,135 +130,166 @@ - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *) rootViewController.view = rootView; } -- (BOOL)runtimeSchedulerEnabled +- (void)customizeRootView:(RCTRootView *)rootView { - return YES; + // Override point for customization after application launch. } #pragma mark - UISceneDelegate + - (void)windowScene:(UIWindowScene *)windowScene didUpdateCoordinateSpace:(id)previousCoordinateSpace 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 -- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge +#pragma mark - New Arch Enabled settings + +- (BOOL)newArchEnabled { - _runtimeScheduler = std::make_shared(RCTRuntimeExecutorFromBridge(bridge)); #if RCT_NEW_ARCH_ENABLED - std::shared_ptr callInvoker = - std::make_shared(_runtimeScheduler); - RCTTurboModuleManager *turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge - delegate:self - jsInvoker:callInvoker]; - _contextContainer->erase("RuntimeScheduler"); - _contextContainer->insert("RuntimeScheduler", _runtimeScheduler); - return RCTAppSetupDefaultJsExecutorFactory(bridge, turboModuleManager, _runtimeScheduler); + return YES; #else - return RCTAppSetupJsExecutorFactoryForOldArch(bridge, _runtimeScheduler); + return NO; #endif } -#if RCT_NEW_ARCH_ENABLED - -#pragma mark - RCTTurboModuleManagerDelegate - -- (Class)getModuleClassFromName:(const char *)name +- (BOOL)turboModuleEnabled { - return RCTCoreModulesClassProvider(name); + return [self newArchEnabled]; } -- (std::shared_ptr)getTurboModule:(const std::string &)name - jsInvoker:(std::shared_ptr)jsInvoker +- (BOOL)fabricEnabled { - return nullptr; + return [self newArchEnabled]; } -- (std::shared_ptr)getTurboModule:(const std::string &)name - initParams: - (const facebook::react::ObjCTurboModule::InitParams &)params +- (BOOL)bridgelessEnabled { - return nullptr; + return [self newArchEnabled]; } -- (id)getModuleInstanceFromClass:(Class)moduleClass +- (NSURL *)bundleURL { - return RCTAppSetupDefaultModuleFromClass(moduleClass); + [NSException raise:@"RCTAppDelegate::bundleURL not implemented" + format:@"Subclasses must implement a valid getBundleURL method"]; + return nullptr; } -#pragma mark - RCTComponentViewFactoryComponentProvider +#pragma mark - Bridge and Bridge Adapter properties -- (NSDictionary> *)thirdPartyFabricComponents +- (RCTBridge *)bridge { - return @{}; + return self.rootViewFactory.bridge; } -#pragma mark - New Arch Enabled settings - -- (BOOL)turboModuleEnabled +- (RCTSurfacePresenterBridgeAdapter *)bridgeAdapter { - return YES; + return self.rootViewFactory.bridgeAdapter; } -- (BOOL)fabricEnabled +- (void)setBridge:(RCTBridge *)bridge { - return YES; + self.rootViewFactory.bridge = bridge; } -- (BOOL)bridgelessEnabled +- (void)setBridgeAdapter:(RCTSurfacePresenterBridgeAdapter *)bridgeAdapter { - return NO; + self.rootViewFactory.bridgeAdapter = bridgeAdapter; } -#pragma mark - New Arch Utilities +#pragma mark - RCTTurboModuleManagerDelegate -- (void)unstable_registerLegacyComponents +- (Class)getModuleClassFromName:(const char *)name { - for (NSString *legacyComponent in [RCTLegacyInteropComponents legacyInteropComponents]) { - [RCTLegacyViewManagerInteropComponentView supportLegacyViewManagerWithName:legacyComponent]; - } +#if RN_DISABLE_OSS_PLUGIN_HEADER + return RCTTurboModulePluginClassProvider(name); +#else + return RCTCoreModulesClassProvider(name); +#endif +} + +- (std::shared_ptr)getTurboModule:(const std::string &)name + jsInvoker:(std::shared_ptr)jsInvoker +{ + return nullptr; } -- (void)createReactHost +- (std::shared_ptr)getTurboModule:(const std::string &)name + initParams: + (const facebook::react::ObjCTurboModule::InitParams &)params { - __weak __typeof(self) weakSelf = self; - _reactHost = [[RCTHost alloc] initWithBundleURL:[self getBundleURL] - hostDelegate:nil - turboModuleManagerDelegate:self - jsEngineProvider:^std::shared_ptr() { - return [weakSelf createJSEngineInstance]; - }]; - [_reactHost setBundleURLProvider:^NSURL *() { - return [weakSelf getBundleURL]; - }]; - [_reactHost setContextContainerHandler:self]; - [_reactHost start]; + return nullptr; } -- (std::shared_ptr)createJSEngineInstance +- (id)getModuleInstanceFromClass:(Class)moduleClass { -#if USE_HERMES - return std::make_shared(_reactNativeConfig, nullptr); -#else - return std::make_shared(); -#endif + return RCTAppSetupDefaultModuleFromClass(moduleClass); } -- (void)didCreateContextContainer:(std::shared_ptr)contextContainer +#pragma mark - RCTComponentViewFactoryComponentProvider + +- (NSDictionary> *)thirdPartyFabricComponents { - contextContainer->insert("ReactNativeConfig", _reactNativeConfig); + return @{}; } -- (NSURL *)getBundleURL +- (RCTRootViewFactory *)createRCTRootViewFactory { - [NSException raise:@"RCTAppDelegate::getBundleURL not implemented" - format:@"Subclasses must implement a valid getBundleURL method"]; - return nullptr; + __weak __typeof(self) weakSelf = self; + RCTBundleURLBlock bundleUrlBlock = ^{ + RCTAppDelegate *strongSelf = weakSelf; + return strongSelf.bundleURL; + }; + + RCTRootViewFactoryConfiguration *configuration = + [[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock + newArchEnabled:self.fabricEnabled + turboModuleEnabled:self.turboModuleEnabled + bridgelessEnabled:self.bridgelessEnabled]; + + configuration.createRootViewWithBridge = ^UIView *(RCTBridge *bridge, NSString *moduleName, NSDictionary *initProps) + { + return [weakSelf createRootViewWithBridge:bridge moduleName:moduleName initProps:initProps]; + }; + + configuration.createBridgeWithDelegate = ^RCTBridge *(id delegate, NSDictionary *launchOptions) + { + return [weakSelf createBridgeWithDelegate:delegate launchOptions:launchOptions]; + }; + + configuration.customizeRootView = ^(UIView *_Nonnull rootView) { + [weakSelf customizeRootView:(RCTRootView *)rootView]; + }; + + return [[RCTRootViewFactory alloc] initWithConfiguration:configuration andTurboModuleManagerDelegate:self]; } -#endif +#pragma mark - Feature Flags + +class RCTAppDelegateBridgelessFeatureFlags : public facebook::react::ReactNativeFeatureFlagsDefaults { + public: + bool useModernRuntimeScheduler() override + { + return true; + } + bool enableMicrotasks() override + { + return true; + } + bool batchRenderingUpdatesInEventLoop() override + { + return true; + } +}; + +- (void)_setUpFeatureFlags +{ + if ([self bridgelessEnabled]) { + facebook::react::ReactNativeFeatureFlags::override(std::make_unique()); + } +} @end diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h index 93bb40d8bdea..8c5776140e5a 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h +++ b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h @@ -13,42 +13,33 @@ #import -#ifndef RCT_USE_HERMES -#if __has_include() -#define RCT_USE_HERMES 1 -#else -#define RCT_USE_HERMES 0 -#endif -#endif - -#if RCT_USE_HERMES +#if USE_HERMES +#if __has_include() +#import +#elif __has_include() #import -#else -#import #endif +#else // USE_HERMES +#import +#endif // USE_HERMES -#if RCT_NEW_ARCH_ENABLED #import -#endif // Forward declaration to decrease compilation coupling namespace facebook::react { class RuntimeScheduler; } -#if RCT_NEW_ARCH_ENABLED - RCT_EXTERN id RCTAppSetupDefaultModuleFromClass(Class moduleClass); std::unique_ptr RCTAppSetupDefaultJsExecutorFactory( RCTBridge *bridge, RCTTurboModuleManager *turboModuleManager, const std::shared_ptr &runtimeScheduler); -#else + std::unique_ptr RCTAppSetupJsExecutorFactoryForOldArch( RCTBridge *bridge, const std::shared_ptr &runtimeScheduler); -#endif #endif // __cplusplus diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm index bb47fc10a472..6c5f7a4a13bd 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm @@ -11,9 +11,7 @@ #import #import -#if RCT_NEW_ARCH_ENABLED // Turbo Module -#import #import #import #import @@ -25,38 +23,24 @@ // Fabric #import #import -#endif -#ifdef FB_SONARKIT_ENABLED -#import -#import -#import -#import -#import -#import +// jsinspector-modern +#import -static void InitializeFlipper(UIApplication *application) -{ - FlipperClient *client = [FlipperClient sharedClient]; - SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; - [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application - withDescriptorMapper:layoutDescriptorMapper]]; - [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; - [client addPlugin:[FlipperKitReactPlugin new]]; - [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; - [client start]; -} +#if __has_include() +#define USE_OSS_CODEGEN 1 +#import +#elif __has_include() +#define USE_OSS_CODEGEN 1 +#import +#else +// Meta internal system do not generate the RCTModulesConformingToProtocolsProvider.h file +#define USE_OSS_CODEGEN 0 #endif void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled) { -#ifdef FB_SONARKIT_ENABLED - InitializeFlipper(application); -#endif - -#if RCT_NEW_ARCH_ENABLED RCTEnableTurboModule(turboModuleEnabled); -#endif #if DEBUG // Disable idle timer in dev builds to avoid putting application in background and complicating @@ -68,37 +52,70 @@ void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled) UIView * RCTAppSetupDefaultRootView(RCTBridge *bridge, NSString *moduleName, NSDictionary *initialProperties, BOOL fabricEnabled) { -#if RCT_NEW_ARCH_ENABLED if (fabricEnabled) { id surface = [[RCTFabricSurface alloc] initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties]; return [[RCTSurfaceHostingProxyRootView alloc] initWithSurface:surface]; } -#endif return [[RCTRootView alloc] initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties]; } -#if RCT_NEW_ARCH_ENABLED id RCTAppSetupDefaultModuleFromClass(Class moduleClass) { + // private block used to filter out modules depending on protocol conformance + NSArray * (^extractModuleConformingToProtocol)(RCTModuleRegistry *, Protocol *) = + ^NSArray *(RCTModuleRegistry *moduleRegistry, Protocol *protocol) + { + NSArray *classNames = @[]; + +#if USE_OSS_CODEGEN + if (protocol == @protocol(RCTImageURLLoader)) { + classNames = [RCTModulesConformingToProtocolsProvider imageURLLoaderClassNames]; + } else if (protocol == @protocol(RCTImageDataDecoder)) { + classNames = [RCTModulesConformingToProtocolsProvider imageDataDecoderClassNames]; + } else if (protocol == @protocol(RCTURLRequestHandler)) { + classNames = [RCTModulesConformingToProtocolsProvider URLRequestHandlerClassNames]; + } +#endif + + NSMutableArray *modules = [NSMutableArray new]; + + for (NSString *className in classNames) { + const char *cModuleName = [className cStringUsingEncoding:NSUTF8StringEncoding]; + id moduleFromLibrary = [moduleRegistry moduleForName:cModuleName]; + if (![moduleFromLibrary conformsToProtocol:protocol]) { + continue; + } + [modules addObject:moduleFromLibrary]; + } + return modules; + }; + // Set up the default RCTImageLoader and RCTNetworking modules. if (moduleClass == RCTImageLoader.class) { return [[moduleClass alloc] initWithRedirectDelegate:nil loadersProvider:^NSArray> *(RCTModuleRegistry *moduleRegistry) { - return @[ [RCTBundleAssetImageLoader new] ]; + NSArray *imageURLLoaderModules = + extractModuleConformingToProtocol(moduleRegistry, @protocol(RCTImageURLLoader)); + + return [@[ [RCTBundleAssetImageLoader new] ] arrayByAddingObjectsFromArray:imageURLLoaderModules]; } decodersProvider:^NSArray> *(RCTModuleRegistry *moduleRegistry) { - return @[ [RCTGIFImageDecoder new] ]; + NSArray *imageDataDecoder = extractModuleConformingToProtocol(moduleRegistry, @protocol(RCTImageDataDecoder)); + return [@[ [RCTGIFImageDecoder new] ] arrayByAddingObjectsFromArray:imageDataDecoder]; }]; } else if (moduleClass == RCTNetworking.class) { return [[moduleClass alloc] initWithHandlersProvider:^NSArray> *(RCTModuleRegistry *moduleRegistry) { - return @[ + NSArray *URLRequestHandlerModules = + extractModuleConformingToProtocol(moduleRegistry, @protocol(RCTURLRequestHandler)); + return [@[ [RCTHTTPRequestHandler new], [RCTDataRequestHandler new], [RCTFileRequestHandler new], - ]; + [moduleRegistry moduleForName:"BlobModule"], + ] arrayByAddingObjectsFromArray:URLRequestHandlerModules]; }]; } // No custom initializer here. @@ -123,11 +140,11 @@ void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled) [turboModuleManager moduleForName:"RCTDevMenu"]; #endif // end RCT_DEV -#if RCT_USE_HERMES +#if USE_HERMES return std::make_unique( #else return std::make_unique( -#endif // end RCT_USE_HERMES +#endif // USE_HERMES facebook::react::RCTJSIExecutorRuntimeInstaller( [turboModuleManager, bridge, runtimeScheduler](facebook::jsi::Runtime &runtime) { if (!bridge || !turboModuleManager) { @@ -140,17 +157,15 @@ void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled) })); } -#else // else !RCT_NEW_ARCH_ENABLED - std::unique_ptr RCTAppSetupJsExecutorFactoryForOldArch( RCTBridge *bridge, const std::shared_ptr &runtimeScheduler) { -#if RCT_USE_HERMES +#if USE_HERMES return std::make_unique( #else return std::make_unique( -#endif // end RCT_USE_HERMES +#endif // USE_HERMES facebook::react::RCTJSIExecutorRuntimeInstaller([bridge, runtimeScheduler](facebook::jsi::Runtime &runtime) { if (!bridge) { return; @@ -160,4 +175,3 @@ void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled) } })); } -#endif // end RCT_NEW_ARCH_ENABLED diff --git a/packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.h b/packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.h deleted file mode 100644 index 9d3bccc886dc..000000000000 --- a/packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. 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 - -NS_ASSUME_NONNULL_BEGIN - -@interface RCTLegacyInteropComponents : NSObject - -+ (NSArray *)legacyInteropComponents; - -@end - -NS_ASSUME_NONNULL_END diff --git a/packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.mm b/packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.mm deleted file mode 100644 index a330712cae3a..000000000000 --- a/packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.mm +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. 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 "RCTLegacyInteropComponents.h" - -@implementation RCTLegacyInteropComponents - -+ (NSArray *)legacyInteropComponents -{ - return @[ @"RNTMyLegacyNativeView", @"RNTMyNativeView" ]; -} - -@end diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h new file mode 100644 index 000000000000..d5cd14cce15f --- /dev/null +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) Meta Platforms, Inc. 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 +#import +#import + +@protocol RCTCxxBridgeDelegate; +@protocol RCTComponentViewFactoryComponentProvider; +@protocol RCTTurboModuleManagerDelegate; +@class RCTBridge; +@class RCTRootView; +@class RCTSurfacePresenterBridgeAdapter; + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Blocks' definitions +typedef UIView *_Nonnull ( + ^RCTCreateRootViewWithBridgeBlock)(RCTBridge *bridge, NSString *moduleName, NSDictionary *initProps); +typedef RCTBridge *_Nonnull ( + ^RCTCreateBridgeWithDelegateBlock)(id delegate, NSDictionary *launchOptions); +typedef void (^RCTCustomizeRootViewBlock)(UIView *rootView); +typedef NSURL *_Nullable (^RCTSourceURLForBridgeBlock)(RCTBridge *bridge); +typedef NSURL *_Nullable (^RCTBundleURLBlock)(void); +typedef NSArray> *_Nonnull (^RCTExtraModulesForBridgeBlock)(RCTBridge *bridge); +typedef NSDictionary *_Nonnull (^RCTExtraLazyModuleClassesForBridge)(RCTBridge *bridge); +typedef BOOL (^RCTBridgeDidNotFindModuleBlock)(RCTBridge *bridge, NSString *moduleName); + +#pragma mark - RCTRootViewFactory Configuration +@interface RCTRootViewFactoryConfiguration : NSObject + +/// This property controls whether the App will use the Fabric renderer of the New Architecture or not. +@property (nonatomic, assign, readonly) BOOL fabricEnabled; + +/// This property controls whether React Native's new initialization layer is enabled. +@property (nonatomic, assign, readonly) BOOL bridgelessEnabled; + +/// This method controls whether the `turboModules` feature of the New Architecture is turned on or off +@property (nonatomic, assign, readonly) BOOL turboModuleEnabled; + +/// Return the bundle URL for the main bundle. +@property (nonatomic, nonnull) RCTBundleURLBlock bundleURLBlock; + +/** + * Use this method to initialize a new instance of `RCTRootViewFactoryConfiguration` by passing a `bundleURL` + * + * Which is the location of the JavaScript source file. When running from the packager + * this should be an absolute URL, e.g. `http://localhost:8081/index.ios.bundle`. + * When running from a locally bundled JS file, this should be a `file://` url + * pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`. + * + */ +- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock + newArchEnabled:(BOOL)newArchEnabled + turboModuleEnabled:(BOOL)turboModuleEnabled + bridgelessEnabled:(BOOL)bridgelessEnabled NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithBundleURL:(NSURL *)bundleURL + newArchEnabled:(BOOL)newArchEnabled + turboModuleEnabled:(BOOL)turboModuleEnabled + bridgelessEnabled:(BOOL)bridgelessEnabled __deprecated; + +/** + * Block that allows to override logic of creating root view instance. + * It creates a `UIView` starting from a bridge, a module name and a set of initial properties. + * By default, it is invoked using the bridge created by `RCTCreateBridgeWithDelegateBlock` (or the default + * implementation) and the `moduleName` variable comes from `viewWithModuleName:initialProperties:launchOptions` of + * `RCTRootViewFactory`. + * + * @parameter: bridge - an instance of the `RCTBridge` object. + * @parameter: moduleName - the name of the app, used by Metro to resolve the module. + * @parameter: initProps - a set of initial properties. + * + * @returns: a UIView properly configured with a bridge for React Native. + */ +@property (nonatomic, nullable) RCTCreateRootViewWithBridgeBlock createRootViewWithBridge; + +/** + * Block that allows to override default behavior of creating bridge. + * It should return `RCTBridge` using a delegate and some launch options. + * + * By default, it is invoked passing `self` as a delegate. + * + * @parameter: delegate - an object that implements the `RCTBridgeDelegate` protocol. + * @parameter: launchOptions - a dictionary with a set of options. + * + * @returns: a newly created instance of RCTBridge. + */ +@property (nonatomic, nullable) RCTCreateBridgeWithDelegateBlock createBridgeWithDelegate; + +/** + * Block that allows to customize the rootView that is passed to React Native. + * + * @parameter: rootView - The root view to customize. + */ +@property (nonatomic, nullable) RCTCustomizeRootViewBlock customizeRootView; + +@end + +#pragma mark - RCTRootViewFactory +/** + * The RCTRootViewFactory is an utility class that encapsulates the logic of creating a new RCTRootView based on the + * current state of the environment. It allows you to initialize your app root view for old architecture, new + * architecture and bridgless mode. + * + * This class is used to initalize rootView in RCTAppDelegate, but you can also use it separately. + * + * Create a new instance of this class (make sure to retain it) and call the + * `viewWithModuleName:initialProperties:launchOptions` method to create new RCTRootView. + */ +@interface RCTRootViewFactory : NSObject + +@property (nonatomic, strong, nullable) RCTBridge *bridge; +@property (nonatomic, strong, nullable) RCTSurfacePresenterBridgeAdapter *bridgeAdapter; + +- (instancetype)initWithConfiguration:(RCTRootViewFactoryConfiguration *)configuration + andTurboModuleManagerDelegate:(id)turboModuleManagerDelegate; + +/** + * This method can be used to create new RCTRootViews on demand. + * + * @parameter: moduleName - the name of the app, used by Metro to resolve the module. + * @parameter: initialProperties - a set of initial properties. + * @parameter: launchOptions - a dictionary with a set of options. + */ +- (UIView *_Nonnull)viewWithModuleName:(NSString *)moduleName + initialProperties:(NSDictionary *__nullable)initialProperties + launchOptions:(NSDictionary *__nullable)launchOptions; + +- (UIView *_Nonnull)viewWithModuleName:(NSString *)moduleName + initialProperties:(NSDictionary *__nullable)initialProperties; + +- (UIView *_Nonnull)viewWithModuleName:(NSString *)moduleName; + +@end + +NS_ASSUME_NONNULL_END diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm new file mode 100644 index 000000000000..7131d3f876ca --- /dev/null +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm @@ -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. + */ + +#import "RCTRootViewFactory.h" +#import +#import +#import +#import +#import +#import +#import "RCTAppDelegate.h" +#import "RCTAppSetupUtils.h" + +#if RN_DISABLE_OSS_PLUGIN_HEADER +#import +#else +#import +#endif +#import +#import +#import +#import +#import +#import +#import +#if USE_HERMES +#import +#else +#import +#endif +#import +#import +#import +#import +#import +#import +#import + +static NSString *const kRNConcurrentRoot = @"concurrentRoot"; + +static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabricEnabled) +{ + NSMutableDictionary *mutableProps = initialProps != NULL ? [initialProps mutableCopy] : [NSMutableDictionary new]; + // Hardcoding the Concurrent Root as it it not recommended to + // have the concurrentRoot turned off when Fabric is enabled. + mutableProps[kRNConcurrentRoot] = @(isFabricEnabled); + return mutableProps; +} + +@implementation RCTRootViewFactoryConfiguration + +- (instancetype)initWithBundleURL:(NSURL *)bundleURL + newArchEnabled:(BOOL)newArchEnabled + turboModuleEnabled:(BOOL)turboModuleEnabled + bridgelessEnabled:(BOOL)bridgelessEnabled +{ + return [self + initWithBundleURLBlock:^{ + return bundleURL; + } + newArchEnabled:newArchEnabled + turboModuleEnabled:turboModuleEnabled + bridgelessEnabled:bridgelessEnabled]; +} + +- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock + newArchEnabled:(BOOL)newArchEnabled + turboModuleEnabled:(BOOL)turboModuleEnabled + bridgelessEnabled:(BOOL)bridgelessEnabled +{ + if (self = [super init]) { + _bundleURLBlock = bundleURLBlock; + _fabricEnabled = newArchEnabled; + _turboModuleEnabled = turboModuleEnabled; + _bridgelessEnabled = bridgelessEnabled; + } + return self; +} + +@end + +@interface RCTRootViewFactory () { + std::shared_ptr _reactNativeConfig; + facebook::react::ContextContainer::Shared _contextContainer; +} +@end + +@interface RCTRootViewFactory () { + std::shared_ptr _runtimeScheduler; +} +@end + +@implementation RCTRootViewFactory { + RCTHost *_reactHost; + RCTRootViewFactoryConfiguration *_configuration; + __weak id _turboModuleManagerDelegate; +} + +- (instancetype)initWithConfiguration:(RCTRootViewFactoryConfiguration *)configuration + andTurboModuleManagerDelegate:(id)turboModuleManagerDelegate +{ + if (self = [super init]) { + _configuration = configuration; + _contextContainer = std::make_shared(); + _reactNativeConfig = std::make_shared(); + _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); + _turboModuleManagerDelegate = turboModuleManagerDelegate; + } + return self; +} + +- (UIView *)viewWithModuleName:(NSString *)moduleName initialProperties:(NSDictionary *)initialProperties +{ + return [self viewWithModuleName:moduleName initialProperties:initialProperties launchOptions:nil]; +} + +- (UIView *)viewWithModuleName:(NSString *)moduleName +{ + return [self viewWithModuleName:moduleName initialProperties:nil launchOptions:nil]; +} + +- (UIView *)viewWithModuleName:(NSString *)moduleName + initialProperties:(NSDictionary *)initialProperties + launchOptions:(NSDictionary *)launchOptions +{ + NSDictionary *initProps = updateInitialProps(initialProperties, self->_configuration.fabricEnabled); + + if (self->_configuration.bridgelessEnabled) { + // Enable native view config interop only if both bridgeless mode and Fabric is enabled. + RCTSetUseNativeViewConfigsInBridgelessMode(self->_configuration.fabricEnabled); + + // Enable TurboModule interop by default in Bridgeless mode + RCTEnableTurboModuleInterop(YES); + RCTEnableTurboModuleInteropBridgeProxy(YES); + + [self createReactHostIfNeeded:launchOptions]; + + RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:moduleName initialProperties:initProps]; + + RCTSurfaceHostingProxyRootView *surfaceHostingProxyRootView = [[RCTSurfaceHostingProxyRootView alloc] + initWithSurface:surface + sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact]; + + if (self->_configuration.customizeRootView != nil) { + self->_configuration.customizeRootView(surfaceHostingProxyRootView); + } + return surfaceHostingProxyRootView; + } + + [self createBridgeIfNeeded:launchOptions]; + [self createBridgeAdapterIfNeeded]; + + UIView *rootView; + if (self->_configuration.createRootViewWithBridge != nil) { + rootView = self->_configuration.createRootViewWithBridge(self.bridge, moduleName, initProps); + } else { + rootView = [self createRootViewWithBridge:self.bridge moduleName:moduleName initProps:initProps]; + } + if (self->_configuration.customizeRootView != nil) { + self->_configuration.customizeRootView(rootView); + } + return rootView; +} + +- (RCTBridge *)createBridgeWithDelegate:(id)delegate launchOptions:(NSDictionary *)launchOptions +{ + return [[RCTBridge alloc] initWithDelegate:delegate launchOptions:launchOptions]; +} + +- (UIView *)createRootViewWithBridge:(RCTBridge *)bridge + moduleName:(NSString *)moduleName + initProps:(NSDictionary *)initProps +{ + BOOL enableFabric = self->_configuration.fabricEnabled; + UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, enableFabric); + + rootView.backgroundColor = [UIColor systemBackgroundColor]; + + return rootView; +} + +#pragma mark - RCTCxxBridgeDelegate +- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge +{ + _runtimeScheduler = std::make_shared(RCTRuntimeExecutorFromBridge(bridge)); + if (RCTIsNewArchEnabled()) { + std::shared_ptr callInvoker = + std::make_shared(_runtimeScheduler); + RCTTurboModuleManager *turboModuleManager = + [[RCTTurboModuleManager alloc] initWithBridge:bridge + delegate:_turboModuleManagerDelegate + jsInvoker:callInvoker]; + _contextContainer->erase("RuntimeScheduler"); + _contextContainer->insert("RuntimeScheduler", _runtimeScheduler); + return RCTAppSetupDefaultJsExecutorFactory(bridge, turboModuleManager, _runtimeScheduler); + } else { + return RCTAppSetupJsExecutorFactoryForOldArch(bridge, _runtimeScheduler); + } +} + +- (void)createBridgeIfNeeded:(NSDictionary *)launchOptions +{ + if (self.bridge != nil) { + return; + } + + if (self->_configuration.createBridgeWithDelegate != nil) { + self.bridge = self->_configuration.createBridgeWithDelegate(self, launchOptions); + } else { + self.bridge = [self createBridgeWithDelegate:self launchOptions:launchOptions]; + } +} + +- (void)createBridgeAdapterIfNeeded +{ + if (!self->_configuration.fabricEnabled || self.bridgeAdapter) { + return; + } + + self.bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:self.bridge + contextContainer:_contextContainer]; + self.bridge.surfacePresenter = self.bridgeAdapter.surfacePresenter; +} + +#pragma mark - New Arch Utilities + +- (void)createReactHostIfNeeded:(NSDictionary *)launchOptions +{ + if (_reactHost) { + return; + } + + __weak __typeof(self) weakSelf = self; + _reactHost = [[RCTHost alloc] initWithBundleURLProvider:self->_configuration.bundleURLBlock + hostDelegate:nil + turboModuleManagerDelegate:_turboModuleManagerDelegate + jsEngineProvider:^std::shared_ptr() { + return [weakSelf createJSRuntimeFactory]; + } + launchOptions:launchOptions]; + [_reactHost setBundleURLProvider:^NSURL *() { + return [weakSelf bundleURL]; + }]; + [_reactHost setContextContainerHandler:self]; + [_reactHost start]; +} + +- (std::shared_ptr)createJSRuntimeFactory +{ +#if USE_HERMES + return std::make_shared(_reactNativeConfig, nullptr); +#else + return std::make_shared(); +#endif +} + +- (void)didCreateContextContainer:(std::shared_ptr)contextContainer +{ + contextContainer->insert("ReactNativeConfig", _reactNativeConfig); +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self bundleURL]; +} + +- (NSURL *)bundleURL +{ + return self->_configuration.bundleURLBlock(); +} + +@end diff --git a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec index 1da904f8946f..c0ef4c14abc3 100644 --- a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +++ b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec @@ -16,18 +16,17 @@ else source[:tag] = "v#{version}" end -folly_flags = ' -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1' -folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32' +folly_config = get_folly_config() +folly_compiler_flags = folly_config[:compiler_flags] +folly_version = folly_config[:version] 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"] -fabric_flag = (is_fabric_enabled ? " -DRN_FABRIC_ENABLED" : "") +is_fabric_enabled = true #is_new_arch_enabled || ENV["RCT_FABRIC_ENABLED"] hermes_flag = (use_hermes ? " -DUSE_HERMES" : "") -other_cflags = "$(inherited)" + folly_flags + new_arch_enabled_flag + fabric_flag + hermes_flag +other_cflags = "$(inherited) " + folly_compiler_flags + new_arch_enabled_flag + hermes_flag header_search_paths = [ "$(PODS_TARGET_SRCROOT)/../../ReactCommon", @@ -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" @@ -76,7 +61,7 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths, "OTHER_CPLUSPLUSFLAGS" => other_cflags, - "CLANG_CXX_LANGUAGE_STANDARD" => "c++20", + "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), "DEFINES_MODULE" => "YES" } s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""} @@ -84,49 +69,32 @@ Pod::Spec.new do |s| use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1" s.dependency "React-Core" - s.dependency "RCT-Folly" + s.dependency "RCT-Folly", folly_version 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" + s.dependency "React-Codegen" - if is_new_arch_enabled - s.dependency "React-RuntimeCore" - s.dependency "React-RuntimeApple" - if use_hermes - s.dependency "React-RuntimeHermes" - end - end + 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") + add_dependency(s, "React-RuntimeCore") + add_dependency(s, "React-RuntimeApple") + 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") + add_dependency(s, "React-featureflags") if use_hermes s.dependency "React-hermes" + s.dependency "React-RuntimeHermes" else s.dependency "React-jsc" 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" - - 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 - ", - :execution_position => :before_compile, - :input_files => ["#{ENV['APP_PATH']}/react-native.config.js"], - :output_files => ["${REACT_NATIVE_PATH}/Libraries/AppDelegate/RCTLegacyInteropComponents.mm"], - } - end end diff --git a/packages/react-native/Libraries/AppState/NativeAppState.js b/packages/react-native/Libraries/AppState/NativeAppState.js index 41c204886489..fdcebcd2f874 100644 --- a/packages/react-native/Libraries/AppState/NativeAppState.js +++ b/packages/react-native/Libraries/AppState/NativeAppState.js @@ -4,30 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; - -export type AppStateConstants = {| - initialAppState: string, -|}; - -export type AppState = {|app_state: string|}; - -export interface Spec extends TurboModule { - +getConstants: () => AppStateConstants; - +getCurrentAppState: ( - success: (appState: AppState) => void, - error: (error: Object) => void, - ) => void; - - // Events - +addListener: (eventName: string) => void; - +removeListeners: (count: number) => void; -} - -export default (TurboModuleRegistry.getEnforcing('AppState'): Spec); +export * from '../../src/private/specs/modules/NativeAppState'; +import NativeAppState from '../../src/private/specs/modules/NativeAppState'; +export default NativeAppState; diff --git a/packages/react-native/Libraries/BatchedBridge/NativeModules.js b/packages/react-native/Libraries/BatchedBridge/NativeModules.js index 26961d7f830d..612915f6ea03 100644 --- a/packages/react-native/Libraries/BatchedBridge/NativeModules.js +++ b/packages/react-native/Libraries/BatchedBridge/NativeModules.js @@ -177,7 +177,7 @@ function updateErrorWithErrorData( let NativeModules: {[moduleName: string]: $FlowFixMe, ...} = {}; if (global.nativeModuleProxy) { NativeModules = global.nativeModuleProxy; -} else if (!global.nativeExtensions) { +} else { const bridgeConfig = global.__fbBatchedBridgeConfig; invariant( bridgeConfig, diff --git a/packages/react-native/Libraries/Blob/Blob.js b/packages/react-native/Libraries/Blob/Blob.js index 98ae81ba8404..886e25733641 100644 --- a/packages/react-native/Libraries/Blob/Blob.js +++ b/packages/react-native/Libraries/Blob/Blob.js @@ -57,10 +57,7 @@ class Blob { * Currently we only support creating Blobs from other Blobs. * Reference: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob */ - constructor( - parts: Array<$ArrayBufferView | ArrayBuffer | Blob | string> = [], - options?: BlobOptions, - ) { + constructor(parts: Array = [], options?: BlobOptions) { const BlobManager = require('./BlobManager'); this.data = BlobManager.createFromParts(parts, options).data; } diff --git a/packages/react-native/Libraries/Blob/BlobManager.js b/packages/react-native/Libraries/Blob/BlobManager.js index 73deaf6f9ff5..f4c5ed374995 100644 --- a/packages/react-native/Libraries/Blob/BlobManager.js +++ b/packages/react-native/Libraries/Blob/BlobManager.js @@ -11,7 +11,6 @@ import type {BlobCollector, BlobData, BlobOptions} from './BlobTypes'; import NativeBlobModule from './NativeBlobModule'; -import {fromByteArray} from 'base64-js'; import invariant from 'invariant'; const Blob = require('./Blob'); @@ -60,7 +59,7 @@ class BlobManager { * Create blob from existing array of blobs. */ static createFromParts( - parts: Array<$ArrayBufferView | ArrayBuffer | Blob | string>, + parts: Array, options?: BlobOptions, ): Blob { invariant(NativeBlobModule, 'NativeBlobModule is available.'); @@ -68,12 +67,11 @@ class BlobManager { const blobId = uuidv4(); const items = parts.map(part => { if (part instanceof ArrayBuffer || ArrayBuffer.isView(part)) { - return { - // $FlowFixMe[incompatible-cast] - data: fromByteArray(new Uint8Array((part: ArrayBuffer))), - type: 'string', - }; - } else if (part instanceof Blob) { + throw new Error( + "Creating blobs from 'ArrayBuffer' and 'ArrayBufferView' are not supported", + ); + } + if (part instanceof Blob) { return { data: part.data, type: 'blob', diff --git a/packages/react-native/Libraries/Blob/File.js b/packages/react-native/Libraries/Blob/File.js index c89744190ad9..6f643307c5d0 100644 --- a/packages/react-native/Libraries/Blob/File.js +++ b/packages/react-native/Libraries/Blob/File.js @@ -23,7 +23,7 @@ class File extends Blob { * Constructor for JS consumers. */ constructor( - parts: Array<$ArrayBufferView | ArrayBuffer | Blob | string>, + parts: Array, name: string, options?: BlobOptions, ) { diff --git a/packages/react-native/Libraries/Blob/NativeBlobModule.js b/packages/react-native/Libraries/Blob/NativeBlobModule.js index 00a86fae31bf..1971794371d0 100644 --- a/packages/react-native/Libraries/Blob/NativeBlobModule.js +++ b/packages/react-native/Libraries/Blob/NativeBlobModule.js @@ -4,56 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getConstants: () => {|BLOB_URI_SCHEME: ?string, BLOB_URI_HOST: ?string|}; - +addNetworkingHandler: () => void; - +addWebSocketHandler: (id: number) => void; - +removeWebSocketHandler: (id: number) => void; - +sendOverSocket: (blob: Object, socketID: number) => void; - +createFromParts: (parts: Array, withId: string) => void; - +release: (blobId: string) => void; -} - -const NativeModule = TurboModuleRegistry.get('BlobModule'); - -let constants = null; -let NativeBlobModule = null; - -if (NativeModule != null) { - NativeBlobModule = { - getConstants(): {|BLOB_URI_SCHEME: ?string, BLOB_URI_HOST: ?string|} { - if (constants == null) { - constants = NativeModule.getConstants(); - } - return constants; - }, - addNetworkingHandler(): void { - NativeModule.addNetworkingHandler(); - }, - addWebSocketHandler(id: number): void { - NativeModule.addWebSocketHandler(id); - }, - removeWebSocketHandler(id: number): void { - NativeModule.removeWebSocketHandler(id); - }, - sendOverSocket(blob: Object, socketID: number): void { - NativeModule.sendOverSocket(blob, socketID); - }, - createFromParts(parts: Array, withId: string): void { - NativeModule.createFromParts(parts, withId); - }, - release(blobId: string): void { - NativeModule.release(blobId); - }, - }; -} - -export default (NativeBlobModule: ?Spec); +export * from '../../src/private/specs/modules/NativeBlobModule'; +import NativeBlobModule from '../../src/private/specs/modules/NativeBlobModule'; +export default NativeBlobModule; diff --git a/packages/react-native/Libraries/Blob/NativeFileReaderModule.js b/packages/react-native/Libraries/Blob/NativeFileReaderModule.js index e581aba74d17..9d620af0a1ba 100644 --- a/packages/react-native/Libraries/Blob/NativeFileReaderModule.js +++ b/packages/react-native/Libraries/Blob/NativeFileReaderModule.js @@ -4,19 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +readAsDataURL: (data: Object) => Promise; - +readAsText: (data: Object, encoding: string) => Promise; -} - -export default (TurboModuleRegistry.getEnforcing( - 'FileReaderModule', -): Spec); +export * from '../../src/private/specs/modules/NativeFileReaderModule'; +import NativeFileReaderModule from '../../src/private/specs/modules/NativeFileReaderModule'; +export default NativeFileReaderModule; diff --git a/packages/react-native/Libraries/Blob/RCTBlobCollector.mm b/packages/react-native/Libraries/Blob/RCTBlobCollector.mm index c9afc78057c9..9b2ca8cb3a09 100644 --- a/packages/react-native/Libraries/Blob/RCTBlobCollector.mm +++ b/packages/react-native/Libraries/Blob/RCTBlobCollector.mm @@ -21,7 +21,7 @@ { RCTBlobManager *blobManager = blobManager_; NSString *blobId = [NSString stringWithUTF8String:blobId_.c_str()]; - dispatch_async([blobManager_ methodQueue], ^{ + dispatch_async([blobManager_ executionQueue], ^{ [blobManager remove:blobId]; }); } diff --git a/packages/react-native/Libraries/Blob/RCTBlobManager.h b/packages/react-native/Libraries/Blob/RCTBlobManager.h index 317b202911df..bceb8eb5d81f 100755 --- a/packages/react-native/Libraries/Blob/RCTBlobManager.h +++ b/packages/react-native/Libraries/Blob/RCTBlobManager.h @@ -10,6 +10,8 @@ #import #import +RCT_EXTERN void RCTEnableBlobManagerProcessingQueue(BOOL enabled); + @interface RCTBlobManager : NSObject - (NSString *)store:(NSData *)data; @@ -26,4 +28,6 @@ - (void)createFromParts:(NSArray *> *)parts withId:(NSString *)blobId; +- (dispatch_queue_t)executionQueue; + @end diff --git a/packages/react-native/Libraries/Blob/RCTBlobManager.mm b/packages/react-native/Libraries/Blob/RCTBlobManager.mm index 14496f7e4910..286710d69105 100755 --- a/packages/react-native/Libraries/Blob/RCTBlobManager.mm +++ b/packages/react-native/Libraries/Blob/RCTBlobManager.mm @@ -11,6 +11,7 @@ #import #import +#import #import #import #import @@ -18,6 +19,16 @@ #import "RCTBlobCollector.h" #import "RCTBlobPlugins.h" +RCT_MOCK_DEF(RCTBlobManager, dispatch_async); +#define dispatch_async RCT_MOCK_USE(RCTBlobManager, dispatch_async) + +static BOOL gBlobManagerProcessingQueueEnabled = NO; + +RCT_EXTERN void RCTEnableBlobManagerProcessingQueue(BOOL enabled) +{ + gBlobManagerProcessingQueueEnabled = enabled; +} + static NSString *const kBlobURIScheme = @"blob"; @interface RCTBlobManager () < @@ -35,6 +46,7 @@ @implementation RCTBlobManager { std::mutex _blobsMutex; NSOperationQueue *_queue; + dispatch_queue_t _processingQueue; } RCT_EXPORT_MODULE(BlobModule) @@ -48,6 +60,10 @@ - (void)initialize std::lock_guard lock(_blobsMutex); _blobs = [NSMutableDictionary new]; + if (gBlobManagerProcessingQueueEnabled) { + _processingQueue = dispatch_queue_create("com.facebook.react.blobmanager.processing", DISPATCH_QUEUE_SERIAL); + } + facebook::react::RCTBlobCollector::install(self); } @@ -143,11 +159,11 @@ - (void)remove:(NSString *)blobId // TODO(T63516227): Why can methodQueue be nil here? // We don't want to do anything when methodQueue is nil. - if (!networking.methodQueue) { + if (![networking requestQueue]) { return; } - dispatch_async(networking.methodQueue, ^{ + dispatch_async([networking requestQueue], ^{ [networking addRequestHandler:self]; [networking addResponseHandler:self]; }); @@ -194,12 +210,22 @@ - (void)remove:(NSString *)blobId [NSException raise:@"Invalid type for blob" format:@"%@ is invalid", type]; } } - [self store:data withId:blobId]; + + dispatch_async([self executionQueue], ^{ + [self store:data withId:blobId]; + }); } RCT_EXPORT_METHOD(release : (NSString *)blobId) { - [self remove:blobId]; + dispatch_async([self executionQueue], ^{ + [self remove:blobId]; + }); +} + +- (dispatch_queue_t)executionQueue +{ + return gBlobManagerProcessingQueueEnabled ? _processingQueue : _methodQueue; } #pragma mark - RCTURLRequestHandler methods diff --git a/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm b/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm index 685d86b48d80..caa554029f73 100644 --- a/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm +++ b/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm @@ -31,7 +31,7 @@ @implementation RCTFileReaderModule : (RCTPromiseRejectBlock)reject) { RCTBlobManager *blobManager = [_moduleRegistry moduleForName:"BlobModule"]; - dispatch_async(blobManager.methodQueue, ^{ + dispatch_async([blobManager executionQueue], ^{ NSData *data = [blobManager resolve:blob]; if (data == nil) { @@ -62,7 +62,7 @@ @implementation RCTFileReaderModule : (RCTPromiseRejectBlock)reject) { RCTBlobManager *blobManager = [_moduleRegistry moduleForName:"BlobModule"]; - dispatch_async(blobManager.methodQueue, ^{ + dispatch_async([blobManager executionQueue], ^{ NSData *data = [blobManager resolve:blob]; if (data == nil) { diff --git a/packages/react-native/Libraries/Blob/React-RCTBlob.podspec b/packages/react-native/Libraries/Blob/React-RCTBlob.podspec index 932a718453db..c8eb15baf4a9 100644 --- a/packages/react-native/Libraries/Blob/React-RCTBlob.podspec +++ b/packages/react-native/Libraries/Blob/React-RCTBlob.podspec @@ -16,22 +16,18 @@ else source[:tag] = "v#{version}" end -folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -Wno-comma -Wno-shorten-64-to-32' -folly_version = '2022.05.16.00' +folly_config = get_folly_config() +folly_compiler_flags = folly_config[:compiler_flags] +folly_version = folly_config[:version] header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", + "\"$(PODS_ROOT)/boost\"", + "\"$(PODS_ROOT)/DoubleConversion\"", + "\"$(PODS_ROOT)/fmt/include\"", "\"${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 @@ -47,17 +43,22 @@ Pod::Spec.new do |s| s.header_dir = "RCTBlob" s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++20", + "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), "HEADER_SEARCH_PATHS" => header_search_paths.join(' ') } + s.dependency "DoubleConversion" + s.dependency "fmt", "9.1.0" 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, "React-jsinspector", :framework_name => 'jsinspector_modern') + 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/Blob/__tests__/Blob-test.js b/packages/react-native/Libraries/Blob/__tests__/Blob-test.js index f33667c9ed64..303fe1d9fb66 100644 --- a/packages/react-native/Libraries/Blob/__tests__/Blob-test.js +++ b/packages/react-native/Libraries/Blob/__tests__/Blob-test.js @@ -15,7 +15,6 @@ jest.setMock('../../BatchedBridge/NativeModules', { }); const Blob = require('../Blob'); -const {fromByteArray} = require('base64-js'); describe('Blob', function () { it('should create empty blob', () => { @@ -27,7 +26,7 @@ describe('Blob', function () { expect(blob.type).toBe(''); }); - it('should create blob from ArrayBuffer, other blobs, strings', () => { + it('should create blob from other blobs and strings', () => { const blobA = new Blob(); const blobB = new Blob(); const textA = 'i \u2665 dogs'; @@ -44,20 +43,14 @@ describe('Blob', function () { blobA.data.size = 34540; blobB.data.size = 65452; - const buffer = new ArrayBuffer(4); - - const blob = new Blob([blobA, blobB, textA, textB, textC, buffer]); + const blob = new Blob([blobA, blobB, textA, textB, textC]); expect(blob.size).toBe( blobA.size + blobB.size + global.Buffer.byteLength(textA, 'UTF-8') + global.Buffer.byteLength(textB, 'UTF-8') + - global.Buffer.byteLength(textC, 'UTF-8') + - global.Buffer.byteLength( - fromByteArray(new Uint8Array(buffer)), - 'UTF-8', - ), + global.Buffer.byteLength(textC, 'UTF-8'), ); expect(blob.type).toBe(''); }); diff --git a/packages/react-native/Libraries/Blob/__tests__/BlobRegistry-test.js b/packages/react-native/Libraries/Blob/__tests__/BlobRegistry-test.js index 0e88734532e4..0f80035d3799 100644 --- a/packages/react-native/Libraries/Blob/__tests__/BlobRegistry-test.js +++ b/packages/react-native/Libraries/Blob/__tests__/BlobRegistry-test.js @@ -1,3 +1,13 @@ +/** + * Copyright (c) Meta Platforms, Inc. and 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 BlobRegistry = require('../BlobRegistry'); diff --git a/packages/react-native/Libraries/BugReporting/NativeBugReporting.js b/packages/react-native/Libraries/BugReporting/NativeBugReporting.js index f886208de3d3..ca0edbf81af0 100644 --- a/packages/react-native/Libraries/BugReporting/NativeBugReporting.js +++ b/packages/react-native/Libraries/BugReporting/NativeBugReporting.js @@ -4,18 +4,10 @@ * 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 - * @flow */ -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +startReportAProblemFlow: () => void; - +setExtraData: (extraData: Object, extraFiles: Object) => void; - +setCategoryID: (categoryID: string) => void; -} - -export default (TurboModuleRegistry.get('BugReporting'): ?Spec); +export * from '../../src/private/specs/modules/NativeBugReporting'; +import NativeBugReporting from '../../src/private/specs/modules/NativeBugReporting'; +export default NativeBugReporting; diff --git a/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js b/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js index e4661589749a..5e310f430423 100644 --- a/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +++ b/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js @@ -8,26 +8,6 @@ * @format */ -import type {TurboModule} from '../../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +isReduceMotionEnabled: ( - onSuccess: (isReduceMotionEnabled: boolean) => void, - ) => void; - +isTouchExplorationEnabled: ( - onSuccess: (isScreenReaderEnabled: boolean) => void, - ) => void; - +isAccessibilityServiceEnabled?: ?( - onSuccess: (isAccessibilityServiceEnabled: boolean) => void, - ) => void; - +setAccessibilityFocus: (reactTag: number) => void; - +announceForAccessibility: (announcement: string) => void; - +getRecommendedTimeoutMillis?: ( - mSec: number, - onSuccess: (recommendedTimeoutMillis: number) => void, - ) => void; -} - -export default (TurboModuleRegistry.get('AccessibilityInfo'): ?Spec); +export * from '../../../src/private/specs/modules/NativeAccessibilityInfo'; +import NativeAccessibilityInfo from '../../../src/private/specs/modules/NativeAccessibilityInfo'; +export default NativeAccessibilityInfo; diff --git a/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js b/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js index f815b18c97ba..7cbe73f6186b 100644 --- a/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +++ b/packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js @@ -4,63 +4,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow + * @flow strict-local * @format */ -import type {TurboModule} from '../../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getCurrentBoldTextState: ( - onSuccess: (isBoldTextEnabled: boolean) => void, - onError: (error: Object) => void, - ) => void; - +getCurrentGrayscaleState: ( - onSuccess: (isGrayscaleEnabled: boolean) => void, - onError: (error: Object) => void, - ) => void; - +getCurrentInvertColorsState: ( - onSuccess: (isInvertColorsEnabled: boolean) => void, - onError: (error: Object) => void, - ) => void; - +getCurrentReduceMotionState: ( - onSuccess: (isReduceMotionEnabled: boolean) => void, - onError: (error: Object) => void, - ) => void; - +getCurrentPrefersCrossFadeTransitionsState?: ( - onSuccess: (prefersCrossFadeTransitions: boolean) => void, - onError: (error: Object) => void, - ) => void; - +getCurrentReduceTransparencyState: ( - onSuccess: (isReduceTransparencyEnabled: boolean) => void, - onError: (error: Object) => void, - ) => void; - +getCurrentVoiceOverState: ( - onSuccess: (isScreenReaderEnabled: boolean) => void, - onError: (error: Object) => void, - ) => void; - +setAccessibilityContentSizeMultipliers: (JSMultipliers: {| - +extraSmall?: ?number, - +small?: ?number, - +medium?: ?number, - +large?: ?number, - +extraLarge?: ?number, - +extraExtraLarge?: ?number, - +extraExtraExtraLarge?: ?number, - +accessibilityMedium?: ?number, - +accessibilityLarge?: ?number, - +accessibilityExtraLarge?: ?number, - +accessibilityExtraExtraLarge?: ?number, - +accessibilityExtraExtraExtraLarge?: ?number, - |}) => void; - +setAccessibilityFocus: (reactTag: number) => void; - +announceForAccessibility: (announcement: string) => void; - +announceForAccessibilityWithOptions?: ( - announcement: string, - options: {queue?: boolean}, - ) => void; -} - -export default (TurboModuleRegistry.get('AccessibilityManager'): ?Spec); +export * from '../../../src/private/specs/modules/NativeAccessibilityManager'; +import NativeAccessibilityManager from '../../../src/private/specs/modules/NativeAccessibilityManager'; +export default NativeAccessibilityManager; diff --git a/packages/react-native/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js b/packages/react-native/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js index 09556be26a46..fdbabb475c7f 100644 --- a/packages/react-native/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js +++ b/packages/react-native/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js @@ -9,6 +9,7 @@ */ import UIManager from '../../ReactNative/UIManager'; +import nullthrows from 'nullthrows'; /** * This is a function exposed to the React Renderer that can be used by the @@ -19,13 +20,13 @@ function legacySendAccessibilityEvent( eventType: string, ): void { if (eventType === 'focus') { - UIManager.sendAccessibilityEvent( + nullthrows(UIManager.sendAccessibilityEvent)( reactTag, UIManager.getConstants().AccessibilityEventTypes.typeViewFocused, ); } if (eventType === 'click') { - UIManager.sendAccessibilityEvent( + nullthrows(UIManager.sendAccessibilityEvent)( reactTag, UIManager.getConstants().AccessibilityEventTypes.typeViewClicked, ); diff --git a/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js b/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js index 655d13d67ce4..7f724524add5 100644 --- a/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js +++ b/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js @@ -6,7 +6,6 @@ * * @format * @flow - * @generate-docs */ 'use strict'; @@ -125,9 +124,9 @@ const ActivityIndicator = ( /** Displays a circular loading indicator. - ```SnackPlayer name=ActivityIndicator%20Function%20Component%20Example - import React from "react"; - import { ActivityIndicator, StyleSheet, Text, View } from "react-native"; + ```SnackPlayer name=ActivityIndicator%20Example + import React from 'react'; + import {ActivityIndicator, StyleSheet, View} from 'react-native'; const App = () => ( @@ -141,47 +140,17 @@ const ActivityIndicator = ( const styles = StyleSheet.create({ container: { flex: 1, - justifyContent: "center" + justifyContent: 'center', }, horizontal: { - flexDirection: "row", - justifyContent: "space-around", - padding: 10 - } - }); - export default App; - ``` - - ```SnackPlayer name=ActivityIndicator%20Class%20Component%20Example - import React, { Component } from "react"; - import { ActivityIndicator, StyleSheet, Text, View } from "react-native"; - - class App extends Component { - render() { - return ( - - - - - - - ); - } - } - - const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: "center" + flexDirection: 'row', + justifyContent: 'space-around', + padding: 10, }, - horizontal: { - flexDirection: "row", - justifyContent: "space-around", - padding: 10 - } }); + export default App; - ``` +``` */ const ActivityIndicatorWithRef: React.AbstractComponent< diff --git a/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js b/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js index 7394582902dc..6a7a7e7367b4 100644 --- a/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +++ b/packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js @@ -8,46 +8,6 @@ * @flow strict-local */ -import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; -import type {ColorValue} from '../../StyleSheet/StyleSheet'; -import type {WithDefault} from '../../Types/CodegenTypes'; -import type {ViewProps} from '../View/ViewPropTypes'; - -import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; - -type NativeProps = $ReadOnly<{| - ...ViewProps, - - /** - * Whether the indicator should hide when not animating (true by default). - * - * See https://reactnative.dev/docs/activityindicator#hideswhenstopped - */ - hidesWhenStopped?: WithDefault, - - /** - * Whether to show the indicator (true, the default) or hide it (false). - * - * See https://reactnative.dev/docs/activityindicator#animating - */ - animating?: WithDefault, - - /** - * The foreground color of the spinner (default is gray). - * - * See https://reactnative.dev/docs/activityindicator#color - */ - color?: ?ColorValue, - - /** - * Size of the indicator (default is 'small'). - * Passing a number to the size prop is only supported on Android. - * - * See https://reactnative.dev/docs/activityindicator#size - */ - size?: WithDefault<'small' | 'large', 'small'>, -|}>; - -export default (codegenNativeComponent('ActivityIndicatorView', { - paperComponentName: 'RCTActivityIndicatorView', -}): HostComponent); +export * from '../../../src/private/specs/components/ActivityIndicatorViewNativeComponent'; +import ActivityIndicatorViewNativeComponent from '../../../src/private/specs/components/ActivityIndicatorViewNativeComponent'; +export default ActivityIndicatorViewNativeComponent; diff --git a/packages/react-native/Libraries/Components/Button.flow.js b/packages/react-native/Libraries/Components/Button.flow.js deleted file mode 100644 index 777c546508d7..000000000000 --- a/packages/react-native/Libraries/Components/Button.flow.js +++ /dev/null @@ -1,265 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and 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 - * @generate-docs - */ - -'use strict'; - -import type {PressEvent} from '../Types/CoreEventTypes'; -import type { - AccessibilityActionEvent, - AccessibilityActionInfo, - AccessibilityState, -} from './View/ViewAccessibility'; - -import {type ColorValue} from '../StyleSheet/StyleSheet'; -import * as React from 'react'; - -type ButtonProps = $ReadOnly<{| - /** - Text to display inside the button. On Android the given title will be - converted to the uppercased form. - */ - title: string, - - /** - Handler to be called when the user taps the button. The first function - argument is an event in form of [PressEvent](pressevent). - */ - onPress: (event?: PressEvent) => mixed, - - /** - If `true`, doesn't play system sound on touch. - - @platform android - - @default false - */ - touchSoundDisabled?: ?boolean, - - /** - Color of the text (iOS), or background color of the button (Android). - - @default {@platform android} '#2196F3' - @default {@platform ios} '#007AFF' - */ - color?: ?ColorValue, - - /** - TV preferred focus. - - @platform tv - - @default false - */ - hasTVPreferredFocus?: ?boolean, - - /** - Designates the next view to receive focus when the user navigates down. See - the [Android documentation][android:nextFocusDown]. - - [android:nextFocusDown]: - https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusDown - - @platform android, tv - */ - nextFocusDown?: ?number, - - /** - Designates the next view to receive focus when the user navigates forward. - See the [Android documentation][android:nextFocusForward]. - - [android:nextFocusForward]: - https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusForward - - @platform android, tv - */ - nextFocusForward?: ?number, - - /** - Designates the next view to receive focus when the user navigates left. See - the [Android documentation][android:nextFocusLeft]. - - [android:nextFocusLeft]: - https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusLeft - - @platform android, tv - */ - nextFocusLeft?: ?number, - - /** - Designates the next view to receive focus when the user navigates right. See - the [Android documentation][android:nextFocusRight]. - - [android:nextFocusRight]: - https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusRight - - @platform android, tv - */ - nextFocusRight?: ?number, - - /** - Designates the next view to receive focus when the user navigates up. See - the [Android documentation][android:nextFocusUp]. - - [android:nextFocusUp]: - https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusUp - - @platform android, tv - */ - nextFocusUp?: ?number, - - /** - Text to display for blindness accessibility features. - */ - accessibilityLabel?: ?string, - /** - * Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel - * https://github.com/facebook/react-native/issues/34424 - */ - 'aria-label'?: ?string, - /** - If `true`, disable all interactions for this component. - - @default false - */ - disabled?: ?boolean, - - /** - Used to locate this view in end-to-end tests. - */ - testID?: ?string, - - /** - * Accessibility props. - */ - accessible?: ?boolean, - accessibilityActions?: ?$ReadOnlyArray, - onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed, - accessibilityState?: ?AccessibilityState, - - /** - * [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. - */ - importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'), - accessibilityHint?: ?string, - accessibilityLanguage?: ?Stringish, -|}>; - -/** - A basic button component that should render nicely on any platform. Supports a - minimal level of customization. - - If this button doesn't look right for your app, you can build your own button - using [TouchableOpacity](touchableopacity) or - [TouchableWithoutFeedback](touchablewithoutfeedback). For inspiration, look at - the [source code for this button component][button:source]. Or, take a look at - the [wide variety of button components built by the community] - [button:examples]. - - [button:source]: - https://github.com/facebook/react-native/blob/HEAD/Libraries/Components/Button.js - - [button:examples]: - https://js.coach/?menu%5Bcollections%5D=React%20Native&page=1&query=button - - ```jsx -