@nativescript/core 9.0.0-next-07-26-2025-16544379102 → 9.0.0-preview.1

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. package/accessibility/accessibility-common.d.ts +264 -0
  2. package/accessibility/accessibility-common.js +352 -0
  3. package/accessibility/accessibility-common.js.map +1 -1
  4. package/accessibility/accessibility-properties.d.ts +1 -1
  5. package/accessibility/accessibility-properties.js +2 -2
  6. package/accessibility/accessibility-properties.js.map +1 -1
  7. package/accessibility/index.d.ts +0 -36
  8. package/accessibility/index.js +2 -0
  9. package/accessibility/index.js.map +1 -0
  10. package/application/application-common.d.ts +6 -8
  11. package/application/application-common.js +21 -14
  12. package/application/application-common.js.map +1 -1
  13. package/application/application-interfaces.d.ts +2 -3
  14. package/application/application.android.d.ts +14 -7
  15. package/application/application.android.js +754 -75
  16. package/application/application.android.js.map +1 -1
  17. package/application/application.d.ts +25 -0
  18. package/application/application.ios.d.ts +16 -18
  19. package/application/application.ios.js +455 -45
  20. package/application/application.ios.js.map +1 -1
  21. package/application/helpers-common.d.ts +50 -0
  22. package/application/helpers-common.js +153 -0
  23. package/application/helpers-common.js.map +1 -0
  24. package/application/helpers.android.d.ts +17 -0
  25. package/application/helpers.android.js +173 -0
  26. package/application/helpers.android.js.map +1 -0
  27. package/application/helpers.d.ts +25 -0
  28. package/application/helpers.ios.d.ts +27 -0
  29. package/application/helpers.ios.js +62 -0
  30. package/application/helpers.ios.js.map +1 -0
  31. package/application-settings/index.android.js +2 -2
  32. package/application-settings/index.android.js.map +1 -1
  33. package/color/color-common.d.ts +18 -19
  34. package/color/color-common.js +13 -14
  35. package/color/color-common.js.map +1 -1
  36. package/color/color-types.d.ts +49 -0
  37. package/color/color-types.js +3 -0
  38. package/color/color-types.js.map +1 -0
  39. package/color/index.ios.d.ts +2 -1
  40. package/color/index.ios.js.map +1 -1
  41. package/connectivity/index.android.js +5 -4
  42. package/connectivity/index.android.js.map +1 -1
  43. package/core-types/animation-types.d.ts +11 -0
  44. package/{ui/animation/animation-interfaces.js → core-types/animation-types.js} +1 -1
  45. package/core-types/animation-types.js.map +1 -0
  46. package/core-types/index.d.ts +1 -1
  47. package/core-types/index.js +2 -2
  48. package/core-types/index.js.map +1 -1
  49. package/core-types/validators.d.ts +2 -0
  50. package/core-types/validators.js +18 -0
  51. package/core-types/validators.js.map +1 -0
  52. package/css/css-tree-parser.js +17 -21
  53. package/css/css-tree-parser.js.map +1 -1
  54. package/css/lib/parse/index.d.ts +1 -0
  55. package/css/lib/parse/index.js +475 -577
  56. package/css/lib/parse/index.js.map +1 -0
  57. package/css/reworkcss.d.ts +25 -28
  58. package/css/reworkcss.js +5 -1
  59. package/css/reworkcss.js.map +1 -0
  60. package/css-mediaquery/index.js +1 -1
  61. package/css-mediaquery/index.js.map +1 -1
  62. package/css-value/reworkcss-value.d.ts +31 -8
  63. package/css-value/reworkcss-value.js +89 -111
  64. package/css-value/reworkcss-value.js.map +1 -0
  65. package/debugger/devtools-elements-interfaces.d.ts +1 -1
  66. package/debugger/devtools-elements.common.js +17 -8
  67. package/debugger/devtools-elements.common.js.map +1 -1
  68. package/debugger/devtools-elements.js +1 -1
  69. package/debugger/devtools-elements.js.map +1 -1
  70. package/debugger/dom-types.d.ts +24 -0
  71. package/debugger/{dom-node.js → dom-types.js} +11 -9
  72. package/debugger/dom-types.js.map +1 -0
  73. package/debugger/webinspector-css.d.ts +18 -18
  74. package/debugger/webinspector-css.js +1 -1
  75. package/debugger/webinspector-css.js.map +1 -1
  76. package/debugger/webinspector-dom.d.ts +15 -15
  77. package/debugger/webinspector-dom.js +1 -1
  78. package/debugger/webinspector-dom.js.map +1 -1
  79. package/debugger/webinspector-network.android.d.ts +9 -9
  80. package/debugger/webinspector-network.android.js +3 -3
  81. package/debugger/webinspector-network.android.js.map +1 -1
  82. package/debugger/webinspector-network.ios.d.ts +9 -9
  83. package/debugger/webinspector-network.ios.js +1 -1
  84. package/debugger/webinspector-network.ios.js.map +1 -1
  85. package/fetch/index.d.ts +72 -0
  86. package/fetch/index.js +448 -458
  87. package/fetch/index.js.map +1 -0
  88. package/file-system/file-system-access.android.js +32 -39
  89. package/file-system/file-system-access.android.js.map +1 -1
  90. package/file-system/file-system-access.ios.js +2 -15
  91. package/file-system/file-system-access.ios.js.map +1 -1
  92. package/file-system/index.d.ts +2 -2
  93. package/file-system/index.js +4 -11
  94. package/file-system/index.js.map +1 -1
  95. package/fps-meter/fps-native.android.d.ts +1 -2
  96. package/fps-meter/fps-native.android.js.map +1 -1
  97. package/fps-meter/fps-native.ios.d.ts +1 -2
  98. package/fps-meter/fps-native.ios.js.map +1 -1
  99. package/global-types.d.ts +7 -8
  100. package/globals/global-utils.d.ts +27 -0
  101. package/globals/global-utils.js +67 -0
  102. package/globals/global-utils.js.map +1 -0
  103. package/globals/index.d.ts +3 -7
  104. package/globals/index.js +276 -281
  105. package/globals/index.js.map +1 -1
  106. package/http/http-interfaces.d.ts +84 -0
  107. package/http/http-interfaces.js +6 -0
  108. package/http/http-interfaces.js.map +1 -0
  109. package/http/http-request/http-request-common.js +2 -2
  110. package/http/http-request/http-request-common.js.map +1 -1
  111. package/http/http-request/index.android.d.ts +3 -7
  112. package/http/http-request/index.android.js +6 -22
  113. package/http/http-request/index.android.js.map +1 -1
  114. package/http/http-request/index.d.ts +5 -1
  115. package/http/http-request/index.ios.d.ts +3 -7
  116. package/http/http-request/index.ios.js +6 -22
  117. package/http/http-request/index.ios.js.map +1 -1
  118. package/http/http-shared.d.ts +5 -0
  119. package/http/http-shared.js +14 -0
  120. package/http/http-shared.js.map +1 -0
  121. package/http/index.d.ts +6 -105
  122. package/http/index.js +10 -12
  123. package/http/index.js.map +1 -1
  124. package/image-asset/index.android.js +3 -3
  125. package/image-asset/index.android.js.map +1 -1
  126. package/image-source/index.android.d.ts +1 -1
  127. package/image-source/index.android.js +5 -23
  128. package/image-source/index.android.js.map +1 -1
  129. package/image-source/index.ios.js +2 -9
  130. package/image-source/index.ios.js.map +1 -1
  131. package/index.d.ts +12 -8
  132. package/index.js +6 -3
  133. package/index.js.map +1 -1
  134. package/inspector_modules.d.ts +11 -0
  135. package/inspector_modules.js +111 -3
  136. package/inspector_modules.js.map +1 -1
  137. package/js-libs/easysax/easysax.js +5 -3
  138. package/media-query-list/index.js +7 -17
  139. package/media-query-list/index.js.map +1 -1
  140. package/module-name-resolver/helpers.d.ts +14 -0
  141. package/module-name-resolver/helpers.js +27 -0
  142. package/module-name-resolver/helpers.js.map +1 -0
  143. package/module-name-resolver/index.d.ts +12 -22
  144. package/module-name-resolver/index.js +6 -18
  145. package/module-name-resolver/index.js.map +1 -1
  146. package/module-name-resolver/non-bundle-workflow-compat.js +32 -23
  147. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  148. package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
  149. package/module-name-resolver/qualifier-matcher/index.js +5 -5
  150. package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
  151. package/package.json +5 -2
  152. package/platform/device/index.android.js +2 -2
  153. package/platform/device/index.android.js.map +1 -1
  154. package/platform/screen/index.android.js +2 -2
  155. package/platform/screen/index.android.js.map +1 -1
  156. package/platform/screen/index.ios.js +2 -2
  157. package/platform/screen/index.ios.js.map +1 -1
  158. package/profiling/index.js +2 -1
  159. package/profiling/index.js.map +1 -1
  160. package/ui/action-bar/action-bar-common.js +4 -2
  161. package/ui/action-bar/action-bar-common.js.map +1 -1
  162. package/ui/action-bar/index.android.js +7 -6
  163. package/ui/action-bar/index.android.js.map +1 -1
  164. package/ui/action-bar/index.ios.js +10 -11
  165. package/ui/action-bar/index.ios.js.map +1 -1
  166. package/ui/activity-indicator/index.ios.js +3 -4
  167. package/ui/activity-indicator/index.ios.js.map +1 -1
  168. package/ui/animation/animation-common.d.ts +4 -4
  169. package/ui/animation/animation-common.js +2 -3
  170. package/ui/animation/animation-common.js.map +1 -1
  171. package/ui/animation/{animation-interfaces.d.ts → animation-shared.d.ts} +39 -31
  172. package/ui/animation/animation-shared.js +4 -0
  173. package/ui/animation/animation-shared.js.map +1 -0
  174. package/ui/animation/animation-types.d.ts +1 -0
  175. package/ui/animation/animation-types.js +3 -0
  176. package/ui/animation/animation-types.js.map +1 -0
  177. package/ui/animation/index.android.d.ts +1 -2
  178. package/ui/animation/index.android.js +5 -5
  179. package/ui/animation/index.android.js.map +1 -1
  180. package/ui/animation/index.d.ts +2 -138
  181. package/ui/animation/index.ios.d.ts +1 -2
  182. package/ui/animation/index.ios.js +3 -3
  183. package/ui/animation/index.ios.js.map +1 -1
  184. package/ui/animation/keyframe-animation.d.ts +67 -118
  185. package/ui/animation/keyframe-animation.js +2 -2
  186. package/ui/animation/keyframe-animation.js.map +1 -1
  187. package/ui/builder/binding-builder.d.ts +12 -15
  188. package/ui/builder/component-builder/index.js +5 -5
  189. package/ui/builder/component-builder/index.js.map +1 -1
  190. package/ui/builder/index.d.ts +179 -59
  191. package/ui/builder/index.js +450 -10
  192. package/ui/builder/index.js.map +1 -1
  193. package/ui/button/index.android.js +2 -1
  194. package/ui/button/index.android.js.map +1 -1
  195. package/ui/core/bindable/bindable-types.d.ts +37 -0
  196. package/ui/core/bindable/bindable-types.js +3 -0
  197. package/ui/core/bindable/bindable-types.js.map +1 -0
  198. package/ui/core/bindable/index.d.ts +2 -38
  199. package/ui/core/bindable/index.js +1 -2
  200. package/ui/core/bindable/index.js.map +1 -1
  201. package/ui/core/properties/index.d.ts +4 -37
  202. package/ui/core/properties/index.js +6 -35
  203. package/ui/core/properties/index.js.map +1 -1
  204. package/ui/core/properties/property-shared.d.ts +35 -0
  205. package/ui/core/properties/property-shared.js +16 -0
  206. package/ui/core/properties/property-shared.js.map +1 -0
  207. package/ui/core/view/index.android.d.ts +2 -2
  208. package/ui/core/view/index.android.js +13 -10
  209. package/ui/core/view/index.android.js.map +1 -1
  210. package/ui/core/view/index.d.ts +1 -61
  211. package/ui/core/view/index.ios.d.ts +3 -3
  212. package/ui/core/view/index.ios.js +11 -11
  213. package/ui/core/view/index.ios.js.map +1 -1
  214. package/ui/core/view/view-common.d.ts +19 -16
  215. package/ui/core/view/view-common.js +12 -14
  216. package/ui/core/view/view-common.js.map +1 -1
  217. package/ui/core/view/view-helper/index.ios.d.ts +2 -1
  218. package/ui/core/view/view-helper/index.ios.js +3 -4
  219. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  220. package/ui/core/view/view-helper/view-helper-common.js +1 -3
  221. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  222. package/ui/core/view/view-helper/view-helper-shared.d.ts +5 -0
  223. package/ui/core/view/view-helper/view-helper-shared.js +6 -0
  224. package/ui/core/view/view-helper/view-helper-shared.js.map +1 -0
  225. package/ui/core/view/view-interfaces.d.ts +54 -0
  226. package/ui/core/view/view-interfaces.js +2 -0
  227. package/ui/core/view/view-interfaces.js.map +1 -0
  228. package/ui/core/view-base/index.d.ts +22 -24
  229. package/ui/core/view-base/index.js +9 -30
  230. package/ui/core/view-base/index.js.map +1 -1
  231. package/ui/core/view-base/utils.d.ts +1 -0
  232. package/ui/core/view-base/utils.js +9 -0
  233. package/ui/core/view-base/utils.js.map +1 -0
  234. package/ui/dialogs/dialogs-common.js +3 -3
  235. package/ui/dialogs/dialogs-common.js.map +1 -1
  236. package/ui/dialogs/index.android.js +8 -7
  237. package/ui/dialogs/index.android.js.map +1 -1
  238. package/ui/dialogs/index.ios.js +2 -2
  239. package/ui/dialogs/index.ios.js.map +1 -1
  240. package/ui/embedding/index.android.d.ts +1 -1
  241. package/ui/embedding/index.d.ts +1 -1
  242. package/ui/frame/fragment.android.js +3 -2
  243. package/ui/frame/fragment.android.js.map +1 -1
  244. package/ui/frame/fragment.transitions.android.js.map +1 -1
  245. package/ui/frame/frame-common.d.ts +3 -3
  246. package/ui/frame/frame-common.js.map +1 -1
  247. package/ui/frame/{callbacks/fragment-callbacks.d.ts → frame-helper-for-android.d.ts} +20 -1
  248. package/ui/frame/{callbacks/fragment-callbacks.js → frame-helper-for-android.js} +52 -38
  249. package/ui/frame/frame-helper-for-android.js.map +1 -0
  250. package/ui/frame/frame-interfaces.d.ts +30 -4
  251. package/ui/frame/frame-interfaces.js.map +1 -1
  252. package/ui/frame/frame-stack.js.map +1 -1
  253. package/ui/frame/index.android.d.ts +21 -5
  254. package/ui/frame/index.android.js +296 -19
  255. package/ui/frame/index.android.js.map +1 -1
  256. package/ui/frame/index.d.ts +19 -60
  257. package/ui/frame/index.ios.d.ts +3 -2
  258. package/ui/frame/index.ios.js +5 -4
  259. package/ui/frame/index.ios.js.map +1 -1
  260. package/ui/gestures/gestures-common.d.ts +4 -273
  261. package/ui/gestures/gestures-common.js +3 -146
  262. package/ui/gestures/gestures-common.js.map +1 -1
  263. package/ui/gestures/gestures-types.d.ts +108 -0
  264. package/ui/gestures/gestures-types.js +40 -0
  265. package/ui/gestures/gestures-types.js.map +1 -0
  266. package/ui/gestures/index.android.d.ts +29 -1
  267. package/ui/gestures/index.android.js +4 -2
  268. package/ui/gestures/index.android.js.map +1 -1
  269. package/ui/gestures/index.d.ts +35 -0
  270. package/ui/gestures/index.ios.d.ts +35 -1
  271. package/ui/gestures/index.ios.js +3 -3
  272. package/ui/gestures/index.ios.js.map +1 -1
  273. package/ui/gestures/touch-manager.d.ts +1 -1
  274. package/ui/html-view/index.ios.js +3 -3
  275. package/ui/html-view/index.ios.js.map +1 -1
  276. package/ui/image/image-common.js +1 -1
  277. package/ui/image/image-common.js.map +1 -1
  278. package/ui/image/index.android.js +1 -1
  279. package/ui/image/index.android.js.map +1 -1
  280. package/ui/image-cache/index.ios.js +5 -11
  281. package/ui/image-cache/index.ios.js.map +1 -1
  282. package/ui/index.d.ts +10 -5
  283. package/ui/index.js +18 -3
  284. package/ui/index.js.map +1 -1
  285. package/ui/label/index.ios.js.map +1 -1
  286. package/ui/layouts/absolute-layout/absolute-layout-common.js +1 -1
  287. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
  288. package/ui/layouts/absolute-layout/index.android.js +1 -1
  289. package/ui/layouts/absolute-layout/index.android.js.map +1 -1
  290. package/ui/layouts/absolute-layout/index.d.ts +1 -1
  291. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  292. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +2 -1
  293. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  294. package/ui/layouts/flexbox-layout/index.android.js +1 -1
  295. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  296. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  297. package/ui/layouts/layout-base.android.js +2 -1
  298. package/ui/layouts/layout-base.android.js.map +1 -1
  299. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  300. package/ui/layouts/wrap-layout/index.android.js +1 -1
  301. package/ui/layouts/wrap-layout/index.android.js.map +1 -1
  302. package/ui/layouts/wrap-layout/index.d.ts +1 -1
  303. package/ui/layouts/wrap-layout/wrap-layout-common.js +1 -1
  304. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
  305. package/ui/list-view/index.android.d.ts +17 -1
  306. package/ui/list-view/index.android.js +402 -32
  307. package/ui/list-view/index.android.js.map +1 -1
  308. package/ui/list-view/index.d.ts +66 -1
  309. package/ui/list-view/index.ios.d.ts +24 -2
  310. package/ui/list-view/index.ios.js +385 -10
  311. package/ui/list-view/index.ios.js.map +1 -1
  312. package/ui/list-view/list-view-common.d.ts +15 -0
  313. package/ui/list-view/list-view-common.js +73 -1
  314. package/ui/list-view/list-view-common.js.map +1 -1
  315. package/ui/page/events.d.ts +6 -0
  316. package/ui/page/events.js +7 -0
  317. package/ui/page/events.js.map +1 -0
  318. package/ui/page/index.android.js +2 -1
  319. package/ui/page/index.android.js.map +1 -1
  320. package/ui/page/index.d.ts +1 -1
  321. package/ui/page/index.ios.js +4 -5
  322. package/ui/page/index.ios.js.map +1 -1
  323. package/ui/page/page-common.d.ts +3 -2
  324. package/ui/page/page-common.js +5 -4
  325. package/ui/page/page-common.js.map +1 -1
  326. package/ui/scroll-view/index.ios.js +3 -3
  327. package/ui/scroll-view/index.ios.js.map +1 -1
  328. package/ui/styling/background-common.js +0 -1
  329. package/ui/styling/background-common.js.map +1 -1
  330. package/ui/styling/background.android.d.ts +0 -6
  331. package/ui/styling/background.android.js +1 -53
  332. package/ui/styling/background.android.js.map +1 -1
  333. package/ui/styling/background.ios.js +2 -1
  334. package/ui/styling/background.ios.js.map +1 -1
  335. package/ui/styling/converters.d.ts +2 -2
  336. package/ui/styling/css-shadow.js.map +1 -1
  337. package/ui/styling/css-stroke.js.map +1 -1
  338. package/ui/styling/css-transform.d.ts +1 -1
  339. package/ui/styling/css-utils.js +1 -1
  340. package/ui/styling/css-utils.js.map +1 -1
  341. package/ui/styling/font.android.js +2 -2
  342. package/ui/styling/font.android.js.map +1 -1
  343. package/ui/styling/font.ios.js +10 -10
  344. package/ui/styling/font.ios.js.map +1 -1
  345. package/ui/styling/length-shared.d.ts +52 -0
  346. package/ui/styling/length-shared.js +173 -0
  347. package/ui/styling/length-shared.js.map +1 -0
  348. package/ui/styling/style/index.d.ts +1 -1
  349. package/ui/styling/style-properties.d.ts +58 -112
  350. package/ui/styling/style-properties.js +7 -93
  351. package/ui/styling/style-properties.js.map +1 -1
  352. package/ui/styling/style-scope.d.ts +85 -48
  353. package/ui/styling/style-scope.js +30 -36
  354. package/ui/styling/style-scope.js.map +1 -1
  355. package/ui/styling/styling-profile.d.ts +1 -0
  356. package/ui/styling/styling-profile.js +4 -0
  357. package/ui/styling/styling-profile.js.map +1 -0
  358. package/ui/styling/styling-shared.d.ts +3 -0
  359. package/ui/styling/styling-shared.js +6 -0
  360. package/ui/styling/styling-shared.js.map +1 -0
  361. package/ui/switch/index.ios.js +5 -5
  362. package/ui/switch/index.ios.js.map +1 -1
  363. package/ui/tab-view/index.android.js +6 -6
  364. package/ui/tab-view/index.android.js.map +1 -1
  365. package/ui/text-base/index.android.d.ts +1 -1
  366. package/ui/text-base/index.android.js +4 -4
  367. package/ui/text-base/index.android.js.map +1 -1
  368. package/ui/text-base/index.d.ts +1 -1
  369. package/ui/text-base/index.ios.js +5 -4
  370. package/ui/text-base/index.ios.js.map +1 -1
  371. package/ui/text-view/index.ios.js.map +1 -1
  372. package/ui/transition/fade-transition.ios.js +1 -1
  373. package/ui/transition/fade-transition.ios.js.map +1 -1
  374. package/ui/transition/index.ios.js +1 -1
  375. package/ui/transition/index.ios.js.map +1 -1
  376. package/ui/transition/modal-transition.ios.js +1 -1
  377. package/ui/transition/modal-transition.ios.js.map +1 -1
  378. package/ui/transition/page-transition.android.d.ts +1 -1
  379. package/ui/transition/page-transition.android.js +4 -4
  380. package/ui/transition/page-transition.android.js.map +1 -1
  381. package/ui/transition/page-transition.ios.js +1 -1
  382. package/ui/transition/page-transition.ios.js.map +1 -1
  383. package/ui/transition/shared-transition-helper.ios.js +1 -1
  384. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  385. package/ui/transition/shared-transition.js +2 -1
  386. package/ui/transition/shared-transition.js.map +1 -1
  387. package/ui/transition/slide-transition.ios.js +2 -2
  388. package/ui/transition/slide-transition.ios.js.map +1 -1
  389. package/utils/animation-helpers.d.ts +27 -0
  390. package/utils/animation-helpers.js +48 -0
  391. package/utils/animation-helpers.js.map +1 -0
  392. package/utils/common.d.ts +1 -38
  393. package/utils/common.js +2 -112
  394. package/utils/common.js.map +1 -1
  395. package/utils/debug-source.d.ts +19 -0
  396. package/utils/debug-source.js +78 -0
  397. package/utils/debug-source.js.map +1 -0
  398. package/utils/debug.js +1 -59
  399. package/utils/debug.js.map +1 -1
  400. package/utils/index.android.d.ts +3 -1
  401. package/utils/index.android.js +37 -11
  402. package/utils/index.android.js.map +1 -1
  403. package/utils/index.d.ts +2 -14
  404. package/utils/index.ios.d.ts +4 -1
  405. package/utils/index.ios.js +32 -5
  406. package/utils/index.ios.js.map +1 -1
  407. package/utils/layout-helper/index.android.js +4 -4
  408. package/utils/layout-helper/index.android.js.map +1 -1
  409. package/utils/layout-helper/index.d.ts +6 -4
  410. package/utils/layout-helper/index.ios.js +5 -5
  411. package/utils/layout-helper/index.ios.js.map +1 -1
  412. package/utils/layout-helper/layout-helper-common.d.ts +0 -9
  413. package/utils/layout-helper/layout-helper-common.js +1 -9
  414. package/utils/layout-helper/layout-helper-common.js.map +1 -1
  415. package/utils/layout-helper/layout-helper-shared.d.ts +9 -0
  416. package/utils/layout-helper/layout-helper-shared.js +13 -0
  417. package/utils/layout-helper/layout-helper-shared.js.map +1 -0
  418. package/utils/{android/index.d.ts → native-helper-for-android.d.ts} +4 -2
  419. package/utils/native-helper-for-android.js +273 -0
  420. package/utils/native-helper-for-android.js.map +1 -0
  421. package/utils/native-helper.android.d.ts +29 -5
  422. package/utils/native-helper.android.js +18 -131
  423. package/utils/native-helper.android.js.map +1 -1
  424. package/utils/native-helper.d.ts +206 -258
  425. package/utils/native-helper.ios.d.ts +72 -3
  426. package/utils/native-helper.ios.js +250 -3
  427. package/utils/native-helper.ios.js.map +1 -1
  428. package/utils/shared.d.ts +17 -0
  429. package/utils/shared.js +40 -0
  430. package/utils/shared.js.map +1 -0
  431. package/utils/utils-shared.d.ts +1 -0
  432. package/utils/utils-shared.js +8 -0
  433. package/utils/utils-shared.js.map +1 -0
  434. package/xhr/index.js +12 -13
  435. package/xhr/index.js.map +1 -1
  436. package/xml/index.d.ts +94 -98
  437. package/xml/index.js +58 -2
  438. package/xml/index.js.map +1 -1
  439. package/accessibility/accessibility-css-helper.d.ts +0 -1
  440. package/accessibility/accessibility-css-helper.js +0 -101
  441. package/accessibility/accessibility-css-helper.js.map +0 -1
  442. package/accessibility/accessibility-service-common.d.ts +0 -8
  443. package/accessibility/accessibility-service-common.js +0 -26
  444. package/accessibility/accessibility-service-common.js.map +0 -1
  445. package/accessibility/accessibility-service.android.d.ts +0 -6
  446. package/accessibility/accessibility-service.android.js +0 -103
  447. package/accessibility/accessibility-service.android.js.map +0 -1
  448. package/accessibility/accessibility-service.d.ts +0 -10
  449. package/accessibility/accessibility-service.ios.d.ts +0 -6
  450. package/accessibility/accessibility-service.ios.js +0 -61
  451. package/accessibility/accessibility-service.ios.js.map +0 -1
  452. package/accessibility/accessibility-types.d.ts +0 -224
  453. package/accessibility/accessibility-types.js +0 -222
  454. package/accessibility/accessibility-types.js.map +0 -1
  455. package/accessibility/font-scale-common.d.ts +0 -7
  456. package/accessibility/font-scale-common.js +0 -14
  457. package/accessibility/font-scale-common.js.map +0 -1
  458. package/accessibility/font-scale.android.d.ts +0 -5
  459. package/accessibility/font-scale.android.js +0 -55
  460. package/accessibility/font-scale.android.js.map +0 -1
  461. package/accessibility/font-scale.d.ts +0 -9
  462. package/accessibility/font-scale.ios.d.ts +0 -5
  463. package/accessibility/font-scale.ios.js +0 -89
  464. package/accessibility/font-scale.ios.js.map +0 -1
  465. package/accessibility/index.android.d.ts +0 -10
  466. package/accessibility/index.android.js +0 -577
  467. package/accessibility/index.android.js.map +0 -1
  468. package/accessibility/index.ios.d.ts +0 -9
  469. package/accessibility/index.ios.js +0 -229
  470. package/accessibility/index.ios.js.map +0 -1
  471. package/css/package.json +0 -36
  472. package/css-value/package.json +0 -23
  473. package/debugger/dom-node.d.ts +0 -27
  474. package/debugger/dom-node.js.map +0 -1
  475. package/ui/animation/animation-interfaces.js.map +0 -1
  476. package/ui/builder/xml2ui.d.ts +0 -134
  477. package/ui/builder/xml2ui.js +0 -397
  478. package/ui/builder/xml2ui.js.map +0 -1
  479. package/ui/frame/callbacks/activity-callbacks.d.ts +0 -19
  480. package/ui/frame/callbacks/activity-callbacks.js +0 -301
  481. package/ui/frame/callbacks/activity-callbacks.js.map +0 -1
  482. package/ui/frame/callbacks/fragment-callbacks.js.map +0 -1
  483. package/utils/android/index.js +0 -160
  484. package/utils/android/index.js.map +0 -1
  485. package/utils/ios/index.d.ts +0 -39
  486. package/utils/ios/index.js +0 -229
  487. package/utils/ios/index.js.map +0 -1
