@nativescript/core 9.0.0-next-09-24-2025-17985801416 → 9.0.0-next-10-06-2025-18277360121

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 (181) hide show
  1. package/inspector_modules.js +74 -47
  2. package/inspector_modules.js.map +1 -1
  3. package/package.json +1 -1
  4. package/platforms/android/include.gradle +51 -0
  5. package/platforms/android/java/org/nativescript/Process.java +59 -0
  6. package/platforms/android/java/org/nativescript/widgets/AbsoluteLayout.java +88 -0
  7. package/platforms/android/java/org/nativescript/widgets/AnimatorHelper.java +61 -0
  8. package/platforms/android/java/org/nativescript/widgets/Async.java +1356 -0
  9. package/platforms/android/java/org/nativescript/widgets/BorderDrawable.java +936 -0
  10. package/platforms/android/java/org/nativescript/widgets/BottomNavigationBar.java +308 -0
  11. package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +175 -0
  12. package/platforms/android/java/org/nativescript/widgets/CSSValue.java +34 -0
  13. package/platforms/android/java/org/nativescript/widgets/CommonLayoutParams.java +456 -0
  14. package/platforms/android/java/org/nativescript/widgets/ContentLayout.java +85 -0
  15. package/platforms/android/java/org/nativescript/widgets/CustomTransition.java +135 -0
  16. package/platforms/android/java/org/nativescript/widgets/CustomTypefaceSpan.java +44 -0
  17. package/platforms/android/java/org/nativescript/widgets/Dock.java +15 -0
  18. package/platforms/android/java/org/nativescript/widgets/DockLayout.java +185 -0
  19. package/platforms/android/java/org/nativescript/widgets/FileHelper.java +815 -0
  20. package/platforms/android/java/org/nativescript/widgets/FlexLine.java +177 -0
  21. package/platforms/android/java/org/nativescript/widgets/FlexboxLayout.java +2769 -0
  22. package/platforms/android/java/org/nativescript/widgets/FragmentBase.java +14 -0
  23. package/platforms/android/java/org/nativescript/widgets/GridLayout.java +1172 -0
  24. package/platforms/android/java/org/nativescript/widgets/GridUnitType.java +10 -0
  25. package/platforms/android/java/org/nativescript/widgets/HorizontalScrollView.java +256 -0
  26. package/platforms/android/java/org/nativescript/widgets/ImageView.java +423 -0
  27. package/platforms/android/java/org/nativescript/widgets/ItemSpec.java +56 -0
  28. package/platforms/android/java/org/nativescript/widgets/LayoutBase.java +98 -0
  29. package/platforms/android/java/org/nativescript/widgets/LinearGradientDefinition.java +46 -0
  30. package/platforms/android/java/org/nativescript/widgets/Orientation.java +9 -0
  31. package/platforms/android/java/org/nativescript/widgets/OriginPoint.java +74 -0
  32. package/platforms/android/java/org/nativescript/widgets/ScrollSavedState.java +63 -0
  33. package/platforms/android/java/org/nativescript/widgets/SegmentedBarColorDrawable.java +27 -0
  34. package/platforms/android/java/org/nativescript/widgets/StackLayout.java +231 -0
  35. package/platforms/android/java/org/nativescript/widgets/StyleableTextView.java +50 -0
  36. package/platforms/android/java/org/nativescript/widgets/TabIconRenderingMode.java +6 -0
  37. package/platforms/android/java/org/nativescript/widgets/TabItemSpec.java +15 -0
  38. package/platforms/android/java/org/nativescript/widgets/TabLayout.java +451 -0
  39. package/platforms/android/java/org/nativescript/widgets/TabStrip.java +294 -0
  40. package/platforms/android/java/org/nativescript/widgets/TabViewPager.java +64 -0
  41. package/platforms/android/java/org/nativescript/widgets/TabsBar.java +443 -0
  42. package/platforms/android/java/org/nativescript/widgets/Utils.java +546 -0
  43. package/platforms/android/java/org/nativescript/widgets/VerticalScrollView.java +258 -0
  44. package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +564 -0
  45. package/platforms/android/java/org/nativescript/widgets/WrapLayout.java +252 -0
  46. package/platforms/android/java/org/nativescript/widgets/image/AsyncTask.java +679 -0
  47. package/platforms/android/java/org/nativescript/widgets/image/BitmapOwner.java +17 -0
  48. package/platforms/android/java/org/nativescript/widgets/image/Cache.java +471 -0
  49. package/platforms/android/java/org/nativescript/widgets/image/DiskLruCache.java +970 -0
  50. package/platforms/android/java/org/nativescript/widgets/image/Fetcher.java +747 -0
  51. package/platforms/android/java/org/nativescript/widgets/image/Utils.java +58 -0
  52. package/platforms/android/java/org/nativescript/widgets/image/Worker.java +571 -0
  53. package/platforms/ios/src/TNSWidgets/Info.plist +26 -0
  54. package/platforms/ios/src/TNSWidgets/NSData+Async.m +42 -0
  55. package/platforms/ios/src/TNSWidgets/NSFileHandle+Async.m +82 -0
  56. package/platforms/ios/src/TNSWidgets/NSObject+Swizzling.m +68 -0
  57. package/platforms/ios/src/TNSWidgets/NSString+Async.m +51 -0
  58. package/platforms/ios/src/TNSWidgets/TNSLabel.m +42 -0
  59. package/platforms/ios/src/TNSWidgets/UIImage+TNSBlocks.m +77 -0
  60. package/platforms/ios/src/TNSWidgets/UIView+PassThroughParent.m +53 -0
  61. package/platforms/ios/src/TNSWidgets/UIView+PropertyBag.m +72 -0
  62. package/platforms/ios/src/module.modulemap +5 -0
  63. package/platforms/android/widgets-release.aar +0 -0
  64. package/platforms/ios/TNSWidgets.xcframework/Info.plist +0 -102
  65. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  66. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  67. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
  68. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Modules/module.modulemap +0 -6
  69. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  70. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  71. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  72. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  73. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  74. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  75. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  76. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  77. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  78. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  79. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  80. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  81. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  82. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +0 -6
  83. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  84. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  85. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +0 -52
  86. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSCCrypto.h +0 -60
  87. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSData+Async.h +0 -24
  88. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +0 -22
  89. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSString+Async.h +0 -25
  90. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSLabel.h +0 -16
  91. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSProcess.h +0 -29
  92. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +0 -25
  93. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIImage+TNSBlocks.h +0 -26
  94. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIView+PassThroughParent.h +0 -17
  95. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Modules/module.modulemap +0 -6
  96. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/NSObject+Swizzling.h +0 -17
  97. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/UIView+PropertyBag.h +0 -18
  98. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +0 -52
  99. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
  100. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSCCrypto.h +0 -60
  101. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +0 -24
  102. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +0 -22
  103. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +0 -25
  104. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +0 -16
  105. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +0 -29
  106. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +0 -25
  107. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +0 -26
  108. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +0 -17
  109. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +0 -6
  110. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +0 -17
  111. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +0 -18
  112. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +0 -52
  113. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
  114. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  115. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  116. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  117. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
  118. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  119. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  120. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  121. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  122. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  123. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  124. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  125. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  126. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  127. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  128. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +0 -6
  129. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  130. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  131. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  132. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +0 -223
  133. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  134. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  135. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  136. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
  137. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  138. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  139. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  140. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  141. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  142. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  143. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  144. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  145. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  146. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
  147. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Modules/module.modulemap +0 -6
  148. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  149. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  150. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  151. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  152. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  153. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  154. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  155. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  156. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  157. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  158. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  159. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  160. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  161. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  162. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  163. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  164. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +0 -6
  165. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  166. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  167. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  168. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +0 -223
  169. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  170. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  171. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  172. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
  173. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/NSData+Async.h +0 -0
  174. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/NSFileHandle+Async.h +0 -0
  175. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders → src/TNSWidgets}/NSObject+Swizzling.h +0 -0
  176. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/NSString+Async.h +0 -0
  177. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/TNSLabel.h +0 -0
  178. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/TNSWidgets.h +0 -0
  179. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/UIImage+TNSBlocks.h +0 -0
  180. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/UIView+PassThroughParent.h +0 -0
  181. /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders → src/TNSWidgets}/UIView+PropertyBag.h +0 -0
