@nativescript/core 9.0.0-alpha.1 → 9.0.0-alpha.3

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 (468) 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 +17 -11
  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 -55
  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 +40 -0
  22. package/application/helpers-common.js +119 -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/cli-hooks/{before-checkForChanges.js → before-checkForChanges.mjs} +6 -6
  34. package/cli-hooks/postinstall.mjs +7 -0
  35. package/cli-hooks/preuninstall.mjs +7 -0
  36. package/color/color-common.d.ts +18 -19
  37. package/color/color-common.js +13 -14
  38. package/color/color-common.js.map +1 -1
  39. package/color/color-types.d.ts +49 -0
  40. package/color/color-types.js +3 -0
  41. package/color/color-types.js.map +1 -0
  42. package/color/index.ios.d.ts +2 -1
  43. package/color/index.ios.js.map +1 -1
  44. package/connectivity/index.android.js +5 -4
  45. package/connectivity/index.android.js.map +1 -1
  46. package/core-types/animation-types.d.ts +11 -0
  47. package/{ui/animation/animation-interfaces.js → core-types/animation-types.js} +1 -1
  48. package/core-types/animation-types.js.map +1 -0
  49. package/core-types/index.d.ts +1 -1
  50. package/core-types/index.js +2 -2
  51. package/core-types/index.js.map +1 -1
  52. package/core-types/validators.d.ts +2 -0
  53. package/core-types/validators.js +18 -0
  54. package/core-types/validators.js.map +1 -0
  55. package/css/css-tree-parser.js +17 -21
  56. package/css/lib/parse/index.d.ts +1 -0
  57. package/css/lib/parse/index.js +475 -577
  58. package/css/lib/parse/index.js.map +1 -0
  59. package/css/reworkcss.d.ts +25 -28
  60. package/css/reworkcss.js +5 -1
  61. package/css/reworkcss.js.map +1 -0
  62. package/css-mediaquery/index.js +1 -1
  63. package/css-mediaquery/index.js.map +1 -1
  64. package/css-value/reworkcss-value.d.ts +31 -8
  65. package/css-value/reworkcss-value.js +89 -111
  66. package/css-value/reworkcss-value.js.map +1 -0
  67. package/debugger/devtools-elements-interfaces.d.ts +1 -1
  68. package/debugger/devtools-elements.common.js +17 -8
  69. package/debugger/devtools-elements.common.js.map +1 -1
  70. package/debugger/devtools-elements.js +1 -1
  71. package/debugger/devtools-elements.js.map +1 -1
  72. package/debugger/dom-types.d.ts +24 -0
  73. package/debugger/{dom-node.js → dom-types.js} +11 -9
  74. package/debugger/dom-types.js.map +1 -0
  75. package/debugger/webinspector-css.d.ts +18 -18
  76. package/debugger/webinspector-css.js +1 -1
  77. package/debugger/webinspector-css.js.map +1 -1
  78. package/debugger/webinspector-dom.d.ts +15 -15
  79. package/debugger/webinspector-dom.js +1 -1
  80. package/debugger/webinspector-dom.js.map +1 -1
  81. package/debugger/webinspector-network.android.d.ts +9 -9
  82. package/debugger/webinspector-network.android.js +3 -3
  83. package/debugger/webinspector-network.android.js.map +1 -1
  84. package/debugger/webinspector-network.ios.d.ts +9 -9
  85. package/debugger/webinspector-network.ios.js +1 -1
  86. package/debugger/webinspector-network.ios.js.map +1 -1
  87. package/fetch/index.d.ts +72 -0
  88. package/fetch/index.js +448 -458
  89. package/fetch/index.js.map +1 -0
  90. package/file-system/file-system-access.android.js +32 -39
  91. package/file-system/file-system-access.android.js.map +1 -1
  92. package/file-system/file-system-access.ios.js +5 -17
  93. package/file-system/file-system-access.ios.js.map +1 -1
  94. package/file-system/index.d.ts +2 -2
  95. package/file-system/index.js +4 -11
  96. package/file-system/index.js.map +1 -1
  97. package/globals/index.js +47 -16
  98. package/globals/index.js.map +1 -1
  99. package/http/http-interfaces.d.ts +84 -0
  100. package/http/http-interfaces.js +6 -0
  101. package/http/http-interfaces.js.map +1 -0
  102. package/http/http-request/http-request-common.js +2 -2
  103. package/http/http-request/http-request-common.js.map +1 -1
  104. package/http/http-request/index.android.d.ts +3 -7
  105. package/http/http-request/index.android.js +6 -22
  106. package/http/http-request/index.android.js.map +1 -1
  107. package/http/http-request/index.d.ts +5 -1
  108. package/http/http-request/index.ios.d.ts +3 -7
  109. package/http/http-request/index.ios.js +6 -22
  110. package/http/http-request/index.ios.js.map +1 -1
  111. package/http/http-shared.d.ts +5 -0
  112. package/http/http-shared.js +14 -0
  113. package/http/http-shared.js.map +1 -0
  114. package/http/index.d.ts +6 -105
  115. package/http/index.js +10 -12
  116. package/http/index.js.map +1 -1
  117. package/image-source/index.android.d.ts +1 -1
  118. package/image-source/index.android.js +5 -23
  119. package/image-source/index.android.js.map +1 -1
  120. package/image-source/index.ios.js +2 -9
  121. package/image-source/index.ios.js.map +1 -1
  122. package/index.d.ts +12 -8
  123. package/index.js +6 -3
  124. package/index.js.map +1 -1
  125. package/inspector_modules.d.ts +3 -0
  126. package/inspector_modules.js +6 -3
  127. package/inspector_modules.js.map +1 -1
  128. package/js-libs/easysax/easysax.js +5 -3
  129. package/media-query-list/index.js +7 -17
  130. package/media-query-list/index.js.map +1 -1
  131. package/module-name-resolver/helpers.d.ts +14 -0
  132. package/module-name-resolver/helpers.js +27 -0
  133. package/module-name-resolver/helpers.js.map +1 -0
  134. package/module-name-resolver/index.d.ts +2 -11
  135. package/module-name-resolver/index.js +6 -18
  136. package/module-name-resolver/index.js.map +1 -1
  137. package/module-name-resolver/non-bundle-workflow-compat.js +32 -23
  138. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  139. package/package.json +9 -8
  140. package/platform/device/index.android.js +2 -2
  141. package/platform/device/index.android.js.map +1 -1
  142. package/platform/screen/index.android.js +2 -2
  143. package/platform/screen/index.android.js.map +1 -1
  144. package/platform/screen/index.ios.js +2 -2
  145. package/platform/screen/index.ios.js.map +1 -1
  146. package/profiling/index.js +6 -1
  147. package/profiling/index.js.map +1 -1
  148. package/ui/action-bar/action-bar-common.js +4 -2
  149. package/ui/action-bar/action-bar-common.js.map +1 -1
  150. package/ui/action-bar/index.android.js +7 -6
  151. package/ui/action-bar/index.android.js.map +1 -1
  152. package/ui/action-bar/index.ios.js +10 -11
  153. package/ui/action-bar/index.ios.js.map +1 -1
  154. package/ui/activity-indicator/index.ios.js +3 -4
  155. package/ui/activity-indicator/index.ios.js.map +1 -1
  156. package/ui/animation/animation-common.d.ts +4 -4
  157. package/ui/animation/animation-common.js +2 -3
  158. package/ui/animation/animation-common.js.map +1 -1
  159. package/ui/animation/{animation-interfaces.d.ts → animation-shared.d.ts} +39 -31
  160. package/ui/animation/animation-shared.js +4 -0
  161. package/ui/animation/animation-shared.js.map +1 -0
  162. package/ui/animation/animation-types.d.ts +1 -0
  163. package/ui/animation/animation-types.js +3 -0
  164. package/ui/animation/animation-types.js.map +1 -0
  165. package/ui/animation/index.android.d.ts +1 -2
  166. package/ui/animation/index.android.js +5 -5
  167. package/ui/animation/index.android.js.map +1 -1
  168. package/ui/animation/index.d.ts +2 -138
  169. package/ui/animation/index.ios.d.ts +1 -2
  170. package/ui/animation/index.ios.js +3 -3
  171. package/ui/animation/index.ios.js.map +1 -1
  172. package/ui/animation/keyframe-animation.d.ts +67 -118
  173. package/ui/animation/keyframe-animation.js +2 -2
  174. package/ui/animation/keyframe-animation.js.map +1 -1
  175. package/ui/builder/component-builder/index.js +2 -2
  176. package/ui/builder/component-builder/index.js.map +1 -1
  177. package/ui/builder/index.js +415 -3
  178. package/ui/builder/index.js.map +1 -1
  179. package/ui/button/index.android.js +2 -1
  180. package/ui/button/index.android.js.map +1 -1
  181. package/ui/core/bindable/bindable-types.d.ts +37 -0
  182. package/ui/core/bindable/bindable-types.js +3 -0
  183. package/ui/core/bindable/bindable-types.js.map +1 -0
  184. package/ui/core/bindable/index.d.ts +2 -38
  185. package/ui/core/bindable/index.js +1 -2
  186. package/ui/core/bindable/index.js.map +1 -1
  187. package/ui/core/properties/index.d.ts +3 -37
  188. package/ui/core/properties/index.js +4 -35
  189. package/ui/core/properties/index.js.map +1 -1
  190. package/ui/core/properties/property-shared.d.ts +35 -0
  191. package/ui/core/properties/property-shared.js +16 -0
  192. package/ui/core/properties/property-shared.js.map +1 -0
  193. package/ui/core/view/index.android.d.ts +2 -2
  194. package/ui/core/view/index.android.js +12 -10
  195. package/ui/core/view/index.android.js.map +1 -1
  196. package/ui/core/view/index.d.ts +1 -61
  197. package/ui/core/view/index.ios.d.ts +3 -3
  198. package/ui/core/view/index.ios.js +9 -9
  199. package/ui/core/view/index.ios.js.map +1 -1
  200. package/ui/core/view/view-common.d.ts +19 -16
  201. package/ui/core/view/view-common.js +12 -14
  202. package/ui/core/view/view-common.js.map +1 -1
  203. package/ui/core/view/view-helper/index.ios.d.ts +2 -1
  204. package/ui/core/view/view-helper/index.ios.js +3 -4
  205. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  206. package/ui/core/view/view-helper/view-helper-common.js +1 -3
  207. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  208. package/ui/core/view/view-helper/view-helper-shared.d.ts +5 -0
  209. package/ui/core/view/view-helper/view-helper-shared.js +6 -0
  210. package/ui/core/view/view-helper/view-helper-shared.js.map +1 -0
  211. package/ui/core/view/view-interfaces.d.ts +54 -0
  212. package/ui/core/view/view-interfaces.js +2 -0
  213. package/ui/core/view/view-interfaces.js.map +1 -0
  214. package/ui/core/view-base/index.d.ts +23 -25
  215. package/ui/core/view-base/index.js +9 -30
  216. package/ui/core/view-base/index.js.map +1 -1
  217. package/ui/core/view-base/utils.d.ts +1 -0
  218. package/ui/core/view-base/utils.js +9 -0
  219. package/ui/core/view-base/utils.js.map +1 -0
  220. package/ui/dialogs/dialogs-common.js +3 -3
  221. package/ui/dialogs/dialogs-common.js.map +1 -1
  222. package/ui/dialogs/index.ios.js +2 -2
  223. package/ui/dialogs/index.ios.js.map +1 -1
  224. package/ui/frame/fragment.android.js +3 -2
  225. package/ui/frame/fragment.android.js.map +1 -1
  226. package/ui/frame/fragment.transitions.android.js.map +1 -1
  227. package/ui/frame/frame-common.d.ts +3 -2
  228. package/ui/frame/frame-common.js +4 -1
  229. package/ui/frame/frame-common.js.map +1 -1
  230. package/ui/frame/{callbacks/fragment-callbacks.d.ts → frame-helper-for-android.d.ts} +20 -1
  231. package/ui/frame/{callbacks/fragment-callbacks.js → frame-helper-for-android.js} +52 -38
  232. package/ui/frame/frame-helper-for-android.js.map +1 -0
  233. package/ui/frame/frame-interfaces.d.ts +8 -5
  234. package/ui/frame/frame-interfaces.js.map +1 -1
  235. package/ui/frame/frame-stack.d.ts +1 -0
  236. package/ui/frame/frame-stack.js +3 -0
  237. package/ui/frame/frame-stack.js.map +1 -1
  238. package/ui/frame/index.android.d.ts +20 -5
  239. package/ui/frame/index.android.js +296 -19
  240. package/ui/frame/index.android.js.map +1 -1
  241. package/ui/frame/index.d.ts +26 -20
  242. package/ui/frame/index.ios.d.ts +1 -3
  243. package/ui/frame/index.ios.js +29 -39
  244. package/ui/frame/index.ios.js.map +1 -1
  245. package/ui/gestures/gestures-common.d.ts +4 -273
  246. package/ui/gestures/gestures-common.js +3 -146
  247. package/ui/gestures/gestures-common.js.map +1 -1
  248. package/ui/gestures/gestures-types.d.ts +108 -0
  249. package/ui/gestures/gestures-types.js +40 -0
  250. package/ui/gestures/gestures-types.js.map +1 -0
  251. package/ui/gestures/index.android.d.ts +29 -1
  252. package/ui/gestures/index.android.js +4 -2
  253. package/ui/gestures/index.android.js.map +1 -1
  254. package/ui/gestures/index.d.ts +35 -0
  255. package/ui/gestures/index.ios.d.ts +35 -1
  256. package/ui/gestures/index.ios.js +3 -3
  257. package/ui/gestures/index.ios.js.map +1 -1
  258. package/ui/gestures/touch-manager.d.ts +1 -1
  259. package/ui/html-view/index.ios.js +3 -3
  260. package/ui/html-view/index.ios.js.map +1 -1
  261. package/ui/image/image-common.js +1 -1
  262. package/ui/image/image-common.js.map +1 -1
  263. package/ui/image/index.android.js +1 -1
  264. package/ui/image/index.android.js.map +1 -1
  265. package/ui/image-cache/index.ios.js +5 -11
  266. package/ui/image-cache/index.ios.js.map +1 -1
  267. package/ui/index.d.ts +10 -5
  268. package/ui/index.js +11 -3
  269. package/ui/index.js.map +1 -1
  270. package/ui/label/index.ios.js.map +1 -1
  271. package/ui/layouts/absolute-layout/absolute-layout-common.js +1 -1
  272. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
  273. package/ui/layouts/absolute-layout/index.android.js +1 -1
  274. package/ui/layouts/absolute-layout/index.android.js.map +1 -1
  275. package/ui/layouts/absolute-layout/index.d.ts +1 -1
  276. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  277. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +2 -1
  278. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  279. package/ui/layouts/flexbox-layout/index.android.js +1 -1
  280. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  281. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  282. package/ui/layouts/layout-base.android.js +2 -1
  283. package/ui/layouts/layout-base.android.js.map +1 -1
  284. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  285. package/ui/layouts/wrap-layout/index.android.js +1 -1
  286. package/ui/layouts/wrap-layout/index.android.js.map +1 -1
  287. package/ui/layouts/wrap-layout/index.d.ts +1 -1
  288. package/ui/layouts/wrap-layout/wrap-layout-common.js +1 -1
  289. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
  290. package/ui/list-view/index.android.js +1 -1
  291. package/ui/list-view/index.android.js.map +1 -1
  292. package/ui/list-view/index.d.ts +1 -1
  293. package/ui/list-view/index.ios.js +1 -1
  294. package/ui/list-view/index.ios.js.map +1 -1
  295. package/ui/list-view/list-view-common.js +1 -1
  296. package/ui/list-view/list-view-common.js.map +1 -1
  297. package/ui/page/events.d.ts +6 -0
  298. package/ui/page/events.js +7 -0
  299. package/ui/page/events.js.map +1 -0
  300. package/ui/page/index.android.js +2 -1
  301. package/ui/page/index.android.js.map +1 -1
  302. package/ui/page/index.d.ts +1 -1
  303. package/ui/page/index.ios.js +65 -99
  304. package/ui/page/index.ios.js.map +1 -1
  305. package/ui/page/page-common.d.ts +3 -2
  306. package/ui/page/page-common.js +5 -4
  307. package/ui/page/page-common.js.map +1 -1
  308. package/ui/scroll-view/index.ios.js +3 -3
  309. package/ui/scroll-view/index.ios.js.map +1 -1
  310. package/ui/styling/background-common.js +0 -1
  311. package/ui/styling/background-common.js.map +1 -1
  312. package/ui/styling/background.android.d.ts +0 -6
  313. package/ui/styling/background.android.js +0 -52
  314. package/ui/styling/background.android.js.map +1 -1
  315. package/ui/styling/background.ios.js +2 -1
  316. package/ui/styling/background.ios.js.map +1 -1
  317. package/ui/styling/converters.d.ts +2 -2
  318. package/ui/styling/css-shadow.js.map +1 -1
  319. package/ui/styling/css-stroke.js.map +1 -1
  320. package/ui/styling/css-transform.d.ts +1 -1
  321. package/ui/styling/css-utils.js +1 -1
  322. package/ui/styling/css-utils.js.map +1 -1
  323. package/ui/styling/font.ios.js +10 -10
  324. package/ui/styling/font.ios.js.map +1 -1
  325. package/ui/styling/length-shared.d.ts +52 -0
  326. package/ui/styling/length-shared.js +173 -0
  327. package/ui/styling/length-shared.js.map +1 -0
  328. package/ui/styling/style/index.d.ts +1 -1
  329. package/ui/styling/style-properties.d.ts +58 -113
  330. package/ui/styling/style-properties.js +7 -93
  331. package/ui/styling/style-properties.js.map +1 -1
  332. package/ui/styling/style-scope.d.ts +85 -48
  333. package/ui/styling/style-scope.js +34 -32
  334. package/ui/styling/style-scope.js.map +1 -1
  335. package/ui/styling/styling-profile.d.ts +1 -0
  336. package/ui/styling/styling-profile.js +4 -0
  337. package/ui/styling/styling-profile.js.map +1 -0
  338. package/ui/styling/styling-shared.d.ts +3 -0
  339. package/ui/styling/styling-shared.js +6 -0
  340. package/ui/styling/styling-shared.js.map +1 -0
  341. package/ui/switch/index.ios.js +5 -5
  342. package/ui/switch/index.ios.js.map +1 -1
  343. package/ui/tab-view/index.android.js +6 -6
  344. package/ui/tab-view/index.android.js.map +1 -1
  345. package/ui/tab-view/index.ios.js +1 -4
  346. package/ui/tab-view/index.ios.js.map +1 -1
  347. package/ui/text-base/index.android.d.ts +1 -1
  348. package/ui/text-base/index.android.js +4 -4
  349. package/ui/text-base/index.android.js.map +1 -1
  350. package/ui/text-base/index.d.ts +1 -1
  351. package/ui/text-base/index.ios.js +5 -4
  352. package/ui/text-base/index.ios.js.map +1 -1
  353. package/ui/text-view/index.ios.js.map +1 -1
  354. package/ui/transition/fade-transition.ios.js +1 -1
  355. package/ui/transition/fade-transition.ios.js.map +1 -1
  356. package/ui/transition/index.ios.js +1 -1
  357. package/ui/transition/index.ios.js.map +1 -1
  358. package/ui/transition/modal-transition.ios.js +1 -1
  359. package/ui/transition/modal-transition.ios.js.map +1 -1
  360. package/ui/transition/page-transition.ios.js +1 -1
  361. package/ui/transition/page-transition.ios.js.map +1 -1
  362. package/ui/transition/shared-transition-helper.ios.js +1 -1
  363. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  364. package/ui/transition/shared-transition.js +2 -1
  365. package/ui/transition/shared-transition.js.map +1 -1
  366. package/ui/transition/slide-transition.ios.js +2 -2
  367. package/ui/transition/slide-transition.ios.js.map +1 -1
  368. package/utils/animation-helpers.d.ts +27 -0
  369. package/utils/animation-helpers.js +48 -0
  370. package/utils/animation-helpers.js.map +1 -0
  371. package/utils/common.d.ts +1 -38
  372. package/utils/common.js +1 -111
  373. package/utils/common.js.map +1 -1
  374. package/utils/debug-source.d.ts +19 -0
  375. package/utils/debug-source.js +78 -0
  376. package/utils/debug-source.js.map +1 -0
  377. package/utils/debug.js +1 -59
  378. package/utils/debug.js.map +1 -1
  379. package/utils/index.android.d.ts +3 -1
  380. package/utils/index.android.js +30 -4
  381. package/utils/index.android.js.map +1 -1
  382. package/utils/index.d.ts +2 -14
  383. package/utils/index.ios.d.ts +4 -1
  384. package/utils/index.ios.js +32 -5
  385. package/utils/index.ios.js.map +1 -1
  386. package/utils/layout-helper/index.android.js +1 -1
  387. package/utils/layout-helper/index.android.js.map +1 -1
  388. package/utils/layout-helper/index.d.ts +6 -4
  389. package/utils/layout-helper/index.ios.js +5 -5
  390. package/utils/layout-helper/index.ios.js.map +1 -1
  391. package/utils/layout-helper/layout-helper-common.d.ts +0 -9
  392. package/utils/layout-helper/layout-helper-common.js +1 -9
  393. package/utils/layout-helper/layout-helper-common.js.map +1 -1
  394. package/utils/layout-helper/layout-helper-shared.d.ts +9 -0
  395. package/utils/layout-helper/layout-helper-shared.js +13 -0
  396. package/utils/layout-helper/layout-helper-shared.js.map +1 -0
  397. package/utils/{android/index.d.ts → native-helper-for-android.d.ts} +4 -2
  398. package/utils/native-helper-for-android.js +273 -0
  399. package/utils/native-helper-for-android.js.map +1 -0
  400. package/utils/native-helper.android.d.ts +25 -5
  401. package/utils/native-helper.android.js +15 -131
  402. package/utils/native-helper.android.js.map +1 -1
  403. package/utils/native-helper.d.ts +88 -63
  404. package/utils/native-helper.ios.d.ts +72 -3
  405. package/utils/native-helper.ios.js +253 -3
  406. package/utils/native-helper.ios.js.map +1 -1
  407. package/utils/shared.d.ts +17 -0
  408. package/utils/shared.js +40 -0
  409. package/utils/shared.js.map +1 -0
  410. package/utils/utils-shared.d.ts +1 -0
  411. package/utils/utils-shared.js +8 -0
  412. package/utils/utils-shared.js.map +1 -0
  413. package/xhr/index.js +12 -13
  414. package/xhr/index.js.map +1 -1
  415. package/xml/index.d.ts +94 -98
  416. package/xml/index.js +58 -2
  417. package/xml/index.js.map +1 -1
  418. package/accessibility/accessibility-css-helper.d.ts +0 -1
  419. package/accessibility/accessibility-css-helper.js +0 -101
  420. package/accessibility/accessibility-css-helper.js.map +0 -1
  421. package/accessibility/accessibility-service-common.d.ts +0 -8
  422. package/accessibility/accessibility-service-common.js +0 -26
  423. package/accessibility/accessibility-service-common.js.map +0 -1
  424. package/accessibility/accessibility-service.android.d.ts +0 -6
  425. package/accessibility/accessibility-service.android.js +0 -103
  426. package/accessibility/accessibility-service.android.js.map +0 -1
  427. package/accessibility/accessibility-service.d.ts +0 -10
  428. package/accessibility/accessibility-service.ios.d.ts +0 -6
  429. package/accessibility/accessibility-service.ios.js +0 -61
  430. package/accessibility/accessibility-service.ios.js.map +0 -1
  431. package/accessibility/accessibility-types.d.ts +0 -224
  432. package/accessibility/accessibility-types.js +0 -222
  433. package/accessibility/accessibility-types.js.map +0 -1
  434. package/accessibility/font-scale-common.d.ts +0 -7
  435. package/accessibility/font-scale-common.js +0 -14
  436. package/accessibility/font-scale-common.js.map +0 -1
  437. package/accessibility/font-scale.android.d.ts +0 -5
  438. package/accessibility/font-scale.android.js +0 -55
  439. package/accessibility/font-scale.android.js.map +0 -1
  440. package/accessibility/font-scale.d.ts +0 -9
  441. package/accessibility/font-scale.ios.d.ts +0 -5
  442. package/accessibility/font-scale.ios.js +0 -89
  443. package/accessibility/font-scale.ios.js.map +0 -1
  444. package/accessibility/index.android.d.ts +0 -10
  445. package/accessibility/index.android.js +0 -577
  446. package/accessibility/index.android.js.map +0 -1
  447. package/accessibility/index.ios.d.ts +0 -9
  448. package/accessibility/index.ios.js +0 -229
  449. package/accessibility/index.ios.js.map +0 -1
  450. package/cli-hooks/postinstall.js +0 -3
  451. package/cli-hooks/preuninstall.js +0 -3
  452. package/css/package.json +0 -36
  453. package/css-value/package.json +0 -23
  454. package/debugger/dom-node.d.ts +0 -27
  455. package/debugger/dom-node.js.map +0 -1
  456. package/ui/animation/animation-interfaces.js.map +0 -1
  457. package/ui/builder/xml2ui.d.ts +0 -134
  458. package/ui/builder/xml2ui.js +0 -397
  459. package/ui/builder/xml2ui.js.map +0 -1
  460. package/ui/frame/callbacks/activity-callbacks.d.ts +0 -19
  461. package/ui/frame/callbacks/activity-callbacks.js +0 -301
  462. package/ui/frame/callbacks/activity-callbacks.js.map +0 -1
  463. package/ui/frame/callbacks/fragment-callbacks.js.map +0 -1
  464. package/utils/android/index.js +0 -160
  465. package/utils/android/index.js.map +0 -1
  466. package/utils/ios/index.d.ts +0 -39
  467. package/utils/ios/index.js +0 -229
  468. package/utils/ios/index.js.map +0 -1