@@ -1,138 +1,25 @@
1
- import * as AndroidUtils from './android';
2
1
  import { platformCheck } from './platform-check';
3
- import { numberHasDecimals, numberIs64Bit } from './types';
4
- export function dataDeserialize(nativeData) {
5
- if (nativeData === null || typeof nativeData !== 'object') {
6
- return nativeData;
7
- }
8
- let store;
9
- switch (nativeData.getClass().getName()) {
10
- case 'java.lang.String': {
11
- return String(nativeData);
12
- }
13
- case 'java.lang.Boolean': {
14
- return String(nativeData) === 'true';
15
- }
16
- case 'java.lang.Float':
17
- case 'java.lang.Integer':
18
- case 'java.lang.Long':
19
- case 'java.lang.Double':
20
- case 'java.lang.Short': {
21
- return Number(nativeData);
22
- }
23
- case 'org.json.JSONArray': {
24
- store = [];
25
- for (let j = 0; j < nativeData.length(); j++) {
26
- store[j] = dataDeserialize(nativeData.get(j));
27
- }
28
- break;
29
- }
30
- case 'org.json.JSONObject': {
31
- store = {};
32
- const i = nativeData.keys();
33
- let key;
34
- while (i.hasNext()) {
35
- key = i.next();
36
- store[key] = dataDeserialize(nativeData.get(key));
37
- }
38
- break;
39
- }
40
- case 'androidx.collection.SimpleArrayMap': {
41
- const count = nativeData.size();
42
- for (let l = 0; l < count; l++) {
43
- const key = nativeData.keyAt(l);
44
- store[key] = dataDeserialize(nativeData.get(key));
45
- }
46
- break;
47
- }
48
- case 'androidx.collection.ArrayMap':
49
- case 'android.os.Bundle':
50
- case 'java.util.HashMap':
51
- case 'java.util.Map': {
52
- store = {};
53
- const keys = nativeData.keySet().toArray();
54
- for (let k = 0; k < keys.length; k++) {
55
- const key = keys[k];
56
- store[key] = dataDeserialize(nativeData.get(key));
57
- }
58
- break;
59
- }
60
- default:
61
- if (typeof nativeData === 'object' && nativeData instanceof java.util.List) {
62
- const array = [];
63
- const size = nativeData.size();
64
- for (let i = 0, n = size; i < n; i++) {
65
- array[i] = dataDeserialize(nativeData.get(i));
66
- }
67
- store = array;
68
- }
69
- else {
70
- store = null;
71
- }
72
- break;
73
- }
74
- return store;
75
- }
76
- export function dataSerialize(data, wrapPrimitives) {
77
- let store;
78
- switch (typeof data) {
79
- case 'string':
80
- case 'boolean': {
81
- if (wrapPrimitives) {
82
- if (typeof data === 'string') {
83
- return new java.lang.String(data);
84
- }
85
- return new java.lang.Boolean(data);
86
- }
87
- return data;
88
- }
89
- case 'number': {
90
- const hasDecimals = numberHasDecimals(data);
91
- if (numberIs64Bit(data)) {
92
- if (hasDecimals) {
93
- return java.lang.Double.valueOf(data);
94
- }
95
- else {
96
- return java.lang.Long.valueOf(data);
97
- }
98
- }
99
- else {
100
- if (hasDecimals) {
101
- return java.lang.Float.valueOf(data);
102
- }
103
- else {
104
- return java.lang.Integer.valueOf(data);
105
- }
106
- }
107
- }
108
- case 'object': {
109
- if (!data) {
110
- return null;
111
- }
112
- if (data instanceof Date) {
113
- return new java.util.Date(data.getTime());
114
- }
115
- if (Array.isArray(data)) {
116
- store = new java.util.ArrayList();
117
- data.forEach((item) => store.add(dataSerialize(item, wrapPrimitives)));
118
- return store;
119
- }
120
- if (data.native) {
121
- return data.native;
122
- }
123
- store = new java.util.HashMap();
124
- Object.keys(data).forEach((key) => store.put(key, dataSerialize(data[key], wrapPrimitives)));
125
- return store;
126
- }
127
- default:
128
- return null;
129
- }
130
- }
131
- export var android = AndroidUtils;
2
+ // importing this helper as a separate file avoids "android" symbol clash with the global android object
3
+ import { resources, collections, getWindow, getApplication, getCurrentActivity, getApplicationContext, getResources, getPackageName, getInputMethodManager, showSoftInput, dismissSoftInput } from './native-helper-for-android';
4
+ export { dataSerialize, dataDeserialize } from './native-helper-for-android';
5
+ export { getWindow } from './native-helper-for-android';
6
+ export const android = {
7
+ resources,
8
+ collections,
9
+ getApplication,
10
+ getCurrentActivity,
11
+ getApplicationContext,
12
+ getWindow,
13
+ getResources,
14
+ getPackageName,
15
+ getInputMethodManager,
16
+ showSoftInput,
17
+ dismissSoftInput,
18
+ };
132
19
  /**
133
20
  * @deprecated Use `Utils.android` instead.
134
21
  */
