@react-native-gpui/screens 0.0.0-stage → 4.28.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/LICENSE +21 -0
- package/README.md +22 -2
- package/desktop/CMakeLists.txt +30 -0
- package/desktop/Cargo.lock +7781 -0
- package/desktop/Cargo.toml +54 -0
- package/desktop/build.rs +38 -0
- package/desktop/cpp/GpuiScreensModule.cpp +77 -0
- package/desktop/src/lib.rs +29 -0
- package/desktop/src/lifecycle.rs +80 -0
- package/desktop/src/props.rs +177 -0
- package/desktop/src/render.rs +829 -0
- package/desktop/src/stack.rs +396 -0
- package/desktop/src/state.rs +162 -0
- package/desktop/src/transition.rs +193 -0
- package/desktop/src/unsupported.rs +39 -0
- package/package.json +31 -4
- package/react-native.config.js +36 -0
- package/src/FullWindowOverlay.desktop.tsx +19 -0
- package/src/core.desktop.ts +28 -0
- package/src/customDirectEventTypes.desktop.ts +16 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@react-native-gpui/screens` are listed here. Each version's section becomes the notes of its GitHub release.
|
|
4
|
+
|
|
5
|
+
## 4.28.0-alpha.0 - 2026-11-01
|
|
6
|
+
|
|
7
|
+
- First release, for `react-native-screens` 4.28.x.
|
|
8
|
+
- Native stacks and screens on desktop, for React Navigation.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Streetwriters
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @react-native-gpui/screens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Desktop support for [`react-native-screens`](https://github.com/software-mansion/react-native-screens): native stacks and screens, as used by React Navigation.
|
|
4
|
+
|
|
5
|
+
Part of [react-native-gpui](https://github.com/streetwriters/react-native-gpui), React Native for macOS, Windows and Linux.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Install it next to `react-native-screens`:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install react-native-screens@4.28.x @react-native-gpui/screens
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Keep using `react-native-screens` as you do on iOS and Android; its JavaScript API is unchanged. Autolinking builds the desktop side when the app is built.
|
|
16
|
+
|
|
17
|
+
## Documentation
|
|
18
|
+
|
|
19
|
+
[Supported libraries](https://streetwriters.github.io/react-native-gpui/docs/supported-libraries)
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
|
|
23
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
if(NOT RN_GPUI_PROJECT_ROOT)
|
|
2
|
+
message(FATAL_ERROR
|
|
3
|
+
"@react-native-gpui/screens was added by the platform; RN_GPUI_PROJECT_ROOT must be set by its build.rs")
|
|
4
|
+
endif()
|
|
5
|
+
rn_gpui_find_node_module(react-native-screens _screens_root)
|
|
6
|
+
set(_screens_common "${_screens_root}/common/cpp")
|
|
7
|
+
set(_screens_component_dir "${_screens_common}/react/renderer/components/rnscreens")
|
|
8
|
+
set(_screens_package_json "${_screens_root}/package.json")
|
|
9
|
+
|
|
10
|
+
if(NOT EXISTS "${_screens_component_dir}/RNSScreenShadowNode.cpp" OR NOT EXISTS "${_screens_package_json}")
|
|
11
|
+
message(FATAL_ERROR "react-native-screens 4.28.x was not found at ${_screens_root}")
|
|
12
|
+
endif()
|
|
13
|
+
|
|
14
|
+
file(READ "${_screens_package_json}" _screens_package_json_contents)
|
|
15
|
+
string(JSON _screens_version GET "${_screens_package_json_contents}" version)
|
|
16
|
+
if(NOT _screens_version MATCHES "^4\\.28\\.")
|
|
17
|
+
message(FATAL_ERROR "@react-native-gpui/screens supports react-native-screens 4.28.x, found ${_screens_version}")
|
|
18
|
+
endif()
|
|
19
|
+
|
|
20
|
+
file(GLOB _screens_common_sources CONFIGURE_DEPENDS "${_screens_component_dir}/*.cpp")
|
|
21
|
+
set_property(GLOBAL APPEND PROPERTY RN_GPUI_APP_CPP_SOURCES ${_screens_common_sources})
|
|
22
|
+
set_property(GLOBAL APPEND PROPERTY RN_GPUI_APP_CPP_INCLUDE_DIRS "${_screens_common}")
|
|
23
|
+
# The mount pipeline knows nothing about screens: this glue fills the header and
|
|
24
|
+
# screen fields of a mount op, and the platform compiles it only because the
|
|
25
|
+
# package is installed.
|
|
26
|
+
set_property(GLOBAL APPEND PROPERTY RN_GPUI_PACKAGE_MODULE_SOURCES
|
|
27
|
+
"${CMAKE_CURRENT_LIST_DIR}/cpp/GpuiScreensModule.cpp")
|
|
28
|
+
set_property(GLOBAL APPEND PROPERTY RN_GPUI_PACKAGE_MODULE_INSTALLERS screens)
|
|
29
|
+
set_property(GLOBAL APPEND PROPERTY RN_GPUI_PACKAGE_MODULE_INCLUDE_DIRS
|
|
30
|
+
"${_screens_common}")
|