pythonnative 0.38.0__tar.gz → 0.40.0__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.
Files changed (487) hide show
  1. pythonnative-0.40.0/MANIFEST.in +11 -0
  2. {pythonnative-0.38.0/src/pythonnative.egg-info → pythonnative-0.40.0}/PKG-INFO +16 -6
  3. {pythonnative-0.38.0 → pythonnative-0.40.0}/README.md +15 -5
  4. {pythonnative-0.38.0 → pythonnative-0.40.0}/pyproject.toml +12 -4
  5. pythonnative-0.40.0/setup.py +19 -0
  6. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/__init__.py +2 -3
  7. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/alerts.py +1 -1
  8. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/animated.py +45 -21
  9. pythonnative-0.40.0/src/pythonnative/animation_graph.py +78 -0
  10. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/bootstrap.py +22 -12
  11. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/bridge/__init__.py +74 -78
  12. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/bridge/android.py +2 -2
  13. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/bridge/codec.py +7 -1
  14. pythonnative-0.40.0/src/pythonnative/bridge/commits.py +114 -0
  15. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/bridge/fake.py +20 -13
  16. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/bridge/ios.py +5 -5
  17. pythonnative-0.40.0/src/pythonnative/bridge/web.py +489 -0
  18. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/cli/pn.py +358 -329
  19. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/component.py +17 -1
  20. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/__init__.py +6 -1
  21. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/_base.py +3 -0
  22. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/controls.py +9 -6
  23. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/lists.py +122 -146
  24. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/text.py +3 -3
  25. pythonnative-0.40.0/src/pythonnative/devclient.py +824 -0
  26. pythonnative-0.40.0/src/pythonnative/devserver/__init__.py +34 -0
  27. pythonnative-0.40.0/src/pythonnative/devserver/server.py +718 -0
  28. pythonnative-0.40.0/src/pythonnative/devserver/static/animation_graph.js +82 -0
  29. pythonnative-0.40.0/src/pythonnative/devserver/static/bridge.js +147 -0
  30. pythonnative-0.40.0/src/pythonnative/devserver/static/colors.js +70 -0
  31. pythonnative-0.40.0/src/pythonnative/devserver/static/host.js +552 -0
  32. pythonnative-0.40.0/src/pythonnative/devserver/static/index.html +60 -0
  33. pythonnative-0.40.0/src/pythonnative/devserver/static/layout.js +85 -0
  34. pythonnative-0.40.0/src/pythonnative/devserver/static/preview.css +415 -0
  35. pythonnative-0.40.0/src/pythonnative/devserver/static/renderer.js +1994 -0
  36. pythonnative-0.40.0/src/pythonnative/devserver/static/shell.js +345 -0
  37. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/LICENSE +21 -0
  38. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/binaries/yoga-wasm-base64-esm.js +75 -0
  39. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/generated/YGEnums.d.ts +189 -0
  40. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/generated/YGEnums.js +211 -0
  41. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/generated/YGEnums.js.map +1 -0
  42. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/index.d.ts +12 -0
  43. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/index.js +16 -0
  44. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/index.js.map +1 -0
  45. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/load.d.ts +11 -0
  46. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/load.js +17 -0
  47. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/load.js.map +1 -0
  48. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/wrapAssembly.d.ts +155 -0
  49. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/wrapAssembly.js +125 -0
  50. pythonnative-0.40.0/src/pythonnative/devserver/static/yoga/src/wrapAssembly.js.map +1 -0
  51. pythonnative-0.40.0/src/pythonnative/devserver/watcher.py +267 -0
  52. pythonnative-0.40.0/src/pythonnative/devserver/ws.py +421 -0
  53. pythonnative-0.40.0/src/pythonnative/equality.py +19 -0
  54. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/events.py +17 -1
  55. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/gestures.py +31 -9
  56. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/hooks.py +76 -54
  57. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/hosts/__init__.py +20 -19
  58. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/hosts/base.py +46 -115
  59. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/hosts/native.py +24 -70
  60. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/hot_reload.py +227 -287
  61. pythonnative-0.40.0/src/pythonnative/layout.py +328 -0
  62. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/build.gradle +4 -0
  63. pythonnative-0.40.0/src/pythonnative/native/android/gradle.properties +3 -0
  64. pythonnative-0.40.0/src/pythonnative/native/android/settings.gradle +12 -0
  65. pythonnative-0.40.0/src/pythonnative/native/android/src/main/cpp/CMakeLists.txt +9 -0
  66. pythonnative-0.40.0/src/pythonnative/native/android/src/main/cpp/yoga_jni.cpp +52 -0
  67. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/generated/NativeModules.kt +5 -0
  68. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/generated/NativeProps.kt +3705 -0
  69. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/generated/PNContracts.kt +129 -0
  70. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/PNBridge.kt +61 -14
  71. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/runtime/animation/AnimationGraph.kt +108 -0
  72. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/animation/PNAnimator.kt +11 -3
  73. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/runtime/bridge/CommitState.kt +106 -0
  74. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/bridge/MainThread.kt +8 -0
  75. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/bridge/TransactionApplier.kt +3 -1
  76. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/BuiltinComponents.kt +2 -0
  77. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ButtonManager.kt +0 -1
  78. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/DatePickerManager.kt +2 -2
  79. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ImageManager.kt +6 -0
  80. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/PickerManager.kt +0 -1
  81. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/runtime/components/ScreenStackManager.kt +110 -0
  82. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/TextInputManager.kt +6 -1
  83. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/runtime/components/VirtualListManager.kt +159 -0
  84. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/runtime/layout/NativeLayout.kt +145 -0
  85. pythonnative-0.40.0/src/pythonnative/native/android/src/main/java/com/pythonnative/runtime/layout/YogaNode.kt +29 -0
  86. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/HostModule.kt +5 -41
  87. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/NativeModule.kt +26 -3
  88. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/screens/PNScreenFragment.kt +13 -48
  89. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/test/java/com/pythonnative/runtime/PromiseTest.kt +14 -0
  90. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Package.swift +2 -0
  91. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Animation/PNAnimationGraph.swift +199 -0
  92. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Animation/PNAnimator.swift +11 -0
  93. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Bridge/PNBridge.swift +81 -17
  94. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Bridge/PNCommit.swift +104 -0
  95. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Bridge/PNRegistry.swift +2 -0
  96. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Bridge/PNTransaction.swift +5 -4
  97. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNButtonManagers.swift +3 -2
  98. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNControlManagers.swift +7 -7
  99. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNImageManager.swift +1 -0
  100. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNPressableManager.swift +2 -2
  101. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Components/PNScreenStackManager.swift +107 -0
  102. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNTextInputManager.swift +9 -1
  103. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Components/PNVirtualListManager.swift +155 -0
  104. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Generated/NativeModules.swift +1 -0
  105. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Generated/NativeProps.swift +3775 -0
  106. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Generated/PNContracts.swift +46 -0
  107. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Layout/PNLayout.swift +173 -0
  108. pythonnative-0.40.0/src/pythonnative/native/ios/Sources/PythonNativeKit/Modules/HostModule.swift +80 -0
  109. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Modules/PNNativeModule.swift +44 -1
  110. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Screens/PNViewController.swift +10 -24
  111. pythonnative-0.40.0/src/pythonnative/native/ios/Tests/PythonNativeKitTests/PNAnimationGraphTests.swift +26 -0
  112. pythonnative-0.40.0/src/pythonnative/native/ios/Tests/PythonNativeKitTests/PNCommitTests.swift +86 -0
  113. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Tests/PythonNativeKitTests/PNManagerTests.swift +8 -6
  114. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Tests/PythonNativeKitTests/PNModuleTests.swift +13 -0
  115. pythonnative-0.40.0/src/pythonnative/native/yoga/LICENSE +21 -0
  116. pythonnative-0.40.0/src/pythonnative/native/yoga/Package.swift +9 -0
  117. pythonnative-0.40.0/src/pythonnative/native/yoga/VENDORED.md +2 -0
  118. pythonnative-0.40.0/src/pythonnative/native/yoga/include/PNStyle.h +10 -0
  119. pythonnative-0.40.0/src/pythonnative/native/yoga/include/module.modulemap +5 -0
  120. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGConfig.h +158 -0
  121. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGEnums.h +142 -0
  122. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGMacros.h +99 -0
  123. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGNode.h +304 -0
  124. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGNodeLayout.h +35 -0
  125. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGNodeStyle.h +130 -0
  126. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGPixelGrid.h +29 -0
  127. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/YGValue.h +84 -0
  128. pythonnative-0.40.0/src/pythonnative/native/yoga/include/yoga/Yoga.h +21 -0
  129. pythonnative-0.40.0/src/pythonnative/native/yoga/python.cpp +16 -0
  130. pythonnative-0.40.0/src/pythonnative/native/yoga/style.cpp +272 -0
  131. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/CMakeLists.txt +41 -0
  132. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGConfig.cpp +92 -0
  133. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGConfig.h +158 -0
  134. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGEnums.cpp +262 -0
  135. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGEnums.h +142 -0
  136. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGMacros.h +99 -0
  137. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGNode.cpp +366 -0
  138. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGNode.h +304 -0
  139. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGNodeLayout.cpp +92 -0
  140. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGNodeLayout.h +35 -0
  141. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGNodeStyle.cpp +405 -0
  142. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGNodeStyle.h +130 -0
  143. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGPixelGrid.cpp +22 -0
  144. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGPixelGrid.h +29 -0
  145. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGValue.cpp +20 -0
  146. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/YGValue.h +84 -0
  147. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/Yoga.h +21 -0
  148. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/AbsoluteLayout.cpp +563 -0
  149. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/AbsoluteLayout.h +41 -0
  150. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/Align.h +72 -0
  151. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/Baseline.cpp +78 -0
  152. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/Baseline.h +21 -0
  153. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/BoundAxis.h +79 -0
  154. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/Cache.cpp +121 -0
  155. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/Cache.h +30 -0
  156. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/CalculateLayout.cpp +2428 -0
  157. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/CalculateLayout.h +38 -0
  158. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/FlexDirection.h +120 -0
  159. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/FlexLine.cpp +124 -0
  160. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/FlexLine.h +75 -0
  161. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/PixelGrid.cpp +132 -0
  162. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/PixelGrid.h +29 -0
  163. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/SizingMode.h +73 -0
  164. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/algorithm/TrailingPosition.h +44 -0
  165. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/config/Config.cpp +135 -0
  166. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/config/Config.h +92 -0
  167. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/debug/AssertFatal.cpp +53 -0
  168. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/debug/AssertFatal.h +29 -0
  169. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/debug/Log.cpp +107 -0
  170. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/debug/Log.h +34 -0
  171. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Align.h +47 -0
  172. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/BoxSizing.h +40 -0
  173. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Dimension.h +40 -0
  174. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Direction.h +41 -0
  175. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Display.h +41 -0
  176. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Edge.h +47 -0
  177. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Errata.h +41 -0
  178. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/ExperimentalFeature.h +39 -0
  179. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/FlexDirection.h +42 -0
  180. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Gutter.h +41 -0
  181. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Justify.h +44 -0
  182. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/LogLevel.h +44 -0
  183. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/MeasureMode.h +41 -0
  184. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/NodeType.h +40 -0
  185. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Overflow.h +41 -0
  186. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/PhysicalEdge.h +21 -0
  187. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/PositionType.h +41 -0
  188. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Unit.h +42 -0
  189. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/Wrap.h +41 -0
  190. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/enums/YogaEnums.h +85 -0
  191. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/event/event.cpp +87 -0
  192. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/event/event.h +130 -0
  193. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/module.modulemap +21 -0
  194. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/node/CachedMeasurement.h +53 -0
  195. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/node/LayoutResults.cpp +48 -0
  196. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/node/LayoutResults.h +122 -0
  197. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/node/LayoutableChildren.h +148 -0
  198. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/node/Node.cpp +443 -0
  199. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/node/Node.h +337 -0
  200. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/numeric/Comparison.h +81 -0
  201. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/numeric/FloatOptional.h +93 -0
  202. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/style/SmallValueBuffer.h +133 -0
  203. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/style/Style.h +757 -0
  204. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/style/StyleLength.h +107 -0
  205. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/style/StyleValueHandle.h +98 -0
  206. pythonnative-0.40.0/src/pythonnative/native/yoga/yoga/style/StyleValuePool.h +127 -0
  207. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/__init__.py +6 -4
  208. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/biometrics.py +1 -1
  209. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/camera.py +1 -1
  210. pythonnative-0.38.0/src/pythonnative/native_modules/desktop.py → pythonnative-0.40.0/src/pythonnative/native_modules/fallback.py +42 -40
  211. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/file_system.py +1 -1
  212. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/haptics.py +1 -1
  213. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/linking.py +1 -1
  214. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/notifications.py +2 -2
  215. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/registry.py +20 -7
  216. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/secure_store.py +1 -1
  217. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/share.py +1 -1
  218. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_views/__init__.py +18 -23
  219. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_views/base.py +1 -1
  220. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_views/bridge_backend.py +95 -82
  221. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/handle.py +3 -36
  222. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/navigators.py +28 -6
  223. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/screen.py +1 -1
  224. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/platform.py +21 -20
  225. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/platform_metrics.py +1 -1
  226. pythonnative-0.40.0/src/pythonnative/preview.py +287 -0
  227. pythonnative-0.40.0/src/pythonnative/profiling.py +101 -0
  228. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/android.py +20 -5
  229. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/builder.py +116 -7
  230. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/config.py +2 -2
  231. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/deps.py +20 -4
  232. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/doctor.py +0 -20
  233. pythonnative-0.40.0/src/pythonnative/project/fingerprint.py +171 -0
  234. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/ios.py +6 -0
  235. pythonnative-0.40.0/src/pythonnative/project/lockfile.py +100 -0
  236. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/plugins.py +155 -2
  237. pythonnative-0.40.0/src/pythonnative/query.py +153 -0
  238. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/reconciler/boundaries.py +10 -0
  239. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/reconciler/core.py +104 -92
  240. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/reconciler/layout_pass.py +36 -2
  241. pythonnative-0.40.0/src/pythonnative/refresh.py +55 -0
  242. pythonnative-0.40.0/src/pythonnative/runtime.py +306 -0
  243. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/sdk/__init__.py +13 -6
  244. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/sdk/_components.py +31 -12
  245. pythonnative-0.40.0/src/pythonnative/sdk/builtins.py +91 -0
  246. pythonnative-0.40.0/src/pythonnative/sdk/codegen.py +149 -0
  247. pythonnative-0.40.0/src/pythonnative/sdk/module_codegen.py +184 -0
  248. pythonnative-0.40.0/src/pythonnative/sdk/schema.py +224 -0
  249. pythonnative-0.40.0/src/pythonnative/sdk/templates/contracts.kt +46 -0
  250. pythonnative-0.40.0/src/pythonnative/sdk/templates/contracts.swift +46 -0
  251. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/storage.py +2 -2
  252. pythonnative-0.40.0/src/pythonnative/suspense.py +183 -0
  253. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/build.gradle +6 -0
  254. pythonnative-0.40.0/src/pythonnative/templates/android_template/app/src/debug/AndroidManifest.xml +7 -0
  255. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/java/com/pythonnative/android_template/MainActivity.kt +5 -2
  256. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/java/com/pythonnative/android_template/ScreenFragment.kt +0 -3
  257. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/ViewController.swift +1 -7
  258. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/testing/backend.py +1 -1
  259. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/testing/harness.py +7 -29
  260. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/utils.py +39 -31
  261. {pythonnative-0.38.0 → pythonnative-0.40.0/src/pythonnative.egg-info}/PKG-INFO +16 -6
  262. pythonnative-0.40.0/src/pythonnative.egg-info/SOURCES.txt +468 -0
  263. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_bridge.py +47 -59
  264. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_cli.py +130 -61
  265. pythonnative-0.40.0/tests/test_codegen.py +26 -0
  266. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_components.py +2 -2
  267. pythonnative-0.40.0/tests/test_devclient.py +333 -0
  268. pythonnative-0.40.0/tests/test_devserver.py +334 -0
  269. pythonnative-0.40.0/tests/test_devserver_ws.py +104 -0
  270. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_gestures.py +2 -2
  271. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_hosts.py +6 -5
  272. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_hot_reload.py +171 -169
  273. pythonnative-0.40.0/tests/test_inbox.py +85 -0
  274. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_layout.py +29 -23
  275. pythonnative-0.40.0/tests/test_native_lists.py +86 -0
  276. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_native_modules.py +15 -15
  277. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_navigation.py +19 -31
  278. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_runtime.py +5 -5
  279. pythonnative-0.40.0/tests/test_runtime_contracts.py +297 -0
  280. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_sdk.py +10 -10
  281. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_storage.py +3 -3
  282. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_suspense.py +8 -106
  283. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_utils.py +1 -1
  284. pythonnative-0.40.0/tests/test_web_transport.py +422 -0
  285. pythonnative-0.38.0/src/pythonnative/hosts/desktop.py +0 -107
  286. pythonnative-0.38.0/src/pythonnative/images.py +0 -197
  287. pythonnative-0.38.0/src/pythonnative/layout.py +0 -1603
  288. pythonnative-0.38.0/src/pythonnative/native_views/desktop.py +0 -2356
  289. pythonnative-0.38.0/src/pythonnative/preview.py +0 -540
  290. pythonnative-0.38.0/src/pythonnative/runtime.py +0 -536
  291. pythonnative-0.38.0/src/pythonnative/suspense.py +0 -413
  292. pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative/src/main/java/com/pythonnative/runtime/components/VirtualListManager.kt +0 -179
  293. pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative/src/main/java/com/pythonnative/runtime/screens/Navigator.kt +0 -116
  294. pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative/src/main/java/com/pythonnative/runtime/views/PNVirtualListView.java +0 -169
  295. pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit/Sources/PythonNativeKit/Components/PNVirtualListManager.swift +0 -257
  296. pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit/Sources/PythonNativeKit/Modules/HostModule.swift +0 -158
  297. pythonnative-0.38.0/src/pythonnative/virtual_rows.py +0 -127
  298. pythonnative-0.38.0/src/pythonnative.egg-info/SOURCES.txt +0 -310
  299. pythonnative-0.38.0/tests/test_desktop_backend.py +0 -523
  300. pythonnative-0.38.0/tests/test_images.py +0 -145
  301. pythonnative-0.38.0/tests/test_native_lists.py +0 -330
  302. {pythonnative-0.38.0 → pythonnative-0.40.0}/LICENSE +0 -0
  303. {pythonnative-0.38.0 → pythonnative-0.40.0}/setup.cfg +0 -0
  304. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/_ios_log.py +0 -0
  305. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/appearance.py +0 -0
  306. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/cli/__init__.py +0 -0
  307. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/layout.py +0 -0
  308. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/media.py +0 -0
  309. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/overlays.py +0 -0
  310. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/pressable.py +0 -0
  311. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/components/structural.py +0 -0
  312. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/diagnostics.py +0 -0
  313. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/element.py +0 -0
  314. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/mutations.py +0 -0
  315. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/AndroidManifest.xml +0 -0
  316. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/PythonHost.kt +0 -0
  317. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/animation/AnimationSpecs.kt +0 -0
  318. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/bridge/JsonUtil.kt +0 -0
  319. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/bridge/PNLog.kt +0 -0
  320. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/bridge/PNRegistry.kt +0 -0
  321. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/bridge/PNTransaction.kt +0 -0
  322. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/bridge/ViewRegistry.kt +0 -0
  323. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ComponentManager.kt +0 -0
  324. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ContainerManagers.kt +0 -0
  325. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ControlManagers.kt +0 -0
  326. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ImageLoader.kt +0 -0
  327. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ModalManager.kt +0 -0
  328. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/PNColor.kt +0 -0
  329. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/PortalManager.kt +0 -0
  330. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/PressableManager.kt +0 -0
  331. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ScrollViewManager.kt +0 -0
  332. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/SegmentedControlManager.kt +0 -0
  333. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/StatusBarManager.kt +0 -0
  334. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/TabBarManager.kt +0 -0
  335. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/TextManager.kt +0 -0
  336. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/ViewStyler.kt +0 -0
  337. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/components/WebViewManager.kt +0 -0
  338. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/gestures/GestureArbiter.kt +0 -0
  339. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/gestures/GestureCoordinator.kt +0 -0
  340. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/gestures/GestureRecognizers.kt +0 -0
  341. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/BuiltinModules.kt +0 -0
  342. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/DeviceModules.kt +0 -0
  343. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/MediaModules.kt +0 -0
  344. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/NotificationsModule.kt +0 -0
  345. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/PermissionsModule.kt +0 -0
  346. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/StorageModules.kt +0 -0
  347. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/modules/SystemModules.kt +0 -0
  348. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/plugins/GeneratedPlugins.kt +0 -0
  349. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/screens/ScreenRegistry.kt +0 -0
  350. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/views/PNAccessibilityDelegate.kt +0 -0
  351. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/views/PNBorderDrawable.kt +0 -0
  352. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/views/PNEditText.kt +0 -0
  353. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/main/java/com/pythonnative/runtime/views/PNFrameLayout.kt +0 -0
  354. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/test/java/com/pythonnative/runtime/AnimationSpecsTest.kt +0 -0
  355. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/test/java/com/pythonnative/runtime/GestureArbiterTest.kt +0 -0
  356. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/test/java/com/pythonnative/runtime/PNColorTest.kt +0 -0
  357. {pythonnative-0.38.0/src/pythonnative/templates/android_template/pythonnative → pythonnative-0.40.0/src/pythonnative/native/android}/src/test/java/com/pythonnative/runtime/PNTransactionTest.kt +0 -0
  358. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Bridge/PNViewRegistry.swift +0 -0
  359. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNColor.swift +0 -0
  360. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNComponentManager.swift +0 -0
  361. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNContainerView.swift +0 -0
  362. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNOverlayManagers.swift +0 -0
  363. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNScrollViewManager.swift +0 -0
  364. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNTabBarManager.swift +0 -0
  365. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNTextManager.swift +0 -0
  366. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNTransform.swift +0 -0
  367. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNViewManager.swift +0 -0
  368. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNViewState.swift +0 -0
  369. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNViewStyler.swift +0 -0
  370. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Components/PNWebViewManager.swift +0 -0
  371. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Gestures/PNGestureCoordinator.swift +0 -0
  372. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Modules/AlertModule.swift +0 -0
  373. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Modules/LifecycleModules.swift +0 -0
  374. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Modules/MediaModules.swift +0 -0
  375. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Modules/PermissionModules.swift +0 -0
  376. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Modules/SystemModules.swift +0 -0
  377. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Plugins/PNPluginRegistration.swift +0 -0
  378. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Screens/PNScreenRegistry.swift +0 -0
  379. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Support/PNCompat.swift +0 -0
  380. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Support/PNJSON.swift +0 -0
  381. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Support/PNLog.swift +0 -0
  382. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Sources/PythonNativeKit/Support/PNWindow.swift +0 -0
  383. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Tests/PythonNativeKitTests/PNColorTests.swift +0 -0
  384. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Tests/PythonNativeKitTests/PNGestureTests.swift +0 -0
  385. {pythonnative-0.38.0/src/pythonnative/templates/ios_template/PythonNativeKit → pythonnative-0.40.0/src/pythonnative/native/ios}/Tests/PythonNativeKitTests/PNTransactionTests.swift +0 -0
  386. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/app_state.py +0 -0
  387. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/battery.py +0 -0
  388. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/clipboard.py +0 -0
  389. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/location.py +0 -0
  390. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/net_info.py +0 -0
  391. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/native_modules/permissions.py +0 -0
  392. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/__init__.py +0 -0
  393. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/container.py +0 -0
  394. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/hooks.py +0 -0
  395. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/host.py +0 -0
  396. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/linking.py +0 -0
  397. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/navigation/state.py +0 -0
  398. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/net.py +0 -0
  399. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/__init__.py +0 -0
  400. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/devices.py +0 -0
  401. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/icons.py +0 -0
  402. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/permissions.py +0 -0
  403. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/project/runtime_assets.py +0 -0
  404. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/py.typed +0 -0
  405. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/reconciler/__init__.py +0 -0
  406. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/reconciler/children.py +0 -0
  407. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/reconciler/vnode.py +0 -0
  408. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/scheduler.py +0 -0
  409. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/style.py +0 -0
  410. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/proguard-rules.pro +0 -0
  411. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/androidTest/java/com/pythonnative/android_template/ExampleInstrumentedTest.kt +0 -0
  412. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/AndroidManifest.xml +0 -0
  413. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/drawable/ic_launcher_background.xml +0 -0
  414. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -0
  415. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/layout/activity_main.xml +0 -0
  416. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -0
  417. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -0
  418. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  419. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  420. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  421. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  422. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  423. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  424. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  425. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  426. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  427. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  428. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/navigation/nav_graph.xml +0 -0
  429. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/values/colors.xml +0 -0
  430. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/values/strings.xml +0 -0
  431. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/values/themes.xml +0 -0
  432. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/values-night/themes.xml +0 -0
  433. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/xml/backup_rules.xml +0 -0
  434. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/main/res/xml/data_extraction_rules.xml +0 -0
  435. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/app/src/test/java/com/pythonnative/android_template/ExampleUnitTest.kt +0 -0
  436. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/build.gradle +0 -0
  437. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/gradle/wrapper/gradle-wrapper.jar +0 -0
  438. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/gradle/wrapper/gradle-wrapper.properties +0 -0
  439. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/gradle.properties +0 -0
  440. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/gradlew +0 -0
  441. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/gradlew.bat +0 -0
  442. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/android_template/settings.gradle +0 -0
  443. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/AppDelegate.swift +0 -0
  444. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/Assets.xcassets/AccentColor.colorset/Contents.json +0 -0
  445. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
  446. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/Assets.xcassets/Contents.json +0 -0
  447. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/Base.lproj/LaunchScreen.storyboard +0 -0
  448. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/BridgingHeader.h +0 -0
  449. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/Info.plist +0 -0
  450. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/PythonRuntime.swift +0 -0
  451. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template/SceneDelegate.swift +0 -0
  452. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template.xcodeproj/project.pbxproj +0 -0
  453. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_template.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  454. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_templateTests/ios_templateTests.swift +0 -0
  455. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_templateUITests/ios_templateUITests.swift +0 -0
  456. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/templates/ios_template/ios_templateUITests/ios_templateUITestsLaunchTests.swift +0 -0
  457. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative/testing/__init__.py +0 -0
  458. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative.egg-info/dependency_links.txt +0 -0
  459. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative.egg-info/entry_points.txt +0 -0
  460. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative.egg-info/requires.txt +0 -0
  461. {pythonnative-0.38.0 → pythonnative-0.40.0}/src/pythonnative.egg-info/top_level.txt +0 -0
  462. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_alert.py +0 -0
  463. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_animated.py +0 -0
  464. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_animated_graph.py +0 -0
  465. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_appearance.py +0 -0
  466. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_async_hooks.py +0 -0
  467. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_core_semantics.py +0 -0
  468. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_element.py +0 -0
  469. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_events.py +0 -0
  470. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_extended_components.py +0 -0
  471. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_gesture_composition.py +0 -0
  472. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_hooks.py +0 -0
  473. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_incremental_render.py +0 -0
  474. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_interaction_props.py +0 -0
  475. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_ios_log.py +0 -0
  476. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_metric_hooks.py +0 -0
  477. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_mutations.py +0 -0
  478. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_native_views.py +0 -0
  479. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_net.py +0 -0
  480. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_new_components.py +0 -0
  481. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_platform.py +0 -0
  482. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_platform_metrics.py +0 -0
  483. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_reconciler.py +0 -0
  484. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_ref.py +0 -0
  485. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_smoke.py +0 -0
  486. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_style.py +0 -0
  487. {pythonnative-0.38.0 → pythonnative-0.40.0}/tests/test_transitions.py +0 -0
