@nativescript/core 9.1.0-dev.0 → 9.1.0-next.0

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 (551) hide show
  1. package/accessibility/accessibility-common.d.ts +8 -0
  2. package/accessibility/accessibility-common.js +28 -0
  3. package/accessibility/accessibility-common.js.map +1 -1
  4. package/application/application-common.d.ts +188 -6
  5. package/application/application-common.js +402 -98
  6. package/application/application-common.js.map +1 -1
  7. package/application/application-interfaces.d.ts +59 -1
  8. package/application/application.android.d.ts +38 -1
  9. package/application/application.android.js +195 -12
  10. package/application/application.android.js.map +1 -1
  11. package/application/application.d.ts +121 -75
  12. package/application/application.ios.d.ts +106 -28
  13. package/application/application.ios.js +619 -343
  14. package/application/application.ios.js.map +1 -1
  15. package/application/helpers-common.d.ts +5 -0
  16. package/application/helpers-common.js +23 -1
  17. package/application/helpers-common.js.map +1 -1
  18. package/application/scene-delegate-bridge.d.ts +55 -0
  19. package/application/scene-delegate-bridge.js +122 -0
  20. package/application/scene-delegate-bridge.js.map +1 -0
  21. package/color/index.d.ts +0 -5
  22. package/config/config.interface.d.ts +44 -2
  23. package/core-types/index.d.ts +9 -2
  24. package/core-types/index.js +7 -0
  25. package/core-types/index.js.map +1 -1
  26. package/css/CSS3Parser.js +3 -2
  27. package/css/CSS3Parser.js.map +1 -1
  28. package/css/system-classes.d.ts +9 -0
  29. package/css/system-classes.js +23 -0
  30. package/css/system-classes.js.map +1 -1
  31. package/data/observable/index.d.ts +5 -0
  32. package/data/observable/index.js +46 -9
  33. package/data/observable/index.js.map +1 -1
  34. package/debugger/dom-types.js +31 -1
  35. package/debugger/dom-types.js.map +1 -1
  36. package/fetch/index.mjs +2 -2
  37. package/file-system/file-system-access.ios.js +18 -10
  38. package/file-system/file-system-access.ios.js.map +1 -1
  39. package/file-system/index.d.ts +3 -3
  40. package/global-types.d.ts +39 -34
  41. package/globals/global-utils.d.ts +6 -1
  42. package/globals/global-utils.js +10 -5
  43. package/globals/global-utils.js.map +1 -1
  44. package/globals/index.js +18 -5
  45. package/globals/index.js.map +1 -1
  46. package/globals/polyfills/utils.js +2 -0
  47. package/globals/polyfills/utils.js.map +1 -1
  48. package/http/http-request/index.android.js.map +1 -1
  49. package/http/http-request/index.ios.js.map +1 -1
  50. package/http/http-request-internal/index.android.d.ts +7 -1
  51. package/http/http-request-internal/index.android.js.map +1 -1
  52. package/http/http-request-internal/index.ios.d.ts +7 -1
  53. package/http/http-request-internal/index.ios.js.map +1 -1
  54. package/image-source/index.android.d.ts +0 -1
  55. package/image-source/index.android.js.map +1 -1
  56. package/image-source/index.d.ts +0 -5
  57. package/image-source/index.ios.d.ts +0 -1
  58. package/image-source/index.ios.js.map +1 -1
  59. package/index.d.ts +2 -0
  60. package/index.js +1 -0
  61. package/index.js.map +1 -1
  62. package/inspector_modules.js +1 -1
  63. package/inspector_modules.js.map +1 -1
  64. package/native-window/index.d.ts +426 -0
  65. package/native-window/index.js +4 -0
  66. package/native-window/index.js.map +1 -0
  67. package/native-window/native-window-common.d.ts +153 -0
  68. package/native-window/native-window-common.js +340 -0
  69. package/native-window/native-window-common.js.map +1 -0
  70. package/native-window/native-window-interfaces.d.ts +186 -0
  71. package/native-window/native-window-interfaces.js +90 -0
  72. package/native-window/native-window-interfaces.js.map +1 -0
  73. package/native-window/native-window.android.d.ts +59 -0
  74. package/native-window/native-window.android.js +175 -0
  75. package/native-window/native-window.android.js.map +1 -0
  76. package/native-window/native-window.ios.d.ts +57 -0
  77. package/native-window/native-window.ios.js +208 -0
  78. package/native-window/native-window.ios.js.map +1 -0
  79. package/native-window/window-base.d.ts +103 -0
  80. package/native-window/window-base.js +78 -0
  81. package/native-window/window-base.js.map +1 -0
  82. package/package.json +4 -6
  83. package/platform/common.d.ts +0 -2
  84. package/platform/common.js +0 -2
  85. package/platform/common.js.map +1 -1
  86. package/platforms/android/widgets-release.aar +0 -0
  87. package/platforms/ios/TNSWidgets.xcframework/Info.plist +14 -14
  88. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
  89. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  90. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  91. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +78 -78
  92. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +7 -7
  93. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +7 -7
  94. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
  95. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +7 -7
  96. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
  97. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  98. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +78 -78
  99. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +78 -78
  100. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  101. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  102. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +1 -1
  103. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  104. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +78 -78
  105. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +78 -78
  106. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
  107. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  108. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  109. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +78 -78
  110. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  111. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  112. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +1 -1
  113. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  114. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +78 -78
  115. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +78 -78
  116. package/platforms/ios/src/NativeScriptMainWindow.swift +72 -39
  117. package/references.d.ts +0 -4
  118. package/trace/index.d.ts +2 -2
  119. package/ui/action-bar/action-bar-common.js +0 -1
  120. package/ui/action-bar/action-bar-common.js.map +1 -1
  121. package/ui/action-bar/index.ios.js +0 -1
  122. package/ui/action-bar/index.ios.js.map +1 -1
  123. package/ui/animation/keyframe-animation.d.ts +1 -1
  124. package/ui/builder/index.d.ts +0 -1
  125. package/ui/builder/index.js +10 -3
  126. package/ui/builder/index.js.map +1 -1
  127. package/ui/button/index.android.d.ts +2 -9
  128. package/ui/button/index.android.js +7 -24
  129. package/ui/button/index.android.js.map +1 -1
  130. package/ui/button/index.ios.d.ts +2 -9
  131. package/ui/button/index.ios.js +17 -72
  132. package/ui/button/index.ios.js.map +1 -1
  133. package/ui/core/bindable/index.js +2 -1
  134. package/ui/core/bindable/index.js.map +1 -1
  135. package/ui/core/properties/index.d.ts +24 -1
  136. package/ui/core/properties/index.js +96 -10
  137. package/ui/core/properties/index.js.map +1 -1
  138. package/ui/core/properties/property-shared.js +11 -2
  139. package/ui/core/properties/property-shared.js.map +1 -1
  140. package/ui/core/view/index.android.d.ts +1 -0
  141. package/ui/core/view/index.android.js +42 -11
  142. package/ui/core/view/index.android.js.map +1 -1
  143. package/ui/core/view/index.d.ts +58 -1
  144. package/ui/core/view/index.ios.d.ts +1 -0
  145. package/ui/core/view/index.ios.js +28 -6
  146. package/ui/core/view/index.ios.js.map +1 -1
  147. package/ui/core/view/view-common.d.ts +37 -2
  148. package/ui/core/view/view-common.js +82 -6
  149. package/ui/core/view/view-common.js.map +1 -1
  150. package/ui/core/view/view-helper/index.d.ts +1 -0
  151. package/ui/core/view/view-helper/index.ios.d.ts +10 -0
  152. package/ui/core/view/view-helper/index.ios.js +33 -5
  153. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  154. package/ui/core/view/view-helper/view-helper-common.js +21 -3
  155. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  156. package/ui/core/view-base/index.d.ts +37 -18
  157. package/ui/core/view-base/index.js +104 -65
  158. package/ui/core/view-base/index.js.map +1 -1
  159. package/ui/frame/fragment.transitions.android.d.ts +13 -13
  160. package/ui/frame/fragment.transitions.android.js.map +1 -1
  161. package/ui/frame/frame-common.d.ts +16 -3
  162. package/ui/frame/frame-common.js +19 -7
  163. package/ui/frame/frame-common.js.map +1 -1
  164. package/ui/frame/frame-constants.d.ts +9 -0
  165. package/ui/frame/frame-constants.js +10 -0
  166. package/ui/frame/frame-constants.js.map +1 -0
  167. package/ui/frame/frame-helper-for-android.d.ts +6 -6
  168. package/ui/frame/frame-helper-for-android.js +31 -13
  169. package/ui/frame/frame-helper-for-android.js.map +1 -1
  170. package/ui/frame/frame-interfaces.d.ts +1 -1
  171. package/ui/frame/frame-stack.d.ts +17 -1
  172. package/ui/frame/frame-stack.js +32 -5
  173. package/ui/frame/frame-stack.js.map +1 -1
  174. package/ui/frame/index.android.d.ts +7 -12
  175. package/ui/frame/index.android.js +157 -97
  176. package/ui/frame/index.android.js.map +1 -1
  177. package/ui/frame/index.d.ts +27 -26
  178. package/ui/frame/index.ios.d.ts +2 -2
  179. package/ui/frame/index.ios.js.map +1 -1
  180. package/ui/image/image-common.js +1 -1
  181. package/ui/image/image-common.js.map +1 -1
  182. package/ui/image/index.android.js +13 -1
  183. package/ui/image/index.android.js.map +1 -1
  184. package/ui/label/index.ios.d.ts +2 -5
  185. package/ui/label/index.ios.js +12 -44
  186. package/ui/label/index.ios.js.map +1 -1
  187. package/ui/layouts/absolute-layout/index.ios.js +3 -0
  188. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  189. package/ui/layouts/dock-layout/index.ios.js +3 -0
  190. package/ui/layouts/dock-layout/index.ios.js.map +1 -1
  191. package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +9 -17
  192. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +11 -64
  193. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  194. package/ui/layouts/flexbox-layout/index.android.d.ts +5 -0
  195. package/ui/layouts/flexbox-layout/index.android.js +15 -0
  196. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  197. package/ui/layouts/flexbox-layout/index.d.ts +19 -1
  198. package/ui/layouts/flexbox-layout/index.ios.d.ts +2 -0
  199. package/ui/layouts/flexbox-layout/index.ios.js +244 -193
  200. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  201. package/ui/layouts/grid-layout/index.ios.js +3 -0
  202. package/ui/layouts/grid-layout/index.ios.js.map +1 -1
  203. package/ui/layouts/layout-base-common.d.ts +1 -0
  204. package/ui/layouts/layout-base-common.js +21 -0
  205. package/ui/layouts/layout-base-common.js.map +1 -1
  206. package/ui/layouts/layout-base.android.d.ts +3 -10
  207. package/ui/layouts/layout-base.android.js +7 -24
  208. package/ui/layouts/layout-base.android.js.map +1 -1
  209. package/ui/layouts/layout-base.ios.js.map +1 -1
  210. package/ui/layouts/stack-layout/index.ios.js +3 -0
  211. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  212. package/ui/layouts/wrap-layout/index.ios.js +3 -0
  213. package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
  214. package/ui/list-view/index.android.js +3 -2
  215. package/ui/list-view/index.android.js.map +1 -1
  216. package/ui/list-view/index.d.ts +13 -1
  217. package/ui/list-view/index.ios.d.ts +5 -3
  218. package/ui/list-view/index.ios.js +63 -27
  219. package/ui/list-view/index.ios.js.map +1 -1
  220. package/ui/list-view/list-view-common.d.ts +15 -0
  221. package/ui/list-view/list-view-common.js +19 -0
  222. package/ui/list-view/list-view-common.js.map +1 -1
  223. package/ui/page/index.android.d.ts +1 -0
  224. package/ui/page/index.android.js +4 -0
  225. package/ui/page/index.android.js.map +1 -1
  226. package/ui/page/index.d.ts +1 -1
  227. package/ui/page/index.ios.d.ts +3 -1
  228. package/ui/page/index.ios.js +23 -6
  229. package/ui/page/index.ios.js.map +1 -1
  230. package/ui/page/page-common.d.ts +5 -2
  231. package/ui/page/page-common.js.map +1 -1
  232. package/ui/repeater/index.d.ts +2 -1
  233. package/ui/repeater/index.js.map +1 -1
  234. package/ui/scroll-view/index.d.ts +11 -0
  235. package/ui/scroll-view/index.ios.d.ts +3 -1
  236. package/ui/scroll-view/index.ios.js +28 -8
  237. package/ui/scroll-view/index.ios.js.map +1 -1
  238. package/ui/scroll-view/scroll-view-common.d.ts +6 -0
  239. package/ui/scroll-view/scroll-view-common.js +8 -0
  240. package/ui/scroll-view/scroll-view-common.js.map +1 -1
  241. package/ui/segmented-bar/segmented-bar-common.d.ts +5 -1
  242. package/ui/segmented-bar/segmented-bar-common.js +6 -1
  243. package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
  244. package/ui/styling/background-common.d.ts +2 -0
  245. package/ui/styling/background-common.js +9 -0
  246. package/ui/styling/background-common.js.map +1 -1
  247. package/ui/styling/background.ios.js +2 -0
  248. package/ui/styling/background.ios.js.map +1 -1
  249. package/ui/styling/css-selector.d.ts +57 -13
  250. package/ui/styling/css-selector.js +280 -51
  251. package/ui/styling/css-selector.js.map +1 -1
  252. package/ui/styling/css-utils.d.ts +16 -0
  253. package/ui/styling/css-utils.js +121 -7
  254. package/ui/styling/css-utils.js.map +1 -1
  255. package/ui/styling/font.d.ts +0 -4
  256. package/ui/styling/style/index.d.ts +12 -0
  257. package/ui/styling/style/index.js.map +1 -1
  258. package/ui/styling/style-properties.d.ts +6 -0
  259. package/ui/styling/style-properties.js +175 -106
  260. package/ui/styling/style-properties.js.map +1 -1
  261. package/ui/styling/style-scope.d.ts +15 -3
  262. package/ui/styling/style-scope.js +300 -65
  263. package/ui/styling/style-scope.js.map +1 -1
  264. package/ui/switch/index.ios.js +2 -1
  265. package/ui/switch/index.ios.js.map +1 -1
  266. package/ui/tab-view/index.android.d.ts +3 -1
  267. package/ui/tab-view/index.android.js +56 -46
  268. package/ui/tab-view/index.android.js.map +1 -1
  269. package/ui/tab-view/index.ios.d.ts +10 -1
  270. package/ui/tab-view/index.ios.js +22 -4
  271. package/ui/tab-view/index.ios.js.map +1 -1
  272. package/ui/tab-view/tab-view-common.d.ts +6 -1
  273. package/ui/tab-view/tab-view-common.js +16 -3
  274. package/ui/tab-view/tab-view-common.js.map +1 -1
  275. package/ui/text-base/index.android.d.ts +3 -10
  276. package/ui/text-base/index.android.js +15 -32
  277. package/ui/text-base/index.android.js.map +1 -1
  278. package/ui/text-base/index.ios.js +5 -3
  279. package/ui/text-base/index.ios.js.map +1 -1
  280. package/ui/text-field/index.ios.d.ts +2 -9
  281. package/ui/text-field/index.ios.js +2 -23
  282. package/ui/text-field/index.ios.js.map +1 -1
  283. package/ui/text-view/index.ios.d.ts +2 -9
  284. package/ui/text-view/index.ios.js +20 -72
  285. package/ui/text-view/index.ios.js.map +1 -1
  286. package/ui/transition/index.d.ts +2 -1
  287. package/ui/transition/modal-transition.ios.js +33 -5
  288. package/ui/transition/modal-transition.ios.js.map +1 -1
  289. package/ui/transition/page-transition.ios.d.ts +5 -0
  290. package/ui/transition/page-transition.ios.js +296 -33
  291. package/ui/transition/page-transition.ios.js.map +1 -1
  292. package/ui/transition/shared-transition-helper.android.d.ts +3 -0
  293. package/ui/transition/shared-transition-helper.android.js +9 -0
  294. package/ui/transition/shared-transition-helper.android.js.map +1 -1
  295. package/ui/transition/shared-transition-helper.d.ts +7 -0
  296. package/ui/transition/shared-transition-helper.ios.d.ts +36 -0
  297. package/ui/transition/shared-transition-helper.ios.js +765 -89
  298. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  299. package/ui/transition/shared-transition.d.ts +67 -0
  300. package/ui/transition/shared-transition.js +62 -2
  301. package/ui/transition/shared-transition.js.map +1 -1
  302. package/utils/debug-source.js +0 -3
  303. package/utils/debug-source.js.map +1 -1
  304. package/utils/layout-helper/index.ios.js +11 -3
  305. package/utils/layout-helper/index.ios.js.map +1 -1
  306. package/utils/native-helper.android.d.ts +66 -2
  307. package/utils/native-helper.android.js.map +1 -1
  308. package/utils/native-helper.d.ts +2 -2
  309. package/utils/native-helper.ios.d.ts +105 -2
  310. package/utils/native-helper.ios.js +15 -4
  311. package/utils/native-helper.ios.js.map +1 -1
  312. package/utils/native-helper.types.d.ts +2 -0
  313. package/utils/platform-check.d.ts +1 -1
  314. package/utils/platform-check.js.map +1 -1
  315. package/animation-frame/animation-native.windows.d.ts +0 -1
  316. package/animation-frame/animation-native.windows.js +0 -4
  317. package/animation-frame/animation-native.windows.js.map +0 -1
  318. package/application/application.windows.d.ts +0 -27
  319. package/application/application.windows.js +0 -331
  320. package/application/application.windows.js.map +0 -1
  321. package/application/helpers.windows.d.ts +0 -8
  322. package/application/helpers.windows.js +0 -12
  323. package/application/helpers.windows.js.map +0 -1
  324. package/application/index.windows.d.ts +0 -2
  325. package/application/index.windows.js +0 -3
  326. package/application/index.windows.js.map +0 -1
  327. package/application/window-helper.windows.d.ts +0 -29
  328. package/application/window-helper.windows.js +0 -159
  329. package/application/window-helper.windows.js.map +0 -1
  330. package/application-settings/index.windows.d.ts +0 -11
  331. package/application-settings/index.windows.js +0 -93
  332. package/application-settings/index.windows.js.map +0 -1
  333. package/color/index.windows.d.ts +0 -8
  334. package/color/index.windows.js +0 -19
  335. package/color/index.windows.js.map +0 -1
  336. package/connectivity/index.windows.d.ts +0 -11
  337. package/connectivity/index.windows.js +0 -50
  338. package/connectivity/index.windows.js.map +0 -1
  339. package/debugger/webinspector-network.windows.d.ts +0 -79
  340. package/debugger/webinspector-network.windows.js +0 -307
  341. package/debugger/webinspector-network.windows.js.map +0 -1
  342. package/file-system/file-system-access.windows.d.ts +0 -76
  343. package/file-system/file-system-access.windows.js +0 -476
  344. package/file-system/file-system-access.windows.js.map +0 -1
  345. package/fps-meter/fps-native.windows.d.ts +0 -8
  346. package/fps-meter/fps-native.windows.js +0 -40
  347. package/fps-meter/fps-native.windows.js.map +0 -1
  348. package/http/http-request/index.windows.d.ts +0 -2
  349. package/http/http-request/index.windows.js +0 -41
  350. package/http/http-request/index.windows.js.map +0 -1
  351. package/http/http-request-internal/index.windows.d.ts +0 -4
  352. package/http/http-request-internal/index.windows.js +0 -134
  353. package/http/http-request-internal/index.windows.js.map +0 -1
  354. package/image-asset/index.windows.d.ts +0 -9
  355. package/image-asset/index.windows.js +0 -34
  356. package/image-asset/index.windows.js.map +0 -1
  357. package/image-source/index.windows.d.ts +0 -52
  358. package/image-source/index.windows.js +0 -498
  359. package/image-source/index.windows.js.map +0 -1
  360. package/platform/device/index.windows.d.ts +0 -18
  361. package/platform/device/index.windows.js +0 -94
  362. package/platform/device/index.windows.js.map +0 -1
  363. package/platform/screen/index.windows.d.ts +0 -13
  364. package/platform/screen/index.windows.js +0 -25
  365. package/platform/screen/index.windows.js.map +0 -1
  366. package/platforms/windows/arm64/NativeScript.Widgets.dll +0 -0
  367. package/platforms/windows/arm64/NativeScript.Widgets.winmd +0 -0
  368. package/platforms/windows/x64/NativeScript.Widgets.dll +0 -0
  369. package/platforms/windows/x64/NativeScript.Widgets.winmd +0 -0
  370. package/plugin.props +0 -12
  371. package/plugin.targets +0 -71
  372. package/text/index.windows.d.ts +0 -9
  373. package/text/index.windows.js +0 -12
  374. package/text/index.windows.js.map +0 -1
  375. package/timer/index.windows.d.ts +0 -4
  376. package/timer/index.windows.js +0 -14
  377. package/timer/index.windows.js.map +0 -1
  378. package/ui/action-bar/index.windows.d.ts +0 -12
  379. package/ui/action-bar/index.windows.js +0 -36
  380. package/ui/action-bar/index.windows.js.map +0 -1
  381. package/ui/activity-indicator/index.windows.d.ts +0 -15
  382. package/ui/activity-indicator/index.windows.js +0 -65
  383. package/ui/activity-indicator/index.windows.js.map +0 -1
  384. package/ui/animation/index.windows.d.ts +0 -19
  385. package/ui/animation/index.windows.js +0 -603
  386. package/ui/animation/index.windows.js.map +0 -1
  387. package/ui/button/index.windows.d.ts +0 -13
  388. package/ui/button/index.windows.js +0 -73
  389. package/ui/button/index.windows.js.map +0 -1
  390. package/ui/core/control-state-change/index.windows.d.ts +0 -4
  391. package/ui/core/control-state-change/index.windows.js +0 -6
  392. package/ui/core/control-state-change/index.windows.js.map +0 -1
  393. package/ui/core/view/index.windows.d.ts +0 -120
  394. package/ui/core/view/index.windows.js +0 -2178
  395. package/ui/core/view/index.windows.js.map +0 -1
  396. package/ui/core/view/view-helper/index.windows.d.ts +0 -3
  397. package/ui/core/view/view-helper/index.windows.js +0 -4
  398. package/ui/core/view/view-helper/index.windows.js.map +0 -1
  399. package/ui/date-picker/index.windows.d.ts +0 -22
  400. package/ui/date-picker/index.windows.js +0 -97
  401. package/ui/date-picker/index.windows.js.map +0 -1
  402. package/ui/dialogs/index.windows.d.ts +0 -17
  403. package/ui/dialogs/index.windows.js +0 -471
  404. package/ui/dialogs/index.windows.js.map +0 -1
  405. package/ui/editable-text-base/index.windows.d.ts +0 -27
  406. package/ui/editable-text-base/index.windows.js +0 -165
  407. package/ui/editable-text-base/index.windows.js.map +0 -1
  408. package/ui/embedding/index.windows.d.ts +0 -1
  409. package/ui/embedding/index.windows.js +0 -4
  410. package/ui/embedding/index.windows.js.map +0 -1
  411. package/ui/frame/index.windows.d.ts +0 -52
  412. package/ui/frame/index.windows.js +0 -778
  413. package/ui/frame/index.windows.js.map +0 -1
  414. package/ui/gestures/index.windows.d.ts +0 -35
  415. package/ui/gestures/index.windows.js +0 -483
  416. package/ui/gestures/index.windows.js.map +0 -1
  417. package/ui/html-view/index.windows.d.ts +0 -18
  418. package/ui/html-view/index.windows.js +0 -191
  419. package/ui/html-view/index.windows.js.map +0 -1
  420. package/ui/image/index.windows.d.ts +0 -17
  421. package/ui/image/index.windows.js +0 -132
  422. package/ui/image/index.windows.js.map +0 -1
  423. package/ui/image/symbol-effects.windows.d.ts +0 -5
  424. package/ui/image/symbol-effects.windows.js +0 -8
  425. package/ui/image/symbol-effects.windows.js.map +0 -1
  426. package/ui/image-cache/index.windows.d.ts +0 -11
  427. package/ui/image-cache/index.windows.js +0 -48
  428. package/ui/image-cache/index.windows.js.map +0 -1
  429. package/ui/label/index.windows.d.ts +0 -15
  430. package/ui/label/index.windows.js +0 -66
  431. package/ui/label/index.windows.js.map +0 -1
  432. package/ui/layouts/absolute-layout/index.windows.d.ts +0 -8
  433. package/ui/layouts/absolute-layout/index.windows.js +0 -47
  434. package/ui/layouts/absolute-layout/index.windows.js.map +0 -1
  435. package/ui/layouts/dock-layout/index.windows.d.ts +0 -19
  436. package/ui/layouts/dock-layout/index.windows.js +0 -202
  437. package/ui/layouts/dock-layout/index.windows.js.map +0 -1
  438. package/ui/layouts/flexbox-layout/index.windows.d.ts +0 -27
  439. package/ui/layouts/flexbox-layout/index.windows.js +0 -188
  440. package/ui/layouts/flexbox-layout/index.windows.js.map +0 -1
  441. package/ui/layouts/grid-layout/index.windows.d.ts +0 -20
  442. package/ui/layouts/grid-layout/index.windows.js +0 -130
  443. package/ui/layouts/grid-layout/index.windows.js.map +0 -1
  444. package/ui/layouts/layout-base.windows.d.ts +0 -4
  445. package/ui/layouts/layout-base.windows.js +0 -5
  446. package/ui/layouts/layout-base.windows.js.map +0 -1
  447. package/ui/layouts/liquid-glass/index.windows.d.ts +0 -4
  448. package/ui/layouts/liquid-glass/index.windows.js +0 -5
  449. package/ui/layouts/liquid-glass/index.windows.js.map +0 -1
  450. package/ui/layouts/liquid-glass-container/index.windows.d.ts +0 -4
  451. package/ui/layouts/liquid-glass-container/index.windows.js +0 -5
  452. package/ui/layouts/liquid-glass-container/index.windows.js.map +0 -1
  453. package/ui/layouts/root-layout/index.windows.d.ts +0 -13
  454. package/ui/layouts/root-layout/index.windows.js +0 -160
  455. package/ui/layouts/root-layout/index.windows.js.map +0 -1
  456. package/ui/layouts/stack-layout/index.windows.d.ts +0 -13
  457. package/ui/layouts/stack-layout/index.windows.js +0 -63
  458. package/ui/layouts/stack-layout/index.windows.js.map +0 -1
  459. package/ui/layouts/wrap-layout/index.windows.d.ts +0 -20
  460. package/ui/layouts/wrap-layout/index.windows.js +0 -182
  461. package/ui/layouts/wrap-layout/index.windows.js.map +0 -1
  462. package/ui/list-picker/index.windows.d.ts +0 -19
  463. package/ui/list-picker/index.windows.js +0 -75
  464. package/ui/list-picker/index.windows.js.map +0 -1
  465. package/ui/list-view/index.windows.d.ts +0 -60
  466. package/ui/list-view/index.windows.js +0 -842
  467. package/ui/list-view/index.windows.js.map +0 -1
  468. package/ui/page/index.windows.d.ts +0 -12
  469. package/ui/page/index.windows.js +0 -42
  470. package/ui/page/index.windows.js.map +0 -1
  471. package/ui/progress/index.windows.d.ts +0 -20
  472. package/ui/progress/index.windows.js +0 -65
  473. package/ui/progress/index.windows.js.map +0 -1
  474. package/ui/scroll-view/index.windows.d.ts +0 -29
  475. package/ui/scroll-view/index.windows.js +0 -192
  476. package/ui/scroll-view/index.windows.js.map +0 -1
  477. package/ui/search-bar/index.windows.d.ts +0 -19
  478. package/ui/search-bar/index.windows.js +0 -91
  479. package/ui/search-bar/index.windows.js.map +0 -1
  480. package/ui/segmented-bar/index.windows.d.ts +0 -23
  481. package/ui/segmented-bar/index.windows.js +0 -117
  482. package/ui/segmented-bar/index.windows.js.map +0 -1
  483. package/ui/slider/index.windows.d.ts +0 -25
  484. package/ui/slider/index.windows.js +0 -134
  485. package/ui/slider/index.windows.js.map +0 -1
  486. package/ui/split-view/index.windows.d.ts +0 -49
  487. package/ui/split-view/index.windows.js +0 -549
  488. package/ui/split-view/index.windows.js.map +0 -1
  489. package/ui/styling/background.windows.d.ts +0 -2
  490. package/ui/styling/background.windows.js +0 -2
  491. package/ui/styling/background.windows.js.map +0 -1
  492. package/ui/styling/font.windows.d.ts +0 -25
  493. package/ui/styling/font.windows.js +0 -213
  494. package/ui/styling/font.windows.js.map +0 -1
  495. package/ui/switch/index.windows.d.ts +0 -20
  496. package/ui/switch/index.windows.js +0 -97
  497. package/ui/switch/index.windows.js.map +0 -1
  498. package/ui/tab-view/index.windows.d.ts +0 -29
  499. package/ui/tab-view/index.windows.js +0 -268
  500. package/ui/tab-view/index.windows.js.map +0 -1
  501. package/ui/text-base/index.windows.d.ts +0 -47
  502. package/ui/text-base/index.windows.js +0 -639
  503. package/ui/text-base/index.windows.js.map +0 -1
  504. package/ui/text-field/index.windows.d.ts +0 -23
  505. package/ui/text-field/index.windows.js +0 -186
  506. package/ui/text-field/index.windows.js.map +0 -1
  507. package/ui/text-view/index.windows.d.ts +0 -12
  508. package/ui/text-view/index.windows.js +0 -47
  509. package/ui/text-view/index.windows.js.map +0 -1
  510. package/ui/time-picker/index.windows.d.ts +0 -18
  511. package/ui/time-picker/index.windows.js +0 -77
  512. package/ui/time-picker/index.windows.js.map +0 -1
  513. package/ui/transition/fade-transition.windows.d.ts +0 -3
  514. package/ui/transition/fade-transition.windows.js +0 -4
  515. package/ui/transition/fade-transition.windows.js.map +0 -1
  516. package/ui/transition/index.windows.d.ts +0 -20
  517. package/ui/transition/index.windows.js +0 -30
  518. package/ui/transition/index.windows.js.map +0 -1
  519. package/ui/transition/modal-transition.windows.d.ts +0 -3
  520. package/ui/transition/modal-transition.windows.js +0 -4
  521. package/ui/transition/modal-transition.windows.js.map +0 -1
  522. package/ui/transition/page-transition.windows.d.ts +0 -3
  523. package/ui/transition/page-transition.windows.js +0 -4
  524. package/ui/transition/page-transition.windows.js.map +0 -1
  525. package/ui/transition/shared-transition-helper.windows.d.ts +0 -30
  526. package/ui/transition/shared-transition-helper.windows.js +0 -155
  527. package/ui/transition/shared-transition-helper.windows.js.map +0 -1
  528. package/ui/transition/slide-transition.windows.d.ts +0 -3
  529. package/ui/transition/slide-transition.windows.js +0 -4
  530. package/ui/transition/slide-transition.windows.js.map +0 -1
  531. package/ui/utils.windows.d.ts +0 -9
  532. package/ui/utils.windows.js +0 -21
  533. package/ui/utils.windows.js.map +0 -1
  534. package/ui/web-view/index.windows.d.ts +0 -23
  535. package/ui/web-view/index.windows.js +0 -115
  536. package/ui/web-view/index.windows.js.map +0 -1
  537. package/utils/constants.windows.d.ts +0 -2
  538. package/utils/constants.windows.js +0 -5
  539. package/utils/constants.windows.js.map +0 -1
  540. package/utils/index.windows.d.ts +0 -20
  541. package/utils/index.windows.js +0 -94
  542. package/utils/index.windows.js.map +0 -1
  543. package/utils/layout-helper/index.windows.d.ts +0 -25
  544. package/utils/layout-helper/index.windows.js +0 -74
  545. package/utils/layout-helper/index.windows.js.map +0 -1
  546. package/utils/mainthread-helper.windows.d.ts +0 -3
  547. package/utils/mainthread-helper.windows.js +0 -18
  548. package/utils/mainthread-helper.windows.js.map +0 -1
  549. package/utils/native-helper.windows.d.ts +0 -8
  550. package/utils/native-helper.windows.js +0 -101
  551. package/utils/native-helper.windows.js.map +0 -1