@@ -9,6 +9,13 @@ export function dataSerialize(data?: any, wrapPrimitives?: boolean): any;
9
9
  */
10
10
  export function dataDeserialize(nativeData?: any): any;
11
11
 
12
+ /**
13
+ * Checks whether the application is running on real device and not on emulator.
14
+ */
15
+ export function isRealDevice(): boolean;
16
+
17
+ export function getWindow(): UIWindow | android.view.Window;
18
+
12
19
  // /**
13
20
  // * Module with android specific utilities.
14
21
  // */
@@ -94,24 +101,8 @@ export function dataDeserialize(nativeData?: any): any;
94
101
  // * @param type - (Optional) type
95
102
  // */
96
103
  // 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
104
  // }
110
105
 
111
- // /**
112
- // * Checks whether the application is running on real device and not on emulator.
113
- // */
114
- // export function isRealDevice(): boolean;
115
106
  // }
116
107
 
117
108
  // /**
@@ -187,19 +178,6 @@ export function dataDeserialize(nativeData?: any): any;
187
178
  // */
188
179
  // export function openFile(filePath: string): boolean;
189
180
 
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
181
  // /**
204
182
  // * Gets the currently visible(topmost) UIViewController.
205
183
  // * @param rootViewController The root UIViewController instance to start searching from (normally window.rootViewController).
