pythonnative 0.20.0__py3-none-any.whl → 0.22.0__py3-none-any.whl

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.
Files changed (33) hide show
  1. pythonnative/__init__.py +14 -3
  2. pythonnative/animated.py +420 -135
  3. pythonnative/cli/pn.py +450 -956
  4. pythonnative/components.py +519 -235
  5. pythonnative/events.py +210 -0
  6. pythonnative/gestures.py +875 -0
  7. pythonnative/layout.py +463 -149
  8. pythonnative/mutations.py +130 -0
  9. pythonnative/native_views/__init__.py +161 -97
  10. pythonnative/native_views/android.py +1050 -1124
  11. pythonnative/native_views/base.py +108 -18
  12. pythonnative/native_views/desktop.py +460 -417
  13. pythonnative/native_views/ios.py +1918 -1916
  14. pythonnative/project/__init__.py +68 -0
  15. pythonnative/project/android.py +504 -0
  16. pythonnative/project/builder.py +555 -0
  17. pythonnative/project/config.py +642 -0
  18. pythonnative/project/doctor.py +233 -0
  19. pythonnative/project/icons.py +247 -0
  20. pythonnative/project/ios.py +344 -0
  21. pythonnative/project/permissions.py +343 -0
  22. pythonnative/project/runtime_assets.py +272 -0
  23. pythonnative/reconciler.py +540 -470
  24. pythonnative/screen.py +5 -2
  25. pythonnative/sdk/_components.py +2 -2
  26. pythonnative/templates/android_template/app/build.gradle +2 -0
  27. {pythonnative-0.20.0.dist-info → pythonnative-0.22.0.dist-info}/METADATA +10 -2
  28. {pythonnative-0.20.0.dist-info → pythonnative-0.22.0.dist-info}/RECORD +32 -21
  29. pythonnative/templates/android_template/app/src/main/java/com/pythonnative/android_template/PNVirtualListView.java +0 -129
  30. {pythonnative-0.20.0.dist-info → pythonnative-0.22.0.dist-info}/WHEEL +0 -0
  31. {pythonnative-0.20.0.dist-info → pythonnative-0.22.0.dist-info}/entry_points.txt +0 -0
  32. {pythonnative-0.20.0.dist-info → pythonnative-0.22.0.dist-info}/licenses/LICENSE +0 -0
  33. {pythonnative-0.20.0.dist-info → pythonnative-0.22.0.dist-info}/top_level.txt +0 -0
pythonnative/__init__.py CHANGED
@@ -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.20.0"
63
+ __version__ = "0.22.0"
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