@@ -1,4 +1,3 @@
1
- import { CoreTypes } from '../core-types';
2
1
  import { CSSUtils } from '../css/system-classes';
3
2
  import { Device, Screen } from '../platform';
4
3
  import { profile } from '../profiling';
@@ -6,88 +5,76 @@ import { Trace } from '../trace';
6
5
  import { clearResolverCache, prepareAppForModuleResolver, _setResolver } from '../module-name-resolver/helpers';
7
6
  import { Builder } from '../ui/builder';
8
7
  import * as bindableResources from '../ui/core/bindable/bindable-resources';
9
- import { readyInitAccessibilityCssHelper, readyInitFontScale } from '../accessibility/accessibility-common';
10
- import { getAppMainEntry, isAppInBackground, setAppInBackground, setAppMainEntry } from './helpers-common';
8
+ import { applyAccessibilityCssToRoot, readyInitAccessibilityCssHelper, readyInitFontScale } from '../accessibility/accessibility-common';
9
+ import { getActiveWindow, getAppMainEntry, getAutoSystemAppearanceChanged, isAppInBackground, setActiveWindow, setAppInBackground, setAppMainEntry, setAutoSystemAppearanceChanged } from './helpers-common';
11
10
  import { getNativeScriptGlobals } from '../globals/global-utils';
