@nativescript/core 9.0.0-alpha.21 → 9.0.0-alpha.23

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