@@ -207,20 +185,6 @@ export function dataDeserialize(nativeData?: any): any;
207
185
  // */
208
186
  // export function getVisibleViewController(rootViewController: any /* UIViewController*/): any; /* UIViewController*/
209
187
 
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
188
  // /**
225
189
  // * Checks whether the application is running on real device and not on simulator.
226
190
  // */
@@ -248,33 +212,94 @@ export function dataDeserialize(nativeData?: any): any;
248
212
  // */
249
213
  // export function copyLayerProperties(view: UIView, toView: UIView, customProperties?: { view?: Array<string> /* Array<keyof UIView> */; layer?: Array<string> /* Array<keyof CALayer> */ }): void;
250
214
 
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
215
  // }
265
216
 
266
- import * as AndroidUtils from './android';
267
- export import android = AndroidUtils;
217
+ export const android: {
218
+ resources: {
219
+ getDrawableId: (name) => number;
220
+ getStringId: (name) => number;
221
+ getId: (name: string) => number;
222
+ getResource: (name: string, type?: string) => number;
223
+ /**
224
+ * Gets a color from the current theme.
225
+ * @param name - Name of the color resource.
226
+ * @param context - Context to resolve the color.
227
+ */
228
+ getPaletteColor: (name: string, context: android.content.Context) => number;
229
+ };
230
+ getApplication: () => android.app.Application;
231
+ getCurrentActivity: () => androidx.appcompat.app.AppCompatActivity | android.app.Activity | null;
232
+ getApplicationContext: () => android.content.Context;
233
+ getWindow: () => android.view.Window;
234
+ getResources: () => android.content.res.Resources;
235
+ getPackageName: () => string;
236
+ getInputMethodManager: () => android.view.inputmethod.InputMethodManager;
237
+ showSoftInput: (nativeView: android.view.View) => void;
238
+ dismissSoftInput: (nativeView?: android.view.View) => void;
239
+ };
268
240
 