12
11
  import { SDK_VERSION } from '../utils/constants';
13
- // prettier-ignore
14
- const ORIENTATION_CSS_CLASSES = [
15
- `${CSSUtils.CLASS_PREFIX}${CoreTypes.DeviceOrientation.portrait}`,
16
- `${CSSUtils.CLASS_PREFIX}${CoreTypes.DeviceOrientation.landscape}`,
17
- `${CSSUtils.CLASS_PREFIX}${CoreTypes.DeviceOrientation.unknown}`,
18
- ];
19
- // prettier-ignore
20
- const SYSTEM_APPEARANCE_CSS_CLASSES = [
21
- `${CSSUtils.CLASS_PREFIX}${CoreTypes.SystemAppearance.light}`,
22
- `${CSSUtils.CLASS_PREFIX}${CoreTypes.SystemAppearance.dark}`,
23
- ];
24
- // prettier-ignore
25
- const LAYOUT_DIRECTION_CSS_CLASSES = [
26
- `${CSSUtils.CLASS_PREFIX}${CoreTypes.LayoutDirection.ltr}`,
27
- `${CSSUtils.CLASS_PREFIX}${CoreTypes.LayoutDirection.rtl}`,
28
- ];
29
- // SDK Version CSS classes
30
- let sdkVersionClasses = [];
31
- export function initializeSdkVersionClass(rootView) {
32
- const majorVersion = Math.floor(SDK_VERSION);
33
- sdkVersionClasses = [];
34
- let platformPrefix = '';
35
- if (__APPLE__) {
36
- platformPrefix = __VISIONOS__ ? 'ns-visionos' : 'ns-ios';
37
- }
38
- else if (__ANDROID__) {
39
- platformPrefix = 'ns-android';
40
- }
41
- if (platformPrefix) {
42
- // Add exact version class (e.g., .ns-ios-26 or .ns-android-36)
43
- // this acts like 'gte' for that major version range
44
- // e.g., if user wants iOS 27, they can add .ns-ios-27 specifiers
45
- sdkVersionClasses.push(`${platformPrefix}-${majorVersion}`);
46
- }
47
- // Apply the SDK version classes to root views
48
- applySdkVersionClass(rootView);
49
- }
50
- function applySdkVersionClass(rootView) {
51
- if (!sdkVersionClasses.length) {
52
- return;
53
- }
54
- if (!rootView) {
55
- return;
56
- }
57
- // Batch apply all SDK version classes to root view for better performance
58
- const classesToAdd = sdkVersionClasses.filter((className) => !rootView.cssClasses.has(className));
59
- classesToAdd.forEach((className) => rootView.cssClasses.add(className));
60
- // Apply to modal views only if there are any
61
- const rootModalViews = rootView._getRootModalViews();
62
- if (rootModalViews.length > 0) {
63
- rootModalViews.forEach((rootModalView) => {
64
- const modalClassesToAdd = sdkVersionClasses.filter((className) => !rootModalView.cssClasses.has(className));
65
- modalClassesToAdd.forEach((className) => rootModalView.cssClasses.add(className));
66
- });
67
- }
68
- }
12
+ import { NativeWindowEvents, WindowEvents } from '../native-window/native-window-interfaces';
13
+ const ORIENTATION_CSS_CLASSES = CSSUtils.ORIENTATION_CSS_CLASSES;
14
+ const SYSTEM_APPEARANCE_CSS_CLASSES = CSSUtils.SYSTEM_APPEARANCE_CSS_CLASSES;
15
+ const LAYOUT_DIRECTION_CSS_CLASSES = CSSUtils.LAYOUT_DIRECTION_CSS_CLASSES;
69
16
  const globalEvents = getNativeScriptGlobals().events;