@@ -0,0 +1,11 @@
1
+ global-exclude *.pyc *.pyo .DS_Store
2
+ recursive-exclude src/pythonnative/native .build/* .gradle/* .cxx/* build/* .swiftpm/* .kotlin/*
3
+ prune src/pythonnative/native/android/build
4
+ prune src/pythonnative/native/android/.gradle
5
+ prune src/pythonnative/native/android/.cxx
6
+ prune src/pythonnative/native/ios/.build
7
+ prune src/pythonnative/native/ios/.swiftpm
8
+ prune src/pythonnative/native/yoga/.build
9
+ prune src/pythonnative/templates/android_template/app/build
10
+ prune src/pythonnative/templates/android_template/.gradle
11
+ prune src/pythonnative/templates/ios_template/build
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythonnative
3
- Version: 0.38.0
3
+ Version: 0.40.0
4
4
  Summary: Cross-platform native UI toolkit for Android and iOS
5
5
  Author: Owen Carey
6
6
  License: MIT License
@@ -82,20 +82,20 @@ PythonNative is a cross-platform toolkit for building native Android and iOS app
82
82
  - **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.
83
83
  - **Hooks and function components:** Manage state with `use_state`, side effects with `use_effect` / `use_layout_effect`, refs and imperative handles with `use_ref` / `use_imperative_handle`, and navigation with `use_navigation`, all through one consistent pattern. Components can return a single element, a list of siblings, or `None`, and `Fragment`, `Portal`, and reactive `Provider` context work the way they do in React.
84
84
  - **Async-first rendering:** One `asyncio` event loop runs the whole framework on the platform's main thread. Components can be `async def` and `await` data directly in the body; `Suspense` boundaries show declarative loading states while they wait. `use_resource` fetches during render, `use_effect` accepts coroutine callbacks (cancelled automatically on unmount), `lazy` code-splits components, and `use_transition` / `use_deferred_value` keep the UI responsive during expensive updates.
85
- - **Developer feedback that finds your bugs:** In dev mode (`pn preview`, hot reload, or `PN_DEV=1`), uncaught errors from renders, effects, and event handlers show a full-screen RedBox with the traceback; unknown style keys and duplicate list keys print "did you mean" warnings; and conditional hooks raise a `HookOrderError` at the source instead of silently cross-wiring state.
85
+ - **Developer feedback that finds your bugs:** In dev mode (`pn start`, `pn preview`, debug builds from `pn run`, or `PN_DEV=1`), uncaught errors from renders, effects, and event handlers show a full-screen RedBox with the traceback; unknown style keys and duplicate list keys print "did you mean" warnings; and conditional hooks raise a `HookOrderError` at the source instead of silently cross-wiring state.
86
86
  - **Typed `style` prop and theme:** 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`, and read design tokens from a typed, immutable `pn.Theme` via `use_theme()` that follows light and dark mode by default.
87
87
  - **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.
88
88
  - **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.
89
89
  - **Native-driven animations:** The `Animated` API (timing / spring / decay / loop / stagger, 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. `interpolate`, arithmetic operators on animated nodes, `Animated.event` scroll binding, and `diff_clamp` cover the scroll-driven patterns (collapsing headers, parallax) that define native feel.
90
- - **Native gesture system:** Attach `Tap`, `LongPress`, `Pan`, `Swipe`, `Fling`, `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. Compose them with `Race`, `Exclusive`, and `Simultaneous` for cross-gesture arbitration (single vs. double tap, drag vs. long press).
90
+ - **Native gesture system:** Attach `Tap`, `LongPress`, `Pan`, `Swipe`, `Fling`, `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 in the browser preview. Compose them with `Race`, `Exclusive`, and `Simultaneous` for cross-gesture arbitration (single vs. double tap, drag vs. long press).
91
91
  - **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.
92
92
  - **Native rendering core:** each commit is one serialized transaction applied by Swift and Kotlin component managers, the same shape as React Native's Fabric. Device APIs are native modules registered by name (TurboModules-style), callable from thin Python facades.
93
93
  - **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.
94
- - **CLI scaffolding:** `pn init` creates a ready-to-run project; `pn run android` and `pn run ios` build and launch your app.
94
+ - **Metro-style dev loop:** `pn start` runs one dev server that serves the browser preview and every connected debug build. Save a file and each client Fast Refreshes in place, keeping component state; their `print` output and tracebacks stream back into the same terminal. `pn run android` / `pn run ios` bakes the server URL into a debug build and rebuilds the native project only when a native input actually changed, so relaunching after a Python edit takes seconds, not minutes.
95
95
  - **PyPI packages, binary wheels included:** List requirements in `pythonnative.toml` and the CLI resolves them for the *device* (iOS wheels via PEP 730 and BeeWare's index, Android wheels via PEP 738 and Chaquopy), bundling numpy, Pillow, cryptography, and friends alongside pure-Python packages. `pn deps` reports what each target resolves to before you build, and a weekly-checked compatibility matrix keeps the docs honest.
96
- - **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.
96
+ - **Browser preview:** `pn preview` renders your app in a browser tab inside a phone frame (pick a device, rotate, toggle dark mode) with Fast Refresh on every save. The page is a bridge peer exactly like the Swift and Kotlin runtimes, so the reconciler, hooks, layout engine, navigation, and screen host are the same code that ships to the phone; only the leaf widgets are DOM elements.
97
97
  - **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; `use_back_handler` intercepts the back action when a screen needs to.
98
- - **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.
98
+ - **Dev client:** Build a shell app once with `pn run ios --dev-client` and point it at any project's dev server from a connect screen, the way Expo Go does; physical phones on the same Wi-Fi get the same Fast Refresh as simulators.
99
99
  - **Bundled templates:** Android Gradle and iOS Xcode templates are included, so scaffolding requires no network access.
100
100
 
101
101
  ## Quick Start
@@ -127,6 +127,16 @@ def App():
127
127
  )
128
128
  ```
129
129
 
130
+ ### Develop
131
+
132
+ ```bash
133
+ pn init my-app && cd my-app
134
+ pn preview # dev server + browser preview with Fast Refresh
135
+ pn run ios # in another terminal: debug build that connects to the same server
136
+ pn run android
137
+ pn build ios # standalone release artifacts
138
+ ```
139
+
130
140
  ## Documentation
131
141
 
132
142
  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.
@@ -35,20 +35,20 @@ PythonNative is a cross-platform toolkit for building native Android and iOS app
35
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` / `use_layout_effect`, refs and imperative handles with `use_ref` / `use_imperative_handle`, and navigation with `use_navigation`, all through one consistent pattern. Components can return a single element, a list of siblings, or `None`, and `Fragment`, `Portal`, and reactive `Provider` context work the way they do in React.
37
37
  - **Async-first rendering:** One `asyncio` event loop runs the whole framework on the platform's main thread. Components can be `async def` and `await` data directly in the body; `Suspense` boundaries show declarative loading states while they wait. `use_resource` fetches during render, `use_effect` accepts coroutine callbacks (cancelled automatically on unmount), `lazy` code-splits components, and `use_transition` / `use_deferred_value` keep the UI responsive during expensive updates.
38
- - **Developer feedback that finds your bugs:** In dev mode (`pn preview`, hot reload, or `PN_DEV=1`), uncaught errors from renders, effects, and event handlers show a full-screen RedBox with the traceback; unknown style keys and duplicate list keys print "did you mean" warnings; and conditional hooks raise a `HookOrderError` at the source instead of silently cross-wiring state.
38
+ - **Developer feedback that finds your bugs:** In dev mode (`pn start`, `pn preview`, debug builds from `pn run`, or `PN_DEV=1`), uncaught errors from renders, effects, and event handlers show a full-screen RedBox with the traceback; unknown style keys and duplicate list keys print "did you mean" warnings; and conditional hooks raise a `HookOrderError` at the source instead of silently cross-wiring state.
39
39
  - **Typed `style` prop and theme:** 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`, and read design tokens from a typed, immutable `pn.Theme` via `use_theme()` that follows light and dark mode by default.
40
40
  - **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.
41
41
  - **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.
42
42
  - **Native-driven animations:** The `Animated` API (timing / spring / decay / loop / stagger, 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. `interpolate`, arithmetic operators on animated nodes, `Animated.event` scroll binding, and `diff_clamp` cover the scroll-driven patterns (collapsing headers, parallax) that define native feel.
43
- - **Native gesture system:** Attach `Tap`, `LongPress`, `Pan`, `Swipe`, `Fling`, `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. Compose them with `Race`, `Exclusive`, and `Simultaneous` for cross-gesture arbitration (single vs. double tap, drag vs. long press).
43
+ - **Native gesture system:** Attach `Tap`, `LongPress`, `Pan`, `Swipe`, `Fling`, `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 in the browser preview. Compose them with `Race`, `Exclusive`, and `Simultaneous` for cross-gesture arbitration (single vs. double tap, drag vs. long press).
44
44
  - **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.
45
45
  - **Native rendering core:** each commit is one serialized transaction applied by Swift and Kotlin component managers, the same shape as React Native's Fabric. Device APIs are native modules registered by name (TurboModules-style), callable from thin Python facades.
46
46
  - **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.
47
- - **CLI scaffolding:** `pn init` creates a ready-to-run project; `pn run android` and `pn run ios` build and launch your app.
47
+ - **Metro-style dev loop:** `pn start` runs one dev server that serves the browser preview and every connected debug build. Save a file and each client Fast Refreshes in place, keeping component state; their `print` output and tracebacks stream back into the same terminal. `pn run android` / `pn run ios` bakes the server URL into a debug build and rebuilds the native project only when a native input actually changed, so relaunching after a Python edit takes seconds, not minutes.
48
48
  - **PyPI packages, binary wheels included:** List requirements in `pythonnative.toml` and the CLI resolves them for the *device* (iOS wheels via PEP 730 and BeeWare's index, Android wheels via PEP 738 and Chaquopy), bundling numpy, Pillow, cryptography, and friends alongside pure-Python packages. `pn deps` reports what each target resolves to before you build, and a weekly-checked compatibility matrix keeps the docs honest.
49
- - **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.
49
+ - **Browser preview:** `pn preview` renders your app in a browser tab inside a phone frame (pick a device, rotate, toggle dark mode) with Fast Refresh on every save. The page is a bridge peer exactly like the Swift and Kotlin runtimes, so the reconciler, hooks, layout engine, navigation, and screen host are the same code that ships to the phone; only the leaf widgets are DOM elements.
50
50
  - **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; `use_back_handler` intercepts the back action when a screen needs to.
51
- - **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.
51
+ - **Dev client:** Build a shell app once with `pn run ios --dev-client` and point it at any project's dev server from a connect screen, the way Expo Go does; physical phones on the same Wi-Fi get the same Fast Refresh as simulators.
52
52
  - **Bundled templates:** Android Gradle and iOS Xcode templates are included, so scaffolding requires no network access.
53
53
 
54
54
  ## Quick Start
@@ -80,6 +80,16 @@ def App():
80
80
  )
81
81
  ```
82
82
 
83
+ ### Develop
84
+
85
+ ```bash
86
+ pn init my-app && cd my-app
87
+ pn preview # dev server + browser preview with Fast Refresh
88
+ pn run ios # in another terminal: debug build that connects to the same server
89
+ pn run android
90
+ pn build ios # standalone release artifacts
91
+ ```
92
+
83
93
  ## Documentation
84
94
 
85
95
  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.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pythonnative"
7
- version = "0.38.0"
7
+ version = "0.40.0"
8
8
  description = "Cross-platform native UI toolkit for Android and iOS"
9
9
  authors = [
10
10
  { name = "Owen Carey" }
@@ -88,11 +88,20 @@ where = ["src"]
88
88
  [tool.setuptools]
89
89
  license-files = ["LICENSE*"]
90
90
 
91
- # Include template directories inside the package so importlib.resources can find them
91
+ # Include template directories and the browser preview's page assets inside
92
+ # the package so importlib.resources can find them
92
93
  [tool.setuptools.package-data]
93
94
  pythonnative = [
94
95
  "py.typed",
95
- "templates/**",
96
+ "templates/**", "native/**", "sdk/templates/**",
97
+ "devserver/static/**",
98
+ ]
99
+
100
+ [tool.setuptools.exclude-package-data]
101
+ pythonnative = [
102
+ "**/build/**", "**/.build/**", "**/.gradle/**",
103
+ "**/.cxx/**", "**/.swiftpm/**", "**/.kotlin/**",
104
+ "**/__pycache__/**", "**/.DS_Store",
96
105
  ]
