@nativescript/core 8.8.5 → 8.8.6-next-01-12-2025-12736592426

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 (361) hide show
  1. package/accessibility/accessibility-properties.js +0 -1
  2. package/accessibility/accessibility-properties.js.map +1 -1
  3. package/animation-frame/index.d.ts +3 -17
  4. package/core-types/index.d.ts +2 -2
  5. package/core-types/index.js +3 -3
  6. package/core-types/index.js.map +1 -1
  7. package/css/css-tree-parser.js +17 -21
  8. package/css/parser.js +2 -1
  9. package/css/parser.js.map +1 -1
  10. package/debugger/devtools-elements.d.ts +5 -23
  11. package/debugger/dom-node.d.ts +20 -23
  12. package/file-system/file-system-access.android.js +1 -1
  13. package/file-system/file-system-access.android.js.map +1 -1
  14. package/file-system/file-system-access.ios.js +2 -2
  15. package/file-system/file-system-access.ios.js.map +1 -1
  16. package/file-system/index.d.ts +95 -370
  17. package/fps-meter/index.d.ts +7 -24
  18. package/globals/index.d.ts +19 -4
  19. package/globals/index.js +5 -3
  20. package/globals/index.js.map +1 -1
  21. package/http/index.d.ts +73 -149
  22. package/index.d.ts +6 -23
  23. package/matrix/index.d.ts +5 -32
  24. package/module-name-resolver/index.d.ts +13 -21
  25. package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
  26. package/package.json +1 -1
  27. package/platform/index.d.ts +0 -26
  28. package/profiling/index.d.ts +26 -153
  29. package/text/formatted-string.d.ts +1 -1
  30. package/text/span.d.ts +1 -1
  31. package/trace/index.d.ts +105 -131
  32. package/ui/action-bar/index.android.d.ts +1 -0
  33. package/ui/action-bar/index.android.js +3 -0
  34. package/ui/action-bar/index.android.js.map +1 -1
  35. package/ui/animation/animation-common.d.ts +1 -8
  36. package/ui/animation/animation-common.js +0 -8
  37. package/ui/animation/animation-common.js.map +1 -1
  38. package/ui/animation/animation-interfaces.d.ts +11 -0
  39. package/ui/animation/animation-interfaces.js +12 -1
  40. package/ui/animation/animation-interfaces.js.map +1 -1
  41. package/ui/animation/index.android.d.ts +2 -2
  42. package/ui/animation/index.android.js +2 -2
  43. package/ui/animation/index.android.js.map +1 -1
  44. package/ui/animation/index.ios.d.ts +2 -2
  45. package/ui/animation/index.ios.js +4 -4
  46. package/ui/animation/index.ios.js.map +1 -1
  47. package/ui/animation/keyframe-animation.d.ts +67 -118
  48. package/ui/builder/binding-builder.d.ts +12 -15
  49. package/ui/builder/index.d.ts +27 -69
  50. package/ui/button/index.android.d.ts +1 -0
  51. package/ui/button/index.android.js +3 -0
  52. package/ui/button/index.android.js.map +1 -1
  53. package/ui/content-view/index.d.ts +23 -4
  54. package/ui/core/view/index.android.js +3 -4
  55. package/ui/core/view/index.android.js.map +1 -1
  56. package/ui/core/view/index.ios.js +1 -3
  57. package/ui/core/view/index.ios.js.map +1 -1
  58. package/ui/core/view/view-common.d.ts +2 -1
  59. package/ui/core/view/view-common.js +4 -3
  60. package/ui/core/view/view-common.js.map +1 -1
  61. package/ui/core/weak-event-listener/index.d.ts +2 -18
  62. package/ui/frame/frame-common.d.ts +2 -1
  63. package/ui/frame/frame-common.js +4 -4
  64. package/ui/frame/frame-common.js.map +1 -1
  65. package/ui/layouts/index.d.ts +2 -1
  66. package/ui/layouts/layout-base-common.d.ts +0 -1
  67. package/ui/layouts/layout-base-common.js +1 -8
  68. package/ui/layouts/layout-base-common.js.map +1 -1
  69. package/ui/placeholder/index.android.d.ts +1 -1
  70. package/ui/placeholder/index.d.ts +8 -42
  71. package/ui/styling/background.ios.js +13 -12
  72. package/ui/styling/background.ios.js.map +1 -1
  73. package/ui/styling/converters.d.ts +2 -2
  74. package/ui/styling/style-properties.d.ts +81 -101
  75. package/ui/styling/style-scope.d.ts +79 -48
  76. package/ui/text-base/formatted-string.d.ts +36 -73
  77. package/ui/text-base/span.d.ts +36 -81
  78. package/ui/web-view/web-view-common.d.ts +1 -1
  79. package/utils/debug.d.ts +17 -61
  80. package/utils/lazy.d.ts +0 -5
  81. package/utils/macrotask-scheduler.d.ts +1 -5
  82. package/utils/native-helper.ios.js +1 -0
  83. package/utils/native-helper.ios.js.map +1 -1
  84. package/utils/types.d.ts +23 -115
  85. package/xml/index.d.ts +44 -105
  86. package/xml/index.js +1 -1
  87. package/xml/index.js.map +1 -1
  88. package/accessibility/accessibility-service.d.ts +0 -10
  89. package/accessibility/font-scale.d.ts +0 -9
  90. package/accessibility/index.d.ts +0 -37
  91. package/animation-frame/animation-native.d.ts +0 -4
  92. package/application/application.d.ts +0 -194
  93. package/application/index.d.ts +0 -2
  94. package/application-settings/index.d.ts +0 -70
  95. package/cli-hooks/before-checkForChanges.js +0 -60
  96. package/cli-hooks/postinstall.js +0 -2
  97. package/cli-hooks/preuninstall.js +0 -2
  98. package/color/index.d.ts +0 -206
  99. package/connectivity/index.d.ts +0 -52
  100. package/css/lib/parse/index.js +0 -602
  101. package/css/package.json +0 -36
  102. package/css/reworkcss.d.ts +0 -47
  103. package/css/reworkcss.js +0 -1
  104. package/css-value/package.json +0 -23
  105. package/css-value/reworkcss-value.d.ts +0 -8
  106. package/css-value/reworkcss-value.js +0 -113
  107. package/debugger/css-agent.d.ts +0 -59
  108. package/fetch/index.js +0 -539
  109. package/file-system/file-system-access.d.ts +0 -441
  110. package/fps-meter/fps-native.d.ts +0 -24
  111. package/global-types.d.ts +0 -393
  112. package/http/http-request/index.d.ts +0 -3
  113. package/image-asset/index.d.ts +0 -17
  114. package/image-source/index.d.ts +0 -345
  115. package/js-libs/easysax/easysax.d.ts +0 -8
  116. package/js-libs/easysax/easysax.js +0 -782
  117. package/js-libs/easysax/package.json +0 -35
  118. package/platform/device/index.d.ts +0 -70
  119. package/platform/screen/index.d.ts +0 -48
  120. package/platforms/android/native-api-usage.json +0 -32
  121. package/platforms/android/res/values/ids.xml +0 -4
  122. package/platforms/android/widgets-release.aar +0 -0
  123. package/platforms/android/winter_cg-release.aar +0 -0
  124. package/platforms/ios/NSCWinterCG.xcframework/Info.plist +0 -102
  125. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
  126. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
  127. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
  128. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Info.plist +0 -0
  129. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
  130. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/NSCWinterCG +0 -0
  131. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
  132. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
  133. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
  134. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
  135. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
  136. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
  137. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +0 -6
  138. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG +0 -0
  139. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Resources/Info.plist +0 -52
  140. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCCrypto.h +0 -79
  141. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCWinterCG.h +0 -20
  142. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSString+WinterCG.h +0 -21
  143. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Modules/module.modulemap +0 -6
  144. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/NSCWinterCG +0 -0
  145. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Resources/Info.plist +0 -52
  146. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG +0 -0
  147. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
  148. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
  149. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
  150. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
  151. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
  152. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
  153. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
  154. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Info.plist +0 -0
  155. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
  156. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG +0 -0
  157. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/_CodeSignature/CodeResources +0 -146
  158. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
  159. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
  160. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
  161. package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
  162. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
  163. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
  164. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
  165. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Info.plist +0 -0
  166. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
  167. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/NSCWinterCG +0 -0
  168. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
  169. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
  170. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
  171. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
  172. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
  173. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
  174. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Info.plist +0 -0
  175. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
  176. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG +0 -0
  177. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/_CodeSignature/CodeResources +0 -146
  178. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
  179. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
  180. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
  181. package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
  182. package/platforms/ios/TNSWidgets.xcframework/Info.plist +0 -102
  183. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  184. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  185. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  186. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  187. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  188. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  189. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  190. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  191. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  192. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
  193. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Modules/module.modulemap +0 -6
  194. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  195. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  196. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  197. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  198. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  199. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  200. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  201. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  202. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  203. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  204. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  205. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  206. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  207. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  208. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  209. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +0 -6
  210. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  211. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  212. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +0 -52
  213. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
  214. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSCCrypto.h +0 -60
  215. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSData+Async.h +0 -24
  216. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +0 -22
  217. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSString+Async.h +0 -25
  218. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSLabel.h +0 -16
  219. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSProcess.h +0 -29
  220. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +0 -25
  221. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIImage+TNSBlocks.h +0 -26
  222. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIView+PassThroughParent.h +0 -17
  223. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Modules/module.modulemap +0 -6
  224. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/NSObject+Swizzling.h +0 -17
  225. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/UIView+PropertyBag.h +0 -18
  226. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +0 -52
  227. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
  228. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
  229. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  230. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  231. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  232. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
  233. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  234. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  235. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  236. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  237. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  238. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  239. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  240. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  241. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  242. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  243. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +0 -6
  244. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  245. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  246. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  247. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +0 -223
  248. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  249. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  250. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  251. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
  252. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  253. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  254. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  255. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  256. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  257. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  258. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  259. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  260. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  261. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
  262. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Modules/module.modulemap +0 -6
  263. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  264. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  265. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  266. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  267. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  268. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  269. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
  270. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
  271. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
  272. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
  273. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
  274. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
  275. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
  276. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
  277. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
  278. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  279. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +0 -6
  280. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
  281. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
  282. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  283. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +0 -223
  284. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
  285. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  286. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
  287. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
  288. package/platforms/ios/native-api-usage.json +0 -41
  289. package/platforms/ios/src/NativeScriptEmbedder.h +0 -31
  290. package/platforms/ios/src/NativeScriptEmbedder.m +0 -43
  291. package/platforms/ios/src/NativeScriptMainWindow.swift +0 -192
  292. package/platforms/ios/src/NativeScriptUtils.h +0 -16
  293. package/platforms/ios/src/NativeScriptUtils.m +0 -137
  294. package/platforms/ios/src/UIView+NativeScript.h +0 -15
  295. package/platforms/ios/src/UIView+NativeScript.m +0 -148
  296. package/platforms/ios/src/module.modulemap +0 -14
  297. package/platforms/ios/typings/objc!MaterialComponents.d.ts +0 -808
  298. package/platforms/ios/typings/objc!NativeScriptUtils.d.ts +0 -18
  299. package/references.d.ts +0 -10
  300. package/text/index.d.ts +0 -36
  301. package/timer/index.d.ts +0 -27
  302. package/ui/action-bar/index.d.ts +0 -271
  303. package/ui/activity-indicator/index.d.ts +0 -21
  304. package/ui/animation/index.d.ts +0 -152
  305. package/ui/button/index.d.ts +0 -44
  306. package/ui/core/control-state-change/index.d.ts +0 -15
  307. package/ui/core/view/index.d.ts +0 -992
  308. package/ui/core/view/view-helper/index.d.ts +0 -76
  309. package/ui/date-picker/index.d.ts +0 -65
  310. package/ui/dialogs/index.d.ts +0 -311
  311. package/ui/editable-text-base/index.d.ts +0 -100
  312. package/ui/embedding/index.d.ts +0 -10
  313. package/ui/frame/fragment.d.ts +0 -5
  314. package/ui/frame/fragment.transitions.d.ts +0 -43
  315. package/ui/frame/index.d.ts +0 -553
  316. package/ui/frame/transition-definitions.android.d.ts +0 -54
  317. package/ui/gestures/index.d.ts +0 -59
  318. package/ui/html-view/index.d.ts +0 -27
  319. package/ui/image/index.d.ts +0 -77
  320. package/ui/image/symbol-effects.d.ts +0 -13
  321. package/ui/image-cache/index.d.ts +0 -147
  322. package/ui/label/index.d.ts +0 -21
  323. package/ui/layouts/absolute-layout/index.d.ts +0 -40
  324. package/ui/layouts/dock-layout/index.d.ts +0 -35
  325. package/ui/layouts/flexbox-layout/index.d.ts +0 -66
  326. package/ui/layouts/grid-layout/index.d.ts +0 -182
  327. package/ui/layouts/layout-base.d.ts +0 -105
  328. package/ui/layouts/root-layout/index.d.ts +0 -45
  329. package/ui/layouts/stack-layout/index.d.ts +0 -19
  330. package/ui/layouts/wrap-layout/index.d.ts +0 -43
  331. package/ui/list-picker/index.d.ts +0 -32
  332. package/ui/list-view/index.d.ts +0 -208
  333. package/ui/page/index.d.ts +0 -212
  334. package/ui/progress/index.d.ts +0 -37
  335. package/ui/scroll-view/index.d.ts +0 -89
  336. package/ui/search-bar/index.d.ts +0 -89
  337. package/ui/segmented-bar/index.d.ts +0 -106
  338. package/ui/slider/index.d.ts +0 -72
  339. package/ui/styling/background.d.ts +0 -93
  340. package/ui/styling/font.d.ts +0 -62
  341. package/ui/switch/index.d.ts +0 -35
  342. package/ui/tab-view/index.d.ts +0 -175
  343. package/ui/text-base/index.d.ts +0 -161
  344. package/ui/text-field/index.d.ts +0 -41
  345. package/ui/text-view/index.d.ts +0 -24
  346. package/ui/time-picker/index.d.ts +0 -80
  347. package/ui/transition/fade-transition.d.ts +0 -3
  348. package/ui/transition/flip-transition.d.ts +0 -5
  349. package/ui/transition/index.d.ts +0 -59
  350. package/ui/transition/modal-transition.d.ts +0 -2
  351. package/ui/transition/page-transition.d.ts +0 -4
  352. package/ui/transition/shared-transition-helper.d.ts +0 -14
  353. package/ui/transition/slide-transition.d.ts +0 -5
  354. package/ui/utils.d.ts +0 -44
  355. package/ui/web-view/index.d.ts +0 -130
  356. package/utils/constants.d.ts +0 -1
  357. package/utils/index.d.ts +0 -177
  358. package/utils/layout-helper/index.d.ts +0 -82
  359. package/utils/mainthread-helper.d.ts +0 -16
  360. package/utils/native-helper.d.ts +0 -280
  361. package/utils/typescript-utils.d.ts +0 -6