70
17
  // Scene lifecycle event names
18
+ /**
19
+ * @deprecated Use `NativeWindowEvents` from `@nativescript/core/native-window` instead.
20
+ */
71
21
  export const SceneEvents = {
22
+ /** @deprecated Use `NativeWindowEvents.sceneWillConnect` instead. */
72
23
  sceneWillConnect: 'sceneWillConnect',
24
+ /** @deprecated Use `NativeWindowEvents.sceneDidActivate` instead. */
73
25
  sceneDidActivate: 'sceneDidActivate',
26
+ /** @deprecated Use `NativeWindowEvents.sceneWillResignActive` instead. */
74
27
  sceneWillResignActive: 'sceneWillResignActive',
28
+ /** @deprecated Use `NativeWindowEvents.sceneWillEnterForeground` instead. */
75
29
  sceneWillEnterForeground: 'sceneWillEnterForeground',
30
+ /** @deprecated Use `NativeWindowEvents.sceneDidEnterBackground` instead. */
76
31
  sceneDidEnterBackground: 'sceneDidEnterBackground',
32
+ /** @deprecated Use `NativeWindowEvents.sceneDidDisconnect` instead. */
77
33
  sceneDidDisconnect: 'sceneDidDisconnect',
34
+ /** @deprecated Use the Application 'windowOpen' event and NativeWindow.setContent() instead. */
78
35
  sceneContentSetup: 'sceneContentSetup',
79
36
  };