269
241
  /**
270
242
  * @deprecated use Utils.android instead.
271
243
  */
272
- export import ad = AndroidUtils;
273
-
274
- import * as iOSUtils from './ios';
275
- export import ios = iOSUtils;
244
+ export const ad = android;
245
+
246
+ export const ios: {
247
+ collections: {
248
+ jsArrayToNSArray<T>(str: T[]): NSArray<T>;
249
+ nsArrayToJSArray<T>(a: NSArray<T>): Array<T>;
250
+ };
251
+ /**
252
+ * Create a UIDocumentInteractionControllerDelegate implementation for use with UIDocumentInteractionController
253
+ */
254
+ createUIDocumentInteractionControllerDelegate: () => NSObject;
255
+ /**
256
+ * Gets the root folder for the current application. This Folder is private for the application and not accessible from Users/External apps.
257
+ * iOS - this folder is read-only and contains the app and all its resources.
258
+ */
259
+ getCurrentAppPath: () => string;
260
+ getRootViewController: () => UIViewController;
261
+ getVisibleViewController: (rootViewController: UIViewController) => UIViewController;
262
+ getWindow: () => UIWindow;
263
+ getMainScreen: () => UIScreen;
264
+ setWindowBackgroundColor: (value: string) => void;
265
+ isLandscape: () => boolean;
266
+ snapshotView: (view: UIView, scale: number) => UIImage;
267
+ /**
268
+ * Applies a rotation transform over X,Y and Z axis
269
+ * @param transform Applies a rotation transform over X,Y and Z axis
270
+ * @param x Rotation over X axis in degrees
271
+ * @param y Rotation over Y axis in degrees
272
+ * @param z Rotation over Z axis in degrees
273
+ */
274
+ applyRotateTransform: (transform: CATransform3D, x: number, y: number, z: number) => CATransform3D;
275
+ printCGRect: (rect: CGRect) => void;
276
+ copyLayerProperties: (view: UIView, toView: UIView, customProperties?: { view?: Array<keyof UIView>; layer?: Array<keyof CALayer> }) => void;
277
+ /**
278
+ * Animate views with a configurable spring effect
279
+ * @param options various animation settings for the spring
280
+ * - tension: number
281
+ * - friction: number
282
+ * - mass: number
283
+ * - delay: number
284
+ * - velocity: number
285
+ * - animateOptions: UIViewAnimationOptions
286
+ * - animations: () => void, Callback containing the property changes you want animated
287
+ * - completion: (finished: boolean) => void, Callback when animation is finished
288
+ */
289
+ animateWithSpring: (options?: { tension?: number; friction?: number; mass?: number; delay?: number; velocity?: number; animateOptions?: UIViewAnimationOptions; animations?: () => void; completion?: (finished?: boolean) => void }) => void;
290
+ /**
291
+ * Joins an array of file paths.
292
+ * @param paths An array of paths.
293
+ * Returns the joined path.
294
+ */
295
+ joinPaths: (...paths: string[]) => string;
296
+ /**
297
+ * @deprecated use Utils.SDK_VERSION instead which is a float of the {major}.{minor} verison
298
+ */
299
+ MajorVersion: number;
300
+ };
276
301
 