@@ -0,0 +1,443 @@
1
+ /*
2
+ * Copyright 2014 Google Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package org.nativescript.widgets;
18
+
19
+ import android.content.Context;
20
+ import android.text.TextUtils;
21
+ import android.util.AttributeSet;
22
+ import android.util.SparseArray;
23
+ import android.util.TypedValue;
24
+ import android.view.Gravity;
25
+ import android.view.View;
26
+ import android.view.ViewGroup;
27
+ import android.widget.HorizontalScrollView;
28
+ import android.widget.ImageView;
29
+ import android.widget.ImageView.ScaleType;
30
+ import android.widget.LinearLayout;
31
+ import android.widget.TextView;
32
+
33
+ import androidx.viewpager.widget.PagerAdapter;
34
+ import androidx.viewpager.widget.ViewPager;
35
+
36
+ /**
37
+ * To be used with ViewPager to provide a tab indicator component which give
38
+ * constant feedback as to the user's scroll progress.
39
+ * <p>
40
+ * To use the component, simply add it to your view hierarchy. Then in your
41
+ * {@link android.app.Activity} or {@link android.app.Fragment} call
42
+ * {@link #setViewPager(ViewPager)} providing it the ViewPager this layout is
43
+ * being used for.
44
+ * <p>
45
+ * The colors can be customized in two ways. The first and simplest is to
46
+ * provide an array of colors via {@link #setSelectedIndicatorColors(int...)}.
47
+ * The alternative is via the {@link TabColorizer} interface which provides you
48
+ * complete control over which color is used for any individual position.
49
+ * <p>
50
+ */
51
+ public class TabsBar extends HorizontalScrollView {
52
+ /**
53
+ * Allows complete control over the colors drawn in the tab layout. Set with
54
+ * {@link #setCustomTabColorizer(TabColorizer)}.
55
+ */
56
+ public interface TabColorizer {
57
+
58
+ /**
59
+ * @return return the color of the indicator used when {@code position}
60
+ * is selected.
61
+ */
62
+ int getIndicatorColor(int position);
63
+
64
+ }
65
+
66
+ private static final int TITLE_OFFSET_DIPS = 24;
67
+ private static final int TAB_VIEW_PADDING_DIPS = 16;
68
+ private static final int TAB_VIEW_TEXT_SIZE_SP = 12;
69
+ private static final int TEXT_MAX_WIDTH = 180;
70
+ private static final int SMALL_MIN_HEIGHT = 48;
71
+ private static final int LARGE_MIN_HEIGHT = 72;
72
+
73
+ private final int mTitleOffset;
74
+
75
+ private boolean mDistributeEvenly = true;
76
+
77
+ private TabItemSpec[] mTabItems;
78
+ private ViewPager mViewPager;
79
+ private final SparseArray<String> mContentDescriptions = new SparseArray<>();
80
+ private ViewPager.OnPageChangeListener mViewPagerPageChangeListener;
81
+
82
+ private final TabStrip mTabStrip;
83
+
84
+ public TabsBar(Context context) {
85
+ this(context, null);
86
+ }
87
+
88
+ public TabsBar(Context context, AttributeSet attrs) {
89
+ this(context, attrs, 0);
90
+ }
91
+
92
+ public TabsBar(Context context, AttributeSet attrs, int defStyle) {
93
+ super(context, attrs, defStyle);
94
+ // Disable the Scroll Bar
95
+ setHorizontalScrollBarEnabled(false);
96
+ // Make sure that the Tab Strips fills this View
97
+ setFillViewport(true);
98
+
99
+ mTitleOffset = (int) (TITLE_OFFSET_DIPS * getResources().getDisplayMetrics().density);
100
+
101
+ mTabStrip = new TabStrip(context);
102
+ addView(mTabStrip, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
103
+ }
104
+
105
+ /**
106
+ * Set the custom {@link TabColorizer} to be used.
107
+ * <p>
108
+ * If you only require simple customisation then you can use
109
+ * {@link #setSelectedIndicatorColors(int...)} to achieve similar effects.
110
+ */
111
+ public void setCustomTabColorizer(TabColorizer tabColorizer) {
112
+ //mTabStrip.setCustomTabColorizer(tabColorizer);
113
+ }
114
+
115
+ public void setDistributeEvenly(boolean distributeEvenly) {
116
+ mDistributeEvenly = distributeEvenly;
117
+ }
118
+
119
+ /**
120
+ * Sets the colors to be used for indicating the selected tab. These colors
121
+ * are treated as a circular array. Providing one color will mean that all
122
+ * tabs are indicated with the same color.
123
+ */
124
+ public void setSelectedIndicatorColors(int... colors) {
125
+ mTabStrip.setSelectedIndicatorColors(colors);
126
+ this.mSelectedIndicatorColors = colors;
127
+ }
128
+
129
+ private int[] mSelectedIndicatorColors;
130
+
131
+ public int[] getSelectedIndicatorColors() {
132
+ return this.mSelectedIndicatorColors;
133
+ }
134
+
135
+ public void setTabTextColor(int color) {
136
+ mTabStrip.setTabTextColor(color);
137
+ }
138
+
139
+ public int getTabTextColor() {
140
+ return mTabStrip.getTabTextColor();
141
+ }
142
+
143
+ public void setSelectedTabTextColor(int color) {
144
+ mTabStrip.setSelectedTabTextColor(color);
145
+ }
146
+
147
+ public int getSelectedTabTextColor() {
148
+ return mTabStrip.getSelectedTabTextColor();
149
+ }
150
+
151
+ public void setTabTextFontSize(float fontSize) {
152
+ mTabStrip.setTabTextFontSize(fontSize);
153
+ }
154
+
155
+ public float getTabTextFontSize() {
156
+ return mTabStrip.getTabTextFontSize();
157
+ }
158
+
159
+ /**
160
+ * Set the {@link ViewPager.OnPageChangeListener}. When using
161
+ * {@link TabsBar} you are required to set any
162
+ * {@link ViewPager.OnPageChangeListener} through this method. This is so
163
+ * that the layout can update it's scroll position correctly.
164
+ *
165
+ * @see ViewPager#setOnPageChangeListener(ViewPager.OnPageChangeListener)
166
+ */
167
+ public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
168
+ mViewPagerPageChangeListener = listener;
169
+ }
170
+
171
+ /**
172
+ * Sets the associated view pager. Note that the assumption here is that the
173
+ * pager content (number of tabs and tab titles) does not change after this
174
+ * call has been made.
175
+ */
176
+ public void setViewPager(ViewPager viewPager) {
177
+ this.setItems(null, viewPager);
178
+ }
179
+
180
+ public void setItems(TabItemSpec[] items, ViewPager viewPager) {
181
+ mTabStrip.removeAllViews();
182
+
183
+ mViewPager = viewPager;
184
+ mTabItems = items;
185
+ if (viewPager != null) {
186
+ viewPager.addOnPageChangeListener(new InternalViewPagerListener());
187
+ populateTabStrip();
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Updates the UI of an item at specified index
193
+ */
194
+ public void updateItemAt(int position, TabItemSpec tabItem) {
195
+ LinearLayout ll = (LinearLayout) mTabStrip.getChildAt(position);
196
+ ImageView imgView = (ImageView) ll.getChildAt(0);
197
+ TextView textView = (TextView) ll.getChildAt(1);
198
+ this.setupItem(ll, textView, imgView, tabItem);
199
+ }
200
+
201
+ /**
202
+ * Gets the TextView for tab item at index
203
+ */
204
+ public TextView getTextViewForItemAt(int index) {
205
+ LinearLayout ll = this.getViewForItemAt(index);
206
+ return (ll != null) ? (TextView) ll.getChildAt(1) : null;
207
+ }
208
+
209
+ /**
210
+ * Gets the LinearLayout container for tab item at index
211
+ */
212
+ public LinearLayout getViewForItemAt(int index) {
213
+ LinearLayout result = null;
214
+
215
+ if (this.mTabStrip.getChildCount() > index) {
216
+ result = (LinearLayout) this.mTabStrip.getChildAt(index);
217
+ }
218
+
219
+ return result;
220
+ }
221
+
222
+ /**
223
+ * Gets the number of realized tabs.
224
+ */
225
+ public int getItemCount() {
226
+ return this.mTabStrip.getChildCount();
227
+ }
228
+
229
+ /**
230
+ * Create a default view to be used for tabs.
231
+ */
232
+ protected View createDefaultTabView(Context context, TabItemSpec tabItem) {
233
+ float density = getResources().getDisplayMetrics().density;
234
+ int padding = (int) (TAB_VIEW_PADDING_DIPS * density);
235
+
236
+ LinearLayout ll = new LinearLayout(context);
237
+ ll.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT));
238
+ ll.setGravity(Gravity.CENTER);
239
+ ll.setOrientation(LinearLayout.VERTICAL);
240
+ TypedValue outValue = new TypedValue();
241
+ getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true);
242
+ ll.setBackgroundResource(outValue.resourceId);
243
+
244
+ ImageView imgView = new ImageView(context);
245
+ imgView.setScaleType(ScaleType.FIT_CENTER);
246
+ LinearLayout.LayoutParams imgLP = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
247
+ imgLP.gravity = Gravity.CENTER;
248
+ imgView.setLayoutParams(imgLP);
249
+
250
+ TextView textView = new TextView(context);
251
+ textView.setGravity(Gravity.CENTER);
252
+ textView.setMaxWidth((int) (TEXT_MAX_WIDTH * density));
253
+ textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP);
254
+ textView.setEllipsize(TextUtils.TruncateAt.END);
255
+ textView.setMaxLines(2);
256
+ textView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
257
+ textView.setPadding(padding, 0, padding, 0);
258
+
259
+ this.setupItem(ll, textView, imgView, tabItem);
260
+
261
+ ll.addView(imgView);
262
+ ll.addView(textView);
263
+ return ll;
264
+ }
265
+
266
+ private void setupItem(LinearLayout ll, TextView textView, ImageView imgView, TabItemSpec tabItem) {
267
+ float density = getResources().getDisplayMetrics().density;
268
+
269
+ if (tabItem.iconId != 0) {
270
+ imgView.setImageResource(tabItem.iconId);
271
+ imgView.setVisibility(VISIBLE);
272
+ } else if (tabItem.iconDrawable != null) {
273
+ imgView.setImageDrawable(tabItem.iconDrawable);
274
+ imgView.setVisibility(VISIBLE);
275
+ } else {
276
+ imgView.setVisibility(GONE);
277
+ }
278
+
279
+ if (tabItem.title != null && !tabItem.title.isEmpty()) {
280
+ textView.setText(tabItem.title);
281
+ textView.setVisibility(VISIBLE);
282
+
283
+ if (tabItem.typeFace != null) {
284
+ textView.setTypeface(tabItem.typeFace);
285
+ }
286
+
287
+ if (tabItem.fontSize != 0) {
288
+ textView.setTextSize(tabItem.fontSize);
289
+ }
290
+
291
+ if (tabItem.color != 0) {
292
+ textView.setTextColor(tabItem.color);
293
+ mTabStrip.setShouldUpdateTabsTextColor(false);
294
+ }
295
+ } else {
296
+ textView.setVisibility(GONE);
297
+ }
298
+
299
+ if (tabItem.backgroundColor != 0) {
300
+ ll.setBackgroundColor(tabItem.backgroundColor);
301
+ }
302
+
303
+ if (imgView.getVisibility() == VISIBLE && textView.getVisibility() == VISIBLE) {
304
+ ll.setMinimumHeight((int) (LARGE_MIN_HEIGHT * density));
305
+ } else {
306
+ ll.setMinimumHeight((int) (SMALL_MIN_HEIGHT * density));
307
+ }
308
+
309
+ if (mDistributeEvenly) {
310
+ LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) ll.getLayoutParams();
311
+ lp.width = 0;
312
+ lp.weight = 1;
313
+ }
314
+ }
315
+
316
+ public boolean onTap(int position) {
317
+ // to be overridden in JS
318
+ return true;
319
+ }
320
+
321
+ private void populateTabStrip() {
322
+ final PagerAdapter adapter = mViewPager.getAdapter();
323
+ final OnClickListener tabClickListener = new TabClickListener();
324
+
325
+ for (int i = 0; i < adapter.getCount(); i++) {
326
+ View tabView = null;
327
+
328
+ TabItemSpec tabItem;
329
+ if (this.mTabItems != null && this.mTabItems.length > i) {
330
+ tabItem = this.mTabItems[i];
331
+ } else {
332
+ tabItem = new TabItemSpec();
333
+ tabItem.title = adapter.getPageTitle(i).toString();
334
+ }
335
+
336
+ tabView = createDefaultTabView(getContext(), tabItem);
337
+
338
+ tabView.setOnClickListener(tabClickListener);
339
+ String desc = mContentDescriptions.get(i, null);
340
+ if (desc != null) {
341
+ tabView.setContentDescription(desc);
342
+ }
343
+
344
+ mTabStrip.addView(tabView);
345
+ if (i == mViewPager.getCurrentItem()) {
346
+ tabView.setSelected(true);
347
+ }
348
+ }
349
+ }
350
+
351
+ public void setContentDescription(int i, String desc) {
352
+ mContentDescriptions.put(i, desc);
353
+ }
354
+
355
+ @Override
356
+ protected void onAttachedToWindow() {
357
+ super.onAttachedToWindow();
358
+
359
+ if (mViewPager != null) {
360
+ scrollToTab(mViewPager.getCurrentItem(), 0);
361
+ }
362
+ }
363
+
364
+ private void scrollToTab(int tabIndex, int positionOffset) {
365
+ final int tabStripChildCount = mTabStrip.getChildCount();
366
+ if (tabStripChildCount == 0 || tabIndex < 0 || tabIndex >= tabStripChildCount) {
367
+ return;
368
+ }
369
+
370
+ View selectedChild = mTabStrip.getChildAt(tabIndex);
371
+ if (selectedChild != null) {
372
+ int targetScrollX = selectedChild.getLeft() + positionOffset;
373
+
374
+ if (tabIndex > 0 || positionOffset > 0) {
375
+ // If we're not at the first child and are mid-scroll, make sure
376
+ // we obey the offset
377
+ targetScrollX -= mTitleOffset;
378
+ }
379
+
380
+ scrollTo(targetScrollX, 0);
381
+ }
382
+ }
383
+
384
+ private class InternalViewPagerListener implements ViewPager.OnPageChangeListener {
385
+ private int mScrollState;
386
+
387
+ @Override
388
+ public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
389
+ int tabStripChildCount = mTabStrip.getChildCount();
390
+ if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) {
391
+ return;
392
+ }
393
+
394
+ mTabStrip.onTabsViewPagerPageChanged(position, positionOffset);
395
+
396
+ View selectedTitle = mTabStrip.getChildAt(position);
397
+ int extraOffset = (selectedTitle != null) ? (int) (positionOffset * selectedTitle.getWidth()) : 0;
398
+ scrollToTab(position, extraOffset);
399
+
400
+ if (mViewPagerPageChangeListener != null) {
401
+ mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
402
+ }
403
+ }
404
+
405
+ @Override
406
+ public void onPageScrollStateChanged(int state) {
407
+ mScrollState = state;
408
+
409
+ if (mViewPagerPageChangeListener != null) {
410
+ mViewPagerPageChangeListener.onPageScrollStateChanged(state);
411
+ }
412
+ }
413
+
414
+ @Override
415
+ public void onPageSelected(int position) {
416
+ if (mScrollState == ViewPager.SCROLL_STATE_IDLE) {
417
+ mTabStrip.onTabsViewPagerPageChanged(position, 0f);
418
+ scrollToTab(position, 0);
419
+ }
420
+ for (int i = 0; i < mTabStrip.getChildCount(); i++) {
421
+ mTabStrip.getChildAt(i).setSelected(position == i);
422
+ }
423
+ if (mViewPagerPageChangeListener != null) {
424
+ mViewPagerPageChangeListener.onPageSelected(position);
425
+ }
426
+ }
427
+
428
+ }
429
+
430
+ private class TabClickListener implements OnClickListener {
431
+ @Override
432
+ public void onClick(View v) {
433
+ for (int i = 0; i < mTabStrip.getChildCount(); i++) {
434
+ if (v == mTabStrip.getChildAt(i)) {
435
+ if (onTap(i)) {
436
+ mViewPager.setCurrentItem(i);
437
+ }
438
+ return;
439
+ }
440
+ }
441
+ }
442
+ }
443
+ }