80
37
  export class ApplicationCommon {
38
+ /**
39
+ * Boolean to enable/disable systemAppearanceChanged
40
+ */
41
+ get autoSystemAppearanceChanged() {
42
+ return getAutoSystemAppearanceChanged();
43
+ }
44
+ set autoSystemAppearanceChanged(value) {
45
+ setAutoSystemAppearanceChanged(value);
46
+ }
81
47
  /**
82
48
  * @internal - should not be constructed by the user.
83
49
  */
84
50
  constructor() {
51
+ /**
52
+ * @deprecated Use the 'ready' event for application initialization and Application.setWindowContentResolver() to provide window UI. 'launch' continues to fire before the first window's content is created, and its 'root' property is still honored, for backwards compatibility. It will not fire for additional windows or for background launches.
53
+ */
85
54
  this.launchEvent = 'launch';
55
+ /**
56
+ * Raised once per JS context, as soon as the context is initialized. It is never deferred,
57
+ * so it also fires on a background launch where no window is created.
58
+ *
59
+ * Guaranteed ordering: `ready` -> `windowOpen` -> raw connect/create events -> content
60
+ * resolution (the legacy `launch` bridge runs here, for the first window only) ->
61
+ * `contentLoaded` -> `activate`/`displayed`.
62
+ */
63
+ this.readyEvent = 'ready';
64
+ /**
65
+ * Reflects whole-app state: with multiple windows it is raised once the app itself is
66
+ * no longer in the foreground, not when an individual window backgrounds. Listen on a
67
+ * NativeWindow for per-window state.
68
+ */
86
69
  this.suspendEvent = 'suspend';
87
70
  this.displayedEvent = 'displayed';
88
71
  this.backgroundEvent = 'background';
89
72
  this.foregroundEvent = 'foreground';
90
73
  this.resumeEvent = 'resume';
74
+ /**
75
+ * On Android, raised when the last window closes; the process may stay alive.
76
+ * On iOS, raised when the process itself terminates.
77
+ */
91
78
  this.exitEvent = 'exit';
92
79
  this.lowMemoryEvent = 'lowMemory';
93
80
  this.uncaughtErrorEvent = 'uncaughtError';
@@ -100,6 +87,9 @@ export class ApplicationCommon {
100
87
  this.loadAppCssEvent = 'loadAppCss';
101
88
  this.cssChangedEvent = 'cssChanged';
102
89
  this.initRootViewEvent = 'initRootView';
90
+ this.windowOpenEvent = WindowEvents.windowOpen;
91
+ this.windowCloseEvent = WindowEvents.windowClose;
92
+ this.primaryWindowChangedEvent = WindowEvents.primaryWindowChanged;
103
93
  // Application events go through the global events.
104
94
  this.on = globalEvents.on.bind(globalEvents);
105
95
  this.once = globalEvents.once.bind(globalEvents);
@@ -109,11 +99,15 @@ export class ApplicationCommon {
109
99
  this._inBackground = false;
110
100
  this._suspended = false;
111
101
  this._cssFile = './app.css';
102
+ this._readyNotified = false;
103
+ this._appCssLoaded = false;
104
+ this._launchBridgeConsumed = false;
105
+ this._windowContentResolver = null;
112
106
  this.started = false;
113
- /**
114
- * Boolean to enable/disable systemAppearanceChanged
115
- */
116
- this.autoSystemAppearanceChanged = true;
107
+ // --- NativeWindow registry ---
108
+ this._windows = [];
109
+ // --- Primary window traits ---
110
+ this._traitsWindow = null;
117
111
  getNativeScriptGlobals().appInstanceReady = true;
118
112
  global.__onUncaughtError = (error) => {
119
113
  this.notify({
@@ -191,36 +185,62 @@ export class ApplicationCommon {
191
185
  CSSUtils.removeSystemCssClass(cssClass);
192
186
  rootView.cssClasses.delete(cssClass);
193
187
  }
188
+ /**
189
+ * Same as {@link applyCssClass}, minus the system class list: window-scoped classes
190
+ * must not leak into it, because it seeds every window's root view.
191
+ */
192
+ applyWindowScopedCssClass(rootView, cssClasses, newCssClass) {
193
+ if (rootView.cssClasses.has(newCssClass)) {
194
+ return;
195
+ }
196
+ cssClasses.forEach((cssClass) => rootView.cssClasses.delete(cssClass));
197
+ rootView.cssClasses.add(newCssClass);
198
+ this.increaseStyleScopeApplicationCssSelectorVersion(rootView);
199
+ }
200
+ /**
201
+ * The modal registry is process-wide, so only the modals presented over this root
202
+ * view may follow its window-scoped classes.
203
+ */
204
+ getOwnedModalViews(rootView) {
205
+ return rootView._getRootModalViews().filter((modalView) => modalView._getRootModalHost() === rootView);
206
+ }
194
207
  increaseStyleScopeApplicationCssSelectorVersion(rootView) {
195
208
  const styleScope = rootView._styleScope ?? rootView?.currentPage?._styleScope;
196
209
  if (styleScope) {
197
210
  styleScope._increaseApplicationCssSelectorVersion();
198
211
  }
199
212
  }
200
- setRootViewCSSClasses(rootView) {
213
+ setRootViewCSSClasses(rootView, window) {
201
214
  const platform = Device.os.toLowerCase();
202
215
  const deviceType = Device.deviceType.toLowerCase();
203
- const orientation = this.orientation();
204
- const systemAppearance = this.systemAppearance();
205
- const layoutDirection = this.layoutDirection();
216
+ const orientation = window ? window.orientation() : this.orientation();
217
+ const systemAppearance = window ? window.systemAppearance() : this.systemAppearance();
218
+ const layoutDirection = window ? window.layoutDirection() : this.layoutDirection();
206
219
  if (platform) {
207
220
  CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${platform}`);
221
+ // SDK Version CSS classes
222
+ // Add exact version class (e.g., .ns-ios-26 or .ns-android-36)
223
+ // this acts like 'gte' for that major version range
224
+ // e.g., if user wants iOS 27, they can add .ns-ios-27 specifiers
225
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${platform}-${Math.floor(SDK_VERSION)}`);
208
226
  }
209
227
  if (deviceType) {
210
228
  CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${deviceType}`);
211
229
  }
230
+ rootView.cssClasses.add(CSSUtils.ROOT_VIEW_CSS_CLASS);
231
+ const rootViewCssClasses = CSSUtils.getSystemCssClasses();
232
+ rootViewCssClasses.forEach((c) => rootView.cssClasses.add(c));
233
+ // Two windows can disagree on these, so they never reach the process-wide
234
+ // system class list — see CSSUtils.WINDOW_SCOPED_CSS_CLASSES.
212
235
  if (orientation) {
213
- CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${orientation}`);
236
+ rootView.cssClasses.add(`${CSSUtils.CLASS_PREFIX}${orientation}`);
214
237
  }
215
238
  if (systemAppearance) {
216
- CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${systemAppearance}`);
239
+ rootView.cssClasses.add(`${CSSUtils.CLASS_PREFIX}${systemAppearance}`);
217
240
  }
218
241
  if (layoutDirection) {
219
- CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${layoutDirection}`);
242
+ rootView.cssClasses.add(`${CSSUtils.CLASS_PREFIX}${layoutDirection}`);
220
243
  }
221
- rootView.cssClasses.add(CSSUtils.ROOT_VIEW_CSS_CLASS);
222
- const rootViewCssClasses = CSSUtils.getSystemCssClasses();
223
- rootViewCssClasses.forEach((c) => rootView.cssClasses.add(c));
224
244
  this.increaseStyleScopeApplicationCssSelectorVersion(rootView);
225
245
  rootView._onCssStateChange();
226
246
  if (Trace.isEnabled()) {
@@ -250,17 +270,295 @@ export class ApplicationCommon {
250
270
  getMainEntry() {
251
271
  return getAppMainEntry();
252
272
  }
273
+ /**
274
+ * Sets the callback that supplies the UI for windows that need content.
275
+ * Pass `null` to remove a previously set resolver.
276
+ */
277
+ setWindowContentResolver(resolver) {
278
+ this._windowContentResolver = resolver ?? null;
279
+ }
280
+ /**
281
+ * @returns The callback currently supplying window content, if any.
282
+ */
283
+ getWindowContentResolver() {
284
+ return this._windowContentResolver;
285
+ }
286
+ /**
287
+ * Get the primary NativeWindow.
288
+ */
289
+ get primaryWindow() {
290
+ return this._windows.find((nw) => nw.isPrimary);
291
+ }
292
+ /**
293
+ * Get the NativeWindow the user is currently interacting with - the one that activated most
294
+ * recently and is still attached. Falls back to the primary window while no window holds
295
+ * activation, which is the case before the first window activates and on a platform that
296
+ * never raises `activate`.
297
+ */
298
+ get activeWindow() {
299
+ const active = getActiveWindow();
300
+ if (active && active.state === 'attached' && this._windows.indexOf(active) !== -1) {
301
+ return active;
302
+ }
303
+ return this.primaryWindow;
304
+ }
305
+ getWindows(role) {
306
+ if (role === 'all') {
307
+ return [...this._windows];
308
+ }
309
+ const roles = role ? (Array.isArray(role) ? role : [role]) : ['application', 'embedded'];
310
+ return this._windows.filter((nw) => roles.indexOf(nw.role) !== -1);
311
+ }
312
+ /**
313
+ * Get a registered NativeWindow by its id.
314
+ */
315
+ getWindowById(id) {
316
+ return this._windows.find((nw) => nw.id === id);
317
+ }
318
+ /**
319
+ * Opens a new window.
320
+ *
321
+ * @param options Options for the new window, including data to hand to it.
322
+ */
323
+ openWindow(options) {
324
+ throw new Error('openWindow() is not supported on this platform.');
325
+ }
326
+ /**
327
+ * @internal - Get all registered NativeWindows, whatever their role.
328
+ */
329
+ _getWindows() {
330
+ return [...this._windows];
331
+ }
332
+ /**
333
+ * @internal - Register a NativeWindow created by the platform lifecycle.
334
+ */
335
+ _registerWindow(nativeWindow) {
336
+ this._windows.push(nativeWindow);
337
+ // A closing window drops its own listeners, so this is never explicitly removed.
338
+ nativeWindow.on(NativeWindowEvents.activate, this.onWindowActivated, this);
339
+ if (nativeWindow.isPrimary) {
340
+ this.trackPrimaryWindowTraits(nativeWindow);
341
+ }
342
+ this._onWindowRegistered(nativeWindow);
343
+ this.notify({
344
+ eventName: this.windowOpenEvent,
345
+ object: this,
346
+ window: nativeWindow,
347
+ });
348
+ }
349
+ /**
350
+ * @internal - Unregister a NativeWindow when its native surface is gone for good.
351
+ */
352
+ _unregisterWindow(nativeWindow) {
353
+ const idx = this._windows.indexOf(nativeWindow);
354
+ if (idx >= 0) {
355
+ this._windows.splice(idx, 1);
356
+ }
357
+ if (getActiveWindow() === nativeWindow) {
358
+ setActiveWindow(undefined);
359
+ }
360
+ this.notify({
361
+ eventName: this.windowCloseEvent,
362
+ object: this,
363
+ window: nativeWindow,
364
+ });
365
+ // If primary was removed, promote the next window that can actually host content
366
+ if (nativeWindow.isPrimary) {
367
+ nativeWindow._setIsPrimary(false);
368
+ const promoted = this.getWindows().find((nw) => nw.state === 'attached');
369
+ this.trackPrimaryWindowTraits(promoted);
370
+ if (promoted) {
371
+ promoted._setIsPrimary(true);
372
+ this._onPrimaryWindowPromoted(promoted);
373
+ this.notify({
374
+ eventName: this.primaryWindowChangedEvent,
375
+ object: this,
376
+ window: promoted,
377
+ });
378
+ }
379
+ }
380
+ nativeWindow._destroy();
381
+ }
382
+ /**
383
+ * Hook for platform-specific bookkeeping right after a window joins the registry,
384
+ * before `windowOpen` is raised.
385
+ */
386
+ _onWindowRegistered(nativeWindow) {
387
+ // noop
388
+ }
389
+ /**
390
+ * Hook for platform-specific bookkeeping right after a window takes over the primary
391
+ * role, before `primaryWindowChanged` is raised.
392
+ */
393
+ _onPrimaryWindowPromoted(nativeWindow) {
394
+ // noop
395
+ }
396
+ /**
397
+ * Points the application-level orientation, appearance and layout direction at the
398
+ * primary window, which owns those values now that each window has its own.
399
+ */
400
+ trackPrimaryWindowTraits(nativeWindow) {
401
+ const target = nativeWindow ?? null;
402
+ if (this._traitsWindow === target) {
403
+ return;
404
+ }
405
+ const previous = this._traitsWindow;
406
+ if (previous) {
407
+ previous.off(NativeWindowEvents.orientationChanged, this.onWindowOrientationChanged, this);
408
+ previous.off(NativeWindowEvents.systemAppearanceChanged, this.onWindowSystemAppearanceChanged, this);
409
+ previous.off(NativeWindowEvents.layoutDirectionChanged, this.onWindowLayoutDirectionChanged, this);
410
+ }
411
+ this._traitsWindow = target;
412
+ if (!target) {
413
+ return;
414
+ }
415
+ target.on(NativeWindowEvents.orientationChanged, this.onWindowOrientationChanged, this);
416
+ target.on(NativeWindowEvents.systemAppearanceChanged, this.onWindowSystemAppearanceChanged, this);
417
+ target.on(NativeWindowEvents.layoutDirectionChanged, this.onWindowLayoutDirectionChanged, this);
418
+ this.syncTraitsFromWindow(target);
419
+ }
420
+ /**
421
+ * Adopts the window's values. The very first window seeds them quietly — there is no
422
+ * previous application state for it to differ from — while a later promotion raises
423
+ * the change events, because app code observed the outgoing window's values.
424
+ */
425
+ syncTraitsFromWindow(nativeWindow) {
426
+ const orientation = nativeWindow.orientation();
427
+ if (orientation) {
428
+ if (this._orientation === undefined) {
429
+ this._orientation = orientation;
430
+ }
431
+ else {
432
+ this.setOrientation(orientation);
433
+ }
434
+ }
435
+ const systemAppearance = nativeWindow.systemAppearance();
436
+ if (systemAppearance) {
437
+ if (this._systemAppearance === undefined) {
438
+ this._systemAppearance = systemAppearance;
439
+ }
440
+ else {
441
+ this.setSystemAppearance(systemAppearance);
442
+ }
443
+ }
444
+ const layoutDirection = nativeWindow.layoutDirection();
445
+ if (layoutDirection) {
446
+ if (this._layoutDirection === undefined) {
447
+ this._layoutDirection = layoutDirection;
448
+ }
449
+ else {
450
+ this.setLayoutDirection(layoutDirection);
451
+ }
452
+ }
453
+ }
454
+ onWindowActivated(data) {
455
+ setActiveWindow(data.window);
456
+ }
457
+ onWindowOrientationChanged(data) {
458
+ this.setOrientation(data.newValue);
459
+ }
460
+ onWindowSystemAppearanceChanged(data) {
461
+ this.setSystemAppearance(data.newValue);
462
+ }
463
+ onWindowLayoutDirectionChanged(data) {
464
+ this.setLayoutDirection(data.newValue);
465
+ }
466
+ /**
467
+ * @internal - raises `ready` at most once per JS context.
468
+ */
469
+ notifyReady() {
470
+ if (this._readyNotified) {
471
+ return;
472
+ }
473
+ this._readyNotified = true;
474
+ getNativeScriptGlobals().setLaunched();
475
+ this.notify({
476
+ eventName: this.readyEvent,
477
+ object: this,
478
+ ios: this.ios,
479
+ android: this.android,
480
+ });
481
+ }
482
+ /**
483
+ * @internal - produces the content for a window that has none.
484
+ *
485
+ * Resolution order: the window content resolver, then the legacy `launch` event
486
+ * (offered to the first window that asks for content and to no other), then the
487
+ * application main entry. A resolver or a `launch` handler returning `null` takes
488
+ * ownership of the content, so nothing else is tried. A missing main entry leaves
489
+ * the window empty instead of throwing, because content can still arrive later
490
+ * through `run()`/`resetRootView()`.
491
+ *
492
+ * @param options.install `false` returns the resolved view instead of applying it,
493
+ * for platform pipelines that install the root view on the native surface themselves.
494
+ * @param options.launchData platform payload merged into the legacy `launch` event args.
495
+ * @returns The resolved view, or `null` when no content was produced.
496
+ */
497
+ _resolveWindowContent(window, request, options) {
498
+ const content = this.resolveWindowContent(request, options?.launchData);
499
+ if (content == null) {
500
+ return null;
501
+ }
502
+ if (options?.install === false) {
503
+ return this.buildContentView(content);
504
+ }
505
+ window.setContent(content);
506
+ return window.rootView;
507
+ }
508
+ resolveWindowContent(request, launchData) {
509
+ const launchBridgeAvailable = !this._launchBridgeConsumed;
510
+ this._launchBridgeConsumed = true;
511
+ const resolver = this._windowContentResolver;
512
+ if (resolver) {
513
+ const resolved = resolver(request);
514
+ // `null` means the resolver supplies the content itself; only `undefined` falls through.
515
+ if (resolved !== undefined) {
516
+ this._ensureAppCssLoaded();
517
+ return resolved;
518
+ }
519
+ }
520
+ if (launchBridgeAvailable) {
521
+ const root = this.notifyLaunch(launchData);
522
+ if (root === null) {
523
+ return null;
524
+ }
525
+ if (root) {
526
+ return root;
527
+ }
528
+ }
529
+ this._ensureAppCssLoaded();
530
+ const mainEntry = getAppMainEntry();
531
+ return mainEntry ? Builder.createViewFromEntry(mainEntry) : undefined;
532
+ }
533
+ buildContentView(content) {
534
+ if (typeof content === 'string') {
535
+ return Builder.createViewFromEntry({ moduleName: content });
536
+ }
537
+ const entry = content;
538
+ return entry.moduleName || entry.create ? Builder.createViewFromEntry(entry) : content;
539
+ }
540
+ /**
541
+ * Loads the app CSS once per JS context. On the legacy `launch` path this has to run
542
+ * after the handlers, which are allowed to call `setCssFileName()`.
543
+ */
544
+ _ensureAppCssLoaded() {
545
+ if (this._appCssLoaded) {
546
+ return;
547
+ }
548
+ this._appCssLoaded = true;
549
+ this.loadAppCss();
550
+ }
253
551
  notifyLaunch(additionalLanchEventData) {
552
+ this._launchBridgeConsumed = true;
254
553
  const launchArgs = {
255
554
  eventName: this.launchEvent,
256
555
  object: this,
257
556
  ios: this.ios,
258
557
  android: this.android,
259
- windows: this.windows,
260
558
  ...additionalLanchEventData,
261
559
  };
262
560
  this.notify(launchArgs);
263
- this.loadAppCss();
561
+ this._ensureAppCssLoaded();
264
562
  return launchArgs.root;
265
563
  }
266
564
  createRootView(view, fireLaunchEvent = false, additionalLanchEventData) {
@@ -290,10 +588,15 @@ export class ApplicationCommon {
290
588
  setAppMainEntry(typeof entry === 'string' ? { moduleName: entry } : entry);
291
589
  // rest of implementation is platform specific
292
590
  }
293
- initRootView(rootView) {
294
- this.setRootViewCSSClasses(rootView);
591
+ /**
592
+ * @param window the window the root view belongs to. Supplies the window-scoped CSS
593
+ * classes; without it they come from the primary window.
594
+ */
595
+ initRootView(rootView, window) {
596
+ this.setRootViewCSSClasses(rootView, window);
295
597
  readyInitAccessibilityCssHelper();
296
598
  readyInitFontScale();
599
+ applyAccessibilityCssToRoot(rootView);
297
600
  this.notify({ eventName: this.initRootViewEvent, rootView });
298
601
  }
299
602
  /**
@@ -384,18 +687,20 @@ export class ApplicationCommon {
384
687
  object: this,
385
688
  });
386
689
  }
690
+ /**
691
+ * @deprecated Use Application.primaryWindow?.orientation() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.
692
+ */
387
693
  orientation() {
388
- return (this._orientation ?? (this._orientation = this.getOrientation()));
694
+ return this.primaryWindow?.orientation() ?? (this._orientation ?? (this._orientation = this.getOrientation()));
389
695
  }
390
696
  orientationChanged(rootView, newOrientation) {
391
697
  if (!rootView) {
392
698
  return;
393
699
  }
394
700
  const newOrientationCssClass = `${CSSUtils.CLASS_PREFIX}${newOrientation}`;
395
- this.applyCssClass(rootView, ORIENTATION_CSS_CLASSES, newOrientationCssClass, true);
396
- const rootModalViews = rootView._getRootModalViews();
397
- rootModalViews.forEach((rootModalView) => {
398
- this.applyCssClass(rootModalView, ORIENTATION_CSS_CLASSES, newOrientationCssClass, true);
701
+ this.applyWindowScopedCssClass(rootView, ORIENTATION_CSS_CLASSES, newOrientationCssClass);
702
+ this.getOwnedModalViews(rootView).forEach((rootModalView) => {
703
+ this.applyWindowScopedCssClass(rootModalView, ORIENTATION_CSS_CLASSES, newOrientationCssClass);
399
704
  // Trigger state change for root modal view classes and media queries
400
705
  rootModalView._onCssStateChange();
401
706
  });
@@ -427,15 +732,17 @@ export class ApplicationCommon {
427
732
  object: this,
428
733
  });
429
734
  }
735
+ /**
736
+ * @deprecated Use Application.primaryWindow?.systemAppearance() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.
737
+ */
430
738
  systemAppearance() {
431
- // return cached value, or get it from the platform specific override
432
- return (this._systemAppearance ?? (this._systemAppearance = this.getSystemAppearance()));
739
+ return this.primaryWindow?.systemAppearance() ?? (this._systemAppearance ?? (this._systemAppearance = this.getSystemAppearance()));
433
740
  }
434
741
  /**
435
742
  * enable/disable systemAppearanceChanged
436
743
  */
437
744
  setAutoSystemAppearanceChanged(value) {
438
- this.autoSystemAppearanceChanged = value;
745
+ setAutoSystemAppearanceChanged(value);
439
746
  }
440
747
  /**
441
748
  * Updates root view classes including those of modals
@@ -447,10 +754,9 @@ export class ApplicationCommon {
447
754
  return;
448
755
  }
449
756
  const newSystemAppearanceCssClass = `${CSSUtils.CLASS_PREFIX}${newSystemAppearance}`;
450
- this.applyCssClass(rootView, SYSTEM_APPEARANCE_CSS_CLASSES, newSystemAppearanceCssClass, true);
451
- const rootModalViews = rootView._getRootModalViews();
452
- rootModalViews.forEach((rootModalView) => {
453
- this.applyCssClass(rootModalView, SYSTEM_APPEARANCE_CSS_CLASSES, newSystemAppearanceCssClass, true);
757
+ this.applyWindowScopedCssClass(rootView, SYSTEM_APPEARANCE_CSS_CLASSES, newSystemAppearanceCssClass);
758
+ this.getOwnedModalViews(rootView).forEach((rootModalView) => {
759
+ this.applyWindowScopedCssClass(rootModalView, SYSTEM_APPEARANCE_CSS_CLASSES, newSystemAppearanceCssClass);
454
760
  // Trigger state change for root modal view classes and media queries
455
761
  rootModalView._onCssStateChange();
456
762
  });
@@ -475,9 +781,11 @@ export class ApplicationCommon {
475
781
  object: this,
476
782
  });
477
783
  }
784
+ /**
785
+ * @deprecated Use Application.primaryWindow?.layoutDirection() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.
786
+ */
478
787
  layoutDirection() {
479
- // return cached value, or get it from the platform specific override
480
- return (this._layoutDirection ?? (this._layoutDirection = this.getLayoutDirection()));
788
+ return this.primaryWindow?.layoutDirection() ?? (this._layoutDirection ?? (this._layoutDirection = this.getLayoutDirection()));
481
789
  }
482
790
  /**
483
791
  * Updates root view classes including those of modals
@@ -489,10 +797,9 @@ export class ApplicationCommon {
489
797
  return;
490
798
  }
491
799
  const newLayoutDirectionCssClass = `${CSSUtils.CLASS_PREFIX}${newLayoutDirection}`;
492
- this.applyCssClass(rootView, LAYOUT_DIRECTION_CSS_CLASSES, newLayoutDirectionCssClass, true);
493
- const rootModalViews = rootView._getRootModalViews();
494
- rootModalViews.forEach((rootModalView) => {
495
- this.applyCssClass(rootModalView, LAYOUT_DIRECTION_CSS_CLASSES, newLayoutDirectionCssClass, true);
800
+ this.applyWindowScopedCssClass(rootView, LAYOUT_DIRECTION_CSS_CLASSES, newLayoutDirectionCssClass);
801
+ this.getOwnedModalViews(rootView).forEach((rootModalView) => {
802
+ this.applyWindowScopedCssClass(rootModalView, LAYOUT_DIRECTION_CSS_CLASSES, newLayoutDirectionCssClass);
496
803
  // Trigger state change for root modal view classes and media queries
497
804
  rootModalView._onCssStateChange();
498
805
  });
@@ -530,9 +837,6 @@ export class ApplicationCommon {
530
837
  get ios() {
531
838
  return undefined;
532
839
  }
533
- get windows() {
534
- return undefined;
535
- }
536
840
  get AndroidApplication() {
537
841
  return this.android;
538
842
  }