277
302
  /**
278
303
  * @deprecated use Utils.ios instead.
279
304
  */
280
- export import iOSNativeHelper = iOSUtils;
305
+ export const iOSNativeHelper = ios;
@@ -1,10 +1,79 @@
1
- import * as iOSUtils from './ios';
2
1
  export declare function dataDeserialize(nativeData?: any): any;
3
2
  export declare function dataSerialize(data: any, wrapPrimitives?: boolean): any;
3
+ declare function getCurrentAppPath(): string;
4
+ declare function joinPaths(...paths: string[]): string;
5
+ export declare function getter<T>(_this: any, property: T | {
6
+ (): T;
7
+ }): T;
8
+ declare namespace collections {
9
+ function jsArrayToNSArray<T>(str: T[]): NSArray<T>;
10
+ function nsArrayToJSArray<T>(a: NSArray<T>): Array<T>;
11
+ }
12
+ declare function getRootViewController(): UIViewController;
13
+ export declare function getWindow(): UIWindow;
14
+ declare function getMainScreen(): UIScreen;
15
+ declare function setWindowBackgroundColor(value: string): void;
16
+ declare function isLandscape(): boolean;
17
+ export declare function openFile(filePath: string): boolean;
18
+ declare function getVisibleViewController(rootViewController: UIViewController): UIViewController;
19
+ declare function applyRotateTransform(transform: CATransform3D, x: number, y: number, z: number): CATransform3D;
20
+ declare function createUIDocumentInteractionControllerDelegate(): NSObject;
21
+ export declare function isRealDevice(): boolean;
22
+ declare function printCGRect(rect: CGRect): string;
23
+ declare function snapshotView(view: UIView, scale: number): UIImage;
24
+ declare function copyLayerProperties(view: UIView, toView: UIView, customProperties?: {
25
+ view?: Array<keyof UIView>;
26
+ layer?: Array<keyof CALayer>;
27
+ }): void;
28
+ declare function animateWithSpring(options?: {
29
+ tension?: number;
30
+ friction?: number;
31
+ mass?: number;
32
+ delay?: number;
33
+ velocity?: number;
34
+ animateOptions?: UIViewAnimationOptions;
35
+ animations?: () => void;
36
+ completion?: (finished?: boolean) => void;
37
+ }): void;
4
38
  export declare const ad: {};