97
106
 
98
107
  [tool.ruff]
@@ -127,7 +136,6 @@ ignore = ["D107", "D105", "D203", "D213"]
127
136
  # docstrings would only add boilerplate that repeats the ABC.
128
137
  "src/pythonnative/native_views/android.py" = ["D101", "D102"]
129
138
  "src/pythonnative/native_views/ios.py" = ["D101", "D102"]
130
- "src/pythonnative/native_views/desktop.py" = ["D101", "D102"]
131
139
  # ios.py embeds a LaunchScreen storyboard as an XML string literal whose
132
140
  # lines exceed the limit; the XML must stay on single lines for Xcode.
133
141
  "src/pythonnative/project/ios.py" = ["E501"]
@@ -0,0 +1,19 @@
1
+ """Build the host Yoga binding; mobile hosts compile the vendored core."""
2
+
3
+ import os
4
+ from pathlib import Path
5
+
6
+ from setuptools import Extension, setup
7
+
8
+ root = Path("src/pythonnative/native/yoga")
9
+ setup(
10
+ ext_modules=[
11
+ Extension(
12
+ "pythonnative._yoga",
13
+ sources=[str(root / "python.cpp"), *map(str, sorted((root / "yoga").rglob("*.cpp")))],
14
+ include_dirs=[str(root)],
15
+ language="c++",
16
+ extra_compile_args=["/std:c++20"] if os.name == "nt" else ["-std=c++20"],
17
+ )
18
+ ]
19
+ )
@@ -62,9 +62,9 @@ Example:
62
62
  ```
63
63
  """
64
64
 
65
- __version__ = "0.38.0"
65
+ __version__ = "0.40.0"
66
66
 
67
- from . import appearance, diagnostics, gestures, images, runtime, sdk
67
+ from . import appearance, diagnostics, gestures, runtime, sdk
68
68
  from .alerts import Alert
69
69
  from .animated import Animated, AnimatedValue, use_animated_value
70
70
  from .component import Component, component, memo
@@ -348,7 +348,6 @@ __all__ = [
348
348
  # Appearance
349
349
  "appearance",
350
350
  # Image pipeline
351
- "images",
352
351
  # Animation
353
352
  "Animated",
354
353
  "AnimatedValue",
@@ -52,7 +52,7 @@ async def _present(
52
52
  "default"|"cancel"|"destructive"}`` dicts. The module resolves with
53
53
  the index the user picked, or ``-1`` if the dialog was dismissed
54
54
  without a selection. Off device the
55
- [`DesktopAlert`][pythonnative.native_modules.desktop.DesktopAlert]
55
+ [`FallbackAlert`][pythonnative.native_modules.fallback.FallbackAlert]
56
56
  implementation records the call and answers from the queue set by
57
57
  [`Alert.set_test_response`][pythonnative.alerts.Alert.set_test_response].
58
58
  """
@@ -40,7 +40,7 @@ native view the value is attached to
40
40
  callback when the animation settles, updates the
41
41
  [`AnimatedValue`][pythonnative.animated.AnimatedValue], and resolves
42
42
  any awaiting tasks.
43
- - **Declined** (desktop preview, unattached values, callable easings,
43
+ - **Declined** (unattached values, callable easings,
44
44
  values feeding Python-side listeners or derived nodes): a single
45
45
  background thread ticks the animation at ~60 Hz from Python, pushing
46
46
  each frame through ``set_animated_property``. Semantics are
@@ -85,7 +85,7 @@ import weakref
85
85
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
86
86
 
87
87
  from .element import Element
88
- from .hooks import use_effect, use_ref
88
+ from .hooks import Ref, use_effect, use_ref
89
89
  from .runtime import resolve_future
90
90
  from .style import StyleProp, resolve_style
91
91
 
@@ -243,12 +243,17 @@ class AnimatedNode:
243
243
  except Exception:
244
244
  pass
245
245
 
246
+ from .animation_graph import install
247
+
248
+ install(self)
249
+
246
250
  def _detach() -> None:
247
251
  with self._lock:
248
252
  try:
249
253
  self._attachments.remove(binding)
250
254
  except ValueError:
251
255
  pass
256
+ install(self, detached_tag=tag)
252
257
 
253
258
  return _detach
254
259
 
@@ -404,6 +409,12 @@ class AnimatedValue(AnimatedNode):
404
409
  def set_value(self, new_value: float) -> None:
405
410
  """Set the value immediately, pushing to native views and listeners."""
406
411
  self._apply(float(new_value), push_native=True)
412
+ from .animation_graph import install
413
+
414
+ graph = install(self)
415
+ if graph and graph["bindings"]:
416
+ backend = _backend()
417
+ backend.set_animated_property(graph["bindings"][0][0], f"_pn_graph:{id(self)}", float(new_value))
407
418
 
408
419
  def _apply(self, new_value: float, push_native: bool) -> None:
409
420
  with self._lock:
@@ -695,7 +706,12 @@ class AnimatedEvent:
695
706
  if raw is None:
696
707
  continue
697
708
  try:
698
- node.set_value(float(raw))
709
+ if getattr(_backend(), "install_animation_graph", None) is not None:
710
+ # Native already evaluated the graph at the input timestamp.
711
+ # Python observes the sample without echoing an older frame.
712
+ node._value = float(raw)
713
+ else:
714
+ node.set_value(float(raw))
699
715
  except (TypeError, ValueError):
700
716
  continue
701
717
  if self._listener is not None:
@@ -1041,21 +1057,21 @@ def _start_native(value: AnimatedValue, spec: Dict[str, Any]) -> Optional[_Nativ
1041
1057
  animation; otherwise rolls back any accepted targets and returns
1042
1058
  ``None`` so the caller falls back to the Python ticker.
1043
1059
  """
1044
- targets = value.attachments()
1045
- if not targets:
1046
- return None
1047
- if value.has_listeners():
1048
- # Python listeners want per-frame values; only the ticker
1049
- # provides those.
1050
- return None
1051
- if value._has_dependents():
1052
- # Derived nodes (interpolations, arithmetic) need per-frame
1053
- # Python evaluation to keep their own attachments in sync.
1054
- return None
1055
1060
  try:
1056
1061
  backend = _backend()
1057
1062
  except Exception:
1058
1063
  return None
1064
+ from .animation_graph import install
1065
+
1066
+ graph = install(value)
1067
+ if graph and graph["bindings"]:
1068
+ targets = [(graph["bindings"][0][0], f"_pn_graph:{id(value)}")]
1069
+ else:
1070
+ targets = value.attachments()
1071
+ if value._has_dependents():
1072
+ return None
1073
+ if not targets or value.has_listeners():
1074
+ return None
1059
1075
 
1060
1076
  group = _NativeAnimationGroup(value, _projected_final_value(spec))
1061
1077
  accepted: List[Tuple[int, int]] = [] # (anim_id, tag)
@@ -1368,24 +1384,32 @@ def _make_animated_factory(
1368
1384
  plain_style, bindings = _resolve_style_with_values(style)
1369
1385
 
1370
1386
  ref = use_ref(None)
1387
+ attached: Ref[List[Callable[[], None]]] = use_ref([])
1371
1388
 
1372
- def _attach_bindings() -> Callable[[], None]:
1389
+ def _attach_bindings() -> None:
1373
1390
  tag = ref._pn_tag
1374
1391
  if tag is None:
1375
- return lambda: None
1392
+ return
1393
+ # Derived nodes can be rebuilt on every render. Install their new
1394
+ # bindings before releasing the old ones so a running native graph
1395
+ # never temporarily loses every owner.
1376
1396
  detachers = [value.attach(tag, _animated_prop_name(prop)) for prop, value in bindings.items()]
1397
+ previous = attached.current
1398
+ attached.current = detachers
1399
+ for detach in previous:
1400
+ detach()
1377
1401
 
1402
+ def _unmount_bindings() -> Callable[[], None]:
1378
1403
  def _cleanup() -> None:
1379
- for fn in detachers:
1380
- try:
1381
- fn()
1382
- except Exception:
1383
- pass
1404
+ for detach in attached.current:
1405
+ detach()
1406
+ attached.current = []
1384
1407
 
1385
1408
  return _cleanup
1386
1409
 
1387
1410
  # Re-attach whenever the binding set changes identity.
1388
1411
  use_effect(_attach_bindings, [tuple(sorted((k, id(v)) for k, v in bindings.items()))])
1412
+ use_effect(_unmount_bindings, [])
1389
1413
 
1390
1414
  if element_type == "Text":
1391
1415
  text = children[0] if children else kwargs.pop("text", "")
@@ -0,0 +1,78 @@
1
+ """Portable animation expressions evaluated by the native UI thread."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any
6
+
7
+
8
+ def serialize(root: Any) -> dict[str, Any]:
9
+ """Serialize one connected animation graph in dependency order."""
10
+ from .animated import AnimatedInterpolation, AnimatedNode, AnimatedValue, _AnimatedDiffClamp, _AnimatedOperation
11
+
12
+ connected: dict[int, Any] = {}
13
+
14
+ def discover(node: Any) -> None:
15
+ if not isinstance(node, AnimatedNode) or id(node) in connected:
16
+ return
17
+ connected[id(node)] = node
18
+ for child in list(node._children):
19
+ discover(child)
20
+ for parent in getattr(node, "_parents", [getattr(node, "_parent", None)]):
21
+ discover(parent)
22
+
23
+ discover(root)
24
+ encoded: dict[int, dict[str, Any]] = {}
25
+
26
+ def encode(node: Any) -> Any:
27
+ if not isinstance(node, AnimatedNode):
28
+ return {"constant": float(node)}
29
+ identity = id(node)
30
+ if identity not in encoded:
31
+ definition: dict[str, Any] = {"id": identity}
32
+ if isinstance(node, AnimatedValue):
33
+ definition.update(kind="value", value=node.value)
34
+ elif isinstance(node, AnimatedInterpolation):
35
+ definition.update(
36
+ kind="interpolate",
37
+ inputs=[encode(node._parent)],
38
+ ranges=node._inputs,
39
+ outputs=node._outputs,
40
+ color=node._kind == "color",
41
+ left=node._left,
42
+ right=node._right,
43
+ )
44
+ elif isinstance(node, _AnimatedOperation):
45
+ definition.update(kind=node._op, inputs=[encode(parent) for parent in node._parents])
46
+ elif isinstance(node, _AnimatedDiffClamp):
47
+ definition.update(
48
+ kind="diff_clamp",
49
+ inputs=[encode(node._parent)],
50
+ minimum=node._min,
51
+ maximum=node._max,
52
+ previous=node._last_input,
53
+ value=node.value,
54
+ )
55
+ else:
56
+ raise TypeError(f"Unsupported animated node {type(node).__name__}")
57
+ encoded[identity] = definition
58
+ return {"node": identity}
59
+
60
+ for node in connected.values():
61
+ encode(node)
62
+ bindings = [[tag, prop, id(node)] for node in connected.values() for tag, prop in node.attachments()]
63
+ return {"id": min(connected), "nodes": list(encoded.values()), "bindings": bindings}
64
+
65
+
66
+ def install(node: Any, *, detached_tag: int | None = None) -> dict[str, Any] | None:
67
+ """Synchronize native graph ownership when a binding is attached or removed."""
68
+ from .animated import _backend
69
+
70
+ backend = _backend()
71
+ handler = getattr(backend, "install_animation_graph", None)
72
+ if handler is None:
73
+ return None
74
+ graph = serialize(node)
75
+ tag = graph["bindings"][0][0] if graph["bindings"] else detached_tag
76
+ if tag is not None:
77
+ handler(tag, graph)
78
+ return graph
@@ -8,9 +8,10 @@ import pythonnative.bootstrap; pythonnative.bootstrap.start()
8
8
 
9
9
  [`start`][pythonnative.bootstrap.start] connects the two halves of the
10
10
  bridge (installing the native -> Python callback on iOS), verifies the
11
- protocol version, routes ``print()`` to the console on iOS, and warms
12
- the asyncio runtime. From then on the native runtime drives everything
13
- through ``callback("host", ...)``; see ``docs/concepts/bridge.md``.
11
+ protocol version, routes ``print()`` to the console on iOS, warms the
12
+ asyncio runtime, and, in debug builds, starts the dev client that syncs
13
+ sources from ``pn start``. From then on the native runtime drives
14
+ everything through ``callback("host", ...)``; see ``docs/concepts/bridge.md``.
14
15
  """
15
16
 
16
17
  from __future__ import annotations
@@ -29,14 +30,14 @@ def start(dev: bool = False, strict: bool = False) -> Dict[str, Any]:
29
30
  """Connect the bridge and prepare the runtime.
30
31
 
31
32
  Args:
32
- dev: Enable dev mode (RedBox, validation warnings). Debug
33
- templates pass ``True``; hot reload turns it on as well.
33
+ dev: Enable dev mode (RedBox, validation warnings, the dev
34
+ client). Debug templates pass ``True``.
34
35
  strict: Re-raise the failure after recording it. The templates
35
36
  pass ``True`` so a broken bridge surfaces as a bootstrap
36
37
  error screen with the full traceback.
37
38
 
38
39
  Returns:
39
- A status dict (``{"protocol": 1, "platform": "ios"}``) that the
40
+ A status dict (``{"protocol": 2, "platform": "ios"}``) that the
40
41
  template logs. Unless ``strict`` is set this never raises:
41
42
  failures are printed and reported in the dict under
42
43
  ``"error"``.
@@ -56,23 +57,32 @@ def start(dev: bool = False, strict: bool = False) -> Dict[str, Any]:
56
57
  _ios_log.install()
57
58
  except Exception:
58
59
  pass
60
+ from .runtime import start as start_runtime
61
+
62
+ start_runtime()
63
+ from .sdk.schema import load_bundled_contracts
64
+
65
+ load_bundled_contracts()
59
66
  from . import bridge
60
67
 
61
68
  status_["protocol"] = bridge.handshake()
62
- if dev or os.environ.get("PN_DEV") in ("1", "true"):
69
+ dev_mode = bool(dev or os.environ.get("PN_DEV") in ("1", "true"))
70
+ if dev_mode:
63
71
  from . import diagnostics
64
72
 
65
73
  diagnostics.set_dev_mode(True)
66
- # Create the guest loop now so the first pump request has a
67
- # loop to drive and effects can schedule work during mount.
68
- from .runtime import get_loop
69
-
70
- get_loop()
71
74
  # Import the view backend eagerly: on a slow device the first
72
75
  # commit shouldn't also pay for importing the reconciler.
73
76
  from .native_views import get_registry
74
77
 
75
78
  get_registry()
79
+ if dev_mode:
80
+ # Debug builds are dev clients: connect to `pn start` when
81
+ # the build (or a remembered connection) names a server.
82
+ from . import devclient
83
+
84
+ client = devclient.start_if_configured()
85
+ status_["dev_server"] = client.url if client is not None else None
76
86
  except Exception as exc:
77
87
  status_["error"] = f"{type(exc).__name__}: {exc}"
78
88
  print(f"[pn.bootstrap] start failed: {exc!r}", file=sys.stderr)