135
- export var ad = AndroidUtils;
22
+ export const ad = android;
136
23
  // these don't exist on Android.Stub them to empty functions.
137
24
  export const iOSNativeHelper = platformCheck('Utils.iOSNativeHelper');
138
25
  export const ios = platformCheck('Utils.ios');
@@ -1 +1 @@
1
- {"version":3,"file":"native-helper.android.js","sourceRoot":"","sources":["../../../../packages/core/utils/native-helper.android.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE3D,MAAM,UAAU,eAAe,CAAC,UAAgB;IAC/C,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,IAAI,KAAK,CAAC;IAEV,QAAQ,UAAU,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;QACzC,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACzB,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;QAC3B,CAAC;QAED,KAAK,mBAAmB,CAAC,CAAC,CAAC;YAC1B,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,MAAM,CAAC;QACtC,CAAC;QAED,KAAK,iBAAiB,CAAC;QACvB,KAAK,mBAAmB,CAAC;QACzB,KAAK,gBAAgB,CAAC;QACtB,KAAK,kBAAkB,CAAC;QACxB,KAAK,iBAAiB,CAAC,CAAC,CAAC;YACxB,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;QAC3B,CAAC;QAED,KAAK,oBAAoB,CAAC,CAAC,CAAC;YAC3B,KAAK,GAAG,EAAE,CAAC;YACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC9C,KAAK,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;YACD,MAAM;QACP,CAA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,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;YAC7F,OAAO,KAAK,CAAC;QACd,CAAC;QAED;YACC,OAAO,IAAI,CAAC;IACd,CAAC;AACF,CAAC;AAED,MAAM,KAAQ,OAAO,GAAG,YAAY,CAAC;AAErC;;GAEG;AACH,MAAM,KAAQ,EAAE,GAAG,YAAY,CAAC;AAEhC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAC;AACtE,MAAM,CAAC,MAAM,GAAG,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"native-helper.android.js","sourceRoot":"","sources":["../../../../packages/core/utils/native-helper.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,wGAAwG;AACxG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACjO,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE7E,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,SAAS;IACT,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,qBAAqB;IACrB,SAAS;IACT,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,aAAa;IACb,gBAAgB;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC;AAE1B,6DAA6D;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAC;AACtE,MAAM,CAAC,MAAM,GAAG,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC"}
@@ -9,272 +9,220 @@ export function dataSerialize(data?: any, wrapPrimitives?: boolean): any;
9
9
  */
10
10
  export function dataDeserialize(nativeData?: any): any;
11
11
 
12
- // /**
13
- // * Module with android specific utilities.
14
- // */
15
- // declare namespace AndroidUtils {
16
- // /**
17
- // * Gets the native Android application instance.
18
- // */
19
- // export function getApplication(): any; /* android.app.Application */
20
-
21
- // /**
22
- // * Get the current native Android activity.
23
- // */
24
- // export function getCurrentActivity(): any; /* android.app.Activity */
25
- // /**
26
- // * Gets the native Android application resources.
27
- // */
28
- // export function getResources(): any; /* android.content.res.Resources */
29
-
30
- // /**
31
- // * Gets the Android application context.
32
- // */
33
- // export function getApplicationContext(): any; /* android.content.Context */
34
-
35
- // /**
36
- // * Gets the native Android input method manager.
37
- // */
38
- // export function getInputMethodManager(): any; /* android.view.inputmethod.InputMethodManager */
39
-
40
- // /**
41
- // * Hides the soft input method, usually a soft keyboard.
42
- // */
43
- // export function dismissSoftInput(nativeView?: any /* android.view.View */): void;
44
-
45
- // /**
46
- // * Shows the soft input method, usually a soft keyboard.
47
- // */
48
- // export function showSoftInput(nativeView: any /* android.view.View */): void;
49
-
50
- // /**
51
- // * Utility module dealing with some android collections.
52
- // */
53
- // namespace collections {
54
- // /**
55
- // * Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html).
56
- // * @param str - An array of strings to convert.
57
- // */
58
- // export function stringArrayToStringSet(str: string[]): any;
59
-
60
- // /**
61
- // * Converts string hash set into array of strings.
62
- // * @param stringSet - A string hash set to convert.
63
- // */
64
- // export function stringSetToStringArray(stringSet: any): string[];
65
- // }
66
-
67
- // /**
68
- // * Utility module related to android resources.
69
- // */
70
- // export namespace resources {
71
- // /**
72
- // * Gets the drawable id from a given name.
73
- // * @param name - Name of the resource.
74
- // */
75
- // export function getDrawableId(name);
76
-
77
- // /**
78
- // * Gets the string id from a given name.
79
- // * @param name - Name of the resource.
80
- // */
81
- // export function getStringId(name);
82
-
83
- // /**
84
- // * Gets the id from a given name.
85
- // * @param name - Name of the resource.
86
- // */
87
- // export function getId(name: string): number;
88
-
89
- // /**
90
- // * Gets the id from a given name with optional type.
91
- // * This sets an explicit package name.
92
- // * https://developer.android.com/reference/android/content/res/Resources#getIdentifier(java.lang.String,%20java.lang.String,%20java.lang.String)
93
- // * @param name - Name of the resource.
94
- // * @param type - (Optional) type
95
- // */
96
- // export function getResource(name: string, type?: string): number;
97
-
98
- // /**
99
- // * [Obsolete - please use getPaletteColor] Gets a color from current theme.
100
- // * @param name - Name of the color
101
- // */
102
- // export function getPalleteColor();
103
-
104
- // /**
105
- // * Gets a color from the current theme.
106
- // * @param name - Name of the color resource.
107
- // */
108
- // export function getPaletteColor(name: string, context: any /* android.content.Context */): number;
109
- // }
110
-
111
- // /**
112
- // * Checks whether the application is running on real device and not on emulator.
113
- // */
114
- // export function isRealDevice(): boolean;
115
- // }
116
-
117
- // /**
118
- // * Module with ios specific utilities.
119
- // */
120
- // declare namespace iOSUtils {
121
- // // Common properties between UILabel, UITextView and UITextField
122
- // export interface TextUIView {
123
- // font: any;
124
- // textAlignment: number;
125
- // textColor: any;
126
- // text: string;
127
- // attributedText: any;
128
- // lineBreakMode: number;
129
- // numberOfLines: number;
130
- // }
131
-
132
- // /**
133
- // * Utility module dealing with some iOS collections.
134
- // */
135
- // export namespace collections {
136
- // /**
137
- // * Converts JavaScript array to [NSArray](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/).
138
- // * @param str - JavaScript string array to convert.
139
- // */
140
- // export function jsArrayToNSArray<T>(str: T[]): NSArray<T>;
141
-
142
- // /**
143
- // * Converts NSArray to JavaScript array.
144
- // * @param a - NSArray to convert.
145
- // */
146
- // export function nsArrayToJSArray<T>(a: NSArray<T>): T[];
147
- // }
148
-
149
- // /**
150
- // * Get the root UIViewController of the app
151
- // */
152
- // export function getRootViewController(): any; /* UIViewController */
153
-
154
- // /**
155
- // * Get the UIWindow of the app
156
- // */
157
- // export function getWindow(): any; /* UIWindow */
158
-
159
- // /**
160
- // * Set the window background color of base view of the app.
161
- // * Often this is shown when opening a modal as the view underneath scales down revealing the window color.
162
- // * @param value color (hex, rgb, rgba, etc.)
163
- // */
164
- // export function setWindowBackgroundColor(value: string): void;
165
-
166
- // /**
167
- // * Data serialize and deserialize helpers
168
- // */
169
- // export function dataSerialize(data?: any): any;
170
- // export function dataDeserialize(nativeData?: any): any;
171
-
172
- // /**
173
- // * @deprecated use application.orientation instead
174
- // *
175
- // * Gets an information about if current mode is Landscape.
176
- // */
177
- // export function isLandscape(): boolean;
178
-
179
- // /**
180
- // * Gets the iOS device major version (for 8.1 will return 8).
181
- // */
182
- // export const MajorVersion: number;
183
-
184
- // /**
185
- // * Opens file with associated application.
186
- // * @param filePath The file path.
187
- // */
188
- // export function openFile(filePath: string): boolean;
189
-
190
- // /**
191
- // * Joins an array of file paths.
192
- // * @param paths An array of paths.
193
- // * Returns the joined path.
194
- // */
195
- // export function joinPaths(...paths: string[]): string;
196
-
197
- // /**
198
- // * Gets the root folder for the current application. This Folder is private for the application and not accessible from Users/External apps.
199
- // * iOS - this folder is read-only and contains the app and all its resources.
200
- // */
201
- // export function getCurrentAppPath(): string;
202
-
203
- // /**
204
- // * Gets the currently visible(topmost) UIViewController.
205
- // * @param rootViewController The root UIViewController instance to start searching from (normally window.rootViewController).
206
- // * Returns the visible UIViewController.
207
- // */
208
- // export function getVisibleViewController(rootViewController: any /* UIViewController*/): any; /* UIViewController*/
209
-
210
- // /**
211
- // *
212
- // * @param transform Applies a rotation transform over X,Y and Z axis
213
- // * @param x Rotation over X axis in degrees
214
- // * @param y Rotation over Y axis in degrees
215
- // * @param z Rotation over Z axis in degrees
216
- // */
217
- // export function applyRotateTransform(transform: any /* CATransform3D*/, x: number, y: number, z: number): any; /* CATransform3D*/
218
-
219
- // /**
220
- // * Create a UIDocumentInteractionControllerDelegate implementation for use with UIDocumentInteractionController
221
- // */
222
- // export function createUIDocumentInteractionControllerDelegate(): any;
223
-
224
- // /**
225
- // * Checks whether the application is running on real device and not on simulator.
226
- // */
227
- // export function isRealDevice(): boolean;
228
-
229
- // /**
230
- // * Debug utility to insert CGRect values into logging output.
231
- // * Note: when printing a CGRect directly it will print blank so this helps show the values.
232
- // * @param rect CGRect
233
- // */
234
- // export function printCGRect(rect: CGRect): void;
235
-
236
- // /**
237
- // * Take a snapshot of a View on screen.
238
- // * @param view view to snapshot
239
- // * @param scale screen scale
240
- // */
241
- // export function snapshotView(view: UIView, scale: number): UIImage;
242
-
243
- // /**
244
- // * Copy layer properties from one view to another.
245
- // * @param view a view to copy layer properties to
246
- // * @param toView a view to copy later properties from
247
- // * @param (optional) custom properties to copy between both views
248
- // */
249
- // export function copyLayerProperties(view: UIView, toView: UIView, customProperties?: { view?: Array<string> /* Array<keyof UIView> */; layer?: Array<string> /* Array<keyof CALayer> */ }): void;
12
+ /**
13
+ * Checks whether the application is running on real device and not on emulator.
14
+ */
15
+ export function isRealDevice(): boolean;
250
16
 
251
- // /**
252
- // * Animate views with a configurable spring effect
253
- // * @param options various animation settings for the spring
254
- // * - tension: number
255
- // * - friction: number
256
- // * - mass: number
257
- // * - delay: number
258
- // * - velocity: number
259
- // * - animateOptions: UIViewAnimationOptions
260
- // * - animations: () => void, Callback containing the property changes you want animated
261
- // * - completion: (finished: boolean) => void, Callback when animation is finished
262
- // */
263
- // export function animateWithSpring(options?: { tension?: number; friction?: number; mass?: number; delay?: number; velocity?: number; animateOptions?: UIViewAnimationOptions; animations?: () => void; completion?: (finished?: boolean) => void });
264
- // }
17
+ type NativeWindow = android.view.Window | UIWindow;
18
+ /**
19
+ * Get the UIWindow or android.view.Window of the app
20
+ */
21
+ export function getWindow<T extends NativeWindow>(): T;
265
22
 
266
- import * as AndroidUtils from './android';
267
- export import android = AndroidUtils;
23
+ /**
24
+ * Utilities related to Android.
25
+ */
26
+ export const android: {
27
+ /**
28
+ * Utilities related to Android resources.
29
+ */
30
+ resources: {
31
+ /**
32
+ * Gets the drawable id from a given name.
33
+ * @param name - Name of the resource.
34
+ */
35
+ getDrawableId: (name) => number;
36
+ /**
37
+ * Gets the string id from a given name.
38
+ * @param name - Name of the resource.
39
+ */
40
+ getStringId: (name) => number;
41
+ /**
42
+ * Gets the id from a given name.
43
+ * @param name - Name of the resource.
44
+ */
45
+ getId: (name: string) => number;
46
+ /**
47
+ * Gets the id from a given name with optional type.
48
+ * This sets an explicit package name.
49
+ * https://developer.android.com/reference/android/content/res/Resources#getIdentifier(java.lang.String,%20java.lang.String,%20java.lang.String)
50
+ * @param name - Name of the resource.
51
+ * @param type - (Optional) type
52
+ */
53
+ getResource: (name: string, type?: string) => number;
54
+ /**
55
+ * Gets a color from the current theme.
56
+ * @param name - Name of the color resource.
57
+ * @param context - Context to resolve the color.
58
+ */
59
+ getPaletteColor: (name: string, context: android.content.Context) => number;
60
+ };
61
+ /**
62
+ * Utilities related to Android collections.
63
+ */
64
+ collections: {
65
+ /**
66
+ * Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html).
67
+ * @param str - An array of strings to convert.
68
+ */
69
+ stringArrayToStringSet(str: string[]): java.util.HashSet<string>;
70
+ /**
71
+ * Converts string hash set into array of strings.
72
+ * @param stringSet - A string hash set to convert.
73
+ */
74
+ stringSetToStringArray(stringSet: any): string[];
75
+ };
76
+ /**
77
+ * @deprecated Use `Utils.getWindow<android.view.Window>()` instead.
78
+ * @returns application window.
79
+ */
80
+ getWindow: () => android.view.Window;
81
+ /**
82
+ * Gets the native Android application instance.
83
+ */
84
+ getApplication: () => android.app.Application;
85
+ /**
86
+ * Get the current native Android activity.
87
+ */
88
+ getCurrentActivity: () => androidx.appcompat.app.AppCompatActivity | android.app.Activity | null;
89
+ /**
90
+ * Gets the Android application context.
91
+ */
92
+ getApplicationContext: () => android.content.Context;
93
+ /**
94
+ * Gets the native Android application resources.
95
+ */
96
+ getResources: () => android.content.res.Resources;
97
+ getPackageName: () => string;
98
+ /**
99
+ * Gets the native Android input method manager.
100
+ */
101
+ getInputMethodManager: () => android.view.inputmethod.InputMethodManager;
102
+ /**
103
+ * Shows the soft input method, usually a soft keyboard.
104
+ */
105
+ showSoftInput: (nativeView: android.view.View) => void;
106
+ /**
107
+ * Hides the soft input method, usually a soft keyboard.
108
+ */
109
+ dismissSoftInput: (nativeView?: android.view.View) => void;
110
+ };
268
111
 
269
112
  /**
270
113
  * @deprecated use Utils.android instead.
271
114
  */
272
- export import ad = AndroidUtils;
115
+ export const ad = android;
273
116
 
274
- import * as iOSUtils from './ios';
275
- export import ios = iOSUtils;
117
+ /**
118
+ * Utilities related to iOS.
119
+ */
120
+ export const ios: {
121
+ /**
122
+ * Utilities related to iOS collections.
123
+ */
124
+ collections: {
125
+ /**
126
+ * Converts JavaScript array to [NSArray](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/).
127
+ * @param str - JavaScript string array to convert.
128
+ */
129
+ jsArrayToNSArray<T>(str: T[]): NSArray<T>;
130
+ /**
131
+ * Converts NSArray to JavaScript array.
132
+ * @param a - NSArray to convert.
133
+ */
134
+ nsArrayToJSArray<T>(a: NSArray<T>): Array<T>;
135
+ };
136
+ /**
137
+ * Create a UIDocumentInteractionControllerDelegate implementation for use with UIDocumentInteractionController
138
+ */
139
+ createUIDocumentInteractionControllerDelegate: () => NSObject;
140
+ /**
141
+ * @deprecated Use `Utils.getWindow<UIWindow>()` instead.
142
+ * @returns application window.
143
+ */
144
+ getWindow: () => UIWindow;
145
+ /**
146
+ * Gets the root folder for the current application. This Folder is private for the application and not accessible from Users/External apps.
147
+ * iOS - this folder is read-only and contains the app and all its resources.
148
+ */
149
+ getCurrentAppPath: () => string;
150
+ /**
151
+ * Get the root UIViewController of the app
152
+ */
153
+ getRootViewController: () => UIViewController;
154
+ /**
155
+ * Gets the currently visible(topmost) UIViewController.
156
+ * @param rootViewController The root UIViewController instance to start searching from (normally window.rootViewController).
157
+ * Returns the visible UIViewController.
158
+ */
159
+ getVisibleViewController: (rootViewController: UIViewController) => UIViewController;
160
+ getMainScreen: () => UIScreen;
161
+ /**
162
+ * Set the window background color of base view of the app.
163
+ * Often this is the view shown behind opening a modal, eg: a modal scales down revealing the window color.
164
+ * @param value color (hex, rgb, rgba, etc.)
165
+ */
166
+ setWindowBackgroundColor: (value: string) => void;
167
+ /**
168
+ * @deprecated use Application.orientation instead
169
+ *
170
+ * Gets an information about if current mode is Landscape.
171
+ */
172
+ isLandscape: () => boolean;
173
+ /**
174
+ * Take a snapshot of a View on screen.
175
+ * @param view view to snapshot
176
+ * @param scale screen scale
177
+ */
178
+ snapshotView: (view: UIView, scale: number) => UIImage;
179
+ /**
180
+ * Applies a rotation transform over X,Y and Z axis
181
+ * @param transform Applies a rotation transform over X,Y and Z axis
182
+ * @param x Rotation over X axis in degrees
183
+ * @param y Rotation over Y axis in degrees
184
+ * @param z Rotation over Z axis in degrees
185
+ */
186
+ applyRotateTransform: (transform: CATransform3D, x: number, y: number, z: number) => CATransform3D;
187
+ /**
188
+ * Debug utility to insert CGRect values into logging output.
189
+ * Note: when printing a CGRect directly it will print blank so this helps show the values.
190
+ * @param rect CGRect
191
+ */
192
+ printCGRect: (rect: CGRect) => void;
193
+ /**
194
+ * Copy layer properties from one view to another.
195
+ * @param view a view to copy layer properties to
196
+ * @param toView a view to copy later properties from
197
+ * @param (optional) custom properties to copy between both views
198
+ */
199
+ copyLayerProperties: (view: UIView, toView: UIView, customProperties?: { view?: Array<keyof UIView>; layer?: Array<keyof CALayer> }) => void;
200
+ /**
201
+ * Animate views with a configurable spring effect
202
+ * @param options various animation settings for the spring
203
+ * - tension: number
204
+ * - friction: number
205
+ * - mass: number
206
+ * - delay: number
207
+ * - velocity: number
208
+ * - animateOptions: UIViewAnimationOptions
209
+ * - animations: () => void, Callback containing the property changes you want animated
210
+ * - completion: (finished: boolean) => void, Callback when animation is finished
211
+ */
212
+ animateWithSpring: (options?: { tension?: number; friction?: number; mass?: number; delay?: number; velocity?: number; animateOptions?: UIViewAnimationOptions; animations?: () => void; completion?: (finished?: boolean) => void }) => void;
213
+ /**
214
+ * Joins an array of file paths.
215
+ * @param paths An array of paths.
216
+ * Returns the joined path.
217
+ */
218
+ joinPaths: (...paths: string[]) => string;
219
+ /**
220
+ * @deprecated use Utils.SDK_VERSION instead which is a float of the {major}.{minor} verison
221
+ */
222
+ MajorVersion: number;
223
+ };
276
224
 
277
225
  /**
278
226
  * @deprecated use Utils.ios instead.
279
227
  */
280
- export import iOSNativeHelper = iOSUtils;
228
+ export const iOSNativeHelper = ios;