5
39
  export declare const android: {};
6
- export import ios = iOSUtils;
40
+ export declare const ios: {
41
+ collections: typeof collections;
42
+ createUIDocumentInteractionControllerDelegate: typeof createUIDocumentInteractionControllerDelegate;
43
+ getCurrentAppPath: typeof getCurrentAppPath;
44
+ getRootViewController: typeof getRootViewController;
45
+ getVisibleViewController: typeof getVisibleViewController;
46
+ getWindow: typeof getWindow;
47
+ getMainScreen: typeof getMainScreen;
48
+ setWindowBackgroundColor: typeof setWindowBackgroundColor;
49
+ isLandscape: typeof isLandscape;
50
+ applyRotateTransform: typeof applyRotateTransform;
51
+ snapshotView: typeof snapshotView;
52
+ joinPaths: typeof joinPaths;
53
+ printCGRect: typeof printCGRect;
54
+ copyLayerProperties: typeof copyLayerProperties;
55
+ animateWithSpring: typeof animateWithSpring;
56
+ MajorVersion: number;
57
+ };
7
58
  /**
8
59
  * @deprecated Use `Utils.ios` instead.
9
60
  */
10
- export import iOSNativeHelper = iOSUtils;
61
+ export declare const iOSNativeHelper: {
62
+ collections: typeof collections;
63
+ createUIDocumentInteractionControllerDelegate: typeof createUIDocumentInteractionControllerDelegate;
64
+ getCurrentAppPath: typeof getCurrentAppPath;
65
+ getRootViewController: typeof getRootViewController;
66
+ getVisibleViewController: typeof getVisibleViewController;
67
+ getWindow: typeof getWindow;
68
+ getMainScreen: typeof getMainScreen;
69
+ setWindowBackgroundColor: typeof setWindowBackgroundColor;
70
+ isLandscape: typeof isLandscape;
71
+ applyRotateTransform: typeof applyRotateTransform;
72
+ snapshotView: typeof snapshotView;
73
+ joinPaths: typeof joinPaths;
74
+ printCGRect: typeof printCGRect;
75
+ copyLayerProperties: typeof copyLayerProperties;
76
+ animateWithSpring: typeof animateWithSpring;
77
+ MajorVersion: number;
78
+ };
79
+ export {};
@@ -1,6 +1,9 @@
1
- import * as iOSUtils from './ios';
2
1
  import { platformCheck } from './platform-check';
3
2
  import { getClass, isNullOrUndefined, numberHasDecimals, numberIs64Bit } from './types';
