@nativescript/core 9.0.12-next.0 → 9.0.12-next.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 (1054) hide show
  1. package/LICENSE +19 -0
  2. package/abortcontroller/abortsignal.d.ts +23 -0
  3. package/abortcontroller/abortsignal.js +57 -0
  4. package/abortcontroller/abortsignal.js.map +1 -0
  5. package/abortcontroller/index.d.ts +20 -0
  6. package/abortcontroller/index.js +52 -0
  7. package/abortcontroller/index.js.map +1 -0
  8. package/accessibility/accessibility-common.d.ts +282 -0
  9. package/accessibility/accessibility-common.js +416 -0
  10. package/accessibility/accessibility-common.js.map +1 -0
  11. package/accessibility/accessibility-properties.d.ts +24 -0
  12. package/accessibility/accessibility-properties.js +118 -0
  13. package/accessibility/accessibility-properties.js.map +1 -0
  14. package/accessibility/index.d.ts +1 -0
  15. package/accessibility/index.js +2 -0
  16. package/accessibility/index.js.map +1 -0
  17. package/animation-frame/animation-native.android.d.ts +1 -0
  18. package/animation-frame/animation-native.android.js +4 -0
  19. package/animation-frame/animation-native.android.js.map +1 -0
  20. package/animation-frame/animation-native.ios.d.ts +1 -0
  21. package/animation-frame/animation-native.ios.js +3 -0
  22. package/animation-frame/animation-native.ios.js.map +1 -0
  23. package/animation-frame/index.js +81 -0
  24. package/animation-frame/index.js.map +1 -0
  25. package/application/application-common.d.ts +247 -0
  26. package/application/application-common.js +578 -0
  27. package/application/application-common.js.map +1 -0
  28. package/application/application-interfaces.d.ts +220 -0
  29. package/application/application-interfaces.js +2 -0
  30. package/application/application-interfaces.js.map +1 -0
  31. package/application/application-shims.d.ts +378 -0
  32. package/application/application-shims.js +380 -0
  33. package/application/application-shims.js.map +1 -0
  34. package/application/application.android.d.ts +81 -0
  35. package/application/application.android.js +1233 -0
  36. package/application/application.android.js.map +1 -0
  37. package/application/application.ios.d.ts +145 -0
  38. package/application/application.ios.js +1481 -0
  39. package/application/application.ios.js.map +1 -0
  40. package/application/helpers-common.d.ts +50 -0
  41. package/application/helpers-common.js +153 -0
  42. package/application/helpers-common.js.map +1 -0
  43. package/application/helpers.android.d.ts +8 -0
  44. package/application/helpers.android.js +119 -0
  45. package/application/helpers.android.js.map +1 -0
  46. package/application/helpers.ios.d.ts +8 -0
  47. package/application/helpers.ios.js +24 -0
  48. package/application/helpers.ios.js.map +1 -0
  49. package/application/index.android.d.ts +2 -0
  50. package/application/index.android.js +3 -0
  51. package/application/index.android.js.map +1 -0
  52. package/application/index.ios.d.ts +2 -0
  53. package/application/index.ios.js +3 -0
  54. package/application/index.ios.js.map +1 -0
  55. package/application-settings/application-settings-common.d.ts +2 -0
  56. package/application-settings/application-settings-common.js +15 -0
  57. package/application-settings/application-settings-common.js.map +1 -0
  58. package/application-settings/index.android.d.ts +11 -0
  59. package/application-settings/index.android.js +124 -0
  60. package/application-settings/index.android.js.map +1 -0
  61. package/application-settings/index.ios.d.ts +11 -0
  62. package/application-settings/index.ios.js +81 -0
  63. package/application-settings/index.ios.js.map +1 -0
  64. package/bundle-entry-points.d.ts +1 -0
  65. package/bundle-entry-points.js +47 -0
  66. package/bundle-entry-points.js.map +1 -0
  67. package/color/color-common.d.ts +136 -0
  68. package/color/color-common.js +341 -0
  69. package/color/color-common.js.map +1 -0
  70. package/color/color-types.d.ts +49 -0
  71. package/color/color-types.js +3 -0
  72. package/color/color-types.js.map +1 -0
  73. package/color/color-utils.d.ts +38 -0
  74. package/color/color-utils.js +213 -0
  75. package/color/color-utils.js.map +1 -0
  76. package/color/index.android.d.ts +4 -0
  77. package/color/index.android.js +7 -0
  78. package/color/index.android.js.map +1 -0
  79. package/color/index.ios.d.ts +7 -0
  80. package/color/index.ios.js +19 -0
  81. package/color/index.ios.js.map +1 -0
  82. package/color/known-colors.d.ts +144 -0
  83. package/color/known-colors.js +165 -0
  84. package/color/known-colors.js.map +1 -0
  85. package/config/config.interface.d.ts +297 -0
  86. package/config/config.interface.js +2 -0
  87. package/config/config.interface.js.map +1 -0
  88. package/config/index.d.ts +1 -0
  89. package/config/index.js +2 -0
  90. package/config/index.js.map +1 -0
  91. package/connectivity/index.android.d.ts +11 -0
  92. package/connectivity/index.android.js +157 -0
  93. package/connectivity/index.android.js.map +1 -0
  94. package/connectivity/index.ios.d.ts +11 -0
  95. package/connectivity/index.ios.js +132 -0
  96. package/connectivity/index.ios.js.map +1 -0
  97. package/console/index.d.ts +14 -0
  98. package/console/index.js +33 -0
  99. package/console/index.js.map +1 -0
  100. package/core-types/animation-types.d.ts +11 -0
  101. package/core-types/animation-types.js +13 -0
  102. package/core-types/animation-types.js.map +1 -0
  103. package/core-types/index.d.ts +345 -0
  104. package/core-types/index.js +290 -0
  105. package/core-types/index.js.map +1 -0
  106. package/core-types/validators.d.ts +2 -0
  107. package/core-types/validators.js +27 -0
  108. package/core-types/validators.js.map +1 -0
  109. package/css/CSS3Parser.d.ts +184 -0
  110. package/css/CSS3Parser.js +534 -0
  111. package/css/CSS3Parser.js.map +1 -0
  112. package/css/CSSNativeScript.d.ts +14 -0
  113. package/css/CSSNativeScript.js +113 -0
  114. package/css/CSSNativeScript.js.map +1 -0
  115. package/css/css-tree-parser.d.ts +1 -0
  116. package/css/css-tree-parser.js +133 -0
  117. package/css/css-tree-parser.js.map +1 -0
  118. package/css/lib/parse/index.d.ts +1 -0
  119. package/css/lib/parse/index.js +500 -0
  120. package/css/lib/parse/index.js.map +1 -0
  121. package/css/parser.d.ts +70 -0
  122. package/css/parser.js +517 -0
  123. package/css/parser.js.map +1 -0
  124. package/css/reworkcss.d.ts +44 -0
  125. package/css/reworkcss.js +5 -0
  126. package/css/reworkcss.js.map +1 -0
  127. package/css/system-classes.d.ts +12 -0
  128. package/css/system-classes.js +47 -0
  129. package/css/system-classes.js.map +1 -0
  130. package/css-mediaquery/index.d.ts +27 -0
  131. package/css-mediaquery/index.js +118 -0
  132. package/css-mediaquery/index.js.map +1 -0
  133. package/css-value/reworkcss-value.d.ts +31 -0
  134. package/css-value/reworkcss-value.js +91 -0
  135. package/css-value/reworkcss-value.js.map +1 -0
  136. package/data/observable/index.d.ts +213 -0
  137. package/data/observable/index.js +452 -0
  138. package/data/observable/index.js.map +1 -0
  139. package/data/observable-array/index.d.ts +215 -0
  140. package/data/observable-array/index.js +325 -0
  141. package/data/observable-array/index.js.map +1 -0
  142. package/data/virtual-array/index.d.ts +72 -0
  143. package/data/virtual-array/index.js +133 -0
  144. package/data/virtual-array/index.js.map +1 -0
  145. package/debugger/InspectorBackendCommands.d.ts +1056 -0
  146. package/debugger/InspectorBackendCommands.js +578 -0
  147. package/debugger/InspectorBackendCommands.js.map +1 -0
  148. package/debugger/devtools-elements-interfaces.d.ts +16 -0
  149. package/debugger/devtools-elements-interfaces.js +2 -0
  150. package/debugger/devtools-elements-interfaces.js.map +1 -0
  151. package/debugger/devtools-elements.common.d.ts +7 -0
  152. package/debugger/devtools-elements.common.js +93 -0
  153. package/debugger/devtools-elements.common.js.map +1 -0
  154. package/debugger/devtools-elements.js +20 -0
  155. package/debugger/devtools-elements.js.map +1 -0
  156. package/debugger/dom-types.d.ts +24 -0
  157. package/debugger/dom-types.js +152 -0
  158. package/debugger/dom-types.js.map +1 -0
  159. package/debugger/index.d.ts +87 -0
  160. package/debugger/index.js +118 -0
  161. package/debugger/index.js.map +1 -0
  162. package/debugger/webinspector-css.d.ts +34 -0
  163. package/debugger/webinspector-css.js +72 -0
  164. package/debugger/webinspector-css.js.map +1 -0
  165. package/debugger/webinspector-dom.d.ts +33 -0
  166. package/debugger/webinspector-dom.js +75 -0
  167. package/debugger/webinspector-dom.js.map +1 -0
  168. package/debugger/webinspector-network.android.d.ts +79 -0
  169. package/debugger/webinspector-network.android.js +208 -0
  170. package/debugger/webinspector-network.android.js.map +1 -0
  171. package/debugger/webinspector-network.ios.d.ts +79 -0
  172. package/debugger/webinspector-network.ios.js +204 -0
  173. package/debugger/webinspector-network.ios.js.map +1 -0
  174. package/fetch/index.d.ts +72 -0
  175. package/fetch/index.js +529 -0
  176. package/fetch/index.js.map +1 -0
  177. package/file-system/file-system-access.android.d.ts +151 -0
  178. package/file-system/file-system-access.android.js +1162 -0
  179. package/file-system/file-system-access.android.js.map +1 -0
  180. package/file-system/file-system-access.ios.d.ts +85 -0
  181. package/file-system/file-system-access.ios.js +622 -0
  182. package/file-system/file-system-access.ios.js.map +1 -0
  183. package/file-system/index.js +873 -0
  184. package/file-system/index.js.map +1 -0
  185. package/fps-meter/fps-native.android.d.ts +11 -0
  186. package/fps-meter/fps-native.android.js +62 -0
  187. package/fps-meter/fps-native.android.js.map +1 -0
  188. package/fps-meter/fps-native.ios.d.ts +10 -0
  189. package/fps-meter/fps-native.ios.js +56 -0
  190. package/fps-meter/fps-native.ios.js.map +1 -0
  191. package/fps-meter/index.js +77 -0
  192. package/fps-meter/index.js.map +1 -0
  193. package/globals/global-utils.d.ts +27 -0
  194. package/globals/global-utils.js +67 -0
  195. package/globals/global-utils.js.map +1 -0
  196. package/globals/index.d.ts +3 -0
  197. package/globals/index.js +313 -0
  198. package/globals/index.js.map +1 -0
  199. package/http/http-interfaces.d.ts +84 -0
  200. package/http/http-interfaces.js +6 -0
  201. package/http/http-interfaces.js.map +1 -0
  202. package/http/http-request/http-request-common.d.ts +1 -0
  203. package/http/http-request/http-request-common.js +15 -0
  204. package/http/http-request/http-request-common.js.map +1 -0
  205. package/http/http-request/index.android.d.ts +3 -0
  206. package/http/http-request/index.android.js +274 -0
  207. package/http/http-request/index.android.js.map +1 -0
  208. package/http/http-request/index.ios.d.ts +3 -0
  209. package/http/http-request/index.ios.js +221 -0
  210. package/http/http-request/index.ios.js.map +1 -0
  211. package/http/http-shared.d.ts +3 -0
  212. package/http/http-shared.js +2 -0
  213. package/http/http-shared.js.map +1 -0
  214. package/http/index.js +70 -0
  215. package/http/index.js.map +1 -0
  216. package/image-asset/image-asset-common.d.ts +25 -0
  217. package/image-asset/image-asset-common.js +74 -0
  218. package/image-asset/image-asset-common.js.map +1 -0
  219. package/image-asset/index.android.d.ts +9 -0
  220. package/image-asset/index.android.js +33 -0
  221. package/image-asset/index.android.js.map +1 -0
  222. package/image-asset/index.ios.d.ts +10 -0
  223. package/image-asset/index.ios.js +57 -0
  224. package/image-asset/index.ios.js.map +1 -0
  225. package/image-source/image-source-common.d.ts +4 -0
  226. package/image-source/image-source-common.js +21 -0
  227. package/image-source/image-source-common.js.map +1 -0
  228. package/image-source/index.android.d.ts +58 -0
  229. package/image-source/index.android.js +371 -0
  230. package/image-source/index.android.js.map +1 -0
  231. package/image-source/index.ios.d.ts +59 -0
  232. package/image-source/index.ios.js +454 -0
  233. package/image-source/index.ios.js.map +1 -0
  234. package/index.js +38 -0
  235. package/index.js.map +1 -0
  236. package/inspector_modules.d.ts +7 -0
  237. package/inspector_modules.js +233 -0
  238. package/inspector_modules.js.map +1 -0
  239. package/matrix/index.js +45 -0
  240. package/matrix/index.js.map +1 -0
  241. package/media-query-list/index.d.ts +21 -0
  242. package/media-query-list/index.js +159 -0
  243. package/media-query-list/index.js.map +1 -0
  244. package/module-name-resolver/helpers.d.ts +14 -0
  245. package/module-name-resolver/helpers.js +27 -0
  246. package/module-name-resolver/helpers.js.map +1 -0
  247. package/module-name-resolver/index.d.ts +14 -0
  248. package/module-name-resolver/index.js +67 -0
  249. package/module-name-resolver/index.js.map +1 -0
  250. package/module-name-resolver/non-bundle-workflow-compat.d.ts +6 -0
  251. package/module-name-resolver/non-bundle-workflow-compat.js +128 -0
  252. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -0
  253. package/module-name-resolver/qualifier-matcher/index.d.ts +11 -0
  254. package/module-name-resolver/qualifier-matcher/index.js +141 -0
  255. package/module-name-resolver/qualifier-matcher/index.js.map +1 -0
  256. package/package.json +86 -86
  257. package/platform/common.d.ts +10 -0
  258. package/platform/common.js +14 -0
  259. package/platform/common.js.map +1 -0
  260. package/platform/device/index.android.d.ts +20 -0
  261. package/platform/device/index.android.js +78 -0
  262. package/platform/device/index.android.js.map +1 -0
  263. package/platform/device/index.ios.d.ts +19 -0
  264. package/platform/device/index.ios.js +69 -0
  265. package/platform/device/index.ios.js.map +1 -0
  266. package/platform/index.js +4 -0
  267. package/platform/index.js.map +1 -0
  268. package/platform/screen/index.android.d.ts +16 -0
  269. package/platform/screen/index.android.js +41 -0
  270. package/platform/screen/index.android.js.map +1 -0
  271. package/platform/screen/index.ios.d.ts +15 -0
  272. package/platform/screen/index.ios.js +35 -0
  273. package/platform/screen/index.ios.js.map +1 -0
  274. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
  275. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
  276. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
  277. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +6 -0
  278. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Resources/Info.plist +52 -0
  279. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCCrypto.h +79 -0
  280. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCWinterTC.h +20 -0
  281. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSString+WinterTC.h +21 -0
  282. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Modules/module.modulemap +6 -0
  283. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/NSCWinterTC +0 -0
  284. package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Resources/Info.plist +52 -0
  285. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
  286. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
  287. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  288. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
  289. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
  290. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
  291. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
  292. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
  293. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
  294. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +6 -0
  295. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
  296. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
  297. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +52 -0
  298. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSCCrypto.h +60 -0
  299. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +24 -0
  300. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +22 -0
  301. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +25 -0
  302. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +16 -0
  303. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +29 -0
  304. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +25 -0
  305. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +26 -0
  306. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +17 -0
  307. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +6 -0
  308. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +17 -0
  309. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +18 -0
  310. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +52 -0
  311. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
  312. package/profiling/index.js +273 -0
  313. package/profiling/index.js.map +1 -0
  314. package/text/formatted-string.js +2 -0
  315. package/text/formatted-string.js.map +1 -0
  316. package/text/index.android.d.ts +9 -0
  317. package/text/index.android.js +11 -0
  318. package/text/index.android.js.map +1 -0
  319. package/text/index.ios.d.ts +9 -0
  320. package/text/index.ios.js +11 -0
  321. package/text/index.ios.js.map +1 -0
  322. package/text/span.js +2 -0
  323. package/text/span.js.map +1 -0
  324. package/text/text-common.d.ts +12 -0
  325. package/text/text-common.js +111 -0
  326. package/text/text-common.js.map +1 -0
  327. package/timer/index.android.d.ts +4 -0
  328. package/timer/index.android.js +83 -0
  329. package/timer/index.android.js.map +1 -0
  330. package/timer/index.ios.d.ts +4 -0
  331. package/timer/index.ios.js +68 -0
  332. package/timer/index.ios.js.map +1 -0
  333. package/trace/index.js +255 -0
  334. package/trace/index.js.map +1 -0
  335. package/ui/action-bar/action-bar-common.d.ts +85 -0
  336. package/ui/action-bar/action-bar-common.js +381 -0
  337. package/ui/action-bar/action-bar-common.js.map +1 -0
  338. package/ui/action-bar/index.android.d.ts +55 -0
  339. package/ui/action-bar/index.android.js +502 -0
  340. package/ui/action-bar/index.android.js.map +1 -0
  341. package/ui/action-bar/index.ios.d.ts +64 -0
  342. package/ui/action-bar/index.ios.js +614 -0
  343. package/ui/action-bar/index.ios.js.map +1 -0
  344. package/ui/activity-indicator/activity-indicator-common.d.ts +9 -0
  345. package/ui/activity-indicator/activity-indicator-common.js +22 -0
  346. package/ui/activity-indicator/activity-indicator-common.js.map +1 -0
  347. package/ui/activity-indicator/index.android.d.ts +15 -0
  348. package/ui/activity-indicator/index.android.js +54 -0
  349. package/ui/activity-indicator/index.android.js.map +1 -0
  350. package/ui/activity-indicator/index.ios.d.ts +16 -0
  351. package/ui/activity-indicator/index.ios.js +54 -0
  352. package/ui/activity-indicator/index.ios.js.map +1 -0
  353. package/ui/animation/animation-common.d.ts +30 -0
  354. package/ui/animation/animation-common.js +239 -0
  355. package/ui/animation/animation-common.js.map +1 -0
  356. package/ui/animation/animation-shared.d.ts +84 -0
  357. package/ui/animation/animation-shared.js +4 -0
  358. package/ui/animation/animation-shared.js.map +1 -0
  359. package/ui/animation/animation-types.d.ts +1 -0
  360. package/ui/animation/animation-types.js +3 -0
  361. package/ui/animation/animation-types.js.map +1 -0
  362. package/ui/animation/index.android.d.ts +23 -0
  363. package/ui/animation/index.android.js +432 -0
  364. package/ui/animation/index.android.js.map +1 -0
  365. package/ui/animation/index.ios.d.ts +28 -0
  366. package/ui/animation/index.ios.js +808 -0
  367. package/ui/animation/index.ios.js.map +1 -0
  368. package/ui/animation/keyframe-animation.d.ts +76 -0
  369. package/ui/animation/keyframe-animation.js +238 -0
  370. package/ui/animation/keyframe-animation.js.map +1 -0
  371. package/ui/builder/binding-builder.d.ts +13 -0
  372. package/ui/builder/binding-builder.js +171 -0
  373. package/ui/builder/binding-builder.js.map +1 -0
  374. package/ui/builder/component-builder/index.d.ts +7 -0
  375. package/ui/builder/component-builder/index.js +219 -0
  376. package/ui/builder/component-builder/index.js.map +1 -0
  377. package/ui/builder/index.d.ts +193 -0
  378. package/ui/builder/index.js +643 -0
  379. package/ui/builder/index.js.map +1 -0
  380. package/ui/button/button-common.d.ts +9 -0
  381. package/ui/button/button-common.js +26 -0
  382. package/ui/button/button-common.js.map +1 -0
  383. package/ui/button/index.android.d.ts +29 -0
  384. package/ui/button/index.android.js +166 -0
  385. package/ui/button/index.android.js.map +1 -0
  386. package/ui/button/index.ios.d.ts +37 -0
  387. package/ui/button/index.ios.js +316 -0
  388. package/ui/button/index.ios.js.map +1 -0
  389. package/ui/content-view/index.js +87 -0
  390. package/ui/content-view/index.js.map +1 -0
  391. package/ui/core/bindable/bindable-expressions.d.ts +7 -0
  392. package/ui/core/bindable/bindable-expressions.js +255 -0
  393. package/ui/core/bindable/bindable-expressions.js.map +1 -0
  394. package/ui/core/bindable/bindable-resources.d.ts +2 -0
  395. package/ui/core/bindable/bindable-resources.js +8 -0
  396. package/ui/core/bindable/bindable-resources.js.map +1 -0
  397. package/ui/core/bindable/bindable-types.d.ts +37 -0
  398. package/ui/core/bindable/bindable-types.js +3 -0
  399. package/ui/core/bindable/bindable-types.js.map +1 -0
  400. package/ui/core/bindable/index.d.ts +53 -0
  401. package/ui/core/bindable/index.js +555 -0
  402. package/ui/core/bindable/index.js.map +1 -0
  403. package/ui/core/control-state-change/index.android.d.ts +6 -0
  404. package/ui/core/control-state-change/index.android.js +8 -0
  405. package/ui/core/control-state-change/index.android.js.map +1 -0
  406. package/ui/core/control-state-change/index.ios.d.ts +10 -0
  407. package/ui/core/control-state-change/index.ios.js +43 -0
  408. package/ui/core/control-state-change/index.ios.js.map +1 -0
  409. package/ui/core/properties/index.d.ts +114 -0
  410. package/ui/core/properties/index.js +1290 -0
  411. package/ui/core/properties/index.js.map +1 -0
  412. package/ui/core/properties/property-shared.d.ts +35 -0
  413. package/ui/core/properties/property-shared.js +16 -0
  414. package/ui/core/properties/property-shared.js.map +1 -0
  415. package/ui/core/view/index.android.d.ts +144 -0
  416. package/ui/core/view/index.android.js +1576 -0
  417. package/ui/core/view/index.android.js.map +1 -0
  418. package/ui/core/view/index.ios.d.ts +151 -0
  419. package/ui/core/view/index.ios.js +1091 -0
  420. package/ui/core/view/index.ios.js.map +1 -0
  421. package/ui/core/view/view-common.d.ts +349 -0
  422. package/ui/core/view/view-common.js +1147 -0
  423. package/ui/core/view/view-common.js.map +1 -0
  424. package/ui/core/view/view-helper/index.android.d.ts +9 -0
  425. package/ui/core/view/view-helper/index.android.js +56 -0
  426. package/ui/core/view/view-helper/index.android.js.map +1 -0
  427. package/ui/core/view/view-helper/index.ios.d.ts +67 -0
  428. package/ui/core/view/view-helper/index.ios.js +414 -0
  429. package/ui/core/view/view-helper/index.ios.js.map +1 -0
  430. package/ui/core/view/view-helper/view-helper-common.d.ts +11 -0
  431. package/ui/core/view/view-helper/view-helper-common.js +166 -0
  432. package/ui/core/view/view-helper/view-helper-common.js.map +1 -0
  433. package/ui/core/view/view-helper/view-helper-shared.d.ts +5 -0
  434. package/ui/core/view/view-helper/view-helper-shared.js +6 -0
  435. package/ui/core/view/view-helper/view-helper-shared.js.map +1 -0
  436. package/ui/core/view/view-interfaces.d.ts +76 -0
  437. package/ui/core/view/view-interfaces.js +2 -0
  438. package/ui/core/view/view-interfaces.js.map +1 -0
  439. package/ui/core/view-base/index.d.ts +597 -0
  440. package/ui/core/view-base/index.js +1154 -0
  441. package/ui/core/view-base/index.js.map +1 -0
  442. package/ui/core/view-base/utils.d.ts +1 -0
  443. package/ui/core/view-base/utils.js +9 -0
  444. package/ui/core/view-base/utils.js.map +1 -0
  445. package/ui/core/weak-event-listener/index.js +123 -0
  446. package/ui/core/weak-event-listener/index.js.map +1 -0
  447. package/ui/date-picker/date-picker-common.d.ts +28 -0
  448. package/ui/date-picker/date-picker-common.js +82 -0
  449. package/ui/date-picker/date-picker-common.js.map +1 -0
  450. package/ui/date-picker/index.android.d.ts +19 -0
  451. package/ui/date-picker/index.android.js +131 -0
  452. package/ui/date-picker/index.android.js.map +1 -0
  453. package/ui/date-picker/index.ios.d.ts +27 -0
  454. package/ui/date-picker/index.ios.js +165 -0
  455. package/ui/date-picker/index.ios.js.map +1 -0
  456. package/ui/dialogs/dialogs-common.d.ts +211 -0
  457. package/ui/dialogs/dialogs-common.js +167 -0
  458. package/ui/dialogs/dialogs-common.js.map +1 -0
  459. package/ui/dialogs/index.android.d.ts +20 -0
  460. package/ui/dialogs/index.android.js +330 -0
  461. package/ui/dialogs/index.android.js.map +1 -0
  462. package/ui/dialogs/index.ios.d.ts +17 -0
  463. package/ui/dialogs/index.ios.js +293 -0
  464. package/ui/dialogs/index.ios.js.map +1 -0
  465. package/ui/editable-text-base/editable-text-base-common.d.ts +36 -0
  466. package/ui/editable-text-base/editable-text-base-common.js +91 -0
  467. package/ui/editable-text-base/editable-text-base-common.js.map +1 -0
  468. package/ui/editable-text-base/index.android.d.ts +48 -0
  469. package/ui/editable-text-base/index.android.js +497 -0
  470. package/ui/editable-text-base/index.android.js.map +1 -0
  471. package/ui/editable-text-base/index.ios.d.ts +20 -0
  472. package/ui/editable-text-base/index.ios.js +255 -0
  473. package/ui/editable-text-base/index.ios.js.map +1 -0
  474. package/ui/embedding/index.android.d.ts +4 -0
  475. package/ui/embedding/index.android.js +14 -0
  476. package/ui/embedding/index.android.js.map +1 -0
  477. package/ui/embedding/index.ios.d.ts +1 -0
  478. package/ui/embedding/index.ios.js +4 -0
  479. package/ui/embedding/index.ios.js.map +1 -0
  480. package/ui/enums/enums.js +6 -0
  481. package/ui/enums/enums.js.map +1 -0
  482. package/ui/enums/index.js +6 -0
  483. package/ui/enums/index.js.map +1 -0
  484. package/ui/frame/activity.android.d.ts +1 -0
  485. package/ui/frame/activity.android.js +110 -0
  486. package/ui/frame/activity.android.js.map +1 -0
  487. package/ui/frame/fragment.android.d.ts +3 -0
  488. package/ui/frame/fragment.android.js +90 -0
  489. package/ui/frame/fragment.android.js.map +1 -0
  490. package/ui/frame/fragment.ios.d.ts +3 -0
  491. package/ui/frame/fragment.ios.js +4 -0
  492. package/ui/frame/fragment.ios.js.map +1 -0
  493. package/ui/frame/fragment.transitions.android.d.ts +40 -0
  494. package/ui/frame/fragment.transitions.android.js +679 -0
  495. package/ui/frame/fragment.transitions.android.js.map +1 -0
  496. package/ui/frame/fragment.transitions.types.d.ts +6 -0
  497. package/ui/frame/fragment.transitions.types.js +2 -0
  498. package/ui/frame/fragment.transitions.types.js.map +1 -0
  499. package/ui/frame/frame-common.d.ts +101 -0
  500. package/ui/frame/frame-common.js +688 -0
  501. package/ui/frame/frame-common.js.map +1 -0
  502. package/ui/frame/frame-helper-for-android.d.ts +37 -0
  503. package/ui/frame/frame-helper-for-android.js +337 -0
  504. package/ui/frame/frame-helper-for-android.js.map +1 -0
  505. package/ui/frame/frame-helpers.d.ts +16 -0
  506. package/ui/frame/frame-helpers.js +19 -0
  507. package/ui/frame/frame-helpers.js.map +1 -0
  508. package/ui/frame/frame-interfaces.d.ts +130 -0
  509. package/ui/frame/frame-interfaces.js +7 -0
  510. package/ui/frame/frame-interfaces.js.map +1 -0
  511. package/ui/frame/frame-stack.d.ts +7 -0
  512. package/ui/frame/frame-stack.js +41 -0
  513. package/ui/frame/frame-stack.js.map +1 -0
  514. package/ui/frame/index.android.d.ts +93 -0
  515. package/ui/frame/index.android.js +977 -0
  516. package/ui/frame/index.android.js.map +1 -0
  517. package/ui/frame/index.ios.d.ts +61 -0
  518. package/ui/frame/index.ios.js +728 -0
  519. package/ui/frame/index.ios.js.map +1 -0
  520. package/ui/gestures/gestures-common.d.ts +32 -0
  521. package/ui/gestures/gestures-common.js +78 -0
  522. package/ui/gestures/gestures-common.js.map +1 -0
  523. package/ui/gestures/gestures-types.d.ts +108 -0
  524. package/ui/gestures/gestures-types.js +40 -0
  525. package/ui/gestures/gestures-types.js.map +1 -0
  526. package/ui/gestures/index.android.d.ts +49 -0
  527. package/ui/gestures/index.android.js +596 -0
  528. package/ui/gestures/index.android.js.map +1 -0
  529. package/ui/gestures/index.ios.d.ts +70 -0
  530. package/ui/gestures/index.ios.js +510 -0
  531. package/ui/gestures/index.ios.js.map +1 -0
  532. package/ui/gestures/touch-manager.d.ts +82 -0
  533. package/ui/gestures/touch-manager.js +268 -0
  534. package/ui/gestures/touch-manager.js.map +1 -0
  535. package/ui/html-view/html-view-common.d.ts +12 -0
  536. package/ui/html-view/html-view-common.js +31 -0
  537. package/ui/html-view/html-view-common.js.map +1 -0
  538. package/ui/html-view/index.android.d.ts +27 -0
  539. package/ui/html-view/index.android.js +90 -0
  540. package/ui/html-view/index.android.js.map +1 -0
  541. package/ui/html-view/index.ios.d.ts +22 -0
  542. package/ui/html-view/index.ios.js +101 -0
  543. package/ui/html-view/index.ios.js.map +1 -0
  544. package/ui/image/image-common.d.ts +45 -0
  545. package/ui/image/image-common.js +195 -0
  546. package/ui/image/image-common.js.map +1 -0
  547. package/ui/image/index.android.d.ts +23 -0
  548. package/ui/image/index.android.js +171 -0
  549. package/ui/image/index.android.js.map +1 -0
  550. package/ui/image/index.ios.d.ts +26 -0
  551. package/ui/image/index.ios.js +186 -0
  552. package/ui/image/index.ios.js.map +1 -0
  553. package/ui/image/symbol-effects-common.d.ts +36 -0
  554. package/ui/image/symbol-effects-common.js +35 -0
  555. package/ui/image/symbol-effects-common.js.map +1 -0
  556. package/ui/image/symbol-effects.android.d.ts +5 -0
  557. package/ui/image/symbol-effects.android.js +8 -0
  558. package/ui/image/symbol-effects.android.js.map +1 -0
  559. package/ui/image/symbol-effects.ios.d.ts +6 -0
  560. package/ui/image/symbol-effects.ios.js +79 -0
  561. package/ui/image/symbol-effects.ios.js.map +1 -0
  562. package/ui/image-cache/image-cache-common.d.ts +40 -0
  563. package/ui/image-cache/image-cache-common.js +176 -0
  564. package/ui/image-cache/image-cache-common.js.map +1 -0
  565. package/ui/image-cache/index.android.d.ts +11 -0
  566. package/ui/image-cache/index.android.js +74 -0
  567. package/ui/image-cache/index.android.js.map +1 -0
  568. package/ui/image-cache/index.ios.d.ts +11 -0
  569. package/ui/image-cache/index.ios.js +78 -0
  570. package/ui/image-cache/index.ios.js.map +1 -0
  571. package/ui/index.d.ts +92 -0
  572. package/ui/index.js +80 -0
  573. package/ui/index.js.map +1 -0
  574. package/ui/label/index.android.d.ts +13 -0
  575. package/ui/label/index.android.js +47 -0
  576. package/ui/label/index.android.js.map +1 -0
  577. package/ui/label/index.ios.d.ts +31 -0
  578. package/ui/label/index.ios.js +234 -0
  579. package/ui/label/index.ios.js.map +1 -0
  580. package/ui/layouts/absolute-layout/absolute-layout-common.d.ts +16 -0
  581. package/ui/layouts/absolute-layout/absolute-layout-common.js +72 -0
  582. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -0
  583. package/ui/layouts/absolute-layout/index.android.d.ts +6 -0
  584. package/ui/layouts/absolute-layout/index.android.js +26 -0
  585. package/ui/layouts/absolute-layout/index.android.js.map +1 -0
  586. package/ui/layouts/absolute-layout/index.ios.d.ts +10 -0
  587. package/ui/layouts/absolute-layout/index.ios.js +48 -0
  588. package/ui/layouts/absolute-layout/index.ios.js.map +1 -0
  589. package/ui/layouts/dock-layout/dock-layout-common.d.ts +14 -0
  590. package/ui/layouts/dock-layout/dock-layout-common.js +51 -0
  591. package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -0
  592. package/ui/layouts/dock-layout/index.android.d.ts +8 -0
  593. package/ui/layouts/dock-layout/index.android.js +38 -0
  594. package/ui/layouts/dock-layout/index.android.js.map +1 -0
  595. package/ui/layouts/dock-layout/index.ios.d.ts +8 -0
  596. package/ui/layouts/dock-layout/index.ios.js +115 -0
  597. package/ui/layouts/dock-layout/index.ios.js.map +1 -0
  598. package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +126 -0
  599. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +403 -0
  600. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -0
  601. package/ui/layouts/flexbox-layout/index.android.d.ts +23 -0
  602. package/ui/layouts/flexbox-layout/index.android.js +152 -0
  603. package/ui/layouts/flexbox-layout/index.android.js.map +1 -0
  604. package/ui/layouts/flexbox-layout/index.ios.d.ts +44 -0
  605. package/ui/layouts/flexbox-layout/index.ios.js +1241 -0
  606. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -0
  607. package/ui/layouts/grid-layout/grid-layout-common.d.ts +72 -0
  608. package/ui/layouts/grid-layout/grid-layout-common.js +358 -0
  609. package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -0
  610. package/ui/layouts/grid-layout/index.android.d.ts +23 -0
  611. package/ui/layouts/grid-layout/index.android.js +122 -0
  612. package/ui/layouts/grid-layout/index.android.js.map +1 -0
  613. package/ui/layouts/grid-layout/index.ios.d.ts +28 -0
  614. package/ui/layouts/grid-layout/index.ios.js +778 -0
  615. package/ui/layouts/grid-layout/index.ios.js.map +1 -0
  616. package/ui/layouts/index.d.ts +12 -0
  617. package/ui/layouts/index.js +11 -0
  618. package/ui/layouts/index.js.map +1 -0
  619. package/ui/layouts/layout-base-common.d.ts +36 -0
  620. package/ui/layouts/layout-base-common.js +141 -0
  621. package/ui/layouts/layout-base-common.js.map +1 -0
  622. package/ui/layouts/layout-base.android.d.ts +17 -0
  623. package/ui/layouts/layout-base.android.js +50 -0
  624. package/ui/layouts/layout-base.android.js.map +1 -0
  625. package/ui/layouts/layout-base.ios.d.ts +13 -0
  626. package/ui/layouts/layout-base.ios.js +40 -0
  627. package/ui/layouts/layout-base.ios.js.map +1 -0
  628. package/ui/layouts/liquid-glass/index.android.d.ts +5 -0
  629. package/ui/layouts/liquid-glass/index.android.js +8 -0
  630. package/ui/layouts/liquid-glass/index.android.js.map +1 -0
  631. package/ui/layouts/liquid-glass/index.ios.d.ts +10 -0
  632. package/ui/layouts/liquid-glass/index.ios.js +59 -0
  633. package/ui/layouts/liquid-glass/index.ios.js.map +1 -0
  634. package/ui/layouts/liquid-glass/liquid-glass-common.d.ts +3 -0
  635. package/ui/layouts/liquid-glass/liquid-glass-common.js +4 -0
  636. package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -0
  637. package/ui/layouts/liquid-glass-container/index.android.d.ts +3 -0
  638. package/ui/layouts/liquid-glass-container/index.android.js +4 -0
  639. package/ui/layouts/liquid-glass-container/index.android.js.map +1 -0
  640. package/ui/layouts/liquid-glass-container/index.ios.d.ts +14 -0
  641. package/ui/layouts/liquid-glass-container/index.ios.js +121 -0
  642. package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -0
  643. package/ui/layouts/liquid-glass-container/liquid-glass-container-common.d.ts +4 -0
  644. package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js +5 -0
  645. package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -0
  646. package/ui/layouts/root-layout/index.android.d.ts +15 -0
  647. package/ui/layouts/root-layout/index.android.js +126 -0
  648. package/ui/layouts/root-layout/index.android.js.map +1 -0
  649. package/ui/layouts/root-layout/index.ios.d.ts +17 -0
  650. package/ui/layouts/root-layout/index.ios.js +101 -0
  651. package/ui/layouts/root-layout/index.ios.js.map +1 -0
  652. package/ui/layouts/root-layout/root-layout-common.d.ts +61 -0
  653. package/ui/layouts/root-layout/root-layout-common.js +425 -0
  654. package/ui/layouts/root-layout/root-layout-common.js.map +1 -0
  655. package/ui/layouts/root-layout/root-layout-stack.d.ts +5 -0
  656. package/ui/layouts/root-layout/root-layout-stack.js +19 -0
  657. package/ui/layouts/root-layout/root-layout-stack.js.map +1 -0
  658. package/ui/layouts/stack-layout/index.android.d.ts +7 -0
  659. package/ui/layouts/stack-layout/index.android.js +11 -0
  660. package/ui/layouts/stack-layout/index.android.js.map +1 -0
  661. package/ui/layouts/stack-layout/index.ios.d.ts +10 -0
  662. package/ui/layouts/stack-layout/index.ios.js +155 -0
  663. package/ui/layouts/stack-layout/index.ios.js.map +1 -0
  664. package/ui/layouts/stack-layout/stack-layout-common.d.ts +8 -0
  665. package/ui/layouts/stack-layout/stack-layout-common.js +19 -0
  666. package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -0
  667. package/ui/layouts/wrap-layout/index.android.d.ts +10 -0
  668. package/ui/layouts/wrap-layout/index.android.js +18 -0
  669. package/ui/layouts/wrap-layout/index.android.js.map +1 -0
  670. package/ui/layouts/wrap-layout/index.ios.d.ts +8 -0
  671. package/ui/layouts/wrap-layout/index.ios.js +170 -0
  672. package/ui/layouts/wrap-layout/index.ios.js.map +1 -0
  673. package/ui/layouts/wrap-layout/wrap-layout-common.d.ts +15 -0
  674. package/ui/layouts/wrap-layout/wrap-layout-common.js +40 -0
  675. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -0
  676. package/ui/list-picker/index.android.d.ts +18 -0
  677. package/ui/list-picker/index.android.js +177 -0
  678. package/ui/list-picker/index.android.js.map +1 -0
  679. package/ui/list-picker/index.ios.d.ts +19 -0
  680. package/ui/list-picker/index.ios.js +99 -0
  681. package/ui/list-picker/index.ios.js.map +1 -0
  682. package/ui/list-picker/list-picker-common.d.ts +23 -0
  683. package/ui/list-picker/list-picker-common.js +78 -0
  684. package/ui/list-picker/list-picker-common.js.map +1 -0
  685. package/ui/list-view/index.android.d.ts +68 -0
  686. package/ui/list-view/index.android.js +1005 -0
  687. package/ui/list-view/index.android.js.map +1 -0
  688. package/ui/list-view/index.ios.d.ts +84 -0
  689. package/ui/list-view/index.ios.js +996 -0
  690. package/ui/list-view/index.ios.js.map +1 -0
  691. package/ui/list-view/list-view-common.d.ts +87 -0
  692. package/ui/list-view/list-view-common.js +296 -0
  693. package/ui/list-view/list-view-common.js.map +1 -0
  694. package/ui/page/events.d.ts +6 -0
  695. package/ui/page/events.js +7 -0
  696. package/ui/page/events.js.map +1 -0
  697. package/ui/page/index.android.d.ts +16 -0
  698. package/ui/page/index.android.js +106 -0
  699. package/ui/page/index.android.js.map +1 -0
  700. package/ui/page/index.ios.d.ts +52 -0
  701. package/ui/page/index.ios.js +515 -0
  702. package/ui/page/index.ios.js.map +1 -0
  703. package/ui/page/page-common.d.ts +73 -0
  704. package/ui/page/page-common.js +191 -0
  705. package/ui/page/page-common.js.map +1 -0
  706. package/ui/placeholder/index.android.d.ts +12 -0
  707. package/ui/placeholder/index.android.js +21 -0
  708. package/ui/placeholder/index.android.js.map +1 -0
  709. package/ui/placeholder/index.js +16 -0
  710. package/ui/placeholder/index.js.map +1 -0
  711. package/ui/placeholder/placeholder-common.d.ts +11 -0
  712. package/ui/placeholder/placeholder-common.js +2 -0
  713. package/ui/placeholder/placeholder-common.js.map +1 -0
  714. package/ui/progress/index.android.d.ts +18 -0
  715. package/ui/progress/index.android.js +65 -0
  716. package/ui/progress/index.android.js.map +1 -0
  717. package/ui/progress/index.ios.d.ts +19 -0
  718. package/ui/progress/index.ios.js +45 -0
  719. package/ui/progress/index.ios.js.map +1 -0
  720. package/ui/progress/progress-common.d.ts +15 -0
  721. package/ui/progress/progress-common.js +34 -0
  722. package/ui/progress/progress-common.js.map +1 -0
  723. package/ui/proxy-view-container/index.d.ts +33 -0
  724. package/ui/proxy-view-container/index.js +247 -0
  725. package/ui/proxy-view-container/index.js.map +1 -0
  726. package/ui/repeater/index.d.ts +67 -0
  727. package/ui/repeater/index.js +225 -0
  728. package/ui/repeater/index.js.map +1 -0
  729. package/ui/scroll-view/index.android.d.ts +27 -0
  730. package/ui/scroll-view/index.android.js +157 -0
  731. package/ui/scroll-view/index.android.js.map +1 -0
  732. package/ui/scroll-view/index.ios.d.ts +29 -0
  733. package/ui/scroll-view/index.ios.js +193 -0
  734. package/ui/scroll-view/index.ios.js.map +1 -0
  735. package/ui/scroll-view/scroll-view-common.d.ts +27 -0
  736. package/ui/scroll-view/scroll-view-common.js +93 -0
  737. package/ui/scroll-view/scroll-view-common.js.map +1 -0
  738. package/ui/search-bar/index.android.d.ts +44 -0
  739. package/ui/search-bar/index.android.js +260 -0
  740. package/ui/search-bar/index.android.js.map +1 -0
  741. package/ui/search-bar/index.ios.d.ts +36 -0
  742. package/ui/search-bar/index.ios.js +203 -0
  743. package/ui/search-bar/index.ios.js.map +1 -0
  744. package/ui/search-bar/search-bar-common.d.ts +19 -0
  745. package/ui/search-bar/search-bar-common.js +43 -0
  746. package/ui/search-bar/search-bar-common.js.map +1 -0
  747. package/ui/segmented-bar/index.android.d.ts +42 -0
  748. package/ui/segmented-bar/index.android.js +280 -0
  749. package/ui/segmented-bar/index.android.js.map +1 -0
  750. package/ui/segmented-bar/index.ios.d.ts +28 -0
  751. package/ui/segmented-bar/index.ios.js +141 -0
  752. package/ui/segmented-bar/index.ios.js.map +1 -0
  753. package/ui/segmented-bar/segmented-bar-common.d.ts +37 -0
  754. package/ui/segmented-bar/segmented-bar-common.js +146 -0
  755. package/ui/segmented-bar/segmented-bar-common.js.map +1 -0
  756. package/ui/slider/index.android.d.ts +32 -0
  757. package/ui/slider/index.android.js +123 -0
  758. package/ui/slider/index.android.js.map +1 -0
  759. package/ui/slider/index.ios.d.ts +34 -0
  760. package/ui/slider/index.ios.js +145 -0
  761. package/ui/slider/index.ios.js.map +1 -0
  762. package/ui/slider/slider-common.d.ts +27 -0
  763. package/ui/slider/slider-common.js +69 -0
  764. package/ui/slider/slider-common.js.map +1 -0
  765. package/ui/split-view/index.android.d.ts +3 -0
  766. package/ui/split-view/index.android.js +4 -0
  767. package/ui/split-view/index.android.js.map +1 -0
  768. package/ui/split-view/index.ios.d.ts +51 -0
  769. package/ui/split-view/index.ios.js +567 -0
  770. package/ui/split-view/index.ios.js.map +1 -0
  771. package/ui/split-view/split-view-common.d.ts +59 -0
  772. package/ui/split-view/split-view-common.js +127 -0
  773. package/ui/split-view/split-view-common.js.map +1 -0
  774. package/ui/styling/background-common.d.ts +78 -0
  775. package/ui/styling/background-common.js +241 -0
  776. package/ui/styling/background-common.js.map +1 -0
  777. package/ui/styling/background.android.d.ts +3 -0
  778. package/ui/styling/background.android.js +82 -0
  779. package/ui/styling/background.android.js.map +1 -0
  780. package/ui/styling/background.ios.d.ts +21 -0
  781. package/ui/styling/background.ios.js +1105 -0
  782. package/ui/styling/background.ios.js.map +1 -0
  783. package/ui/styling/box-shadow.d.ts +9 -0
  784. package/ui/styling/box-shadow.js +3 -0
  785. package/ui/styling/box-shadow.js.map +1 -0
  786. package/ui/styling/clip-path-function.d.ts +16 -0
  787. package/ui/styling/clip-path-function.js +25 -0
  788. package/ui/styling/clip-path-function.js.map +1 -0
  789. package/ui/styling/converters.d.ts +2 -0
  790. package/ui/styling/converters.js +41 -0
  791. package/ui/styling/converters.js.map +1 -0
  792. package/ui/styling/css-animation-parser.d.ts +14 -0
  793. package/ui/styling/css-animation-parser.js +187 -0
  794. package/ui/styling/css-animation-parser.js.map +1 -0
  795. package/ui/styling/css-selector.d.ts +270 -0
  796. package/ui/styling/css-selector.js +934 -0
  797. package/ui/styling/css-selector.js.map +1 -0
  798. package/ui/styling/css-shadow.d.ts +19 -0
  799. package/ui/styling/css-shadow.js +26 -0
  800. package/ui/styling/css-shadow.js.map +1 -0
  801. package/ui/styling/css-stroke.d.ts +12 -0
  802. package/ui/styling/css-stroke.js +19 -0
  803. package/ui/styling/css-stroke.js.map +1 -0
  804. package/ui/styling/css-transform.d.ts +2 -0
  805. package/ui/styling/css-transform.js +110 -0
  806. package/ui/styling/css-transform.js.map +1 -0
  807. package/ui/styling/css-utils.d.ts +8 -0
  808. package/ui/styling/css-utils.js +73 -0
  809. package/ui/styling/css-utils.js.map +1 -0
  810. package/ui/styling/font-common.d.ts +62 -0
  811. package/ui/styling/font-common.js +195 -0
  812. package/ui/styling/font-common.js.map +1 -0
  813. package/ui/styling/font-interfaces.d.ts +16 -0
  814. package/ui/styling/font-interfaces.js +2 -0
  815. package/ui/styling/font-interfaces.js.map +1 -0
  816. package/ui/styling/font.android.d.ts +15 -0
  817. package/ui/styling/font.android.js +226 -0
  818. package/ui/styling/font.android.js.map +1 -0
  819. package/ui/styling/font.ios.d.ts +18 -0
  820. package/ui/styling/font.ios.js +159 -0
  821. package/ui/styling/font.ios.js.map +1 -0
  822. package/ui/styling/length-shared.d.ts +52 -0
  823. package/ui/styling/length-shared.js +173 -0
  824. package/ui/styling/length-shared.js.map +1 -0
  825. package/ui/styling/linear-gradient.d.ts +13 -0
  826. package/ui/styling/linear-gradient.js +48 -0
  827. package/ui/styling/linear-gradient.js.map +1 -0
  828. package/ui/styling/style/index.d.ts +166 -0
  829. package/ui/styling/style/index.js +67 -0
  830. package/ui/styling/style/index.js.map +1 -0
  831. package/ui/styling/style-properties.d.ts +63 -0
  832. package/ui/styling/style-properties.js +1151 -0
  833. package/ui/styling/style-properties.js.map +1 -0
  834. package/ui/styling/style-scope.d.ts +87 -0
  835. package/ui/styling/style-scope.js +1020 -0
  836. package/ui/styling/style-scope.js.map +1 -0
  837. package/ui/styling/styling-profile.d.ts +1 -0
  838. package/ui/styling/styling-profile.js +4 -0
  839. package/ui/styling/styling-profile.js.map +1 -0
  840. package/ui/styling/styling-shared.d.ts +3 -0
  841. package/ui/styling/styling-shared.js +6 -0
  842. package/ui/styling/styling-shared.js.map +1 -0
  843. package/ui/switch/index.android.d.ts +23 -0
  844. package/ui/switch/index.android.js +111 -0
  845. package/ui/switch/index.android.js.map +1 -0
  846. package/ui/switch/index.ios.d.ts +26 -0
  847. package/ui/switch/index.ios.js +185 -0
  848. package/ui/switch/index.ios.js.map +1 -0
  849. package/ui/switch/switch-common.d.ts +12 -0
  850. package/ui/switch/switch-common.js +37 -0
  851. package/ui/switch/switch-common.js.map +1 -0
  852. package/ui/tab-view/index.android.d.ts +73 -0
  853. package/ui/tab-view/index.android.js +646 -0
  854. package/ui/tab-view/index.android.js.map +1 -0
  855. package/ui/tab-view/index.ios.d.ts +80 -0
  856. package/ui/tab-view/index.ios.js +877 -0
  857. package/ui/tab-view/index.ios.js.map +1 -0
  858. package/ui/tab-view/tab-view-common.d.ts +86 -0
  859. package/ui/tab-view/tab-view-common.js +277 -0
  860. package/ui/tab-view/tab-view-common.js.map +1 -0
  861. package/ui/text-base/formatted-string.js +163 -0
  862. package/ui/text-base/formatted-string.js.map +1 -0
  863. package/ui/text-base/index.android.d.ts +79 -0
  864. package/ui/text-base/index.android.js +589 -0
  865. package/ui/text-base/index.android.js.map +1 -0
  866. package/ui/text-base/index.ios.d.ts +53 -0
  867. package/ui/text-base/index.ios.js +452 -0
  868. package/ui/text-base/index.ios.js.map +1 -0
  869. package/ui/text-base/span.js +113 -0
  870. package/ui/text-base/span.js.map +1 -0
  871. package/ui/text-base/text-base-common.d.ts +99 -0
  872. package/ui/text-base/text-base-common.js +324 -0
  873. package/ui/text-base/text-base-common.js.map +1 -0
  874. package/ui/text-field/index.android.d.ts +10 -0
  875. package/ui/text-field/index.android.js +92 -0
  876. package/ui/text-field/index.android.js.map +1 -0
  877. package/ui/text-field/index.ios.d.ts +56 -0
  878. package/ui/text-field/index.ios.js +315 -0
  879. package/ui/text-field/index.ios.js.map +1 -0
  880. package/ui/text-field/text-field-common.d.ts +11 -0
  881. package/ui/text-field/text-field-common.js +25 -0
  882. package/ui/text-field/text-field-common.js.map +1 -0
  883. package/ui/text-view/index.android.d.ts +8 -0
  884. package/ui/text-view/index.android.js +24 -0
  885. package/ui/text-view/index.android.js.map +1 -0
  886. package/ui/text-view/index.ios.d.ts +59 -0
  887. package/ui/text-view/index.ios.js +432 -0
  888. package/ui/text-view/index.ios.js.map +1 -0
  889. package/ui/text-view/text-view-common.d.ts +32 -0
  890. package/ui/text-view/text-view-common.js +39 -0
  891. package/ui/text-view/text-view-common.js.map +1 -0
  892. package/ui/time-picker/index.android.d.ts +10 -0
  893. package/ui/time-picker/index.android.js +79 -0
  894. package/ui/time-picker/index.android.js.map +1 -0
  895. package/ui/time-picker/index.ios.d.ts +31 -0
  896. package/ui/time-picker/index.ios.js +138 -0
  897. package/ui/time-picker/index.ios.js.map +1 -0
  898. package/ui/time-picker/time-picker-common.d.ts +31 -0
  899. package/ui/time-picker/time-picker-common.js +176 -0
  900. package/ui/time-picker/time-picker-common.js.map +1 -0
  901. package/ui/transition/fade-transition.android.d.ts +4 -0
  902. package/ui/transition/fade-transition.android.js +28 -0
  903. package/ui/transition/fade-transition.android.js.map +1 -0
  904. package/ui/transition/fade-transition.ios.d.ts +17 -0
  905. package/ui/transition/fade-transition.ios.js +64 -0
  906. package/ui/transition/fade-transition.ios.js.map +1 -0
  907. package/ui/transition/flip-transition.android.d.ts +6 -0
  908. package/ui/transition/flip-transition.android.js +90 -0
  909. package/ui/transition/flip-transition.android.js.map +1 -0
  910. package/ui/transition/index.android.d.ts +19 -0
  911. package/ui/transition/index.android.js +37 -0
  912. package/ui/transition/index.android.js.map +1 -0
  913. package/ui/transition/index.ios.d.ts +14 -0
  914. package/ui/transition/index.ios.js +30 -0
  915. package/ui/transition/index.ios.js.map +1 -0
  916. package/ui/transition/modal-transition.android.d.ts +5 -0
  917. package/ui/transition/modal-transition.android.js +7 -0
  918. package/ui/transition/modal-transition.android.js.map +1 -0
  919. package/ui/transition/modal-transition.ios.d.ts +34 -0
  920. package/ui/transition/modal-transition.ios.js +175 -0
  921. package/ui/transition/modal-transition.ios.js.map +1 -0
  922. package/ui/transition/page-transition.android.d.ts +9 -0
  923. package/ui/transition/page-transition.android.js +284 -0
  924. package/ui/transition/page-transition.android.js.map +1 -0
  925. package/ui/transition/page-transition.ios.d.ts +35 -0
  926. package/ui/transition/page-transition.ios.js +193 -0
  927. package/ui/transition/page-transition.ios.js.map +1 -0
  928. package/ui/transition/shared-transition-helper.android.d.ts +9 -0
  929. package/ui/transition/shared-transition-helper.android.js +10 -0
  930. package/ui/transition/shared-transition-helper.android.js.map +1 -0
  931. package/ui/transition/shared-transition-helper.ios.d.ts +14 -0
  932. package/ui/transition/shared-transition-helper.ios.js +539 -0
  933. package/ui/transition/shared-transition-helper.ios.js.map +1 -0
  934. package/ui/transition/shared-transition.d.ts +271 -0
  935. package/ui/transition/shared-transition.js +215 -0
  936. package/ui/transition/shared-transition.js.map +1 -0
  937. package/ui/transition/slide-transition.android.d.ts +7 -0
  938. package/ui/transition/slide-transition.android.js +116 -0
  939. package/ui/transition/slide-transition.android.js.map +1 -0
  940. package/ui/transition/slide-transition.ios.d.ts +19 -0
  941. package/ui/transition/slide-transition.ios.js +94 -0
  942. package/ui/transition/slide-transition.ios.js.map +1 -0
  943. package/ui/utils.android.d.ts +5 -0
  944. package/ui/utils.android.js +16 -0
  945. package/ui/utils.android.js.map +1 -0
  946. package/ui/utils.ios.d.ts +11 -0
  947. package/ui/utils.ios.js +66 -0
  948. package/ui/utils.ios.js.map +1 -0
  949. package/ui/web-view/index.android.d.ts +18 -0
  950. package/ui/web-view/index.android.js +173 -0
  951. package/ui/web-view/index.android.js.map +1 -0
  952. package/ui/web-view/index.ios.d.ts +27 -0
  953. package/ui/web-view/index.ios.js +246 -0
  954. package/ui/web-view/index.ios.js.map +1 -0
  955. package/ui/web-view/web-view-common.d.ts +30 -0
  956. package/ui/web-view/web-view-common.js +74 -0
  957. package/ui/web-view/web-view-common.js.map +1 -0
  958. package/ui/web-view/web-view-interfaces.d.ts +11 -0
  959. package/ui/web-view/web-view-interfaces.js +2 -0
  960. package/ui/web-view/web-view-interfaces.js.map +1 -0
  961. package/utils/animation-helpers.d.ts +27 -0
  962. package/utils/animation-helpers.js +48 -0
  963. package/utils/animation-helpers.js.map +1 -0
  964. package/utils/common.d.ts +28 -0
  965. package/utils/common.js +158 -0
  966. package/utils/common.js.map +1 -0
  967. package/utils/constants.android.d.ts +2 -0
  968. package/utils/constants.android.js +5 -0
  969. package/utils/constants.android.js.map +1 -0
  970. package/utils/constants.ios.d.ts +2 -0
  971. package/utils/constants.ios.js +5 -0
  972. package/utils/constants.ios.js.map +1 -0
  973. package/utils/debug-source.d.ts +19 -0
  974. package/utils/debug-source.js +78 -0
  975. package/utils/debug-source.js.map +1 -0
  976. package/utils/debug.js +3 -0
  977. package/utils/debug.js.map +1 -0
  978. package/utils/index.android.d.ts +26 -0
  979. package/utils/index.android.js +205 -0
  980. package/utils/index.android.js.map +1 -0
  981. package/utils/index.ios.d.ts +22 -0
  982. package/utils/index.ios.js +113 -0
  983. package/utils/index.ios.js.map +1 -0
  984. package/utils/layout-helper/index.android.d.ts +25 -0
  985. package/utils/layout-helper/index.android.js +86 -0
  986. package/utils/layout-helper/index.android.js.map +1 -0
  987. package/utils/layout-helper/index.ios.d.ts +25 -0
  988. package/utils/layout-helper/index.ios.js +68 -0
  989. package/utils/layout-helper/index.ios.js.map +1 -0
  990. package/utils/layout-helper/layout-helper-common.d.ts +5 -0
  991. package/utils/layout-helper/layout-helper-common.js +49 -0
  992. package/utils/layout-helper/layout-helper-common.js.map +1 -0
  993. package/utils/layout-helper/layout-helper-shared.d.ts +9 -0
  994. package/utils/layout-helper/layout-helper-shared.js +13 -0
  995. package/utils/layout-helper/layout-helper-shared.js.map +1 -0
  996. package/utils/lazy.js +5 -0
  997. package/utils/lazy.js.map +1 -0
  998. package/utils/macrotask-scheduler.js +26 -0
  999. package/utils/macrotask-scheduler.js.map +1 -0
  1000. package/utils/mainthread-helper.android.d.ts +3 -0
  1001. package/utils/mainthread-helper.android.js +28 -0
  1002. package/utils/mainthread-helper.android.js.map +1 -0
  1003. package/utils/mainthread-helper.ios.d.ts +3 -0
  1004. package/utils/mainthread-helper.ios.js +17 -0
  1005. package/utils/mainthread-helper.ios.js.map +1 -0
  1006. package/utils/module-merge.d.ts +1 -0
  1007. package/utils/module-merge.js +8 -0
  1008. package/utils/module-merge.js.map +1 -0
  1009. package/utils/native-helper-for-android.d.ts +45 -0
  1010. package/utils/native-helper-for-android.js +376 -0
  1011. package/utils/native-helper-for-android.js.map +1 -0
  1012. package/utils/native-helper.android.d.ts +42 -0
  1013. package/utils/native-helper.android.js +30 -0
  1014. package/utils/native-helper.android.js.map +1 -0
  1015. package/utils/native-helper.ios.d.ts +79 -0
  1016. package/utils/native-helper.ios.js +339 -0
  1017. package/utils/native-helper.ios.js.map +1 -0
  1018. package/utils/number-utils.d.ts +19 -0
  1019. package/utils/number-utils.js +37 -0
  1020. package/utils/number-utils.js.map +1 -0
  1021. package/utils/platform-check.d.ts +4 -0
  1022. package/utils/platform-check.js +21 -0
  1023. package/utils/platform-check.js.map +1 -0
  1024. package/utils/shared.d.ts +17 -0
  1025. package/utils/shared.js +40 -0
  1026. package/utils/shared.js.map +1 -0
  1027. package/utils/types.js +104 -0
  1028. package/utils/types.js.map +1 -0
  1029. package/utils/utils-shared.d.ts +1 -0
  1030. package/utils/utils-shared.js +8 -0
  1031. package/utils/utils-shared.js.map +1 -0
  1032. package/wgc/atob.d.ts +1 -0
  1033. package/wgc/atob.js +9 -0
  1034. package/wgc/atob.js.map +1 -0
  1035. package/wgc/btoa.d.ts +1 -0
  1036. package/wgc/btoa.js +9 -0
  1037. package/wgc/btoa.js.map +1 -0
  1038. package/wgc/crypto/SubtleCrypto.d.ts +63 -0
  1039. package/wgc/crypto/SubtleCrypto.js +551 -0
  1040. package/wgc/crypto/SubtleCrypto.js.map +1 -0
  1041. package/wgc/crypto/index.d.ts +8 -0
  1042. package/wgc/crypto/index.js +32 -0
  1043. package/wgc/crypto/index.js.map +1 -0
  1044. package/wgc/index.d.ts +2 -0
  1045. package/wgc/index.js +3 -0
  1046. package/wgc/index.js.map +1 -0
  1047. package/xhr/index.d.ts +113 -0
  1048. package/xhr/index.js +486 -0
  1049. package/xhr/index.js.map +1 -0
  1050. package/xml/index.d.ts +108 -0
  1051. package/xml/index.js +574 -0
  1052. package/xml/index.js.map +1 -0
  1053. package/css/package.json +0 -36
  1054. package/css-value/package.json +0 -23
