@nativescript/vite 8.0.0-alpha.5 → 8.0.0-alpha.50

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 (424) hide show
  1. package/README.md +51 -11
  2. package/bin/cli.cjs +8 -14
  3. package/configuration/angular.d.ts +34 -1
  4. package/configuration/angular.js +376 -165
  5. package/configuration/angular.js.map +1 -1
  6. package/configuration/base.js +241 -51
  7. package/configuration/base.js.map +1 -1
  8. package/configuration/javascript.js +14 -93
  9. package/configuration/javascript.js.map +1 -1
  10. package/configuration/react.js +41 -73
  11. package/configuration/react.js.map +1 -1
  12. package/configuration/solid.js +51 -6
  13. package/configuration/solid.js.map +1 -1
  14. package/configuration/typescript.js +12 -93
  15. package/configuration/typescript.js.map +1 -1
  16. package/helpers/app-components.d.ts +2 -1
  17. package/helpers/app-components.js.map +1 -1
  18. package/helpers/app-css-state.d.ts +8 -0
  19. package/helpers/app-css-state.js +8 -0
  20. package/helpers/app-css-state.js.map +1 -0
  21. package/helpers/bundler-context.d.ts +11 -0
  22. package/helpers/bundler-context.js +71 -0
  23. package/helpers/bundler-context.js.map +1 -0
  24. package/helpers/cli-flags.d.ts +12 -0
  25. package/helpers/cli-flags.js +34 -0
  26. package/helpers/cli-flags.js.map +1 -1
  27. package/helpers/css-platform-plugin.d.ts +14 -0
  28. package/helpers/css-platform-plugin.js +43 -25
  29. package/helpers/css-platform-plugin.js.map +1 -1
  30. package/helpers/dev-host.d.ts +360 -0
  31. package/helpers/dev-host.js +694 -0
  32. package/helpers/dev-host.js.map +1 -0
  33. package/helpers/dynamic-import-plugin.js +1 -1
  34. package/helpers/dynamic-import-plugin.js.map +1 -1
  35. package/helpers/esbuild-platform-resolver.js +4 -1
  36. package/helpers/esbuild-platform-resolver.js.map +1 -1
  37. package/helpers/external-configs.d.ts +10 -12
  38. package/helpers/external-configs.js +58 -35
  39. package/helpers/external-configs.js.map +1 -1
  40. package/helpers/global-defines.d.ts +142 -0
  41. package/helpers/global-defines.js +213 -11
  42. package/helpers/global-defines.js.map +1 -1
  43. package/helpers/hmr-scope.d.ts +26 -0
  44. package/helpers/hmr-scope.js +67 -0
  45. package/helpers/hmr-scope.js.map +1 -0
  46. package/helpers/init.js +0 -18
  47. package/helpers/init.js.map +1 -1
  48. package/helpers/logging.d.ts +1 -0
  49. package/helpers/logging.js +65 -4
  50. package/helpers/logging.js.map +1 -1
  51. package/helpers/main-entry.d.ts +3 -1
  52. package/helpers/main-entry.js +301 -53
  53. package/helpers/main-entry.js.map +1 -1
  54. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  55. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  56. package/helpers/nativeclass-transform.js +5 -6
  57. package/helpers/nativeclass-transform.js.map +1 -1
  58. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  59. package/helpers/nativeclass-transformer-plugin.js +157 -14
  60. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  61. package/helpers/nativescript-package-resolver.js +10 -62
  62. package/helpers/nativescript-package-resolver.js.map +1 -1
  63. package/helpers/normalize-id.d.ts +42 -0
  64. package/helpers/normalize-id.js +60 -0
  65. package/helpers/normalize-id.js.map +1 -0
  66. package/helpers/ns-core-url.d.ts +29 -7
  67. package/helpers/ns-core-url.js +69 -12
  68. package/helpers/ns-core-url.js.map +1 -1
  69. package/helpers/optimize-deps.d.ts +16 -0
  70. package/helpers/optimize-deps.js +17 -0
  71. package/helpers/optimize-deps.js.map +1 -0
  72. package/helpers/package-platform-aliases.js +34 -49
  73. package/helpers/package-platform-aliases.js.map +1 -1
  74. package/helpers/platform-types.d.ts +2 -0
  75. package/helpers/platform-types.js +2 -0
  76. package/helpers/platform-types.js.map +1 -0
  77. package/helpers/postcss-platform-config.d.ts +17 -1
  78. package/helpers/postcss-platform-config.js +20 -37
  79. package/helpers/postcss-platform-config.js.map +1 -1
  80. package/helpers/project.d.ts +35 -0
  81. package/helpers/project.js +120 -2
  82. package/helpers/project.js.map +1 -1
  83. package/helpers/resolve-main-field-platform.d.ts +20 -0
  84. package/helpers/resolve-main-field-platform.js +49 -0
  85. package/helpers/resolve-main-field-platform.js.map +1 -0
  86. package/helpers/resolver.js +17 -2
  87. package/helpers/resolver.js.map +1 -1
  88. package/helpers/theme-core-plugins.js +1 -1
  89. package/helpers/theme-core-plugins.js.map +1 -1
  90. package/helpers/ts-config-paths.d.ts +14 -0
  91. package/helpers/ts-config-paths.js +90 -9
  92. package/helpers/ts-config-paths.js.map +1 -1
  93. package/helpers/typescript-check.d.ts +2 -1
  94. package/helpers/typescript-check.js +2 -2
  95. package/helpers/typescript-check.js.map +1 -1
  96. package/helpers/ui-registration.d.ts +21 -0
  97. package/helpers/ui-registration.js +156 -0
  98. package/helpers/ui-registration.js.map +1 -0
  99. package/helpers/utils.d.ts +9 -0
  100. package/helpers/utils.js +22 -2
  101. package/helpers/utils.js.map +1 -1
  102. package/helpers/workers.d.ts +20 -19
  103. package/helpers/workers.js +624 -4
  104. package/helpers/workers.js.map +1 -1
  105. package/hmr/client/css-handler.d.ts +2 -1
  106. package/hmr/client/css-handler.js +50 -26
  107. package/hmr/client/css-handler.js.map +1 -1
  108. package/hmr/client/css-update-overlay.d.ts +18 -0
  109. package/hmr/client/css-update-overlay.js +27 -0
  110. package/hmr/client/css-update-overlay.js.map +1 -0
  111. package/hmr/client/framework-client-strategy.d.ts +79 -0
  112. package/hmr/client/framework-client-strategy.js +19 -0
  113. package/hmr/client/framework-client-strategy.js.map +1 -0
  114. package/hmr/client/hmr-pending-overlay.d.ts +13 -0
  115. package/hmr/client/hmr-pending-overlay.js +60 -0
  116. package/hmr/client/hmr-pending-overlay.js.map +1 -0
  117. package/hmr/client/index.js +891 -220
  118. package/hmr/client/index.js.map +1 -1
  119. package/hmr/client/utils.d.ts +7 -1
  120. package/hmr/client/utils.js +207 -29
  121. package/hmr/client/utils.js.map +1 -1
  122. package/hmr/entry-runtime.d.ts +2 -1
  123. package/hmr/entry-runtime.js +256 -69
  124. package/hmr/entry-runtime.js.map +1 -1
  125. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  126. package/hmr/frameworks/angular/build/angular-linker.js +109 -0
  127. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  128. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  129. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  130. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  131. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  132. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  133. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  134. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  135. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  136. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  137. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  138. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  139. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  140. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  141. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  142. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  143. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  144. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  145. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  146. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  147. package/hmr/frameworks/angular/build/util.js +155 -0
  148. package/hmr/frameworks/angular/build/util.js.map +1 -0
  149. package/hmr/frameworks/angular/client/index.d.ts +1 -0
  150. package/hmr/frameworks/angular/client/index.js +859 -21
  151. package/hmr/frameworks/angular/client/index.js.map +1 -1
  152. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  153. package/hmr/frameworks/angular/client/strategy.js +19 -0
  154. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  155. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  156. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  157. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  158. package/hmr/frameworks/angular/server/linker.js +1 -4
  159. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  160. package/hmr/frameworks/angular/server/strategy.js +460 -12
  161. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  162. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  163. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  164. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +17 -11
  165. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +336 -0
  166. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  167. package/hmr/frameworks/react/server/strategy.d.ts +2 -0
  168. package/hmr/frameworks/react/server/strategy.js +150 -0
  169. package/hmr/frameworks/react/server/strategy.js.map +1 -0
  170. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  171. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  172. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  173. package/hmr/frameworks/solid/client/app-runtime.d.ts +54 -0
  174. package/hmr/frameworks/solid/client/app-runtime.js +184 -0
  175. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
  176. package/hmr/frameworks/solid/server/strategy.js +291 -16
  177. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  178. package/hmr/frameworks/typescript/server/strategy.js +38 -14
  179. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  180. package/hmr/frameworks/vue/client/dep-propagation.d.ts +36 -0
  181. package/hmr/frameworks/vue/client/dep-propagation.js +101 -0
  182. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  183. package/hmr/frameworks/vue/client/index.d.ts +8 -0
  184. package/hmr/frameworks/vue/client/index.js +56 -243
  185. package/hmr/frameworks/vue/client/index.js.map +1 -1
  186. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  187. package/hmr/frameworks/vue/client/strategy.js +157 -0
  188. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  189. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  190. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +142 -0
  191. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  192. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  193. package/hmr/frameworks/vue/server/sfc-route-assemble.js +747 -0
  194. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  195. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  196. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  197. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  198. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  199. package/hmr/frameworks/vue/server/sfc-route-serve.js +459 -0
  200. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  201. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +38 -0
  202. package/hmr/frameworks/vue/server/sfc-route-shared.js +48 -0
  203. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  204. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  205. package/hmr/frameworks/vue/server/strategy.js +278 -1
  206. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  207. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  208. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  209. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  210. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  211. package/hmr/helpers/ast-normalizer.js +77 -10
  212. package/hmr/helpers/ast-normalizer.js.map +1 -1
  213. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  214. package/hmr/helpers/cjs-named-exports.js +152 -0
  215. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  216. package/hmr/helpers/package-exports.d.ts +16 -0
  217. package/hmr/helpers/package-exports.js +396 -0
  218. package/hmr/helpers/package-exports.js.map +1 -0
  219. package/hmr/server/constants.js +20 -5
  220. package/hmr/server/constants.js.map +1 -1
  221. package/hmr/server/core-sanitize.d.ts +86 -7
  222. package/hmr/server/core-sanitize.js +170 -45
  223. package/hmr/server/core-sanitize.js.map +1 -1
  224. package/hmr/server/device-transform-helpers.d.ts +24 -0
  225. package/hmr/server/device-transform-helpers.js +408 -0
  226. package/hmr/server/device-transform-helpers.js.map +1 -0
  227. package/hmr/server/framework-strategy.d.ts +108 -11
  228. package/hmr/server/hmr-module-graph.d.ts +37 -0
  229. package/hmr/server/hmr-module-graph.js +214 -0
  230. package/hmr/server/hmr-module-graph.js.map +1 -0
  231. package/hmr/server/import-map.d.ts +11 -2
  232. package/hmr/server/import-map.js +92 -45
  233. package/hmr/server/import-map.js.map +1 -1
  234. package/hmr/server/index.js +7 -16
  235. package/hmr/server/index.js.map +1 -1
  236. package/hmr/server/ns-core-cjs-shape.d.ts +2 -4
  237. package/hmr/server/ns-core-cjs-shape.js +4 -6
  238. package/hmr/server/ns-core-cjs-shape.js.map +1 -1
  239. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  240. package/hmr/server/ns-rt-bridge.js +131 -0
  241. package/hmr/server/ns-rt-bridge.js.map +1 -0
  242. package/hmr/server/ns-rt-route.d.ts +5 -0
  243. package/hmr/server/ns-rt-route.js +38 -0
  244. package/hmr/server/ns-rt-route.js.map +1 -0
  245. package/hmr/server/perf-instrumentation.d.ts +114 -0
  246. package/hmr/server/perf-instrumentation.js +197 -0
  247. package/hmr/server/perf-instrumentation.js.map +1 -0
  248. package/hmr/server/process-code-for-device.d.ts +14 -0
  249. package/hmr/server/process-code-for-device.js +699 -0
  250. package/hmr/server/process-code-for-device.js.map +1 -0
  251. package/hmr/server/require-guard.d.ts +1 -0
  252. package/hmr/server/require-guard.js +12 -0
  253. package/hmr/server/require-guard.js.map +1 -0
  254. package/hmr/server/rewrite-imports.d.ts +2 -0
  255. package/hmr/server/rewrite-imports.js +630 -0
  256. package/hmr/server/rewrite-imports.js.map +1 -0
  257. package/hmr/server/route-helpers.d.ts +7 -0
  258. package/hmr/server/route-helpers.js +13 -0
  259. package/hmr/server/route-helpers.js.map +1 -0
  260. package/hmr/server/server-origin.d.ts +2 -0
  261. package/hmr/server/server-origin.js +83 -0
  262. package/hmr/server/server-origin.js.map +1 -0
  263. package/hmr/server/shared-transform-request.js +13 -7
  264. package/hmr/server/shared-transform-request.js.map +1 -1
  265. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  266. package/hmr/server/transform-cache-invalidation.js +156 -0
  267. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  268. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  269. package/hmr/server/vendor-bare-module-shims.js +80 -0
  270. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  271. package/hmr/server/vite-plugin.js +78 -42
  272. package/hmr/server/vite-plugin.js.map +1 -1
  273. package/hmr/server/websocket-core-bridge.d.ts +45 -4
  274. package/hmr/server/websocket-core-bridge.js +50 -48
  275. package/hmr/server/websocket-core-bridge.js.map +1 -1
  276. package/hmr/server/websocket-css-hot-update.d.ts +33 -0
  277. package/hmr/server/websocket-css-hot-update.js +65 -0
  278. package/hmr/server/websocket-css-hot-update.js.map +1 -0
  279. package/hmr/server/websocket-device-transform.d.ts +3 -0
  280. package/hmr/server/websocket-device-transform.js +7 -0
  281. package/hmr/server/websocket-device-transform.js.map +1 -0
  282. package/hmr/server/websocket-graph-upsert.d.ts +15 -0
  283. package/hmr/server/websocket-graph-upsert.js +20 -0
  284. package/hmr/server/websocket-graph-upsert.js.map +1 -1
  285. package/hmr/server/websocket-hmr-pending.d.ts +37 -0
  286. package/hmr/server/websocket-hmr-pending.js +55 -0
  287. package/hmr/server/websocket-hmr-pending.js.map +1 -0
  288. package/hmr/server/websocket-hot-update.d.ts +77 -0
  289. package/hmr/server/websocket-hot-update.js +360 -0
  290. package/hmr/server/websocket-hot-update.js.map +1 -0
  291. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  292. package/hmr/server/websocket-import-map-route.js +50 -0
  293. package/hmr/server/websocket-import-map-route.js.map +1 -0
  294. package/hmr/server/websocket-module-bindings.js +3 -3
  295. package/hmr/server/websocket-module-bindings.js.map +1 -1
  296. package/hmr/server/websocket-module-specifiers.d.ts +66 -2
  297. package/hmr/server/websocket-module-specifiers.js +191 -20
  298. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  299. package/hmr/server/websocket-ns-core.d.ts +21 -0
  300. package/hmr/server/websocket-ns-core.js +311 -0
  301. package/hmr/server/websocket-ns-core.js.map +1 -0
  302. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  303. package/hmr/server/websocket-ns-entry.js +164 -0
  304. package/hmr/server/websocket-ns-entry.js.map +1 -0
  305. package/hmr/server/websocket-ns-m-paths.d.ts +1 -1
  306. package/hmr/server/websocket-ns-m-paths.js +58 -13
  307. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  308. package/hmr/server/websocket-ns-m-request.d.ts +11 -1
  309. package/hmr/server/websocket-ns-m-request.js +18 -25
  310. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  311. package/hmr/server/websocket-ns-m.d.ts +33 -0
  312. package/hmr/server/websocket-ns-m.js +752 -0
  313. package/hmr/server/websocket-ns-m.js.map +1 -0
  314. package/hmr/server/websocket-served-module-helpers.d.ts +49 -3
  315. package/hmr/server/websocket-served-module-helpers.js +403 -87
  316. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  317. package/hmr/server/websocket-txn.js +2 -8
  318. package/hmr/server/websocket-txn.js.map +1 -1
  319. package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
  320. package/hmr/server/websocket-vendor-unifier.js +4 -9
  321. package/hmr/server/websocket-vendor-unifier.js.map +1 -1
  322. package/hmr/server/websocket.d.ts +8 -39
  323. package/hmr/server/websocket.js +608 -6300
  324. package/hmr/server/websocket.js.map +1 -1
  325. package/hmr/shared/ns-globals.d.ts +118 -0
  326. package/hmr/shared/ns-globals.js +29 -0
  327. package/hmr/shared/ns-globals.js.map +1 -0
  328. package/hmr/shared/protocol.d.ts +145 -0
  329. package/hmr/shared/protocol.js +28 -0
  330. package/hmr/shared/protocol.js.map +1 -0
  331. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  332. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  333. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  334. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  335. package/hmr/shared/runtime/boot-progress.js +133 -0
  336. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  337. package/hmr/shared/runtime/boot-timeline.d.ts +18 -0
  338. package/hmr/shared/runtime/boot-timeline.js +42 -0
  339. package/hmr/shared/runtime/boot-timeline.js.map +1 -0
  340. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  341. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  342. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  343. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  344. package/hmr/shared/runtime/dev-overlay.d.ts +119 -26
  345. package/hmr/shared/runtime/dev-overlay.js +1196 -262
  346. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  347. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  348. package/hmr/shared/runtime/global-scope.js +21 -0
  349. package/hmr/shared/runtime/global-scope.js.map +1 -0
  350. package/hmr/shared/runtime/hooks.js +2 -1
  351. package/hmr/shared/runtime/hooks.js.map +1 -1
  352. package/hmr/shared/runtime/http-only-boot.js +7 -6
  353. package/hmr/shared/runtime/http-only-boot.js.map +1 -1
  354. package/hmr/shared/runtime/module-provenance.js +4 -6
  355. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  356. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  357. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  358. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  359. package/hmr/shared/runtime/root-placeholder.js +393 -200
  360. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  361. package/hmr/shared/runtime/session-bootstrap.js +168 -4
  362. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  363. package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
  364. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  365. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  366. package/hmr/shared/vendor/manifest-collect.js +549 -0
  367. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  368. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  369. package/hmr/shared/vendor/manifest-loader.js +5 -3
  370. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  371. package/hmr/shared/vendor/manifest.d.ts +1 -7
  372. package/hmr/shared/vendor/manifest.js +84 -819
  373. package/hmr/shared/vendor/manifest.js.map +1 -1
  374. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  375. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  376. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  377. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +38 -0
  378. package/hmr/shared/vendor/vendor-esbuild-plugins.js +296 -0
  379. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  380. package/hmr/vendor-bootstrap.d.ts +1 -3
  381. package/hmr/vendor-bootstrap.js +4 -6
  382. package/hmr/vendor-bootstrap.js.map +1 -1
  383. package/index.d.ts +1 -0
  384. package/index.js +5 -0
  385. package/index.js.map +1 -1
  386. package/package.json +61 -11
  387. package/runtime/core-aliases-early.js +25 -55
  388. package/runtime/core-aliases-early.js.map +1 -1
  389. package/shims/react-jsx-runtime.d.ts +4 -0
  390. package/shims/react-jsx-runtime.js +37 -0
  391. package/shims/react-jsx-runtime.js.map +1 -0
  392. package/helpers/angular/angular-linker.d.ts +0 -13
  393. package/helpers/angular/angular-linker.js +0 -194
  394. package/helpers/angular/angular-linker.js.map +0 -1
  395. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  396. package/helpers/angular/shared-linker.d.ts +0 -11
  397. package/helpers/angular/shared-linker.js +0 -75
  398. package/helpers/angular/shared-linker.js.map +0 -1
  399. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  400. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  401. package/helpers/angular/util.js +0 -67
  402. package/helpers/angular/util.js.map +0 -1
  403. package/helpers/prelink-angular.d.ts +0 -2
  404. package/helpers/prelink-angular.js +0 -117
  405. package/helpers/prelink-angular.js.map +0 -1
  406. package/hmr/server/websocket-angular-entry.js.map +0 -1
  407. package/hmr/server/websocket-angular-hot-update.js +0 -239
  408. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  409. package/hmr/server/websocket-ns-m-finalize.d.ts +0 -22
  410. package/hmr/server/websocket-ns-m-finalize.js +0 -88
  411. package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
  412. package/hmr/server/websocket-runtime-compat.d.ts +0 -19
  413. package/hmr/server/websocket-runtime-compat.js +0 -286
  414. package/hmr/server/websocket-runtime-compat.js.map +0 -1
  415. package/hmr/server/websocket-vue-sfc.d.ts +0 -27
  416. package/hmr/server/websocket-vue-sfc.js +0 -1117
  417. package/hmr/server/websocket-vue-sfc.js.map +0 -1
  418. package/transformers/NativeClass/index.d.ts +0 -2
  419. package/transformers/NativeClass/index.js +0 -222
  420. package/transformers/NativeClass/index.js.map +0 -1
  421. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  422. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  423. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  424. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Virtual module that registers @nativescript/core/ui with the bundler module