3
+ import { Color } from '../color';
4
+ import { Trace } from '../trace';
5
+ import { CORE_ANIMATION_DEFAULTS, getDurationWithDampingFromSpring } from './animation-helpers';
6
+ import { SDK_VERSION } from './constants';
4
7
  export function dataDeserialize(nativeData) {
5
8
  if (isNullOrUndefined(nativeData)) {
6
9
  // some native values will already be js null values
@@ -81,12 +84,259 @@ export function dataSerialize(data, wrapPrimitives = false) {
81
84
  return null;
82
85
  }
83
86
  }
87
+ function getCurrentAppPath() {
88
+ if (!global.__dirname) {
89
+ global.__dirname = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;
90
+ }
91
+ console.log('getCurrentAppPath __dirname:', __dirname);
92
+ const currentDir = global.__dirname;
93
+ console.log('getCurrentAppPath global.__dirname:', global.__dirname);
94
+ console.log('getCurrentAppPath currentDir:', currentDir);
95
+ const tnsModulesIndex = currentDir.indexOf('/tns_modules');
96
+ // Module not hosted in ~/tns_modules when bundled. Use current dir.
97
+ let appPath = currentDir;
98
+ if (tnsModulesIndex !== -1) {
99
+ // Strip part after tns_modules to obtain app root
100
+ appPath = currentDir.substring(0, tnsModulesIndex);
101
+ }
102
+ return appPath;
103
+ }
104
+ function joinPaths(...paths) {
105
+ if (!paths || paths.length === 0) {
106
+ return '';
107
+ }
108
+ return NSString.stringWithString(NSString.pathWithComponents(paths)).stringByStandardizingPath;
109
+ }
110
+ const radToDeg = Math.PI / 180;
111
+ function isOrientationLandscape(orientation) {
112
+ return orientation === 3 /* UIDeviceOrientation.LandscapeLeft */ /* 3 */ || orientation === 4 /* UIDeviceOrientation.LandscapeRight */ /* 4 */;
113
+ }
114
+ function openFileAtRootModule(filePath) {
115
+ try {
116
+ const appPath = getCurrentAppPath();
117
+ const path = isRealDevice() ? filePath.replace('~', appPath) : filePath;
118
+ const controller = UIDocumentInteractionController.interactionControllerWithURL(NSURL.fileURLWithPath(path));
119
+ controller.delegate = createUIDocumentInteractionControllerDelegate();
120
+ return controller.presentPreviewAnimated(true);
121
+ }
122
+ catch (e) {
123
+ Trace.write('Error in openFile', Trace.categories.Error, Trace.messageType.error);
124
+ }
125
+ return false;
126
+ }
127
+ // TODO: remove for NativeScript 9.0
128
+ export function getter(_this, property) {
129
+ console.log('utils.ios.getter() is deprecated; use the respective native property instead');
130
+ if (typeof property === 'function') {
131
+ return property.call(_this);
132
+ }
133
+ else {
134
+ return property;
135
+ }
136
+ }
137
+ var collections;
138
+ (function (collections) {
139
+ function jsArrayToNSArray(str) {
140
+ return NSArray.arrayWithArray(str);
141
+ }
142
+ collections.jsArrayToNSArray = jsArrayToNSArray;
143
+ function nsArrayToJSArray(a) {
144
+ const arr = [];
145
+ if (a !== undefined) {
146
+ const count = a.count;
147
+ for (let i = 0; i < count; i++) {
148
+ arr.push(a.objectAtIndex(i));
149
+ }
150
+ }
151
+ return arr;
152
+ }
153
+ collections.nsArrayToJSArray = nsArrayToJSArray;
154
+ })(collections || (collections = {}));
155
+ function getRootViewController() {
156
+ const win = getWindow();
157
+ let vc = win && win.rootViewController;
158
+ while (vc && vc.presentedViewController) {
159
+ vc = vc.presentedViewController;
160
+ }
161
+ return vc;
162
+ }
163
+ export function getWindow() {
164
+ let window;
165
+ if (SDK_VERSION >= 15 && typeof NativeScriptViewFactory !== 'undefined') {
166
+ // UIWindowScene.keyWindow is only available 15+
167
+ window = NativeScriptViewFactory.getKeyWindow();
168
+ }
169
+ if (window) {
170
+ return window;
171
+ }
172
+ const app = UIApplication.sharedApplication;
173
+ if (!app) {
174
+ return;
175
+ }
176
+ return app.keyWindow || (app.windows && app.windows.count > 0 && app.windows.objectAtIndex(0));
177
+ }
178
+ function getMainScreen() {
179
+ const window = getWindow();
180
+ return window ? window.screen : UIScreen.mainScreen;
181
+ }
182
+ function setWindowBackgroundColor(value) {
183
+ const win = getWindow();
184
+ if (win) {
185
+ const bgColor = new Color(value);
186
+ win.backgroundColor = bgColor.ios;
187
+ const rootVc = getRootViewController();
188
+ if (rootVc?.view) {
189
+ rootVc.view.backgroundColor = bgColor.ios;
190
+ }
191
+ }
192
+ }
193
+ function isLandscape() {
194
+ console.log('utils.ios.isLandscape() is deprecated; use application.orientation instead');
195
+ const deviceOrientation = UIDevice.currentDevice.orientation;
196
+ const statusBarOrientation = UIApplication.sharedApplication.statusBarOrientation;
197
+ const isDeviceOrientationLandscape = isOrientationLandscape(deviceOrientation);
198
+ const isStatusBarOrientationLandscape = isOrientationLandscape(statusBarOrientation);
199
+ return isDeviceOrientationLandscape || isStatusBarOrientationLandscape;
200
+ }
201
+ /**
202
+ * @deprecated use Utils.SDK_VERSION instead which is a float of the {major}.{minor} verison
203
+ */
204
+ const MajorVersion = NSString.stringWithString(UIDevice.currentDevice.systemVersion).intValue;
205
+ export function openFile(filePath) {
206
+ console.log('utils.ios.openFile() is deprecated; use utils.openFile() instead');
207
+ return openFileAtRootModule(filePath);
208
+ }
209
+ function getVisibleViewController(rootViewController) {
210
+ let viewController = rootViewController;
211
+ while (viewController && viewController.presentedViewController) {
212
+ viewController = viewController.presentedViewController;
213
+ }
214
+ return viewController;
215
+ }
216
+ function applyRotateTransform(transform, x, y, z) {
217
+ if (x) {
218
+ transform = CATransform3DRotate(transform, x * radToDeg, 1, 0, 0);
219
+ }
220
+ if (y) {
221
+ transform = CATransform3DRotate(transform, y * radToDeg, 0, 1, 0);
222
+ }
223
+ if (z) {
224
+ transform = CATransform3DRotate(transform, z * radToDeg, 0, 0, 1);
225
+ }
226
+ return transform;
227
+ }
228
+ function createUIDocumentInteractionControllerDelegate() {
229
+ var UIDocumentInteractionControllerDelegateImpl = /** @class */ (function (_super) {
230
+ __extends(UIDocumentInteractionControllerDelegateImpl, _super);
231
+ function UIDocumentInteractionControllerDelegateImpl() {
232
+ return _super !== null && _super.apply(this, arguments) || this;
233
+ }
234
+ UIDocumentInteractionControllerDelegateImpl.prototype.getViewController = function () {
235
+ return getWindow().rootViewController;
236
+ };
237
+ UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerViewControllerForPreview = function (controller) {
238
+ return this.getViewController();
239
+ };
240
+ UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerViewForPreview = function (controller) {
241
+ return this.getViewController().view;
242
+ };
243
+ UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerRectForPreview = function (controller) {
244
+ return this.getViewController().view.frame;
245
+ };
246
+ UIDocumentInteractionControllerDelegateImpl.ObjCProtocols = [UIDocumentInteractionControllerDelegate];
247
+ return UIDocumentInteractionControllerDelegateImpl;
248
+ }(NSObject));
249
+ return new UIDocumentInteractionControllerDelegateImpl();
250
+ }
251
+ export function isRealDevice() {
252
+ try {
253
+ if (NSProcessInfo.processInfo.environment.valueForKey('SIMULATOR_DEVICE_NAME')) {
254
+ return false;
255
+ }
256
+ return true;
257
+ }
258
+ catch (e) {
259
+ return true;
260
+ }
261
+ }
262
+ function printCGRect(rect) {
263
+ if (rect) {
264
+ return `CGRect(${rect.origin.x} ${rect.origin.y} ${rect.size.width} ${rect.size.height})`;
265
+ }
266
+ }
267
+ function snapshotView(view, scale) {
268
+ if (view instanceof UIImageView) {
269
+ return view.image;
270
+ }
271
+ // console.log('snapshotView view.frame:', printRect(view.frame));
272
+ const originalOpacity = view.layer.opacity;
273
+ view.layer.opacity = originalOpacity > 0 ? originalOpacity : 1;
274
+ UIGraphicsBeginImageContextWithOptions(CGSizeMake(view.frame.size.width, view.frame.size.height), false, scale);
275
+ view.layer.renderInContext(UIGraphicsGetCurrentContext());
276
+ const image = UIGraphicsGetImageFromCurrentImageContext();
277
+ UIGraphicsEndImageContext();
278
+ setTimeout(() => {
279
+ // ensure set back properly on next tick
280
+ view.layer.opacity = originalOpacity;
281
+ });
282
+ return image;
283
+ }
284
+ function copyLayerProperties(view, toView, customProperties) {
285
+ const viewPropertiesToMatch = customProperties?.view || ['backgroundColor'];
286
+ const layerPropertiesToMatch = customProperties?.layer || ['cornerRadius', 'borderWidth', 'borderColor'];
287
+ viewPropertiesToMatch.forEach((property) => {
288
+ if (view[property] !== toView[property]) {
289
+ // console.log('| -- matching view property:', property);
290
+ view[property] = toView[property];
291
+ }
292
+ });
293
+ layerPropertiesToMatch.forEach((property) => {
294
+ if (view.layer[property] !== toView.layer[property]) {
295
+ // console.log('| -- matching layer property:', property);
296
+ view.layer[property] = toView.layer[property];
297
+ }
298
+ });
299
+ }
300
+ function animateWithSpring(options) {
301
+ // for convenience, default spring settings are provided
302
+ const opt = {
303
+ ...CORE_ANIMATION_DEFAULTS.spring,
304
+ delay: 0,
305
+ animateOptions: null,
306
+ animations: null,
307
+ completion: null,
308
+ ...(options || {}),
309
+ };
310
+ const { duration, damping } = getDurationWithDampingFromSpring(opt);
311
+ if (duration === 0) {
312
+ UIView.animateWithDurationAnimationsCompletion(0, opt.animations, opt.completion);
313
+ return;
314
+ }
315
+ UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(duration, opt.delay, damping, opt.velocity, opt.animateOptions, opt.animations, opt.completion);
316
+ }
84
317
  // these don't exist on iOS. Stub them to empty functions.
85
318
  export const ad = platformCheck('Utils.ad');
86
319
  export const android = platformCheck('Utils.android');
87
- export var ios = iOSUtils;
320
+ export const ios = {
321
+ collections,
322
+ createUIDocumentInteractionControllerDelegate,
323
+ getCurrentAppPath,
324
+ getRootViewController,
325
+ getVisibleViewController,
326
+ getWindow,
327
+ getMainScreen,
328
+ setWindowBackgroundColor,
329
+ isLandscape,
330
+ applyRotateTransform,
331
+ snapshotView,
332
+ joinPaths,
333
+ printCGRect,
334
+ copyLayerProperties,
335
+ animateWithSpring,
336
+ MajorVersion,
337
+ };
88
338
  /**
89
339
  * @deprecated Use `Utils.ios` instead.
90
340
  */
91
- export var iOSNativeHelper = iOSUtils;
341
+ export const iOSNativeHelper = ios;
92
342
  //# sourceMappingURL=native-helper.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-helper.ios.js","sourceRoot":"","sources":["../../../../packages/core/utils/native-helper.ios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExF,MAAM,UAAU,eAAe,CAAC,UAAgB;IAC/C,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,oDAAoD;QACpD,kEAAkE;QAClE,OAAO,IAAI,CAAC;IACb,CAAC;SAAM,CAAC;QACP,QAAQ,Q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QAClF,OAAO;IACR,CAAC;IACD,MAAM,CAAC,8FAA8F,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,cAAc,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;AACvM,CAAC;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,EAAE,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,GAAG,GAAG;IAClB,WAAW;IACX,6CAA6C;IAC7C,iBAAiB;IACjB,qBAAqB;IACrB,wBAAwB;IACxB,SAAS;IACT,aAAa;IACb,wBAAwB;IACxB,WAAW;IACX,oBAAoB;IACpB,YAAY;IACZ,SAAS;IACT,WAAW;IACX,mBAAmB;IACnB,iBAAiB;IACjB,YAAY;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Creates a debounced function that delays invoking the provided function until after a specified delay
3
+ * @param fn The function to debounce
4
+ * @param delay The number of milliseconds to delay
5
+ * @param param2 Options for the debounce behavior
6
+ * @returns A new debounced function
7
+ */
8
+ export declare function debounce(fn: any, delay?: number, { leading }?: {
9
+ leading?: boolean;
10
+ }): (...args: Array<any>) => void;
11
+ /**
12
+ * Creates a throttled function that only invokes the provided function at most once per specified delay
13
+ * @param fn The function to throttle
14
+ * @param delay The number of milliseconds to delay
15
+ * @returns A new throttled function
16
+ */
17
+ export declare function throttle(fn: Function, delay?: number): (...args: any[]) => void;
@@ -0,0 +1,40 @@
1
+ // Note: these could be removed in the future - used internally largely with GC handling right now
2
+ /**
3
+ * Creates a debounced function that delays invoking the provided function until after a specified delay
4
+ * @param fn The function to debounce
5
+ * @param delay The number of milliseconds to delay
6
+ * @param param2 Options for the debounce behavior
7
+ * @returns A new debounced function
8
+ */
9
+ export function debounce(fn, delay = 300, { leading } = {}) {
10
+ let timer;
11
+ return (...args) => {
12
+ if (timer === undefined && leading) {
13
+ fn.apply(this, args);
14
+ }
15
+ clearTimeout(timer);
16
+ timer = setTimeout(() => {
17
+ fn.apply(this, args);
18
+ timer = undefined;
19
+ }, delay);
20
+ };
21
+ }
22
+ /**
23
+ * Creates a throttled function that only invokes the provided function at most once per specified delay
24
+ * @param fn The function to throttle
25
+ * @param delay The number of milliseconds to delay
26
+ * @returns A new throttled function
27
+ */
28
+ export function throttle(fn, delay = 300) {
29
+ let waiting = false;
30
+ return function (...args) {
31
+ if (!waiting) {
32
+ fn.apply(this, args);
33
+ waiting = true;
34
+ setTimeout(function () {
35
+ waiting = false;
36
+ }, delay);
37
+ }
38
+ };
39
+ }
40
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../packages/core/utils/shared.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAO,EAAE,KAAK,GAAG,GAAG,EAAE,EAAE,OAAO,KAA4B,EAAE;IACrF,IAAI,KAAqB,CAAC;IAC1B,OAAO,CAAC,GAAG,IAAgB,EAAE,EAAE;QAC9B,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,EAAE,CAAC;YACpC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtB,CAAC;QACD,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YACvB,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACrB,KAAK,GAAG,SAAS,CAAC;QACnB,CAAC,EAAE,KAAK,CAAC,CAAC;IACX,CAAC,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAY,EAAE,KAAK,GAAG,GAAG;IACjD,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,OAAO,UAAU,GAAG,IAAI;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACrB,OAAO,GAAG,IAAI,CAAC;YACf,UAAU,CAAC;gBACV,OAAO,GAAG,KAAK,CAAC;YACjB,CAAC,EAAE,KAAK,CAAC,CAAC;QACX,CAAC;IACF,CAAC,CAAC;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function getFileExtension(path: string): string;
@@ -0,0 +1,8 @@
1
+ export function getFileExtension(path) {
2
+ if (!path) {
3
+ return '';
4
+ }
5
+ const index = path.lastIndexOf('.');
6
+ return index !== -1 ? path.substring(index + 1) : '';
7
+ }
8
+ //# sourceMappingURL=utils-shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-shared.js","sourceRoot":"","sources":["../../../../packages/core/utils/utils-shared.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC5C,IAAI,CAAC,IAAI,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;IACX,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtD,CAAC"}