@absolutejs/absolute 0.19.0-beta.999 → 0.20.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/LICENSE +21 -13
  2. package/README.md +48 -2
  3. package/dist/angular/browser.js +82 -77
  4. package/dist/angular/browser.js.map +11 -11
  5. package/dist/angular/components/constants.js +43 -0
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  7. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  8. package/dist/angular/hmrPreserveCore.ts +132 -134
  9. package/dist/angular/index.js +1719 -844
  10. package/dist/angular/index.js.map +34 -26
  11. package/dist/angular/server.js +1620 -768
  12. package/dist/angular/server.js.map +28 -20
  13. package/dist/build.js +4935 -2593
  14. package/dist/build.js.map +72 -57
  15. package/dist/cli/config/client.js +578 -0
  16. package/dist/cli/config/server.js +39587 -0
  17. package/dist/cli/htmx/htmx.min.js +1 -0
  18. package/dist/cli/index.js +16828 -3511
  19. package/dist/client/index.js +49 -46
  20. package/dist/client/index.js.map +12 -12
  21. package/dist/core/streamingSlotRegistrar.js +1 -19
  22. package/dist/core/streamingSlotRegistrar.js.map +2 -2
  23. package/dist/core/streamingSlotRegistry.js +1 -19
  24. package/dist/core/streamingSlotRegistry.js.map +2 -2
  25. package/dist/dev/client/cssUtils.ts +98 -41
  26. package/dist/dev/client/domState.ts +2 -0
  27. package/dist/dev/client/errorOverlay.ts +14 -13
  28. package/dist/dev/client/handlers/angularHmrShim.ts +20 -20
  29. package/dist/dev/client/handlers/angularRemount.ts +74 -55
  30. package/dist/dev/client/handlers/angularRemountWiring.ts +1 -2
  31. package/dist/dev/client/handlers/html.ts +144 -41
  32. package/dist/dev/client/handlers/htmx.ts +43 -8
  33. package/dist/dev/client/handlers/react.ts +114 -32
  34. package/dist/dev/client/handlers/rebuild.ts +28 -8
  35. package/dist/dev/client/handlers/svelte.ts +92 -51
  36. package/dist/dev/client/handlers/vue.ts +36 -45
  37. package/dist/dev/client/hmrClient.ts +101 -26
  38. package/dist/dev/client/hmrTiming.ts +141 -0
  39. package/dist/dev/client/hmrToast.ts +22 -24
  40. package/dist/dev/client/reactRefreshSetup.ts +4 -0
  41. package/dist/dev/client/vendor/reactRefreshRuntime.d.ts +12 -0
  42. package/dist/dev/client/vendor/reactRefreshRuntime.js +313 -0
  43. package/dist/dev/serverBootstrap.js +45 -0
  44. package/dist/index.js +7153 -3224
  45. package/dist/index.js.map +118 -86
  46. package/dist/islands/browser.js +1 -19
  47. package/dist/islands/browser.js.map +3 -3
  48. package/dist/islands/index.js +709 -120
  49. package/dist/islands/index.js.map +18 -13
  50. package/dist/mobile/browser.js +428 -0
  51. package/dist/mobile/browser.js.map +12 -0
  52. package/dist/mobile/index.js +3058 -0
  53. package/dist/mobile/index.js.map +35 -0
  54. package/dist/react/browser.js +13 -62
  55. package/dist/react/browser.js.map +5 -6
  56. package/dist/react/components/browser/index.js +23 -13
  57. package/dist/react/components/index.js +30 -34
  58. package/dist/react/components/index.js.map +8 -7
  59. package/dist/react/hooks/index.js +1 -19
  60. package/dist/react/hooks/index.js.map +3 -3
  61. package/dist/react/index.js +1643 -679
  62. package/dist/react/index.js.map +29 -20
  63. package/dist/react/jsxDevRuntimeCompat.js +22 -20
  64. package/dist/react/jsxDevRuntimeCompat.js.map +5 -4
  65. package/dist/react/jsxRuntimeCompat.js +90 -0
  66. package/dist/react/jsxRuntimeCompat.js.map +10 -0
  67. package/dist/react/router/browser.js +77 -0
  68. package/dist/react/router/browser.js.map +10 -0
  69. package/dist/react/router/index.js +77 -0
  70. package/dist/react/router/index.js.map +10 -0
  71. package/dist/react/server.js +950 -565
  72. package/dist/react/server.js.map +16 -11
  73. package/dist/src/angular/components/constants.d.ts +21 -0
  74. package/dist/src/angular/hmrPreserveCore.d.ts +7 -20
  75. package/dist/src/angular/islands.d.ts +1 -1
  76. package/dist/src/angular/pageHandler.d.ts +2 -0
  77. package/dist/src/angular/ssrRender.d.ts +4 -1
  78. package/dist/src/build/bunStringRawUnicodePlugin.d.ts +12 -0
  79. package/dist/src/build/chainInlineSourcemaps.d.ts +1 -0
  80. package/dist/src/build/compileAngular.d.ts +5 -7
  81. package/dist/src/build/compileSvelte.d.ts +3 -0
  82. package/dist/src/build/compileVue.d.ts +3 -1
  83. package/dist/src/build/generateReactIndexes.d.ts +1 -0
  84. package/dist/src/build/islandRegistryTransform.d.ts +17 -0
  85. package/dist/src/build/maskLiterals.d.ts +28 -0
  86. package/dist/src/build/parseVueSpaRoutes.d.ts +5 -0
  87. package/dist/src/build/resolveBuildMode.d.ts +7 -0
  88. package/dist/src/build/serverExternals.d.ts +14 -0
  89. package/dist/src/build/spaSideManifests.d.ts +16 -0
  90. package/dist/src/build/tailwindCompiler.d.ts +0 -1
  91. package/dist/src/cli/add/dependencies.d.ts +13 -0
  92. package/dist/src/cli/config/absolute/AbsoluteConfigPanel.d.ts +6 -0
  93. package/dist/src/cli/config/absolute/editAbsoluteConfig.d.ts +5 -0
  94. package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +19 -0
  95. package/dist/src/cli/config/auth/AuthPanel.d.ts +6 -0
  96. package/dist/src/cli/config/auth/authCatalog.d.ts +10 -0
  97. package/dist/src/cli/config/auth/authScaffolds.d.ts +16 -0
  98. package/dist/src/cli/config/auth/editAuthConfig.d.ts +5 -0
  99. package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +14 -0
  100. package/dist/src/cli/config/auth/resolveAuthState.d.ts +2 -0
  101. package/dist/src/cli/config/auth/scaffoldAuthFeature.d.ts +6 -0
  102. package/dist/src/cli/config/client.d.ts +1 -0
  103. package/dist/src/cli/config/configCert.d.ts +12 -0
  104. package/dist/src/cli/config/eslint/EslintPanel.d.ts +6 -0
  105. package/dist/src/cli/config/eslint/configAst.d.ts +18 -0
  106. package/dist/src/cli/config/eslint/editConfigRule.d.ts +6 -0
  107. package/dist/src/cli/config/eslint/eslintStyles.d.ts +1 -0
  108. package/dist/src/cli/config/eslint/resolveConfig.d.ts +3 -0
  109. package/dist/src/cli/config/eslint/serializeValue.d.ts +9 -0
  110. package/dist/src/cli/config/guards.d.ts +4 -0
  111. package/dist/src/cli/config/integrations/IntegrationsPanel.d.ts +6 -0
  112. package/dist/src/cli/config/packageJson/PackageJsonPanel.d.ts +6 -0
  113. package/dist/src/cli/config/packageJson/editPackageJson.d.ts +9 -0
  114. package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +8 -0
  115. package/dist/src/cli/config/page/ConfigShell.d.ts +6 -0
  116. package/dist/src/cli/config/page/FieldEditor.d.ts +9 -0
  117. package/dist/src/cli/config/page/PanelHost.d.ts +6 -0
  118. package/dist/src/cli/config/page/configStyles.d.ts +1 -0
  119. package/dist/src/cli/config/panels.d.ts +7 -0
  120. package/dist/src/cli/config/prettier/PrettierPanel.d.ts +6 -0
  121. package/dist/src/cli/config/prettier/editPrettier.d.ts +5 -0
  122. package/dist/src/cli/config/prettier/resolvePrettier.d.ts +11 -0
  123. package/dist/src/cli/config/schema/fromJsonSchema.d.ts +3 -0
  124. package/dist/src/cli/config/schema/fromType.d.ts +1 -0
  125. package/dist/src/cli/config/schema/serialize.d.ts +1 -0
  126. package/dist/src/cli/config/server.d.ts +527 -0
  127. package/dist/src/cli/config/tsconfig/TsconfigPanel.d.ts +6 -0
  128. package/dist/src/cli/config/tsconfig/editTsconfig.d.ts +5 -0
  129. package/dist/src/cli/config/tsconfig/resolveTsconfig.d.ts +8 -0
  130. package/dist/src/cli/config/tsconfig/tsconfigStyles.d.ts +1 -0
  131. package/dist/src/cli/discoverInstances.d.ts +5 -0
  132. package/dist/src/cli/elysiaOpenApiTypeboxPlugin.d.ts +8 -0
  133. package/dist/src/cli/generate/componentTemplates.d.ts +7 -0
  134. package/dist/src/cli/generate/context.d.ts +30 -0
  135. package/dist/src/cli/generate/cssStrategy.d.ts +20 -0
  136. package/dist/src/cli/generate/frameworkKey.d.ts +3 -0
  137. package/dist/src/cli/generate/frameworks.d.ts +40 -0
  138. package/dist/src/cli/generate/generateApi.d.ts +3 -0
  139. package/dist/src/cli/generate/generateComponent.d.ts +4 -0
  140. package/dist/src/cli/generate/generatePage.d.ts +4 -0
  141. package/dist/src/cli/generate/naming.d.ts +5 -0
  142. package/dist/src/cli/generate/navData.d.ts +10 -0
  143. package/dist/src/cli/generate/outcome.d.ts +17 -0
  144. package/dist/src/cli/generate/pageTemplates.d.ts +11 -0
  145. package/dist/src/cli/generate/routeWiring.d.ts +40 -0
  146. package/dist/src/cli/generate/staticNav.d.ts +5 -0
  147. package/dist/src/cli/heapDiff.d.ts +1 -0
  148. package/dist/src/cli/htmx/install.d.ts +6 -0
  149. package/dist/src/cli/inspectData.d.ts +12 -0
  150. package/dist/src/cli/inspectTui.d.ts +1 -0
  151. package/dist/src/cli/instanceStatus.d.ts +22 -0
  152. package/dist/src/cli/integrations/addPlugin.d.ts +8 -0
  153. package/dist/src/cli/integrations/catalog.d.ts +20 -0
  154. package/dist/src/cli/psTui.d.ts +1 -0
  155. package/dist/src/cli/scripts/add.d.ts +1 -0
  156. package/dist/src/cli/scripts/analyze.d.ts +1 -0
  157. package/dist/src/cli/scripts/api.d.ts +1 -0
  158. package/dist/src/cli/scripts/build.d.ts +1 -1
  159. package/dist/src/cli/scripts/db.d.ts +20 -0
  160. package/dist/src/cli/scripts/dev.d.ts +5 -1
  161. package/dist/src/cli/scripts/doctor.d.ts +1 -0
  162. package/dist/src/cli/scripts/env.d.ts +7 -0
  163. package/dist/src/cli/scripts/eslint.d.ts +37 -2
  164. package/dist/src/cli/scripts/eslintChunked.d.ts +37 -0
  165. package/dist/src/cli/scripts/generate.d.ts +1 -0
  166. package/dist/src/cli/scripts/htmx.d.ts +1 -0
  167. package/dist/src/cli/scripts/inspect.d.ts +1 -0
  168. package/dist/src/cli/scripts/islands.d.ts +1 -0
  169. package/dist/src/cli/scripts/lintProof.d.ts +42 -0
  170. package/dist/src/cli/scripts/logs.d.ts +1 -0
  171. package/dist/src/cli/scripts/ls.d.ts +1 -0
  172. package/dist/src/cli/scripts/mem.d.ts +1 -0
  173. package/dist/src/cli/scripts/mobile.d.ts +1 -0
  174. package/dist/src/cli/scripts/prettier.d.ts +2 -0
  175. package/dist/src/cli/scripts/ps.d.ts +1 -0
  176. package/dist/src/cli/scripts/remove.d.ts +1 -0
  177. package/dist/src/cli/scripts/routes.d.ts +1 -0
  178. package/dist/src/cli/scripts/start.d.ts +6 -1
  179. package/dist/src/cli/scripts/tunnelRelay.d.ts +9 -0
  180. package/dist/src/cli/scripts/workspace.d.ts +3 -1
  181. package/dist/src/cli/serverBundleExternals.d.ts +2 -0
  182. package/dist/src/cli/tuiPrimitives.d.ts +14 -0
  183. package/dist/src/cli/typeGraphCoherence.d.ts +32 -0
  184. package/dist/src/cli/utils.d.ts +3 -1
  185. package/dist/src/cli/workspaceTui.d.ts +2 -1
  186. package/dist/src/client/hydrators/react.d.ts +1 -1
  187. package/dist/src/client/hydrators/svelte.d.ts +1 -1
  188. package/dist/src/client/hydrators/vue.d.ts +1 -1
  189. package/dist/src/client/islandStore.d.ts +3 -3
  190. package/dist/src/client/preserveIslandMarkup.d.ts +4 -1
  191. package/dist/src/constants.d.ts +21 -0
  192. package/dist/src/core/angularServerModule.d.ts +1 -0
  193. package/dist/src/core/build.d.ts +11 -3
  194. package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -5
  195. package/dist/src/core/index.d.ts +1 -0
  196. package/dist/src/core/pageResponseCache.d.ts +23 -0
  197. package/dist/src/core/prepare.d.ts +192 -154
  198. package/dist/src/core/requestContext.d.ts +18 -0
  199. package/dist/src/dev/angular/fastHmrCompiler.d.ts +5 -3
  200. package/dist/src/dev/angular/hmrCompiler.d.ts +1 -1
  201. package/dist/src/dev/angular/resolveOwningComponents.d.ts +1 -1
  202. package/dist/src/dev/clientManager.d.ts +10 -1
  203. package/dist/src/dev/configResolver.d.ts +2 -0
  204. package/dist/src/dev/moduleMapper.d.ts +1 -1
  205. package/dist/src/dev/moduleServer.d.ts +2 -1
  206. package/dist/src/dev/pathUtils.d.ts +1 -1
  207. package/dist/src/dev/reactComponentClassifier.d.ts +1 -1
  208. package/dist/src/dev/rebuildTrigger.d.ts +4 -0
  209. package/dist/src/dev/requestInspector.d.ts +31 -0
  210. package/dist/src/dev/serverBootstrap.d.ts +1 -0
  211. package/dist/src/dev/serverEntryWatcher.d.ts +3 -3
  212. package/dist/src/dev/tunnel/client.d.ts +20 -0
  213. package/dist/src/dev/tunnel/protocol.d.ts +85 -0
  214. package/dist/src/dev/tunnel/relay.d.ts +28 -0
  215. package/dist/src/dev/webSocket.d.ts +1 -1
  216. package/dist/src/mobile/androidConformance.d.ts +42 -0
  217. package/dist/src/mobile/androidEmulatorController.d.ts +99 -0
  218. package/dist/src/mobile/androidNativeWatcher.d.ts +19 -0
  219. package/dist/src/mobile/androidRelease.d.ts +47 -0
  220. package/dist/src/mobile/androidWebView.d.ts +46 -0
  221. package/dist/src/mobile/artifactStore.d.ts +47 -0
  222. package/dist/src/mobile/associationFiles.d.ts +49 -0
  223. package/dist/src/mobile/browser.d.ts +2 -0
  224. package/dist/src/mobile/buildMetadata.d.ts +10 -0
  225. package/dist/src/mobile/buildPipeline.d.ts +8 -0
  226. package/dist/src/mobile/buildRelease.d.ts +24 -0
  227. package/dist/src/mobile/capacitorBundle.d.ts +28 -0
  228. package/dist/src/mobile/capacitorProject.d.ts +9 -0
  229. package/dist/src/mobile/client.d.ts +35 -0
  230. package/dist/src/mobile/compatibilityDispatcher.d.ts +26 -0
  231. package/dist/src/mobile/config.d.ts +16 -0
  232. package/dist/src/mobile/emulatorDoctor.d.ts +25 -0
  233. package/dist/src/mobile/emulatorInstaller.d.ts +41 -0
  234. package/dist/src/mobile/index.d.ts +19 -0
  235. package/dist/src/mobile/materializedBundle.d.ts +36 -0
  236. package/dist/src/mobile/nativeDeepLinks.d.ts +5 -0
  237. package/dist/src/mobile/pageProtocol.d.ts +89 -0
  238. package/dist/src/mobile/producerContext.d.ts +4 -0
  239. package/dist/src/mobile/producerContextState.d.ts +10 -0
  240. package/dist/src/mobile/releaseArtifact.d.ts +75 -0
  241. package/dist/src/mobile/releaseDoctor.d.ts +13 -0
  242. package/dist/src/mobile/routeMatcher.d.ts +3 -0
  243. package/dist/src/mobile/routeMetadataTransform.d.ts +13 -0
  244. package/dist/src/mobile/shellBootstrap.d.ts +1 -0
  245. package/dist/src/mobile/transport.d.ts +31 -0
  246. package/dist/src/plugins/devtoolsJson.d.ts +6 -47
  247. package/dist/src/plugins/hmr.d.ts +22 -96
  248. package/dist/src/plugins/imageOptimizer.d.ts +150 -62
  249. package/dist/src/plugins/networking.d.ts +2 -2
  250. package/dist/src/plugins/openApiPlugin.d.ts +4 -0
  251. package/dist/src/plugins/telemetryPlugin.d.ts +36 -0
  252. package/dist/src/react/browser.d.ts +0 -2
  253. package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
  254. package/dist/src/react/index.d.ts +0 -2
  255. package/dist/src/react/jsxDevRuntimeCompat.d.ts +1 -1
  256. package/dist/src/react/jsxRuntimeCompat.d.ts +7 -0
  257. package/dist/src/react/pageHandler.d.ts +8 -0
  258. package/dist/src/react/router/UniversalRouter.d.ts +43 -0
  259. package/dist/src/react/router/browser.d.ts +2 -0
  260. package/dist/src/react/router/index.d.ts +2 -0
  261. package/dist/src/svelte/pageHandler.d.ts +5 -0
  262. package/dist/src/svelte/router/hashMode.d.ts +1 -6
  263. package/dist/src/svelte/router/matchPath.d.ts +4 -24
  264. package/dist/src/svelte/router/page.svelte.d.ts +1 -10
  265. package/dist/src/svelte/router/prefetchCache.d.ts +2 -6
  266. package/dist/src/utils/cleanup.d.ts +1 -0
  267. package/dist/src/utils/defineConvention.d.ts +2 -2
  268. package/dist/src/utils/defineEnv.d.ts +4 -4
  269. package/dist/src/utils/formatBytes.d.ts +2 -0
  270. package/dist/src/utils/generatedDir.d.ts +1 -1
  271. package/dist/src/utils/iconVersion.d.ts +5 -0
  272. package/dist/src/utils/imageProcessing.d.ts +1 -1
  273. package/dist/src/utils/index.d.ts +2 -0
  274. package/dist/src/utils/inlinePageCss.d.ts +9 -0
  275. package/dist/src/utils/instanceRegistry.d.ts +13 -0
  276. package/dist/src/utils/isTestSourcePath.d.ts +1 -0
  277. package/dist/src/utils/jsonLd.d.ts +1 -1
  278. package/dist/src/utils/loadConfig.d.ts +11 -3
  279. package/dist/src/utils/logger.d.ts +2 -0
  280. package/dist/src/utils/portScan.d.ts +22 -0
  281. package/dist/src/utils/projectRoot.d.ts +17 -0
  282. package/dist/src/utils/resolveConvention.d.ts +1 -1
  283. package/dist/src/utils/resolveDevPort.d.ts +4 -1
  284. package/dist/src/utils/runtimeMode.d.ts +1 -1
  285. package/dist/src/utils/spaRouteCss.d.ts +10 -0
  286. package/dist/src/utils/spaRouteManifest.d.ts +8 -0
  287. package/dist/src/utils/stripStringsAndComments.d.ts +18 -0
  288. package/dist/src/utils/userAgentFunctions.d.ts +1 -1
  289. package/dist/src/utils/vueCompiler.d.ts +1 -0
  290. package/dist/src/vue/components/Image.d.ts +2 -2
  291. package/dist/src/vue/defineVuePage.d.ts +1 -11
  292. package/dist/src/vue/index.d.ts +3 -0
  293. package/dist/src/vue/pageHandler.d.ts +5 -0
  294. package/dist/src/vue/resolveGeneratedVueModulePath.d.ts +1 -0
  295. package/dist/src/vue/teleports.d.ts +2 -0
  296. package/dist/src/vue/useResource.d.ts +65 -0
  297. package/dist/svelte/browser.js +1 -19
  298. package/dist/svelte/browser.js.map +3 -3
  299. package/dist/svelte/components/Head.svelte +7 -1
  300. package/dist/svelte/index.js +1281 -543
  301. package/dist/svelte/index.js.map +27 -19
  302. package/dist/svelte/router/Link.svelte.d.ts +3 -3
  303. package/dist/svelte/router/Route.svelte.d.ts +5 -5
  304. package/dist/svelte/router/Router.svelte.d.ts +3 -3
  305. package/dist/svelte/router/hashMode.ts +6 -12
  306. package/dist/svelte/router/matchPath.ts +44 -61
  307. package/dist/svelte/router/page.d.ts +1 -10
  308. package/dist/svelte/router/page.js +6 -6
  309. package/dist/svelte/router/prefetchCache.ts +21 -23
  310. package/dist/svelte/router/viewTransitions.ts +22 -12
  311. package/dist/svelte/server.js +697 -565
  312. package/dist/svelte/server.js.map +14 -11
  313. package/dist/types/absoluteConfig.d.ts +22 -0
  314. package/dist/types/angular.d.ts +4 -1
  315. package/dist/types/authPanel.d.ts +62 -0
  316. package/dist/types/build.d.ts +116 -0
  317. package/dist/types/cli.d.ts +57 -0
  318. package/dist/types/config.d.ts +52 -0
  319. package/dist/types/eslintConfig.d.ts +68 -0
  320. package/dist/types/globals.d.ts +31 -10
  321. package/dist/types/image.d.ts +2 -0
  322. package/dist/types/index.d.ts +1 -0
  323. package/dist/types/integrationsPanel.d.ts +29 -0
  324. package/dist/types/messages.d.ts +12 -0
  325. package/dist/types/packageJson.d.ts +74 -0
  326. package/dist/types/packageJsonPanel.d.ts +29 -0
  327. package/dist/types/prettier.d.ts +26 -0
  328. package/dist/types/tsconfig.d.ts +31 -0
  329. package/dist/types/vue.d.ts +13 -15
  330. package/dist/vue/browser.js +14 -36
  331. package/dist/vue/browser.js.map +5 -5
  332. package/dist/vue/components/Image.js +3 -20
  333. package/dist/vue/components/Image.js.map +3 -3
  334. package/dist/vue/components/index.js +3 -20
  335. package/dist/vue/components/index.js.map +3 -3
  336. package/dist/vue/index.js +1573 -620
  337. package/dist/vue/index.js.map +34 -22
  338. package/dist/vue/server.js +800 -520
  339. package/dist/vue/server.js.map +17 -11
  340. package/package.json +145 -68
  341. package/dist/src/react/UniversalRouter.d.ts +0 -12