3
+ * registry (so the XML builder's `global.loadModule('@nativescript/core/ui')`
4
+ * resolves), registers short element names (Frame, StackLayout, …), imports the
5
+ * bundler context, and applies View prototype guards.
6
+ *
7
+ * The entry (`virtual:entry-with-polyfills`, see main-entry.ts) imports this
8
+ * module immediately after `bundle-entry-points`, so its body evaluates after
9
+ * core's entry points but before the user's main module.
10
+ *
11
+ * History: this code used to be string-injected by a `transform` hook in
12
+ * typescript.ts / javascript.ts that regex-matched the generated entry for the
13
+ * literal `import '@nativescript/core/bundle-entry-points';`. main-entry.ts
14
+ * later switched to `JSON.stringify(...)` (double quotes; a full dev-server URL
15
+ * under HMR) and the marker silently stopped matching — no injection, and every
16
+ * XML build failed with "Module 'Frame' not found". A dedicated virtual module
17
+ * cannot drift like that.
18
+ */
19
+ export const UI_REGISTRATION_VIRTUAL_ID = 'virtual:ns-ui-registration';
20
+ const RESOLVED_ID = '\0' + UI_REGISTRATION_VIRTUAL_ID;
21
+ // TypeScript flavor: statically import the core UI barrel (the ns-core-external
22
+ // plugin rewrites it to the canonical core URL under HMR) and register it plus
23
+ // per-element nicknames; guard flex/layout View accessors against early writes.
24
+ const TS_REGISTRATION_CODE = `import '@nativescript/core/ui/styling/style';
25
+ import '@nativescript/core/ui/styling/style-properties';
26
+ import * as __nsCoreUi from '@nativescript/core/ui';
27
+ import 'virtual:ns-bundler-context';
28
+ (function(){
29
+ try {
30
+ const __ui = __nsCoreUi;
31
+ if (global.registerModule) {
32
+ const existsFn = global.moduleExists ? (n) => global.moduleExists(n) : () => false;
33
+ if (!existsFn('@nativescript/core/ui')) {
34
+ try { global.registerModule('@nativescript/core/ui', () => __ui); } catch(_) {}
35
+ }
36
+ Object.keys(__ui || {}).forEach(k => {
37
+ if (k && k[0] === k[0].toUpperCase() && !existsFn(k)) {
38
+ try { global.registerModule(k, () => ({ [k]: __ui[k] })); } catch(_) {}
39
+ }
40
+ });
41
+ }
42
+ if (__ui && __ui.View) {
43
+ const View = __ui.View;
44
+ const props = ['order','flexGrow','flexShrink','flexWrapBefore','alignSelf'];
45
+ for (const p of props) {
46
+ const d = Object.getOwnPropertyDescriptor(View.prototype, p);
47
+ if (d && typeof d.set === 'function') {
48
+ const origSet = d.set;
49
+ Object.defineProperty(View.prototype, p, {
50
+ configurable: true,
51
+ enumerable: d.enumerable,
52
+ get: d.get,
53
+ set(value){
54
+ if (value === undefined || value === null) return;
55
+ if (!this || !this._style) {
56
+ try { if (this && !this._style) this._style = this.style; } catch(_) {}
57
+ if (!this || !this._style) return;
58
+ }
59
+ return origSet.call(this, value);
60
+ }
61
+ });
62
+ }
63
+ }
64
+ // Force layout invalidation for alignment/visibility/size property changes
65
+ const forceProps = ['horizontalAlignment','verticalAlignment','visibility','height','width'];
66
+ for (const p of forceProps) {
67
+ const d = Object.getOwnPropertyDescriptor(View.prototype, p);
68
+ if (d && typeof d.set === 'function') {
69
+ const orig = d.set;
70
+ Object.defineProperty(View.prototype, p, {
71
+ configurable: true,
72
+ enumerable: d.enumerable,
73
+ get: d.get,
74
+ set(value){
75
+ const prev = this[p];
76
+ try { orig.call(this, value); } finally {
77
+ if (prev !== value) { try { this && this.requestLayout && this.requestLayout(); } catch(_) {} }
78
+ }
79
+ }
80
+ });
81
+ }
82
+ }
83
+ }
84
+ } catch(_) {}
85
+ })();
86
+ `;
87
+ // JavaScript flavor: resolve the UI barrel via the runtime module registry
88
+ // (global.loadModule) instead of a static namespace import; flex guard only,
89
+ // plus short element name registration.
90
+ const JS_REGISTRATION_CODE = `// Ensure style system is initialized before any UI component modules register CSS properties
91
+ import '@nativescript/core/ui/styling/style';
92
+ import '@nativescript/core/ui/styling/style-properties';
93
+ import 'virtual:ns-bundler-context';
94
+ // Patch CSS accessors to be resilient to early default initializations before style exists
95
+ (function(){
96
+ try {
97
+ const __ui = (global.loadModule ? global.loadModule('@nativescript/core/ui') : (global.require ? global.require('@nativescript/core/ui') : null));
98
+ if (__ui && __ui.View) {
99
+ const View = __ui.View;
100
+ const props = ['order','flexGrow','flexShrink','flexWrapBefore','alignSelf'];
101
+ for (const p of props) {
102
+ const d = Object.getOwnPropertyDescriptor(View.prototype, p);
103
+ if (d && typeof d.set === 'function') {
104
+ const origSet = d.set;
105
+ Object.defineProperty(View.prototype, p, {
106
+ configurable: true,
107
+ enumerable: d.enumerable,
108
+ get: d.get,
109
+ set(value){
110
+ if (value === undefined || value === null) return;
111
+ if (!this || !this._style) {
112
+ try { if (this && !this._style) this._style = this.style; } catch(_) {}
113
+ if (!this || !this._style) return;
114
+ }
115
+ return origSet.call(this, value);
116
+ }
117
+ });
118
+ }
119
+ }
120
+ }
121
+ } catch(_) {}
122
+ })();
123
+ // Vite adjustment: register short core UI element module names (e.g. Frame, StackLayout)
124
+ // Some XML builder paths attempt to load 'Frame' directly instead of the barrel.
125
+ // We expose individual element names so global.loadModule('Frame') works.
126
+ try {
127
+ const __ui = (global.loadModule ? global.loadModule('@nativescript/core/ui') : (global.require ? global.require('@nativescript/core/ui') : null));
128
+ if (__ui && global.registerModule) {
129
+ const existsFn = global.moduleExists ? (n) => global.moduleExists(n) : () => false;
130
+ Object.keys(__ui).forEach(k => {
131
+ if (k && k[0] === k[0].toUpperCase() && !existsFn(k)) {
132
+ try {
133
+ global.registerModule(k, () => ({ [k]: __ui[k] }));
134
+ } catch (e) { /* swallow */ }
135
+ }
136
+ });
137
+ }
138
+ } catch(e) { /* ignore */ }
139
+ `;
140
+ export function createUiRegistrationPlugin(flavor) {
141
+ return {
142
+ name: `ns-ui-registration-${flavor === 'typescript' ? 'ts' : 'js'}`,
143
+ enforce: 'pre',
144
+ resolveId(id) {
145
+ if (id === UI_REGISTRATION_VIRTUAL_ID)
146
+ return RESOLVED_ID;
147
+ return null;
148
+ },
149
+ load(id) {
150
+ if (id !== RESOLVED_ID)
151
+ return null;
152
+ return { code: flavor === 'typescript' ? TS_REGISTRATION_CODE : JS_REGISTRATION_CODE, map: null };
153
+ },
154
+ };
155
+ }
156
+ //# sourceMappingURL=ui-registration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-registration.js","sourceRoot":"","sources":["../../../../packages/vite/helpers/ui-registration.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AACvE,MAAM,WAAW,GAAG,IAAI,GAAG,0BAA0B,CAAC;AAEtD,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D5B,CAAC;AAEF,2EAA2E;AAC3E,6EAA6E;AAC7E,wCAAwC;AACxC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD5B,CAAC;AAEF,MAAM,UAAU,0BAA0B,CAAC,MAAmC;IAC7E,OAAO;QACN,IAAI,EAAE,sBAAsB,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;QACnE,OAAO,EAAE,KAAK;QACd,SAAS,CAAC,EAAE;YACX,IAAI,EAAE,KAAK,0BAA0B;gBAAE,OAAO,WAAW,CAAC;YAC1D,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,CAAC,EAAE;YACN,IAAI,EAAE,KAAK,WAAW;gBAAE,OAAO,IAAI,CAAC;YACpC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,EAAE,GAAG,EAAE,IAAI,EAAS,CAAC;QAC1G,CAAC;KACD,CAAC;AACH,CAAC"}
@@ -31,3 +31,12 @@ export declare function getProjectAppPath(): string;
31
31
  export declare function getProjectAppRelativePath(subPath?: string): string;
