mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aaff0d37e2 | ||
|
|
16a89816fc |
+2
-1
@@ -48,6 +48,7 @@ packages/react-native/flow/
|
||||
[options]
|
||||
enums=true
|
||||
experimental.pattern_matching=true
|
||||
experimental.pattern_matching.includes=<PROJECT_ROOT>/packages/react-native/src/private/components/virtualview/
|
||||
casting_syntax=both
|
||||
component_syntax=true
|
||||
|
||||
@@ -104,4 +105,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.275.0
|
||||
^0.274.0
|
||||
|
||||
@@ -129,7 +129,7 @@ runs:
|
||||
run: yarn build
|
||||
- name: Build types
|
||||
shell: bash
|
||||
run: yarn build-types --skip-snapshot
|
||||
run: yarn build-types
|
||||
# Continue with publish steps
|
||||
- name: Set npm credentials
|
||||
if: ${{ inputs.release-type == 'release' ||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: diff-js-api-breaking-changes
|
||||
description: Check for breaking changes in the public React Native JS API
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Fetch snapshot from PR head
|
||||
shell: bash
|
||||
env:
|
||||
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
|
||||
run: |
|
||||
mkdir $SCRATCH_DIR
|
||||
git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
|
||||
git show ${{ github.event.pull_request.head.sha }}:packages/react-native/ReactNativeApi.d.ts > $SCRATCH_DIR/ReactNativeApi-after.d.ts \
|
||||
|| echo "" > $SCRATCH_DIR/ReactNativeApi.d.ts
|
||||
- name: Run breaking change detection
|
||||
shell: bash
|
||||
env:
|
||||
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
|
||||
run: |
|
||||
node ./scripts/js-api/diff-api-snapshot \
|
||||
${{ github.workspace }}/packages/react-native/ReactNativeApi.d.ts \
|
||||
$SCRATCH_DIR/ReactNativeApi-after.d.ts \
|
||||
> $SCRATCH_DIR/output.json
|
||||
@@ -49,7 +49,7 @@ runs:
|
||||
run: yarn run lint-markdown
|
||||
- name: Build types
|
||||
shell: bash
|
||||
run: yarn build-types --skip-snapshot
|
||||
run: yarn build-types
|
||||
- name: Run typescript check of generated types
|
||||
shell: bash
|
||||
run: yarn test-generated-typescript
|
||||
|
||||
@@ -22,8 +22,6 @@ jobs:
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Run yarn install
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Run diff-js-api-breaking-changes
|
||||
uses: ./.github/actions/diff-js-api-breaking-changes
|
||||
- name: Danger
|
||||
run: yarn danger ci --use-github-checks --failOnErrors
|
||||
working-directory: private/react-native-bots
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
- name: Build packages
|
||||
run: yarn build
|
||||
- name: Build types
|
||||
run: yarn build-types --skip-snapshot
|
||||
run: yarn build-types
|
||||
- name: Set NPM auth token
|
||||
run: echo "//registry.npmjs.org/:_authToken=$GHA_NPM_TOKEN" > ~/.npmrc
|
||||
- name: Find and publish all bumped packages
|
||||
|
||||
@@ -175,6 +175,3 @@ fix_*.patch
|
||||
|
||||
# [Experimental] Generated TS type definitions
|
||||
/packages/**/types_generated/
|
||||
|
||||
/packages/debugger-shell/build/
|
||||
/packages/*/dist/
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# Changelog (pre 0.80)
|
||||
|
||||
## v0.79.5
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Flow:** Publish top-level Flow types for `react-native` ([fbbd20dd63](https://github.com/facebook/react-native/commit/fbbd20dd632acd72d2abe861dd4a0e6e98437cf2) by [@buschco](https://github.com/buschco))
|
||||
|
||||
## v0.79.4
|
||||
|
||||
### Fixed
|
||||
-892
@@ -1,21 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## v0.80.1
|
||||
|
||||
### Added
|
||||
|
||||
- **Flow:** Publish top-level Flow types for `react-native` ([fbbd20dd63](https://github.com/facebook/react-native/commit/fbbd20dd632acd72d2abe861dd4a0e6e98437cf2) by [@buschco](https://github.com/buschco))
|
||||
- **Flow:** Fix typo when publishing Flow types for `react-native` ([50667eceb1](https://github.com/facebook/react-native/commit/50667eceb1be4771375d6a3cc2f4e42d4d8aad3a) by [@aswinandro](https://github.com/aswinandro))
|
||||
|
||||
### Fixed
|
||||
|
||||
- **jest:** Fix missing RefreshControlMock source in Jest preset ([6044e01460](https://github.com/facebook/react-native/commit/6044e01460a065845d4178f0fdc54a601ce4c07e) by [@huntie](https://github.com/huntie))
|
||||
|
||||
#### Android specific
|
||||
|
||||
- **runtime:** Fix crash on ReactInstance due to null returned for getViewManagerNames ([f6b7bd93d8](https://github.com/facebook/react-native/commit/f6b7bd93d8d0d2095669144c8de438cf64d8e73f) by [@cortinico](https://github.com/cortinico))
|
||||
- **TurboModules:** Emitting event from turbo module crashes on 32bit android ([36ddf853c3](https://github.com/facebook/react-native/commit/36ddf853c381966645789bc814fc2f6bb4d74cd2) by [@vladimirivanoviliev](https://github.com/vladimirivanoviliev))
|
||||
|
||||
## v0.80.0
|
||||
|
||||
### Breaking
|
||||
@@ -333,879 +317,3 @@
|
||||
- **Text:** Correctly announce "link" on nested text if its the entire text element ([bffb414291](https://github.com/facebook/react-native/commit/bffb414291cfbd3d6e3e51448dd68b7bddddf658) by [@joevilches](https://github.com/joevilches))
|
||||
- **Text:** Selection range not respected when changing text or selection when selection is forced ([d32ea66e6a](https://github.com/facebook/react-native/commit/d32ea66e6a945dd84092532401b265b12d482668) by Olivier Bouillet)
|
||||
- **TextInput:** Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture ([5fd5188172](https://github.com/facebook/react-native/commit/5fd51881727b2d86f87abf04db032940ac0ec8c4) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
|
||||
## v0.79.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0795)
|
||||
|
||||
## v0.79.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0794)
|
||||
|
||||
## v0.79.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0793)
|
||||
|
||||
## v0.79.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0792)
|
||||
|
||||
## v0.79.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0791)
|
||||
|
||||
## v0.79.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0790)
|
||||
|
||||
## v0.78.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0782)
|
||||
|
||||
## v0.78.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0781)
|
||||
|
||||
## v0.78.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0780)
|
||||
|
||||
## v0.77.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0772)
|
||||
|
||||
## v0.77.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0771)
|
||||
|
||||
## v0.77.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0770)
|
||||
|
||||
## v0.76.9
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0769)
|
||||
|
||||
## v0.76.8
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0768)
|
||||
|
||||
## v0.76.7
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0767)
|
||||
|
||||
## v0.76.6
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0766)
|
||||
|
||||
## v0.76.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0765)
|
||||
|
||||
## v0.76.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0764)
|
||||
|
||||
## v0.76.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0763)
|
||||
|
||||
## v0.76.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0762)
|
||||
|
||||
## v0.76.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0761)
|
||||
|
||||
## v0.76.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0760)
|
||||
|
||||
## v0.75.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0755)
|
||||
|
||||
## v0.75.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0754)
|
||||
|
||||
## v0.75.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0753)
|
||||
|
||||
## v0.75.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0752)
|
||||
|
||||
## v0.75.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0751)
|
||||
|
||||
## v0.75.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0750)
|
||||
|
||||
## v0.74.7
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0747)
|
||||
|
||||
## v0.74.6
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0746)
|
||||
|
||||
## v0.74.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0745)
|
||||
|
||||
## v0.74.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0744)
|
||||
|
||||
## v0.74.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0743)
|
||||
|
||||
## v0.74.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0742)
|
||||
|
||||
## v0.74.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0741)
|
||||
|
||||
## v0.74.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0740)
|
||||
|
||||
## v0.73.11
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07311)
|
||||
|
||||
## v0.73.10
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07310)
|
||||
|
||||
## v0.73.9
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0739)
|
||||
|
||||
## v0.73.8
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0738)
|
||||
|
||||
## v0.73.7
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0737)
|
||||
|
||||
## v0.73.6
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0736)
|
||||
|
||||
## v0.73.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0735)
|
||||
|
||||
## v0.73.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0734)
|
||||
|
||||
## v0.73.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0733)
|
||||
|
||||
## v0.73.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0732)
|
||||
|
||||
## v0.73.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0731)
|
||||
|
||||
## v0.73.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0730)
|
||||
|
||||
## v0.72.17
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07217)
|
||||
|
||||
## v0.72.16
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07216)
|
||||
|
||||
## v0.72.15
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07215)
|
||||
|
||||
## v0.72.14
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07214)
|
||||
|
||||
## v0.72.13
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07213)
|
||||
|
||||
## v0.72.12
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07212)
|
||||
|
||||
## v0.72.11
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07211)
|
||||
|
||||
## v0.72.10
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07210)
|
||||
|
||||
## v0.72.9
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0729)
|
||||
|
||||
## v0.72.8
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0728)
|
||||
|
||||
## v0.72.7
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0727)
|
||||
|
||||
## v0.72.6
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0726)
|
||||
|
||||
## v0.72.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0725)
|
||||
|
||||
## v0.72.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0724)
|
||||
|
||||
## v0.72.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0723)
|
||||
|
||||
## v0.72.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0722)
|
||||
|
||||
## v0.72.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0721)
|
||||
|
||||
## v0.72.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0720)
|
||||
|
||||
## v0.71.19
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07119)
|
||||
|
||||
## v0.71.18
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07118)
|
||||
|
||||
## v0.71.17
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07117)
|
||||
|
||||
## v0.71.16
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07116)
|
||||
|
||||
## v0.71.15
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07115)
|
||||
|
||||
## v0.71.14
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07114)
|
||||
|
||||
## v0.71.13
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07113)
|
||||
|
||||
## v0.71.12
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07112)
|
||||
|
||||
## v0.71.11
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07111)
|
||||
|
||||
## v0.71.10
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07110)
|
||||
|
||||
## v0.71.9
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0719)
|
||||
|
||||
## v0.71.8
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0718)
|
||||
|
||||
## v0.71.7
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0717)
|
||||
|
||||
## v0.71.6
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0716)
|
||||
|
||||
## v0.71.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0715)
|
||||
|
||||
## v0.71.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0714)
|
||||
|
||||
## v0.71.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0713)
|
||||
|
||||
## v0.71.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0712)
|
||||
|
||||
## v0.71.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0711)
|
||||
|
||||
## v0.71.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0710)
|
||||
|
||||
## v0.70.15
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07015)
|
||||
|
||||
## v0.70.14
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07014)
|
||||
|
||||
## v0.70.13
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07013)
|
||||
|
||||
## v0.70.12
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07012)
|
||||
|
||||
## v0.70.11
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07011)
|
||||
|
||||
## v0.70.10
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v07010)
|
||||
|
||||
## v0.70.9
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0709)
|
||||
|
||||
## v0.70.8
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0708)
|
||||
|
||||
## v0.70.7
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0707)
|
||||
|
||||
## v0.70.6
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0706)
|
||||
|
||||
## v0.70.5
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0705)
|
||||
|
||||
## v0.70.4
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0704)
|
||||
|
||||
## v0.70.3
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0703)
|
||||
|
||||
## v0.70.2
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0702)
|
||||
|
||||
## v0.70.1
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0701)
|
||||
|
||||
## v0.70.0
|
||||
|
||||
See [CHANGELOG-0.7x](./CHANGELOG-0.7x#v0700)
|
||||
|
||||
## v0.69.12
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v06912)
|
||||
|
||||
## v0.69.11
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v06911)
|
||||
|
||||
## v0.69.10
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v06910)
|
||||
|
||||
## v0.69.9
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0699)
|
||||
|
||||
## v0.69.8
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0698)
|
||||
|
||||
## v0.69.7
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0697)
|
||||
|
||||
## v0.69.6
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0696)
|
||||
|
||||
## v0.69.5
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0695)
|
||||
|
||||
## v0.69.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0694)
|
||||
|
||||
## v0.69.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0693)
|
||||
|
||||
## v0.69.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0692)
|
||||
|
||||
## v0.69.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0691)
|
||||
|
||||
## v0.69.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0690)
|
||||
|
||||
## v0.68.7
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0687)
|
||||
|
||||
## v0.68.6
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0686)
|
||||
|
||||
## v0.68.5
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0685)
|
||||
|
||||
## v0.68.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0684)
|
||||
|
||||
## v0.68.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0683)
|
||||
|
||||
## v0.68.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0682)
|
||||
|
||||
## v0.68.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0681)
|
||||
|
||||
## v0.68.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0680)
|
||||
|
||||
## v0.67.5
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0675)
|
||||
|
||||
## v0.67.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0674)
|
||||
|
||||
## v0.67.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0673)
|
||||
|
||||
## v0.67.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0672)
|
||||
|
||||
## v0.67.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0671)
|
||||
|
||||
## v0.67.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0670)
|
||||
|
||||
## v0.66.5
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0665)
|
||||
|
||||
## v0.66.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0664)
|
||||
|
||||
## v0.66.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0663)
|
||||
|
||||
## v0.66.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0662)
|
||||
|
||||
## v0.66.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0661)
|
||||
|
||||
## v0.66.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0660)
|
||||
|
||||
## v0.65.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0653)
|
||||
|
||||
## v0.65.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0652)
|
||||
|
||||
## v0.65.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0651)
|
||||
|
||||
## v0.65.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0650)
|
||||
|
||||
## v0.64.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0644)
|
||||
|
||||
## v0.64.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0643)
|
||||
|
||||
## v0.64.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0642)
|
||||
|
||||
## v0.64.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0641)
|
||||
|
||||
## v0.64.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0640)
|
||||
|
||||
## v0.63.5
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0635)
|
||||
|
||||
## v0.63.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0634)
|
||||
|
||||
## v0.63.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0633)
|
||||
|
||||
## v0.63.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0632)
|
||||
|
||||
## v0.63.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0631)
|
||||
|
||||
## v0.63.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0630)
|
||||
|
||||
## v0.62.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0623)
|
||||
|
||||
## v0.62.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0622)
|
||||
|
||||
## v0.62.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0621)
|
||||
|
||||
## v0.62.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0620)
|
||||
|
||||
## v0.61.5
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0615)
|
||||
|
||||
## v0.61.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0614)
|
||||
|
||||
## v0.61.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0613)
|
||||
|
||||
## v0.61.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0612)
|
||||
|
||||
## v0.61.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0611)
|
||||
|
||||
## v0.61.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0610)
|
||||
|
||||
## v0.60.6
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0606)
|
||||
|
||||
## v0.60.5
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0605)
|
||||
|
||||
## v0.60.4
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0604)
|
||||
|
||||
## v0.60.3
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0603)
|
||||
|
||||
## v0.60.2
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0602)
|
||||
|
||||
## v0.60.1
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0601)
|
||||
|
||||
## v0.60.0
|
||||
|
||||
See [CHANGELOG-0.6x](./CHANGELOG-0.6x#v0600)
|
||||
|
||||
## v0.59.10
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v05910)
|
||||
|
||||
## v0.59.9
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0599)
|
||||
|
||||
## v0.59.8
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0598)
|
||||
|
||||
## v0.59.5
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0595)
|
||||
|
||||
## v0.59.4
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0594)
|
||||
|
||||
## v0.59.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0593)
|
||||
|
||||
## v0.59.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0592)
|
||||
|
||||
## v0.59.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0591)
|
||||
|
||||
## v0.59.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0590)
|
||||
|
||||
## v0.58.6
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0586)
|
||||
|
||||
## v0.58.5
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0585)
|
||||
|
||||
## v0.58.4
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0584)
|
||||
|
||||
## v0.58.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0583)
|
||||
|
||||
## v0.58.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0582)
|
||||
|
||||
## v0.58.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0581)
|
||||
|
||||
## v0.58.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0580)
|
||||
|
||||
## v0.57.8
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0578)
|
||||
|
||||
## v0.57.7
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0577)
|
||||
|
||||
## v0.57.6
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0576)
|
||||
|
||||
## v0.57.5
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0575)
|
||||
|
||||
## v0.57.4
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0574)
|
||||
|
||||
## v0.57.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0573)
|
||||
|
||||
## v0.57.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0572)
|
||||
|
||||
## v0.57.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0571)
|
||||
|
||||
## v0.57.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0570)
|
||||
|
||||
## v0.56.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0561)
|
||||
|
||||
## v0.56.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0560)
|
||||
|
||||
## v0.55.4
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0554)
|
||||
|
||||
## v0.55.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0553)
|
||||
|
||||
## v0.55.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0552)
|
||||
|
||||
## v0.55.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0551)
|
||||
|
||||
## v0.55.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0550)
|
||||
|
||||
## v0.54.4
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0544)
|
||||
|
||||
## v0.54.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0543)
|
||||
|
||||
## v0.54.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0542)
|
||||
|
||||
## v0.54.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0541)
|
||||
|
||||
## v0.54.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0540)
|
||||
|
||||
## v0.53.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0533)
|
||||
|
||||
## v0.53.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0532)
|
||||
|
||||
## v0.53.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0531)
|
||||
|
||||
## v0.53.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0530)
|
||||
|
||||
## v0.52.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0523)
|
||||
|
||||
## v0.52.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0522)
|
||||
|
||||
## v0.52.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0521)
|
||||
|
||||
## v0.52.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0520)
|
||||
|
||||
## v0.51.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0511)
|
||||
|
||||
## v0.51.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0510)
|
||||
|
||||
## v0.50.4
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0504)
|
||||
|
||||
## v0.50.3
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0503)
|
||||
|
||||
## v0.50.2
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0502)
|
||||
|
||||
## v0.50.1
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0501)
|
||||
|
||||
## v0.50.0
|
||||
|
||||
See [CHANGELOG-0.5x](./CHANGELOG-0.5x#v0500)
|
||||
|
||||
-149
@@ -1,149 +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 strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
declare module '@electron/packager' {
|
||||
declare export type AsarOptions = $FlowFixMe;
|
||||
|
||||
declare export type ElectronDownloadRequestOptions = $FlowFixMe;
|
||||
|
||||
declare export type TargetDefinition = {
|
||||
arch: TargetArch,
|
||||
platform: TargetPlatform,
|
||||
};
|
||||
|
||||
declare export type FinalizePackageTargetsHookFunction = (
|
||||
targets: TargetDefinition[],
|
||||
callback: HookFunctionErrorCallback,
|
||||
) => void;
|
||||
|
||||
declare export type HookFunction = (
|
||||
buildPath: string,
|
||||
electronVersion: string,
|
||||
platform: TargetPlatform,
|
||||
arch: TargetArch,
|
||||
callback: HookFunctionErrorCallback,
|
||||
) => void;
|
||||
|
||||
declare export type IgnoreFunction = (path: string) => boolean;
|
||||
|
||||
declare export type HookFunctionErrorCallback = (err?: Error | null) => void;
|
||||
|
||||
declare export interface MacOSProtocol {
|
||||
name: string;
|
||||
schemes: string[];
|
||||
}
|
||||
|
||||
declare export type NotaryToolCredentials = $FlowFixMe;
|
||||
|
||||
declare export type OsxSignOptions = $FlowFixMe;
|
||||
|
||||
declare export type OsxUniversalOptions = $FlowFixMe;
|
||||
|
||||
declare export type Win32MetadataOptions = $ReadOnly<{
|
||||
CompanyName?: string,
|
||||
FileDescription?: string,
|
||||
OriginalFilename?: string,
|
||||
ProductName?: string,
|
||||
InternalName?: string,
|
||||
'requested-execution-level'?:
|
||||
| 'asInvoker'
|
||||
| 'highestAvailable'
|
||||
| 'requireAdministrator',
|
||||
'application-manifest'?: string,
|
||||
}>;
|
||||
|
||||
declare export type WindowsSignOptions = $FlowFixMe;
|
||||
|
||||
declare export type OfficialArch =
|
||||
| 'ia32'
|
||||
| 'x64'
|
||||
| 'armv7l'
|
||||
| 'arm64'
|
||||
| 'mips64el'
|
||||
| 'universal';
|
||||
|
||||
declare export type OfficialPlatform = 'linux' | 'win32' | 'darwin' | 'mas';
|
||||
|
||||
declare export type TargetArch = OfficialArch | string;
|
||||
|
||||
declare export type TargetPlatform = OfficialPlatform | string;
|
||||
|
||||
declare export type ArchOption = TargetArch | 'all';
|
||||
|
||||
declare export type PlatformOption = TargetPlatform | 'all';
|
||||
|
||||
declare export interface Options {
|
||||
dir: string;
|
||||
afterAsar?: HookFunction[];
|
||||
afterComplete?: HookFunction[];
|
||||
afterCopy?: HookFunction[];
|
||||
afterCopyExtraResources?: HookFunction[];
|
||||
afterExtract?: HookFunction[];
|
||||
afterFinalizePackageTargets?: FinalizePackageTargetsHookFunction[];
|
||||
afterInitialize?: HookFunction[];
|
||||
afterPrune?: HookFunction[];
|
||||
all?: boolean;
|
||||
appBundleId?: string;
|
||||
appCategoryType?: string;
|
||||
appCopyright?: string;
|
||||
appVersion?: string;
|
||||
arch?: ArchOption | ArchOption[];
|
||||
asar?: boolean | AsarOptions;
|
||||
beforeAsar?: HookFunction[];
|
||||
beforeCopy?: HookFunction[];
|
||||
beforeCopyExtraResources?: HookFunction[];
|
||||
buildVersion?: string;
|
||||
darwinDarkModeSupport?: boolean;
|
||||
derefSymlinks?: boolean;
|
||||
download?: ElectronDownloadRequestOptions;
|
||||
electronVersion?: string;
|
||||
electronZipDir?: string;
|
||||
executableName?: string;
|
||||
extendHelperInfo?:
|
||||
| string
|
||||
| {
|
||||
[property: string]: any,
|
||||
};
|
||||
extendInfo?:
|
||||
| string
|
||||
| {
|
||||
[property: string]: any,
|
||||
};
|
||||
extraResource?: string | string[];
|
||||
helperBundleId?: string;
|
||||
icon?: string;
|
||||
ignore?: RegExp | (string | RegExp)[] | IgnoreFunction;
|
||||
junk?: boolean;
|
||||
name?: string;
|
||||
osxNotarize?: NotaryToolCredentials;
|
||||
osxSign?: true | OsxSignOptions;
|
||||
osxUniversal?: OsxUniversalOptions;
|
||||
out?: string;
|
||||
overwrite?: boolean;
|
||||
platform?: TargetPlatform | 'all' | Array<TargetPlatform | 'all'>;
|
||||
prebuiltAsar?: string;
|
||||
protocols?: MacOSProtocol[];
|
||||
prune?: boolean;
|
||||
quiet?: boolean;
|
||||
tmpdir?: string | false;
|
||||
usageDescription?: {
|
||||
[property: string]: string,
|
||||
};
|
||||
win32metadata?: Win32MetadataOptions;
|
||||
windowsSign?: true | WindowsSignOptions;
|
||||
}
|
||||
|
||||
declare function packager(options: Options): Promise<string[]>;
|
||||
|
||||
declare module.exports: typeof packager & {
|
||||
packager: typeof packager,
|
||||
default: typeof packager,
|
||||
};
|
||||
}
|
||||
@@ -32,7 +32,7 @@ if (process.env.FBSOURCE_ENV === '1') {
|
||||
require('@fb-tools/babel-register');
|
||||
} else {
|
||||
// Register Babel to allow local packages to be loaded from source
|
||||
require('../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
const transformer = require('@react-native/metro-babel-transformer');
|
||||
|
||||
+13
-17
@@ -8,16 +8,14 @@
|
||||
"android": "yarn --cwd packages/rn-tester android",
|
||||
"build-android": "./gradlew :packages:react-native:ReactAndroid:build",
|
||||
"build": "node ./scripts/build/build.js",
|
||||
"build-types": "node ./scripts/js-api/build-types",
|
||||
"build-types": "node ./scripts/build-types",
|
||||
"clang-format": "clang-format -i --glob=*/**/*.{h,cpp,m,mm}",
|
||||
"clean": "node ./scripts/build/clean.js",
|
||||
"cxx-api-build": "node ./scripts/cxx-api/public-api.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": "yarn --cwd packages/react-native featureflags",
|
||||
"js-api-diff": "node ./scripts/js-api/diff-api-snapshot",
|
||||
"lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck",
|
||||
"lint-markdown": "markdownlint-cli2 2>&1",
|
||||
"lint": "eslint --max-warnings 0 .",
|
||||
@@ -34,7 +32,7 @@
|
||||
"test-typescript": "tsc -p packages/react-native/types/tsconfig.json",
|
||||
"test-generated-typescript": "tsc -p packages/react-native/types_generated/tsconfig.test.json",
|
||||
"test": "jest",
|
||||
"fantom": "./scripts/fantom.sh",
|
||||
"fantom": "JS_DIR='..' yarn jest --config private/react-native-fantom/config/jest.config.js",
|
||||
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
|
||||
"update-lock": "npx yarn-deduplicate"
|
||||
},
|
||||
@@ -51,17 +49,16 @@
|
||||
"@babel/plugin-transform-regenerator": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-flow": "^7.24.7",
|
||||
"@electron/packager": "^18.3.6",
|
||||
"@jest/create-cache-key-function": "^29.7.0",
|
||||
"@microsoft/api-extractor": "^7.52.2",
|
||||
"@react-native/metro-babel-transformer": "0.81.0-main",
|
||||
"@react-native/metro-config": "0.81.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.80.0-main",
|
||||
"@react-native/metro-config": "0.80.0-main",
|
||||
"@tsconfig/node22": "22.0.2",
|
||||
"@types/react": "^19.1.0",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"ansi-styles": "^4.2.1",
|
||||
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.1",
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.0",
|
||||
"babel-plugin-transform-define": "^2.1.4",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"clang-format": "^1.8.0",
|
||||
@@ -79,12 +76,11 @@
|
||||
"eslint-plugin-react-native": "^4.0.0",
|
||||
"eslint-plugin-redundant-undefined": "^0.4.0",
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"flow-api-translator": "0.29.1",
|
||||
"flow-bin": "^0.275.0",
|
||||
"flow-api-translator": "0.29.0",
|
||||
"flow-bin": "^0.274.0",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.29.1",
|
||||
"hermes-transform": "0.29.1",
|
||||
"ini": "^5.0.0",
|
||||
"hermes-eslint": "0.29.0",
|
||||
"hermes-transform": "0.29.0",
|
||||
"inquirer": "^7.1.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-config": "^29.7.0",
|
||||
@@ -93,14 +89,14 @@
|
||||
"jest-snapshot": "^29.7.0",
|
||||
"markdownlint-cli2": "^0.17.2",
|
||||
"markdownlint-rule-relative-links": "^3.0.0",
|
||||
"metro-babel-register": "^0.82.5",
|
||||
"metro-memory-fs": "^0.82.5",
|
||||
"metro-transform-plugins": "^0.82.5",
|
||||
"metro-babel-register": "^0.82.4",
|
||||
"metro-memory-fs": "^0.82.4",
|
||||
"metro-transform-plugins": "^0.82.4",
|
||||
"micromatch": "^4.0.4",
|
||||
"node-fetch": "^2.2.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
"prettier": "2.8.8",
|
||||
"prettier-plugin-hermes-parser": "0.29.1",
|
||||
"prettier-plugin-hermes-parser": "0.29.0",
|
||||
"react": "19.1.0",
|
||||
"react-test-renderer": "19.1.0",
|
||||
"rimraf": "^3.0.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/traverse": "^7.25.3",
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,16 +22,16 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/dev-middleware": "0.81.0-main",
|
||||
"@react-native/dev-middleware": "0.80.0-main",
|
||||
"debug": "^4.4.0",
|
||||
"invariant": "^2.2.4",
|
||||
"metro": "^0.82.5",
|
||||
"metro-config": "^0.82.5",
|
||||
"metro-core": "^0.82.5",
|
||||
"metro": "^0.82.4",
|
||||
"metro-config": "^0.82.4",
|
||||
"metro-core": "^0.82.4",
|
||||
"semver": "^7.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"metro-resolver": "^0.82.5"
|
||||
"metro-resolver": "^0.82.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/cli": "*",
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
@@ -125,7 +125,7 @@ export const tasks = {
|
||||
}),
|
||||
),
|
||||
installDependencies: task(FIFTH, 'Install CocoaPods dependencies', () => {
|
||||
const env: {[string]: string | void} = {
|
||||
const env = {
|
||||
RCT_NEW_ARCH_ENABLED: options.newArchitecture ? '1' : '0',
|
||||
USE_FRAMEWORKS: options.frameworks,
|
||||
USE_HERMES: options.hermes ? '1' : '0',
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './version.flow';
|
||||
*/
|
||||
|
||||
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
|
||||
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./version.flow');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<1ce3fb7dd23581737fedaf58528fe575>>
|
||||
Git revision: 844f225009e6445d088ed0e431d1fc430325ed95
|
||||
@generated SignedSource<<cf5be4596d1f07e220b710fc286d02fa>>
|
||||
Git revision: d95ac13bf0ab64a5e6c2eb18eb138587063b9c34
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-shell",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -8,7 +8,7 @@
|
||||
],
|
||||
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/debugger-shell#readme",
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"main": "./src/index.js",
|
||||
"main": "./src/node/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./src/node/index.js",
|
||||
@@ -27,11 +27,11 @@
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0",
|
||||
"electron": ">=36.3.0"
|
||||
"electron": ">=36.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.6",
|
||||
"electron": "36.3.0"
|
||||
"electron": "36.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"semver": "^7.1.3"
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
|
||||
const {BrowserWindow, app, shell, ipcMain} = require('electron') as any;
|
||||
const path = require('path');
|
||||
const util = require('util');
|
||||
|
||||
const windowMetadata = new WeakMap<
|
||||
@@ -69,8 +68,6 @@ function handleLaunchArgs(argv: string[]) {
|
||||
partition: 'persist:react-native-devtools',
|
||||
preload: require.resolve('./preload.js'),
|
||||
},
|
||||
// Icon for Linux
|
||||
icon: path.join(__dirname, 'resources', 'icon.png'),
|
||||
});
|
||||
|
||||
// Open links in the default browser instead of in new Electron windows.
|
||||
@@ -93,7 +90,7 @@ function handleLaunchArgs(argv: string[]) {
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
handleLaunchArgs(process.argv.slice(app.isPackaged ? 1 : 2));
|
||||
handleLaunchArgs(process.argv.slice(2));
|
||||
|
||||
app.on(
|
||||
'second-instance',
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!Boolean(process.env.BUILD_EXCLUDE_BABEL_REGISTER)) {
|
||||
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 134 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 118 KiB |
@@ -1,26 +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 strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
// As far as Flow is concerned, this package is Node-only.
|
||||
/*::
|
||||
export type * from './node';
|
||||
const Node = require('./node');
|
||||
declare module.exports: typeof Node;
|
||||
*/
|
||||
|
||||
// Because Electron doesn't support package.json `exports`, we need to
|
||||
// switch at runtime.
|
||||
if ('electron' in process.versions) {
|
||||
// $FlowIgnore[invalid-export]
|
||||
module.exports = require('./electron');
|
||||
} else {
|
||||
// $FlowIgnore[invalid-export]
|
||||
module.exports = require('./node');
|
||||
}
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
export * from './index.flow';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Dev server middleware for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -23,7 +23,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@isaacs/ttlcache": "^1.4.1",
|
||||
"@react-native/debugger-frontend": "0.81.0-main",
|
||||
"@react-native/debugger-frontend": "0.80.0-main",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
|
||||
import type {JsonPagesListResponse} from '../inspector-proxy/types';
|
||||
import type {BrowserLauncher} from '../types/BrowserLauncher';
|
||||
|
||||
import DefaultBrowserLauncher from '../utils/DefaultBrowserLauncher';
|
||||
import {fetchJson, requestLocal} from './FetchUtils';
|
||||
@@ -23,7 +22,7 @@ const PAGES_POLLING_DELAY = 2100;
|
||||
jest.useFakeTimers();
|
||||
|
||||
describe('enableStandaloneFuseboxShell experiment', () => {
|
||||
const BrowserLauncherWithFuseboxShell: BrowserLauncher = {
|
||||
const BrowserLauncherWithFuseboxShell = {
|
||||
...DefaultBrowserLauncher,
|
||||
unstable_showFuseboxShell: () => {
|
||||
throw new Error('Not implemented');
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
export * from './index.flow';
|
||||
|
||||
@@ -22,7 +22,6 @@ import type {
|
||||
import type {IncomingMessage, ServerResponse} from 'http';
|
||||
|
||||
import getBaseUrlFromRequest from '../utils/getBaseUrlFromRequest';
|
||||
import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl';
|
||||
import Device from './Device';
|
||||
import EventLoopPerfTracker from './EventLoopPerfTracker';
|
||||
import InspectorProxyHeartbeat from './InspectorProxyHeartbeat';
|
||||
@@ -250,15 +249,13 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
|
||||
const webSocketUrlWithoutProtocol = `${host}${WS_DEBUGGER_URL}?device=${deviceId}&page=${page.id}`;
|
||||
const webSocketDebuggerUrl = `${webSocketScheme}://${webSocketUrlWithoutProtocol}`;
|
||||
const devtoolsFrontendUrl = getDevToolsFrontendUrl(
|
||||
this.#experiments,
|
||||
webSocketDebuggerUrl,
|
||||
this.#serverBaseUrl.origin,
|
||||
{
|
||||
relative: true,
|
||||
useFuseboxEntryPoint: page.capabilities.prefersFuseboxFrontend,
|
||||
},
|
||||
);
|
||||
|
||||
// For now, `/json/list` returns the legacy built-in `devtools://` URL, to
|
||||
// preserve existing handling by Flipper. This may return a placeholder in
|
||||
// future -- please use the `/open-debugger` endpoint.
|
||||
const devtoolsFrontendUrl =
|
||||
`devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&${webSocketScheme}=` +
|
||||
encodeURIComponent(webSocketUrlWithoutProtocol);
|
||||
|
||||
return {
|
||||
id: `${deviceId}-${page.id}`,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "ESLint config for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -22,7 +22,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@react-native/eslint-plugin": "0.81.0-main",
|
||||
"@react-native/eslint-plugin": "0.80.0-main",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
|
||||
@@ -31,8 +31,6 @@ eslintTester.run('../no-deep-imports', rule, {
|
||||
"import Foo from 'react/native/Foo';",
|
||||
"import 'react-native/Libraries/Core/InitializeCore';",
|
||||
"require('react-native/Libraries/Core/InitializeCore');",
|
||||
"import Foo from 'react-native/src/fb_internal/Foo'",
|
||||
"require('react-native/src/fb_internal/Foo')",
|
||||
],
|
||||
invalid: [
|
||||
{
|
||||
@@ -105,25 +103,5 @@ eslintTester.run('../no-deep-imports', rule, {
|
||||
],
|
||||
output: null,
|
||||
},
|
||||
{
|
||||
code: "import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes';",
|
||||
errors: [
|
||||
{
|
||||
messageId: 'deepImport',
|
||||
data: {importPath: 'react-native/Libraries/Types/RootTagTypes'},
|
||||
},
|
||||
],
|
||||
output: "import type {RootTag} from 'react-native';",
|
||||
},
|
||||
{
|
||||
code: "import type {ModalBaseProps, Foo} from 'react-native/Libraries/Modal/Modal';",
|
||||
errors: [
|
||||
{
|
||||
messageId: 'deepImport',
|
||||
data: {importPath: 'react-native/Libraries/Modal/Modal'},
|
||||
},
|
||||
],
|
||||
output: null,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -31,8 +31,7 @@ module.exports = {
|
||||
ImportDeclaration(node) {
|
||||
if (
|
||||
!isDeepReactNativeImport(node.source) ||
|
||||
isInitializeCoreImport(node.source) ||
|
||||
isFbInternalImport(node.source)
|
||||
isInitializeCoreImport(node.source)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -41,55 +40,25 @@ module.exports = {
|
||||
'react-native/'.length,
|
||||
);
|
||||
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
|
||||
if (publicAPIDefaultComponent && publicAPIDefaultComponent.default) {
|
||||
if (publicAPIDefaultComponent) {
|
||||
context.report({
|
||||
...getStandardReport(node.source),
|
||||
fix(fixer) {
|
||||
return fixer.replaceText(
|
||||
node,
|
||||
`import {${publicAPIDefaultComponent.default}} from 'react-native';`,
|
||||
`import {${publicAPIDefaultComponent}} from 'react-native';`,
|
||||
);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
context.report(getStandardReport(node.source));
|
||||
}
|
||||
} else if (isTypeImport(node)) {
|
||||
const reactNativeSource = node.source.value.slice(
|
||||
'react-native/'.length,
|
||||
);
|
||||
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
|
||||
if (publicAPIDefaultComponent && publicAPIDefaultComponent.types) {
|
||||
const typeNames = [];
|
||||
for (const specifier of node.specifiers) {
|
||||
const importedName = specifier.imported.name;
|
||||
if (!publicAPIDefaultComponent.types.includes(importedName)) {
|
||||
context.report(getStandardReport(node.source));
|
||||
return;
|
||||
}
|
||||
typeNames.push(importedName);
|
||||
}
|
||||
|
||||
context.report({
|
||||
...getStandardReport(node.source),
|
||||
fix(fixer) {
|
||||
return fixer.replaceText(
|
||||
node,
|
||||
`import type {${typeNames.join(', ')}} from 'react-native';`,
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
context.report(getStandardReport(node.source));
|
||||
}
|
||||
},
|
||||
CallExpression(node) {
|
||||
if (
|
||||
!isDeepRequire(node) ||
|
||||
isInitializeCoreImport(node.arguments[0]) ||
|
||||
isFbInternalImport(node.arguments[0])
|
||||
) {
|
||||
if (!isDeepRequire(node) || isInitializeCoreImport(node.arguments[0])) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,13 +71,13 @@ module.exports = {
|
||||
) {
|
||||
const reactNativeSource = importPath.slice('react-native/'.length);
|
||||
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
|
||||
if (publicAPIDefaultComponent && publicAPIDefaultComponent.default) {
|
||||
if (publicAPIDefaultComponent) {
|
||||
context.report({
|
||||
...getStandardReport(node.arguments[0]),
|
||||
fix(fixer) {
|
||||
return fixer.replaceText(
|
||||
parent,
|
||||
`{${publicAPIDefaultComponent.default}} = require('react-native')`,
|
||||
`{${publicAPIDefaultComponent}} = require('react-native')`,
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -140,10 +109,6 @@ module.exports = {
|
||||
);
|
||||
}
|
||||
|
||||
function isTypeImport(node) {
|
||||
return node.type === 'ImportDeclaration' && node.importKind === 'type';
|
||||
}
|
||||
|
||||
function isDeepRequire(node) {
|
||||
return (
|
||||
node.callee.type === 'Identifier' &&
|
||||
@@ -172,13 +137,5 @@ module.exports = {
|
||||
|
||||
return source.value === 'react-native/Libraries/Core/InitializeCore';
|
||||
}
|
||||
|
||||
function isFbInternalImport(source) {
|
||||
if (source.type !== 'Literal' || typeof source.value !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return source.value.startsWith('react-native/src/fb_internal/');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -18,8 +18,8 @@
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"main": "index.js",
|
||||
"devDependencies": {
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.1",
|
||||
"hermes-eslint": "0.29.1"
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.0",
|
||||
"hermes-eslint": "0.29.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
|
||||
@@ -17,513 +17,92 @@
|
||||
* If the path is not matched, the auto-fix won't be suggested.
|
||||
*/
|
||||
const publicAPIMapping = {
|
||||
'Libraries/Components/AccessibilityInfo/AccessibilityInfo': {
|
||||
default: 'AccessibilityInfo',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/ActivityIndicator/ActivityIndicator': {
|
||||
default: 'ActivityIndicator',
|
||||
types: ['ActivityIndicatorProps'],
|
||||
},
|
||||
'Libraries/Components/Button': {
|
||||
default: 'Button',
|
||||
types: ['ButtonProps'],
|
||||
},
|
||||
'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid': {
|
||||
default: 'DrawerLayoutAndroid',
|
||||
types: ['DrawerLayoutAndroidProps', 'DrawerSlideEvent'],
|
||||
},
|
||||
'Libraries/Components/LayoutConformance/LayoutConformance': {
|
||||
default: 'experimental_LayoutConformance',
|
||||
types: ['LayoutConformanceProps'],
|
||||
},
|
||||
'Libraries/Lists/FlatList': {
|
||||
default: 'FlatList',
|
||||
types: ['FlatListProps'],
|
||||
},
|
||||
'Libraries/Image/Image': {
|
||||
default: 'Image',
|
||||
types: [
|
||||
'ImageBackgroundProps',
|
||||
'ImageErrorEvent',
|
||||
'ImageLoadEvent',
|
||||
'ImageProgressEventIOS',
|
||||
'ImageProps',
|
||||
'ImagePropsAndroid',
|
||||
'ImagePropsBase',
|
||||
'ImagePropsIOS',
|
||||
'ImageResolvedAssetSource',
|
||||
'ImageSize',
|
||||
'ImageSourcePropType',
|
||||
],
|
||||
},
|
||||
'Libraries/Image/ImageSource': {
|
||||
default: null,
|
||||
types: ['ImageRequireSource', 'ImageSource', 'ImageURISource'],
|
||||
},
|
||||
'Libraries/Image/ImageBackground': {
|
||||
default: 'ImageBackground',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/TextInput/InputAccessoryView': {
|
||||
default: 'InputAccessoryView',
|
||||
types: ['InputAccessoryViewProps'],
|
||||
},
|
||||
'Libraries/Components/Keyboard/KeyboardAvoidingView': {
|
||||
default: 'KeyboardAvoidingView',
|
||||
types: ['KeyboardAvoidingViewProps'],
|
||||
},
|
||||
'Libraries/Modal/Modal': {
|
||||
default: 'Modal',
|
||||
types: [
|
||||
'ModalBaseProps',
|
||||
'ModalProps',
|
||||
'ModalPropsAndroid',
|
||||
'ModalPropsIOS',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/Pressable/Pressable': {
|
||||
default: 'Pressable',
|
||||
types: [
|
||||
'PressableAndroidRippleConfig',
|
||||
'PressableProps',
|
||||
'PressableStateCallbackType',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid': {
|
||||
default: 'ProgressBarAndroid',
|
||||
types: ['ProgressBarAndroidProps'],
|
||||
},
|
||||
'Libraries/Components/RefreshControl/RefreshControl': {
|
||||
default: 'RefreshControl',
|
||||
types: [
|
||||
'RefreshControlProps',
|
||||
'RefreshControlPropsAndroid',
|
||||
'RefreshControlPropsIOS',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/SafeAreaView/SafeAreaView': {
|
||||
default: 'SafeAreaView',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/ScrollView/ScrollView': {
|
||||
default: 'ScrollView',
|
||||
types: [
|
||||
'ScrollResponderType',
|
||||
'ScrollViewProps',
|
||||
'ScrollViewPropsAndroid',
|
||||
'ScrollViewPropsIOS',
|
||||
'ScrollViewImperativeMethods',
|
||||
'ScrollViewScrollToOptions',
|
||||
],
|
||||
},
|
||||
'Libraries/Lists/SectionList': {
|
||||
default: 'SectionList',
|
||||
types: [
|
||||
'SectionListProps',
|
||||
'SectionListRenderItem',
|
||||
'SectionListRenderItemInfo',
|
||||
'SectionListData',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/StatusBar/StatusBar': {
|
||||
default: 'StatusBar',
|
||||
types: ['StatusBarAnimation', 'StatusBarProps', 'StatusBarStyle'],
|
||||
},
|
||||
'Libraries/Components/Switch/Switch': {
|
||||
default: 'Switch',
|
||||
types: ['SwitchChangeEvent', 'SwitchProps'],
|
||||
},
|
||||
'Libraries/Text/Text': {
|
||||
default: 'Text',
|
||||
types: ['TextProps'],
|
||||
},
|
||||
'Libraries/Components/TextInput/TextInput': {
|
||||
default: 'TextInput',
|
||||
types: [
|
||||
'AutoCapitalize',
|
||||
'EnterKeyHintTypeOptions',
|
||||
'KeyboardTypeOptions',
|
||||
'InputModeOptions',
|
||||
'TextContentType',
|
||||
'TextInputAndroidProps',
|
||||
'TextInputIOSProps',
|
||||
'TextInputProps',
|
||||
'TextInputChangeEvent',
|
||||
'TextInputContentSizeChangeEvent',
|
||||
'TextInputEndEditingEvent',
|
||||
'TextInputFocusEvent',
|
||||
'TextInputKeyPressEvent',
|
||||
'TextInputSelectionChangeEvent',
|
||||
'TextInputSubmitEditingEvent',
|
||||
'ReturnKeyTypeOptions',
|
||||
'SubmitBehavior',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/Touchable/Touchable': {
|
||||
default: 'Touchable',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableHighlight': {
|
||||
default: 'TouchableHighlight',
|
||||
types: ['TouchableHighlightProps'],
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableNativeFeedback': {
|
||||
default: 'TouchableNativeFeedback',
|
||||
types: ['TouchableNativeFeedbackProps'],
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableOpacity': {
|
||||
default: 'TouchableOpacity',
|
||||
types: ['TouchableOpacityProps'],
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableWithoutFeedback': {
|
||||
default: 'TouchableWithoutFeedback',
|
||||
types: ['TouchableWithoutFeedbackProps'],
|
||||
},
|
||||
'Libraries/Components/View/View': {
|
||||
default: 'View',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/View/ViewAccessibility': {
|
||||
default: null,
|
||||
types: [
|
||||
'AccessibilityActionEvent',
|
||||
'AccessibilityProps',
|
||||
'AccessibilityRole',
|
||||
'AccessibilityState',
|
||||
'AccessibilityValue',
|
||||
'Role',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/View/ViewPropTypes': {
|
||||
default: null,
|
||||
types: [
|
||||
'GestureResponderHandlers',
|
||||
'TVViewPropsIOS',
|
||||
'ViewProps',
|
||||
'ViewPropsAndroid',
|
||||
'ViewPropsIOS',
|
||||
],
|
||||
},
|
||||
'Libraries/Lists/VirtualizedList': {
|
||||
default: 'VirtualizedList',
|
||||
types: [
|
||||
'ListRenderItemInfo',
|
||||
'ListRenderItem',
|
||||
'Separators',
|
||||
'VirtualizedListProps',
|
||||
],
|
||||
},
|
||||
'Libraries/Lists/VirtualizedSectionList': {
|
||||
default: 'VirtualizedSectionList',
|
||||
types: [
|
||||
'ScrollToLocationParamsType',
|
||||
'SectionBase',
|
||||
'VirtualizedSectionListProps',
|
||||
],
|
||||
},
|
||||
'Libraries/ActionSheetIOS/ActionSheetIOS': {
|
||||
default: 'ActionSheetIOS',
|
||||
types: [
|
||||
'ActionSheetIOSOptions',
|
||||
'ShareActionSheetIOSOptions',
|
||||
'ShareActionSheetError',
|
||||
],
|
||||
},
|
||||
'Libraries/Alert/Alert': {
|
||||
default: 'Alert',
|
||||
types: ['AlertType', 'AlertButtonStyle', 'AlertButton', 'AlertOptions'],
|
||||
},
|
||||
'Libraries/Animated/Animated': {
|
||||
default: 'Animated',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/Appearance': {
|
||||
default: 'Appearance',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/ReactNative/AppRegistry': {
|
||||
default: 'AppRegistry',
|
||||
types: [
|
||||
'TaskProvider',
|
||||
'ComponentProvider',
|
||||
'ComponentProviderInstrumentationHook',
|
||||
'AppConfig',
|
||||
'Runnable',
|
||||
'Runnables',
|
||||
'Registry',
|
||||
'WrapperComponentProvider',
|
||||
'RootViewStyleProvider',
|
||||
],
|
||||
},
|
||||
'Libraries/AppState/AppState': {
|
||||
default: 'AppState',
|
||||
types: ['AppStateStatus', 'AppStateEvent'],
|
||||
},
|
||||
'Libraries/Utilities/BackHandler': {
|
||||
default: 'BackHandler',
|
||||
types: ['BackPressEventName'],
|
||||
},
|
||||
'Libraries/Components/Clipboard/Clipboard': {
|
||||
default: 'Clipboard',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/DeviceInfo': {
|
||||
default: 'DeviceInfo',
|
||||
types: ['DeviceInfoConstants'],
|
||||
},
|
||||
'src/private/devsupport/devmenu/DevMenu': {
|
||||
default: 'DevMenu',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/DevSettings': {
|
||||
default: 'DevSettings',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/Dimensions': {
|
||||
default: 'Dimensions',
|
||||
types: [
|
||||
'DimensionsPayload',
|
||||
'DisplayMetrics',
|
||||
'DisplayMetricsAndroid',
|
||||
'ScaledSize',
|
||||
],
|
||||
},
|
||||
'Libraries/Animated/Easing': {
|
||||
default: 'Easing',
|
||||
types: ['EasingFunction'],
|
||||
},
|
||||
'Libraries/ReactNative/I18nManager': {
|
||||
default: 'I18nManager',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Interaction/InteractionManager': {
|
||||
default: 'InteractionManager',
|
||||
types: ['Handle', 'PromiseTask', 'SimpleTask'],
|
||||
},
|
||||
'Libraries/Components/Keyboard/Keyboard': {
|
||||
default: 'Keyboard',
|
||||
types: [
|
||||
'AndroidKeyboardEvent',
|
||||
'IOSKeyboardEvent',
|
||||
'KeyboardEvent',
|
||||
'KeyboardEventEasing',
|
||||
'KeyboardEventName',
|
||||
'KeyboardMetrics',
|
||||
],
|
||||
},
|
||||
'Libraries/LayoutAnimation/LayoutAnimation': {
|
||||
default: 'LayoutAnimation',
|
||||
types: [
|
||||
'LayoutAnimationAnim',
|
||||
'LayoutAnimationConfig',
|
||||
'LayoutAnimationProperties',
|
||||
'LayoutAnimationProperty',
|
||||
'LayoutAnimationType',
|
||||
'LayoutAnimationTypes',
|
||||
],
|
||||
},
|
||||
'Libraries/Linking/Linking': {
|
||||
default: 'Linking',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/LogBox/LogBox': {
|
||||
default: 'LogBox',
|
||||
types: ['ExtendedExceptionData', 'IgnorePattern', 'LogData'],
|
||||
},
|
||||
'Libraries/NativeModules/specs/NativeDialogManagerAndroid': {
|
||||
default: 'NativeDialogManagerAndroid',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/EventEmitter/NativeEventEmitter': {
|
||||
default: 'NativeEventEmitter',
|
||||
types: [
|
||||
'EventSubscription',
|
||||
'EmitterSubscription',
|
||||
'NativeEventSubscription',
|
||||
],
|
||||
},
|
||||
'Libraries/Network/RCTNetworking': {
|
||||
default: 'Networking',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Interaction/PanResponder': {
|
||||
default: 'PanResponder',
|
||||
types: [
|
||||
'PanResponderCallbacks',
|
||||
'PanResponderGestureState',
|
||||
'PanResponderInstance',
|
||||
],
|
||||
},
|
||||
'Libraries/PermissionsAndroid/PermissionsAndroid': {
|
||||
default: 'PermissionsAndroid',
|
||||
types: ['Permission', 'PermissionStatus', 'Rationale'],
|
||||
},
|
||||
'Libraries/Utilities/PixelRatio': {
|
||||
default: 'PixelRatio',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/PushNotificationIOS/PushNotificationIOS': {
|
||||
default: 'PushNotificationIOS',
|
||||
types: ['PushNotificationEventName', 'PushNotificationPermissions'],
|
||||
},
|
||||
'Libraries/Settings/Settings': {
|
||||
default: 'Settings',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Share/Share': {
|
||||
default: 'Share',
|
||||
types: ['ShareAction', 'ShareContent', 'ShareOptions'],
|
||||
},
|
||||
'Libraries/StyleSheet/StyleSheet': {
|
||||
default: 'StyleSheet',
|
||||
types: [
|
||||
'ColorValue',
|
||||
'ImageStyle',
|
||||
'FilterFunction',
|
||||
'FontVariant',
|
||||
'NativeColorValue',
|
||||
'OpaqueColorValue',
|
||||
'StyleProp',
|
||||
'TextStyle',
|
||||
'TransformsStyle',
|
||||
'ViewStyle',
|
||||
],
|
||||
},
|
||||
'Libraries/StyleSheet/StyleSheetTypes': {
|
||||
default: null,
|
||||
types: [
|
||||
'BoxShadowValue',
|
||||
'CursorValue',
|
||||
'DimensionValue',
|
||||
'DropShadowValue',
|
||||
'EdgeInsetsValue',
|
||||
'PointValue',
|
||||
],
|
||||
},
|
||||
'Libraries/StyleSheet/Rect': {
|
||||
default: null,
|
||||
types: ['Insets'],
|
||||
},
|
||||
'Libraries/Performance/Systrace': {
|
||||
default: 'Systrace',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/ToastAndroid/ToastAndroid': {
|
||||
default: 'ToastAndroid',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/TurboModule/TurboModuleRegistry': {
|
||||
default: 'TurboModuleRegistry',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/TurboModule/RCTExport': {
|
||||
default: null,
|
||||
types: ['TurboModule'],
|
||||
},
|
||||
'Libraries/ReactNative/UIManager': {
|
||||
default: 'UIManager',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Animated/useAnimatedValue': {
|
||||
default: 'useAnimatedValue',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/useColorScheme': {
|
||||
default: 'useColorScheme',
|
||||
types: null,
|
||||
},
|
||||
'src/private/specs_DEPRECATED/modules/NativeAppearance': {
|
||||
default: null,
|
||||
types: ['ColorSchemeName'],
|
||||
},
|
||||
'Libraries/Utilities/useWindowDimensions': {
|
||||
default: 'useWindowDimensions',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/UTFSequence': {
|
||||
default: 'UTFSequence',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Vibration/Vibration': {
|
||||
default: 'Vibration',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/codegenNativeComponent': {
|
||||
default: 'codegenNativeComponent',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/codegenNativeCommands': {
|
||||
default: 'codegenNativeCommands',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/EventEmitter/RCTDeviceEventEmitter': {
|
||||
default: 'DeviceEventEmitter',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/StyleSheet/PlatformColorValueTypesIOS': {
|
||||
default: 'DynamicColorIOS',
|
||||
types: ['DynamicColorIOSTuple'],
|
||||
},
|
||||
'Libraries/EventEmitter/RCTNativeAppEventEmitter': {
|
||||
default: 'NativeAppEventEmitter',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/BatchedBridge/NativeModules': {
|
||||
default: 'NativeModules',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/Platform': {
|
||||
default: 'Platform',
|
||||
types: null,
|
||||
},
|
||||
'./Libraries/Utilities/PlatformTypes': {
|
||||
default: null,
|
||||
types: ['PlatformOSType', 'PlatformSelectSpec'],
|
||||
},
|
||||
'Libraries/StyleSheet/PlatformColorValueTypes': {
|
||||
default: 'PlatformColor',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/StyleSheet/processColor': {
|
||||
default: 'processColor',
|
||||
types: ['ProcessedColorValue'],
|
||||
},
|
||||
'Libraries/ReactNative/requireNativeComponent': {
|
||||
default: 'requireNativeComponent',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/ReactNative/RootTag': {
|
||||
default: 'RootTagContext',
|
||||
types: ['RootTag'],
|
||||
},
|
||||
'Libraries/Types/RootTagTypes': {
|
||||
default: null,
|
||||
types: ['RootTag'],
|
||||
},
|
||||
'src/private/types/HostInstance': {
|
||||
default: null,
|
||||
types: [
|
||||
'HostInstance',
|
||||
'NativeMethods',
|
||||
'NativeMethodsMixin',
|
||||
'MeasureInWindowOnSuccessCallback',
|
||||
'MeasureLayoutOnSuccessCallback',
|
||||
'MeasureOnSuccessCallback',
|
||||
],
|
||||
},
|
||||
'src/private/types/HostComponent': {
|
||||
default: null,
|
||||
types: ['HostComponent'],
|
||||
},
|
||||
'Libraries/vendor/core/ErrorUtils': {
|
||||
default: null,
|
||||
types: ['ErrorUtils'],
|
||||
},
|
||||
'Libraries/ReactPrivate/ReactNativePrivateInterface': {
|
||||
default: null,
|
||||
types: ['PublicRootInstance', 'PublicTextInstance'],
|
||||
},
|
||||
'Libraries/Components/AccessibilityInfo/AccessibilityInfo':
|
||||
'AccessibilityInfo',
|
||||
'Libraries/Components/ActivityIndicator/ActivityIndicator':
|
||||
'ActivityIndicator',
|
||||
'Libraries/Components/Button': 'Button',
|
||||
'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid':
|
||||
'DrawerLayoutAndroid',
|
||||
'Libraries/Components/LayoutConformance/LayoutConformance':
|
||||
'experimental_LayoutConformance',
|
||||
'Libraries/Lists/FlatList': 'FlatList',
|
||||
'Libraries/Image/Image': 'Image',
|
||||
'Libraries/Image/ImageBackground': 'ImageBackground',
|
||||
'Libraries/Components/TextInput/InputAccessoryView': 'InputAccessoryView',
|
||||
'Libraries/Components/Keyboard/KeyboardAvoidingView': 'KeyboardAvoidingView',
|
||||
'Libraries/Modal/Modal': 'Modal',
|
||||
'Libraries/Components/Pressable/Pressable': 'Pressable',
|
||||
'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid':
|
||||
'ProgressBarAndroid',
|
||||
'Libraries/Components/RefreshControl/RefreshControl': 'RefreshControl',
|
||||
'Libraries/Components/SafeAreaView/SafeAreaView': 'SafeAreaView',
|
||||
'Libraries/Components/ScrollView/ScrollView': 'ScrollView',
|
||||
'Libraries/Lists/SectionList': 'SectionList',
|
||||
'Libraries/Components/StatusBar/StatusBar': 'StatusBar',
|
||||
'Libraries/Components/Switch/Switch': 'Switch',
|
||||
'Libraries/Text/Text': 'Text',
|
||||
'Libraries/Components/TextInput/TextInput': 'TextInput',
|
||||
'Libraries/Components/Touchable/Touchable': 'Touchable',
|
||||
'Libraries/Components/Touchable/TouchableHighlight': 'TouchableHighlight',
|
||||
'Libraries/Components/Touchable/TouchableNativeFeedback':
|
||||
'TouchableNativeFeedback',
|
||||
'Libraries/Components/Touchable/TouchableOpacity': 'TouchableOpacity',
|
||||
'Libraries/Components/Touchable/TouchableWithoutFeedback':
|
||||
'TouchableWithoutFeedback',
|
||||
'Libraries/Components/View/View': 'View',
|
||||
'Libraries/Lists/VirtualizedList': 'VirtualizedList',
|
||||
'Libraries/Lists/VirtualizedSectionList': 'VirtualizedSectionList',
|
||||
'Libraries/ActionSheetIOS/ActionSheetIOS': 'ActionSheetIOS',
|
||||
'Libraries/Alert/Alert': 'Alert',
|
||||
'Libraries/Animated/Animated': 'Animated',
|
||||
'Libraries/Utilities/Appearance': 'Appearance',
|
||||
'Libraries/ReactNative/AppRegistry': 'AppRegistry',
|
||||
'Libraries/AppState/AppState': 'AppState',
|
||||
'Libraries/Utilities/BackHandler': 'BackHandler',
|
||||
'Libraries/Components/Clipboard/Clipboard': 'Clipboard',
|
||||
'Libraries/Utilities/DeviceInfo': 'DeviceInfo',
|
||||
'src/private/devsupport/devmenu/DevMenu': 'DevMenu',
|
||||
'Libraries/Utilities/DevSettings': 'DevSettings',
|
||||
'Libraries/Utilities/Dimensions': 'Dimensions',
|
||||
'Libraries/Animated/Easing': 'Easing',
|
||||
'Libraries/ReactNative/I18nManager': 'I18nManager',
|
||||
'Libraries/Interaction/InteractionManager': 'InteractionManager',
|
||||
'Libraries/Components/Keyboard/Keyboard': 'Keyboard',
|
||||
'Libraries/LayoutAnimation/LayoutAnimation': 'LayoutAnimation',
|
||||
'Libraries/Linking/Linking': 'Linking',
|
||||
'Libraries/LogBox/LogBox': 'LogBox',
|
||||
'Libraries/NativeModules/specs/NativeDialogManagerAndroid':
|
||||
'NativeDialogManagerAndroid',
|
||||
'Libraries/EventEmitter/NativeEventEmitter': 'NativeEventEmitter',
|
||||
'Libraries/Network/RCTNetworking': 'Networking',
|
||||
'Libraries/Interaction/PanResponder': 'PanResponder',
|
||||
'Libraries/PermissionsAndroid/PermissionsAndroid': 'PermissionsAndroid',
|
||||
'Libraries/Utilities/PixelRatio': 'PixelRatio',
|
||||
'Libraries/PushNotificationIOS/PushNotificationIOS': 'PushNotificationIOS',
|
||||
'Libraries/Settings/Settings': 'Settings',
|
||||
'Libraries/Share/Share': 'Share',
|
||||
'Libraries/StyleSheet/StyleSheet': 'StyleSheet',
|
||||
'Libraries/Performance/Systrace': 'Systrace',
|
||||
'Libraries/Components/ToastAndroid/ToastAndroid': 'ToastAndroid',
|
||||
'Libraries/TurboModule/TurboModuleRegistry': 'TurboModuleRegistry',
|
||||
'Libraries/ReactNative/UIManager': 'UIManager',
|
||||
'Libraries/Animated/useAnimatedValue': 'useAnimatedValue',
|
||||
'Libraries/Utilities/useColorScheme': 'useColorScheme',
|
||||
'Libraries/Utilities/useWindowDimensions': 'useWindowDimensions',
|
||||
'Libraries/UTFSequence': 'UTFSequence',
|
||||
'Libraries/Vibration/Vibration': 'Vibration',
|
||||
'Libraries/Utilities/codegenNativeComponent': 'codegenNativeComponent',
|
||||
'Libraries/Utilities/codegenNativeCommands': 'codegenNativeCommands',
|
||||
'Libraries/EventEmitter/RCTDeviceEventEmitter': 'DeviceEventEmitter',
|
||||
'Libraries/StyleSheet/PlatformColorValueTypesIOS': 'DynamicColorIOS',
|
||||
'Libraries/EventEmitter/RCTNativeAppEventEmitter': 'NativeAppEventEmitter',
|
||||
'Libraries/BatchedBridge/NativeModules': 'NativeModules',
|
||||
'Libraries/Utilities/Platform': 'Platform',
|
||||
'Libraries/StyleSheet/PlatformColorValueTypes': 'PlatformColor',
|
||||
'Libraries/StyleSheet/processColor': 'processColor',
|
||||
'Libraries/ReactNative/requireNativeComponent': 'requireNativeComponent',
|
||||
'Libraries/ReactNative/RootTag': 'RootTagContext',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "ESLint rules to validate NativeModule and Component Specs",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,14 +26,14 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
||||
"@react-native/codegen": "0.81.0-main",
|
||||
"@react-native/codegen": "0.80.0-main",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.1",
|
||||
"hermes-eslint": "0.29.1"
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.0",
|
||||
"hermes-eslint": "0.29.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
-5
@@ -70,7 +70,6 @@ abstract class GenerateEntryPointTask : DefaultTask() {
|
||||
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
|
||||
import com.facebook.react.views.view.WindowUtilKt;
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
@@ -94,10 +93,6 @@ abstract class GenerateEntryPointTask : DefaultTask() {
|
||||
if ({{packageName}}.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
DefaultNewArchitectureEntryPoint.load();
|
||||
}
|
||||
|
||||
if ({{packageName}}.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
|
||||
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
-1
@@ -148,7 +148,6 @@ abstract class GeneratePackageListTask : DefaultTask() {
|
||||
|
||||
{{ packageImports }}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
|
||||
-3
@@ -11,7 +11,6 @@ import com.android.build.api.variant.ApplicationAndroidComponentsExtension
|
||||
import com.android.build.api.variant.LibraryAndroidComponentsExtension
|
||||
import com.android.build.gradle.LibraryExtension
|
||||
import com.facebook.react.ReactExtension
|
||||
import com.facebook.react.utils.ProjectUtils.isEdgeToEdgeEnabled
|
||||
import com.facebook.react.utils.ProjectUtils.isHermesEnabled
|
||||
import com.facebook.react.utils.ProjectUtils.isNewArchEnabled
|
||||
import java.io.File
|
||||
@@ -40,8 +39,6 @@ internal object AgpConfiguratorUtils {
|
||||
project.isNewArchEnabled(extension).toString())
|
||||
ext.defaultConfig.buildConfigField(
|
||||
"boolean", "IS_HERMES_ENABLED", project.isHermesEnabled.toString())
|
||||
ext.defaultConfig.buildConfigField(
|
||||
"boolean", "IS_EDGE_TO_EDGE_ENABLED", project.isEdgeToEdgeEnabled.toString())
|
||||
}
|
||||
}
|
||||
project.pluginManager.withPlugin("com.android.application", action)
|
||||
|
||||
-27
@@ -8,14 +8,12 @@
|
||||
package com.facebook.react.utils
|
||||
|
||||
import com.facebook.react.utils.PropertyUtils.DEFAULT_INTERNAL_PUBLISHING_GROUP
|
||||
import com.facebook.react.utils.PropertyUtils.EXCLUSIVE_ENTEPRISE_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY_DEFAULT
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_PUBLISHING_GROUP
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_USE_HERMES_NIGHTLY
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_VERSION_NAME
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_INCLUDE_JITPACK_REPOSITORY
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
@@ -30,12 +28,6 @@ internal object DependencyUtils {
|
||||
* party libraries which are auto-linked.
|
||||
*/
|
||||
fun configureRepositories(project: Project) {
|
||||
val exclusiveEnterpriseRepository = project.rootProject.exclusiveEnterpriseRepository()
|
||||
if (exclusiveEnterpriseRepository != null) {
|
||||
project.logger.lifecycle(
|
||||
"Replacing ALL Maven Repositories with: $exclusiveEnterpriseRepository")
|
||||
}
|
||||
|
||||
project.rootProject.allprojects { eachProject ->
|
||||
with(eachProject) {
|
||||
if (hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) {
|
||||
@@ -44,16 +36,6 @@ internal object DependencyUtils {
|
||||
repo.content { it.excludeGroup("org.webkit") }
|
||||
}
|
||||
}
|
||||
|
||||
if (exclusiveEnterpriseRepository != null) {
|
||||
// We remove all previously set repositories and only configure the proxy provided by the
|
||||
// user.
|
||||
rootProject.repositories.clear()
|
||||
mavenRepoFromUrl(exclusiveEnterpriseRepository)
|
||||
// We return here as we don't want to configure other repositories as well.
|
||||
return@allprojects
|
||||
}
|
||||
|
||||
// We add the snapshot for users on nightlies.
|
||||
mavenRepoFromUrl("https://central.sonatype.com/repository/maven-snapshots/") { repo ->
|
||||
repo.content { it.excludeGroup("org.webkit") }
|
||||
@@ -199,13 +181,4 @@ internal object DependencyUtils {
|
||||
property(INCLUDE_JITPACK_REPOSITORY).toString().toBoolean()
|
||||
else -> INCLUDE_JITPACK_REPOSITORY_DEFAULT
|
||||
}
|
||||
|
||||
internal fun Project.exclusiveEnterpriseRepository() =
|
||||
when {
|
||||
hasProperty(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
|
||||
property(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
|
||||
hasProperty(EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
|
||||
property(EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
-9
@@ -11,11 +11,9 @@ import com.facebook.react.ReactExtension
|
||||
import com.facebook.react.model.ModelPackageJson
|
||||
import com.facebook.react.utils.KotlinStdlibCompatUtils.lowercaseCompat
|
||||
import com.facebook.react.utils.KotlinStdlibCompatUtils.toBooleanStrictOrNullCompat
|
||||
import com.facebook.react.utils.PropertyUtils.EDGE_TO_EDGE_ENABLED
|
||||
import com.facebook.react.utils.PropertyUtils.HERMES_ENABLED
|
||||
import com.facebook.react.utils.PropertyUtils.NEW_ARCH_ENABLED
|
||||
import com.facebook.react.utils.PropertyUtils.REACT_NATIVE_ARCHITECTURES
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_EDGE_TO_EDGE_ENABLED
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_HERMES_ENABLED
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_NEW_ARCH_ENABLED
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_REACT_NATIVE_ARCHITECTURES
|
||||
@@ -61,13 +59,6 @@ internal object ProjectUtils {
|
||||
HERMES_FALLBACK
|
||||
}
|
||||
|
||||
internal val Project.isEdgeToEdgeEnabled: Boolean
|
||||
get() =
|
||||
(project.hasProperty(EDGE_TO_EDGE_ENABLED) &&
|
||||
project.property(EDGE_TO_EDGE_ENABLED).toString().toBoolean()) ||
|
||||
(project.hasProperty(SCOPED_EDGE_TO_EDGE_ENABLED) &&
|
||||
project.property(SCOPED_EDGE_TO_EDGE_ENABLED).toString().toBoolean())
|
||||
|
||||
internal val Project.useThirdPartyJSC: Boolean
|
||||
get() =
|
||||
(project.hasProperty(USE_THIRD_PARTY_JSC) &&
|
||||
|
||||
+1
-11
@@ -14,14 +14,10 @@ object PropertyUtils {
|
||||
const val NEW_ARCH_ENABLED = "newArchEnabled"
|
||||
const val SCOPED_NEW_ARCH_ENABLED = "react.newArchEnabled"
|
||||
|
||||
/** Public property that toggles Hermes */
|
||||
/** Public property that toggles the New Architecture */
|
||||
const val HERMES_ENABLED = "hermesEnabled"
|
||||
const val SCOPED_HERMES_ENABLED = "react.hermesEnabled"
|
||||
|
||||
/** Public property that toggles edge-to-edge */
|
||||
const val EDGE_TO_EDGE_ENABLED = "edgeToEdgeEnabled"
|
||||
const val SCOPED_EDGE_TO_EDGE_ENABLED = "react.edgeToEdgeEnabled"
|
||||
|
||||
/** Public property that excludes jsctooling from core */
|
||||
const val USE_THIRD_PARTY_JSC = "useThirdPartyJSC"
|
||||
const val SCOPED_USE_THIRD_PARTY_JSC = "react.useThirdPartyJSC"
|
||||
@@ -34,12 +30,6 @@ object PropertyUtils {
|
||||
const val INCLUDE_JITPACK_REPOSITORY = "includeJitpackRepository"
|
||||
const val SCOPED_INCLUDE_JITPACK_REPOSITORY = "react.includeJitpackRepository"
|
||||
|
||||
/**
|
||||
* Public property that allows to configure an enterprise repository proxy as exclusive repository
|
||||
*/
|
||||
const val EXCLUSIVE_ENTEPRISE_REPOSITORY = "exclusiveEnterpriseRepository"
|
||||
const val SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY = "react.exclusiveEnterpriseRepository"
|
||||
|
||||
/** By default we include JitPack to avoid breaking user builds */
|
||||
internal const val INCLUDE_JITPACK_REPOSITORY_DEFAULT = true
|
||||
|
||||
|
||||
-5
@@ -55,7 +55,6 @@ class GenerateEntryPointTaskTest {
|
||||
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
|
||||
import com.facebook.react.views.view.WindowUtilKt;
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
@@ -79,10 +78,6 @@ class GenerateEntryPointTaskTest {
|
||||
if (com.facebook.react.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
DefaultNewArchitectureEntryPoint.load();
|
||||
}
|
||||
|
||||
if (com.facebook.react.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
|
||||
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
+1
-3
@@ -233,7 +233,6 @@ class GeneratePackageListTaskTest {
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
@@ -312,8 +311,7 @@ class GeneratePackageListTaskTest {
|
||||
import com.facebook.react.aPackage;
|
||||
// @react-native/another-package
|
||||
import com.facebook.react.anotherPackage;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
|
||||
+1
-44
@@ -10,7 +10,6 @@ package com.facebook.react.utils
|
||||
import com.facebook.react.tests.createProject
|
||||
import com.facebook.react.utils.DependencyUtils.configureDependencies
|
||||
import com.facebook.react.utils.DependencyUtils.configureRepositories
|
||||
import com.facebook.react.utils.DependencyUtils.exclusiveEnterpriseRepository
|
||||
import com.facebook.react.utils.DependencyUtils.getDependencySubstitutions
|
||||
import com.facebook.react.utils.DependencyUtils.mavenRepoFromURI
|
||||
import com.facebook.react.utils.DependencyUtils.mavenRepoFromUrl
|
||||
@@ -100,24 +99,6 @@ class DependencyUtilsTest {
|
||||
.isNotNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun configureRepositories_withExclusiveEnterpriseRepository_replacesAllRepositories() {
|
||||
val repositoryURI = URI.create("https://maven.myfabolousorganization.it")
|
||||
|
||||
val project = createProject()
|
||||
project.rootProject.extensions.extraProperties.set(
|
||||
"exclusiveEnterpriseRepository", repositoryURI.toString())
|
||||
|
||||
configureRepositories(project)
|
||||
|
||||
assertThat(project.repositories).hasSize(1)
|
||||
assertThat(
|
||||
project.repositories.firstOrNull {
|
||||
it is MavenArtifactRepository && it.url == repositoryURI
|
||||
})
|
||||
.isNotNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun configureRepositories_withIncludeJitpackRepositoryFalse_doesNotContainJitPack() {
|
||||
val repositoryURI = URI.create("https://www.jitpack.io")
|
||||
@@ -489,7 +470,7 @@ class DependencyUtilsTest {
|
||||
@Test
|
||||
fun shouldAddJitPack_withUnscopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set("includeJitpackRepository", "false")
|
||||
project.extensions.extraProperties.set("react.includeJitpackRepository", "false")
|
||||
assertThat(project.shouldAddJitPack()).isFalse()
|
||||
}
|
||||
|
||||
@@ -498,28 +479,4 @@ class DependencyUtilsTest {
|
||||
val project = createProject(tempFolder.root)
|
||||
assertThat(project.shouldAddJitPack()).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_withScopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set(
|
||||
"react.exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
|
||||
assertThat(project.exclusiveEnterpriseRepository())
|
||||
.isEqualTo("https://maven.myfabolousorganization.it")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_withUnscopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set(
|
||||
"exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
|
||||
assertThat(project.exclusiveEnterpriseRepository())
|
||||
.isEqualTo("https://maven.myfabolousorganization.it")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_defaultIsTrue() {
|
||||
val project = createProject(tempFolder.root)
|
||||
assertThat(project.exclusiveEnterpriseRepository()).isNull()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-28
@@ -12,7 +12,6 @@ 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.isEdgeToEdgeEnabled
|
||||
import com.facebook.react.utils.ProjectUtils.isHermesEnabled
|
||||
import com.facebook.react.utils.ProjectUtils.isNewArchEnabled
|
||||
import com.facebook.react.utils.ProjectUtils.needsCodegenFromPackageJson
|
||||
@@ -99,7 +98,7 @@ class ProjectUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isHermesEnabled_withDisabledViaProperty_returnsFalse() {
|
||||
fun isNewArchEnabled_withDisabledViaProperty_returnsFalse() {
|
||||
val project = createProject()
|
||||
project.extensions.extraProperties.set("hermesEnabled", "false")
|
||||
assertThat(project.isHermesEnabled).isFalse()
|
||||
@@ -151,32 +150,6 @@ class ProjectUtilsTest {
|
||||
assertThat(project.isHermesEnabled).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isEdgeToEdgeEnabled_returnsFalseByDefault() {
|
||||
assertThat(createProject().isEdgeToEdgeEnabled).isFalse()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isEdgeToEdgeEnabled_withDisabledViaProperty_returnsFalse() {
|
||||
val project = createProject()
|
||||
project.extensions.extraProperties.set("edgeToEdgeEnabled", "false")
|
||||
assertThat(project.isEdgeToEdgeEnabled).isFalse()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isEdgeToEdgeEnabled_withEnabledViaProperty_returnsTrue() {
|
||||
val project = createProject()
|
||||
project.extensions.extraProperties.set("edgeToEdgeEnabled", "true")
|
||||
assertThat(project.isEdgeToEdgeEnabled).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isEdgeToEdgeEnabled_withInvalidViaProperty_returnsFalse() {
|
||||
val project = createProject()
|
||||
project.extensions.extraProperties.set("edgeToEdgeEnabled", "¯\\_(ツ)_/¯")
|
||||
assertThat(project.isEdgeToEdgeEnabled).isFalse()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun needsCodegenFromPackageJson_withCodegenConfigInPackageJson_returnsTrue() {
|
||||
val project = createProject()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-config",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Metro configuration for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,9 +26,9 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/js-polyfills": "0.81.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.81.0-main",
|
||||
"metro-config": "^0.82.5",
|
||||
"metro-runtime": "^0.82.5"
|
||||
"@react-native/js-polyfills": "0.80.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.80.0-main",
|
||||
"metro-config": "^0.82.4",
|
||||
"metro-runtime": "^0.82.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ const INTERNAL_CALLSITES_REGEX = new RegExp(
|
||||
|
||||
export {mergeConfig} from 'metro-config';
|
||||
|
||||
let frameworkDefaults: InputConfigT = {};
|
||||
let frameworkDefaults = {};
|
||||
export function setFrameworkDefaults(config: InputConfigT) {
|
||||
frameworkDefaults = config;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/new-app-screen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "NewAppScreen component for React Native",
|
||||
"keywords": [
|
||||
"react-native"
|
||||
|
||||
@@ -65,7 +65,7 @@ const Links: Array<{
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
description: 'Explore & get help',
|
||||
description: 'Expore & get help',
|
||||
url: 'https://reactnative.dev/community/overview',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/normalize-colors",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Color normalization for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. 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
|
||||
*/
|
||||
|
||||
const LOG_LEVELS = {
|
||||
trace: 0,
|
||||
info: 1,
|
||||
warn: 2,
|
||||
error: 3,
|
||||
};
|
||||
|
||||
describe('console', () => {
|
||||
describe('.table(data, rows)', () => {
|
||||
let originalNativeLoggingHook;
|
||||
let logFn;
|
||||
|
||||
beforeEach(() => {
|
||||
originalNativeLoggingHook = global.nativeLoggingHook;
|
||||
logFn = global.nativeLoggingHook = jest.fn();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
global.nativeLoggingHook = originalNativeLoggingHook;
|
||||
});
|
||||
|
||||
it('should print the passed array as a Markdown table', () => {
|
||||
console.table([
|
||||
{name: 'First', value: 500},
|
||||
{name: 'Second', value: 600},
|
||||
{name: 'Third', value: 700},
|
||||
{name: 'Fourth', value: 800, extraValue: true},
|
||||
]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | name | value | extraValue |
|
||||
| ------- | -------- | ----- | ---------- |
|
||||
| 0 | 'First' | 500 | |
|
||||
| 1 | 'Second' | 600 | |
|
||||
| 2 | 'Third' | 700 | |
|
||||
| 3 | 'Fourth' | 800 | true |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print the passed dictionary as a Markdown table', () => {
|
||||
console.table({
|
||||
first: {name: 'First', value: 500},
|
||||
second: {name: 'Second', value: 600},
|
||||
third: {name: 'Third', value: 700},
|
||||
fourth: {name: 'Fourth', value: 800, extraValue: true},
|
||||
});
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | name | value | extraValue |
|
||||
| ------- | -------- | ----- | ---------- |
|
||||
| first | 'First' | 500 | |
|
||||
| second | 'Second' | 600 | |
|
||||
| third | 'Third' | 700 | |
|
||||
| fourth | 'Fourth' | 800 | true |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should work with different types of values', () => {
|
||||
console.table([
|
||||
{
|
||||
string: '',
|
||||
number: 0,
|
||||
boolean: true,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
{
|
||||
string: 'a',
|
||||
number: 1,
|
||||
boolean: true,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
{
|
||||
string: 'aa',
|
||||
number: 2,
|
||||
boolean: false,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
{
|
||||
string: 'aaa',
|
||||
number: 3,
|
||||
boolean: false,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | string | number | boolean | function | object | null | undefined |
|
||||
| ------- | ------ | ------ | ------- | -------- | ------ | ---- | --------- |
|
||||
| 0 | '' | 0 | true | ƒ | {…} | null | undefined |
|
||||
| 1 | 'a' | 1 | true | ƒ | {…} | null | undefined |
|
||||
| 2 | 'aa' | 2 | false | ƒ | {…} | null | undefined |
|
||||
| 3 | 'aaa' | 3 | false | ƒ | {…} | null | undefined |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print the keys in all the objects', () => {
|
||||
console.table([
|
||||
{name: 'foo'},
|
||||
{name: 'bar', value: 1},
|
||||
{value: 2, surname: 'baz'},
|
||||
{address: 'other'},
|
||||
]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | name | value | surname | address |
|
||||
| ------- | ----- | ----- | ------- | ------- |
|
||||
| 0 | 'foo' | | | |
|
||||
| 1 | 'bar' | 1 | | |
|
||||
| 2 | | 2 | 'baz' | |
|
||||
| 3 | | | | 'other' |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print an empty string for empty arrays', () => {
|
||||
console.table([]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
|
||||
});
|
||||
|
||||
it('should print an empty string for empty dictionaries', () => {
|
||||
console.table({});
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
|
||||
});
|
||||
|
||||
// This test is currently failing
|
||||
it('should print an indices table for an array of empty objects', () => {
|
||||
console.table([{}, {}, {}, {}]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) |
|
||||
| ------- |
|
||||
| 0 |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print an indices table for a dictionary of empty objects', () => {
|
||||
console.table({
|
||||
first: {},
|
||||
second: {},
|
||||
third: {},
|
||||
fourth: {},
|
||||
});
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) |
|
||||
| ------- |
|
||||
| first |
|
||||
| second |
|
||||
| third |
|
||||
| fourth |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should not modify the logged value', () => {
|
||||
global.nativeLoggingHook = jest.fn();
|
||||
|
||||
const array = [
|
||||
{name: 'First', value: 500},
|
||||
{name: 'Second', value: 600},
|
||||
{name: 'Third', value: 700},
|
||||
{name: 'Fourth', value: 800, extraValue: true},
|
||||
];
|
||||
const originalArrayValue = JSON.parse(JSON.stringify(array));
|
||||
|
||||
console.table(array);
|
||||
|
||||
expect(array).toEqual(originalArrayValue);
|
||||
|
||||
const object = {
|
||||
first: {name: 'First', value: 500},
|
||||
second: {name: 'Second', value: 600},
|
||||
third: {name: 'Third', value: 700},
|
||||
fourth: {name: 'Fourth', value: 800, extraValue: true},
|
||||
};
|
||||
|
||||
const originalObjectValue = JSON.parse(JSON.stringify(object));
|
||||
|
||||
console.table(object);
|
||||
|
||||
expect(object).toEqual(originalObjectValue);
|
||||
});
|
||||
|
||||
it('should only print the selected columns, if specified (arrays)', () => {
|
||||
console.table(
|
||||
[
|
||||
{first: 1, second: 2, third: 3},
|
||||
{first: 4, second: 5},
|
||||
{third: 7, fourth: 8},
|
||||
{fifth: 9},
|
||||
],
|
||||
// $FlowExpectedError[extra-arg]
|
||||
['first', 'fifth'],
|
||||
);
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | first | fifth |
|
||||
| ------- | ----- | ----- |
|
||||
| 0 | 1 | |
|
||||
| 1 | 4 | |
|
||||
| 2 | | |
|
||||
| 3 | | 9 |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should only print the selected columns, if specified (dictionaries)', () => {
|
||||
console.table(
|
||||
{
|
||||
a: {first: 1, second: 2, third: 3},
|
||||
b: {first: 4, second: 5},
|
||||
c: {third: 7, fourth: 8},
|
||||
d: {fifth: 9},
|
||||
},
|
||||
// $FlowExpectedError[extra-arg]
|
||||
['first', 'fifth'],
|
||||
);
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | first | fifth |
|
||||
| ------- | ----- | ----- |
|
||||
| a | 1 | |
|
||||
| b | 4 | |
|
||||
| c | | |
|
||||
| d | | 9 |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,275 +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 strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
const LOG_LEVELS = {
|
||||
trace: 0,
|
||||
info: 1,
|
||||
warn: 2,
|
||||
error: 3,
|
||||
};
|
||||
|
||||
describe('console.table(data, rows)', () => {
|
||||
let originalNativeLoggingHook;
|
||||
let logFn;
|
||||
|
||||
beforeEach(() => {
|
||||
originalNativeLoggingHook = global.nativeLoggingHook;
|
||||
logFn = global.nativeLoggingHook = jest.fn();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
global.nativeLoggingHook = originalNativeLoggingHook;
|
||||
});
|
||||
|
||||
it('should print the passed array as a Markdown table', () => {
|
||||
console.table([
|
||||
{name: 'First', value: 500},
|
||||
{name: 'Second', value: 600},
|
||||
{name: 'Third', value: 700},
|
||||
{name: 'Fourth', value: 800, extraValue: true},
|
||||
]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | name | value | extraValue |
|
||||
| ------- | -------- | ----- | ---------- |
|
||||
| 0 | 'First' | 500 | |
|
||||
| 1 | 'Second' | 600 | |
|
||||
| 2 | 'Third' | 700 | |
|
||||
| 3 | 'Fourth' | 800 | true |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print the passed dictionary as a Markdown table', () => {
|
||||
console.table({
|
||||
first: {name: 'First', value: 500},
|
||||
second: {name: 'Second', value: 600},
|
||||
third: {name: 'Third', value: 700},
|
||||
fourth: {name: 'Fourth', value: 800, extraValue: true},
|
||||
});
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | name | value | extraValue |
|
||||
| ------- | -------- | ----- | ---------- |
|
||||
| first | 'First' | 500 | |
|
||||
| second | 'Second' | 600 | |
|
||||
| third | 'Third' | 700 | |
|
||||
| fourth | 'Fourth' | 800 | true |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should work with different types of values', () => {
|
||||
console.table([
|
||||
{
|
||||
string: '',
|
||||
number: 0,
|
||||
boolean: true,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
{
|
||||
string: 'a',
|
||||
number: 1,
|
||||
boolean: true,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
{
|
||||
string: 'aa',
|
||||
number: 2,
|
||||
boolean: false,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
{
|
||||
string: 'aaa',
|
||||
number: 3,
|
||||
boolean: false,
|
||||
function: () => {},
|
||||
object: {a: 1, b: 2},
|
||||
null: null,
|
||||
undefined: undefined,
|
||||
},
|
||||
]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | string | number | boolean | function | object | null | undefined |
|
||||
| ------- | ------ | ------ | ------- | -------- | ------ | ---- | --------- |
|
||||
| 0 | '' | 0 | true | ƒ | {…} | null | undefined |
|
||||
| 1 | 'a' | 1 | true | ƒ | {…} | null | undefined |
|
||||
| 2 | 'aa' | 2 | false | ƒ | {…} | null | undefined |
|
||||
| 3 | 'aaa' | 3 | false | ƒ | {…} | null | undefined |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print the keys in all the objects', () => {
|
||||
console.table([
|
||||
{name: 'foo'},
|
||||
{name: 'bar', value: 1},
|
||||
{value: 2, surname: 'baz'},
|
||||
{address: 'other'},
|
||||
]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | name | value | surname | address |
|
||||
| ------- | ----- | ----- | ------- | ------- |
|
||||
| 0 | 'foo' | | | |
|
||||
| 1 | 'bar' | 1 | | |
|
||||
| 2 | | 2 | 'baz' | |
|
||||
| 3 | | | | 'other' |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print an empty string for empty arrays', () => {
|
||||
console.table([]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
|
||||
});
|
||||
|
||||
it('should print an empty string for empty dictionaries', () => {
|
||||
console.table({});
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
|
||||
});
|
||||
|
||||
// This test is currently failing
|
||||
it('should print an indices table for an array of empty objects', () => {
|
||||
console.table([{}, {}, {}, {}]);
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) |
|
||||
| ------- |
|
||||
| 0 |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should print an indices table for a dictionary of empty objects', () => {
|
||||
console.table({
|
||||
first: {},
|
||||
second: {},
|
||||
third: {},
|
||||
fourth: {},
|
||||
});
|
||||
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) |
|
||||
| ------- |
|
||||
| first |
|
||||
| second |
|
||||
| third |
|
||||
| fourth |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should not modify the logged value', () => {
|
||||
global.nativeLoggingHook = jest.fn();
|
||||
|
||||
const array = [
|
||||
{name: 'First', value: 500},
|
||||
{name: 'Second', value: 600},
|
||||
{name: 'Third', value: 700},
|
||||
{name: 'Fourth', value: 800, extraValue: true},
|
||||
];
|
||||
const originalArrayValue = JSON.parse(JSON.stringify(array));
|
||||
|
||||
console.table(array);
|
||||
|
||||
expect(array).toEqual(originalArrayValue);
|
||||
|
||||
const object = {
|
||||
first: {name: 'First', value: 500},
|
||||
second: {name: 'Second', value: 600},
|
||||
third: {name: 'Third', value: 700},
|
||||
fourth: {name: 'Fourth', value: 800, extraValue: true},
|
||||
};
|
||||
|
||||
const originalObjectValue = JSON.parse(JSON.stringify(object));
|
||||
|
||||
console.table(object);
|
||||
|
||||
expect(object).toEqual(originalObjectValue);
|
||||
});
|
||||
|
||||
it('should only print the selected columns, if specified (arrays)', () => {
|
||||
console.table(
|
||||
[
|
||||
{first: 1, second: 2, third: 3},
|
||||
{first: 4, second: 5},
|
||||
{third: 7, fourth: 8},
|
||||
{fifth: 9},
|
||||
],
|
||||
// $FlowExpectedError[extra-arg]
|
||||
['first', 'fifth'],
|
||||
);
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | first | fifth |
|
||||
| ------- | ----- | ----- |
|
||||
| 0 | 1 | |
|
||||
| 1 | 4 | |
|
||||
| 2 | | |
|
||||
| 3 | | 9 |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
|
||||
it('should only print the selected columns, if specified (dictionaries)', () => {
|
||||
console.table(
|
||||
{
|
||||
a: {first: 1, second: 2, third: 3},
|
||||
b: {first: 4, second: 5},
|
||||
c: {third: 7, fourth: 8},
|
||||
d: {fifth: 9},
|
||||
},
|
||||
// $FlowExpectedError[extra-arg]
|
||||
['first', 'fifth'],
|
||||
);
|
||||
expect(logFn).toHaveBeenCalledTimes(1);
|
||||
expect(logFn.mock.lastCall).toEqual([
|
||||
`
|
||||
| (index) | first | fifth |
|
||||
| ------- | ----- | ----- |
|
||||
| a | 1 | |
|
||||
| b | 4 | |
|
||||
| c | | |
|
||||
| d | | 9 |`,
|
||||
LOG_LEVELS.info,
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -1,41 +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 strict-local
|
||||
* @format
|
||||
* @fantom_mode *
|
||||
* @fantom_flags fuseboxEnabledRelease:*
|
||||
*/
|
||||
|
||||
describe('console.timeStamp()', () => {
|
||||
it('installed', () => {
|
||||
expect(typeof console.timeStamp).toBe('function');
|
||||
});
|
||||
|
||||
it("doesn't throw when label is not specified", () => {
|
||||
expect(() => console.timeStamp()).not.toThrow();
|
||||
});
|
||||
|
||||
it("doesn't throw when label is specified", () => {
|
||||
expect(() => console.timeStamp('label')).not.toThrow();
|
||||
});
|
||||
|
||||
it("doesn't throw when additional arguments are specified", () => {
|
||||
expect(() =>
|
||||
// $FlowExpectedError[extra-arg]
|
||||
console.timeStamp('label', 100, 500, 'Track', 'Group', 'error'),
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
it("doesn't throw when invalid arguments are specified", () => {
|
||||
// $FlowExpectedError[incompatible-call]
|
||||
expect(() => console.timeStamp({})).not.toThrow();
|
||||
expect(() =>
|
||||
// $FlowExpectedError[extra-arg]
|
||||
console.timeStamp('label', true, null, {}, [], () => {}),
|
||||
).not.toThrow();
|
||||
});
|
||||
});
|
||||
@@ -569,11 +569,6 @@ function consoleAssertPolyfill(expression, label) {
|
||||
}
|
||||
}
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/console/timeStamp_static.
|
||||
// Non-standard API for recording markers on a timeline of the Performance instrumentation.
|
||||
// The actual logging is not provided by definition.
|
||||
function consoleTimeStampPolyfill() {}
|
||||
|
||||
if (global.nativeLoggingHook) {
|
||||
const originalConsole = global.console;
|
||||
// Preserve the original `console` as `originalConsole`
|
||||
@@ -585,7 +580,6 @@ if (global.nativeLoggingHook) {
|
||||
}
|
||||
|
||||
global.console = {
|
||||
timeStamp: consoleTimeStampPolyfill,
|
||||
...(originalConsole ?? {}),
|
||||
error: getNativeLogFunction(LOG_LEVELS.error),
|
||||
info: getNativeLogFunction(LOG_LEVELS.info),
|
||||
@@ -700,7 +694,6 @@ if (global.nativeLoggingHook) {
|
||||
profile: stub,
|
||||
profileEnd: stub,
|
||||
table: stub,
|
||||
timeStamp: stub,
|
||||
};
|
||||
|
||||
Object.defineProperty(console, '_isPolyfilled', {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/js-polyfills",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Polyfills for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-preset",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Babel preset for React Native applications",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -66,8 +66,8 @@
|
||||
"@babel/plugin-transform-typescript": "^7.25.2",
|
||||
"@babel/plugin-transform-unicode-regex": "^7.24.7",
|
||||
"@babel/template": "^7.25.0",
|
||||
"@react-native/babel-plugin-codegen": "0.81.0-main",
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.1",
|
||||
"@react-native/babel-plugin-codegen": "0.80.0-main",
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.0",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"react-refresh": "^0.14.0"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-babel-transformer",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Babel transformer for React Native applications.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -27,8 +27,8 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.81.0-main",
|
||||
"hermes-parser": "0.29.1",
|
||||
"@react-native/babel-preset": "0.80.0-main",
|
||||
"hermes-parser": "0.29.0",
|
||||
"nullthrows": "^1.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
+10
-136
@@ -40,10 +40,6 @@ ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps(
|
||||
arrayOfMixed(convertRawProp(context, rawProps, \\"arrayOfMixed\\", sourceProps.arrayOfMixed, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ArrayPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ArrayPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ArrayPropsNativeComponentViewProps();
|
||||
@@ -55,57 +51,18 @@ folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (names != oldProps->names) {
|
||||
result[\\"names\\"] = toDynamic(names);
|
||||
}
|
||||
|
||||
if (disableds != oldProps->disableds) {
|
||||
result[\\"disableds\\"] = toDynamic(disableds);
|
||||
}
|
||||
|
||||
if (progress != oldProps->progress) {
|
||||
result[\\"progress\\"] = toDynamic(progress);
|
||||
}
|
||||
|
||||
if (radii != oldProps->radii) {
|
||||
result[\\"radii\\"] = toDynamic(radii);
|
||||
}
|
||||
|
||||
if (colors != oldProps->colors) {
|
||||
result[\\"colors\\"] = toDynamic(colors);
|
||||
}
|
||||
|
||||
if (srcs != oldProps->srcs) {
|
||||
result[\\"srcs\\"] = toDynamic(srcs);
|
||||
}
|
||||
|
||||
if (points != oldProps->points) {
|
||||
result[\\"points\\"] = toDynamic(points);
|
||||
}
|
||||
|
||||
if (edgeInsets != oldProps->edgeInsets) {
|
||||
result[\\"edgeInsets\\"] = toDynamic(edgeInsets);
|
||||
}
|
||||
|
||||
if (dimensions != oldProps->dimensions) {
|
||||
result[\\"dimensions\\"] = toDynamic(dimensions);
|
||||
}
|
||||
|
||||
if (sizes != oldProps->sizes) {
|
||||
result[\\"sizes\\"] = toDynamic(sizes);
|
||||
}
|
||||
|
||||
if (object != oldProps->object) {
|
||||
result[\\"object\\"] = toDynamic(object);
|
||||
}
|
||||
|
||||
if (arrayOfObjects != oldProps->arrayOfObjects) {
|
||||
result[\\"arrayOfObjects\\"] = toDynamic(arrayOfObjects);
|
||||
}
|
||||
|
||||
if (arrayOfMixed != oldProps->arrayOfMixed) {
|
||||
result[\\"arrayOfMixed\\"] = toDynamic(arrayOfMixed);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -142,10 +99,6 @@ BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps(
|
||||
disabledNullable(convertRawProp(context, rawProps, \\"disabledNullable\\", sourceProps.disabledNullable, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName BooleanPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"BooleanPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic BooleanPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = BooleanPropNativeComponentViewProps();
|
||||
@@ -199,10 +152,6 @@ ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps(
|
||||
tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ColorPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ColorPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic ColorPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ColorPropNativeComponentViewProps();
|
||||
@@ -253,10 +202,6 @@ DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps(
|
||||
marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName DimensionPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"DimensionPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = DimensionPropNativeComponentViewProps();
|
||||
@@ -268,9 +213,6 @@ folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (marginBack != oldProps->marginBack) {
|
||||
result[\\"marginBack\\"] = toDynamic(marginBack);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -306,10 +248,6 @@ EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EdgeInsetsPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EdgeInsetsPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EdgeInsetsPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EdgeInsetsPropNativeComponentViewProps();
|
||||
@@ -357,10 +295,6 @@ EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps(
|
||||
intervals(convertRawProp(context, rawProps, \\"intervals\\", sourceProps.intervals, {EnumPropNativeComponentViewIntervals::Intervals0})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EnumPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EnumPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EnumPropNativeComponentViewProps();
|
||||
@@ -372,13 +306,7 @@ folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (alignment != oldProps->alignment) {
|
||||
result[\\"alignment\\"] = toDynamic(alignment);
|
||||
}
|
||||
|
||||
if (intervals != oldProps->intervals) {
|
||||
result[\\"intervals\\"] = toDynamic(intervals);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -414,10 +342,6 @@ EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComp
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EventNestedObjectPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EventNestedObjectPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EventNestedObjectPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EventNestedObjectPropsNativeComponentViewProps();
|
||||
@@ -467,10 +391,6 @@ EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EventPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EventPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EventPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EventPropsNativeComponentViewProps();
|
||||
@@ -526,10 +446,6 @@ FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps(
|
||||
blurRadiusNullable(convertRawProp(context, rawProps, \\"blurRadiusNullable\\", sourceProps.blurRadiusNullable, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName FloatPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"FloatPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic FloatPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = FloatPropsNativeComponentViewProps();
|
||||
@@ -604,10 +520,6 @@ ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps(
|
||||
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ImagePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ImagePropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ImagePropNativeComponentViewProps();
|
||||
@@ -620,7 +532,7 @@ folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (thumbImage != oldProps->thumbImage) {
|
||||
result[\\"thumbImage\\"] = toDynamic(thumbImage);
|
||||
result[\\"thumbImage\\"] = thumbImage.toDynamic();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -659,10 +571,6 @@ IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps(
|
||||
progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName IntegerPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"IntegerPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic IntegerPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = IntegerPropNativeComponentViewProps();
|
||||
@@ -720,10 +628,6 @@ InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps(
|
||||
title(convertRawProp(context, rawProps, \\"title\\", sourceProps.title, {\\"\\"})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName InterfaceOnlyNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"InterfaceOnlyNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic InterfaceOnlyNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = InterfaceOnlyNativeComponentViewProps();
|
||||
@@ -774,10 +678,6 @@ MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps(
|
||||
mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MixedPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MixedPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MixedPropNativeComponentViewProps();
|
||||
@@ -789,9 +689,6 @@ folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (mixedProp != oldProps->mixedProp) {
|
||||
result[\\"mixedProp\\"] = mixedProp;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -831,10 +728,6 @@ MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps
|
||||
point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MultiNativePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MultiNativePropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MultiNativePropNativeComponentViewProps();
|
||||
@@ -847,7 +740,7 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (thumbImage != oldProps->thumbImage) {
|
||||
result[\\"thumbImage\\"] = toDynamic(thumbImage);
|
||||
result[\\"thumbImage\\"] = thumbImage.toDynamic();
|
||||
}
|
||||
|
||||
if (color != oldProps->color) {
|
||||
@@ -859,7 +752,10 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
|
||||
if (point != oldProps->point) {
|
||||
result[\\"point\\"] = toDynamic(point);
|
||||
folly::dynamic pointResult = folly::dynamic::object();
|
||||
pointResult[\\"x\\"] = point.x;
|
||||
pointResult[\\"y\\"] = point.y;
|
||||
result[\\"point\\"] = pointResult;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -896,10 +792,6 @@ NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName NoPropsNoEventsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"NoPropsNoEventsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic NoPropsNoEventsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = NoPropsNoEventsNativeComponentViewProps();
|
||||
@@ -949,10 +841,6 @@ ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps(
|
||||
objectPrimitiveRequiredProp(convertRawProp(context, rawProps, \\"objectPrimitiveRequiredProp\\", sourceProps.objectPrimitiveRequiredProp, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ObjectPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ObjectPropsNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ObjectPropsNativeComponentProps();
|
||||
@@ -964,17 +852,8 @@ folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (objectProp != oldProps->objectProp) {
|
||||
result[\\"objectProp\\"] = toDynamic(objectProp);
|
||||
}
|
||||
|
||||
if (objectArrayProp != oldProps->objectArrayProp) {
|
||||
result[\\"objectArrayProp\\"] = toDynamic(objectArrayProp);
|
||||
}
|
||||
|
||||
if (objectPrimitiveRequiredProp != oldProps->objectPrimitiveRequiredProp) {
|
||||
result[\\"objectPrimitiveRequiredProp\\"] = toDynamic(objectPrimitiveRequiredProp);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1010,10 +889,6 @@ PointPropNativeComponentViewProps::PointPropNativeComponentViewProps(
|
||||
startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName PointPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"PointPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = PointPropNativeComponentViewProps();
|
||||
@@ -1026,7 +901,10 @@ folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (startPoint != oldProps->startPoint) {
|
||||
result[\\"startPoint\\"] = toDynamic(startPoint);
|
||||
folly::dynamic pointResult = folly::dynamic::object();
|
||||
pointResult[\\"x\\"] = startPoint.x;
|
||||
pointResult[\\"y\\"] = startPoint.y;
|
||||
result[\\"startPoint\\"] = pointResult;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1064,10 +942,6 @@ StringPropNativeComponentViewProps::StringPropNativeComponentViewProps(
|
||||
defaultValue(convertRawProp(context, rawProps, \\"defaultValue\\", sourceProps.defaultValue, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName StringPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"StringPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic StringPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = StringPropNativeComponentViewProps();
|
||||
|
||||
-158
@@ -16,7 +16,6 @@ Object {
|
||||
#include <cinttypes>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/graphicsConversions.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
#include <react/renderer/graphics/Point.h>
|
||||
@@ -88,16 +87,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewSizesMaskW
|
||||
}
|
||||
struct ArrayPropsNativeComponentViewObjectStruct {
|
||||
std::string prop{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentViewObjectStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"prop\\"] = prop;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewObjectStruct &result) {
|
||||
@@ -113,12 +102,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewObjectStru
|
||||
return \\"[Object ArrayPropsNativeComponentViewObjectStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewObjectStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewObjectStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -132,17 +115,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
struct ArrayPropsNativeComponentViewArrayOfObjectsStruct {
|
||||
Float prop1{0.0};
|
||||
int prop2{0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentViewArrayOfObjectsStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"prop1\\"] = prop1;
|
||||
result[\\"prop2\\"] = prop2;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewArrayOfObjectsStruct &result) {
|
||||
@@ -162,12 +134,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewArrayOfObj
|
||||
return \\"[Object ArrayPropsNativeComponentViewArrayOfObjectsStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewArrayOfObjectsStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewArrayOfObjectsStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -199,8 +165,6 @@ class ArrayPropsNativeComponentViewProps final : public ViewProps {
|
||||
std::vector<folly::dynamic> arrayOfMixed{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -239,8 +203,6 @@ class BooleanPropNativeComponentViewProps final : public ViewProps {
|
||||
bool disabledNullable{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -279,8 +241,6 @@ class ColorPropNativeComponentViewProps final : public ViewProps {
|
||||
SharedColor tintColor{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -305,7 +265,6 @@ Object {
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/graphicsConversions.h>
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -320,8 +279,6 @@ class DimensionPropNativeComponentViewProps final : public ViewProps {
|
||||
YGValue marginBack{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -359,8 +316,6 @@ class EdgeInsetsPropNativeComponentViewProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -405,12 +360,6 @@ static inline std::string toString(const EnumPropNativeComponentViewAlignment &v
|
||||
case EnumPropNativeComponentViewAlignment::BottomRight: return \\"bottom-right\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewAlignment &value) {
|
||||
return toString(value);
|
||||
}
|
||||
#endif
|
||||
enum class EnumPropNativeComponentViewIntervals { Intervals0 = 0, Intervals15 = 15, Intervals30 = 30, Intervals60 = 60 };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnumPropNativeComponentViewIntervals &result) {
|
||||
@@ -442,17 +391,6 @@ static inline std::string toString(const EnumPropNativeComponentViewIntervals &v
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewIntervals &value) {
|
||||
switch (value) {
|
||||
case EnumPropNativeComponentViewIntervals::Intervals0: return 0;
|
||||
case EnumPropNativeComponentViewIntervals::Intervals15: return 15;
|
||||
case EnumPropNativeComponentViewIntervals::Intervals30: return 30;
|
||||
case EnumPropNativeComponentViewIntervals::Intervals60: return 60;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
class EnumPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
EnumPropNativeComponentViewProps() = default;
|
||||
@@ -464,8 +402,6 @@ class EnumPropNativeComponentViewProps final : public ViewProps {
|
||||
EnumPropNativeComponentViewIntervals intervals{EnumPropNativeComponentViewIntervals::Intervals0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -503,8 +439,6 @@ class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -542,8 +476,6 @@ class EventPropsNativeComponentViewProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -587,8 +519,6 @@ class FloatPropsNativeComponentViewProps final : public ViewProps {
|
||||
Float blurRadiusNullable{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -627,8 +557,6 @@ class ImagePropNativeComponentViewProps final : public ViewProps {
|
||||
ImageSource thumbImage{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -668,8 +596,6 @@ class IntegerPropNativeComponentViewProps final : public ViewProps {
|
||||
int progress3{10};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -707,8 +633,6 @@ class InterfaceOnlyNativeComponentViewProps final : public ViewProps {
|
||||
std::string title{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -746,8 +670,6 @@ class MixedPropNativeComponentViewProps final : public ViewProps {
|
||||
folly::dynamic mixedProp{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -791,8 +713,6 @@ class MultiNativePropNativeComponentViewProps final : public ViewProps {
|
||||
Point point{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -830,8 +750,6 @@ class NoPropsNoEventsNativeComponentViewProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -880,12 +798,6 @@ static inline std::string toString(const ObjectPropsNativeComponentStringEnumPro
|
||||
case ObjectPropsNativeComponentStringEnumProp::Large: return \\"large\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentStringEnumProp &value) {
|
||||
return toString(value);
|
||||
}
|
||||
#endif
|
||||
enum class ObjectPropsNativeComponentIntEnumProp { IntEnumProp0 = 0, IntEnumProp1 = 1 };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentIntEnumProp &result) {
|
||||
@@ -908,15 +820,6 @@ static inline std::string toString(const ObjectPropsNativeComponentIntEnumProp &
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return \\"1\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentIntEnumProp &value) {
|
||||
switch (value) {
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp0: return 0;
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
struct ObjectPropsNativeComponentObjectPropStruct {
|
||||
std::string stringProp{\\"\\"};
|
||||
bool booleanProp{false};
|
||||
@@ -924,21 +827,6 @@ struct ObjectPropsNativeComponentObjectPropStruct {
|
||||
int intProp{0};
|
||||
ObjectPropsNativeComponentStringEnumProp stringEnumProp{ObjectPropsNativeComponentStringEnumProp::Small};
|
||||
ObjectPropsNativeComponentIntEnumProp intEnumProp{ObjectPropsNativeComponentIntEnumProp::IntEnumProp0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsNativeComponentObjectPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"stringProp\\"] = stringProp;
|
||||
result[\\"booleanProp\\"] = booleanProp;
|
||||
result[\\"floatProp\\"] = floatProp;
|
||||
result[\\"intProp\\"] = intProp;
|
||||
result[\\"stringEnumProp\\"] = ::facebook::react::toDynamic(stringEnumProp);
|
||||
result[\\"intEnumProp\\"] = ::facebook::react::toDynamic(intEnumProp);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPropStruct &result) {
|
||||
@@ -974,24 +862,8 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectPropStr
|
||||
return \\"[Object ObjectPropsNativeComponentObjectPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsNativeComponentObjectArrayPropStruct {
|
||||
std::vector<std::string> array{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsNativeComponentObjectArrayPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"array\\"] = ::facebook::react::toDynamic(array);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectArrayPropStruct &result) {
|
||||
@@ -1007,28 +879,10 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectArrayPr
|
||||
return \\"[Object ObjectPropsNativeComponentObjectArrayPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectArrayPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct {
|
||||
ImageSource image{};
|
||||
SharedColor color{};
|
||||
Point point{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"image\\"] = ::facebook::react::toDynamic(image);
|
||||
result[\\"color\\"] = ::facebook::react::toDynamic(color);
|
||||
result[\\"point\\"] = ::facebook::react::toDynamic(point);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &result) {
|
||||
@@ -1051,12 +905,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
static inline std::string toString(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
|
||||
return \\"[Object ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
class ObjectPropsNativeComponentProps final : public ViewProps {
|
||||
public:
|
||||
ObjectPropsNativeComponentProps() = default;
|
||||
@@ -1069,8 +917,6 @@ class ObjectPropsNativeComponentProps final : public ViewProps {
|
||||
ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1109,8 +955,6 @@ class PointPropNativeComponentViewProps final : public ViewProps {
|
||||
Point startPoint{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1149,8 +993,6 @@ class StringPropNativeComponentViewProps final : public ViewProps {
|
||||
std::string defaultValue{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
|
||||
+10
-136
@@ -40,10 +40,6 @@ ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps(
|
||||
arrayOfMixed(convertRawProp(context, rawProps, \\"arrayOfMixed\\", sourceProps.arrayOfMixed, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ArrayPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ArrayPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ArrayPropsNativeComponentViewProps();
|
||||
@@ -55,57 +51,18 @@ folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (names != oldProps->names) {
|
||||
result[\\"names\\"] = toDynamic(names);
|
||||
}
|
||||
|
||||
if (disableds != oldProps->disableds) {
|
||||
result[\\"disableds\\"] = toDynamic(disableds);
|
||||
}
|
||||
|
||||
if (progress != oldProps->progress) {
|
||||
result[\\"progress\\"] = toDynamic(progress);
|
||||
}
|
||||
|
||||
if (radii != oldProps->radii) {
|
||||
result[\\"radii\\"] = toDynamic(radii);
|
||||
}
|
||||
|
||||
if (colors != oldProps->colors) {
|
||||
result[\\"colors\\"] = toDynamic(colors);
|
||||
}
|
||||
|
||||
if (srcs != oldProps->srcs) {
|
||||
result[\\"srcs\\"] = toDynamic(srcs);
|
||||
}
|
||||
|
||||
if (points != oldProps->points) {
|
||||
result[\\"points\\"] = toDynamic(points);
|
||||
}
|
||||
|
||||
if (edgeInsets != oldProps->edgeInsets) {
|
||||
result[\\"edgeInsets\\"] = toDynamic(edgeInsets);
|
||||
}
|
||||
|
||||
if (dimensions != oldProps->dimensions) {
|
||||
result[\\"dimensions\\"] = toDynamic(dimensions);
|
||||
}
|
||||
|
||||
if (sizes != oldProps->sizes) {
|
||||
result[\\"sizes\\"] = toDynamic(sizes);
|
||||
}
|
||||
|
||||
if (object != oldProps->object) {
|
||||
result[\\"object\\"] = toDynamic(object);
|
||||
}
|
||||
|
||||
if (arrayOfObjects != oldProps->arrayOfObjects) {
|
||||
result[\\"arrayOfObjects\\"] = toDynamic(arrayOfObjects);
|
||||
}
|
||||
|
||||
if (arrayOfMixed != oldProps->arrayOfMixed) {
|
||||
result[\\"arrayOfMixed\\"] = toDynamic(arrayOfMixed);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -142,10 +99,6 @@ BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps(
|
||||
disabledNullable(convertRawProp(context, rawProps, \\"disabledNullable\\", sourceProps.disabledNullable, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName BooleanPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"BooleanPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic BooleanPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = BooleanPropNativeComponentViewProps();
|
||||
@@ -199,10 +152,6 @@ ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps(
|
||||
tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ColorPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ColorPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic ColorPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ColorPropNativeComponentViewProps();
|
||||
@@ -253,10 +202,6 @@ DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps(
|
||||
marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName DimensionPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"DimensionPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = DimensionPropNativeComponentViewProps();
|
||||
@@ -268,9 +213,6 @@ folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (marginBack != oldProps->marginBack) {
|
||||
result[\\"marginBack\\"] = toDynamic(marginBack);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -306,10 +248,6 @@ EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EdgeInsetsPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EdgeInsetsPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EdgeInsetsPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EdgeInsetsPropNativeComponentViewProps();
|
||||
@@ -357,10 +295,6 @@ EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps(
|
||||
intervals(convertRawProp(context, rawProps, \\"intervals\\", sourceProps.intervals, {EnumPropNativeComponentViewIntervals::Intervals0})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EnumPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EnumPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EnumPropNativeComponentViewProps();
|
||||
@@ -372,13 +306,7 @@ folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (alignment != oldProps->alignment) {
|
||||
result[\\"alignment\\"] = toDynamic(alignment);
|
||||
}
|
||||
|
||||
if (intervals != oldProps->intervals) {
|
||||
result[\\"intervals\\"] = toDynamic(intervals);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -414,10 +342,6 @@ EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComp
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EventNestedObjectPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EventNestedObjectPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EventNestedObjectPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EventNestedObjectPropsNativeComponentViewProps();
|
||||
@@ -467,10 +391,6 @@ EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EventPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EventPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic EventPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EventPropsNativeComponentViewProps();
|
||||
@@ -526,10 +446,6 @@ FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps(
|
||||
blurRadiusNullable(convertRawProp(context, rawProps, \\"blurRadiusNullable\\", sourceProps.blurRadiusNullable, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName FloatPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"FloatPropsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic FloatPropsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = FloatPropsNativeComponentViewProps();
|
||||
@@ -604,10 +520,6 @@ ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps(
|
||||
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ImagePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ImagePropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ImagePropNativeComponentViewProps();
|
||||
@@ -620,7 +532,7 @@ folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (thumbImage != oldProps->thumbImage) {
|
||||
result[\\"thumbImage\\"] = toDynamic(thumbImage);
|
||||
result[\\"thumbImage\\"] = thumbImage.toDynamic();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -659,10 +571,6 @@ IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps(
|
||||
progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName IntegerPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"IntegerPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic IntegerPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = IntegerPropNativeComponentViewProps();
|
||||
@@ -720,10 +628,6 @@ InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps(
|
||||
title(convertRawProp(context, rawProps, \\"title\\", sourceProps.title, {\\"\\"})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName InterfaceOnlyNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"InterfaceOnlyNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic InterfaceOnlyNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = InterfaceOnlyNativeComponentViewProps();
|
||||
@@ -774,10 +678,6 @@ MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps(
|
||||
mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MixedPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MixedPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MixedPropNativeComponentViewProps();
|
||||
@@ -789,9 +689,6 @@ folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (mixedProp != oldProps->mixedProp) {
|
||||
result[\\"mixedProp\\"] = mixedProp;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -831,10 +728,6 @@ MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps
|
||||
point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MultiNativePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MultiNativePropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MultiNativePropNativeComponentViewProps();
|
||||
@@ -847,7 +740,7 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (thumbImage != oldProps->thumbImage) {
|
||||
result[\\"thumbImage\\"] = toDynamic(thumbImage);
|
||||
result[\\"thumbImage\\"] = thumbImage.toDynamic();
|
||||
}
|
||||
|
||||
if (color != oldProps->color) {
|
||||
@@ -859,7 +752,10 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
}
|
||||
|
||||
if (point != oldProps->point) {
|
||||
result[\\"point\\"] = toDynamic(point);
|
||||
folly::dynamic pointResult = folly::dynamic::object();
|
||||
pointResult[\\"x\\"] = point.x;
|
||||
pointResult[\\"y\\"] = point.y;
|
||||
result[\\"point\\"] = pointResult;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -896,10 +792,6 @@ NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName NoPropsNoEventsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"NoPropsNoEventsNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic NoPropsNoEventsNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = NoPropsNoEventsNativeComponentViewProps();
|
||||
@@ -949,10 +841,6 @@ ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps(
|
||||
objectPrimitiveRequiredProp(convertRawProp(context, rawProps, \\"objectPrimitiveRequiredProp\\", sourceProps.objectPrimitiveRequiredProp, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ObjectPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ObjectPropsNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ObjectPropsNativeComponentProps();
|
||||
@@ -964,17 +852,8 @@ folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (objectProp != oldProps->objectProp) {
|
||||
result[\\"objectProp\\"] = toDynamic(objectProp);
|
||||
}
|
||||
|
||||
if (objectArrayProp != oldProps->objectArrayProp) {
|
||||
result[\\"objectArrayProp\\"] = toDynamic(objectArrayProp);
|
||||
}
|
||||
|
||||
if (objectPrimitiveRequiredProp != oldProps->objectPrimitiveRequiredProp) {
|
||||
result[\\"objectPrimitiveRequiredProp\\"] = toDynamic(objectPrimitiveRequiredProp);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1010,10 +889,6 @@ PointPropNativeComponentViewProps::PointPropNativeComponentViewProps(
|
||||
startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName PointPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"PointPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = PointPropNativeComponentViewProps();
|
||||
@@ -1026,7 +901,10 @@ folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (startPoint != oldProps->startPoint) {
|
||||
result[\\"startPoint\\"] = toDynamic(startPoint);
|
||||
folly::dynamic pointResult = folly::dynamic::object();
|
||||
pointResult[\\"x\\"] = startPoint.x;
|
||||
pointResult[\\"y\\"] = startPoint.y;
|
||||
result[\\"startPoint\\"] = pointResult;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1064,10 +942,6 @@ StringPropNativeComponentViewProps::StringPropNativeComponentViewProps(
|
||||
defaultValue(convertRawProp(context, rawProps, \\"defaultValue\\", sourceProps.defaultValue, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName StringPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"StringPropNativeComponentView\\";
|
||||
}
|
||||
|
||||
folly::dynamic StringPropNativeComponentViewProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = StringPropNativeComponentViewProps();
|
||||
|
||||
-158
@@ -16,7 +16,6 @@ Object {
|
||||
#include <cinttypes>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/graphicsConversions.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
#include <react/renderer/graphics/Point.h>
|
||||
@@ -88,16 +87,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewSizesMaskW
|
||||
}
|
||||
struct ArrayPropsNativeComponentViewObjectStruct {
|
||||
std::string prop{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentViewObjectStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"prop\\"] = prop;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewObjectStruct &result) {
|
||||
@@ -113,12 +102,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewObjectStru
|
||||
return \\"[Object ArrayPropsNativeComponentViewObjectStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewObjectStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewObjectStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -132,17 +115,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
struct ArrayPropsNativeComponentViewArrayOfObjectsStruct {
|
||||
Float prop1{0.0};
|
||||
int prop2{0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentViewArrayOfObjectsStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"prop1\\"] = prop1;
|
||||
result[\\"prop2\\"] = prop2;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewArrayOfObjectsStruct &result) {
|
||||
@@ -162,12 +134,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewArrayOfObj
|
||||
return \\"[Object ArrayPropsNativeComponentViewArrayOfObjectsStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewArrayOfObjectsStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewArrayOfObjectsStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -199,8 +165,6 @@ class ArrayPropsNativeComponentViewProps final : public ViewProps {
|
||||
std::vector<folly::dynamic> arrayOfMixed{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -239,8 +203,6 @@ class BooleanPropNativeComponentViewProps final : public ViewProps {
|
||||
bool disabledNullable{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -279,8 +241,6 @@ class ColorPropNativeComponentViewProps final : public ViewProps {
|
||||
SharedColor tintColor{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -305,7 +265,6 @@ Object {
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/graphicsConversions.h>
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -320,8 +279,6 @@ class DimensionPropNativeComponentViewProps final : public ViewProps {
|
||||
YGValue marginBack{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -359,8 +316,6 @@ class EdgeInsetsPropNativeComponentViewProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -405,12 +360,6 @@ static inline std::string toString(const EnumPropNativeComponentViewAlignment &v
|
||||
case EnumPropNativeComponentViewAlignment::BottomRight: return \\"bottom-right\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewAlignment &value) {
|
||||
return toString(value);
|
||||
}
|
||||
#endif
|
||||
enum class EnumPropNativeComponentViewIntervals { Intervals0 = 0, Intervals15 = 15, Intervals30 = 30, Intervals60 = 60 };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnumPropNativeComponentViewIntervals &result) {
|
||||
@@ -442,17 +391,6 @@ static inline std::string toString(const EnumPropNativeComponentViewIntervals &v
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewIntervals &value) {
|
||||
switch (value) {
|
||||
case EnumPropNativeComponentViewIntervals::Intervals0: return 0;
|
||||
case EnumPropNativeComponentViewIntervals::Intervals15: return 15;
|
||||
case EnumPropNativeComponentViewIntervals::Intervals30: return 30;
|
||||
case EnumPropNativeComponentViewIntervals::Intervals60: return 60;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
class EnumPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
EnumPropNativeComponentViewProps() = default;
|
||||
@@ -464,8 +402,6 @@ class EnumPropNativeComponentViewProps final : public ViewProps {
|
||||
EnumPropNativeComponentViewIntervals intervals{EnumPropNativeComponentViewIntervals::Intervals0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -503,8 +439,6 @@ class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -542,8 +476,6 @@ class EventPropsNativeComponentViewProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -587,8 +519,6 @@ class FloatPropsNativeComponentViewProps final : public ViewProps {
|
||||
Float blurRadiusNullable{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -627,8 +557,6 @@ class ImagePropNativeComponentViewProps final : public ViewProps {
|
||||
ImageSource thumbImage{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -668,8 +596,6 @@ class IntegerPropNativeComponentViewProps final : public ViewProps {
|
||||
int progress3{10};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -707,8 +633,6 @@ class InterfaceOnlyNativeComponentViewProps final : public ViewProps {
|
||||
std::string title{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -746,8 +670,6 @@ class MixedPropNativeComponentViewProps final : public ViewProps {
|
||||
folly::dynamic mixedProp{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -791,8 +713,6 @@ class MultiNativePropNativeComponentViewProps final : public ViewProps {
|
||||
Point point{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -830,8 +750,6 @@ class NoPropsNoEventsNativeComponentViewProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -880,12 +798,6 @@ static inline std::string toString(const ObjectPropsNativeComponentStringEnumPro
|
||||
case ObjectPropsNativeComponentStringEnumProp::Large: return \\"large\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentStringEnumProp &value) {
|
||||
return toString(value);
|
||||
}
|
||||
#endif
|
||||
enum class ObjectPropsNativeComponentIntEnumProp { IntEnumProp0 = 0, IntEnumProp1 = 1 };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentIntEnumProp &result) {
|
||||
@@ -908,15 +820,6 @@ static inline std::string toString(const ObjectPropsNativeComponentIntEnumProp &
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return \\"1\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentIntEnumProp &value) {
|
||||
switch (value) {
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp0: return 0;
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
struct ObjectPropsNativeComponentObjectPropStruct {
|
||||
std::string stringProp{\\"\\"};
|
||||
bool booleanProp{false};
|
||||
@@ -924,21 +827,6 @@ struct ObjectPropsNativeComponentObjectPropStruct {
|
||||
int intProp{0};
|
||||
ObjectPropsNativeComponentStringEnumProp stringEnumProp{ObjectPropsNativeComponentStringEnumProp::Small};
|
||||
ObjectPropsNativeComponentIntEnumProp intEnumProp{ObjectPropsNativeComponentIntEnumProp::IntEnumProp0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsNativeComponentObjectPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"stringProp\\"] = stringProp;
|
||||
result[\\"booleanProp\\"] = booleanProp;
|
||||
result[\\"floatProp\\"] = floatProp;
|
||||
result[\\"intProp\\"] = intProp;
|
||||
result[\\"stringEnumProp\\"] = ::facebook::react::toDynamic(stringEnumProp);
|
||||
result[\\"intEnumProp\\"] = ::facebook::react::toDynamic(intEnumProp);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPropStruct &result) {
|
||||
@@ -974,24 +862,8 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectPropStr
|
||||
return \\"[Object ObjectPropsNativeComponentObjectPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsNativeComponentObjectArrayPropStruct {
|
||||
std::vector<std::string> array{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsNativeComponentObjectArrayPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"array\\"] = ::facebook::react::toDynamic(array);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectArrayPropStruct &result) {
|
||||
@@ -1007,28 +879,10 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectArrayPr
|
||||
return \\"[Object ObjectPropsNativeComponentObjectArrayPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectArrayPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct {
|
||||
ImageSource image{};
|
||||
SharedColor color{};
|
||||
Point point{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"image\\"] = ::facebook::react::toDynamic(image);
|
||||
result[\\"color\\"] = ::facebook::react::toDynamic(color);
|
||||
result[\\"point\\"] = ::facebook::react::toDynamic(point);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &result) {
|
||||
@@ -1051,12 +905,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
static inline std::string toString(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
|
||||
return \\"[Object ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
class ObjectPropsNativeComponentProps final : public ViewProps {
|
||||
public:
|
||||
ObjectPropsNativeComponentProps() = default;
|
||||
@@ -1069,8 +917,6 @@ class ObjectPropsNativeComponentProps final : public ViewProps {
|
||||
ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1109,8 +955,6 @@ class PointPropNativeComponentViewProps final : public ViewProps {
|
||||
Point startPoint{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1149,8 +993,6 @@ class StringPropNativeComponentViewProps final : public ViewProps {
|
||||
std::string defaultValue{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Code generation tools for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -30,7 +30,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"glob": "^7.1.1",
|
||||
"hermes-parser": "0.29.1",
|
||||
"hermes-parser": "0.29.0",
|
||||
"invariant": "^2.2.4",
|
||||
"nullthrows": "^1.1.1",
|
||||
"yargs": "^17.6.2"
|
||||
@@ -43,7 +43,7 @@
|
||||
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
|
||||
"@babel/plugin-transform-optional-chaining": "^7.24.8",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"hermes-estree": "0.29.1",
|
||||
"hermes-estree": "0.29.0",
|
||||
"micromatch": "^4.0.4",
|
||||
"prettier": "2.8.8",
|
||||
"rimraf": "^3.0.2"
|
||||
|
||||
-1
@@ -245,7 +245,6 @@ function getLocalImports(
|
||||
return;
|
||||
case 'DimensionPrimitive':
|
||||
imports.add('#include <yoga/Yoga.h>');
|
||||
imports.add('#include <react/renderer/core/graphicsConversions.h>');
|
||||
return;
|
||||
default:
|
||||
(name: empty);
|
||||
|
||||
+19
-17
@@ -85,7 +85,6 @@ function generatePropsDiffString(
|
||||
case 'StringTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
case 'BooleanTypeAnnotation':
|
||||
case 'MixedTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
@@ -95,14 +94,6 @@ function generatePropsDiffString(
|
||||
return `
|
||||
if ((${prop.name} != oldProps->${prop.name}) && !(std::isnan(${prop.name}) && std::isnan(oldProps->${prop.name}))) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
}`;
|
||||
case 'ArrayTypeAnnotation':
|
||||
case 'ObjectTypeAnnotation':
|
||||
case 'StringEnumTypeAnnotation':
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
@@ -112,23 +103,38 @@ function generatePropsDiffString(
|
||||
result["${prop.name}"] = *${prop.name};
|
||||
}`;
|
||||
case 'ImageSourcePrimitive':
|
||||
case 'PointPrimitive':
|
||||
case 'EdgeInsetsPrimitive':
|
||||
case 'DimensionPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
result["${prop.name}"] = ${prop.name}.toDynamic();
|
||||
}`;
|
||||
case 'ImageRequestPrimitive':
|
||||
// Shouldn't be used in props
|
||||
throw new Error(
|
||||
'ImageRequestPrimitive should not be used in Props',
|
||||
);
|
||||
case 'PointPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
folly::dynamic pointResult = folly::dynamic::object();
|
||||
pointResult["x"] = ${prop.name}.x;
|
||||
pointResult["y"] = ${prop.name}.y;
|
||||
result["${prop.name}"] = pointResult;
|
||||
}`;
|
||||
case 'EdgeInsetsPrimitive':
|
||||
case 'DimensionPrimitive':
|
||||
// TODO: Implement diffProps for complex types
|
||||
return '';
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error('Received unknown ReservedPropTypeAnnotation');
|
||||
}
|
||||
case 'ArrayTypeAnnotation':
|
||||
case 'ObjectTypeAnnotation':
|
||||
case 'StringEnumTypeAnnotation':
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
case 'MixedTypeAnnotation':
|
||||
default:
|
||||
// TODO: Implement diffProps for complex types
|
||||
return '';
|
||||
}
|
||||
})
|
||||
@@ -136,10 +142,6 @@ function generatePropsDiffString(
|
||||
|
||||
return `
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ${className}::getDiffPropsImplementationTarget() const {
|
||||
return "${componentName}";
|
||||
}
|
||||
|
||||
folly::dynamic ${className}::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ${className}();
|
||||
|
||||
@@ -85,8 +85,6 @@ class ${className} final${extendClasses} {
|
||||
${props}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -117,12 +115,6 @@ static inline std::string toString(const ${enumName} &value) {
|
||||
${toCases}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ${enumName} &value) {
|
||||
return toString(value);
|
||||
}
|
||||
#endif
|
||||
`.trim();
|
||||
|
||||
const IntEnumTemplate = ({
|
||||
@@ -130,13 +122,11 @@ const IntEnumTemplate = ({
|
||||
values,
|
||||
fromCases,
|
||||
toCases,
|
||||
toDynamicCases,
|
||||
}: {
|
||||
enumName: string,
|
||||
values: string,
|
||||
fromCases: string,
|
||||
toCases: string,
|
||||
toDynamicCases: string,
|
||||
}) =>
|
||||
`
|
||||
enum class ${enumName} { ${values} };
|
||||
@@ -154,39 +144,19 @@ static inline std::string toString(const ${enumName} &value) {
|
||||
${toCases}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ${enumName} &value) {
|
||||
switch (value) {
|
||||
${toDynamicCases}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
`.trim();
|
||||
|
||||
const StructTemplate = ({
|
||||
structName,
|
||||
fields,
|
||||
fromCases,
|
||||
toDynamicCases,
|
||||
}: {
|
||||
structName: string,
|
||||
fields: string,
|
||||
fromCases: string,
|
||||
toDynamicCases: string,
|
||||
}) =>
|
||||
`struct ${structName} {
|
||||
${fields}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ${structName}&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
${toDynamicCases}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${structName} &result) {
|
||||
@@ -198,12 +168,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
static inline std::string toString(const ${structName} &value) {
|
||||
return "[Object ${structName}]";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ${structName} &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
`.trim();
|
||||
|
||||
const ArrayConversionFunctionTemplate = ({
|
||||
@@ -437,16 +401,6 @@ function generateIntEnum(
|
||||
)
|
||||
.join('\n' + ' ');
|
||||
|
||||
const toDynamicCases = values
|
||||
.map(
|
||||
value =>
|
||||
`case ${enumName}::${toIntEnumValueName(
|
||||
prop.name,
|
||||
value,
|
||||
)}: return ${value};`,
|
||||
)
|
||||
.join('\n' + ' ');
|
||||
|
||||
const valueVariables = values
|
||||
.map(val => `${toIntEnumValueName(prop.name, val)} = ${val}`)
|
||||
.join(', ');
|
||||
@@ -456,7 +410,6 @@ function generateIntEnum(
|
||||
values: valueVariables,
|
||||
fromCases,
|
||||
toCases,
|
||||
toDynamicCases,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -748,30 +701,12 @@ function generateStruct(
|
||||
})
|
||||
.join('\n ');
|
||||
|
||||
const toDynamicCases = properties
|
||||
.map((property: NamedShape<PropTypeAnnotation>) => {
|
||||
const name = property.name;
|
||||
switch (property.typeAnnotation.type) {
|
||||
case 'BooleanTypeAnnotation':
|
||||
case 'StringTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
case 'DoubleTypeAnnotation':
|
||||
case 'FloatTypeAnnotation':
|
||||
case 'MixedTypeAnnotation':
|
||||
return `result["${name}"] = ${name};`;
|
||||
default:
|
||||
return `result["${name}"] = ::facebook::react::toDynamic(${name});`;
|
||||
}
|
||||
})
|
||||
.join('\n ');
|
||||
|
||||
structs.set(
|
||||
structName,
|
||||
StructTemplate({
|
||||
structName,
|
||||
fields,
|
||||
fromCases,
|
||||
toDynamicCases,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -65,15 +65,15 @@ const TestTemplate = ({
|
||||
propValue: string,
|
||||
}) => `
|
||||
TEST(${componentName}_${testName}, etc) {
|
||||
RawPropsParser propParser{};
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<${componentName}>();
|
||||
${componentName} sourceProps{};
|
||||
RawProps rawProps(folly::dynamic::object("${propName}", ${propValue}));
|
||||
auto const &sourceProps = ${componentName}();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object("${propName}", ${propValue}));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser);
|
||||
rawProps.parse(propParser, parserContext);
|
||||
${componentName}(parserContext, sourceProps, rawProps);
|
||||
}
|
||||
`;
|
||||
@@ -81,8 +81,8 @@ TEST(${componentName}_${testName}, etc) {
|
||||
function getTestCasesForProp(
|
||||
propName: string,
|
||||
typeAnnotation: PropTypeAnnotation,
|
||||
): Array<TestCase> {
|
||||
const cases: Array<TestCase> = [];
|
||||
) {
|
||||
const cases = [];
|
||||
if (typeAnnotation.type === 'StringEnumTypeAnnotation') {
|
||||
typeAnnotation.options.forEach(option =>
|
||||
cases.push({
|
||||
|
||||
+10
-192
@@ -40,10 +40,6 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps(
|
||||
arrayOfMixed(convertRawProp(context, rawProps, \\"arrayOfMixed\\", sourceProps.arrayOfMixed, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ArrayPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ArrayPropsNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ArrayPropsNativeComponentProps();
|
||||
@@ -55,57 +51,18 @@ folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (names != oldProps->names) {
|
||||
result[\\"names\\"] = toDynamic(names);
|
||||
}
|
||||
|
||||
if (disableds != oldProps->disableds) {
|
||||
result[\\"disableds\\"] = toDynamic(disableds);
|
||||
}
|
||||
|
||||
if (progress != oldProps->progress) {
|
||||
result[\\"progress\\"] = toDynamic(progress);
|
||||
}
|
||||
|
||||
if (radii != oldProps->radii) {
|
||||
result[\\"radii\\"] = toDynamic(radii);
|
||||
}
|
||||
|
||||
if (colors != oldProps->colors) {
|
||||
result[\\"colors\\"] = toDynamic(colors);
|
||||
}
|
||||
|
||||
if (srcs != oldProps->srcs) {
|
||||
result[\\"srcs\\"] = toDynamic(srcs);
|
||||
}
|
||||
|
||||
if (points != oldProps->points) {
|
||||
result[\\"points\\"] = toDynamic(points);
|
||||
}
|
||||
|
||||
if (dimensions != oldProps->dimensions) {
|
||||
result[\\"dimensions\\"] = toDynamic(dimensions);
|
||||
}
|
||||
|
||||
if (sizes != oldProps->sizes) {
|
||||
result[\\"sizes\\"] = toDynamic(sizes);
|
||||
}
|
||||
|
||||
if (object != oldProps->object) {
|
||||
result[\\"object\\"] = toDynamic(object);
|
||||
}
|
||||
|
||||
if (array != oldProps->array) {
|
||||
result[\\"array\\"] = toDynamic(array);
|
||||
}
|
||||
|
||||
if (arrayOfArrayOfObject != oldProps->arrayOfArrayOfObject) {
|
||||
result[\\"arrayOfArrayOfObject\\"] = toDynamic(arrayOfArrayOfObject);
|
||||
}
|
||||
|
||||
if (arrayOfMixed != oldProps->arrayOfMixed) {
|
||||
result[\\"arrayOfMixed\\"] = toDynamic(arrayOfMixed);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -141,10 +98,6 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps(
|
||||
nativePrimitives(convertRawProp(context, rawProps, \\"nativePrimitives\\", sourceProps.nativePrimitives, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ArrayPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ArrayPropsNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ArrayPropsNativeComponentProps();
|
||||
@@ -156,9 +109,6 @@ folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (nativePrimitives != oldProps->nativePrimitives) {
|
||||
result[\\"nativePrimitives\\"] = toDynamic(nativePrimitives);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -194,10 +144,6 @@ BooleanPropNativeComponentProps::BooleanPropNativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName BooleanPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"BooleanPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic BooleanPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = BooleanPropNativeComponentProps();
|
||||
@@ -247,10 +193,6 @@ ColorPropNativeComponentProps::ColorPropNativeComponentProps(
|
||||
tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ColorPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ColorPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ColorPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ColorPropNativeComponentProps();
|
||||
@@ -300,10 +242,6 @@ CommandNativeComponentProps::CommandNativeComponentProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName CommandNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"CommandNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic CommandNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = CommandNativeComponentProps();
|
||||
@@ -350,10 +288,6 @@ CommandNativeComponentProps::CommandNativeComponentProps(
|
||||
accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName CommandNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"CommandNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic CommandNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = CommandNativeComponentProps();
|
||||
@@ -404,10 +338,6 @@ DimensionPropNativeComponentProps::DimensionPropNativeComponentProps(
|
||||
marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName DimensionPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"DimensionPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic DimensionPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = DimensionPropNativeComponentProps();
|
||||
@@ -419,9 +349,6 @@ folly::dynamic DimensionPropNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (marginBack != oldProps->marginBack) {
|
||||
result[\\"marginBack\\"] = toDynamic(marginBack);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -462,10 +389,6 @@ DoublePropNativeComponentProps::DoublePropNativeComponentProps(
|
||||
blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName DoublePropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"DoublePropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic DoublePropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = DoublePropNativeComponentProps();
|
||||
@@ -535,10 +458,6 @@ EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EventsNestedObjectNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EventsNestedObjectNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic EventsNestedObjectNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EventsNestedObjectNativeComponentProps();
|
||||
@@ -588,10 +507,6 @@ EventsNativeComponentProps::EventsNativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName EventsNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"EventsNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic EventsNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = EventsNativeComponentProps();
|
||||
@@ -641,10 +556,6 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName InterfaceOnlyComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"InterfaceOnlyComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic InterfaceOnlyComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = InterfaceOnlyComponentProps();
|
||||
@@ -691,10 +602,6 @@ ExcludedAndroidComponentProps::ExcludedAndroidComponentProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ExcludedAndroidComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ExcludedAndroidComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ExcludedAndroidComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ExcludedAndroidComponentProps();
|
||||
@@ -741,10 +648,6 @@ ExcludedAndroidIosComponentProps::ExcludedAndroidIosComponentProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ExcludedAndroidIosComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ExcludedAndroidIosComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ExcludedAndroidIosComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ExcludedAndroidIosComponentProps();
|
||||
@@ -791,10 +694,6 @@ ExcludedIosComponentProps::ExcludedIosComponentProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ExcludedIosComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ExcludedIosComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ExcludedIosComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ExcludedIosComponentProps();
|
||||
@@ -817,10 +716,6 @@ MultiFileIncludedNativeComponentProps::MultiFileIncludedNativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MultiFileIncludedNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MultiFileIncludedNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic MultiFileIncludedNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MultiFileIncludedNativeComponentProps();
|
||||
@@ -875,10 +770,6 @@ FloatPropNativeComponentProps::FloatPropNativeComponentProps(
|
||||
blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName FloatPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"FloatPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic FloatPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = FloatPropNativeComponentProps();
|
||||
@@ -949,10 +840,6 @@ ImagePropNativeComponentProps::ImagePropNativeComponentProps(
|
||||
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ImagePropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ImagePropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ImagePropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ImagePropNativeComponentProps();
|
||||
@@ -965,7 +852,7 @@ folly::dynamic ImagePropNativeComponentProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (thumbImage != oldProps->thumbImage) {
|
||||
result[\\"thumbImage\\"] = toDynamic(thumbImage);
|
||||
result[\\"thumbImage\\"] = thumbImage.toDynamic();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1002,10 +889,6 @@ InsetsPropNativeComponentProps::InsetsPropNativeComponentProps(
|
||||
contentInset(convertRawProp(context, rawProps, \\"contentInset\\", sourceProps.contentInset, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName InsetsPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"InsetsPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic InsetsPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = InsetsPropNativeComponentProps();
|
||||
@@ -1017,9 +900,6 @@ folly::dynamic InsetsPropNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (contentInset != oldProps->contentInset) {
|
||||
result[\\"contentInset\\"] = toDynamic(contentInset);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1055,10 +935,6 @@ Int32EnumPropsNativeComponentProps::Int32EnumPropsNativeComponentProps(
|
||||
maxInterval(convertRawProp(context, rawProps, \\"maxInterval\\", sourceProps.maxInterval, {Int32EnumPropsNativeComponentMaxInterval::MaxInterval0})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName Int32EnumPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"Int32EnumPropsNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic Int32EnumPropsNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = Int32EnumPropsNativeComponentProps();
|
||||
@@ -1070,9 +946,6 @@ folly::dynamic Int32EnumPropsNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (maxInterval != oldProps->maxInterval) {
|
||||
result[\\"maxInterval\\"] = toDynamic(maxInterval);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1110,10 +983,6 @@ IntegerPropNativeComponentProps::IntegerPropNativeComponentProps(
|
||||
progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName IntegerPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"IntegerPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic IntegerPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = IntegerPropNativeComponentProps();
|
||||
@@ -1171,10 +1040,6 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps(
|
||||
accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName InterfaceOnlyComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"InterfaceOnlyComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic InterfaceOnlyComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = InterfaceOnlyComponentProps();
|
||||
@@ -1225,10 +1090,6 @@ MixedPropNativeComponentProps::MixedPropNativeComponentProps(
|
||||
mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MixedPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MixedPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic MixedPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MixedPropNativeComponentProps();
|
||||
@@ -1240,9 +1101,6 @@ folly::dynamic MixedPropNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (mixedProp != oldProps->mixedProp) {
|
||||
result[\\"mixedProp\\"] = mixedProp;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1282,10 +1140,6 @@ ImageColorPropNativeComponentProps::ImageColorPropNativeComponentProps(
|
||||
point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ImageColorPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ImageColorPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic ImageColorPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ImageColorPropNativeComponentProps();
|
||||
@@ -1298,7 +1152,7 @@ folly::dynamic ImageColorPropNativeComponentProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (thumbImage != oldProps->thumbImage) {
|
||||
result[\\"thumbImage\\"] = toDynamic(thumbImage);
|
||||
result[\\"thumbImage\\"] = thumbImage.toDynamic();
|
||||
}
|
||||
|
||||
if (color != oldProps->color) {
|
||||
@@ -1310,7 +1164,10 @@ folly::dynamic ImageColorPropNativeComponentProps::getDiffProps(
|
||||
}
|
||||
|
||||
if (point != oldProps->point) {
|
||||
result[\\"point\\"] = toDynamic(point);
|
||||
folly::dynamic pointResult = folly::dynamic::object();
|
||||
pointResult[\\"x\\"] = point.x;
|
||||
pointResult[\\"y\\"] = point.y;
|
||||
result[\\"point\\"] = pointResult;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1347,10 +1204,6 @@ NoPropsNoEventsComponentProps::NoPropsNoEventsComponentProps(
|
||||
{}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName NoPropsNoEventsComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"NoPropsNoEventsComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic NoPropsNoEventsComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = NoPropsNoEventsComponentProps();
|
||||
@@ -1398,10 +1251,6 @@ ObjectPropsProps::ObjectPropsProps(
|
||||
objectProp(convertRawProp(context, rawProps, \\"objectProp\\", sourceProps.objectProp, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName ObjectPropsProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"ObjectProps\\";
|
||||
}
|
||||
|
||||
folly::dynamic ObjectPropsProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = ObjectPropsProps();
|
||||
@@ -1413,9 +1262,6 @@ folly::dynamic ObjectPropsProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (objectProp != oldProps->objectProp) {
|
||||
result[\\"objectProp\\"] = toDynamic(objectProp);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1451,10 +1297,6 @@ PointPropNativeComponentProps::PointPropNativeComponentProps(
|
||||
startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName PointPropNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"PointPropNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic PointPropNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = PointPropNativeComponentProps();
|
||||
@@ -1467,7 +1309,10 @@ folly::dynamic PointPropNativeComponentProps::getDiffProps(
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (startPoint != oldProps->startPoint) {
|
||||
result[\\"startPoint\\"] = toDynamic(startPoint);
|
||||
folly::dynamic pointResult = folly::dynamic::object();
|
||||
pointResult[\\"x\\"] = startPoint.x;
|
||||
pointResult[\\"y\\"] = startPoint.y;
|
||||
result[\\"startPoint\\"] = pointResult;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1504,10 +1349,6 @@ StringEnumPropsNativeComponentProps::StringEnumPropsNativeComponentProps(
|
||||
alignment(convertRawProp(context, rawProps, \\"alignment\\", sourceProps.alignment, {StringEnumPropsNativeComponentAlignment::Center})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName StringEnumPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"StringEnumPropsNativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic StringEnumPropsNativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = StringEnumPropsNativeComponentProps();
|
||||
@@ -1519,9 +1360,6 @@ folly::dynamic StringEnumPropsNativeComponentProps::getDiffProps(
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
if (alignment != oldProps->alignment) {
|
||||
result[\\"alignment\\"] = toDynamic(alignment);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1558,10 +1396,6 @@ StringPropComponentProps::StringPropComponentProps(
|
||||
accessibilityRole(convertRawProp(context, rawProps, \\"accessibilityRole\\", sourceProps.accessibilityRole, {})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName StringPropComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"StringPropComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic StringPropComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = StringPropComponentProps();
|
||||
@@ -1615,10 +1449,6 @@ MultiFile1NativeComponentProps::MultiFile1NativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MultiFile1NativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MultiFile1NativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic MultiFile1NativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MultiFile1NativeComponentProps();
|
||||
@@ -1644,10 +1474,6 @@ MultiFile2NativeComponentProps::MultiFile2NativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MultiFile2NativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MultiFile2NativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic MultiFile2NativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MultiFile2NativeComponentProps();
|
||||
@@ -1697,10 +1523,6 @@ MultiComponent1NativeComponentProps::MultiComponent1NativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MultiComponent1NativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MultiComponent1NativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic MultiComponent1NativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MultiComponent1NativeComponentProps();
|
||||
@@ -1726,10 +1548,6 @@ MultiComponent2NativeComponentProps::MultiComponent2NativeComponentProps(
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName MultiComponent2NativeComponentProps::getDiffPropsImplementationTarget() const {
|
||||
return \\"MultiComponent2NativeComponent\\";
|
||||
}
|
||||
|
||||
folly::dynamic MultiComponent2NativeComponentProps::getDiffProps(
|
||||
const Props* prevProps) const {
|
||||
static const auto defaultProps = MultiComponent2NativeComponentProps();
|
||||
|
||||
-305
@@ -16,7 +16,6 @@ Map {
|
||||
#include <cinttypes>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/graphicsConversions.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
#include <react/renderer/graphics/Point.h>
|
||||
@@ -87,16 +86,6 @@ static inline std::string toString(const ArrayPropsNativeComponentSizesMaskWrapp
|
||||
}
|
||||
struct ArrayPropsNativeComponentObjectStruct {
|
||||
std::string stringProp{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentObjectStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"stringProp\\"] = stringProp;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentObjectStruct &result) {
|
||||
@@ -112,12 +101,6 @@ static inline std::string toString(const ArrayPropsNativeComponentObjectStruct &
|
||||
return \\"[Object ArrayPropsNativeComponentObjectStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentObjectStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentObjectStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -130,16 +113,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
|
||||
struct ArrayPropsNativeComponentArrayObjectStruct {
|
||||
std::string stringProp{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentArrayObjectStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"stringProp\\"] = stringProp;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayObjectStruct &result) {
|
||||
@@ -155,12 +128,6 @@ static inline std::string toString(const ArrayPropsNativeComponentArrayObjectStr
|
||||
return \\"[Object ArrayPropsNativeComponentArrayObjectStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentArrayObjectStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentArrayObjectStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -173,16 +140,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
|
||||
struct ArrayPropsNativeComponentArrayStruct {
|
||||
std::vector<ArrayPropsNativeComponentArrayObjectStruct> object{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentArrayStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"object\\"] = ::facebook::react::toDynamic(object);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayStruct &result) {
|
||||
@@ -198,12 +155,6 @@ static inline std::string toString(const ArrayPropsNativeComponentArrayStruct &v
|
||||
return \\"[Object ArrayPropsNativeComponentArrayStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentArrayStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentArrayStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -216,16 +167,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
|
||||
struct ArrayPropsNativeComponentArrayOfArrayOfObjectStruct {
|
||||
std::string stringProp{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentArrayOfArrayOfObjectStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"stringProp\\"] = stringProp;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayOfArrayOfObjectStruct &result) {
|
||||
@@ -241,12 +182,6 @@ static inline std::string toString(const ArrayPropsNativeComponentArrayOfArrayOf
|
||||
return \\"[Object ArrayPropsNativeComponentArrayOfArrayOfObjectStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentArrayOfArrayOfObjectStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<std::vector<ArrayPropsNativeComponentArrayOfArrayOfObjectStruct>> &result) {
|
||||
auto items = (std::vector<std::vector<RawValue>>)value;
|
||||
for (const std::vector<RawValue> &item : items) {
|
||||
@@ -282,8 +217,6 @@ class ArrayPropsNativeComponentProps final : public ViewProps {
|
||||
std::vector<folly::dynamic> arrayOfMixed{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -321,18 +254,6 @@ struct ArrayPropsNativeComponentNativePrimitivesStruct {
|
||||
std::vector<SharedColor> colors{};
|
||||
std::vector<ImageSource> srcs{};
|
||||
std::vector<Point> points{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ArrayPropsNativeComponentNativePrimitivesStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"colors\\"] = ::facebook::react::toDynamic(colors);
|
||||
result[\\"srcs\\"] = ::facebook::react::toDynamic(srcs);
|
||||
result[\\"points\\"] = ::facebook::react::toDynamic(points);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentNativePrimitivesStruct &result) {
|
||||
@@ -356,12 +277,6 @@ static inline std::string toString(const ArrayPropsNativeComponentNativePrimitiv
|
||||
return \\"[Object ArrayPropsNativeComponentNativePrimitivesStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentNativePrimitivesStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentNativePrimitivesStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -381,8 +296,6 @@ class ArrayPropsNativeComponentProps final : public ViewProps {
|
||||
std::vector<ArrayPropsNativeComponentNativePrimitivesStruct> nativePrimitives{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -420,8 +333,6 @@ class BooleanPropNativeComponentProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -460,8 +371,6 @@ class ColorPropNativeComponentProps final : public ViewProps {
|
||||
SharedColor tintColor{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -499,8 +408,6 @@ class CommandNativeComponentProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -538,8 +445,6 @@ class CommandNativeComponentProps final : public ViewProps {
|
||||
std::string accessibilityHint{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -564,7 +469,6 @@ Map {
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/graphicsConversions.h>
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -579,8 +483,6 @@ class DimensionPropNativeComponentProps final : public ViewProps {
|
||||
YGValue marginBack{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -623,8 +525,6 @@ class DoublePropNativeComponentProps final : public ViewProps {
|
||||
double blurRadius6{0.0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -662,8 +562,6 @@ class EventsNestedObjectNativeComponentProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -701,8 +599,6 @@ class EventsNativeComponentProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -740,8 +636,6 @@ class InterfaceOnlyComponentProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -779,8 +673,6 @@ class ExcludedAndroidComponentProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -818,8 +710,6 @@ class ExcludedAndroidIosComponentProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -857,8 +747,6 @@ class ExcludedIosComponentProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -873,8 +761,6 @@ class MultiFileIncludedNativeComponentProps final : public ViewProps {
|
||||
bool disabled{true};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -917,8 +803,6 @@ class FloatPropNativeComponentProps final : public ViewProps {
|
||||
Float blurRadius6{0.0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -957,8 +841,6 @@ class ImagePropNativeComponentProps final : public ViewProps {
|
||||
ImageSource thumbImage{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -997,8 +879,6 @@ class InsetsPropNativeComponentProps final : public ViewProps {
|
||||
EdgeInsets contentInset{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1053,16 +933,6 @@ static inline std::string toString(const Int32EnumPropsNativeComponentMaxInterva
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const Int32EnumPropsNativeComponentMaxInterval &value) {
|
||||
switch (value) {
|
||||
case Int32EnumPropsNativeComponentMaxInterval::MaxInterval0: return 0;
|
||||
case Int32EnumPropsNativeComponentMaxInterval::MaxInterval1: return 1;
|
||||
case Int32EnumPropsNativeComponentMaxInterval::MaxInterval2: return 2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
class Int32EnumPropsNativeComponentProps final : public ViewProps {
|
||||
public:
|
||||
Int32EnumPropsNativeComponentProps() = default;
|
||||
@@ -1073,8 +943,6 @@ class Int32EnumPropsNativeComponentProps final : public ViewProps {
|
||||
Int32EnumPropsNativeComponentMaxInterval maxInterval{Int32EnumPropsNativeComponentMaxInterval::MaxInterval0};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1114,8 +982,6 @@ class IntegerPropNativeComponentProps final : public ViewProps {
|
||||
int progress3{10};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1153,8 +1019,6 @@ class InterfaceOnlyComponentProps final : public ViewProps {
|
||||
std::string accessibilityHint{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1192,8 +1056,6 @@ class MixedPropNativeComponentProps final : public ViewProps {
|
||||
folly::dynamic mixedProp{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1237,8 +1099,6 @@ class ImageColorPropNativeComponentProps final : public ViewProps {
|
||||
Point point{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1276,8 +1136,6 @@ class NoPropsNoEventsComponentProps final : public ViewProps {
|
||||
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1324,12 +1182,6 @@ static inline std::string toString(const ObjectPropsStringEnumProp &value) {
|
||||
case ObjectPropsStringEnumProp::Option1: return \\"option1\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsStringEnumProp &value) {
|
||||
return toString(value);
|
||||
}
|
||||
#endif
|
||||
enum class ObjectPropsIntEnumProp { IntEnumProp0 = 0 };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsIntEnumProp &result) {
|
||||
@@ -1348,26 +1200,8 @@ static inline std::string toString(const ObjectPropsIntEnumProp &value) {
|
||||
case ObjectPropsIntEnumProp::IntEnumProp0: return \\"0\\";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsIntEnumProp &value) {
|
||||
switch (value) {
|
||||
case ObjectPropsIntEnumProp::IntEnumProp0: return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
struct ObjectPropsObjectPropObjectArrayPropStruct {
|
||||
std::vector<std::string> array{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsObjectPropObjectArrayPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"array\\"] = ::facebook::react::toDynamic(array);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropObjectArrayPropStruct &result) {
|
||||
@@ -1383,28 +1217,10 @@ static inline std::string toString(const ObjectPropsObjectPropObjectArrayPropStr
|
||||
return \\"[Object ObjectPropsObjectPropObjectArrayPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropObjectArrayPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct {
|
||||
ImageSource image{};
|
||||
SharedColor color{};
|
||||
Point point{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"image\\"] = ::facebook::react::toDynamic(image);
|
||||
result[\\"color\\"] = ::facebook::react::toDynamic(color);
|
||||
result[\\"point\\"] = ::facebook::react::toDynamic(point);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct &result) {
|
||||
@@ -1428,24 +1244,8 @@ static inline std::string toString(const ObjectPropsObjectPropObjectPrimitiveReq
|
||||
return \\"[Object ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsObjectPropNestedPropANestedPropBStruct {
|
||||
std::string nestedPropC{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsObjectPropNestedPropANestedPropBStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"nestedPropC\\"] = nestedPropC;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedPropANestedPropBStruct &result) {
|
||||
@@ -1461,24 +1261,8 @@ static inline std::string toString(const ObjectPropsObjectPropNestedPropANestedP
|
||||
return \\"[Object ObjectPropsObjectPropNestedPropANestedPropBStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedPropANestedPropBStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsObjectPropNestedPropAStruct {
|
||||
ObjectPropsObjectPropNestedPropANestedPropBStruct nestedPropB{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsObjectPropNestedPropAStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"nestedPropB\\"] = ::facebook::react::toDynamic(nestedPropB);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedPropAStruct &result) {
|
||||
@@ -1494,24 +1278,8 @@ static inline std::string toString(const ObjectPropsObjectPropNestedPropAStruct
|
||||
return \\"[Object ObjectPropsObjectPropNestedPropAStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedPropAStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct {
|
||||
std::string stringProp{\\"\\"};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"stringProp\\"] = stringProp;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct &result) {
|
||||
@@ -1527,12 +1295,6 @@ static inline std::string toString(const ObjectPropsObjectPropNestedArrayAsPrope
|
||||
return \\"[Object ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
@@ -1545,16 +1307,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
|
||||
struct ObjectPropsObjectPropNestedArrayAsPropertyStruct {
|
||||
std::vector<ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct> arrayProp{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsObjectPropNestedArrayAsPropertyStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"arrayProp\\"] = ::facebook::react::toDynamic(arrayProp);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedArrayAsPropertyStruct &result) {
|
||||
@@ -1570,12 +1322,6 @@ static inline std::string toString(const ObjectPropsObjectPropNestedArrayAsPrope
|
||||
return \\"[Object ObjectPropsObjectPropNestedArrayAsPropertyStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedArrayAsPropertyStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ObjectPropsObjectPropStruct {
|
||||
std::string stringProp{\\"\\"};
|
||||
bool booleanProp{false};
|
||||
@@ -1591,29 +1337,6 @@ struct ObjectPropsObjectPropStruct {
|
||||
ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{};
|
||||
ObjectPropsObjectPropNestedPropAStruct nestedPropA{};
|
||||
ObjectPropsObjectPropNestedArrayAsPropertyStruct nestedArrayAsProperty{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
bool operator==(const ObjectPropsObjectPropStruct&) const = default;
|
||||
|
||||
folly::dynamic toDynamic() const {
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result[\\"stringProp\\"] = stringProp;
|
||||
result[\\"booleanProp\\"] = booleanProp;
|
||||
result[\\"floatProp\\"] = floatProp;
|
||||
result[\\"intProp\\"] = intProp;
|
||||
result[\\"stringUserDefaultProp\\"] = stringUserDefaultProp;
|
||||
result[\\"booleanUserDefaultProp\\"] = booleanUserDefaultProp;
|
||||
result[\\"floatUserDefaultProp\\"] = floatUserDefaultProp;
|
||||
result[\\"intUserDefaultProp\\"] = intUserDefaultProp;
|
||||
result[\\"stringEnumProp\\"] = ::facebook::react::toDynamic(stringEnumProp);
|
||||
result[\\"intEnumProp\\"] = ::facebook::react::toDynamic(intEnumProp);
|
||||
result[\\"objectArrayProp\\"] = ::facebook::react::toDynamic(objectArrayProp);
|
||||
result[\\"objectPrimitiveRequiredProp\\"] = ::facebook::react::toDynamic(objectPrimitiveRequiredProp);
|
||||
result[\\"nestedPropA\\"] = ::facebook::react::toDynamic(nestedPropA);
|
||||
result[\\"nestedArrayAsProperty\\"] = ::facebook::react::toDynamic(nestedArrayAsProperty);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropStruct &result) {
|
||||
@@ -1680,12 +1403,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
||||
static inline std::string toString(const ObjectPropsObjectPropStruct &value) {
|
||||
return \\"[Object ObjectPropsObjectPropStruct]\\";
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropStruct &value) {
|
||||
return value.toDynamic();
|
||||
}
|
||||
#endif
|
||||
class ObjectPropsProps final : public ViewProps {
|
||||
public:
|
||||
ObjectPropsProps() = default;
|
||||
@@ -1696,8 +1413,6 @@ class ObjectPropsProps final : public ViewProps {
|
||||
ObjectPropsObjectPropStruct objectProp{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1736,8 +1451,6 @@ class PointPropNativeComponentProps final : public ViewProps {
|
||||
Point startPoint{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1783,12 +1496,6 @@ static inline std::string toString(const StringEnumPropsNativeComponentAlignment
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
static inline folly::dynamic toDynamic(const StringEnumPropsNativeComponentAlignment &value) {
|
||||
return toString(value);
|
||||
}
|
||||
#endif
|
||||
|
||||
class StringEnumPropsNativeComponentProps final : public ViewProps {
|
||||
public:
|
||||
StringEnumPropsNativeComponentProps() = default;
|
||||
@@ -1799,8 +1506,6 @@ class StringEnumPropsNativeComponentProps final : public ViewProps {
|
||||
StringEnumPropsNativeComponentAlignment alignment{StringEnumPropsNativeComponentAlignment::Center};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1839,8 +1544,6 @@ class StringPropComponentProps final : public ViewProps {
|
||||
std::string accessibilityRole{};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1878,8 +1581,6 @@ class MultiFile1NativeComponentProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1894,8 +1595,6 @@ class MultiFile2NativeComponentProps final : public ViewProps {
|
||||
bool disabled{true};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1933,8 +1632,6 @@ class MultiComponent1NativeComponentProps final : public ViewProps {
|
||||
bool disabled{false};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
@@ -1949,8 +1646,6 @@ class MultiComponent2NativeComponentProps final : public ViewProps {
|
||||
bool disabled{true};
|
||||
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
ComponentName getDiffPropsImplementationTarget() const override;
|
||||
|
||||
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
||||
#endif
|
||||
};
|
||||
|
||||
+240
-240
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/compatibility-check",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -29,7 +29,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
},
|
||||
"devDependencies": {
|
||||
"flow-remove-types": "^2.237.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/popup-menu-android",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "PopupMenu for the Android platform",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.1.0",
|
||||
|
||||
-2
@@ -12,9 +12,7 @@ import com.facebook.react.bridge.NativeModule
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.uimanager.ViewManager
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
public class OSSLibraryExamplePackage : ReactPackage {
|
||||
@Deprecated("Migrate to [BaseReactPackage] and implement [getModule] instead.")
|
||||
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
|
||||
listOf(NativeSampleModule(reactContext))
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/oss-library-example",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"private": true,
|
||||
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
|
||||
"license": "MIT",
|
||||
@@ -26,7 +26,7 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.81.0-main",
|
||||
"@react-native/babel-preset": "0.80.0-main",
|
||||
"react-native": "1000.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
import type {NativeSyntheticEvent} from '../Types/CoreEventTypes';
|
||||
import type {PlatformConfig} from './AnimatedPlatformConfig';
|
||||
import type {EventMapping} from './NativeAnimatedModule';
|
||||
|
||||
import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
|
||||
import {findNodeHandle} from '../ReactNative/RendererProxy';
|
||||
@@ -38,7 +37,7 @@ export function attachNativeEventImpl(
|
||||
): {detach: () => void} {
|
||||
// Find animated values in `argMapping` and create an array representing their
|
||||
// key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].
|
||||
const eventMappings: Array<EventMapping> = [];
|
||||
const eventMappings = [];
|
||||
|
||||
const traverse = (value: mixed, path: Array<string>) => {
|
||||
if (value instanceof AnimatedValue) {
|
||||
|
||||
@@ -247,6 +247,10 @@ describe('Animated', () => {
|
||||
});
|
||||
|
||||
it('renders animated and primitive style correctly', () => {
|
||||
ReactNativeFeatureFlags.override({
|
||||
alwaysFlattenAnimatedStyles: () => true,
|
||||
});
|
||||
|
||||
const anim = new Animated.Value(0);
|
||||
const staticProps = {
|
||||
style: [
|
||||
@@ -372,7 +376,8 @@ describe('Animated', () => {
|
||||
const anim2 = {start: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const seq = Animated.sequence([anim1, anim2]);
|
||||
|
||||
expect(anim1.start).not.toBeCalled();
|
||||
expect(anim2.start).not.toBeCalled();
|
||||
@@ -397,7 +402,8 @@ describe('Animated', () => {
|
||||
const anim2 = {start: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]).start(cb);
|
||||
// $FlowFixMe[prop-missing]
|
||||
Animated.sequence([anim1, anim2]).start(cb);
|
||||
|
||||
anim1.start.mock.calls[0][0]({finished: false});
|
||||
|
||||
@@ -411,7 +417,8 @@ describe('Animated', () => {
|
||||
const anim2 = {start: jest.fn(), stop: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const seq = Animated.sequence([anim1, anim2]);
|
||||
seq.start(cb);
|
||||
seq.stop();
|
||||
|
||||
@@ -429,7 +436,8 @@ describe('Animated', () => {
|
||||
const anim2 = {start: jest.fn(), stop: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const seq = Animated.sequence([anim1, anim2]);
|
||||
|
||||
seq.start(cb);
|
||||
|
||||
@@ -452,7 +460,8 @@ describe('Animated', () => {
|
||||
const anim2 = {start: jest.fn(), stop: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const seq = Animated.sequence([anim1, anim2]);
|
||||
|
||||
seq.start(cb);
|
||||
anim1.start.mock.calls[0][0]({finished: true});
|
||||
@@ -478,7 +487,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(animation as $FlowFixMe);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation);
|
||||
|
||||
expect(animation.start).not.toBeCalled();
|
||||
|
||||
@@ -509,7 +519,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(animation as $FlowFixMe, {iterations: -1});
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation, {iterations: -1});
|
||||
|
||||
expect(animation.start).not.toBeCalled();
|
||||
|
||||
@@ -540,10 +551,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(
|
||||
animation as $FlowFixMe,
|
||||
{anotherKey: 'value'} as $FlowFixMe,
|
||||
);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation, {anotherKey: 'value'});
|
||||
|
||||
expect(animation.start).not.toBeCalled();
|
||||
|
||||
@@ -574,7 +583,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(animation as $FlowFixMe, {iterations: 3});
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation, {iterations: 3});
|
||||
|
||||
expect(animation.start).not.toBeCalled();
|
||||
|
||||
@@ -605,7 +615,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(animation as $FlowFixMe, {iterations: 1});
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation, {iterations: 1});
|
||||
|
||||
expect(animation.start).not.toBeCalled();
|
||||
|
||||
@@ -626,7 +637,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(animation as $FlowFixMe, {iterations: 0});
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation, {iterations: 0});
|
||||
|
||||
expect(animation.start).not.toBeCalled();
|
||||
|
||||
@@ -644,7 +656,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
Animated.loop(animation as $FlowFixMe).start(cb);
|
||||
// $FlowFixMe[prop-missing]
|
||||
Animated.loop(animation).start(cb);
|
||||
expect(animation.start).toBeCalled();
|
||||
expect(animation.reset).toHaveBeenCalledTimes(1);
|
||||
expect(cb).not.toBeCalled();
|
||||
@@ -667,7 +680,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(animation as $FlowFixMe);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation);
|
||||
loop.start(cb);
|
||||
loop.stop();
|
||||
|
||||
@@ -689,10 +703,8 @@ describe('Animated', () => {
|
||||
};
|
||||
const cb = jest.fn();
|
||||
|
||||
const loop = Animated.loop(
|
||||
animation as $FlowFixMe,
|
||||
{resetBeforeIteration: false} as $FlowFixMe,
|
||||
);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(animation, {resetBeforeIteration: false});
|
||||
|
||||
expect(animation.start).not.toBeCalled();
|
||||
|
||||
@@ -718,7 +730,8 @@ describe('Animated', () => {
|
||||
it('restarts sequence normally in a loop if resetBeforeIteration is false', () => {
|
||||
const anim1 = {start: jest.fn(), stop: jest.fn()};
|
||||
const anim2 = {start: jest.fn(), stop: jest.fn()};
|
||||
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const seq = Animated.sequence([anim1, anim2]);
|
||||
|
||||
// $FlowFixMe[prop-missing]
|
||||
const loop = Animated.loop(seq, {resetBeforeIteration: false});
|
||||
@@ -748,7 +761,9 @@ describe('Animated', () => {
|
||||
it('works with an empty element in array', () => {
|
||||
const anim1 = {start: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
Animated.parallel([null as $FlowFixMe, anim1 as $FlowFixMe]).start(cb);
|
||||
// $FlowFixMe[incompatible-call]
|
||||
// $FlowFixMe[prop-missing]
|
||||
Animated.parallel([null, anim1]).start(cb);
|
||||
|
||||
expect(anim1.start).toBeCalled();
|
||||
anim1.start.mock.calls[0][0]({finished: true});
|
||||
@@ -761,7 +776,9 @@ describe('Animated', () => {
|
||||
const anim2 = {start: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
const par = Animated.parallel([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
// $FlowFixMe[prop-missing]
|
||||
const par = Animated.parallel([anim1, anim2]);
|
||||
|
||||
expect(anim1.start).not.toBeCalled();
|
||||
expect(anim2.start).not.toBeCalled();
|
||||
@@ -784,7 +801,8 @@ describe('Animated', () => {
|
||||
const anim2 = {start: jest.fn(), stop: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
const seq = Animated.parallel([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const seq = Animated.parallel([anim1, anim2]);
|
||||
seq.start(cb);
|
||||
seq.stop();
|
||||
|
||||
@@ -805,11 +823,8 @@ describe('Animated', () => {
|
||||
const anim3 = {start: jest.fn(), stop: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
|
||||
const seq = Animated.parallel([
|
||||
anim1 as $FlowFixMe,
|
||||
anim2 as $FlowFixMe,
|
||||
anim3 as $FlowFixMe,
|
||||
]);
|
||||
// $FlowFixMe[prop-missing]
|
||||
const seq = Animated.parallel([anim1, anim2, anim3]);
|
||||
seq.start(cb);
|
||||
|
||||
anim1.start.mock.calls[0][0]({finished: false});
|
||||
@@ -836,7 +851,8 @@ describe('Animated', () => {
|
||||
it('should call anim after delay in sequence', () => {
|
||||
const anim = {start: jest.fn(), stop: jest.fn()};
|
||||
const cb = jest.fn();
|
||||
Animated.sequence([Animated.delay(1000), anim as $FlowFixMe]).start(cb);
|
||||
// $FlowFixMe[prop-missing]
|
||||
Animated.sequence([Animated.delay(1000), anim]).start(cb);
|
||||
jest.runAllTimers();
|
||||
expect(anim.start.mock.calls.length).toBe(1);
|
||||
expect(cb).not.toBeCalled();
|
||||
|
||||
@@ -13,6 +13,7 @@ import type {AnimatedNodeConfig} from './AnimatedNode';
|
||||
import type {AnimatedStyleAllowlist} from './AnimatedStyle';
|
||||
|
||||
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
||||
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
||||
import {findNodeHandle} from '../../ReactNative/RendererProxy';
|
||||
import flattenStyle from '../../StyleSheet/flattenStyle';
|
||||
import {AnimatedEvent} from '../AnimatedEvent';
|
||||
@@ -57,7 +58,9 @@ function createAnimatedProps(
|
||||
// we propagate the flattened `style` object to the `props` object.
|
||||
const flatStyle = flattenStyle(value as $FlowFixMe);
|
||||
node = AnimatedStyle.from(flatStyle, allowlist?.style, value);
|
||||
staticValue = flatStyle;
|
||||
if (ReactNativeFeatureFlags.alwaysFlattenAnimatedStyles()) {
|
||||
staticValue = flatStyle;
|
||||
}
|
||||
}
|
||||
} else if (value instanceof AnimatedNode) {
|
||||
node = value;
|
||||
@@ -161,7 +164,9 @@ export default class AnimatedProps extends AnimatedNode {
|
||||
maybeNode.__replaceAnimatedNodeWithValues(mutableStyle);
|
||||
props[key] = maybeNode.__getValueForStyle(mutableStyle);
|
||||
} else {
|
||||
props[key] = flatStaticStyle;
|
||||
if (ReactNativeFeatureFlags.alwaysFlattenAnimatedStyles()) {
|
||||
props[key] = flatStaticStyle;
|
||||
}
|
||||
}
|
||||
} else if (maybeNode instanceof AnimatedNode) {
|
||||
props[key] = maybeNode.__getValue();
|
||||
|
||||
@@ -84,5 +84,4 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -55,5 +55,4 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. 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 RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
|
||||
import NativeRedBox from '../NativeModules/specs/NativeRedBox';
|
||||
import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
||||
import NativeBugReporting from './NativeBugReporting';
|
||||
|
||||
type ExtraData = {[key: string]: string, ...};
|
||||
type SourceCallback = () => string;
|
||||
type DebugData = {
|
||||
extras: ExtraData,
|
||||
files: ExtraData,
|
||||
...
|
||||
};
|
||||
|
||||
function defaultExtras() {
|
||||
BugReporting.addFileSource('react_hierarchy.txt', () =>
|
||||
require('./dumpReactTree').default(),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple class for collecting bug report data. Components can add sources that will be queried when a bug report
|
||||
* is created via `collectExtraData`. For example, a list component might add a source that provides the list of rows
|
||||
* that are currently visible on screen. Components should also remember to call `remove()` on the object that is
|
||||
* returned by `addSource` when they are unmounted.
|
||||
*/
|
||||
class BugReporting {
|
||||
static _extraSources: Map<string, SourceCallback> = new Map();
|
||||
static _fileSources: Map<string, SourceCallback> = new Map();
|
||||
static _subscription: ?EventSubscription = null;
|
||||
static _redboxSubscription: ?EventSubscription = null;
|
||||
|
||||
static _maybeInit() {
|
||||
if (!BugReporting._subscription) {
|
||||
BugReporting._subscription = RCTDeviceEventEmitter.addListener(
|
||||
'collectBugExtraData',
|
||||
// $FlowFixMe[method-unbinding]
|
||||
BugReporting.collectExtraData,
|
||||
null,
|
||||
);
|
||||
defaultExtras();
|
||||
}
|
||||
|
||||
if (!BugReporting._redboxSubscription) {
|
||||
BugReporting._redboxSubscription = RCTDeviceEventEmitter.addListener(
|
||||
'collectRedBoxExtraData',
|
||||
// $FlowFixMe[method-unbinding]
|
||||
BugReporting.collectExtraData,
|
||||
null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a string key to a simple callback that should return a string payload to be attached
|
||||
* to a bug report. Source callbacks are called when `collectExtraData` is called.
|
||||
*
|
||||
* Returns an object to remove the source when the component unmounts.
|
||||
*
|
||||
* Conflicts trample with a warning.
|
||||
*/
|
||||
static addSource(
|
||||
key: string,
|
||||
callback: SourceCallback,
|
||||
): {remove: () => void, ...} {
|
||||
return this._addSource(key, callback, BugReporting._extraSources);
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a string key to a simple callback that should return a string payload to be attached
|
||||
* to a bug report. Source callbacks are called when `collectExtraData` is called.
|
||||
*
|
||||
* Returns an object to remove the source when the component unmounts.
|
||||
*
|
||||
* Conflicts trample with a warning.
|
||||
*/
|
||||
static addFileSource(
|
||||
key: string,
|
||||
callback: SourceCallback,
|
||||
): {remove: () => void, ...} {
|
||||
return this._addSource(key, callback, BugReporting._fileSources);
|
||||
}
|
||||
|
||||
static _addSource(
|
||||
key: string,
|
||||
callback: SourceCallback,
|
||||
source: Map<string, SourceCallback>,
|
||||
): {remove: () => void, ...} {
|
||||
BugReporting._maybeInit();
|
||||
if (source.has(key)) {
|
||||
console.warn(
|
||||
`BugReporting.add* called multiple times for same key '${key}'`,
|
||||
);
|
||||
}
|
||||
source.set(key, callback);
|
||||
return {
|
||||
remove: () => {
|
||||
source.delete(key);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can be called from a native bug reporting flow, or from JS code.
|
||||
*
|
||||
* If available, this will call `NativeModules.BugReporting.setExtraData(extraData)`
|
||||
* after collecting `extraData`.
|
||||
*/
|
||||
static collectExtraData(): DebugData {
|
||||
const extraData: ExtraData = {};
|
||||
for (const [key, callback] of BugReporting._extraSources) {
|
||||
extraData[key] = callback();
|
||||
}
|
||||
const fileData: ExtraData = {};
|
||||
for (const [key, callback] of BugReporting._fileSources) {
|
||||
fileData[key] = callback();
|
||||
}
|
||||
|
||||
if (NativeBugReporting != null && NativeBugReporting.setExtraData != null) {
|
||||
NativeBugReporting.setExtraData(extraData, fileData);
|
||||
}
|
||||
|
||||
if (NativeRedBox != null && NativeRedBox.setExtraData != null) {
|
||||
NativeRedBox.setExtraData(extraData, 'From BugReporting.js');
|
||||
}
|
||||
|
||||
return {extras: extraData, files: fileData};
|
||||
}
|
||||
}
|
||||
|
||||
export default BugReporting;
|
||||
@@ -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 strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
export * from '../../src/private/specs_DEPRECATED/modules/NativeBugReporting';
|
||||
import NativeBugReporting from '../../src/private/specs_DEPRECATED/modules/NativeBugReporting';
|
||||
|
||||
export default NativeBugReporting;
|
||||
@@ -0,0 +1,151 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
const getReactData = require('getReactData').default;
|
||||
|
||||
const INDENTATION_SIZE = 2;
|
||||
const MAX_DEPTH = 2;
|
||||
const MAX_STRING_LENGTH = 50;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dump all React Native root views and their content. This function tries
|
||||
* it best to get the content but ultimately relies on implementation details
|
||||
* of React and will fail in future versions.
|
||||
*/
|
||||
function dumpReactTree(): string {
|
||||
try {
|
||||
return getReactTree();
|
||||
} catch (e) {
|
||||
return 'Failed to dump react tree: ' + e;
|
||||
}
|
||||
}
|
||||
|
||||
function getReactTree() {
|
||||
// TODO(sema): Reenable tree dumps using the Fiber tree structure. #15945684
|
||||
return (
|
||||
'React tree dumps have been temporarily disabled while React is ' +
|
||||
'upgraded to Fiber.'
|
||||
);
|
||||
/*
|
||||
let output = '';
|
||||
const rootIds = Object.getOwnPropertyNames(ReactNativeMount._instancesByContainerID);
|
||||
for (const rootId of rootIds) {
|
||||
const instance = ReactNativeMount._instancesByContainerID[rootId];
|
||||
output += `============ Root ID: ${rootId} ============\n`;
|
||||
output += dumpNode(instance, 0);
|
||||
output += `============ End root ID: ${rootId} ============\n`;
|
||||
}
|
||||
return output;
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
function dumpNode(node: Object, indentation: number) {
|
||||
const data = getReactData(node);
|
||||
if (data.nodeType === 'Text') {
|
||||
return indent(indentation) + data.text + '\n';
|
||||
} else if (data.nodeType === 'Empty') {
|
||||
return '';
|
||||
}
|
||||
let output = indent(indentation) + `<${data.name}`;
|
||||
if (data.nodeType === 'Composite') {
|
||||
for (const propName of Object.getOwnPropertyNames(data.props || {})) {
|
||||
if (isNormalProp(propName)) {
|
||||
try {
|
||||
const value = convertValue(data.props[propName]);
|
||||
if (value) {
|
||||
output += ` ${propName}=${value}`;
|
||||
}
|
||||
} catch (e) {
|
||||
const message = `[Failed to get property: ${e}]`;
|
||||
output += ` ${propName}=${message}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let childOutput = '';
|
||||
for (const child of data.children || []) {
|
||||
childOutput += dumpNode(child, indentation + 1);
|
||||
}
|
||||
|
||||
if (childOutput) {
|
||||
output += '>\n' + childOutput + indent(indentation) + `</${data.name}>\n`;
|
||||
} else {
|
||||
output += ' />\n';
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
function isNormalProp(name: string): boolean {
|
||||
switch (name) {
|
||||
case 'children':
|
||||
case 'key':
|
||||
case 'ref':
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function convertObject(object: Object, depth: number) {
|
||||
if (depth >= MAX_DEPTH) {
|
||||
return '[...omitted]';
|
||||
}
|
||||
let output = '{';
|
||||
let first = true;
|
||||
for (const key of Object.getOwnPropertyNames(object)) {
|
||||
if (!first) {
|
||||
output += ', ';
|
||||
}
|
||||
output += `${key}: ${convertValue(object[key], depth + 1)}`;
|
||||
first = false;
|
||||
}
|
||||
return output + '}';
|
||||
}
|
||||
|
||||
function convertValue(value, depth = 0): ?string {
|
||||
if (!value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (typeof value) {
|
||||
case 'string':
|
||||
return JSON.stringify(possiblyEllipsis(value).replace('\n', '\\n'));
|
||||
case 'boolean':
|
||||
case 'number':
|
||||
return JSON.stringify(value);
|
||||
case 'function':
|
||||
return '[function]';
|
||||
case 'object':
|
||||
return convertObject(value, depth);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function possiblyEllipsis(value: string) {
|
||||
if (value.length > MAX_STRING_LENGTH) {
|
||||
return value.slice(0, MAX_STRING_LENGTH) + '...';
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
function indent(size: number) {
|
||||
return ' '.repeat(size * INDENTATION_SIZE);
|
||||
}
|
||||
*/
|
||||
|
||||
export default dumpReactTree;
|
||||
@@ -0,0 +1,187 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Convert a react internal instance to a sanitized data object.
|
||||
*
|
||||
* This is shamelessly stolen from react-devtools:
|
||||
* https://github.com/facebook/react-devtools/blob/HEAD/backend/getData.js
|
||||
*/
|
||||
function getData(element: Object): Object {
|
||||
let children = null;
|
||||
let props = null;
|
||||
let state = null;
|
||||
let context = null;
|
||||
let updater = null;
|
||||
let name = null;
|
||||
let type = null;
|
||||
let text = null;
|
||||
let publicInstance = null;
|
||||
let nodeType = 'Native';
|
||||
// If the parent is a native node without rendered children, but with
|
||||
// multiple string children, then the `element` that gets passed in here is
|
||||
// a plain value -- a string or number.
|
||||
if (typeof element !== 'object') {
|
||||
nodeType = 'Text';
|
||||
text = element + '';
|
||||
} else if (
|
||||
element._currentElement === null ||
|
||||
element._currentElement === false
|
||||
) {
|
||||
nodeType = 'Empty';
|
||||
} else if (element._renderedComponent) {
|
||||
nodeType = 'NativeWrapper';
|
||||
children = [element._renderedComponent];
|
||||
props = element._instance.props;
|
||||
state = element._instance.state;
|
||||
context = element._instance.context;
|
||||
if (context && Object.keys(context).length === 0) {
|
||||
context = null;
|
||||
}
|
||||
} else if (element._renderedChildren) {
|
||||
children = childrenList(element._renderedChildren);
|
||||
} else if (element._currentElement && element._currentElement.props) {
|
||||
// This is a native node without rendered children -- meaning the children
|
||||
// prop is just a string or (in the case of the <option>) a list of
|
||||
// strings & numbers.
|
||||
children = element._currentElement.props.children;
|
||||
}
|
||||
|
||||
if (!props && element._currentElement && element._currentElement.props) {
|
||||
props = element._currentElement.props;
|
||||
}
|
||||
|
||||
// != used deliberately here to catch undefined and null
|
||||
if (element._currentElement != null) {
|
||||
type = element._currentElement.type;
|
||||
if (typeof type === 'string') {
|
||||
name = type;
|
||||
} else if (element.getName) {
|
||||
nodeType = 'Composite';
|
||||
name = element.getName();
|
||||
// 0.14 top-level wrapper
|
||||
// TODO(jared): The backend should just act as if these don't exist.
|
||||
if (
|
||||
element._renderedComponent &&
|
||||
element._currentElement.props ===
|
||||
element._renderedComponent._currentElement
|
||||
) {
|
||||
nodeType = 'Wrapper';
|
||||
}
|
||||
if (name === null) {
|
||||
name = 'No display name';
|
||||
}
|
||||
} else if (element._stringText) {
|
||||
nodeType = 'Text';
|
||||
text = element._stringText;
|
||||
} else {
|
||||
name = type.displayName || type.name || 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
if (element._instance) {
|
||||
const inst = element._instance;
|
||||
updater = {
|
||||
setState: inst.setState && inst.setState.bind(inst),
|
||||
forceUpdate: inst.forceUpdate && inst.forceUpdate.bind(inst),
|
||||
setInProps: inst.forceUpdate && setInProps.bind(null, element),
|
||||
setInState: inst.forceUpdate && setInState.bind(null, inst),
|
||||
setInContext: inst.forceUpdate && setInContext.bind(null, inst),
|
||||
};
|
||||
publicInstance = inst;
|
||||
|
||||
// TODO: React ART currently falls in this bucket, but this doesn't
|
||||
// actually make sense and we should clean this up after stabilizing our
|
||||
// API for backends
|
||||
if (inst._renderedChildren) {
|
||||
children = childrenList(inst._renderedChildren);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
nodeType,
|
||||
type,
|
||||
name,
|
||||
props,
|
||||
state,
|
||||
context,
|
||||
children,
|
||||
text,
|
||||
updater,
|
||||
publicInstance,
|
||||
};
|
||||
}
|
||||
|
||||
function setInProps(
|
||||
internalInst: any,
|
||||
path: Array<string | number>,
|
||||
value: any,
|
||||
) {
|
||||
const element = internalInst._currentElement;
|
||||
internalInst._currentElement = {
|
||||
...element,
|
||||
props: copyWithSet(element.props, path, value),
|
||||
};
|
||||
internalInst._instance.forceUpdate();
|
||||
}
|
||||
|
||||
function setInState(inst: any, path: Array<string | number>, value: any) {
|
||||
setIn(inst.state, path, value);
|
||||
inst.forceUpdate();
|
||||
}
|
||||
|
||||
function setInContext(inst: any, path: Array<string | number>, value: any) {
|
||||
setIn(inst.context, path, value);
|
||||
inst.forceUpdate();
|
||||
}
|
||||
|
||||
function setIn(obj: Object, path: Array<string | number>, value: any) {
|
||||
const last = path.pop();
|
||||
const parent = path.reduce((obj_, attr) => (obj_ ? obj_[attr] : null), obj);
|
||||
if (parent) {
|
||||
parent[last] = value;
|
||||
}
|
||||
}
|
||||
|
||||
function childrenList(children: any) {
|
||||
const res = [];
|
||||
for (const name in children) {
|
||||
res.push(children[name]);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
function copyWithSetImpl(
|
||||
obj: any | Array<any>,
|
||||
path: Array<string | number>,
|
||||
idx: number,
|
||||
value: any,
|
||||
): any {
|
||||
if (idx >= path.length) {
|
||||
return value;
|
||||
}
|
||||
const key = path[idx];
|
||||
const updated = Array.isArray(obj) ? obj.slice() : {...obj};
|
||||
// $FlowFixMe[incompatible-use] number or string is fine here
|
||||
updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
|
||||
return updated;
|
||||
}
|
||||
|
||||
function copyWithSet(
|
||||
obj: Object | Array<any>,
|
||||
path: Array<string | number>,
|
||||
value: any,
|
||||
): Object | Array<any> {
|
||||
return copyWithSetImpl(obj, path, 0, value);
|
||||
}
|
||||
|
||||
export default getData;
|
||||
@@ -678,9 +678,7 @@ export interface ScrollViewProps
|
||||
* It's implemented using onLayout handler attached to the content container which this ScrollView renders.
|
||||
*
|
||||
*/
|
||||
onContentSizeChange?:
|
||||
| ((contentWidth: number, contentHeight: number) => void)
|
||||
| undefined;
|
||||
onContentSizeChange?: ((w: number, h: number) => void) | undefined;
|
||||
|
||||
/**
|
||||
* Fires at most once per frame during scrolling.
|
||||
|
||||
@@ -673,7 +673,7 @@ type ScrollViewBaseProps = $ReadOnly<{
|
||||
}>;
|
||||
|
||||
export type ScrollViewProps = $ReadOnly<{
|
||||
...Omit<ViewProps, 'experimental_accessibilityOrder'>,
|
||||
...ViewProps,
|
||||
...ScrollViewPropsIOS,
|
||||
...ScrollViewPropsAndroid,
|
||||
...ScrollViewBaseProps,
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {NativeSyntheticEvent} from '../../Types/CoreEventTypes';
|
||||
import type {AccessibilityState} from '../View/ViewAccessibility';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
import StyleSheet from '../../StyleSheet/StyleSheet';
|
||||
@@ -232,7 +231,7 @@ const Switch: component(
|
||||
const _disabled =
|
||||
disabled != null ? disabled : accessibilityState?.disabled;
|
||||
|
||||
const _accessibilityState: ?AccessibilityState =
|
||||
const _accessibilityState =
|
||||
_disabled !== accessibilityState?.disabled
|
||||
? {...accessibilityState, disabled: _disabled}
|
||||
: accessibilityState;
|
||||
|
||||
@@ -1031,7 +1031,7 @@ type TextInputBaseProps = $ReadOnly<{
|
||||
}>;
|
||||
|
||||
export type TextInputProps = $ReadOnly<{
|
||||
...Omit<ViewProps, 'style' | 'experimental_accessibilityOrder'>,
|
||||
...Omit<ViewProps, 'style'>,
|
||||
...TextInputIOSProps,
|
||||
...TextInputAndroidProps,
|
||||
...TextInputBaseProps,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user