@@ -149,34 +149,90 @@ const findManifestHref = (
149
149
  return null;
150
150
  };
151
151
 
152
+ const replaceStylesheetLink = (
153
+ existingLink: HTMLLinkElement,
154
+ newHref: string
155
+ ) => {
156
+ const replacement = existingLink.cloneNode(true);
157
+ if (!(replacement instanceof HTMLLinkElement)) {
158
+ return Promise.resolve(false);
159
+ }
160
+ const { promise, resolve } = Promise.withResolvers<boolean>();
161
+ let settled = false;
162
+ const finish = (applied: boolean) => {
163
+ if (settled) return;
164
+ settled = true;
165
+ if (applied) existingLink.remove();
166
+ else replacement.remove();
167
+ resolve(applied);
168
+ };
169
+ replacement.onload = () => finish(true);
170
+ replacement.onerror = () => finish(false);
171
+ replacement.href = newHref;
172
+ existingLink.after(replacement);
173
+ setTimeout(() => {
174
+ if (replacement.sheet) finish(true);
175
+ }, CSS_SHEET_READY_TIMEOUT_MS);
176
+ setTimeout(
177
+ () => finish(Boolean(replacement.sheet)),
178
+ CSS_MAX_PARSE_TIMEOUT_MS
179
+ );
180
+
181
+ return promise;
182
+ };
183
+
152
184
  const updateStylesheetLink = (
153
185
  link: Element,
154
186
  manifest: Record<string, string>
155
187
  ) => {
156
- if (!(link instanceof HTMLLinkElement)) return;
188
+ if (!(link instanceof HTMLLinkElement)) return Promise.resolve(true);
157
189
  const href = link.getAttribute('href');
158
- if (!href || href.includes('htmx.min.js')) return;
190
+ if (!href || href.includes('htmx.min.js')) return Promise.resolve(true);
159
191
 
160
192
  let newHref: string | null = null;
161
193
  if (manifest) {
162
194
  const baseName = getCSSBaseName(href);
163
195
  newHref = findManifestHref(manifest, baseName);
164
196
  }
197
+ const currentUrl = new URL(href, window.location.href);
198
+ if (!newHref && currentUrl.origin !== window.location.origin) {
199
+ return Promise.resolve(true);
200
+ }
165
201
 
202
+ let replacementHref: string;
166
203
  if (newHref && newHref !== href) {
167
- link.href = `${newHref}?t=${Date.now()}`;
204
+ replacementHref = `${newHref}?t=${Date.now()}`;
168
205
  } else {
169
- const url = new URL(href, window.location.origin);
170
- url.searchParams.set('t', Date.now().toString());
171
- link.href = url.toString();
206
+ currentUrl.searchParams.set('t', Date.now().toString());
207
+ replacementHref = currentUrl.toString();
172
208
  }
209
+
210
+ return replaceStylesheetLink(link, replacementHref);
173
211
  };