@@ -0,0 +1,1481 @@
1
+ import { profile } from '../profiling';
2
+ import { isEmbedded } from '../ui/embedding';
3
+ import { IOSHelper } from '../ui/core/view/view-helper';
4
+ import { getWindow } from '../utils/native-helper';
5
+ import { SDK_VERSION } from '../utils/constants';
6
+ import { ios as iosUtils, dataSerialize } from '../utils/native-helper';
7
+ import { ApplicationCommon, initializeSdkVersionClass, SceneEvents } from './application-common';
8
+ import { Observable } from '../data/observable';
9
+ import { Trace } from '../trace';
10
+ import { AccessibilityServiceEnabledPropName, CommonA11YServiceEnabledObservable, SharedA11YObservable, a11yServiceClasses, a11yServiceDisabledClass, a11yServiceEnabledClass, fontScaleCategoryClasses, fontScaleExtraLargeCategoryClass, fontScaleExtraSmallCategoryClass, fontScaleMediumCategoryClass, getCurrentA11YServiceClass, getCurrentFontScaleCategory, getCurrentFontScaleClass, getFontScaleCssClasses, setCurrentA11YServiceClass, setCurrentFontScaleCategory, setCurrentFontScaleClass, setFontScaleCssClasses, FontScaleCategory, getClosestValidFontScale, VALID_FONT_SCALES, setFontScale, getFontScale, setInitFontScale, getFontScaleCategory, setInitAccessibilityCssHelper, notifyAccessibilityFocusState, AccessibilityLiveRegion, AccessibilityRole, AccessibilityState, AccessibilityTrait, isA11yEnabled, setA11yEnabled, enforceArray, } from '../accessibility/accessibility-common';
11
+ import { CoreTypes } from '../core-types';
12
+ import { getiOSWindow, setA11yUpdatePropertiesCallback, setApplicationPropertiesCallback, setAppMainEntry, setiOSWindow, setRootView, setToggleApplicationEventListenersCallback } from './helpers-common';
13
+ var NotificationObserver = (function (_super) {
14
+ __extends(NotificationObserver, _super);
15
+ function NotificationObserver() {
16
+ return _super !== null && _super.apply(this, arguments) || this;
17
+ }
18
+ NotificationObserver.initWithCallback = function (onReceiveCallback) {
19
+ var observer = _super.new.call(this);
20
+ observer._onReceiveCallback = onReceiveCallback;
21
+ return observer;
22
+ };
23
+ NotificationObserver.prototype.onReceive = function (notification) {
24
+ this._onReceiveCallback(notification);
25
+ };
26
+ NotificationObserver.ObjCExposedMethods = {
27
+ onReceive: { returns: interop.types.void, params: [NSNotification] },
28
+ };
29
+ return NotificationObserver;
30
+ }(NSObject));
31
+ var CADisplayLinkTarget = (function (_super) {
32
+ __extends(CADisplayLinkTarget, _super);
33
+ function CADisplayLinkTarget() {
34
+ return _super !== null && _super.apply(this, arguments) || this;
35
+ }
36
+ CADisplayLinkTarget.initWithOwner = function (owner) {
37
+ var target = CADisplayLinkTarget.new();
38
+ target._owner = owner;
39
+ return target;
40
+ };
41
+ CADisplayLinkTarget.prototype.onDisplayed = function (link) {
42
+ link.invalidate();
43
+ var owner = this._owner.deref();
44
+ if (!owner) {
45
+ return;
46
+ }
47
+ owner.displayedOnce = true;
48
+ owner.notify({
49
+ eventName: owner.displayedEvent,
50
+ object: owner,
51
+ ios: UIApplication.sharedApplication,
52
+ });
53
+ owner.displayedLinkTarget = null;
54
+ owner.displayedLink = null;
55
+ };
56
+ CADisplayLinkTarget.ObjCExposedMethods = {
57
+ onDisplayed: { returns: interop.types.void, params: [CADisplayLink] },
58
+ };
59
+ return CADisplayLinkTarget;
60
+ }(NSObject));
61
+ /**
62
+ * Detect if the app supports scenes.
63
+ * When an app configures UIApplicationSceneManifest in Info.plist
64
+ * it will use scene lifecycle management.
65
+ */
66
+ let sceneManifest;
67
+ function supportsScenes() {
68
+ if (SDK_VERSION < 13) {
69
+ return false;
70
+ }
71
+ if (typeof sceneManifest === 'undefined') {
72
+ // Check if scene manifest exists in Info.plist
73
+ sceneManifest = NSBundle.mainBundle.objectForInfoDictionaryKey('UIApplicationSceneManifest');
74
+ }
75
+ return !!sceneManifest;
76
+ }
77
+ function supportsMultipleScenes() {
78
+ if (SDK_VERSION < 13) {
79
+ return false;
80
+ }
81
+ return UIApplication.sharedApplication?.supportsMultipleScenes;
82
+ }
83
+ var Responder = (function (_super) {
84
+ __extends(Responder, _super);
85
+ function Responder() {
86
+ return _super !== null && _super.apply(this, arguments) || this;
87
+ }
88
+ Object.defineProperty(Responder.prototype, "window", {
89
+ get: function () {
90
+ return Application.ios.window;
91
+ },
92
+ set: function (value) {
93
+ },
94
+ enumerable: true,
95
+ configurable: true
96
+ });
97
+ Responder.ObjCProtocols = [UIApplicationDelegate];
98
+ return Responder;
99
+ }(UIResponder));
100
+ if (supportsScenes()) {
101
+ /**
102
+ * This method is called when a new scene session is being created.
103
+ * Important: When this method is implemented, the app assumes scene-based lifecycle management.
104
+ * Detected by the Info.plist existence 'UIApplicationSceneManifest'.
105
+ * If this method is implemented when there is no manifest defined,
106
+ * the app will boot to a white screen.
107
+ */
108
+ Responder.prototype.applicationConfigurationForConnectingSceneSessionOptions = function (application, connectingSceneSession, options) {
109
+ const config = UISceneConfiguration.configurationWithNameSessionRole('Default Configuration', connectingSceneSession.role);
110
+ config.sceneClass = UIWindowScene;
111
+ config.delegateClass = SceneDelegate;
112
+ return config;
113
+ };
114
+ // scene session destruction handling
115
+ Responder.prototype.applicationDidDiscardSceneSessions = function (application, sceneSessions) {
116
+ // Note: we could emit an event here if needed
117
+ // console.log('Scene sessions discarded:', sceneSessions.count);
118
+ };
119
+ }
120
+ var SceneDelegate = (function (_super) {
121
+ __extends(SceneDelegate, _super);
122
+ function SceneDelegate() {
123
+ return _super !== null && _super.apply(this, arguments) || this;
124
+ }
125
+ Object.defineProperty(SceneDelegate.prototype, "window", {
126
+ get: function () {
127
+ return this._window;
128
+ },
129
+ set: function (value) {
130
+ this._window = value;
131
+ },
132
+ enumerable: true,
133
+ configurable: true
134
+ });
135
+ SceneDelegate.prototype.sceneWillConnectToSessionOptions = function (scene, session, connectionOptions) {
136
+ if (Trace.isEnabled()) {
137
+ Trace.write("SceneDelegate.sceneWillConnectToSessionOptions called with role: ".concat(session.role), Trace.categories.NativeLifecycle);
138
+ }
139
+ if (!(scene instanceof UIWindowScene)) {
140
+ return;
141
+ }
142
+ this._scene = scene;
143
+ this._window = UIWindow.alloc().initWithWindowScene(scene);
144
+ Application.ios._setWindowForScene(this._window, scene);
145
+ Application.ios._setupWindowForScene(this._window, scene);
146
+ Application.ios.notify({
147
+ eventName: SceneEvents.sceneWillConnect,
148
+ object: Application.ios,
149
+ scene: scene,
150
+ window: this._window,
151
+ connectionOptions: connectionOptions,
152
+ });
153
+ if (scene === Application.ios.getPrimaryScene()) {
154
+ this._window.makeKeyAndVisible();
155
+ }
156
+ else {
157
+ Application.ios.notify({
158
+ eventName: SceneEvents.sceneContentSetup,
159
+ object: Application.ios,
160
+ scene: scene,
161
+ window: this._window,
162
+ connectionOptions: connectionOptions,
163
+ });
164
+ }
165
+ if (!Application.ios.getPrimaryScene()) {
166
+ Application.ios._notifySceneAppStarted();
167
+ }
168
+ };
169
+ SceneDelegate.prototype.sceneDidBecomeActive = function (scene) {
170
+ };
171
+ SceneDelegate.prototype.sceneWillResignActive = function (scene) {
172
+ Application.ios.notify({
173
+ eventName: SceneEvents.sceneWillResignActive,
174
+ object: Application.ios,
175
+ scene: scene,
176
+ });
177
+ };
178
+ SceneDelegate.prototype.sceneWillEnterForeground = function (scene) {
179
+ };
180
+ SceneDelegate.prototype.sceneDidEnterBackground = function (scene) {
181
+ };
182
+ SceneDelegate.prototype.sceneDidDisconnect = function (scene) {
183
+ };
184
+ SceneDelegate.ObjCProtocols = [UIWindowSceneDelegate];
185
+ return SceneDelegate;
186
+ }(UIResponder));
187
+ // ensure available globally
188
+ global.SceneDelegate = SceneDelegate;
189
+ export class iOSApplication extends ApplicationCommon {
190
+ /**
191
+ * @internal - should not be constructed by the user.
192
+ */
193
+ constructor() {
194
+ super();
195
+ this._delegateHandlers = new Map();
196
+ this._windowSceneMap = new Map();
197
+ this._primaryScene = null;
198
+ this._openedScenesById = new Map();
199
+ this._notificationObservers = [];
200
+ this.displayedOnce = false;
201
+ this.addNotificationObserver(UIApplicationDidFinishLaunchingNotification, this.didFinishLaunchingWithOptions.bind(this));
202
+ this.addNotificationObserver(UIApplicationDidBecomeActiveNotification, this.didBecomeActive.bind(this));
203
+ this.addNotificationObserver(UIApplicationDidEnterBackgroundNotification, this.didEnterBackground.bind(this));
204
+ this.addNotificationObserver(UIApplicationWillTerminateNotification, this.willTerminate.bind(this));
205
+ this.addNotificationObserver(UIApplicationDidReceiveMemoryWarningNotification, this.didReceiveMemoryWarning.bind(this));
206
+ this.addNotificationObserver(UIApplicationDidChangeStatusBarOrientationNotification, this.didChangeStatusBarOrientation.bind(this));
207
+ // Add scene lifecycle notification observers only if scenes are supported
208
+ if (this.supportsScenes()) {
209
+ this.addNotificationObserver('UISceneWillConnectNotification', this.sceneWillConnect.bind(this));
210
+ this.addNotificationObserver('UISceneDidActivateNotification', this.sceneDidActivate.bind(this));
211
+ this.addNotificationObserver('UISceneWillEnterForegroundNotification', this.sceneWillEnterForeground.bind(this));
212
+ this.addNotificationObserver('UISceneDidEnterBackgroundNotification', this.sceneDidEnterBackground.bind(this));
213
+ this.addNotificationObserver('UISceneDidDisconnectNotification', this.sceneDidDisconnect.bind(this));
214
+ }
215
+ }
216
+ getRootView() {
217
+ return this._rootView;
218
+ }
219
+ resetRootView(view) {
220
+ super.resetRootView(view);
221
+ this.setWindowContent();
222
+ }
223
+ run(entry) {
224
+ setAppMainEntry(typeof entry === 'string' ? { moduleName: entry } : entry);
225
+ this.started = true;
226
+ if (this.nativeApp) {
227
+ this.runAsEmbeddedApp();
228
+ }
229
+ else {
230
+ this.runAsMainApp();
231
+ }
232
+ }
233
+ runAsMainApp() {
234
+ UIApplicationMain(0, null, null, this.delegate ? NSStringFromClass(this.delegate) : NSStringFromClass(Responder));
235
+ }
236
+ runAsEmbeddedApp() {
237
+ // TODO: this rootView should be held alive until rootController dismissViewController is called.
238
+ const rootView = this.createRootView(this._rootView, true);
239
+ if (!rootView) {
240
+ return;
241
+ }
242
+ this._rootView = rootView;
243
+ setRootView(rootView);
244
+ // Attach to the existing iOS app
245
+ const window = getWindow();
246
+ if (!window) {
247
+ return;
248
+ }
249
+ const rootController = window.rootViewController;
250
+ if (!rootController) {
251
+ return;
252
+ }
253
+ const controller = this.getViewController(rootView);
254
+ const embedderDelegate = NativeScriptEmbedder.sharedInstance().delegate;
255
+ rootView._setupAsRootView({});
256
+ rootView.on(IOSHelper.traitCollectionColorAppearanceChangedEvent, () => {
257
+ const userInterfaceStyle = controller.traitCollection.userInterfaceStyle;
258
+ const newSystemAppearance = this.getSystemAppearanceValue(userInterfaceStyle);
259
+ this.setSystemAppearance(newSystemAppearance);
260
+ });
261
+ rootView.on(IOSHelper.traitCollectionLayoutDirectionChangedEvent, () => {
262
+ const layoutDirection = controller.traitCollection.layoutDirection;
263
+ const newLayoutDirection = this.getLayoutDirectionValue(layoutDirection);
264
+ this.setLayoutDirection(newLayoutDirection);
265
+ });
266
+ if (embedderDelegate) {
267
+ this.setViewControllerView(rootView);
268
+ embedderDelegate.presentNativeScriptApp(controller);
269
+ }
270
+ else {
271
+ const visibleVC = iosUtils.getVisibleViewController(rootController);
272
+ visibleVC.presentViewControllerAnimatedCompletion(controller, true, null);
273
+ }
274
+ this.initRootView(rootView);
275
+ this.notifyAppStarted();
276
+ }
277
+ getViewController(rootView) {
278
+ let viewController = rootView.viewController || rootView.ios;
279
+ if (!(viewController instanceof UIViewController)) {
280
+ // We set UILayoutViewController dynamically to the root view if it doesn't have a view controller
281
+ // At the moment the root view doesn't have its native view created. We set it in the setViewControllerView func
282
+ viewController = IOSHelper.UILayoutViewController.initWithOwner(new WeakRef(rootView));
283
+ rootView.viewController = viewController;
284
+ }
285
+ return viewController;
286
+ }
287
+ setViewControllerView(view) {
288
+ const viewController = view.viewController || view.ios;
289
+ const nativeView = view.ios || view.nativeViewProtected;
290
+ if (!nativeView || !viewController) {
291
+ throw new Error('Root should be either UIViewController or UIView');
292
+ }
293
+ if (viewController instanceof IOSHelper.UILayoutViewController) {
294
+ viewController.view.addSubview(nativeView);
295
+ }
296
+ }
297
+ setMaxRefreshRate(options) {
298
+ const adjustRefreshRate = () => {
299
+ if (!this.displayedLink) {
300
+ return;
301
+ }
302
+ const minFrameRateDisabled = NSBundle.mainBundle.objectForInfoDictionaryKey('CADisableMinimumFrameDurationOnPhone');
303
+ if (minFrameRateDisabled) {
304
+ let max = 120;
305
+ const deviceMaxFrames = iosUtils.getMainScreen().maximumFramesPerSecond;
306
+ if (options?.max) {
307
+ if (deviceMaxFrames) {
308
+ // iOS 10.3
309
+ max = options.max <= deviceMaxFrames ? options.max : deviceMaxFrames;
310
+ }
311
+ else if (this.displayedLink.preferredFramesPerSecond) {
312
+ // iOS 10.0
313
+ max = options.max <= this.displayedLink.preferredFramesPerSecond ? options.max : this.displayedLink.preferredFramesPerSecond;
314
+ }
315
+ }
316
+ if (SDK_VERSION >= 15 || __VISIONOS__) {
317
+ const min = options?.min || max / 2;
318
+ const preferred = options?.preferred || max;
319
+ this.displayedLink.preferredFrameRateRange = CAFrameRateRangeMake(min, max, preferred);
320
+ }
321
+ else {
322
+ this.displayedLink.preferredFramesPerSecond = max;
323
+ }
324
+ }
325
+ };
326
+ if (this.displayedOnce) {
327
+ adjustRefreshRate();
328
+ return;
329
+ }
330
+ this.displayedLinkTarget = CADisplayLinkTarget.initWithOwner(new WeakRef(this));
331
+ this.displayedLink = CADisplayLink.displayLinkWithTargetSelector(this.displayedLinkTarget, 'onDisplayed');
332
+ adjustRefreshRate();
333
+ this.displayedLink.addToRunLoopForMode(NSRunLoop.mainRunLoop, NSDefaultRunLoopMode);
334
+ this.displayedLink.addToRunLoopForMode(NSRunLoop.mainRunLoop, UITrackingRunLoopMode);
335
+ }
336
+ get rootController() {
337
+ return this.window?.rootViewController;
338
+ }
339
+ get nativeApp() {
340
+ return UIApplication.sharedApplication;
341
+ }
342
+ get window() {
343
+ // TODO: consideration
344
+ // may not want to cache this value given the potential of multiple scenes
345
+ // particularly with SwiftUI app lifecycle based apps
346
+ if (!getiOSWindow()) {
347
+ // Note: NativeScriptViewFactory.getKeyWindow will always be used in SwiftUI app lifecycle based apps
348
+ setiOSWindow(getWindow());
349
+ }
350
+ return getiOSWindow();
351
+ }
352
+ get delegate() {
353
+ return this._delegate;
354
+ }
355
+ set delegate(value) {
356
+ if (this._delegate !== value) {
357
+ this._delegate = value;
358
+ }
359
+ }
360
+ addDelegateHandler(methodName, handler) {
361
+ // safe-guard against invalid handlers
362
+ if (typeof handler !== 'function') {
363
+ return;
364
+ }
365
+ // ensure we have a delegate
366
+ this.delegate ?? (this.delegate = Responder);
367
+ const handlers = this._delegateHandlers.get(methodName) ?? [];
368
+ if (!this._delegateHandlers.has(methodName)) {
369
+ const originalHandler = this.delegate.prototype[methodName];
370
+ if (originalHandler) {
371
+ // if there is an original handler, we add it to the handlers array to be called first.
372
+ handlers.push(originalHandler);
373
+ }
374
+ // replace the original method implementation with one that will call all handlers.
375
+ this.delegate.prototype[methodName] = function (...args) {
376
+ let res;
377
+ for (const handler of handlers) {
378
+ if (typeof handler !== 'function') {
379
+ continue;
380
+ }
381
+ res = handler.apply(this, args);
382
+ }
383
+ return res;
384
+ };
385
+ // store the handlers
386
+ this._delegateHandlers.set(methodName, handlers);
387
+ }
388
+ handlers.push(handler);
389
+ }
390
+ getNativeApplication() {
391
+ return this.nativeApp;
392
+ }
393
+ addNotificationObserver(notificationName, onReceiveCallback) {
394
+ const observer = NotificationObserver.initWithCallback(onReceiveCallback);
395
+ NSNotificationCenter.defaultCenter.addObserverSelectorNameObject(observer, 'onReceive', notificationName, null);
396
+ this._notificationObservers.push(observer);
397
+ return observer;
398
+ }
399
+ removeNotificationObserver(observer /* NotificationObserver */, notificationName) {
400
+ const index = this._notificationObservers.indexOf(observer);
401
+ if (index >= 0) {
402
+ this._notificationObservers.splice(index, 1);
403
+ NSNotificationCenter.defaultCenter.removeObserverNameObject(observer, notificationName, null);
404
+ }
405
+ }
406
+ getSystemAppearance() {
407
+ // userInterfaceStyle is available on UITraitCollection since iOS 12.
408
+ if ((!__VISIONOS__ && SDK_VERSION <= 11) || !this.rootController) {
409
+ return null;
410
+ }
411
+ const userInterfaceStyle = this.rootController.traitCollection.userInterfaceStyle;
412
+ return this.getSystemAppearanceValue(userInterfaceStyle);
413
+ }
414
+ getSystemAppearanceValue(userInterfaceStyle) {
415
+ switch (userInterfaceStyle) {
416
+ case 2 /* UIUserInterfaceStyle.Dark */:
417
+ return 'dark';
418
+ case 1 /* UIUserInterfaceStyle.Light */:
419
+ case 0 /* UIUserInterfaceStyle.Unspecified */:
420
+ return 'light';
421
+ }
422
+ }
423
+ getLayoutDirection() {
424
+ if (!this.rootController) {
425
+ return null;
426
+ }
427
+ const layoutDirection = this.rootController.traitCollection.layoutDirection;
428
+ return this.getLayoutDirectionValue(layoutDirection);
429
+ }
430
+ getLayoutDirectionValue(layoutDirection) {
431
+ switch (layoutDirection) {
432
+ case 0 /* UITraitEnvironmentLayoutDirection.LeftToRight */:
433
+ return CoreTypes.LayoutDirection.ltr;
434
+ case 1 /* UITraitEnvironmentLayoutDirection.RightToLeft */:
435
+ return CoreTypes.LayoutDirection.rtl;
436
+ }
437
+ }
438
+ getOrientation() {
439
+ let statusBarOrientation;
440
+ if (__VISIONOS__) {
441
+ statusBarOrientation = NativeScriptEmbedder.sharedInstance().windowScene.interfaceOrientation;
442
+ }
443
+ else {
444
+ statusBarOrientation = UIApplication.sharedApplication.statusBarOrientation;
445
+ }
446
+ return this.getOrientationValue(statusBarOrientation);
447
+ }
448
+ getOrientationValue(orientation) {
449
+ switch (orientation) {
450
+ case 3 /* UIInterfaceOrientation.LandscapeRight */:
451
+ case 4 /* UIInterfaceOrientation.LandscapeLeft */:
452
+ return 'landscape';
453
+ case 2 /* UIInterfaceOrientation.PortraitUpsideDown */:
454
+ case 1 /* UIInterfaceOrientation.Portrait */:
455
+ return 'portrait';
456
+ case 0 /* UIInterfaceOrientation.Unknown */:
457
+ return 'unknown';
458
+ }
459
+ }
460
+ notifyAppStarted(notification) {
461
+ const root = this.notifyLaunch({
462
+ ios: notification?.userInfo?.objectForKey('UIApplicationLaunchOptionsLocalNotificationKey') ?? null,
463
+ });
464
+ if (getiOSWindow()) {
465
+ if (root !== null && !isEmbedded()) {
466
+ this.setWindowContent(root);
467
+ }
468
+ }
469
+ else {
470
+ setiOSWindow(this.window);
471
+ }
472
+ }
473
+ // Public method for scene-based app startup
474
+ _notifySceneAppStarted() {
475
+ this.notifyAppStarted();
476
+ }
477
+ _onLivesync(context) {
478
+ // Handle application root module
479
+ const isAppRootModuleChanged = context && context.path && context.path.includes(this.getMainEntry().moduleName) && context.type !== 'style';
480
+ // Set window content when:
481
+ // + Application root module is changed
482
+ // + View did not handle the change
483
+ // Note:
484
+ // The case when neither app root module is changed, nor livesync is handled on View,
485
+ // then changes will not apply until navigate forward to the module.
486
+ if (isAppRootModuleChanged || (this._rootView && !this._rootView._onLivesync(context))) {
487
+ this.setWindowContent();
488
+ }
489
+ }
490
+ setWindowContent(view) {
491
+ if (this._rootView) {
492
+ // if we already have a root view, we reset it.
493
+ this._rootView._onRootViewReset();
494
+ }
495
+ const rootView = this.createRootView(view);
496
+ const controller = this.getViewController(rootView);
497
+ this._rootView = rootView;
498
+ setRootView(rootView);
499
+ // setup view as styleScopeHost
500
+ rootView._setupAsRootView({});
501
+ this.setViewControllerView(rootView);
502
+ const win = this.window;
503
+ const haveController = win.rootViewController !== null;
504
+ win.rootViewController = controller;
505
+ if (!haveController) {
506
+ win.makeKeyAndVisible();
507
+ }
508
+ this.initRootView(rootView);
509
+ rootView.on(IOSHelper.traitCollectionColorAppearanceChangedEvent, () => {
510
+ const userInterfaceStyle = controller.traitCollection.userInterfaceStyle;
511
+ const newSystemAppearance = this.getSystemAppearanceValue(userInterfaceStyle);
512
+ this.setSystemAppearance(newSystemAppearance);
513
+ });
514
+ rootView.on(IOSHelper.traitCollectionLayoutDirectionChangedEvent, () => {
515
+ const layoutDirection = controller.traitCollection.layoutDirection;
516
+ const newLayoutDirection = this.getLayoutDirectionValue(layoutDirection);
517
+ this.setLayoutDirection(newLayoutDirection);
518
+ });
519
+ }
520
+ // Observers
521
+ didFinishLaunchingWithOptions(notification) {
522
+ if (__DEV__) {
523
+ /**
524
+ * v9+ runtime crash handling
525
+ * When crash occurs during boot, we let runtime take over
526
+ */
527
+ if (notification.userInfo) {
528
+ const isBootCrash = notification.userInfo.objectForKey('NativeScriptBootCrash');
529
+ if (isBootCrash) {
530
+ // fatal crash will show in console without app exiting
531
+ // allowing hot reload fixes to continue
532
+ return;
533
+ }
534
+ }
535
+ }
536
+ this.setMaxRefreshRate();
537
+ // Only set up window if NOT using scene-based lifecycle
538
+ if (!this.supportsScenes()) {
539
+ // Traditional single-window app setup
540
+ // ensures window is assigned to proper window scene
541
+ setiOSWindow(this.window);
542
+ if (!getiOSWindow()) {
543
+ // if still no window, create one
544
+ setiOSWindow(UIWindow.alloc().initWithFrame(UIScreen.mainScreen.bounds));
545
+ }
546
+ if (!__VISIONOS__) {
547
+ this.window.backgroundColor = SDK_VERSION <= 12 || !UIColor.systemBackgroundColor ? UIColor.whiteColor : UIColor.systemBackgroundColor;
548
+ }
549
+ this.notifyAppStarted(notification);
550
+ }
551
+ else {
552
+ // Scene-based app - window creation will happen in scene delegate
553
+ }
554
+ }
555
+ didBecomeActive(notification) {
556
+ const additionalData = {
557
+ ios: UIApplication.sharedApplication,
558
+ };
559
+ this.setInBackground(false, additionalData);
560
+ this.setSuspended(false, additionalData);
561
+ const rootView = this._rootView;
562
+ if (rootView && !rootView.isLoaded) {
563
+ rootView.callLoaded();
564
+ }
565
+ }
566
+ didEnterBackground(notification) {
567
+ const additionalData = {
568
+ ios: UIApplication.sharedApplication,
569
+ };
570
+ this.setInBackground(true, additionalData);
571
+ this.setSuspended(true, additionalData);
572
+ const rootView = this._rootView;
573
+ if (rootView && rootView.isLoaded) {
574
+ rootView.callUnloaded();
575
+ }
576
+ }
577
+ willTerminate(notification) {
578
+ this.notify({
579
+ eventName: this.exitEvent,
580
+ object: this,
581
+ ios: this.ios,
582
+ });
583
+ // const rootView = this._rootView;
584
+ // if (rootView && rootView.isLoaded) {
585
+ // rootView.callUnloaded();
586
+ // }
587
+ }
588
+ didReceiveMemoryWarning(notification) {
589
+ this.notify({
590
+ eventName: this.lowMemoryEvent,
591
+ object: this,
592
+ ios: this.ios,
593
+ });
594
+ }
595
+ didChangeStatusBarOrientation(notification) {
596
+ const statusBarOrientation = UIApplication.sharedApplication.statusBarOrientation;
597
+ const newOrientation = this.getOrientationValue(statusBarOrientation);
598
+ this.setOrientation(newOrientation);
599
+ }
600
+ // Scene lifecycle notification handlers
601
+ sceneWillConnect(notification) {
602
+ const scene = notification.object;
603
+ if (!scene || !(scene instanceof UIWindowScene)) {
604
+ return;
605
+ }
606
+ // Store as primary scene if it's the first one
607
+ if (!this._primaryScene) {
608
+ this._primaryScene = scene;
609
+ }
610
+ this.notify({
611
+ eventName: SceneEvents.sceneWillConnect,
612
+ object: this,
613
+ scene: scene,
614
+ userInfo: notification.userInfo,
615
+ });
616
+ }
617
+ sceneDidActivate(notification) {
618
+ const scene = notification.object;
619
+ this.notify({
620
+ eventName: SceneEvents.sceneDidActivate,
621
+ object: this,
622
+ scene: scene,
623
+ });
624
+ // If this is the primary scene, trigger traditional app lifecycle
625
+ if (scene === this._primaryScene) {
626
+ const additionalData = {
627
+ ios: UIApplication.sharedApplication,
628
+ scene: scene,
629
+ };
630
+ this.setInBackground(false, additionalData);
631
+ this.setSuspended(false, additionalData);
632
+ if (this._rootView && !this._rootView.isLoaded) {
633
+ this._rootView.callLoaded();
634
+ }
635
+ }
636
+ }
637
+ sceneWillEnterForeground(notification) {
638
+ const scene = notification.object;
639
+ this.notify({
640
+ eventName: SceneEvents.sceneWillEnterForeground,
641
+ object: this,
642
+ scene: scene,
643
+ });
644
+ }
645
+ sceneDidEnterBackground(notification) {
646
+ const scene = notification.object;
647
+ this.notify({
648
+ eventName: SceneEvents.sceneDidEnterBackground,
649
+ object: this,
650
+ scene: scene,
651
+ });
652
+ // If this is the primary scene, trigger traditional app lifecycle
653
+ if (scene === this._primaryScene) {
654
+ const additionalData = {
655
+ ios: UIApplication.sharedApplication,
656
+ scene: scene,
657
+ };
658
+ this.setInBackground(true, additionalData);
659
+ this.setSuspended(true, additionalData);
660
+ if (this._rootView && this._rootView.isLoaded) {
661
+ this._rootView.callUnloaded();
662
+ }
663
+ }
664
+ }
665
+ sceneDidDisconnect(notification) {
666
+ const scene = notification.object;
667
+ this._removeWindowForScene(scene);
668
+ // If primary scene disconnected, clear it
669
+ if (scene === this._primaryScene) {
670
+ this._primaryScene = null;
671
+ }
672
+ if (this._primaryScene) {
673
+ if (SDK_VERSION >= 17) {
674
+ const request = UISceneSessionActivationRequest.requestWithSession(this._primaryScene.session);
675
+ UIApplication.sharedApplication.activateSceneSessionForRequestErrorHandler(request, (err) => {
676
+ if (err) {
677
+ console.log('Failed to activate primary scene:', err.localizedDescription);
678
+ }
679
+ });
680
+ }
681
+ else {
682
+ UIApplication.sharedApplication.requestSceneSessionActivationUserActivityOptionsErrorHandler(this._primaryScene.session, null, null, (err) => {
683
+ if (err) {
684
+ console.log('Failed to activate primary scene (legacy):', err.localizedDescription);
685
+ }
686
+ });
687
+ }
688
+ }
689
+ this.notify({
690
+ eventName: SceneEvents.sceneDidDisconnect,
691
+ object: this,
692
+ scene: scene,
693
+ });
694
+ }
695
+ // Scene management helper methods
696
+ _setWindowForScene(window, scene) {
697
+ this._windowSceneMap.set(scene, window);
698
+ }
699
+ _removeWindowForScene(scene) {
700
+ this._windowSceneMap.delete(scene);
701
+ // also untrack opened scene id
702
+ try {
703
+ const s = scene;
704
+ if (s && s.session) {
705
+ const id = this._getSceneId(s);
706
+ this._openedScenesById.delete(id);
707
+ }
708
+ }
709
+ catch { }
710
+ }
711
+ _getWindowForScene(scene) {
712
+ return this._windowSceneMap.get(scene);
713
+ }
714
+ _setupWindowForScene(window, scene) {
715
+ if (!window) {
716
+ return;
717
+ }
718
+ // track opened scene
719
+ try {
720
+ const id = this._getSceneId(scene);
721
+ this._openedScenesById.set(id, scene);
722
+ }
723
+ catch { }
724
+ // Set up window background
725
+ if (!__VISIONOS__) {
726
+ window.backgroundColor = SDK_VERSION <= 12 || !UIColor.systemBackgroundColor ? UIColor.whiteColor : UIColor.systemBackgroundColor;
727
+ }
728
+ // If this is the primary scene, set up the main application content
729
+ if (scene === this._primaryScene || !this._primaryScene) {
730
+ this._primaryScene = scene;
731
+ if (!getiOSWindow()) {
732
+ setiOSWindow(window);
733
+ }
734
+ // Set up the window content for the primary scene
735
+ this.setWindowContent();
736
+ }
737
+ }
738
+ get sceneDelegate() {
739
+ if (!this._sceneDelegate) {
740
+ this._sceneDelegate = SceneDelegate.new();
741
+ }
742
+ return this._sceneDelegate;
743
+ }
744
+ set sceneDelegate(value) {
745
+ this._sceneDelegate = value;
746
+ }
747
+ /**
748
+ * Multi-window support
749
+ */
750
+ /**
751
+ * Opens a new window with the specified data.
752
+ * @param data The data to pass to the new window.
753
+ */
754
+ openWindow(data) {
755
+ if (!supportsMultipleScenes()) {
756
+ console.log('Cannot create a new scene - not supported on this device.');
757
+ return;
758
+ }
759
+ try {
760
+ const app = UIApplication.sharedApplication;
761
+ // iOS 17+
762
+ if (SDK_VERSION >= 17) {
763
+ // Create a new scene activation request with proper role
764
+ let request;
765
+ try {
766
+ // Use the correct factory method to create request with role
767
+ // Based on the type definitions, this is the proper way
768
+ request = UISceneSessionActivationRequest.requestWithRole(UIWindowSceneSessionRoleApplication);
769
+ // Note: may be useful to allow user defined activity type through optional string typed data in future
770
+ const activity = NSUserActivity.alloc().initWithActivityType(`${NSBundle.mainBundle.bundleIdentifier}.scene`);
771
+ activity.userInfo = dataSerialize(data);
772
+ request.userActivity = activity;
773
+ // Set proper options with requesting scene
774
+ const options = UISceneActivationRequestOptions.new();
775
+ // Note: explore secondary windows spawning other windows
776
+ // and if this context needs to change in those cases
777
+ const mainWindow = Application.ios.getPrimaryWindow();
778
+ options.requestingScene = mainWindow?.windowScene;
779
+ /**
780
+ * Note: This does not work in testing but worth exploring further sometime
781
+ * regarding the size/dimensions of opened secondary windows.
782
+ * The initial size is ultimately determined by the system
783
+ * based on available space and user context.
784
+ */
785
+ // Get the size restrictions from the window scene
786
+ // const sizeRestrictions = (options.requestingScene as UIWindowScene).sizeRestrictions;
787
+ // // Set your minimum and maximum dimensions
788
+ // sizeRestrictions.minimumSize = CGSizeMake(320, 400);
789
+ // sizeRestrictions.maximumSize = CGSizeMake(600, 800);
790
+ request.options = options;
791
+ }
792
+ catch (roleError) {
793
+ console.log('Error creating request:', roleError);
794
+ return;
795
+ }
796
+ app.activateSceneSessionForRequestErrorHandler(request, (error) => {
797
+ if (error) {
798
+ console.log('Error creating new scene (iOS 17+):', error);
799
+ // Log additional debugging info
800
+ if (error.userInfo) {
801
+ console.error(`Error userInfo: ${error.userInfo.description}`);
802
+ }
803
+ // Handle specific error types
804
+ if (error.localizedDescription.includes('role') && error.localizedDescription.includes('nil')) {
805
+ this.createSceneWithLegacyAPI(data);
806
+ }
807
+ else if (error.domain === 'FBSWorkspaceErrorDomain' && error.code === 2) {
808
+ this.createSceneWithLegacyAPI(data);
809
+ }
810
+ }
811
+ });
812
+ }
813
+ // iOS 13-16 - Use the legacy requestSceneSessionActivationUserActivityOptionsErrorHandler method
814
+ else if (SDK_VERSION >= 13 && SDK_VERSION < 17) {
815
+ app.requestSceneSessionActivationUserActivityOptionsErrorHandler(null, // session
816
+ null, // userActivity
817
+ null, // options
818
+ (error) => {
819
+ if (error) {
820
+ console.log('Error creating new scene (legacy):', error);
821
+ }
822
+ });
823
+ }
824
+ // Fallback for older iOS versions or unsupported configurations
825
+ else {
826
+ console.log('Neither new nor legacy scene activation methods are available');
827
+ }
828
+ }
829
+ catch (error) {
830
+ console.error('Error requesting new scene:', error);
831
+ }
832
+ }
833
+ /**
834
+ * Closes a secondary window/scene.
835
+ * Usage examples:
836
+ * - Application.ios.closeWindow() // best-effort close of a non-primary scene
837
+ * - Application.ios.closeWindow(button) // from a tap handler within the scene
838
+ * - Application.ios.closeWindow(window)
839
+ * - Application.ios.closeWindow(scene)
840
+ * - Application.ios.closeWindow('scene-id')
841
+ */
842
+ closeWindow(target) {
843
+ if (!__APPLE__) {
844
+ return;
845
+ }
846
+ try {
847
+ const scene = this._resolveScene(target);
848
+ if (!scene) {
849
+ console.log('closeWindow: No scene resolved for target');
850
+ return;
851
+ }
852
+ // Don't allow closing the primary scene
853
+ if (scene === this._primaryScene) {
854
+ console.log('closeWindow: Refusing to close the primary scene');
855
+ return;
856
+ }
857
+ const session = scene.session;
858
+ if (!session) {
859
+ console.log('closeWindow: Scene has no session to destroy');
860
+ return;
861
+ }
862
+ const app = UIApplication.sharedApplication;
863
+ if (app.requestSceneSessionDestructionOptionsErrorHandler) {
864
+ app.requestSceneSessionDestructionOptionsErrorHandler(session, null, (error) => {
865
+ if (error) {
866
+ console.log('closeWindow: destruction error', error);
867
+ }
868
+ else {
869
+ // clean up tracked id
870
+ const id = this._getSceneId(scene);
871
+ this._openedScenesById.delete(id);
872
+ }
873
+ });
874
+ }
875
+ else {
876
+ console.info('closeWindow: Scene destruction API not available on this iOS version');
877
+ }
878
+ }
879
+ catch (err) {
880
+ console.log('closeWindow: Unexpected error', err);
881
+ }
882
+ }
883
+ getAllWindows() {
884
+ return Array.from(this._windowSceneMap.values());
885
+ }
886
+ getAllScenes() {
887
+ return Array.from(this._windowSceneMap.keys());
888
+ }
889
+ getWindowScenes() {
890
+ return this.getAllScenes().filter((scene) => scene instanceof UIWindowScene);
891
+ }
892
+ getPrimaryWindow() {
893
+ if (this._primaryScene) {
894
+ return this._getWindowForScene(this._primaryScene) || getiOSWindow();
895
+ }
896
+ return getiOSWindow();
897
+ }
898
+ getPrimaryScene() {
899
+ return this._primaryScene;
900
+ }
901
+ // Scene lifecycle management
902
+ supportsScenes() {
903
+ return supportsScenes();
904
+ }
905
+ supportsMultipleScenes() {
906
+ return supportsMultipleScenes();
907
+ }
908
+ isUsingSceneLifecycle() {
909
+ return this.supportsScenes() && this._windowSceneMap.size > 0;
910
+ }
911
+ // Call this to set up scene-based configuration
912
+ configureForScenes() {
913
+ if (!this.supportsScenes()) {
914
+ console.warn('Scene-based lifecycle is only supported on iOS 13+ iPad or visionOS with multi-scene enabled apps.');
915
+ return;
916
+ }
917
+ // Additional scene configuration can be added here
918
+ // For now, the notification observers are already set up in the constructor
919
+ }
920
+ // Stable scene id for lookups
921
+ _getSceneId(scene) {
922
+ try {
923
+ if (!scene) {
924
+ return 'Unknown';
925
+ }
926
+ // Prefer session persistentIdentifier when available (stable across lifetime)
927
+ const session = scene.session;
928
+ const persistentId = session && session.persistentIdentifier;
929
+ if (persistentId) {
930
+ return `${persistentId}`;
931
+ }
932
+ // Fallbacks
933
+ if (scene.hash != null) {
934
+ return `${scene.hash}`;
935
+ }
936
+ const desc = scene.description;
937
+ if (desc) {
938
+ return `${desc}`;
939
+ }
940
+ }
941
+ catch (err) {
942
+ // ignore
943
+ }
944
+ return 'Unknown';
945
+ }
946
+ // Resolve a UIWindowScene from various input types
947
+ _resolveScene(target) {
948
+ if (!__APPLE__) {
949
+ return null;
950
+ }
951
+ if (!target) {
952
+ // Try to pick a non-primary foreground active scene, else last known scene
953
+ const scenes = this.getWindowScenes?.() || [];
954
+ const nonPrimary = scenes.filter((s) => s !== this._primaryScene);
955
+ return nonPrimary[0] || scenes[0] || null;
956
+ }
957
+ // If a View was passed, derive its window.scene
958
+ if (target && typeof target === 'object') {
959
+ // UIWindowScene
960
+ if (target.session && target.activationState !== undefined) {
961
+ return target;
962
+ }
963
+ // UIWindow
964
+ if (target.windowScene) {
965
+ return target.windowScene;
966
+ }
967
+ // NativeScript View
968
+ if (target?.nativeViewProtected) {
969
+ const uiView = target.nativeViewProtected;
970
+ const win = uiView?.window;
971
+ return win?.windowScene || null;
972
+ }
973
+ }
974
+ // String id lookup
975
+ if (typeof target === 'string') {
976
+ if (this._openedScenesById.has(target)) {
977
+ return this._openedScenesById.get(target);
978
+ }
979
+ // Try matching by persistentIdentifier or hash among known scenes
980
+ const scenes = this.getWindowScenes?.() || [];
981
+ for (const s of scenes) {
982
+ const sid = this._getSceneId(s);
983
+ if (sid === target) {
984
+ return s;
985
+ }
986
+ }
987
+ }
988
+ return null;
989
+ }
990
+ createSceneWithLegacyAPI(data) {
991
+ const windowScene = this.window?.windowScene;
992
+ if (!windowScene) {
993
+ return;
994
+ }
995
+ // Create user activity for the new scene
996
+ const userActivity = NSUserActivity.alloc().initWithActivityType(`${NSBundle.mainBundle.bundleIdentifier}.scene`);
997
+ userActivity.userInfo = dataSerialize(data);
998
+ // Use the legacy API
999
+ const options = UISceneActivationRequestOptions.new();
1000
+ options.requestingScene = windowScene;
1001
+ UIApplication.sharedApplication.requestSceneSessionActivationUserActivityOptionsErrorHandler(null, // session - null for new scene
1002
+ userActivity, options, (error) => {
1003
+ if (error) {
1004
+ console.error(`Legacy scene API failed: ${error.localizedDescription}`);
1005
+ }
1006
+ });
1007
+ }
1008
+ /**
1009
+ * Creates a simple view controller with a NativeScript view for a scene window.
1010
+ * @param window The UIWindow to set content for
1011
+ * @param view The NativeScript View to set as root content
1012
+ */
1013
+ setWindowRootView(window, view) {
1014
+ if (!window || !view) {
1015
+ return;
1016
+ }
1017
+ if (view.ios) {
1018
+ window.rootViewController = view.viewController;
1019
+ window.makeKeyAndVisible();
1020
+ }
1021
+ else {
1022
+ console.warn('View does not have a native iOS implementation');
1023
+ }
1024
+ }
1025
+ get ios() {
1026
+ // ensures Application.ios is defined when running on iOS
1027
+ return this;
1028
+ }
1029
+ }
1030
+ __decorate([
1031
+ profile,
1032
+ __metadata("design:type", Function),
1033
+ __metadata("design:paramtypes", [NSNotification]),
1034
+ __metadata("design:returntype", void 0)
1035
+ ], iOSApplication.prototype, "didFinishLaunchingWithOptions", null);
1036
+ __decorate([
1037
+ profile,
1038
+ __metadata("design:type", Function),
1039
+ __metadata("design:paramtypes", [NSNotification]),
1040
+ __metadata("design:returntype", void 0)
1041
+ ], iOSApplication.prototype, "didBecomeActive", null);
1042
+ const iosApp = new iOSApplication();
1043
+ // Attach on global, so it can also be overwritten to implement different logic based on flavor
1044
+ global.__onLiveSyncCore = function (context) {
1045
+ iosApp._onLivesync(context);
1046
+ };
1047
+ export * from './application-common';
1048
+ export const Application = iosApp;
1049
+ export const AndroidApplication = undefined;
1050
+ function fontScaleChanged(origFontScale) {
1051
+ const oldValue = getFontScale();
1052
+ setFontScale(getClosestValidFontScale(origFontScale));
1053
+ const currentFontScale = getFontScale();
1054
+ if (oldValue !== currentFontScale) {
1055
+ Application.notify({
1056
+ eventName: Application.fontScaleChangedEvent,
1057
+ object: Application,
1058
+ newValue: currentFontScale,
1059
+ });
1060
+ }
1061
+ }
1062
+ export function getCurrentFontScale() {
1063
+ setupConfigListener();
1064
+ return getFontScale();
1065
+ }
1066
+ const sizeMap = new Map([
1067
+ [UIContentSizeCategoryExtraSmall, 0.5],
1068
+ [UIContentSizeCategorySmall, 0.7],
1069
+ [UIContentSizeCategoryMedium, 0.85],
1070
+ [UIContentSizeCategoryLarge, 1],
1071
+ [UIContentSizeCategoryExtraLarge, 1.15],
1072
+ [UIContentSizeCategoryExtraExtraLarge, 1.3],
1073
+ [UIContentSizeCategoryExtraExtraExtraLarge, 1.5],
1074
+ [UIContentSizeCategoryAccessibilityMedium, 2],
1075
+ [UIContentSizeCategoryAccessibilityLarge, 2.5],
1076
+ [UIContentSizeCategoryAccessibilityExtraLarge, 3],
1077
+ [UIContentSizeCategoryAccessibilityExtraExtraLarge, 3.5],
1078
+ [UIContentSizeCategoryAccessibilityExtraExtraExtraLarge, 4],
1079
+ ]);
1080
+ function contentSizeUpdated(fontSize) {
1081
+ if (sizeMap.has(fontSize)) {
1082
+ fontScaleChanged(sizeMap.get(fontSize));
1083
+ return;
1084
+ }
1085
+ fontScaleChanged(1);
1086
+ }
1087
+ function useIOSFontScale() {
1088
+ if (Application.ios.nativeApp) {
1089
+ contentSizeUpdated(Application.ios.nativeApp.preferredContentSizeCategory);
1090
+ }
1091
+ else {
1092
+ fontScaleChanged(1);
1093
+ }
1094
+ }
1095
+ let fontSizeObserver;
1096
+ function setupConfigListener(attempt = 0) {
1097
+ if (fontSizeObserver) {
1098
+ return;
1099
+ }
1100
+ if (!Application.ios.nativeApp) {
1101
+ if (attempt > 100) {
1102
+ fontScaleChanged(1);
1103
+ return;
1104
+ }
1105
+ // Couldn't get launchEvent to trigger.
1106
+ setTimeout(() => setupConfigListener(attempt + 1), 1);
1107
+ return;
1108
+ }
1109
+ fontSizeObserver = Application.ios.addNotificationObserver(UIContentSizeCategoryDidChangeNotification, (args) => {
1110
+ const fontSize = args.userInfo.valueForKey(UIContentSizeCategoryNewValueKey);
1111
+ contentSizeUpdated(fontSize);
1112
+ });
1113
+ Application.on(Application.exitEvent, () => {
1114
+ if (fontSizeObserver) {
1115
+ Application.ios.removeNotificationObserver(fontSizeObserver, UIContentSizeCategoryDidChangeNotification);
1116
+ fontSizeObserver = null;
1117
+ }
1118
+ Application.off(Application.resumeEvent, useIOSFontScale);
1119
+ });
1120
+ Application.on(Application.resumeEvent, useIOSFontScale);
1121
+ useIOSFontScale();
1122
+ }
1123
+ setInitFontScale(setupConfigListener);
1124
+ /**
1125
+ * Convert array of values into a bitmask.
1126
+ *
1127
+ * @param values string values
1128
+ * @param map map lower-case name to integer value.
1129
+ */
1130
+ function inputArrayToBitMask(values, map) {
1131
+ return (enforceArray(values)
1132
+ .filter((value) => !!value)
1133
+ .map((value) => `${value}`.toLocaleLowerCase())
1134
+ .filter((value) => map.has(value))
1135
+ .reduce((res, value) => res | map.get(value), 0) || 0);
1136
+ }
1137
+ let AccessibilityTraitsMap;
1138
+ let RoleTypeMap;
1139
+ let nativeFocusedNotificationObserver;
1140
+ let lastFocusedView;
1141
+ function ensureNativeClasses() {
1142
+ if (AccessibilityTraitsMap && nativeFocusedNotificationObserver) {
1143
+ return;
1144
+ }
1145
+ AccessibilityTraitsMap = new Map([
1146
+ [AccessibilityTrait.AllowsDirectInteraction, UIAccessibilityTraitAllowsDirectInteraction],
1147
+ [AccessibilityTrait.CausesPageTurn, UIAccessibilityTraitCausesPageTurn],
1148
+ [AccessibilityTrait.NotEnabled, UIAccessibilityTraitNotEnabled],
1149
+ [AccessibilityTrait.Selected, UIAccessibilityTraitSelected],
1150
+ [AccessibilityTrait.UpdatesFrequently, UIAccessibilityTraitUpdatesFrequently],
1151
+ ]);
1152
+ RoleTypeMap = new Map([
1153
+ [AccessibilityRole.Adjustable, UIAccessibilityTraitAdjustable],
1154
+ [AccessibilityRole.Button, UIAccessibilityTraitButton],
1155
+ [AccessibilityRole.Checkbox, UIAccessibilityTraitButton],
1156
+ [AccessibilityRole.Header, UIAccessibilityTraitHeader],
1157
+ [AccessibilityRole.KeyboardKey, UIAccessibilityTraitKeyboardKey],
1158
+ [AccessibilityRole.Image, UIAccessibilityTraitImage],
1159
+ [AccessibilityRole.ImageButton, UIAccessibilityTraitImage | UIAccessibilityTraitButton],
1160
+ [AccessibilityRole.Link, UIAccessibilityTraitLink],
1161
+ [AccessibilityRole.None, UIAccessibilityTraitNone],
1162
+ [AccessibilityRole.PlaysSound, UIAccessibilityTraitPlaysSound],
1163
+ [AccessibilityRole.RadioButton, UIAccessibilityTraitButton],
1164
+ [AccessibilityRole.Search, UIAccessibilityTraitSearchField],
1165
+ [AccessibilityRole.StaticText, UIAccessibilityTraitStaticText],
1166
+ [AccessibilityRole.StartsMediaSession, UIAccessibilityTraitStartsMediaSession],
1167
+ [AccessibilityRole.Summary, UIAccessibilityTraitSummaryElement],
1168
+ [AccessibilityRole.Switch, UIAccessibilityTraitButton],
1169
+ ]);
1170
+ nativeFocusedNotificationObserver = Application.ios.addNotificationObserver(UIAccessibilityElementFocusedNotification, (args) => {
1171
+ const uiView = args.userInfo?.objectForKey(UIAccessibilityFocusedElementKey);
1172
+ if (!uiView?.tag) {
1173
+ return;
1174
+ }
1175
+ const rootView = Application.getRootView();
1176
+ // We use the UIView's tag to find the NativeScript View by its domId.
1177
+ let view = rootView.getViewByDomId(uiView?.tag);
1178
+ if (!view) {
1179
+ for (const modalView of rootView._getRootModalViews()) {
1180
+ view = modalView.getViewByDomId(uiView?.tag);
1181
+ if (view) {
1182
+ break;
1183
+ }
1184
+ }
1185
+ }
1186
+ if (!view) {
1187
+ return;
1188
+ }
1189
+ const lastView = lastFocusedView?.deref();
1190
+ if (lastView && view !== lastView) {
1191
+ const lastFocusedUIView = lastView.nativeViewProtected;
1192
+ if (lastFocusedUIView) {
1193
+ lastFocusedView = null;
1194
+ notifyAccessibilityFocusState(lastView, false, true);
1195
+ }
1196
+ }
1197
+ lastFocusedView = new WeakRef(view);
1198
+ notifyAccessibilityFocusState(view, true, false);
1199
+ });
1200
+ Application.on(Application.exitEvent, () => {
1201
+ if (nativeFocusedNotificationObserver) {
1202
+ Application.ios.removeNotificationObserver(nativeFocusedNotificationObserver, UIAccessibilityElementFocusedNotification);
1203
+ }
1204
+ nativeFocusedNotificationObserver = null;
1205
+ lastFocusedView = null;
1206
+ });
1207
+ }
1208
+ export function updateAccessibilityProperties(view) {
1209
+ const uiView = view.nativeViewProtected;
1210
+ if (!uiView) {
1211
+ return;
1212
+ }
1213
+ ensureNativeClasses();
1214
+ const accessibilityRole = view.accessibilityRole;
1215
+ const accessibilityState = view.accessibilityState;
1216
+ if (!view.accessible || view.accessibilityHidden) {
1217
+ uiView.accessibilityTraits = UIAccessibilityTraitNone;
1218
+ return;
1219
+ }
1220
+ // NOTE: left here for various core inspection passes while running the toolbox app
1221
+ // console.log('--- Accessible element: ', view.constructor.name);
1222
+ // console.log('accessibilityLabel: ', view.accessibilityLabel);
1223
+ // console.log('accessibilityRole: ', accessibilityRole);
1224
+ // console.log('accessibilityState: ', accessibilityState);
1225
+ // console.log('accessibilityValue: ', view.accessibilityValue);
1226
+ let a11yTraits = UIAccessibilityTraitNone;
1227
+ if (RoleTypeMap.has(accessibilityRole)) {
1228
+ a11yTraits |= RoleTypeMap.get(accessibilityRole);
1229
+ }
1230
+ switch (accessibilityRole) {
1231
+ case AccessibilityRole.Checkbox:
1232
+ case AccessibilityRole.RadioButton:
1233
+ case AccessibilityRole.Switch: {
1234
+ if (accessibilityState === AccessibilityState.Checked) {
1235
+ a11yTraits |= AccessibilityTraitsMap.get(AccessibilityTrait.Selected);
1236
+ }
1237
+ break;
1238
+ }
1239
+ default: {
1240
+ if (accessibilityState === AccessibilityState.Selected) {
1241
+ a11yTraits |= AccessibilityTraitsMap.get(AccessibilityTrait.Selected);
1242
+ }
1243
+ if (accessibilityState === AccessibilityState.Disabled) {
1244
+ a11yTraits |= AccessibilityTraitsMap.get(AccessibilityTrait.NotEnabled);
1245
+ }
1246
+ break;
1247
+ }
1248
+ }
1249
+ const UpdatesFrequentlyTrait = AccessibilityTraitsMap.get(AccessibilityTrait.UpdatesFrequently);
1250
+ switch (view.accessibilityLiveRegion) {
1251
+ case AccessibilityLiveRegion.Polite:
1252
+ case AccessibilityLiveRegion.Assertive: {
1253
+ a11yTraits |= UpdatesFrequentlyTrait;
1254
+ break;
1255
+ }
1256
+ default: {
1257
+ a11yTraits &= ~UpdatesFrequentlyTrait;
1258
+ break;
1259
+ }
1260
+ }
1261
+ // NOTE: left here for various core inspection passes while running the toolbox app
1262
+ // if (view.accessibilityLiveRegion) {
1263
+ // console.log('accessibilityLiveRegion:', view.accessibilityLiveRegion);
1264
+ // }
1265
+ if (view.accessibilityMediaSession) {
1266
+ a11yTraits |= RoleTypeMap.get(AccessibilityRole.StartsMediaSession);
1267
+ }
1268
+ // NOTE: There were duplicated types in traits and roles previously which we conslidated
1269
+ // not sure if this is still needed
1270
+ // accessibilityTraits used to be stored on {N} view component but if the above
1271
+ // is combining all traits fresh each time through, don't believe we need to keep track or previous traits
1272
+ // if (view.accessibilityTraits) {
1273
+ // a11yTraits |= inputArrayToBitMask(view.accessibilityTraits, AccessibilityTraitsMap);
1274
+ // }
1275
+ // NOTE: left here for various core inspection passes while running the toolbox app
1276
+ // console.log('a11yTraits:', a11yTraits);
1277
+ // console.log(' ');
1278
+ uiView.accessibilityTraits = a11yTraits;
1279
+ }
1280
+ setA11yUpdatePropertiesCallback(updateAccessibilityProperties);
1281
+ export const sendAccessibilityEvent = () => { };
1282
+ export function isAccessibilityServiceEnabled() {
1283
+ const accessibilityServiceEnabled = isA11yEnabled();
1284
+ if (typeof accessibilityServiceEnabled === 'boolean') {
1285
+ return accessibilityServiceEnabled;
1286
+ }
1287
+ let isVoiceOverRunning;
1288
+ if (typeof UIAccessibilityIsVoiceOverRunning === 'function') {
1289
+ isVoiceOverRunning = UIAccessibilityIsVoiceOverRunning;
1290
+ }
1291
+ else {
1292
+ // iOS is too old to tell us if voice over is enabled
1293
+ if (typeof UIAccessibilityIsVoiceOverRunning !== 'function') {
1294
+ setA11yEnabled(false);
1295
+ return isA11yEnabled();
1296
+ }
1297
+ }
1298
+ setA11yEnabled(isVoiceOverRunning());
1299
+ let voiceOverStatusChangedNotificationName = null;
1300
+ if (typeof UIAccessibilityVoiceOverStatusDidChangeNotification !== 'undefined') {
1301
+ voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusDidChangeNotification;
1302
+ }
1303
+ else if (typeof UIAccessibilityVoiceOverStatusChanged !== 'undefined') {
1304
+ voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusChanged;
1305
+ }
1306
+ if (voiceOverStatusChangedNotificationName) {
1307
+ nativeObserver = Application.ios.addNotificationObserver(voiceOverStatusChangedNotificationName, () => {
1308
+ setA11yEnabled(isVoiceOverRunning());
1309
+ });
1310
+ Application.on(Application.exitEvent, () => {
1311
+ if (nativeObserver) {
1312
+ Application.ios.removeNotificationObserver(nativeObserver, voiceOverStatusChangedNotificationName);
1313
+ }
1314
+ setA11yEnabled(undefined);
1315
+ nativeObserver = null;
1316
+ });
1317
+ }
1318
+ Application.on(Application.resumeEvent, () => {
1319
+ setA11yEnabled(isVoiceOverRunning());
1320
+ });
1321
+ return isA11yEnabled();
1322
+ }
1323
+ export function getAndroidAccessibilityManager() {
1324
+ return null;
1325
+ }
1326
+ let sharedA11YObservable;
1327
+ let nativeObserver;
1328
+ function getSharedA11YObservable() {
1329
+ if (sharedA11YObservable) {
1330
+ return sharedA11YObservable;
1331
+ }
1332
+ sharedA11YObservable = new SharedA11YObservable();
1333
+ let isVoiceOverRunning;
1334
+ if (typeof UIAccessibilityIsVoiceOverRunning === 'function') {
1335
+ isVoiceOverRunning = UIAccessibilityIsVoiceOverRunning;
1336
+ }
1337
+ else {
1338
+ if (typeof UIAccessibilityIsVoiceOverRunning !== 'function') {
1339
+ Trace.write(`UIAccessibilityIsVoiceOverRunning() - is not a function`, Trace.categories.Accessibility, Trace.messageType.error);
1340
+ isVoiceOverRunning = () => false;
1341
+ }
1342
+ }
1343
+ sharedA11YObservable.set(AccessibilityServiceEnabledPropName, isVoiceOverRunning());
1344
+ let voiceOverStatusChangedNotificationName = null;
1345
+ if (typeof UIAccessibilityVoiceOverStatusDidChangeNotification !== 'undefined') {
1346
+ // iOS 11+
1347
+ voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusDidChangeNotification;
1348
+ }
1349
+ else if (typeof UIAccessibilityVoiceOverStatusChanged !== 'undefined') {
1350
+ // iOS <11
1351
+ voiceOverStatusChangedNotificationName = UIAccessibilityVoiceOverStatusChanged;
1352
+ }
1353
+ if (voiceOverStatusChangedNotificationName) {
1354
+ nativeObserver = Application.ios.addNotificationObserver(voiceOverStatusChangedNotificationName, () => {
1355
+ sharedA11YObservable?.set(AccessibilityServiceEnabledPropName, isVoiceOverRunning());
1356
+ });
1357
+ Application.on(Application.exitEvent, () => {
1358
+ if (nativeObserver) {
1359
+ Application.ios.removeNotificationObserver(nativeObserver, voiceOverStatusChangedNotificationName);
1360
+ }
1361
+ nativeObserver = null;
1362
+ if (sharedA11YObservable) {
1363
+ sharedA11YObservable.removeEventListener(Observable.propertyChangeEvent);
1364
+ sharedA11YObservable = null;
1365
+ }
1366
+ });
1367
+ }
1368
+ Application.on(Application.resumeEvent, () => sharedA11YObservable.set(AccessibilityServiceEnabledPropName, isVoiceOverRunning()));
1369
+ return sharedA11YObservable;
1370
+ }
1371
+ export class AccessibilityServiceEnabledObservable extends CommonA11YServiceEnabledObservable {
1372
+ constructor() {
1373
+ super(getSharedA11YObservable());
1374
+ }
1375
+ }
1376
+ let accessibilityServiceObservable;
1377
+ export function ensureClasses() {
1378
+ if (accessibilityServiceObservable) {
1379
+ return;
1380
+ }
1381
+ setFontScaleCssClasses(new Map(VALID_FONT_SCALES.map((fs) => [fs, `a11y-fontscale-${Number(fs * 100).toFixed(0)}`])));
1382
+ accessibilityServiceObservable = new AccessibilityServiceEnabledObservable();
1383
+ // Initialize SDK version CSS class once
1384
+ initializeSdkVersionClass(Application.getRootView());
1385
+ }
1386
+ export function updateCurrentHelperClasses(applyRootCssClass) {
1387
+ const fontScale = getFontScale();
1388
+ const fontScaleCategory = getFontScaleCategory();
1389
+ const fontScaleCssClasses = getFontScaleCssClasses();
1390
+ const oldFontScaleClass = getCurrentFontScaleClass();
1391
+ if (fontScaleCssClasses.has(fontScale)) {
1392
+ setCurrentFontScaleClass(fontScaleCssClasses.get(fontScale));
1393
+ }
1394
+ else {
1395
+ setCurrentFontScaleClass(fontScaleCssClasses.get(1));
1396
+ }
1397
+ if (oldFontScaleClass !== getCurrentFontScaleClass()) {
1398
+ applyRootCssClass([...fontScaleCssClasses.values()], getCurrentFontScaleClass());
1399
+ }
1400
+ const oldActiveFontScaleCategory = getCurrentFontScaleCategory();
1401
+ switch (fontScaleCategory) {
1402
+ case FontScaleCategory.ExtraSmall: {
1403
+ setCurrentFontScaleCategory(fontScaleExtraSmallCategoryClass);
1404
+ break;
1405
+ }
1406
+ case FontScaleCategory.Medium: {
1407
+ setCurrentFontScaleCategory(fontScaleMediumCategoryClass);
1408
+ break;
1409
+ }
1410
+ case FontScaleCategory.ExtraLarge: {
1411
+ setCurrentFontScaleCategory(fontScaleExtraLargeCategoryClass);
1412
+ break;
1413
+ }
1414
+ default: {
1415
+ setCurrentFontScaleCategory(fontScaleMediumCategoryClass);
1416
+ break;
1417
+ }
1418
+ }
1419
+ if (oldActiveFontScaleCategory !== getCurrentFontScaleCategory()) {
1420
+ applyRootCssClass(fontScaleCategoryClasses, getCurrentFontScaleCategory());
1421
+ }
1422
+ const oldA11YStatusClass = getCurrentA11YServiceClass();
1423
+ if (accessibilityServiceObservable.accessibilityServiceEnabled) {
1424
+ setCurrentA11YServiceClass(a11yServiceEnabledClass);
1425
+ }
1426
+ else {
1427
+ setCurrentA11YServiceClass(a11yServiceDisabledClass);
1428
+ }
1429
+ if (oldA11YStatusClass !== getCurrentA11YServiceClass()) {
1430
+ applyRootCssClass(a11yServiceClasses, getCurrentA11YServiceClass());
1431
+ }
1432
+ }
1433
+ function applyRootCssClass(cssClasses, newCssClass) {
1434
+ const rootView = Application.getRootView();
1435
+ if (!rootView) {
1436
+ return;
1437
+ }
1438
+ Application.applyCssClass(rootView, cssClasses, newCssClass);
1439
+ const rootModalViews = rootView._getRootModalViews();
1440
+ rootModalViews.forEach((rootModalView) => Application.applyCssClass(rootModalView, cssClasses, newCssClass));
1441
+ }
1442
+ function applyFontScaleToRootViews() {
1443
+ const rootView = Application.getRootView();
1444
+ if (!rootView) {
1445
+ return;
1446
+ }
1447
+ const fontScale = getCurrentFontScale();
1448
+ rootView.style.fontScaleInternal = fontScale;
1449
+ const rootModalViews = rootView._getRootModalViews();
1450
+ rootModalViews.forEach((rootModalView) => (rootModalView.style.fontScaleInternal = fontScale));
1451
+ }
1452
+ export function initAccessibilityCssHelper() {
1453
+ ensureClasses();
1454
+ updateCurrentHelperClasses(applyRootCssClass);
1455
+ applyFontScaleToRootViews();
1456
+ Application.on(Application.fontScaleChangedEvent, () => {
1457
+ updateCurrentHelperClasses(applyRootCssClass);
1458
+ applyFontScaleToRootViews();
1459
+ });
1460
+ accessibilityServiceObservable.on(AccessibilityServiceEnabledObservable.propertyChangeEvent, () => updateCurrentHelperClasses(applyRootCssClass));
1461
+ }
1462
+ setInitAccessibilityCssHelper(initAccessibilityCssHelper);
1463
+ const applicationEvents = [Application.orientationChangedEvent, Application.systemAppearanceChangedEvent];
1464
+ function toggleApplicationEventListeners(toAdd, callback) {
1465
+ for (const eventName of applicationEvents) {
1466
+ if (toAdd) {
1467
+ Application.on(eventName, callback);
1468
+ }
1469
+ else {
1470
+ Application.off(eventName, callback);
1471
+ }
1472
+ }
1473
+ }
1474
+ setToggleApplicationEventListenersCallback(toggleApplicationEventListeners);
1475
+ setApplicationPropertiesCallback(() => {
1476
+ return {
1477
+ orientation: Application.orientation(),
1478
+ systemAppearance: Application.systemAppearance(),
1479
+ };
1480
+ });
1481
+ //# sourceMappingURL=application.ios.js.map