@@ -1,192 +0,0 @@
1
- import SwiftUI
2
- import NativeScriptEmbedder
3
- import UIKit
4
-
5
- var hasRuntimeInit = false
6
- var hasRuntimeBoot = false
7
- var hasRuntimeSetMainScene = false
8
-
9
- @available(iOS 14.0, *)
10
- struct NativeScriptMainWindow: Scene {
11
-
12
- #if os(visionOS)
13
- // Environment control
14
- @Environment(\.openWindow) private var openWindow
15
- @Environment(\.dismissWindow) private var dismissWindow
16
- @Environment(\.openImmersiveSpace) private var openImmersiveSpace
17
- @Environment(\.dismissImmersiveSpace) private var dismissImmersiveSpace
18
- #endif
19
-
20
- var body: some Scene {
21
- #if os(visionOS)
22
- // windowStyle is only supported on visionOS
23
- WindowGroup {
24
- NativeScriptAppView(found: { windowScene in
25
- if (!hasRuntimeSetMainScene) {
26
- hasRuntimeSetMainScene = true
27
- NativeScriptEmbedder.sharedInstance().setWindowScene(windowScene)
28
- }
29
- }).onAppear {
30
- // print("NativeScriptAppView onAppear")
31
- if (!hasRuntimeBoot) {
32
- hasRuntimeBoot = true
33
- DispatchQueue.main.async {
34
- NativeScriptEmbedder.boot()
35
- }
36
- }
37
- }.onReceive(NotificationCenter.default
38
- .publisher(for: NSNotification.Name("NativeScriptWindowOpen")), perform: { obj in
39
- let info = parseWindowInfo(obj: obj)
40
- let id = info.keys.first
41
- Task {
42
- if (info[id!]!) {
43
- await openImmersiveSpace(id: id!)
44
- } else {
45
- openWindow(id: id!)
46
- }
47
- }
48
- }).onReceive(NotificationCenter.default
49
- .publisher(for: NSNotification.Name("NativeScriptWindowClose")), perform: { obj in
50
- let info = parseWindowInfo(obj: obj)
51
- let id = info.keys.first
52
- Task {
53
- if (info[id!]!) {
54
- await dismissImmersiveSpace()
55
- } else {
56
- dismissWindow(id: id!)
57
- }
58
- }
59
- })
60
- .onOpenURL { (url) in
61
- NotificationCenter.default.post(name: Notification.Name("NativeScriptOpenURL"), object: nil, userInfo: ["url": url.absoluteString ])
62
- }
63
- }
64
- .windowStyle(.plain)
65
- #else
66
- WindowGroup {
67
- NativeScriptAppView(found: { windowScene in
68
- NativeScriptEmbedder.sharedInstance().setWindowScene(windowScene)
69
- }).onAppear {
70
- // print("NativeScriptAppView onAppear")
71
- DispatchQueue.main.async {
72
- NativeScriptEmbedder.boot()
73
- }
74
-
75
- }
76
- }
77
- #endif
78
- }
79
-
80
- init() {
81
- if (!hasRuntimeInit) {
82
- hasRuntimeInit = true
83
- NativeScriptViewFactory.initShared()
84
- NativeScriptEmbedder.sharedInstance().setDelegate(NativeScriptViewFactory.shared)
85
- NativeScriptEmbedder.setup()
86
- }
87
- }
88
-
89
- #if os(visionOS)
90
- func parseWindowInfo(obj: Notification, close: Bool = false) -> [String:Bool] {
91
- if let userInfo = obj.userInfo {
92
- var id: String = ""
93
- var isImmersive = false
94
- for (key, value) in userInfo {
95
- let k = key as! String
96
- if (k == "type") {
97
- id = value as! String
98
- } else if (k == "isImmersive") {
99
- isImmersive = value as! Bool
100
- }
101
- }
102
- return [id: isImmersive]
103
-
104
- }
105
- return ["_": false]
106
- }
107
- #endif
108
- }
109
-
110
- @available(iOS 13.0, *)
111
- struct NativeScriptAppView: UIViewRepresentable {
112
- /// A closure that's called when the window is found.
113
- var found: ((UIWindowScene?) -> Void)
114
-
115
- func makeUIView(context: Context) -> UIView {
116
- // print("NativeScriptAppView makeUIView")
117
- var window: UIWindow? {
118
- guard let scene = UIApplication.shared.connectedScenes.first,
119
- let windowSceneDelegate = scene.delegate as? UIWindowSceneDelegate,
120
- let window = windowSceneDelegate.window else {
121
- return nil
122
- }
123
- return window
124
- }
125
-
126
- DispatchQueue.main.async {
127
- found(window?.windowScene)
128
- }
129
-
130
- return NativeScriptViewFactory.app!.view
131
- }
132
-
133
- func updateUIView(_ uiView: UIView, context: Context) {
134
- // print("NativeScriptAppView updateUIView")
135
- // could update data through the controller
136
- }
137
- }
138
-
139
- @available(iOS 13.0, *)
140
- @objc public class NativeScriptViewFactory: NSObject, NativeScriptEmbedderDelegate {
141
- @objc static var shared: NativeScriptViewFactory?
142
- @objc static var app: NativeScriptContainerCtrl?
143
-
144
- // holds key/value map of views for lifecycle handling
145
- @objc public var views: NSMutableDictionary?
146
-
147
- // provided by NativeScript to coordinate view lifecycle
148
- @objc public var viewCreator: ((String) -> Void)? = nil
149
- @objc public var viewDestroyer: ((String) -> Void)? = nil
150
-
151
- // get or create (if needed) NativeScript views to represent in SwiftUI
152
- @objc public func getViewById(_ id: String) -> UIView {
153
- let vc = views!.object(forKey: id) as? UIView
154
- if (vc == nil) {
155
- // create the NativeScript view
156
- viewCreator!(id)
157
- }
158
- return views!.object(forKey: id) as! UIView
159
- }
160
-
161
- @available(iOS 15.0, *)
162
- @objc public static func getKeyWindow() -> UIWindow? {
163
- return UIApplication
164
- .shared
165
- .connectedScenes
166
- .compactMap { ($0 as? UIWindowScene)?.keyWindow }
167
- .last
168
- }
169
-
170
- @objc public static func initShared() {
171
- if (NativeScriptViewFactory.shared == nil) {
172
- NativeScriptViewFactory.app = NativeScriptContainerCtrl()
173
- NativeScriptViewFactory.shared = NativeScriptViewFactory()
174
- NativeScriptViewFactory.shared!.views = NSMutableDictionary()
175
- }
176
- }
177
-
178
- public func presentNativeScriptApp(_ vc: UIViewController!) -> Any! {
179
- vc.view.frame = NativeScriptViewFactory.app!.view.bounds
180
- vc.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
181
- NativeScriptViewFactory.app!.addChild(vc)
182
- NativeScriptViewFactory.app!.view.addSubview(vc.view)
183
- vc.didMove(toParent: NativeScriptViewFactory.app)
184
- return NativeScriptViewFactory.app
185
- }
186
- }
187
-
188
- // UIViewController
189
- @objc public class NativeScriptContainerCtrl: UIViewController {
190
- // allow NativeScript to override updateData for custom handling
191
- @objc public var updateData: ((_ data: NSMutableDictionary) -> Void)? = nil
192
- }
@@ -1,16 +0,0 @@
1
- //
2
- // NativeScriptUtils.h
3
- //
4
- // Created by Nathan Walker on 2/02/2022.
5
- #include <UIKit/UIKit.h>
6
-
7
- @interface NativeScriptUtils : NSObject
8
-
9
- +(UIFont*) getSystemFont:(CGFloat)size weight:(UIFontWeight)weight italic:(BOOL)italic symbolicTraits:(UIFontDescriptorSymbolicTraits)symbolicTraits;
10
- +(UIFont*) createUIFont:(NSDictionary*)font;
11
- +(NSMutableAttributedString*)createMutableStringWithDetails:(NSDictionary*)details;
12
- +(NSMutableAttributedString*)createMutableStringForSpan:(NSString*)text font:(UIFont*)font color:(UIColor*)color backgroundColor:(UIColor*)backgroundColor textDecoration:(NSString*)textDecoration baselineOffset:(CGFloat)baselineOffset;
13
- +(UIImage*)scaleImage:(UIImage*)image width:(CGFloat)width height:(CGFloat)height scaleFactor:(CGFloat)scaleFactor;
14
- +(NSData*)getImageData:(UIImage*)image format:(NSString*)format quality:(CGFloat)quality;
15
-
16
- @end
@@ -1,137 +0,0 @@
1
- #import "NativeScriptUtils.h"
2
-
3
- @implementation NativeScriptUtils
4
-
5
- +(UIFont*) getSystemFont:(CGFloat)size weight:(UIFontWeight)weight italic:(BOOL)italic symbolicTraits:(UIFontDescriptorSymbolicTraits)symbolicTraits {
6
- UIFont *result = [UIFont systemFontOfSize:size weight:weight];
7
- if (italic) {
8
- result = [UIFont fontWithDescriptor:[result.fontDescriptor fontDescriptorWithSymbolicTraits:symbolicTraits] size:size];
9
- }
10
-
11
- return result;
12
- }
13
- +(UIFont*) createUIFont:(NSDictionary*)font {
14
- UIFont *result;
15
-
16
- CGFloat size = [[font valueForKey:@"fontSize"] floatValue];
17
-
18
- UIFontDescriptorSymbolicTraits symbolicTraits = 0;
19
- if ([[font valueForKey:@"isBold"] boolValue]) {
20
- symbolicTraits = symbolicTraits | UIFontDescriptorTraitBold;
21
- }
22
- if ([[font valueForKey:@"isItalic"] boolValue]) {
23
- symbolicTraits = symbolicTraits | UIFontDescriptorTraitItalic;
24
- }
25
-
26
- NSDictionary *fontDescriptorTraits = @{
27
- UIFontSymbolicTrait : @(symbolicTraits),
28
- UIFontWeightTrait : [font valueForKey:@"fontWeight"]
29
- };
30
-
31
- for (NSString *family in [NSArray arrayWithArray:[font valueForKey:@"fontFamily"]]) {
32
- NSString *fontFamily = family;
33
- if ([family.lowercaseString isEqualToString:@"serif"]) {
34
- fontFamily = @"Times New Roman";
35
- } else if ([family.lowercaseString isEqualToString:@"monospace"]) {
36
- fontFamily = @"Courier New";
37
- }
38
-
39
- if (!fontFamily || [fontFamily isEqualToString:@"sans-serif"] || [fontFamily isEqualToString:@"system"]) {
40
- result = [NativeScriptUtils getSystemFont:size weight:(UIFontWeight)[[font valueForKey:@"fontWeight"] floatValue] italic:[[font valueForKey:@"isItalic"] boolValue] symbolicTraits:symbolicTraits];
41
- break;
42
- } else {
43
- UIFontDescriptor *descriptor = [UIFontDescriptor fontDescriptorWithFontAttributes:@{
44
- UIFontDescriptorFamilyAttribute: fontFamily,
45
- UIFontDescriptorTraitsAttribute: fontDescriptorTraits
46
- }];
47
-
48
- result = [UIFont fontWithDescriptor:descriptor size:size];
49
-
50
- BOOL actualItalic = result.fontDescriptor.symbolicTraits & UIFontDescriptorTraitItalic;
51
- if ([[font valueForKey:@"isItalic"] boolValue] && !actualItalic) {
52
- #if TARGET_OS_MACCATALYST
53
- #else
54
- // The font we got is not actually italic so emulate that with a matrix
55
- result = [UIFont fontWithDescriptor:[descriptor fontDescriptorWithMatrix:CGAffineTransformMake(1, 0, 0.2, 1, 0, 0)] size:size];
56
- #endif
57
- }
58
-
59
- // Check if the resolved font has the correct font-family
60
- // If not - fallback to the next font-family
61
- if ([result.familyName isEqualToString:fontFamily]) {
62
- break;
63
- } else {
64
- result = nil;
65
- }
66
- }
67
- }
68
-
69
- // Couldn't resolve font - fallback to the system font
70
- if (result == nil) {
71
- result = [NativeScriptUtils getSystemFont:size weight:(UIFontWeight)[[font valueForKey:@"fontWeight"] floatValue] italic:[[font valueForKey:@"isItalic"] boolValue] symbolicTraits:symbolicTraits];
72
- }
73
-
74
- return result;
75
- }
76
-
77
- +(NSMutableAttributedString*)createMutableStringWithDetails:(NSDictionary*)details {
78
- NSMutableAttributedString *mas = [[NSMutableAttributedString alloc] init];
79
- for (NSDictionary *detail in [NSArray arrayWithArray:[details valueForKey:@"spans"]]) {
80
- NSMutableAttributedString *attrString = [NativeScriptUtils createMutableStringForSpan:[detail objectForKey:@"text"] font:[detail objectForKey:@"iosFont"] color:[detail objectForKey:@"color"] backgroundColor:[detail objectForKey:@"backgroundColor"] textDecoration:[detail objectForKey:@"textDecoration"] baselineOffset:[[detail valueForKey:@"baselineOffset"] floatValue]];
81
- [mas insertAttributedString:attrString atIndex:[[detail valueForKey:@"index"] intValue]];
82
- }
83
- return mas;
84
- }
85
-
86
- +(NSMutableAttributedString*)createMutableStringForSpan:(NSString*)text font:(UIFont*)font color:(UIColor*)color backgroundColor:(UIColor*)backgroundColor textDecoration:(NSString*)textDecoration baselineOffset:(CGFloat)baselineOffset {
87
- NSMutableDictionary *attrDict = [[NSMutableDictionary alloc] init];
88
- attrDict[NSFontAttributeName] = font;
89
-
90
- if (color != nil) {
91
- attrDict[NSForegroundColorAttributeName] = color;
92
- }
93
-
94
- if (backgroundColor != nil) {
95
- attrDict[NSBackgroundColorAttributeName] = backgroundColor;
96
- }
97
-
98
- if (textDecoration != nil) {
99
- if ([textDecoration rangeOfString:@"underline"].location != NSNotFound) {
100
- attrDict[NSUnderlineStyleAttributeName] = [NSNumber numberWithInt:NSUnderlineStyleSingle];
101
- }
102
-
103
- if ([textDecoration rangeOfString:@"line-through"].location != NSNotFound) {
104
- attrDict[NSStrikethroughStyleAttributeName] = [NSNumber numberWithInt:NSUnderlineStyleSingle];
105
- }
106
- }
107
-
108
- attrDict[NSBaselineOffsetAttributeName] = [NSNumber numberWithInt:baselineOffset];
109
-
110
- return [[NSMutableAttributedString alloc] initWithString:text attributes:attrDict];
111
-
112
- }
113
-
114
- +(UIImage*)scaleImage:(UIImage*)image width:(CGFloat)width height:(CGFloat)height scaleFactor:(CGFloat)scaleFactor {
115
- UIImage *resultImage;
116
- @autoreleasepool {
117
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(width, height), NO, scaleFactor);
118
- [image drawInRect:CGRectMake(0, 0, width, height)];
119
- resultImage = UIGraphicsGetImageFromCurrentImageContext();
120
- UIGraphicsEndImageContext();
121
- }
122
- return resultImage;
123
- }
124
-
125
- +(NSData*)getImageData:(UIImage*)image format:(NSString*)format quality:(CGFloat)quality {
126
- NSData *data;
127
- @autoreleasepool {
128
- if ([format.lowercaseString isEqualToString:@"png"]) {
129
- data = UIImagePNGRepresentation(image);
130
- } else {
131
- data = UIImageJPEGRepresentation(image, quality);
132
- }
133
- }
134
- return data;
135
- }
136
-
137
- @end
@@ -1,15 +0,0 @@
1
- //
2
- // UIView+NativeScript.h
3
- //
4
- // Created by Nathan Walker on 2/02/2022.
5
- #include <UIKit/UIKit.h>
6
-
7
- @interface UIView (NativeScript)
8
-
9
- - (void)nativeScriptSetTextDecorationAndTransform:(NSString*)text textDecoration:(NSString*)textDecoration letterSpacing:(CGFloat)letterSpacing lineHeight:(CGFloat)lineHeight;
10
-
11
- -(void)nativeScriptSetFormattedTextDecorationAndTransform:(NSDictionary*)details letterSpacing:(CGFloat)letterSpacing lineHeight:(CGFloat)lineHeight;
12
-
13
- -(void)nativeScriptSetFormattedTextStroke:(CGFloat)width color:(UIColor*)color;
14
-
15
- @end
@@ -1,148 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
- #import "UIView+NativeScript.h"
3
- #import "NativeScriptUtils.h"
4
-
5
- @implementation UIView (NativeScript)
6
- - (void)nativeScriptSetTextDecorationAndTransform:(NSString*)text textDecoration:(NSString*)textDecoration letterSpacing:(CGFloat)letterSpacing lineHeight:(CGFloat)lineHeight {
7
- NSMutableDictionary *attrDict = [[NSMutableDictionary alloc] init];
8
-
9
- if ([textDecoration rangeOfString:@"underline"].location != NSNotFound) {
10
- attrDict[NSUnderlineStyleAttributeName] = [NSNumber numberWithInt:NSUnderlineStyleSingle];
11
- }
12
-
13
- if ([textDecoration rangeOfString:@"line-through"].location != NSNotFound) {
14
- attrDict[NSStrikethroughStyleAttributeName] = [NSNumber numberWithInt:NSUnderlineStyleSingle];
15
- }
16
- BOOL isTextType = [self isKindOfClass:[UITextField class]] || [self isKindOfClass:[UITextView class]] | [self isKindOfClass:[UILabel class]] | [self isKindOfClass:[UIButton class]];
17
-
18
- if (letterSpacing != 0 && isTextType && ((UITextView*)self).font != nil) {
19
- NSNumber *kern = [NSNumber numberWithDouble:letterSpacing * ((UITextView*)self).font.pointSize];
20
- attrDict[NSKernAttributeName] = kern;
21
- if ([self isKindOfClass:[UITextField class]]) {
22
- [((UITextField*)self).defaultTextAttributes setValue:kern forKey:NSKernAttributeName];
23
- }
24
- }
25
-
26
- BOOL isTextView = [self isKindOfClass:[UITextView class]];
27
- if (lineHeight > 0) {
28
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
29
- paragraphStyle.lineSpacing = lineHeight;
30
- // make sure a possible previously set text alignment setting is not lost when line height is specified
31
- if ([self isKindOfClass:[UIButton class]]) {
32
- paragraphStyle.alignment = ((UIButton*)self).titleLabel.textAlignment;
33
- } else {
34
- paragraphStyle.alignment = ((UILabel*)self).textAlignment;
35
- }
36
-
37
- if ([self isKindOfClass:[UILabel class]]) {
38
- // make sure a possible previously set line break mode is not lost when line height is specified
39
- paragraphStyle.lineBreakMode = ((UILabel*)self).lineBreakMode;
40
- }
41
- attrDict[NSParagraphStyleAttributeName] = paragraphStyle;
42
- } else if (isTextView) {
43
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
44
- paragraphStyle.alignment = ((UITextView*)self).textAlignment;
45
- attrDict[NSParagraphStyleAttributeName] = paragraphStyle;
46
- }
47
-
48
- if (attrDict.count > 0 || isTextView) {
49
- if (isTextView && ((UITextView*)self).font) {
50
- // UITextView's font seems to change inside.
51
- attrDict[NSFontAttributeName] = ((UITextView*)self).font;
52
- }
53
-
54
- NSMutableAttributedString *result = [[NSMutableAttributedString alloc] initWithString:text];
55
- [result setAttributes:attrDict range:(NSRange){
56
- 0,
57
- text.length
58
- }];
59
-
60
- if ([self isKindOfClass:[UIButton class]]) {
61
- [(UIButton*)self setAttributedTitle:result forState:UIControlStateNormal];
62
- } else {
63
- ((UITextView*)self).attributedText = result;
64
- }
65
- } else {
66
- if ([self isKindOfClass:[UIButton class]]) {
67
- // Clear attributedText or title won't be affected.
68
- [(UIButton*)self setAttributedTitle:nil forState:UIControlStateNormal];
69
- [(UIButton*)self setTitle:text forState:UIControlStateNormal];
70
- } else {
71
- // Clear attributedText or text won't be affected.
72
- ((UILabel*)self).attributedText = nil;
73
- ((UILabel*)self).text = text;
74
- }
75
- }
76
- }
77
-
78
- -(void)nativeScriptSetFormattedTextDecorationAndTransform:(NSDictionary*)details letterSpacing:(CGFloat)letterSpacing lineHeight:(CGFloat)lineHeight {
79
- NSMutableAttributedString *attrText = [NativeScriptUtils createMutableStringWithDetails:details];
80
- if (letterSpacing != 0) {
81
- NSNumber *kern = [NSNumber numberWithDouble:letterSpacing * ((UITextView*)self).font.pointSize];
82
- [attrText addAttribute:NSKernAttributeName value:kern range:(NSRange){
83
- 0,
84
- attrText.length
85
- } ];
86
- }
87
-
88
- BOOL isLabel = [self isKindOfClass:[UILabel class]];
89
- if (lineHeight > 0) {
90
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
91
- paragraphStyle.lineSpacing = lineHeight;
92
- // make sure a possible previously set text alignment setting is not lost when line height is specified
93
- if ([self isKindOfClass:[UIButton class]]) {
94
- paragraphStyle.alignment = ((UIButton*)self).titleLabel.textAlignment;
95
- } else {
96
- // Paragraph alignment is also important for tappable spans as NSTextContainer takes it into account
97
- paragraphStyle.alignment = ((UILabel*)self).textAlignment;
98
- }
99
-
100
- if (isLabel) {
101
- // make sure a possible previously set line break mode is not lost when line height is specified
102
- paragraphStyle.lineBreakMode = ((UILabel*)self).lineBreakMode;
103
- }
104
- [attrText addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:(NSRange){
105
- 0,
106
- attrText.length
107
- }];
108
- } else if (isLabel || [self isKindOfClass:[UITextView class]]) {
109
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
110
-
111
- if (isLabel) {
112
- // It's important to set paragraph alignment for link tap to work on multi-line spans as NSTextContainer takes it into account
113
- paragraphStyle.alignment = ((UILabel*)self).textAlignment;
114
- } else {
115
- paragraphStyle.alignment = ((UITextView*)self).textAlignment;
116
- }
117
- [attrText addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:(NSRange){
118
- 0,
119
- attrText.length
120
- }];
121
- }
122
-
123
- if ([self isKindOfClass:[UIButton class]]) {
124
- [(UIButton*)self setAttributedTitle:attrText forState:UIControlStateNormal];
125
- } else {
126
- if (@available(iOS 13.0, *)) {
127
- ((UILabel*)self).textColor = [UIColor labelColor];
128
- }
129
-
130
- ((UILabel*)self).attributedText = attrText;
131
- }
132
- }
133
-
134
- -(void)nativeScriptSetFormattedTextStroke:(CGFloat)width color:(UIColor*)color {
135
- if (width > 0) {
136
- NSMutableAttributedString *attrText = [[NSMutableAttributedString alloc] initWithAttributedString:((UILabel*)self).attributedText];
137
- [attrText addAttribute:NSStrokeWidthAttributeName value:[NSNumber numberWithFloat:width] range:(NSRange){
138
- 0,
139
- attrText.length
140
- }];
141
- [attrText addAttribute:NSStrokeColorAttributeName value:color range:(NSRange){
142
- 0,
143
- attrText.length
144
- }];
145
- ((UILabel*)self).attributedText = attrText;
146
- }
147
- }
148
- @end
@@ -1,14 +0,0 @@
1
- module NativeScriptEmbedder {
2
- header "NativeScriptEmbedder.h"
3
- export *
4
- }
5
-
6
- module NativeScriptUtils {
7
- header "NativeScriptUtils.h"
8
- export *
9
- }
10
-
11
- module UIViewNativeScript {
12
- header "UIView+NativeScript.h"
13
- export *
14
- }