174
212
 
175
213
  export const reloadCSSStylesheets = (manifest: Record<string, string>) => {
176
- const stylesheets = document.querySelectorAll('link[rel="stylesheet"]');
177
- stylesheets.forEach((link) => {
178
- updateStylesheetLink(link, manifest);
179
- });
214
+ const stylesheets = Array.from(
215
+ document.querySelectorAll('link[rel="stylesheet"]')
216
+ );
217
+
218
+ return Promise.all(
219
+ stylesheets.map((link) => updateStylesheetLink(link, manifest))
220
+ ).then((results) => results.every(Boolean));
221
+ };
222
+
223
+ export const swapCSSStylesheet = (
224
+ cssUrl: string,
225
+ matches: (href: string) => boolean
226
+ ) => {
227
+ const existingLink = Array.from(
228
+ document.querySelectorAll<HTMLLinkElement>('link[rel="stylesheet"]')
229
+ ).find((link) => matches(link.getAttribute('href') ?? ''));
230
+ if (!existingLink) return Promise.resolve(false);
231
+
232
+ return replaceStylesheetLink(
233
+ existingLink,
234
+ `${cssUrl}${cssUrl.includes('?') ? '&' : '?'}t=${Date.now()}`
235
+ );
180
236
  };
181
237
 
182
238
  const createCSSLoadPromise = (
@@ -268,44 +324,45 @@ const chainRAF = (depth: number, callback: () => void) => {
268
324
  activates new CSS, removes old CSS. Handles first-update delay. */
269
325
  export const waitForCSSAndUpdate = (
270
326
  cssResult: CSSUpdateResult,
271
- updateBody: () => void
327
+ updateBody: () => void | Promise<void>
272
328
  ) => {
273
329
  const { linksToActivate, linksToRemove, linksToWaitFor } = cssResult;
274
-
275
- if (linksToWaitFor.length > 0) {
276
- void Promise.all(linksToWaitFor).then(() => {
277
- setTimeout(() => {
278
- chainRAF(RAF_BATCH_COUNT, () => {
279
- updateBody();
280
- activateLinks(linksToActivate);
330
+ const { promise, reject, resolve } = Promise.withResolvers<void>();
331
+ const doUpdate = () => {
332
+ chainRAF(RAF_BATCH_COUNT, () => {
333
+ let updateResult: void | Promise<void>;
334
+ try {
335
+ updateResult = updateBody();
336
+ activateLinks(linksToActivate);
337
+ } catch (error) {
338
+ reject(error);
339
+
340
+ return;
341
+ }
342
+ void Promise.resolve(updateResult).then(
343
+ () => {
281
344
  requestAnimationFrame(() => {
282
345
  removeLinks(linksToRemove);
283
- if (hmrState.isFirstHMRUpdate) {
284
- hmrState.isFirstHMRUpdate = false;
285
- }
346
+ hmrState.isFirstHMRUpdate = false;
347
+ resolve();
286
348
  });
287
- });
288
- }, DOM_UPDATE_DELAY_MS);
289
-
290
- return undefined;
291
- });
292
-
293
- return;
294
- }
295
-
296
- const doUpdate = function () {
297
- chainRAF(RAF_BATCH_COUNT, () => {
298
- updateBody();
299
- requestAnimationFrame(() => {
300
- removeLinks(linksToRemove);
301
- });
349
+ },
350
+ (error: unknown) => reject(error)
351
+ );
302
352
  });
303
353
  };
304
-
305
- if (hmrState.isFirstHMRUpdate) {
306
- hmrState.isFirstHMRUpdate = false;
307
- setTimeout(doUpdate, DOM_UPDATE_DELAY_MS);
354
+ const scheduleUpdate = () => {
355
+ if (hmrState.isFirstHMRUpdate || linksToWaitFor.length > 0) {
356
+ setTimeout(doUpdate, DOM_UPDATE_DELAY_MS);
357
+ } else {
358
+ doUpdate();
359
+ }
360
+ };
361
+ if (linksToWaitFor.length > 0) {
362
+ void Promise.all(linksToWaitFor).then(scheduleUpdate, reject);
308
363
  } else {
309
- doUpdate();
364
+ scheduleUpdate();
310
365
  }
366
+
367
+ return promise;
311
368
  };
@@ -157,6 +157,8 @@ const resolveFormElement = (
157
157
  name: string
158
158
  ) => {
159
159
  if (isStandalone) {
160
+ // Annotation drives querySelector's generic `E` (downstream needs
161
+ // HTMLInputElement, not the default Element).
160
162
  const element: HTMLInputElement | null = document.querySelector(
161
163
  `input[name="${name}"], textarea[name="${name}"], select[name="${name}"]`
162
164
  );
@@ -108,7 +108,7 @@ const buildLocationSection = (
108
108
 
109
109
  if (lineText) {
110
110
  const codeBlock = document.createElement('pre');
111
- codeBlock.style.cssText = codeBlockStyle + 'margin-top:8px;';
111
+ codeBlock.style.cssText = `${codeBlockStyle}margin-top:8px;`;
112
112
  codeBlock.textContent = lineText;
113
113
  locSection.appendChild(codeBlock);
114
114
  }
@@ -141,7 +141,7 @@ const buildStackSection = (stack: string | undefined, message: string) => {
141
141
  label.textContent = 'Stack';
142
142
  section.appendChild(label);
143
143
  const pre = document.createElement('pre');
144
- pre.style.cssText = codeBlockStyle + 'max-height:300px;overflow-y:auto;';
144
+ pre.style.cssText = `${codeBlockStyle}max-height:300px;overflow-y:auto;`;
145
145
  pre.textContent = cleaned;
146
146
  section.appendChild(pre);
147
147
 
@@ -155,7 +155,8 @@ const collectLoadedScripts = () => {
155
155
  const scripts = Array.from(document.querySelectorAll('script[src]'));
156
156
  const urls: string[] = [];
157
157
  for (const script of scripts) {
158
- const src = (script as HTMLScriptElement).src;
158
+ if (!(script instanceof HTMLScriptElement)) continue;
159
+ const { src } = script;
159
160
  if (!src) continue;
160
161
  // Filter to JS we serve — vendor chunks, generated indexes, root
161
162
  // chunk-XXX.js outputs. Skip user-pasted CDN scripts and the like.
@@ -182,8 +183,8 @@ const buildDiagnosticsSection = () => {
182
183
 
183
184
  const lines: string[] = [];
184
185
  lines.push(`Page URL: ${window.location.href}`);
185
- const ua = navigator.userAgent;
186
- lines.push(`User agent: ${ua}`);
186
+ const { userAgent } = navigator;
187
+ lines.push(`User agent: ${userAgent}`);
187
188
  const scripts = collectLoadedScripts();
188
189
  if (scripts.length > 0) {
189
190
  lines.push('');
@@ -195,7 +196,7 @@ const buildDiagnosticsSection = () => {
195
196
  }
196
197
 
197
198
  const pre = document.createElement('pre');
198
- pre.style.cssText = codeBlockStyle + 'max-height:200px;overflow-y:auto;';
199
+ pre.style.cssText = `${codeBlockStyle}max-height:200px;overflow-y:auto;`;
199
200
  pre.textContent = lines.join('\n');
200
201
  section.appendChild(pre);
201
202
 
@@ -374,12 +375,12 @@ const renderOverlay = () => {
374
375
  } catch {
375
376
  // Clipboard API requires a user gesture + permissions; fall back
376
377
  // to a textarea + execCommand so the button still does something.
377
- const ta = document.createElement('textarea');
378
- ta.value = text;
379
- ta.style.position = 'fixed';
380
- ta.style.opacity = '0';
381
- document.body.appendChild(ta);
382
- ta.select();
378
+ const textarea = document.createElement('textarea');
379
+ textarea.value = text;
380
+ textarea.style.position = 'fixed';
381
+ textarea.style.opacity = '0';
382
+ document.body.appendChild(textarea);
383
+ textarea.select();
383
384
  try {
384
385
  document.execCommand('copy');
385
386
  copy.textContent = 'Copied';
@@ -389,7 +390,7 @@ const renderOverlay = () => {
389
390
  } catch {
390
391
  copy.textContent = 'Copy failed';
391
392
  }
392
- document.body.removeChild(ta);
393
+ document.body.removeChild(textarea);
393
394
  }
394
395
  };
395
396
  footer.appendChild(copy);
@@ -29,35 +29,25 @@ type AngularHmrBus = {
29
29
  };
30
30
 
31
31
  declare global {
32
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- Window augmentation requires interface merging
32
33
  interface Window {
33
34
  __angularHmr?: AngularHmrBus;
34
35
  }
35
- // eslint-disable-next-line no-var
36
+
36
37
  var __angularHmr: AngularHmrBus | undefined;
37
38
  }
38
39
 
39
- const installAngularHmrShim = (): AngularHmrBus => {
40
+ const installAngularHmrShim = () => {
40
41
  const listeners = new Map<AngularHmrEvent, Set<AngularHmrListener>>();
41
42
 
42
43
  const bus: AngularHmrBus = {
43
- on(event, cb) {
44
- let set = listeners.get(event);
45
- if (!set) {
46
- set = new Set();
47
- listeners.set(event, set);
48
- }
49
- set.add(cb);
50
- },
51
- off(event, cb) {
52
- listeners.get(event)?.delete(cb);
53
- },
54
44
  dispatch(event, data) {
55
45
  const set = listeners.get(event);
56
46
  if (!set) return;
57
47
  // Snapshot before iterating — handlers could remove themselves.
58
- for (const cb of [...set]) {
48
+ for (const callback of [...set]) {
59
49
  try {
60
- cb(data);
50
+ callback(data);
61
51
  } catch (err) {
62
52
  console.error(
63
53
  '[absolutejs] angular HMR listener threw',
@@ -65,6 +55,17 @@ const installAngularHmrShim = (): AngularHmrBus => {
65
55
  );
66
56
  }
67
57
  }
58
+ },
59
+ off(event, callback) {
60
+ listeners.get(event)?.delete(callback);
61
+ },
62
+ on(event, callback) {
63
+ let set = listeners.get(event);
64
+ if (!set) {
65
+ set = new Set();
66
+ listeners.set(event, set);
67
+ }
68
+ set.add(callback);
68
69
  }
69
70
  };
70
71
 
@@ -75,14 +76,13 @@ if (typeof globalThis !== 'undefined' && !globalThis.__angularHmr) {
75
76
  globalThis.__angularHmr = installAngularHmrShim();
76
77
  }
77
78
 
78
- export const dispatchAngularComponentUpdate = (
79
+ export const dispatchAngularComponentRemount = (
79
80
  data: AngularComponentUpdate
80
81
  ) => {
81
- globalThis.__angularHmr?.dispatch('angular:component-update', data);
82
+ globalThis.__angularHmr?.dispatch('angular:component-remount', data);
82
83
  };
83
-
84
- export const dispatchAngularComponentRemount = (
84
+ export const dispatchAngularComponentUpdate = (
85
85
  data: AngularComponentUpdate
86
86
  ) => {
87
- globalThis.__angularHmr?.dispatch('angular:component-remount', data);
87
+ globalThis.__angularHmr?.dispatch('angular:component-update', data);
88
88
  };
@@ -76,6 +76,19 @@ type LiveInstance = {
76
76
  tNode: TNode;
77
77
  };
78
78
 
79
+ const isComponentClass = (value: unknown): value is ComponentClass =>
80
+ typeof value === 'function';
81
+
82
+ const isTNode = (value: unknown): value is TNode =>
83
+ typeof value === 'object' &&
84
+ value !== null &&
85
+ typeof Reflect.get(value, 'index') === 'number';
86
+
87
+ const isTView = (value: unknown): value is TView =>
88
+ typeof value === 'object' &&
89
+ value !== null &&
90
+ typeof Reflect.get(value, 'bindingStartIndex') === 'number';
91
+
79
92
  /* Walk the DOM looking for elements whose component instance is of
80
93
  * `Class`. Each match resolves to its parent LView + slot index via
81
94
  * the LContext stored on the host element under `__ngContext__`.
@@ -83,37 +96,38 @@ type LiveInstance = {
83
96
  * We walk DOM (not Angular's TRACKED_LVIEWS map) because (a)
84
97
  * TRACKED_LVIEWS isn't exported and (b) the DOM walk is bounded by
85
98
  * page size, which is fast enough for HMR. */
86
- const findLiveInstances = (Class: ComponentClass): LiveInstance[] => {
99
+ const findLiveInstances = (Class: ComponentClass) => {
87
100
  const results: LiveInstance[] = [];
88
101
  const elements = document.querySelectorAll('*');
89
- for (const el of Array.from(elements)) {
90
- const ctx = (el as unknown as Record<string, unknown>).__ngContext__;
102
+ for (const element of Array.from(elements)) {
103
+ const ctx = Reflect.get(element, '__ngContext__');
91
104
  if (typeof ctx !== 'object' || ctx === null) continue;
92
- const lContext = ctx as { lView?: LView; nodeIndex?: number };
93
- if (!lContext.lView || lContext.nodeIndex === undefined) continue;
105
+ const lView = Reflect.get(ctx, 'lView');
106
+ const nodeIndex = Reflect.get(ctx, 'nodeIndex');
107
+ if (!isLView(lView) || typeof nodeIndex !== 'number') continue;
94
108
 
95
- const slot = lContext.lView[lContext.nodeIndex];
109
+ const slot = lView[nodeIndex];
96
110
  if (!isLView(slot)) continue;
97
- const ownLView = slot as LView;
98
- const instance = ownLView[CONTEXT];
111
+ const instance = slot[CONTEXT];
99
112
  if (!(instance instanceof Class)) continue;
100
113
 
101
- const tNode = ownLView[T_HOST] as TNode | null;
102
- const host = ownLView[HOST] as Element | null;
103
- if (!tNode || !host) continue;
114
+ const tNode = slot[T_HOST];
115
+ const host = slot[HOST];
116
+ if (!isTNode(tNode) || !(host instanceof Element)) continue;
104
117
 
105
118
  // Avoid double-recording the same LView (multiple DOM elements
106
119
  // can land in the same component, all sharing __ngContext__)
107
- if (results.some((r) => r.oldLView === ownLView)) continue;
120
+ if (results.some((result) => result.oldLView === slot)) continue;
108
121
 
109
122
  results.push({
110
123
  host,
111
- oldLView: ownLView,
112
- parentLView: lContext.lView,
113
- slotIndex: lContext.nodeIndex,
124
+ oldLView: slot,
125
+ parentLView: lView,
126
+ slotIndex: nodeIndex,
114
127
  tNode
115
128
  });
116
129
  }
130
+
117
131
  return results;
118
132
  };
119
133
 
@@ -129,15 +143,14 @@ const createFreshAt = (
129
143
  newLView: LView;
130
144
  componentRef: ReturnType<AngularCoreNamespace['createComponent']>;
131
145
  } | null => {
132
- const w = window as unknown as {
133
- __ANGULAR_APP__?: { injector: unknown };
134
- };
135
- const envInjector = w.__ANGULAR_APP__?.injector;
146
+ const envInjector = window.__ANGULAR_APP__
147
+ ? Reflect.get(window.__ANGULAR_APP__, 'injector')
148
+ : undefined;
136
149
  if (!envInjector) return null;
137
150
 
138
151
  const ref = core.createComponent(Class, {
139
- hostElement,
140
- environmentInjector: envInjector
152
+ environmentInjector: envInjector,
153
+ hostElement
141
154
  });
142
155
 
143
156
  const newLView = ref.hostView._lView;
@@ -146,10 +159,11 @@ const createFreshAt = (
146
159
  // internal createComponent path. If it is missing, our slot
147
160
  // constants might be off; bail to caller for fallback.
148
161
  ref.destroy();
162
+
149
163
  return null;
150
164
  }
151
165
 
152
- return { instance: ref.instance, newLView, componentRef: ref };
166
+ return { componentRef: ref, instance: ref.instance, newLView };
153
167
  };
154
168
 
155
169
  /* Splice `newLView` into `parentLView` at `slotIndex`, replacing
@@ -168,23 +182,19 @@ const spliceLViewIntoParent = (
168
182
  target: LiveInstance,
169
183
  newLView: LView,
170
184
  newInstance: unknown
171
- ): void => {
185
+ ) => {
172
186
  const { parentLView, oldLView, slotIndex, tNode } = target;
173
187
  replaceLViewInTree(parentLView, oldLView, newLView, slotIndex);
174
188
  newLView[PARENT] = parentLView;
175
189
  newLView[T_HOST] = tNode;
176
190
 
177
191
  const oldInstance = oldLView[CONTEXT];
178
- const tNodeWithDirectiveRange = tNode as TNode & {
179
- directiveStart?: number;
180
- directiveEnd?: number;
181
- };
182
- const start = tNodeWithDirectiveRange.directiveStart;
183
- const end = tNodeWithDirectiveRange.directiveEnd;
192
+ const start = Reflect.get(tNode, 'directiveStart');
193
+ const end = Reflect.get(tNode, 'directiveEnd');
184
194
  if (typeof start === 'number' && typeof end === 'number') {
185
- for (let i = start; i < end; i++) {
186
- if (parentLView[i] === oldInstance) {
187
- parentLView[i] = newInstance;
195
+ for (let index = start; index < end; index++) {
196
+ if (parentLView[index] === oldInstance) {
197
+ parentLView[index] = newInstance;
188
198
  }
189
199
  }
190
200
  }
@@ -194,9 +204,9 @@ const spliceLViewIntoParent = (
194
204
  * listeners, and `inject(DestroyRef).onDestroy(...)` callbacks all
195
205
  * fire. Then mark the LView as destroyed so any subsequent
196
206
  * tree-walk skips it. */
197
- const teardownOldLView = (oldLView: LView): void => {
198
- const oldTView = oldLView[TVIEW] as TView | null;
199
- if (oldTView) {
207
+ const teardownOldLView = (oldLView: LView) => {
208
+ const oldTView = oldLView[TVIEW];
209
+ if (isTView(oldTView)) {
200
210
  executeOnDestroys(oldTView, oldLView);
201
211
  processCleanups(oldTView, oldLView);
202
212
  }
@@ -221,25 +231,35 @@ const teardownOldLView = (oldLView: LView): void => {
221
231
  * `def.inputs` metadata format (modern Angular):
222
232
  * - `{ propName: 'classFieldName' }` (simple alias)
223
233
  * - `{ propName: ['publicName', 'classFieldName', transformFn?] }` */
224
- const copyInputsFromOldToNew = (
225
- oldInstance: unknown,
226
- newInstance: unknown
227
- ): void => {
234
+ const copyInputsFromOldToNew = (oldInstance: unknown, newInstance: unknown) => {
228
235
  if (!oldInstance || !newInstance) return;
229
- const def = (newInstance as { constructor?: { ɵcmp?: unknown } })
230
- .constructor?.ɵcmp as { inputs?: Record<string, unknown> } | undefined;
231
- const inputs = def?.inputs;
232
- if (!inputs) return;
236
+ if (
237
+ (typeof oldInstance !== 'object' &&
238
+ typeof oldInstance !== 'function') ||
239
+ (typeof newInstance !== 'object' && typeof newInstance !== 'function')
240
+ ) {
241
+ return;
242
+ }
243
+ const constructor = Reflect.get(newInstance, 'constructor');
244
+ const definition =
245
+ typeof constructor === 'function'
246
+ ? Reflect.get(constructor, 'ɵcmp')
247
+ : undefined;
248
+ if (typeof definition !== 'object' || definition === null) return;
249
+ const inputs = Reflect.get(definition, 'inputs');
250
+ if (typeof inputs !== 'object' || inputs === null) return;
233
251
 
234
252
  // Modern Angular inputs format (since v17ish): the OBJECT KEY is
235
253
  // the class property name; the value is either a string (binding
236
254
  // name) or `[bindingName, flags, transformFn?]`. So the class
237
255
  // field name is just `Object.keys(inputs)`.
238
256
  for (const classField of Object.keys(inputs)) {
239
- const oldRec = oldInstance as Record<string, unknown>;
240
- const newRec = newInstance as Record<string, unknown>;
241
- if (classField in oldRec) {
242
- newRec[classField] = oldRec[classField];
257
+ if (classField in oldInstance) {
258
+ Reflect.set(
259
+ newInstance,
260
+ classField,
261
+ Reflect.get(oldInstance, classField)
262
+ );
243
263
  }
244
264
  }
245
265
  };
@@ -275,7 +295,7 @@ export const remountComponentClass = async (
275
295
  core: AngularCoreNamespace,
276
296
  className: string
277
297
  ): Promise<RemountResult> => {
278
- let FreshClass: ComponentClass = Class;
298
+ let FreshClass = Class;
279
299
  try {
280
300
  // `applyMetadata` from a recent fastHmr build returns a `_Fresh`
281
301
  // class with the new constructor + field initializers + the
@@ -289,13 +309,15 @@ export const remountComponentClass = async (
289
309
  namespaces,
290
310
  ...locals
291
311
  ]);
292
- if (typeof returned === 'function') {
293
- FreshClass = returned as ComponentClass;
312
+ if (isComponentClass(returned)) {
313
+ FreshClass = returned;
294
314
  }
295
315
  } catch (err) {
296
316
  return {
297
317
  className,
298
- error: `applyMetadata threw: ${(err as Error).message}`,
318
+ error: `applyMetadata threw: ${
319
+ err instanceof Error ? err.message : String(err)
320
+ }`,
299
321
  remounted: 0,
300
322
  skipped: 0
301
323
  };
@@ -343,11 +365,8 @@ export const remountComponentClass = async (
343
365
  // fresh creation. Without this tick, a remounted component
344
366
  // shows default field values until the user interacts and
345
367
  // triggers a stray CD elsewhere.
346
- const w = window as unknown as {
347
- __ANGULAR_APP__?: { tick?: () => void };
348
- };
349
368
  try {
350
- w.__ANGULAR_APP__?.tick?.();
369
+ window.__ANGULAR_APP__?.tick();
351
370
  } catch (err) {
352
371
  console.error(
353
372
  '[absolutejs] post-remount tick threw — partial state',
@@ -9,7 +9,6 @@ import type {} from '../../../types/globals';
9
9
  import { remountComponentClass, type RemountResult } from './angularRemount';
10
10
 
11
11
  declare global {
12
- // eslint-disable-next-line no-var
13
12
  var __absAngularRemount:
14
13
  | ((
15
14
  Class: new (...args: unknown[]) => unknown,
@@ -44,7 +43,7 @@ declare global {
44
43
 
45
44
  let installed = false;
46
45
 
47
- export const installAngularRemountGlobal = (): void => {
46
+ export const installAngularRemountGlobal = () => {
48
47
  if (installed) return;
49
48
  if (typeof globalThis === 'undefined') return;
50
49
  globalThis.__absAngularRemount = remountComponentClass;