@nativescript/vite 8.0.0-alpha.6 → 8.0.0-alpha.60

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 (463) 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 +244 -53
  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 +4 -2
  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 +100 -13
  41. package/helpers/global-defines.js +149 -28
  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.js +29 -1
  49. package/helpers/logging.js.map +1 -1
  50. package/helpers/main-entry.d.ts +4 -1
  51. package/helpers/main-entry.js +368 -53
  52. package/helpers/main-entry.js.map +1 -1
  53. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  54. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  55. package/helpers/nativeclass-transform.js +5 -6
  56. package/helpers/nativeclass-transform.js.map +1 -1
  57. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  58. package/helpers/nativeclass-transformer-plugin.js +157 -14
  59. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  60. package/helpers/nativescript-package-resolver.js +10 -62
  61. package/helpers/nativescript-package-resolver.js.map +1 -1
  62. package/helpers/normalize-id.d.ts +42 -0
  63. package/helpers/normalize-id.js +60 -0
  64. package/helpers/normalize-id.js.map +1 -0
  65. package/helpers/ns-core-url.d.ts +29 -7
  66. package/helpers/ns-core-url.js +69 -12
  67. package/helpers/ns-core-url.js.map +1 -1
  68. package/helpers/optimize-deps.d.ts +16 -0
  69. package/helpers/optimize-deps.js +17 -0
  70. package/helpers/optimize-deps.js.map +1 -0
  71. package/helpers/package-platform-aliases.js +34 -49
  72. package/helpers/package-platform-aliases.js.map +1 -1
  73. package/helpers/platform-types.d.ts +2 -0
  74. package/helpers/platform-types.js +2 -0
  75. package/helpers/platform-types.js.map +1 -0
  76. package/helpers/postcss-platform-config.d.ts +17 -1
  77. package/helpers/postcss-platform-config.js +20 -37
  78. package/helpers/postcss-platform-config.js.map +1 -1
  79. package/helpers/project.d.ts +35 -0
  80. package/helpers/project.js +120 -2
  81. package/helpers/project.js.map +1 -1
  82. package/helpers/resolve-main-field-platform.d.ts +20 -0
  83. package/helpers/resolve-main-field-platform.js +49 -0
  84. package/helpers/resolve-main-field-platform.js.map +1 -0
  85. package/helpers/resolver.js +17 -2
  86. package/helpers/resolver.js.map +1 -1
  87. package/helpers/theme-core-plugins.js +1 -1
  88. package/helpers/theme-core-plugins.js.map +1 -1
  89. package/helpers/ts-config-paths.d.ts +32 -0
  90. package/helpers/ts-config-paths.js +156 -27
  91. package/helpers/ts-config-paths.js.map +1 -1
  92. package/helpers/typescript-check.d.ts +2 -1
  93. package/helpers/typescript-check.js +2 -2
  94. package/helpers/typescript-check.js.map +1 -1
  95. package/helpers/ui-registration.d.ts +21 -0
  96. package/helpers/ui-registration.js +156 -0
  97. package/helpers/ui-registration.js.map +1 -0
  98. package/helpers/utils.d.ts +9 -0
  99. package/helpers/utils.js +22 -2
  100. package/helpers/utils.js.map +1 -1
  101. package/helpers/vite-package-version.d.ts +7 -0
  102. package/helpers/vite-package-version.js +44 -0
  103. package/helpers/vite-package-version.js.map +1 -0
  104. package/helpers/workers.d.ts +20 -19
  105. package/helpers/workers.js +624 -4
  106. package/helpers/workers.js.map +1 -1
  107. package/hmr/client/css-handler.d.ts +2 -1
  108. package/hmr/client/css-handler.js +50 -26
  109. package/hmr/client/css-handler.js.map +1 -1
  110. package/hmr/client/css-update-overlay.d.ts +18 -0
  111. package/hmr/client/css-update-overlay.js +27 -0
  112. package/hmr/client/css-update-overlay.js.map +1 -0
  113. package/hmr/client/framework-client-strategy.d.ts +79 -0
  114. package/hmr/client/framework-client-strategy.js +19 -0
  115. package/hmr/client/framework-client-strategy.js.map +1 -0
  116. package/hmr/client/hmr-pending-overlay.d.ts +0 -14
  117. package/hmr/client/hmr-pending-overlay.js +14 -4
  118. package/hmr/client/hmr-pending-overlay.js.map +1 -1
  119. package/hmr/client/hot-context.d.ts +67 -0
  120. package/hmr/client/hot-context.js +284 -0
  121. package/hmr/client/hot-context.js.map +1 -0
  122. package/hmr/client/index.js +922 -273
  123. package/hmr/client/index.js.map +1 -1
  124. package/hmr/client/utils.d.ts +2 -1
  125. package/hmr/client/utils.js +111 -99
  126. package/hmr/client/utils.js.map +1 -1
  127. package/hmr/entry-runtime.d.ts +2 -1
  128. package/hmr/entry-runtime.js +271 -69
  129. package/hmr/entry-runtime.js.map +1 -1
  130. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  131. package/hmr/frameworks/angular/build/angular-linker.js +109 -0
  132. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  133. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  134. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  135. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  136. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  137. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  138. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  139. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  140. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  141. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  142. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  143. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  144. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  145. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  146. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  147. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  148. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  149. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  150. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  151. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  152. package/hmr/frameworks/angular/build/util.js +155 -0
  153. package/hmr/frameworks/angular/build/util.js.map +1 -0
  154. package/hmr/frameworks/angular/client/index.js +542 -175
  155. package/hmr/frameworks/angular/client/index.js.map +1 -1
  156. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  157. package/hmr/frameworks/angular/client/strategy.js +19 -0
  158. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  159. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  160. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  161. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  162. package/hmr/frameworks/angular/server/linker.js +1 -4
  163. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  164. package/hmr/frameworks/angular/server/strategy.js +458 -12
  165. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  166. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  167. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  168. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +14 -11
  169. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.js +108 -111
  170. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  171. package/hmr/frameworks/react/server/strategy.d.ts +2 -0
  172. package/hmr/frameworks/react/server/strategy.js +230 -0
  173. package/hmr/frameworks/react/server/strategy.js.map +1 -0
  174. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  175. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  176. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  177. package/hmr/frameworks/solid/client/app-runtime.d.ts +68 -0
  178. package/hmr/frameworks/solid/client/app-runtime.js +246 -0
  179. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
  180. package/hmr/frameworks/solid/server/strategy.js +291 -16
  181. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  182. package/hmr/frameworks/typescript/server/strategy.js +38 -14
  183. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  184. package/hmr/frameworks/vue/client/dep-propagation.d.ts +44 -0
  185. package/hmr/frameworks/vue/client/dep-propagation.js +148 -0
  186. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  187. package/hmr/frameworks/vue/client/index.d.ts +9 -0
  188. package/hmr/frameworks/vue/client/index.js +251 -247
  189. package/hmr/frameworks/vue/client/index.js.map +1 -1
  190. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  191. package/hmr/frameworks/vue/client/strategy.js +157 -0
  192. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  193. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  194. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +142 -0
  195. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  196. package/hmr/frameworks/vue/server/compiler.d.ts +3 -1
  197. package/hmr/frameworks/vue/server/compiler.js +3 -1
  198. package/hmr/frameworks/vue/server/compiler.js.map +1 -1
  199. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  200. package/hmr/frameworks/vue/server/sfc-route-assemble.js +823 -0
  201. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  202. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  203. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  204. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  205. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  206. package/hmr/frameworks/vue/server/sfc-route-serve.js +462 -0
  207. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  208. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +45 -0
  209. package/hmr/frameworks/vue/server/sfc-route-shared.js +105 -0
  210. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  211. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  212. package/hmr/frameworks/vue/server/strategy.js +286 -7
  213. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  214. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  215. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  216. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  217. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  218. package/hmr/helpers/ast-normalizer.js +77 -10
  219. package/hmr/helpers/ast-normalizer.js.map +1 -1
  220. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  221. package/hmr/helpers/cjs-named-exports.js +152 -0
  222. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  223. package/hmr/helpers/package-exports.d.ts +16 -0
  224. package/hmr/helpers/package-exports.js +396 -0
  225. package/hmr/helpers/package-exports.js.map +1 -0
  226. package/hmr/helpers/vendor-rewrite.d.ts +1 -1
  227. package/hmr/helpers/vendor-rewrite.js +5 -3
  228. package/hmr/helpers/vendor-rewrite.js.map +1 -1
  229. package/hmr/server/boot-archive-route.d.ts +40 -0
  230. package/hmr/server/boot-archive-route.js +154 -0
  231. package/hmr/server/boot-archive-route.js.map +1 -0
  232. package/hmr/server/boot-closure-route.d.ts +49 -0
  233. package/hmr/server/boot-closure-route.js +144 -0
  234. package/hmr/server/boot-closure-route.js.map +1 -0
  235. package/hmr/server/boot-recording.d.ts +58 -0
  236. package/hmr/server/boot-recording.js +228 -0
  237. package/hmr/server/boot-recording.js.map +1 -0
  238. package/hmr/server/constants.js +20 -5
  239. package/hmr/server/constants.js.map +1 -1
  240. package/hmr/server/core-bundle.d.ts +140 -0
  241. package/hmr/server/core-bundle.js +614 -0
  242. package/hmr/server/core-bundle.js.map +1 -0
  243. package/hmr/server/core-sanitize.d.ts +86 -7
  244. package/hmr/server/core-sanitize.js +170 -45
  245. package/hmr/server/core-sanitize.js.map +1 -1
  246. package/hmr/server/css-device-module.d.ts +28 -0
  247. package/hmr/server/css-device-module.js +44 -0
  248. package/hmr/server/css-device-module.js.map +1 -0
  249. package/hmr/server/deps-bundle.d.ts +218 -0
  250. package/hmr/server/deps-bundle.js +984 -0
  251. package/hmr/server/deps-bundle.js.map +1 -0
  252. package/hmr/server/device-transform-helpers.d.ts +24 -0
  253. package/hmr/server/device-transform-helpers.js +408 -0
  254. package/hmr/server/device-transform-helpers.js.map +1 -0
  255. package/hmr/server/framework-strategy.d.ts +113 -11
  256. package/hmr/server/hmr-module-graph.d.ts +37 -0
  257. package/hmr/server/hmr-module-graph.js +215 -0
  258. package/hmr/server/hmr-module-graph.js.map +1 -0
  259. package/hmr/server/import-map.d.ts +13 -4
  260. package/hmr/server/import-map.js +94 -47
  261. package/hmr/server/import-map.js.map +1 -1
  262. package/hmr/server/index.js +7 -16
  263. package/hmr/server/index.js.map +1 -1
  264. package/hmr/server/ns-core-cjs-shape.d.ts +2 -4
  265. package/hmr/server/ns-core-cjs-shape.js +4 -6
  266. package/hmr/server/ns-core-cjs-shape.js.map +1 -1
  267. package/hmr/server/ns-m-response-memo.d.ts +10 -0
  268. package/hmr/server/ns-m-response-memo.js +33 -0
  269. package/hmr/server/ns-m-response-memo.js.map +1 -0
  270. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  271. package/hmr/server/ns-rt-bridge.js +131 -0
  272. package/hmr/server/ns-rt-bridge.js.map +1 -0
  273. package/hmr/server/ns-rt-route.d.ts +5 -0
  274. package/hmr/server/ns-rt-route.js +39 -0
  275. package/hmr/server/ns-rt-route.js.map +1 -0
  276. package/hmr/server/perf-instrumentation.d.ts +6 -10
  277. package/hmr/server/perf-instrumentation.js +5 -6
  278. package/hmr/server/perf-instrumentation.js.map +1 -1
  279. package/hmr/server/process-code-for-device.d.ts +30 -0
  280. package/hmr/server/process-code-for-device.js +791 -0
  281. package/hmr/server/process-code-for-device.js.map +1 -0
  282. package/hmr/server/require-guard.d.ts +1 -0
  283. package/hmr/server/require-guard.js +12 -0
  284. package/hmr/server/require-guard.js.map +1 -0
  285. package/hmr/server/rewrite-imports.d.ts +2 -0
  286. package/hmr/server/rewrite-imports.js +630 -0
  287. package/hmr/server/rewrite-imports.js.map +1 -0
  288. package/hmr/server/route-helpers.d.ts +7 -0
  289. package/hmr/server/route-helpers.js +13 -0
  290. package/hmr/server/route-helpers.js.map +1 -0
  291. package/hmr/server/server-origin.d.ts +2 -0
  292. package/hmr/server/server-origin.js +83 -0
  293. package/hmr/server/server-origin.js.map +1 -0
  294. package/hmr/server/shared-transform-request.js +1 -2
  295. package/hmr/server/shared-transform-request.js.map +1 -1
  296. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  297. package/hmr/server/transform-cache-invalidation.js +156 -0
  298. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  299. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  300. package/hmr/server/vendor-bare-module-shims.js +80 -0
  301. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  302. package/hmr/server/vite-plugin.d.ts +1 -0
  303. package/hmr/server/vite-plugin.js +180 -54
  304. package/hmr/server/vite-plugin.js.map +1 -1
  305. package/hmr/server/websocket-core-bridge.d.ts +51 -4
  306. package/hmr/server/websocket-core-bridge.js +62 -54
  307. package/hmr/server/websocket-core-bridge.js.map +1 -1
  308. package/hmr/server/websocket-css-hot-update.d.ts +33 -0
  309. package/hmr/server/websocket-css-hot-update.js +65 -0
  310. package/hmr/server/websocket-css-hot-update.js.map +1 -0
  311. package/hmr/server/websocket-device-transform.d.ts +3 -0
  312. package/hmr/server/websocket-device-transform.js +7 -0
  313. package/hmr/server/websocket-device-transform.js.map +1 -0
  314. package/hmr/server/websocket-hmr-pending.d.ts +3 -9
  315. package/hmr/server/websocket-hmr-pending.js +1 -1
  316. package/hmr/server/websocket-hmr-pending.js.map +1 -1
  317. package/hmr/server/websocket-hot-update.d.ts +77 -0
  318. package/hmr/server/websocket-hot-update.js +360 -0
  319. package/hmr/server/websocket-hot-update.js.map +1 -0
  320. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  321. package/hmr/server/websocket-import-map-route.js +50 -0
  322. package/hmr/server/websocket-import-map-route.js.map +1 -0
  323. package/hmr/server/websocket-module-bindings.js +3 -3
  324. package/hmr/server/websocket-module-bindings.js.map +1 -1
  325. package/hmr/server/websocket-module-specifiers.d.ts +66 -2
  326. package/hmr/server/websocket-module-specifiers.js +191 -20
  327. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  328. package/hmr/server/websocket-ns-core.d.ts +34 -0
  329. package/hmr/server/websocket-ns-core.js +414 -0
  330. package/hmr/server/websocket-ns-core.js.map +1 -0
  331. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  332. package/hmr/server/websocket-ns-entry.js +164 -0
  333. package/hmr/server/websocket-ns-entry.js.map +1 -0
  334. package/hmr/server/websocket-ns-m-paths.d.ts +1 -3
  335. package/hmr/server/websocket-ns-m-paths.js +25 -82
  336. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  337. package/hmr/server/websocket-ns-m-request.d.ts +11 -1
  338. package/hmr/server/websocket-ns-m-request.js +17 -9
  339. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  340. package/hmr/server/websocket-ns-m.d.ts +52 -0
  341. package/hmr/server/websocket-ns-m.js +824 -0
  342. package/hmr/server/websocket-ns-m.js.map +1 -0
  343. package/hmr/server/websocket-served-module-helpers.d.ts +50 -4
  344. package/hmr/server/websocket-served-module-helpers.js +384 -86
  345. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  346. package/hmr/server/websocket-txn.js +6 -9
  347. package/hmr/server/websocket-txn.js.map +1 -1
  348. package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
  349. package/hmr/server/websocket-vendor-unifier.js +4 -9
  350. package/hmr/server/websocket-vendor-unifier.js.map +1 -1
  351. package/hmr/server/websocket.d.ts +7 -39
  352. package/hmr/server/websocket.js +643 -6716
  353. package/hmr/server/websocket.js.map +1 -1
  354. package/hmr/shared/ns-globals.d.ts +108 -0
  355. package/hmr/shared/ns-globals.js +28 -0
  356. package/hmr/shared/ns-globals.js.map +1 -0
  357. package/hmr/shared/protocol.d.ts +145 -0
  358. package/hmr/shared/protocol.js +28 -0
  359. package/hmr/shared/protocol.js.map +1 -0
  360. package/hmr/shared/runtime/boot-archive-format.d.ts +16 -0
  361. package/hmr/shared/runtime/boot-archive-format.js +31 -0
  362. package/hmr/shared/runtime/boot-archive-format.js.map +1 -0
  363. package/hmr/shared/runtime/boot-complete.d.ts +14 -0
  364. package/hmr/shared/runtime/boot-complete.js +32 -0
  365. package/hmr/shared/runtime/boot-complete.js.map +1 -0
  366. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  367. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  368. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  369. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  370. package/hmr/shared/runtime/boot-progress.js +134 -0
  371. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  372. package/hmr/shared/runtime/boot-timeline.d.ts +2 -1
  373. package/hmr/shared/runtime/boot-timeline.js +9 -22
  374. package/hmr/shared/runtime/boot-timeline.js.map +1 -1
  375. package/hmr/shared/runtime/browser-runtime-contract.d.ts +53 -22
  376. package/hmr/shared/runtime/browser-runtime-contract.js +6 -9
  377. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  378. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  379. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  380. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  381. package/hmr/shared/runtime/dev-overlay.d.ts +76 -30
  382. package/hmr/shared/runtime/dev-overlay.js +767 -408
  383. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  384. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  385. package/hmr/shared/runtime/global-scope.js +21 -0
  386. package/hmr/shared/runtime/global-scope.js.map +1 -0
  387. package/hmr/shared/runtime/hooks.js +2 -1
  388. package/hmr/shared/runtime/hooks.js.map +1 -1
  389. package/hmr/shared/runtime/http-only-boot.js +7 -6
  390. package/hmr/shared/runtime/http-only-boot.js.map +1 -1
  391. package/hmr/shared/runtime/module-provenance.js +4 -6
  392. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  393. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  394. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  395. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  396. package/hmr/shared/runtime/root-placeholder.js +398 -204
  397. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  398. package/hmr/shared/runtime/session-bootstrap.js +255 -50
  399. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  400. package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
  401. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  402. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  403. package/hmr/shared/vendor/manifest-collect.js +549 -0
  404. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  405. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  406. package/hmr/shared/vendor/manifest-loader.js +5 -3
  407. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  408. package/hmr/shared/vendor/manifest.d.ts +1 -7
  409. package/hmr/shared/vendor/manifest.js +125 -825
  410. package/hmr/shared/vendor/manifest.js.map +1 -1
  411. package/hmr/shared/vendor/registry.d.ts +2 -0
  412. package/hmr/shared/vendor/registry.js +14 -0
  413. package/hmr/shared/vendor/registry.js.map +1 -1
  414. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  415. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  416. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  417. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +38 -0
  418. package/hmr/shared/vendor/vendor-esbuild-plugins.js +296 -0
  419. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  420. package/hmr/vendor-bootstrap.d.ts +1 -3
  421. package/hmr/vendor-bootstrap.js +4 -6
  422. package/hmr/vendor-bootstrap.js.map +1 -1
  423. package/index.d.ts +1 -0
  424. package/index.js +5 -0
  425. package/index.js.map +1 -1
  426. package/package.json +65 -11
  427. package/runtime/core-aliases-early.js +25 -55
  428. package/runtime/core-aliases-early.js.map +1 -1
  429. package/shims/react-jsx-runtime.d.ts +4 -0
  430. package/shims/react-jsx-runtime.js +61 -0
  431. package/shims/react-jsx-runtime.js.map +1 -0
  432. package/helpers/angular/angular-linker.d.ts +0 -13
  433. package/helpers/angular/angular-linker.js +0 -194
  434. package/helpers/angular/angular-linker.js.map +0 -1
  435. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  436. package/helpers/angular/shared-linker.d.ts +0 -11
  437. package/helpers/angular/shared-linker.js +0 -75
  438. package/helpers/angular/shared-linker.js.map +0 -1
  439. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  440. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  441. package/helpers/angular/util.js +0 -67
  442. package/helpers/angular/util.js.map +0 -1
  443. package/helpers/prelink-angular.d.ts +0 -2
  444. package/helpers/prelink-angular.js +0 -117
  445. package/helpers/prelink-angular.js.map +0 -1
  446. package/hmr/server/websocket-angular-entry.js.map +0 -1
  447. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  448. package/hmr/server/websocket-ns-m-finalize.d.ts +0 -22
  449. package/hmr/server/websocket-ns-m-finalize.js +0 -88
  450. package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
  451. package/hmr/server/websocket-runtime-compat.d.ts +0 -19
  452. package/hmr/server/websocket-runtime-compat.js +0 -286
  453. package/hmr/server/websocket-runtime-compat.js.map +0 -1
  454. package/hmr/server/websocket-vue-sfc.d.ts +0 -27
  455. package/hmr/server/websocket-vue-sfc.js +0 -1114
  456. package/hmr/server/websocket-vue-sfc.js.map +0 -1
  457. package/transformers/NativeClass/index.d.ts +0 -2
  458. package/transformers/NativeClass/index.js +0 -222
  459. package/transformers/NativeClass/index.js.map +0 -1
  460. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  461. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  462. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  463. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1,178 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ /**
4
+ * Why this helper exists
5
+ * ----------------------
6
+ *
7
+ * Vite's depscanner happily pre-bundles every bare specifier the app
8
+ * imports. For a Solid library that publishes pre-compiled-but-still-JSX
9
+ * files (e.g. `solid-navigation`'s `dist/src/*.jsx`), the pre-bundle output
10
+ * lands at `node_modules/.vite/deps/<pkg>.js` with the JSX intact —
11
+ * rolldown's depscanner doesn't run Solid's JSX transform (that lives in
12
+ * `vite-plugin-solid`'s `transform` hook, which only matches files whose
13
+ * id ends in `.jsx`/`.tsx`).
14
+ *
15
+ * Vite then runs `vite:import-analysis` on the `.js` output, hits the
16
+ * first JSX expression, and aborts the dev server's pre-transform with:
17
+ *
18
+ * Failed to parse source for import analysis because the content
19
+ * contains invalid JS syntax. If you are using JSX, make sure to
20
+ * name the file with the .jsx or .tsx extension.
21
+ * File: /…/.vite/deps/<pkg>.js:51:32
22
+ *
23
+ * The fix: when a project depends on a Solid library that ships `.jsx`
24
+ * (or `.tsx`) source files in its package directory, mark that package
25
+ * as `optimizeDeps.exclude` so Vite serves it through the regular dev
26
+ * pipeline, where `vite-plugin-solid`'s `transform` hook matches the
27
+ * original `.jsx` id and applies the Solid babel preset.
28
+ *
29
+ * Detection rules — biased toward false negatives so we never wrongly
30
+ * exclude a package that Vite must pre-bundle (esp. CJS-only deps that
31
+ * need esm interop). A package is excluded only when ALL of the
32
+ * following hold:
33
+ *
34
+ * 1. It declares `solid-js` or `@nativescript-community/solid-js` in
35
+ * `dependencies` / `peerDependencies` / `devDependencies`. This is
36
+ * a strong signal that the package's published artifacts are
37
+ * meant to be processed by a Solid-aware JSX transformer.
38
+ * 2. Its package directory contains at least one `.jsx` / `.tsx`
39
+ * source file under `dist` / `lib` / `build` / `es` / `esm` /
40
+ * `out` (the common published-output dirs) or directly at the
41
+ * package root. We deliberately skip `node_modules`, `src` (raw
42
+ * sources, not what `main` points to), and test dirs.
43
+ *
44
+ * Both checks are scoped to packages installed in the app's
45
+ * `node_modules` (plus the monorepo's hoisted `node_modules`, if any)
46
+ * — we never recurse into transitive nested copies, since those are
47
+ * also reachable from the same top-level scan once Vite resolves them.
48
+ */
49
+ const PUBLISHED_OUTPUT_DIRS = new Set(['dist', 'lib', 'build', 'es', 'esm', 'out']);
50
+ // Always-skip subdirs regardless of depth: nested copies, test fixtures,
51
+ // docs, and example apps. Notably `src` is NOT in here because a published
52
+ // bundle may use `dist/src/<file>.jsx` as its layout (e.g. `solid-navigation`).
53
+ // `src/` at the *package root* is rejected separately by the
54
+ // "depth 0 must be a published-output dir" gate below.
55
+ const ALWAYS_SKIP_DIR_NAMES = new Set(['node_modules', 'test', 'tests', '__tests__', 'spec', 'specs', 'docs', 'examples', 'example', '.git', '.cache']);
56
+ const JSX_EXT_RE = /\.(jsx|tsx)$/;
57
+ const MAX_SCAN_DEPTH = 4;
58
+ function isSolidConsumer(pkgJson) {
59
+ const buckets = ['dependencies', 'peerDependencies', 'devDependencies', 'optionalDependencies'];
60
+ for (const key of buckets) {
61
+ const deps = pkgJson[key];
62
+ if (!deps || typeof deps !== 'object')
63
+ continue;
64
+ if (deps['solid-js'])
65
+ return true;
66
+ if (deps['@nativescript-community/solid-js'])
67
+ return true;
68
+ }
69
+ return false;
70
+ }
71
+ function hasJsxFile(dir, depth = 0) {
72
+ if (depth > MAX_SCAN_DEPTH)
73
+ return false;
74
+ let entries;
75
+ try {
76
+ entries = fs.readdirSync(dir, { withFileTypes: true });
77
+ }
78
+ catch {
79
+ return false;
80
+ }
81
+ for (const entry of entries) {
82
+ if (entry.isFile() && JSX_EXT_RE.test(entry.name)) {
83
+ return true;
84
+ }
85
+ if (entry.isDirectory()) {
86
+ if (entry.name.startsWith('.'))
87
+ continue;
88
+ if (ALWAYS_SKIP_DIR_NAMES.has(entry.name))
89
+ continue;
90
+ // At depth 0 (package root) only descend into known
91
+ // published-output dirs so a sibling `src/` (raw sources)
92
+ // can't flag the package on its own. Deeper levels are
93
+ // inside a publish dir already, so any subdir (incl. `src`)
94
+ // is fair game.
95
+ if (depth === 0 && !PUBLISHED_OUTPUT_DIRS.has(entry.name))
96
+ continue;
97
+ if (hasJsxFile(path.join(dir, entry.name), depth + 1))
98
+ return true;
99
+ }
100
+ }
101
+ return false;
102
+ }
103
+ function scanDirectoryForJsxPackages(nodeModulesDir, result, scope = '') {
104
+ let entries;
105
+ try {
106
+ entries = fs.readdirSync(nodeModulesDir, { withFileTypes: true });
107
+ }
108
+ catch {
109
+ return;
110
+ }
111
+ for (const entry of entries) {
112
+ if (!entry.isDirectory())
113
+ continue;
114
+ if (entry.name.startsWith('.'))
115
+ continue;
116
+ if (entry.name === 'node_modules')
117
+ continue;
118
+ const entryPath = path.join(nodeModulesDir, entry.name);
119
+ if (!scope && entry.name.startsWith('@')) {
120
+ scanDirectoryForJsxPackages(entryPath, result, entry.name);
121
+ continue;
122
+ }
123
+ const pkgName = scope ? `${scope}/${entry.name}` : entry.name;
124
+ if (result.has(pkgName))
125
+ continue;
126
+ const pkgJsonPath = path.join(entryPath, 'package.json');
127
+ if (!fs.existsSync(pkgJsonPath))
128
+ continue;
129
+ let pkgJson;
130
+ try {
131
+ pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
132
+ }
133
+ catch {
134
+ continue;
135
+ }
136
+ if (!isSolidConsumer(pkgJson))
137
+ continue;
138
+ if (!hasJsxFile(entryPath))
139
+ continue;
140
+ result.add(pkgName);
141
+ }
142
+ }
143
+ /**
144
+ * Find installed packages whose pre-bundle output would smuggle JSX into
145
+ * Vite's import-analysis stage. Returned names are safe to drop into
146
+ * `optimizeDeps.exclude` — the dev server will serve them through the
147
+ * normal module pipeline, where `vite-plugin-solid` can transform their
148
+ * original `.jsx`/`.tsx` files.
149
+ *
150
+ * The function is intentionally synchronous and best-effort: filesystem
151
+ * errors are swallowed, missing directories are skipped, and the scan
152
+ * caps at {@link MAX_SCAN_DEPTH} levels per package. Callers should
153
+ * treat the empty-array result as "no exclusions needed", not "scan
154
+ * failed". A nullable `monorepoRoot` is accepted so workspace hoisting
155
+ * is covered without forcing every caller to compute it.
156
+ */
157
+ export function findSolidPackagesShippingJsx(projectRoot, monorepoRoot) {
158
+ const found = new Set();
159
+ const seenDirs = new Set();
160
+ const scanDirs = [];
161
+ const projectNodeModules = path.resolve(projectRoot, 'node_modules');
162
+ scanDirs.push(projectNodeModules);
163
+ if (monorepoRoot && path.resolve(monorepoRoot) !== path.resolve(projectRoot)) {
164
+ const monorepoNodeModules = path.resolve(monorepoRoot, 'node_modules');
165
+ scanDirs.push(monorepoNodeModules);
166
+ }
167
+ for (const dir of scanDirs) {
168
+ const key = path.resolve(dir);
169
+ if (seenDirs.has(key))
170
+ continue;
171
+ seenDirs.add(key);
172
+ if (!fs.existsSync(dir))
173
+ continue;
174
+ scanDirectoryForJsxPackages(dir, found);
175
+ }
176
+ return Array.from(found).sort();
177
+ }
178
+ //# sourceMappingURL=solid-jsx-deps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solid-jsx-deps.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/solid/build/solid-jsx-deps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,OAA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,cAAc,CAAC,CAAC;IACrE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAClC,IAAI,YAAY,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9E,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACvE,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACpC,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAChC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAClC,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Bootstrap + HMR remount for NativeScript Solid apps.
3
+ *
4
+ * Solid runs with `hot: false` (solid-refresh is off — it rewrites `export
5
+ * function` into a non-hoisted const and breaks TanStack file-route modules), so
6
+ * there is no fine-grained component HMR.
7
+ *
8
+ * Division of labour on each Solid HMR cycle (`__ns_solid_hmr_subscribe`):
9
+ * • ROUTE files — handled by @nativescript/tanstack-router's per-page remount
10
+ * (`subscribeSolidHmrRemount` → `page.__ns_remount`), which swaps the route
11
+ * component in place WITHOUT re-navigating, so the user stays on their route.
12
+ * This helper does nothing for route-only edits.
13
+ * • Everything else (app shell / shared components / app entry) — this helper
14
+ * re-imports the app entry and re-renders the whole Solid tree. The router is
15
+ * REUSED (its chain is never evicted), so the current route is preserved.
16
+ *
17
+ * Renderer bindings (`Application`, `render`, `document`) are passed in rather than
18
+ * imported here so the helper uses the app's exact solid-js / dominative instances.
19
+ * Importing our own copies could resolve to a different module realm and break
20
+ * Solid reactivity (NativeScript can load a package's deps in a separate realm).
21
+ */
22
+ export interface StartSolidAppOptions {
23
+ /** `@nativescript/core` `Application`. */
24
+ Application: {
25
+ run(entry: {
26
+ create: () => any;
27
+ }): void;
28
+ };
29
+ /** `@nativescript-community/solid-js` `render` — mounts a component, returns a disposer. */
30
+ render: (component: any, target: any) => () => void;
31
+ /** dominative `document` — returned as the root view; `document.body` is the mount target. */
32
+ document: any;
33
+ /** Initial root component (used for the first mount). */
34
+ root: any;
35
+ /**
36
+ * App-relative specifier of the module that exports the root component, as
37
+ * `App` or default (e.g. `/src/native/app`). Re-imported fresh on each cycle.
38
+ */
39
+ rootModule: string;
40
+ /**
41
+ * Optional `@nativescript/core` `Frame` class. Pass it when the app uses a
42
+ * topmost-frame router (e.g. solid-navigation's `StackRouter` with
43
+ * `useTopMostFrame`): those routers re-run their initial navigation against
44
+ * `Frame.topmost()` when the fresh tree mounts. During a remount that would
45
+ * target a STALE frame from the old tree (often a nested tab frame) and push
46
+ * a backstack entry per edit. With `Frame` provided, the remount render
47
+ * redirects such navigations to the ROOT frame (`document.documentElement`)
48
+ * with `clearHistory: true`, so each HMR apply swaps the whole tree in place
49
+ * and disposes the old pages instead of stacking on top of them.
50
+ */
51
+ Frame?: any;
52
+ }
53
+ /**
54
+ * Boot a NativeScript Solid app and wire up HMR remounting. Call once from the
55
+ * app entry, e.g.:
56
+ *
57
+ * import './utils/dom';
58
+ * import { Application, Frame } from '@nativescript/core';
59
+ * import { render } from '@nativescript-community/solid-js';
60
+ * import { document } from 'dominative';
61
+ * import { startSolidApp } from '@nativescript/vite/solid-bootstrap';
62
+ * import { App } from './app';
63
+ *
64
+ * // `Frame` is optional — pass it when using a topmost-frame router
65
+ * // (solid-navigation) so HMR remounts replace the root page in place.
66
+ * startSolidApp({ Application, render, document, Frame, root: App, rootModule: '/src/native/app' });
67
+ */
68
+ export declare function startSolidApp(options: StartSolidAppOptions): void;
@@ -0,0 +1,246 @@
1
+ const SCRIPT_EXT = /\.(?:tsx|jsx|ts|js|mjs|mts|cjs|cts)$/i;
2
+ const ROUTE_FILE_RE = /\/routes\/.+\.(?:tsx|jsx)$/i;
3
+ const isSource = (id) => SCRIPT_EXT.test(id) && !/\.d\.ts$/i.test(id);
4
+ // A "shell" change is any source file that is NOT a route file — route files are
5
+ // hot-swapped per-page by the router, shell files need an app re-render.
6
+ const isShell = (id) => isSource(id) && !ROUTE_FILE_RE.test(id);
7
+ /** Resolve the dev-server HTTP origin used to fetch app modules over the wire. */
8
+ function resolveOrigin() {
9
+ try {
10
+ const m = String(import.meta.url).match(/^https?:\/\/[^/]+/);
11
+ if (m)
12
+ return m[0];
13
+ }
14
+ catch { }
15
+ const g = globalThis;
16
+ if (typeof g.__NS_HTTP_ORIGIN__ === 'string' && /^https?:\/\//.test(g.__NS_HTTP_ORIGIN__)) {
17
+ return g.__NS_HTTP_ORIGIN__;
18
+ }
19
+ if (typeof g.__NS_HMR_WS_URL__ === 'string') {
20
+ const m = g.__NS_HMR_WS_URL__.match(/^wss?:\/\/([^/]+)/);
21
+ if (m)
22
+ return 'http://' + m[1];
23
+ }
24
+ return '';
25
+ }
26
+ /** Canonical `/ns/m/<path>` eviction URLs (with + without script extension). */
27
+ function evictionUrls(origin, specs) {
28
+ const urls = new Set();
29
+ for (const raw of specs) {
30
+ if (!raw)
31
+ continue;
32
+ let spec = raw.split('?')[0];
33
+ if (!spec.startsWith('/'))
34
+ spec = '/' + spec;
35
+ const canonical = spec.replace(SCRIPT_EXT, '');
36
+ urls.add(origin + '/ns/m' + canonical);
37
+ if (spec !== canonical)
38
+ urls.add(origin + '/ns/m' + spec);
39
+ for (const ext of ['.tsx', '.ts', '.jsx', '.js'])
40
+ urls.add(origin + '/ns/m' + canonical + ext);
41
+ }
42
+ return Array.from(urls);
43
+ }
44
+ /**
45
+ * Boot a NativeScript Solid app and wire up HMR remounting. Call once from the
46
+ * app entry, e.g.:
47
+ *
48
+ * import './utils/dom';
49
+ * import { Application, Frame } from '@nativescript/core';
50
+ * import { render } from '@nativescript-community/solid-js';
51
+ * import { document } from 'dominative';
52
+ * import { startSolidApp } from '@nativescript/vite/solid-bootstrap';
53
+ * import { App } from './app';
54
+ *
55
+ * // `Frame` is optional — pass it when using a topmost-frame router
56
+ * // (solid-navigation) so HMR remounts replace the root page in place.
57
+ * startSolidApp({ Application, render, document, Frame, root: App, rootModule: '/src/native/app' });
58
+ */
59
+ export function startSolidApp(options) {
60
+ const { Application, render, document, root, rootModule, Frame } = options;
61
+ let dispose;
62
+ const mount = (Component) => {
63
+ const isRemount = !!dispose;
64
+ if (dispose) {
65
+ try {
66
+ dispose();
67
+ }
68
+ catch (err) {
69
+ console.log('[ns-solid-hmr] dispose error', err);
70
+ }
71
+ dispose = undefined;
72
+ // Rapid remounts can leave a detached native view parented to body; drop
73
+ // any residue so each remount starts clean (else ghost/overlapping views).
74
+ try {
75
+ const body = document.body;
76
+ while (body && body.firstChild)
77
+ body.removeChild(body.firstChild);
78
+ }
79
+ catch (err) {
80
+ console.log('[ns-solid-hmr] body clear error', err);
81
+ }
82
+ }
83
+ // Solid flushes onMount effects synchronously inside render(), so a
84
+ // topmost-frame router's initial navigation happens within this window.
85
+ const closeNavWindow = isRemount ? openRemountNavRedirect(Frame, document) : undefined;
86
+ try {
87
+ dispose = render(Component, document.body);
88
+ }
89
+ finally {
90
+ closeNavWindow?.();
91
+ }
92
+ };
93
+ Application.run({ create: () => (mount(root), document) });
94
+ installHmrRemount(rootModule, mount);
95
+ }
96
+ /**
97
+ * While the fresh tree renders during an HMR remount, rewrite page navigations
98
+ * (`frame.navigate({ create })`) to target the ROOT frame with
99
+ * `clearHistory: true`. Topmost-frame routers (solid-navigation) resolve
100
+ * `Frame.topmost()` at navigation time — mid-remount that is a stale frame from
101
+ * the OLD tree (e.g. a tab's nested frame), so without the redirect each HMR
102
+ * apply would nest the new app inside the old one and grow the backstack.
103
+ * Clearing history on the root frame also disposes the old page hierarchy,
104
+ * which runs the per-page Solid disposers registered by the router.
105
+ * Returns a close function that restores the original `navigate`.
106
+ */
107
+ function openRemountNavRedirect(Frame, document) {
108
+ const proto = Frame?.prototype;
109
+ const rootFrame = document?.documentElement;
110
+ if (!proto || typeof proto.navigate !== 'function' || !rootFrame)
111
+ return undefined;
112
+ const original = proto.navigate;
113
+ let closed = false;
114
+ proto.navigate = function (entry) {
115
+ // Only redirect navigations that target a STALE frame — one that already
116
+ // shows a page from the old tree (the router's `Frame.topmost()` pick, or
117
+ // the root frame itself). Frames created by the fresh render (e.g. tab
118
+ // item frames receiving their first page via dominative's insert) have no
119
+ // `currentPage` yet and must navigate themselves, untouched.
120
+ if (entry && typeof entry === 'object' && typeof entry.create === 'function' && this.currentPage) {
121
+ console.log('[ns-solid-hmr] remount: redirecting navigation to root frame (clearHistory)');
122
+ return original.call(rootFrame, { ...entry, clearHistory: true, animated: false });
123
+ }
124
+ // eslint-disable-next-line prefer-rest-params -- forwards all args verbatim to the original
125
+ return original.apply(this, arguments);
126
+ };
127
+ return () => {
128
+ if (closed)
129
+ return;
130
+ closed = true;
131
+ proto.navigate = original;
132
+ };
133
+ }
134
+ function installHmrRemount(rootModule, mount) {
135
+ const origin = resolveOrigin();
136
+ let busy = false;
137
+ let rerun = false;
138
+ const remount = async (changed) => {
139
+ if (!origin) {
140
+ console.log('[ns-solid-hmr] no HTTP origin resolved; cannot re-import');
141
+ return;
142
+ }
143
+ if (busy) {
144
+ // A remount is in flight; run one more pass after it settles so the very
145
+ // latest edit is never dropped.
146
+ rerun = true;
147
+ return;
148
+ }
149
+ busy = true;
150
+ try {
151
+ // Evict the app entry + changed files + every module on the reverse-import
152
+ // chain between them (`ev.ancestors`). Module identity is the URL, so if an
153
+ // intermediate importer (e.g. `home.tsx` importing a changed
154
+ // `listen-now.tsx`) stayed cached, re-importing the root would splice the
155
+ // STALE subtree back into the fresh tree and the edit would never render.
156
+ // TanStack Router route files are excluded from the shell path by the
157
+ // subscriber below, so its live router chain is untouched for route-only
158
+ // edits. Inline `__NS_DEV__` read — this module is served to the device
159
+ // standalone, so it stays import-free.
160
+ const g = globalThis;
161
+ const invalidate = g.__NS_DEV__?.invalidateModules;
162
+ if (typeof invalidate === 'function') {
163
+ try {
164
+ invalidate(evictionUrls(origin, [rootModule, ...changed]));
165
+ }
166
+ catch (err) {
167
+ console.log('[ns-solid-hmr] invalidate threw', err);
168
+ }
169
+ }
170
+ // Canonical URL only. The eviction above armed the runtime's
171
+ // bust-next-fetch nonce, so this import re-fetches the freshly
172
+ // transformed module — a path tag would mint a second module
173
+ // identity instead (module identity IS the URL).
174
+ const candidates = [origin + '/ns/m' + rootModule];
175
+ for (const url of candidates) {
176
+ try {
177
+ const mod = await import(/* @vite-ignore */ url);
178
+ const Next = mod && (mod.App || mod.default);
179
+ if (typeof Next === 'function') {
180
+ mount(Next);
181
+ return;
182
+ }
183
+ }
184
+ catch (err) {
185
+ console.log('[ns-solid-hmr] re-import failed', url, err?.message ?? err);
186
+ }
187
+ }
188
+ console.log('[ns-solid-hmr] all re-import candidates failed');
189
+ }
190
+ finally {
191
+ busy = false;
192
+ if (rerun) {
193
+ rerun = false;
194
+ void remount([]);
195
+ }
196
+ }
197
+ };
198
+ // Coalesce bursts (a single save can fan out several notifications) into one remount.
199
+ let timer;
200
+ let pending = new Set();
201
+ const schedule = (ids) => {
202
+ for (const id of ids)
203
+ pending.add(id);
204
+ if (timer)
205
+ clearTimeout(timer);
206
+ timer = setTimeout(() => {
207
+ timer = undefined;
208
+ const batch = Array.from(pending);
209
+ pending = new Set();
210
+ void remount(batch);
211
+ }, 30);
212
+ };
213
+ const g = globalThis;
214
+ let subscribed = false;
215
+ const trySubscribe = (attempt) => {
216
+ if (subscribed)
217
+ return;
218
+ if (typeof g.__ns_solid_hmr_subscribe === 'function') {
219
+ g.__ns_solid_hmr_subscribe((ev) => {
220
+ const changed = ev && Array.isArray(ev.changedFiles) ? ev.changedFiles : [];
221
+ const boundaries = ev && Array.isArray(ev.boundaries) ? ev.boundaries : [];
222
+ const ids = [...changed, ...boundaries].filter(isSource);
223
+ // Route-only edits are hot-swapped in place by the router's per-page
224
+ // remount — don't re-render the whole app (which would fight it). Only
225
+ // re-render for shell / shared-component / app-entry edits. The
226
+ // shell/route decision is made from changed + boundaries ONLY;
227
+ // ancestors always reach up to the app entry, so including them here
228
+ // would misclassify every route edit as a shell edit.
229
+ if (!ids.some(isShell))
230
+ return;
231
+ // Evict the full importer chain (changed → … → entry) so the root
232
+ // re-import below rebuilds the whole tree from fresh modules instead
233
+ // of splicing cached stale intermediates back in.
234
+ const ancestors = ev && Array.isArray(ev.ancestors) ? ev.ancestors.filter(isSource) : [];
235
+ schedule([...ids, ...ancestors]);
236
+ });
237
+ subscribed = true;
238
+ return;
239
+ }
240
+ // The HMR client loads asynchronously; retry until its global API is present.
241
+ if (attempt < 100)
242
+ setTimeout(() => trySubscribe(attempt + 1), 150);
243
+ };
244
+ trySubscribe(0);
245
+ }
246
+ //# sourceMappingURL=app-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-runtime.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/solid/client/app-runtime.ts"],"names":[],"mappings":"AAiDA,MAAM,UAAU,GAAG,uCAAuC,CAAC;AAC3D,MAAM,aAAa,GAAG,6BAA6B,CAAC;AACpD,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9E,iFAAiF;AACjF,yEAAyE;AACzE,MAAM,OAAO,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,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