32
32
  export declare function getProjectAppAbsolutePath(subPath?: string): string;
33
33
  export declare function getProjectAppVirtualPath(subPath?: string): string;
34
+ export declare const GLOBAL_APP_CSS_CANDIDATES: string[];
35
+ /**
36
+ * Resolve the project's global stylesheet, preferring `app.css` and falling
37
+ * back to `styles.css`. Returns the absolute filesystem path of the first
38
+ * candidate that exists under the app directory, or `null` when none are
39
+ * present. All call sites share this single resolver so the entry generator,
40
+ * the virtual-module loader, and the HMR watcher always agree on the same file.
41
+ */
42
+ export declare function resolveProjectGlobalCssPath(projectRoot?: string): string | null;
package/helpers/utils.js CHANGED
@@ -7,7 +7,6 @@ const require = createRequire(import.meta.url);
7
7
  // get the name from the package for the output
8
8
  const packageJson = getPackageJson();
9
9
  export function nsConfigToJson() {
10
- let configObject;
11
10
  const tsPath = getProjectFilePath('nativescript.config.ts');
12
11
  const tsCode = fs.readFileSync(tsPath, 'utf-8');
13
12
  // a) Transpile your TS config to CommonJS so we can require() it
@@ -20,7 +19,7 @@ export function nsConfigToJson() {
20
19
  const module = { exports: {} };
21
20
  const requireFunc = (id) => require(id);
22
21
  new Function('exports', 'require', 'module', '__filename', '__dirname', cjsCode)(module.exports, requireFunc, module, tsPath, path.dirname(tsPath));
23
- configObject = module.exports.default ?? module.exports;
22
+ const configObject = module.exports.default ?? module.exports;
24
23
  // ensure the config has a name
25
24
  configObject.name = packageJson.name;
26
25
  // ensure the main entry is set to "bundle"
@@ -140,4 +139,25 @@ export function getProjectAppVirtualPath(subPath = '') {
140
139
  const rel = getProjectAppRelativePath(subPath).replace(/^\/+/, '');
141
140
  return `/${rel.replace(/\/+/g, '/')}`;
142
141
  }
142
+ // Global stylesheet candidates under the app directory, in priority order.
143
+ // `app.css` is the NativeScript convention; `styles.css` is common in web
144
+ // projects that share a codebase with NativeScript (e.g. Vite / TanStack
145
+ // Start), so it is used as a fallback when `app.css` is absent.
146
+ export const GLOBAL_APP_CSS_CANDIDATES = ['app.css', 'styles.css'];
147
+ /**
148
+ * Resolve the project's global stylesheet, preferring `app.css` and falling
149
+ * back to `styles.css`. Returns the absolute filesystem path of the first
150
+ * candidate that exists under the app directory, or `null` when none are
151
+ * present. All call sites share this single resolver so the entry generator,
152
+ * the virtual-module loader, and the HMR watcher always agree on the same file.
153
+ */
154
+ export function resolveProjectGlobalCssPath(projectRoot = getProjectRootPath()) {
155
+ for (const name of GLOBAL_APP_CSS_CANDIDATES) {
156
+ const abs = path.resolve(projectRoot, getProjectAppRelativePath(name));
157
+ if (fs.existsSync(abs)) {
158
+ return abs;
159
+ }
160
+ }
161
+ return null;
162
+ }
143
163
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../packages/vite/helpers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEtF,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,+CAA+C;AAC/C,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;AAErC,MAAM,UAAU,cAAc;IAC7B,IAAI,YAAiC,CAAC;IACtC,MAAM,MAAM,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEhD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CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;QACZ,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -1,22 +1,23 @@
1
- export declare function getWorkerPlugins(platform: string): ({
2
- name: string;
3
- resolveId(id: any): string;
4
- load(id: any): {
5
- code: string;
6
- moduleType: string;
7
- };
8
- transform?: undefined;
9
- } | {
10
- name: string;
11
- resolveId(id: any, importer: any): string;
12
- load?: undefined;
13
- transform?: undefined;
14
- } | {
15
- name: string;
16
- transform(code: any, id: any): any;
17
- resolveId?: undefined;
18
- load?: undefined;
19
- })[];
1
+ import type { Plugin } from 'vite';
2
+ export interface WorkerPluginsOptions {
3
+ platform: string;
4
+ verbose?: boolean;
5
+ }
6
+ export declare function nativescriptWorkerLoaderStubPlugin(): Plugin;
7
+ export declare function getWorkerPlugins(platformOrOpts: string | WorkerPluginsOptions): any[];
8
+ export interface WorkerHmrUrlPluginOptions {
9
+ verbose?: boolean;
10
+ }
11
+ export declare function viteWorkerAssetPathToNsMUrl(assetPath: string, projectRoot: string, workspaceRoot: string | null): string | null;
12
+ export declare function workerHmrUrlPlugin(opts?: WorkerHmrUrlPluginOptions): Plugin;
13
+ export interface TsFallbackTransformPluginOptions {
14
+ verbose?: boolean;
15
+ }
16
+ export declare function tsFallbackTransformPlugin(opts?: TsFallbackTransformPluginOptions): Plugin;
17
+ export interface AngularWorkerUrlPreservePluginOptions {
18
+ verbose?: boolean;
19
+ }
20
+ export declare function angularWorkerUrlPreservePlugin(opts?: AngularWorkerUrlPreservePluginOptions): Plugin;
20
21
  export declare function workerUrlPlugin(): {
21
22
  name: string;
22
23
  generateBundle(options: any, bundle: any): void;