pythonnative 0.21.0__tar.gz → 0.22.1__tar.gz
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.
- {pythonnative-0.21.0/src/pythonnative.egg-info → pythonnative-0.22.1}/PKG-INFO +14 -11
- {pythonnative-0.21.0 → pythonnative-0.22.1}/README.md +12 -9
- {pythonnative-0.21.0 → pythonnative-0.22.1}/pyproject.toml +4 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/__init__.py +14 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/animated.py +420 -135
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/cli/pn.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/components.py +525 -241
- pythonnative-0.22.1/src/pythonnative/events.py +210 -0
- pythonnative-0.22.1/src/pythonnative/gestures.py +875 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/hooks.py +3 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/hot_reload.py +4 -4
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/layout.py +464 -150
- pythonnative-0.22.1/src/pythonnative/mutations.py +130 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/camera.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/haptics.py +2 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/location.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/permissions.py +2 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/secure_store.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_views/__init__.py +161 -97
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_views/android.py +1064 -1158
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_views/base.py +109 -19
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_views/desktop.py +465 -422
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_views/ios.py +1930 -1928
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/navigation.py +4 -4
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/net.py +3 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/platform.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/platform_metrics.py +5 -5
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/preview.py +3 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/android.py +2 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/builder.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/config.py +3 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/doctor.py +2 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/icons.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/ios.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/permissions.py +2 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/runtime_assets.py +3 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/reconciler.py +545 -475
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/runtime.py +8 -8
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/screen.py +10 -7
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/sdk/_components.py +3 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/storage.py +3 -3
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/style.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/build.gradle +2 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template.xcodeproj/project.pbxproj +2 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_templateUITests/ios_templateUITests.swift +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1/src/pythonnative.egg-info}/PKG-INFO +14 -11
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative.egg-info/SOURCES.txt +6 -1
- pythonnative-0.22.1/tests/test_animated.py +469 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_async_hooks.py +1 -24
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_components.py +23 -11
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_desktop_backend.py +3 -4
- pythonnative-0.22.1/tests/test_events.py +202 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_extended_components.py +60 -21
- pythonnative-0.22.1/tests/test_gestures.py +340 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_hooks.py +3 -43
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_hot_reload.py +4 -33
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_incremental_render.py +2 -53
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_ios_log.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_layout.py +1 -1
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_metric_hooks.py +2 -35
- pythonnative-0.22.1/tests/test_mutations.py +239 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_native_modules.py +2 -29
- pythonnative-0.22.1/tests/test_native_views.py +486 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_navigation.py +81 -43
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_new_components.py +108 -31
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_reconciler.py +48 -91
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_ref.py +6 -39
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_screen.py +2 -2
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_sdk.py +21 -9
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_storage.py +1 -24
- pythonnative-0.21.0/src/pythonnative/templates/android_template/app/src/main/java/com/pythonnative/android_template/PNVirtualListView.java +0 -129
- pythonnative-0.21.0/tests/test_animated.py +0 -268
- pythonnative-0.21.0/tests/test_native_views.py +0 -326
- {pythonnative-0.21.0 → pythonnative-0.22.1}/LICENSE +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/setup.cfg +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/_ios_log.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/alerts.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/cli/__init__.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/element.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/__init__.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/app_state.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/battery.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/biometrics.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/clipboard.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/file_system.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/linking.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/net_info.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/notifications.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/native_modules/share.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/project/__init__.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/sdk/__init__.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/proguard-rules.pro +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/androidTest/java/com/pythonnative/android_template/ExampleInstrumentedTest.kt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/AndroidManifest.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/java/com/pythonnative/android_template/MainActivity.kt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/java/com/pythonnative/android_template/Navigator.kt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/java/com/pythonnative/android_template/ScreenFragment.kt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/drawable/ic_launcher_background.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/layout/activity_main.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/navigation/nav_graph.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/values/colors.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/values/strings.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/values/themes.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/values-night/themes.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/xml/backup_rules.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/main/res/xml/data_extraction_rules.xml +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/app/src/test/java/com/pythonnative/android_template/ExampleUnitTest.kt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/build.gradle +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/gradle/wrapper/gradle-wrapper.jar +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/gradle/wrapper/gradle-wrapper.properties +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/gradle.properties +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/gradlew +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/gradlew.bat +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/android_template/settings.gradle +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/AppDelegate.swift +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/Assets.xcassets/AccentColor.colorset/Contents.json +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/Assets.xcassets/Contents.json +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/Base.lproj/LaunchScreen.storyboard +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/Base.lproj/Main.storyboard +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/Info.plist +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/SceneDelegate.swift +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template/ViewController.swift +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_template.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_templateTests/ios_templateTests.swift +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/templates/ios_template/ios_templateUITests/ios_templateUITestsLaunchTests.swift +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative/utils.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative.egg-info/dependency_links.txt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative.egg-info/entry_points.txt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative.egg-info/requires.txt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/src/pythonnative.egg-info/top_level.txt +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_alert.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_cli.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_element.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_net.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_platform.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_platform_metrics.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_runtime.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_smoke.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_style.py +0 -0
- {pythonnative-0.21.0 → pythonnative-0.22.1}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonnative
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.1
|
|
4
4
|
Summary: Cross-platform native UI toolkit for Android and iOS
|
|
5
5
|
Author: Owen Carey
|
|
6
6
|
License: MIT License
|
|
@@ -28,7 +28,7 @@ License: MIT License
|
|
|
28
28
|
Project-URL: Homepage, https://github.com/pythonnative/pythonnative
|
|
29
29
|
Project-URL: Repository, https://github.com/pythonnative/pythonnative
|
|
30
30
|
Project-URL: Issues, https://github.com/pythonnative/pythonnative/issues
|
|
31
|
-
Project-URL: Documentation, https://
|
|
31
|
+
Project-URL: Documentation, https://pythonnative.com/
|
|
32
32
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
33
33
|
Classifier: Intended Audience :: Developers
|
|
34
34
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -83,13 +83,13 @@ Dynamic: license-file
|
|
|
83
83
|
<a href="https://pypi.org/project/pythonnative/"><img src="https://img.shields.io/pypi/v/pythonnative" alt="PyPI Version" /></a>
|
|
84
84
|
<a href="https://pypi.org/project/pythonnative/"><img src="https://img.shields.io/pypi/pyversions/pythonnative" alt="Python Versions" /></a>
|
|
85
85
|
<a href="LICENSE"><img src="https://img.shields.io/pypi/l/pythonnative" alt="License: MIT" /></a>
|
|
86
|
-
<a href="https://
|
|
86
|
+
<a href="https://pythonnative.com/"><img src="https://img.shields.io/website?url=https%3A%2F%2Fpythonnative.com&label=docs" alt="Docs" /></a>
|
|
87
87
|
</p>
|
|
88
88
|
|
|
89
89
|
<p align="center">
|
|
90
|
-
<a href="https://
|
|
91
|
-
<a href="https://
|
|
92
|
-
<a href="https://
|
|
90
|
+
<a href="https://pythonnative.com/">Documentation</a> ·
|
|
91
|
+
<a href="https://pythonnative.com/getting-started/">Getting Started</a> ·
|
|
92
|
+
<a href="https://pythonnative.com/examples/">Examples</a> ·
|
|
93
93
|
<a href="CONTRIBUTING.md">Contributing</a>
|
|
94
94
|
</p>
|
|
95
95
|
|
|
@@ -102,16 +102,19 @@ PythonNative is a cross-platform toolkit for building native Android and iOS app
|
|
|
102
102
|
## Features
|
|
103
103
|
|
|
104
104
|
- **Declarative UI:** Describe *what* your UI should look like with element functions (`Text`, `Button`, `Column`, `Row`, etc.). PythonNative creates and updates native views automatically.
|
|
105
|
-
- **Rich component library:** 25+ built-in components backed by real native widgets
|
|
106
|
-
- **Device APIs:** Cross-platform modules for `Camera`, `Location`, `FileSystem`, `Notifications`, `Clipboard`, `Share`, `Linking`, `Permissions`, `AppState`, `NetInfo`, `SecureStore`, `Battery`, `Haptics` / `Vibration`, and `Biometrics
|
|
105
|
+
- **Rich component library:** 25+ built-in components backed by real native widgets: `TextInput`, `Image` / `ImageBackground`, `ScrollView`, `FlatList` / `SectionList`, `Modal`, `Pressable` / `TouchableOpacity`, `Switch` / `Checkbox`, `Slider`, `SegmentedControl`, `Picker`, `DatePicker`, `ProgressBar` / `ActivityIndicator`, `WebView`, and more.
|
|
106
|
+
- **Device APIs:** Cross-platform modules for `Camera`, `Location`, `FileSystem`, `Notifications`, `Clipboard`, `Share`, `Linking`, `Permissions`, `AppState`, `NetInfo`, `SecureStore`, `Battery`, `Haptics` / `Vibration`, and `Biometrics`, plus reactive `use_app_state` and `use_net_info` hooks.
|
|
107
107
|
- **Hooks and function components:** Manage state with `use_state`, side effects with `use_effect`, and navigation with `use_navigation`, all through one consistent pattern.
|
|
108
108
|
- **Typed `style` prop:** Pass all visual and layout properties through a single `style` dict, fully described by the `pn.Style` `TypedDict` and the ergonomic `pn.style(...)` helper for IDE autocomplete and static checking. Compose reusable styles with `StyleSheet`.
|
|
109
109
|
- **Cross-platform flexbox engine:** A pure-Python, Yoga-style layout engine computes frames once and applies them to native views, so `flex`, `padding`, `aspect_ratio`, and `position: "absolute"` produce the same geometry on Android and iOS.
|
|
110
|
-
- **Virtual view tree + reconciler:** Element trees are diffed and patched with minimal native mutations, similar to React's reconciliation. State updates re-render **locally
|
|
110
|
+
- **Virtual view tree + reconciler:** Element trees are diffed and patched with minimal native mutations, similar to React's reconciliation. Each commit lands as **one batched transaction** of mutation ops, and event callbacks are routed through a tag-based registry so re-renders that only change closures cost zero native calls. State updates re-render **locally**: only the component whose state changed (and its subtree) re-runs, and unchanged leaves reuse cached intrinsic measurements, so deep UIs stay responsive instead of re-rendering the whole app from the root on every tap.
|
|
111
|
+
- **Native-driven animations:** The `Animated` API (timing / spring / decay, awaitable or fire-and-forget) hands animations to Core Animation and `ViewPropertyAnimator` whenever possible, so no Python code runs per frame; a pure-Python ticker covers the rest.
|
|
112
|
+
- **Native gesture system:** Attach `Tap`, `LongPress`, `Pan`, `Swipe`, `Pinch`, and `Rotation` recognizers to any view via the `gestures=` prop, backed by `UIGestureRecognizer` on iOS and a unit-testable pure-Python arbiter on Android and desktop.
|
|
113
|
+
- **Virtualized lists:** `FlatList` / `SectionList` window their rows in Python over the platform scroll view: uniform, exact, or measured variable heights, grids, headers/footers, infinite scroll, and an imperative scroll controller, identical on every platform.
|
|
111
114
|
- **Direct native bindings:** Python calls platform APIs directly through Chaquopy and rubicon-objc, with no JavaScript bridge.
|
|
112
115
|
- **Custom-component SDK:** Wrap any platform widget as a first-class element with type-checked props via `pythonnative.sdk` (`Props`, `@native_component`, `element_factory`). Plugins distributed on PyPI auto-register through the `pythonnative.handlers` entry-point group.
|
|
113
116
|
- **CLI scaffolding:** `pn init` creates a ready-to-run project; `pn run android` and `pn run ios` build and launch your app.
|
|
114
|
-
- **Instant desktop preview:** `pn preview` renders your app in a native desktop window via Tkinter with Fast Refresh on every save
|
|
117
|
+
- **Instant desktop preview:** `pn preview` renders your app in a native desktop window via Tkinter with Fast Refresh on every save: iterate on layout, state, and navigation in milliseconds without booting a simulator or device. The reconciler, hooks, layout engine, and navigation are the same code that ships to the phone.
|
|
115
118
|
- **Native-backed navigation:** Declarative `Stack`, `Tab`, and `Drawer` navigators inspired by React Navigation. The root stack drives the platform's native navigation controller (`UINavigationController` on iOS, AndroidX Navigation Component on Android), so transitions, back gestures, and the hardware back button match what users expect.
|
|
116
119
|
- **Fast Refresh hot reload:** `pn run --hot-reload` watches `app/` and patches edits into the running app on save, preserving component state across most changes.
|
|
117
120
|
- **Bundled templates:** Android Gradle and iOS Xcode templates are included, so scaffolding requires no network access.
|
|
@@ -145,7 +148,7 @@ def App():
|
|
|
145
148
|
|
|
146
149
|
## Documentation
|
|
147
150
|
|
|
148
|
-
Visit [
|
|
151
|
+
Visit [pythonnative.com](https://pythonnative.com/) for the full documentation, including getting started guides, platform-specific instructions for Android and iOS, API reference, and working examples.
|
|
149
152
|
|
|
150
153
|
## Contributing
|
|
151
154
|
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
<a href="https://pypi.org/project/pythonnative/"><img src="https://img.shields.io/pypi/v/pythonnative" alt="PyPI Version" /></a>
|
|
13
13
|
<a href="https://pypi.org/project/pythonnative/"><img src="https://img.shields.io/pypi/pyversions/pythonnative" alt="Python Versions" /></a>
|
|
14
14
|
<a href="LICENSE"><img src="https://img.shields.io/pypi/l/pythonnative" alt="License: MIT" /></a>
|
|
15
|
-
<a href="https://
|
|
15
|
+
<a href="https://pythonnative.com/"><img src="https://img.shields.io/website?url=https%3A%2F%2Fpythonnative.com&label=docs" alt="Docs" /></a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
18
|
<p align="center">
|
|
19
|
-
<a href="https://
|
|
20
|
-
<a href="https://
|
|
21
|
-
<a href="https://
|
|
19
|
+
<a href="https://pythonnative.com/">Documentation</a> ·
|
|
20
|
+
<a href="https://pythonnative.com/getting-started/">Getting Started</a> ·
|
|
21
|
+
<a href="https://pythonnative.com/examples/">Examples</a> ·
|
|
22
22
|
<a href="CONTRIBUTING.md">Contributing</a>
|
|
23
23
|
</p>
|
|
24
24
|
|
|
@@ -31,16 +31,19 @@ PythonNative is a cross-platform toolkit for building native Android and iOS app
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
33
33
|
- **Declarative UI:** Describe *what* your UI should look like with element functions (`Text`, `Button`, `Column`, `Row`, etc.). PythonNative creates and updates native views automatically.
|
|
34
|
-
- **Rich component library:** 25+ built-in components backed by real native widgets
|
|
35
|
-
- **Device APIs:** Cross-platform modules for `Camera`, `Location`, `FileSystem`, `Notifications`, `Clipboard`, `Share`, `Linking`, `Permissions`, `AppState`, `NetInfo`, `SecureStore`, `Battery`, `Haptics` / `Vibration`, and `Biometrics
|
|
34
|
+
- **Rich component library:** 25+ built-in components backed by real native widgets: `TextInput`, `Image` / `ImageBackground`, `ScrollView`, `FlatList` / `SectionList`, `Modal`, `Pressable` / `TouchableOpacity`, `Switch` / `Checkbox`, `Slider`, `SegmentedControl`, `Picker`, `DatePicker`, `ProgressBar` / `ActivityIndicator`, `WebView`, and more.
|
|
35
|
+
- **Device APIs:** Cross-platform modules for `Camera`, `Location`, `FileSystem`, `Notifications`, `Clipboard`, `Share`, `Linking`, `Permissions`, `AppState`, `NetInfo`, `SecureStore`, `Battery`, `Haptics` / `Vibration`, and `Biometrics`, plus reactive `use_app_state` and `use_net_info` hooks.
|
|
36
36
|
- **Hooks and function components:** Manage state with `use_state`, side effects with `use_effect`, and navigation with `use_navigation`, all through one consistent pattern.
|
|
37
37
|
- **Typed `style` prop:** Pass all visual and layout properties through a single `style` dict, fully described by the `pn.Style` `TypedDict` and the ergonomic `pn.style(...)` helper for IDE autocomplete and static checking. Compose reusable styles with `StyleSheet`.
|
|
38
38
|
- **Cross-platform flexbox engine:** A pure-Python, Yoga-style layout engine computes frames once and applies them to native views, so `flex`, `padding`, `aspect_ratio`, and `position: "absolute"` produce the same geometry on Android and iOS.
|
|
39
|
-
- **Virtual view tree + reconciler:** Element trees are diffed and patched with minimal native mutations, similar to React's reconciliation. State updates re-render **locally
|
|
39
|
+
- **Virtual view tree + reconciler:** Element trees are diffed and patched with minimal native mutations, similar to React's reconciliation. Each commit lands as **one batched transaction** of mutation ops, and event callbacks are routed through a tag-based registry so re-renders that only change closures cost zero native calls. State updates re-render **locally**: only the component whose state changed (and its subtree) re-runs, and unchanged leaves reuse cached intrinsic measurements, so deep UIs stay responsive instead of re-rendering the whole app from the root on every tap.
|
|
40
|
+
- **Native-driven animations:** The `Animated` API (timing / spring / decay, awaitable or fire-and-forget) hands animations to Core Animation and `ViewPropertyAnimator` whenever possible, so no Python code runs per frame; a pure-Python ticker covers the rest.
|
|
41
|
+
- **Native gesture system:** Attach `Tap`, `LongPress`, `Pan`, `Swipe`, `Pinch`, and `Rotation` recognizers to any view via the `gestures=` prop, backed by `UIGestureRecognizer` on iOS and a unit-testable pure-Python arbiter on Android and desktop.
|
|
42
|
+
- **Virtualized lists:** `FlatList` / `SectionList` window their rows in Python over the platform scroll view: uniform, exact, or measured variable heights, grids, headers/footers, infinite scroll, and an imperative scroll controller, identical on every platform.
|
|
40
43
|
- **Direct native bindings:** Python calls platform APIs directly through Chaquopy and rubicon-objc, with no JavaScript bridge.
|
|
41
44
|
- **Custom-component SDK:** Wrap any platform widget as a first-class element with type-checked props via `pythonnative.sdk` (`Props`, `@native_component`, `element_factory`). Plugins distributed on PyPI auto-register through the `pythonnative.handlers` entry-point group.
|
|
42
45
|
- **CLI scaffolding:** `pn init` creates a ready-to-run project; `pn run android` and `pn run ios` build and launch your app.
|
|
43
|
-
- **Instant desktop preview:** `pn preview` renders your app in a native desktop window via Tkinter with Fast Refresh on every save
|
|
46
|
+
- **Instant desktop preview:** `pn preview` renders your app in a native desktop window via Tkinter with Fast Refresh on every save: iterate on layout, state, and navigation in milliseconds without booting a simulator or device. The reconciler, hooks, layout engine, and navigation are the same code that ships to the phone.
|
|
44
47
|
- **Native-backed navigation:** Declarative `Stack`, `Tab`, and `Drawer` navigators inspired by React Navigation. The root stack drives the platform's native navigation controller (`UINavigationController` on iOS, AndroidX Navigation Component on Android), so transitions, back gestures, and the hardware back button match what users expect.
|
|
45
48
|
- **Fast Refresh hot reload:** `pn run --hot-reload` watches `app/` and patches edits into the running app on save, preserving component state across most changes.
|
|
46
49
|
- **Bundled templates:** Android Gradle and iOS Xcode templates are included, so scaffolding requires no network access.
|
|
@@ -74,7 +77,7 @@ def App():
|
|
|
74
77
|
|
|
75
78
|
## Documentation
|
|
76
79
|
|
|
77
|
-
Visit [
|
|
80
|
+
Visit [pythonnative.com](https://pythonnative.com/) for the full documentation, including getting started guides, platform-specific instructions for Android and iOS, API reference, and working examples.
|
|
78
81
|
|
|
79
82
|
## Contributing
|
|
80
83
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pythonnative"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.22.1"
|
|
8
8
|
description = "Cross-platform native UI toolkit for Android and iOS"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Owen Carey" }
|
|
@@ -66,7 +66,9 @@ pn = "pythonnative.cli.pn:main"
|
|
|
66
66
|
Homepage = "https://github.com/pythonnative/pythonnative"
|
|
67
67
|
Repository = "https://github.com/pythonnative/pythonnative"
|
|
68
68
|
Issues = "https://github.com/pythonnative/pythonnative/issues"
|
|
69
|
-
Documentation = "https://
|
|
69
|
+
Documentation = "https://pythonnative.com/"
|
|
70
|
+
|
|
71
|
+
|
|
70
72
|
|
|
71
73
|
|
|
72
74
|
|
|
@@ -26,7 +26,16 @@ Key building blocks:
|
|
|
26
26
|
PythonNative ships a fully-typed [`Style`][pythonnative.style.Style]
|
|
27
27
|
TypedDict so editors and ``mypy`` validate every key as you type.
|
|
28
28
|
- **Animations** use the ``Animated`` namespace, modeled on React
|
|
29
|
-
Native's animation API.
|
|
29
|
+
Native's animation API. Animations are driven natively (Core
|
|
30
|
+
Animation / ``ViewPropertyAnimator``) whenever possible.
|
|
31
|
+
- **Gestures** attach to any view via the ``gestures=`` prop using
|
|
32
|
+
descriptors from ``pythonnative.gestures``
|
|
33
|
+
([`Tap`][pythonnative.gestures.Tap],
|
|
34
|
+
[`LongPress`][pythonnative.gestures.LongPress],
|
|
35
|
+
[`Pan`][pythonnative.gestures.Pan],
|
|
36
|
+
[`Swipe`][pythonnative.gestures.Swipe],
|
|
37
|
+
[`Pinch`][pythonnative.gestures.Pinch],
|
|
38
|
+
[`Rotation`][pythonnative.gestures.Rotation]).
|
|
30
39
|
- **Custom native components** can be authored with the
|
|
31
40
|
``pythonnative.sdk`` package: define a typed
|
|
32
41
|
[`Props`][pythonnative.sdk.Props] dataclass, implement a
|
|
@@ -51,9 +60,9 @@ Example:
|
|
|
51
60
|
```
|
|
52
61
|
"""
|
|
53
62
|
|
|
54
|
-
__version__ = "0.
|
|
63
|
+
__version__ = "0.22.1"
|
|
55
64
|
|
|
56
|
-
from . import runtime, sdk
|
|
65
|
+
from . import gestures, runtime, sdk
|
|
57
66
|
from .alerts import Alert
|
|
58
67
|
from .animated import Animated, AnimatedValue, use_animated_value
|
|
59
68
|
from .components import (
|
|
@@ -321,6 +330,8 @@ __all__ = [
|
|
|
321
330
|
"Animated",
|
|
322
331
|
"AnimatedValue",
|
|
323
332
|
"use_animated_value",
|
|
333
|
+
# Gestures
|
|
334
|
+
"gestures",
|
|
324
335
|
# Imperative
|
|
325
336
|
"Alert",
|
|
326
337
|
# Native modules
|