@absolutejs/absolute 0.19.0-beta.1041 → 0.19.0-beta.1043
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.
- package/package.json +1 -1
- package/dist/angular/browser.js +0 -10358
- package/dist/angular/browser.js.map +0 -260
- package/dist/angular/components/constants.js +0 -101
- package/dist/angular/components/core/streamingSlotRegistrar.js +0 -58
- package/dist/angular/components/core/streamingSlotRegistry.js +0 -114
- package/dist/angular/components/defer-slot-payload.js +0 -6
- package/dist/angular/components/defer-slot-templates.directive.js +0 -44
- package/dist/angular/components/defer-slot.component.js +0 -152
- package/dist/angular/components/image.component.js +0 -202
- package/dist/angular/components/index.js +0 -4
- package/dist/angular/components/stream-slot.component.js +0 -102
- package/dist/angular/hmrPreserveCore.ts +0 -188
- package/dist/angular/index.js +0 -15793
- package/dist/angular/index.js.map +0 -299
- package/dist/angular/server.js +0 -6357
- package/dist/angular/server.js.map +0 -61
- package/dist/build.js +0 -27484
- package/dist/build.js.map +0 -146
- package/dist/cli/config/client.js +0 -527
- package/dist/cli/config/server.js +0 -37130
- package/dist/cli/htmx/htmx.min.js +0 -1
- package/dist/cli/index.js +0 -179275
- package/dist/client/index.js +0 -1267
- package/dist/client/index.js.map +0 -31
- package/dist/core/streamingSlotRegistrar.js +0 -138
- package/dist/core/streamingSlotRegistrar.js.map +0 -10
- package/dist/core/streamingSlotRegistry.js +0 -194
- package/dist/core/streamingSlotRegistry.js.map +0 -11
- package/dist/dev/client/constants.ts +0 -26
- package/dist/dev/client/cssUtils.ts +0 -311
- package/dist/dev/client/domDiff.ts +0 -226
- package/dist/dev/client/domState.ts +0 -423
- package/dist/dev/client/domTracker.ts +0 -61
- package/dist/dev/client/errorOverlay.ts +0 -445
- package/dist/dev/client/frameworkDetect.ts +0 -63
- package/dist/dev/client/handlers/angularHmrShim.ts +0 -88
- package/dist/dev/client/handlers/angularRemount.ts +0 -362
- package/dist/dev/client/handlers/angularRemountWiring.ts +0 -52
- package/dist/dev/client/handlers/html.ts +0 -364
- package/dist/dev/client/handlers/htmx.ts +0 -278
- package/dist/dev/client/handlers/react.ts +0 -108
- package/dist/dev/client/handlers/rebuild.ts +0 -153
- package/dist/dev/client/handlers/svelte.ts +0 -334
- package/dist/dev/client/handlers/vue.ts +0 -292
- package/dist/dev/client/headPatch.ts +0 -233
- package/dist/dev/client/hmrClient.ts +0 -352
- package/dist/dev/client/hmrState.ts +0 -14
- package/dist/dev/client/hmrToast.ts +0 -150
- package/dist/dev/client/moduleVersions.ts +0 -62
- package/dist/dev/client/reactRefreshSetup.ts +0 -31
- package/dist/dev/client/vendor/lview/lViewOps.ts +0 -196
- package/dist/dev/client/vendor/lview/slotConstants.ts +0 -44
- package/dist/dev/client/vendor/reactRefreshRuntime.d.ts +0 -12
- package/dist/dev/client/vendor/reactRefreshRuntime.js +0 -313
- package/dist/image-client/imageClient.js +0 -69
- package/dist/index.js +0 -36361
- package/dist/index.js.map +0 -320
- package/dist/islands/browser.js +0 -259
- package/dist/islands/browser.js.map +0 -15
- package/dist/islands/index.js +0 -2415
- package/dist/islands/index.js.map +0 -37
- package/dist/react/browser.js +0 -374
- package/dist/react/browser.js.map +0 -19
- package/dist/react/components/browser/index.js +0 -467
- package/dist/react/components/index.js +0 -684
- package/dist/react/components/index.js.map +0 -18
- package/dist/react/hooks/index.js +0 -285
- package/dist/react/hooks/index.js.map +0 -14
- package/dist/react/index.js +0 -4258
- package/dist/react/index.js.map +0 -56
- package/dist/react/jsxDevRuntimeCompat.js +0 -90
- package/dist/react/jsxDevRuntimeCompat.js.map +0 -10
- package/dist/react/router/browser.js +0 -95
- package/dist/react/router/browser.js.map +0 -10
- package/dist/react/router/index.js +0 -95
- package/dist/react/router/index.js.map +0 -10
- package/dist/react/server.js +0 -1895
- package/dist/react/server.js.map +0 -26
- package/dist/src/angular/Island.browser.d.ts +0 -34
- package/dist/src/angular/Island.d.ts +0 -29
- package/dist/src/angular/angularDeps.d.ts +0 -2
- package/dist/src/angular/angularPatch.d.ts +0 -1
- package/dist/src/angular/animationProviders.d.ts +0 -2
- package/dist/src/angular/browser.d.ts +0 -14
- package/dist/src/angular/components/constants.d.ts +0 -96
- package/dist/src/angular/components/defer-slot-payload.d.ts +0 -7
- package/dist/src/angular/components/defer-slot-templates.directive.d.ts +0 -21
- package/dist/src/angular/components/defer-slot.component.d.ts +0 -29
- package/dist/src/angular/components/image.component.d.ts +0 -42
- package/dist/src/angular/components/index.d.ts +0 -4
- package/dist/src/angular/components/stream-slot.component.d.ts +0 -20
- package/dist/src/angular/composables/index.d.ts +0 -6
- package/dist/src/angular/composables/usePageContext.d.ts +0 -16
- package/dist/src/angular/composables/useResource.d.ts +0 -57
- package/dist/src/angular/composables/useSubscription.d.ts +0 -33
- package/dist/src/angular/composables/useTimers.d.ts +0 -18
- package/dist/src/angular/createIsland.browser.d.ts +0 -2
- package/dist/src/angular/createIsland.d.ts +0 -2
- package/dist/src/angular/deterministicEnv.d.ts +0 -26
- package/dist/src/angular/hmrPreserveCore.d.ts +0 -21
- package/dist/src/angular/httpTransferCache.d.ts +0 -12
- package/dist/src/angular/index.d.ts +0 -14
- package/dist/src/angular/injectorPatch.d.ts +0 -1
- package/dist/src/angular/islandStore.d.ts +0 -9
- package/dist/src/angular/islands.d.ts +0 -4
- package/dist/src/angular/lowerDeferSyntax.d.ts +0 -18
- package/dist/src/angular/lowerServerIslands.d.ts +0 -1
- package/dist/src/angular/pageHandler.d.ts +0 -48
- package/dist/src/angular/pendingTask.d.ts +0 -1
- package/dist/src/angular/preserveAcrossHmr.d.ts +0 -12
- package/dist/src/angular/renderIsland.d.ts +0 -2
- package/dist/src/angular/requestProviders.d.ts +0 -5
- package/dist/src/angular/resolveAngularPackage.d.ts +0 -19
- package/dist/src/angular/routerRedirectProviders.d.ts +0 -6
- package/dist/src/angular/server.d.ts +0 -4
- package/dist/src/angular/ssrRender.d.ts +0 -13
- package/dist/src/angular/ssrSanitizer.d.ts +0 -3
- package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +0 -7
- package/dist/src/build/angularLinkerPlugin.d.ts +0 -29
- package/dist/src/build/buildAngularVendor.d.ts +0 -40
- package/dist/src/build/buildDepVendor.d.ts +0 -2
- package/dist/src/build/buildEmberVendor.d.ts +0 -24
- package/dist/src/build/buildReactVendor.d.ts +0 -8
- package/dist/src/build/buildSvelteVendor.d.ts +0 -6
- package/dist/src/build/buildVueVendor.d.ts +0 -6
- package/dist/src/build/chainInlineSourcemaps.d.ts +0 -13
- package/dist/src/build/compileAngular.d.ts +0 -40
- package/dist/src/build/compileEmber.d.ts +0 -43
- package/dist/src/build/compileSvelte.d.ts +0 -14
- package/dist/src/build/compileTailwind.d.ts +0 -5
- package/dist/src/build/compileVue.d.ts +0 -22
- package/dist/src/build/externalAssetPlugin.d.ts +0 -2
- package/dist/src/build/generateManifest.d.ts +0 -2
- package/dist/src/build/generateReactIndexes.d.ts +0 -2
- package/dist/src/build/htmlScriptHMRPlugin.d.ts +0 -13
- package/dist/src/build/index.d.ts +0 -2
- package/dist/src/build/islandEntries.d.ts +0 -32
- package/dist/src/build/islandRegistryTransform.d.ts +0 -17
- package/dist/src/build/nativeRewrite.d.ts +0 -5
- package/dist/src/build/optimizeHtmlImages.d.ts +0 -2
- package/dist/src/build/outputLogs.d.ts +0 -1
- package/dist/src/build/parseAngularConfigImports.d.ts +0 -9
- package/dist/src/build/parseVueSpaRoutes.d.ts +0 -20
- package/dist/src/build/resolvePackageImport.d.ts +0 -9
- package/dist/src/build/rewriteImports.d.ts +0 -8
- package/dist/src/build/rewriteImportsPlugin.d.ts +0 -48
- package/dist/src/build/rewriteReactImports.d.ts +0 -7
- package/dist/src/build/runAngularHandlerScan.d.ts +0 -7
- package/dist/src/build/scanAngularHandlerCalls.d.ts +0 -13
- package/dist/src/build/scanAngularPageRoutes.d.ts +0 -10
- package/dist/src/build/scanConventions.d.ts +0 -5
- package/dist/src/build/scanCssEntryPoints.d.ts +0 -1
- package/dist/src/build/scanEntryPoints.d.ts +0 -1
- package/dist/src/build/scanRouteRegistrations.d.ts +0 -23
- package/dist/src/build/scanVueSsrOnlyPages.d.ts +0 -6
- package/dist/src/build/staticIslandPages.d.ts +0 -9
- package/dist/src/build/stylePreprocessor.d.ts +0 -26
- package/dist/src/build/tailwindCompiler.d.ts +0 -8
- package/dist/src/build/updateAssetPaths.d.ts +0 -1
- package/dist/src/build/vendorEntrySource.d.ts +0 -1
- package/dist/src/build/verifyAngularCoreUniqueness.d.ts +0 -2
- package/dist/src/build/vueAutoRouterTransform.d.ts +0 -1
- package/dist/src/build/wrapHTMLScript.d.ts +0 -17
- package/dist/src/build.d.ts +0 -2
- package/dist/src/cli/add/dependencies.d.ts +0 -12
- package/dist/src/cli/cache.d.ts +0 -15
- package/dist/src/cli/config/absolute/AbsoluteConfigPanel.d.ts +0 -6
- package/dist/src/cli/config/absolute/editAbsoluteConfig.d.ts +0 -5
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +0 -14
- package/dist/src/cli/config/client.d.ts +0 -1
- package/dist/src/cli/config/configCert.d.ts +0 -12
- package/dist/src/cli/config/eslint/EslintPanel.d.ts +0 -6
- package/dist/src/cli/config/eslint/configAst.d.ts +0 -18
- package/dist/src/cli/config/eslint/editConfigRule.d.ts +0 -6
- package/dist/src/cli/config/eslint/eslintStyles.d.ts +0 -1
- package/dist/src/cli/config/eslint/resolveConfig.d.ts +0 -3
- package/dist/src/cli/config/eslint/serializeValue.d.ts +0 -9
- package/dist/src/cli/config/guards.d.ts +0 -4
- package/dist/src/cli/config/packageJson/PackageJsonPanel.d.ts +0 -6
- package/dist/src/cli/config/packageJson/editPackageJson.d.ts +0 -9
- package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +0 -9
- package/dist/src/cli/config/page/ConfigShell.d.ts +0 -6
- package/dist/src/cli/config/page/FieldEditor.d.ts +0 -9
- package/dist/src/cli/config/page/PanelHost.d.ts +0 -6
- package/dist/src/cli/config/page/configStyles.d.ts +0 -1
- package/dist/src/cli/config/panels.d.ts +0 -7
- package/dist/src/cli/config/prettier/PrettierPanel.d.ts +0 -6
- package/dist/src/cli/config/prettier/editPrettier.d.ts +0 -5
- package/dist/src/cli/config/prettier/resolvePrettier.d.ts +0 -11
- package/dist/src/cli/config/schema/fromJsonSchema.d.ts +0 -3
- package/dist/src/cli/config/schema/fromType.d.ts +0 -2
- package/dist/src/cli/config/schema/serialize.d.ts +0 -1
- package/dist/src/cli/config/server.d.ts +0 -298
- package/dist/src/cli/config/tsconfig/TsconfigPanel.d.ts +0 -6
- package/dist/src/cli/config/tsconfig/editTsconfig.d.ts +0 -5
- package/dist/src/cli/config/tsconfig/resolveTsconfig.d.ts +0 -8
- package/dist/src/cli/config/tsconfig/tsconfigStyles.d.ts +0 -1
- package/dist/src/cli/discoverInstances.d.ts +0 -5
- package/dist/src/cli/generate/componentTemplates.d.ts +0 -7
- package/dist/src/cli/generate/context.d.ts +0 -30
- package/dist/src/cli/generate/cssStrategy.d.ts +0 -20
- package/dist/src/cli/generate/frameworkKey.d.ts +0 -3
- package/dist/src/cli/generate/frameworks.d.ts +0 -40
- package/dist/src/cli/generate/generateApi.d.ts +0 -3
- package/dist/src/cli/generate/generateComponent.d.ts +0 -4
- package/dist/src/cli/generate/generatePage.d.ts +0 -4
- package/dist/src/cli/generate/naming.d.ts +0 -5
- package/dist/src/cli/generate/navData.d.ts +0 -10
- package/dist/src/cli/generate/outcome.d.ts +0 -17
- package/dist/src/cli/generate/pageTemplates.d.ts +0 -11
- package/dist/src/cli/generate/routeWiring.d.ts +0 -40
- package/dist/src/cli/generate/staticNav.d.ts +0 -5
- package/dist/src/cli/htmx/install.d.ts +0 -6
- package/dist/src/cli/index.d.ts +0 -2
- package/dist/src/cli/inspectData.d.ts +0 -11
- package/dist/src/cli/inspectTui.d.ts +0 -1
- package/dist/src/cli/instanceStatus.d.ts +0 -22
- package/dist/src/cli/interactive.d.ts +0 -2
- package/dist/src/cli/psTui.d.ts +0 -1
- package/dist/src/cli/scripts/add.d.ts +0 -1
- package/dist/src/cli/scripts/build.d.ts +0 -1
- package/dist/src/cli/scripts/compile.d.ts +0 -2
- package/dist/src/cli/scripts/dev.d.ts +0 -1
- package/dist/src/cli/scripts/doctor.d.ts +0 -1
- package/dist/src/cli/scripts/env.d.ts +0 -7
- package/dist/src/cli/scripts/eslint.d.ts +0 -16
- package/dist/src/cli/scripts/generate.d.ts +0 -1
- package/dist/src/cli/scripts/htmx.d.ts +0 -1
- package/dist/src/cli/scripts/info.d.ts +0 -1
- package/dist/src/cli/scripts/inspect.d.ts +0 -1
- package/dist/src/cli/scripts/logs.d.ts +0 -1
- package/dist/src/cli/scripts/ls.d.ts +0 -1
- package/dist/src/cli/scripts/mem.d.ts +0 -1
- package/dist/src/cli/scripts/prettier.d.ts +0 -3
- package/dist/src/cli/scripts/ps.d.ts +0 -1
- package/dist/src/cli/scripts/remove.d.ts +0 -1
- package/dist/src/cli/scripts/routes.d.ts +0 -1
- package/dist/src/cli/scripts/start.d.ts +0 -1
- package/dist/src/cli/scripts/telemetry.d.ts +0 -5
- package/dist/src/cli/scripts/tunnelRelay.d.ts +0 -9
- package/dist/src/cli/scripts/typecheck.d.ts +0 -1
- package/dist/src/cli/scripts/workspace.d.ts +0 -11
- package/dist/src/cli/telemetryEvent.d.ts +0 -1
- package/dist/src/cli/tuiPrimitives.d.ts +0 -14
- package/dist/src/cli/utils.d.ts +0 -15
- package/dist/src/cli/workspaceTui.d.ts +0 -44
- package/dist/src/client/hydrators/react.d.ts +0 -3
- package/dist/src/client/hydrators/svelte.d.ts +0 -2
- package/dist/src/client/hydrators/vue.d.ts +0 -2
- package/dist/src/client/index.d.ts +0 -4
- package/dist/src/client/islandResolver.d.ts +0 -2
- package/dist/src/client/islandRuntime.d.ts +0 -9
- package/dist/src/client/islandStore.d.ts +0 -22
- package/dist/src/client/preserveIslandMarkup.d.ts +0 -16
- package/dist/src/client/streamSwap.d.ts +0 -1
- package/dist/src/constants.d.ts +0 -96
- package/dist/src/core/angularServerModule.d.ts +0 -1
- package/dist/src/core/build.d.ts +0 -14
- package/dist/src/core/currentIslandRegistry.d.ts +0 -7
- package/dist/src/core/devBuild.d.ts +0 -23
- package/dist/src/core/devRouteRegistrationCallsite.d.ts +0 -4
- package/dist/src/core/devVendorPaths.d.ts +0 -17
- package/dist/src/core/index.d.ts +0 -7
- package/dist/src/core/islandManifest.d.ts +0 -3
- package/dist/src/core/islandMarkupAttributes.d.ts +0 -12
- package/dist/src/core/islandPageContext.d.ts +0 -12
- package/dist/src/core/islandSsr.d.ts +0 -6
- package/dist/src/core/islands.d.ts +0 -16
- package/dist/src/core/loadIslandRegistry.d.ts +0 -1
- package/dist/src/core/lookup.d.ts +0 -1
- package/dist/src/core/normalizeIslandProps.d.ts +0 -15
- package/dist/src/core/pageHandlers.d.ts +0 -5
- package/dist/src/core/prepare.d.ts +0 -417
- package/dist/src/core/prerender.d.ts +0 -31
- package/dist/src/core/renderIslandMarkup.d.ts +0 -13
- package/dist/src/core/responseEnhancers.d.ts +0 -10
- package/dist/src/core/staticStreaming.d.ts +0 -25
- package/dist/src/core/streamingSlotRegistrar.d.ts +0 -16
- package/dist/src/core/streamingSlotRegistry.d.ts +0 -2
- package/dist/src/core/streamingSlotWarningScope.d.ts +0 -4
- package/dist/src/core/svelteServerModule.d.ts +0 -1
- package/dist/src/core/vueServerModule.d.ts +0 -1
- package/dist/src/core/wrapPageHandlerWithStreamingSlots.d.ts +0 -2
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +0 -58
- package/dist/src/dev/angular/hmrCompiler.d.ts +0 -2
- package/dist/src/dev/angular/hmrImportGenerator.d.ts +0 -3
- package/dist/src/dev/angular/hmrInjectionPlugin.d.ts +0 -8
- package/dist/src/dev/angular/resolveOwningComponents.d.ts +0 -16
- package/dist/src/dev/angular/vendor/translator/api/ast_factory.d.ts +0 -363
- package/dist/src/dev/angular/vendor/translator/api/import_generator.d.ts +0 -49
- package/dist/src/dev/angular/vendor/translator/context.d.ts +0 -18
- package/dist/src/dev/angular/vendor/translator/translator.d.ts +0 -75
- package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +0 -12
- package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +0 -66
- package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +0 -13
- package/dist/src/dev/assetStore.d.ts +0 -8
- package/dist/src/dev/buildHMRClient.d.ts +0 -1
- package/dist/src/dev/clientManager.d.ts +0 -33
- package/dist/src/dev/configResolver.d.ts +0 -16
- package/dist/src/dev/dependencyGraph.d.ts +0 -10
- package/dist/src/dev/devCert.d.ts +0 -11
- package/dist/src/dev/fileHashTracker.d.ts +0 -2
- package/dist/src/dev/fileWatcher.d.ts +0 -4
- package/dist/src/dev/moduleMapper.d.ts +0 -27
- package/dist/src/dev/moduleServer.d.ts +0 -24
- package/dist/src/dev/moduleVersionTracker.d.ts +0 -7
- package/dist/src/dev/pathUtils.d.ts +0 -8
- package/dist/src/dev/reactComponentClassifier.d.ts +0 -2
- package/dist/src/dev/rebuildTrigger.d.ts +0 -11
- package/dist/src/dev/requestInspector.d.ts +0 -43
- package/dist/src/dev/serverEntryWatcher.d.ts +0 -5
- package/dist/src/dev/simpleHTMLHMR.d.ts +0 -4
- package/dist/src/dev/simpleHTMXHMR.d.ts +0 -4
- package/dist/src/dev/transformCache.d.ts +0 -22
- package/dist/src/dev/tunnel/client.d.ts +0 -20
- package/dist/src/dev/tunnel/protocol.d.ts +0 -85
- package/dist/src/dev/tunnel/relay.d.ts +0 -28
- package/dist/src/dev/webSocket.d.ts +0 -9
- package/dist/src/ember/browser.d.ts +0 -24
- package/dist/src/ember/index.d.ts +0 -2
- package/dist/src/ember/pageHandler.d.ts +0 -35
- package/dist/src/ember/server.d.ts +0 -2
- package/dist/src/index.d.ts +0 -7
- package/dist/src/islands/browser.d.ts +0 -3
- package/dist/src/islands/index.d.ts +0 -3
- package/dist/src/islands/pageMetadata.d.ts +0 -13
- package/dist/src/islands/sourceMetadata.d.ts +0 -10
- package/dist/src/plugins/devtoolsJson.d.ts +0 -58
- package/dist/src/plugins/hmr.d.ts +0 -163
- package/dist/src/plugins/imageOptimizer.d.ts +0 -67
- package/dist/src/plugins/index.d.ts +0 -3
- package/dist/src/plugins/networking.d.ts +0 -2
- package/dist/src/plugins/pageRouter.d.ts +0 -1
- package/dist/src/react/Island.browser.d.ts +0 -2
- package/dist/src/react/Island.d.ts +0 -2
- package/dist/src/react/bridgeInternals.d.ts +0 -1
- package/dist/src/react/browser.d.ts +0 -3
- package/dist/src/react/components/Head.d.ts +0 -2
- package/dist/src/react/components/Image.d.ts +0 -2
- package/dist/src/react/components/JsonLd.d.ts +0 -4
- package/dist/src/react/components/StreamSlot.browser.d.ts +0 -10
- package/dist/src/react/components/StreamSlot.d.ts +0 -10
- package/dist/src/react/components/SuspenseSlot.browser.d.ts +0 -22
- package/dist/src/react/components/SuspenseSlot.d.ts +0 -37
- package/dist/src/react/components/browser/index.d.ts +0 -5
- package/dist/src/react/components/index.d.ts +0 -5
- package/dist/src/react/createIsland.browser.d.ts +0 -2
- package/dist/src/react/createIsland.d.ts +0 -2
- package/dist/src/react/hooks/index.d.ts +0 -3
- package/dist/src/react/hooks/useIslandStore.d.ts +0 -3
- package/dist/src/react/hooks/useMediaQuery.d.ts +0 -7
- package/dist/src/react/index.d.ts +0 -4
- package/dist/src/react/jsxDevRuntimeCompat.d.ts +0 -8
- package/dist/src/react/pageHandler.d.ts +0 -25
- package/dist/src/react/router/UniversalRouter.d.ts +0 -43
- package/dist/src/react/router/browser.d.ts +0 -2
- package/dist/src/react/router/index.d.ts +0 -2
- package/dist/src/react/server.d.ts +0 -1
- package/dist/src/react/staticAnalyzeSpaRoutes.d.ts +0 -7
- package/dist/src/svelte/browser.d.ts +0 -4
- package/dist/src/svelte/createIsland.browser.d.ts +0 -2
- package/dist/src/svelte/createIsland.d.ts +0 -2
- package/dist/src/svelte/index.d.ts +0 -6
- package/dist/src/svelte/islandStore.d.ts +0 -5
- package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +0 -4
- package/dist/src/svelte/lowerIslandSyntax.d.ts +0 -4
- package/dist/src/svelte/pageHandler.d.ts +0 -28
- package/dist/src/svelte/renderIsland.d.ts +0 -2
- package/dist/src/svelte/renderToPipeableStream.d.ts +0 -12
- package/dist/src/svelte/renderToReadableStream.d.ts +0 -14
- package/dist/src/svelte/renderToString.d.ts +0 -9
- package/dist/src/svelte/resolveIslandHtml.browser.d.ts +0 -2
- package/dist/src/svelte/resolveIslandHtml.d.ts +0 -2
- package/dist/src/svelte/router/browser.d.ts +0 -4
- package/dist/src/svelte/router/goto.d.ts +0 -15
- package/dist/src/svelte/router/hashMode.d.ts +0 -16
- package/dist/src/svelte/router/index.d.ts +0 -4
- package/dist/src/svelte/router/matchPath.d.ts +0 -30
- package/dist/src/svelte/router/page.svelte.d.ts +0 -15
- package/dist/src/svelte/router/prefetchCache.d.ts +0 -17
- package/dist/src/svelte/router/pushState.d.ts +0 -13
- package/dist/src/svelte/router/viewTransitions.d.ts +0 -6
- package/dist/src/svelte/server.d.ts +0 -1
- package/dist/src/svelte/staticAnalyzeSpaRoutes.d.ts +0 -7
- package/dist/src/utils/buildDirectoryLock.d.ts +0 -28
- package/dist/src/utils/cleanStaleOutputs.d.ts +0 -1
- package/dist/src/utils/cleanup.d.ts +0 -9
- package/dist/src/utils/commonAncestor.d.ts +0 -1
- package/dist/src/utils/defineConfig.d.ts +0 -39
- package/dist/src/utils/defineConvention.d.ts +0 -3
- package/dist/src/utils/defineEnv.d.ts +0 -10
- package/dist/src/utils/escapeScriptContent.d.ts +0 -1
- package/dist/src/utils/formatBytes.d.ts +0 -2
- package/dist/src/utils/generateHeadElement.d.ts +0 -4
- package/dist/src/utils/generateSitemap.d.ts +0 -21
- package/dist/src/utils/generatedDir.d.ts +0 -3
- package/dist/src/utils/getDurationString.d.ts +0 -1
- package/dist/src/utils/getEnv.d.ts +0 -1
- package/dist/src/utils/imageClient.d.ts +0 -13
- package/dist/src/utils/imageProcessing.d.ts +0 -33
- package/dist/src/utils/index.d.ts +0 -11
- package/dist/src/utils/inlinePageCss.d.ts +0 -2
- package/dist/src/utils/instanceRegistry.d.ts +0 -13
- package/dist/src/utils/jsonLd.d.ts +0 -3
- package/dist/src/utils/loadConfig.d.ts +0 -55
- package/dist/src/utils/logger.d.ts +0 -56
- package/dist/src/utils/networking.d.ts +0 -2
- package/dist/src/utils/normalizePath.d.ts +0 -9
- package/dist/src/utils/portScan.d.ts +0 -22
- package/dist/src/utils/projectRoot.d.ts +0 -17
- package/dist/src/utils/registerClientScript.d.ts +0 -36
- package/dist/src/utils/resolveConvention.d.ts +0 -10
- package/dist/src/utils/resolveDevPort.d.ts +0 -24
- package/dist/src/utils/runtimeMode.d.ts +0 -3
- package/dist/src/utils/spaRouteCss.d.ts +0 -4
- package/dist/src/utils/spaRouteTypes.d.ts +0 -25
- package/dist/src/utils/ssrErrorPage.d.ts +0 -1
- package/dist/src/utils/startupBanner.d.ts +0 -10
- package/dist/src/utils/startupTimings.d.ts +0 -7
- package/dist/src/utils/streamingSlotMetricSink.d.ts +0 -18
- package/dist/src/utils/streamingSlots.d.ts +0 -76
- package/dist/src/utils/stringModifiers.d.ts +0 -3
- package/dist/src/utils/userAgentFunctions.d.ts +0 -1
- package/dist/src/utils/validateSafePath.d.ts +0 -1
- package/dist/src/vue/Island.browser.d.ts +0 -37
- package/dist/src/vue/Island.d.ts +0 -36
- package/dist/src/vue/browser.d.ts +0 -6
- package/dist/src/vue/components/Image.d.ts +0 -74
- package/dist/src/vue/components/StreamSlot.d.ts +0 -22
- package/dist/src/vue/components/SuspenseSlot.d.ts +0 -26
- package/dist/src/vue/components/index.d.ts +0 -3
- package/dist/src/vue/createIsland.browser.d.ts +0 -13
- package/dist/src/vue/createIsland.d.ts +0 -13
- package/dist/src/vue/defineVuePage.d.ts +0 -6
- package/dist/src/vue/index.d.ts +0 -9
- package/dist/src/vue/pageHandler.d.ts +0 -45
- package/dist/src/vue/routerRedirectProviders.d.ts +0 -45
- package/dist/src/vue/server.d.ts +0 -2
- package/dist/src/vue/staticAnalyzeSpaRoutes.d.ts +0 -7
- package/dist/src/vue/useIslandStore.d.ts +0 -3
- package/dist/svelte/browser.js +0 -309
- package/dist/svelte/browser.js.map +0 -19
- package/dist/svelte/components/AwaitSlot.svelte +0 -39
- package/dist/svelte/components/AwaitSlot.svelte.d.ts +0 -2
- package/dist/svelte/components/Head.svelte +0 -144
- package/dist/svelte/components/Head.svelte.d.ts +0 -2
- package/dist/svelte/components/Image.svelte +0 -164
- package/dist/svelte/components/Image.svelte.d.ts +0 -5
- package/dist/svelte/components/Island.svelte +0 -71
- package/dist/svelte/components/Island.svelte.d.ts +0 -5
- package/dist/svelte/components/JsonLd.svelte +0 -21
- package/dist/svelte/components/JsonLd.svelte.d.ts +0 -2
- package/dist/svelte/components/StreamSlot.svelte +0 -41
- package/dist/svelte/components/StreamSlot.svelte.d.ts +0 -2
- package/dist/svelte/index.js +0 -4371
- package/dist/svelte/index.js.map +0 -60
- package/dist/svelte/router/Link.svelte +0 -124
- package/dist/svelte/router/Link.svelte.d.ts +0 -21
- package/dist/svelte/router/Route.svelte +0 -54
- package/dist/svelte/router/Route.svelte.d.ts +0 -13
- package/dist/svelte/router/Router.svelte +0 -189
- package/dist/svelte/router/Router.svelte.d.ts +0 -16
- package/dist/svelte/router/browser.ts +0 -14
- package/dist/svelte/router/goto.ts +0 -89
- package/dist/svelte/router/hashMode.ts +0 -31
- package/dist/svelte/router/index.ts +0 -23
- package/dist/svelte/router/matchPath.ts +0 -136
- package/dist/svelte/router/page.d.ts +0 -15
- package/dist/svelte/router/page.js +0 -27
- package/dist/svelte/router/prefetchCache.ts +0 -85
- package/dist/svelte/router/pushState.ts +0 -35
- package/dist/svelte/router/viewTransitions.ts +0 -35
- package/dist/svelte/server.js +0 -2996
- package/dist/svelte/server.js.map +0 -33
- package/dist/types/absoluteConfig.d.ts +0 -22
- package/dist/types/angular.d.ts +0 -43
- package/dist/types/build.d.ts +0 -245
- package/dist/types/cli.d.ts +0 -71
- package/dist/types/client.d.ts +0 -70
- package/dist/types/config.d.ts +0 -50
- package/dist/types/conventions.d.ts +0 -26
- package/dist/types/ember.d.ts +0 -39
- package/dist/types/env.d.ts +0 -2
- package/dist/types/eslintConfig.d.ts +0 -68
- package/dist/types/globals.d.ts +0 -163
- package/dist/types/image.d.ts +0 -77
- package/dist/types/index.d.ts +0 -17
- package/dist/types/island.d.ts +0 -52
- package/dist/types/jsonLd.d.ts +0 -300
- package/dist/types/mediaQuery.d.ts +0 -9
- package/dist/types/messages.d.ts +0 -152
- package/dist/types/metadata.d.ts +0 -51
- package/dist/types/packageJson.d.ts +0 -74
- package/dist/types/packageJsonPanel.d.ts +0 -29
- package/dist/types/prettier.d.ts +0 -26
- package/dist/types/react.d.ts +0 -2
- package/dist/types/sitemap.d.ts +0 -24
- package/dist/types/style-module-shim.d.ts +0 -29
- package/dist/types/svelte.d.ts +0 -2
- package/dist/types/svelteRouter.d.ts +0 -65
- package/dist/types/svelteRouter.ts +0 -91
- package/dist/types/telemetry.d.ts +0 -15
- package/dist/types/tool.d.ts +0 -11
- package/dist/types/tsconfig.d.ts +0 -31
- package/dist/types/typeGuards.d.ts +0 -2
- package/dist/types/userAgentTypes.d.ts +0 -2
- package/dist/types/vue.d.ts +0 -56
- package/dist/types/websocket.d.ts +0 -6
- package/dist/vue/browser.js +0 -512
- package/dist/vue/browser.js.map +0 -22
- package/dist/vue/components/Image.js +0 -264
- package/dist/vue/components/Image.js.map +0 -12
- package/dist/vue/components/index.js +0 -571
- package/dist/vue/components/index.js.map +0 -15
- package/dist/vue/index.js +0 -5238
- package/dist/vue/index.js.map +0 -69
- package/dist/vue/server.js +0 -2251
- package/dist/vue/server.js.map +0 -32
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
import type {} from '../../types/globals';
|
|
2
|
-
/* AbsoluteJS Error Overlay - branded, per-framework, modern styling */
|
|
3
|
-
|
|
4
|
-
import type { ErrorOverlayOptions } from '../../types/client';
|
|
5
|
-
import { OVERLAY_FADE_DURATION_MS } from './constants';
|
|
6
|
-
|
|
7
|
-
let errorOverlayElement: HTMLDivElement | null = null;
|
|
8
|
-
let currentOverlayKind: 'compilation' | 'runtime' | null = null;
|
|
9
|
-
// Runtime errors accumulate so a second uncaught error in the same tick
|
|
10
|
-
// doesn't silently replace the first — the overlay shows nav buttons and
|
|
11
|
-
// a "N of M" badge so you can step through them.
|
|
12
|
-
const runtimeErrors: ErrorOverlayOptions[] = [];
|
|
13
|
-
let activeRuntimeIndex = 0;
|
|
14
|
-
let pendingCompilationOpts: ErrorOverlayOptions | null = null;
|
|
15
|
-
// Tracks which queue renderOverlay should pull from. Driven by
|
|
16
|
-
// showErrorOverlay BEFORE renderOverlay runs so the choice is unambiguous
|
|
17
|
-
// (currentOverlayKind reflects what's currently mounted, not what's queued).
|
|
18
|
-
let activeMode: 'runtime' | 'compilation' | null = null;
|
|
19
|
-
|
|
20
|
-
const frameworkLabels: Record<string, string> = {
|
|
21
|
-
angular: 'Angular',
|
|
22
|
-
assets: 'Assets',
|
|
23
|
-
html: 'HTML',
|
|
24
|
-
htmx: 'HTMX',
|
|
25
|
-
react: 'React',
|
|
26
|
-
svelte: 'Svelte',
|
|
27
|
-
unknown: 'Unknown',
|
|
28
|
-
vue: 'Vue'
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const frameworkColors: Record<string, string> = {
|
|
32
|
-
angular: '#dd0031',
|
|
33
|
-
assets: '#563d7c',
|
|
34
|
-
html: '#e34c26',
|
|
35
|
-
htmx: '#1a365d',
|
|
36
|
-
react: '#61dafb',
|
|
37
|
-
svelte: '#ff3e00',
|
|
38
|
-
unknown: '#94a3b8',
|
|
39
|
-
vue: '#42b883'
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const removeOverlayElement = () => {
|
|
43
|
-
if (errorOverlayElement && errorOverlayElement.parentNode) {
|
|
44
|
-
errorOverlayElement.parentNode.removeChild(errorOverlayElement);
|
|
45
|
-
}
|
|
46
|
-
errorOverlayElement = null;
|
|
47
|
-
currentOverlayKind = null;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const hideErrorOverlay = () => {
|
|
51
|
-
const elm = errorOverlayElement;
|
|
52
|
-
// Clearing on dismiss — if more errors arrive after this they get a
|
|
53
|
-
// fresh overlay, otherwise stale entries accumulate forever.
|
|
54
|
-
runtimeErrors.length = 0;
|
|
55
|
-
activeRuntimeIndex = 0;
|
|
56
|
-
pendingCompilationOpts = null;
|
|
57
|
-
activeMode = null;
|
|
58
|
-
if (!elm || !elm.parentNode) {
|
|
59
|
-
removeOverlayElement();
|
|
60
|
-
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
elm.style.transition = 'opacity 150ms ease-out';
|
|
64
|
-
elm.style.opacity = '0';
|
|
65
|
-
errorOverlayElement = null;
|
|
66
|
-
currentOverlayKind = null;
|
|
67
|
-
setTimeout(() => {
|
|
68
|
-
if (elm.parentNode) elm.parentNode.removeChild(elm);
|
|
69
|
-
}, OVERLAY_FADE_DURATION_MS);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const isRuntimeErrorOverlay = () => currentOverlayKind === 'runtime';
|
|
73
|
-
|
|
74
|
-
const sectionLabelStyle =
|
|
75
|
-
'font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:#94a3b8;margin-bottom:8px;';
|
|
76
|
-
const codeBlockStyle =
|
|
77
|
-
'margin:0;padding:14px 18px;background:rgba(15,23,42,0.8);border-radius:10px;border:1px solid rgba(71,85,105,0.4);color:#cbd5e1;font-size:12.5px;line-height:1.55;overflow-x:auto;white-space:pre;font-family:inherit;';
|
|
78
|
-
|
|
79
|
-
const buildLocationSection = (
|
|
80
|
-
file: string | undefined,
|
|
81
|
-
line: number | undefined,
|
|
82
|
-
column: number | undefined,
|
|
83
|
-
lineText: string | undefined
|
|
84
|
-
) => {
|
|
85
|
-
if (!file && line === undefined && column === undefined && !lineText) {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const locSection = document.createElement('div');
|
|
90
|
-
locSection.style.cssText = 'margin-bottom:20px;';
|
|
91
|
-
|
|
92
|
-
const locLabel = document.createElement('div');
|
|
93
|
-
locLabel.style.cssText = sectionLabelStyle;
|
|
94
|
-
locLabel.textContent = 'Where';
|
|
95
|
-
locSection.appendChild(locLabel);
|
|
96
|
-
|
|
97
|
-
const locParts: string[] = [];
|
|
98
|
-
if (file) locParts.push(file);
|
|
99
|
-
if (line !== undefined) locParts.push(String(line));
|
|
100
|
-
if (column !== undefined) locParts.push(String(column));
|
|
101
|
-
const loc = locParts.join(':') || 'Unknown location';
|
|
102
|
-
|
|
103
|
-
const locEl = document.createElement('div');
|
|
104
|
-
locEl.style.cssText =
|
|
105
|
-
'padding:12px 18px;background:rgba(71,85,105,0.3);border-radius:10px;border:1px solid rgba(71,85,105,0.4);color:#cbd5e1;font-size:13px;word-break:break-all;';
|
|
106
|
-
locEl.textContent = loc;
|
|
107
|
-
locSection.appendChild(locEl);
|
|
108
|
-
|
|
109
|
-
if (lineText) {
|
|
110
|
-
const codeBlock = document.createElement('pre');
|
|
111
|
-
codeBlock.style.cssText = `${codeBlockStyle }margin-top:8px;`;
|
|
112
|
-
codeBlock.textContent = lineText;
|
|
113
|
-
locSection.appendChild(codeBlock);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return locSection;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
// Strip the leading `${ErrorName}: ${message}` line from a stack if it just
|
|
120
|
-
// repeats what's already shown in the "What went wrong" panel — keeps the
|
|
121
|
-
// stack panel focused on frames.
|
|
122
|
-
const cleanStack = (message: string, stack: string) => {
|
|
123
|
-
const firstNewline = stack.indexOf('\n');
|
|
124
|
-
if (firstNewline === -1) return stack;
|
|
125
|
-
const head = stack.slice(0, firstNewline).trim();
|
|
126
|
-
if (head === message || head.endsWith(`: ${message}`)) {
|
|
127
|
-
return stack.slice(firstNewline + 1).replace(/^\n+/, '');
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return stack;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const buildStackSection = (stack: string | undefined, message: string) => {
|
|
134
|
-
if (!stack) return null;
|
|
135
|
-
const cleaned = cleanStack(message, stack);
|
|
136
|
-
if (!cleaned.trim()) return null;
|
|
137
|
-
const section = document.createElement('div');
|
|
138
|
-
section.style.cssText = 'margin-bottom:20px;';
|
|
139
|
-
const label = document.createElement('div');
|
|
140
|
-
label.style.cssText = sectionLabelStyle;
|
|
141
|
-
label.textContent = 'Stack';
|
|
142
|
-
section.appendChild(label);
|
|
143
|
-
const pre = document.createElement('pre');
|
|
144
|
-
pre.style.cssText = `${codeBlockStyle }max-height:300px;overflow-y:auto;`;
|
|
145
|
-
pre.textContent = cleaned;
|
|
146
|
-
section.appendChild(pre);
|
|
147
|
-
|
|
148
|
-
return section;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
// Reads the live document for every <script src> currently mounted.
|
|
152
|
-
// Most useful diagnostic for "I'm seeing a chunk hash that no longer
|
|
153
|
-
// exists on disk" — confirms which bundle the browser actually loaded.
|
|
154
|
-
const collectLoadedScripts = () => {
|
|
155
|
-
const scripts = Array.from(document.querySelectorAll('script[src]'));
|
|
156
|
-
const urls: string[] = [];
|
|
157
|
-
for (const script of scripts) {
|
|
158
|
-
const {src} = (script as HTMLScriptElement);
|
|
159
|
-
if (!src) continue;
|
|
160
|
-
// Filter to JS we serve — vendor chunks, generated indexes, root
|
|
161
|
-
// chunk-XXX.js outputs. Skip user-pasted CDN scripts and the like.
|
|
162
|
-
if (
|
|
163
|
-
src.includes('/vendor/') ||
|
|
164
|
-
src.includes('/generated/') ||
|
|
165
|
-
/\/chunk-[a-z0-9]+\.js(\?|$)/i.test(src) ||
|
|
166
|
-
src.includes('/_src_indexes/')
|
|
167
|
-
) {
|
|
168
|
-
urls.push(src);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
return urls;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
const buildDiagnosticsSection = () => {
|
|
176
|
-
const section = document.createElement('div');
|
|
177
|
-
section.style.cssText = 'margin-bottom:20px;';
|
|
178
|
-
const label = document.createElement('div');
|
|
179
|
-
label.style.cssText = sectionLabelStyle;
|
|
180
|
-
label.textContent = 'Diagnostics';
|
|
181
|
-
section.appendChild(label);
|
|
182
|
-
|
|
183
|
-
const lines: string[] = [];
|
|
184
|
-
lines.push(`Page URL: ${window.location.href}`);
|
|
185
|
-
const ua = navigator.userAgent;
|
|
186
|
-
lines.push(`User agent: ${ua}`);
|
|
187
|
-
const scripts = collectLoadedScripts();
|
|
188
|
-
if (scripts.length > 0) {
|
|
189
|
-
lines.push('');
|
|
190
|
-
lines.push(`Loaded chunks (${scripts.length}):`);
|
|
191
|
-
for (const url of scripts) {
|
|
192
|
-
// Strip origin so the chunk hash is the focal point.
|
|
193
|
-
lines.push(` ${url.replace(window.location.origin, '') || url}`);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
const pre = document.createElement('pre');
|
|
198
|
-
pre.style.cssText = `${codeBlockStyle }max-height:200px;overflow-y:auto;`;
|
|
199
|
-
pre.textContent = lines.join('\n');
|
|
200
|
-
section.appendChild(pre);
|
|
201
|
-
|
|
202
|
-
return section;
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
const buildErrorMessageSection = (message: string) => {
|
|
206
|
-
const errorSection = document.createElement('div');
|
|
207
|
-
errorSection.style.cssText = 'margin-bottom:20px;';
|
|
208
|
-
const errorLabel = document.createElement('div');
|
|
209
|
-
errorLabel.style.cssText = sectionLabelStyle;
|
|
210
|
-
errorLabel.textContent = 'What went wrong';
|
|
211
|
-
errorSection.appendChild(errorLabel);
|
|
212
|
-
const msgEl = document.createElement('pre');
|
|
213
|
-
msgEl.style.cssText =
|
|
214
|
-
'margin:0;padding:16px 20px;background:rgba(239,68,68,0.12);border:1px solid rgba(239,68,68,0.25);border-radius:10px;overflow-x:auto;white-space:pre-wrap;word-break:break-word;color:#fca5a5;font-size:13px;line-height:1.5;font-family:inherit;';
|
|
215
|
-
msgEl.textContent = message;
|
|
216
|
-
errorSection.appendChild(msgEl);
|
|
217
|
-
|
|
218
|
-
return errorSection;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
const formatErrorForCopy = (opts: ErrorOverlayOptions) => {
|
|
222
|
-
const lines: string[] = [];
|
|
223
|
-
lines.push(
|
|
224
|
-
`# ${opts.kind === 'runtime' ? 'Runtime' : 'Compilation'} error`
|
|
225
|
-
);
|
|
226
|
-
if (opts.framework) lines.push(`Framework: ${opts.framework}`);
|
|
227
|
-
lines.push('');
|
|
228
|
-
lines.push('## Message');
|
|
229
|
-
lines.push(opts.message || '(no message)');
|
|
230
|
-
if (opts.file || opts.line !== undefined) {
|
|
231
|
-
lines.push('');
|
|
232
|
-
lines.push('## Where');
|
|
233
|
-
const locParts: string[] = [];
|
|
234
|
-
if (opts.file) locParts.push(opts.file);
|
|
235
|
-
if (opts.line !== undefined) locParts.push(String(opts.line));
|
|
236
|
-
if (opts.column !== undefined) locParts.push(String(opts.column));
|
|
237
|
-
lines.push(locParts.join(':'));
|
|
238
|
-
if (opts.lineText) {
|
|
239
|
-
lines.push('');
|
|
240
|
-
lines.push(opts.lineText);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
if (opts.stack) {
|
|
244
|
-
lines.push('');
|
|
245
|
-
lines.push('## Stack');
|
|
246
|
-
lines.push(cleanStack(opts.message || '', opts.stack));
|
|
247
|
-
}
|
|
248
|
-
lines.push('');
|
|
249
|
-
lines.push('## Diagnostics');
|
|
250
|
-
lines.push(`Page URL: ${window.location.href}`);
|
|
251
|
-
lines.push(`User agent: ${navigator.userAgent}`);
|
|
252
|
-
const scripts = collectLoadedScripts();
|
|
253
|
-
if (scripts.length > 0) {
|
|
254
|
-
lines.push('');
|
|
255
|
-
lines.push(`Loaded chunks (${scripts.length}):`);
|
|
256
|
-
for (const url of scripts) {
|
|
257
|
-
lines.push(` ${url.replace(window.location.origin, '') || url}`);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
return lines.join('\n');
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
const renderOverlay = () => {
|
|
265
|
-
const opts =
|
|
266
|
-
activeMode === 'runtime'
|
|
267
|
-
? runtimeErrors[activeRuntimeIndex]
|
|
268
|
-
: pendingCompilationOpts;
|
|
269
|
-
if (!opts) return;
|
|
270
|
-
const message = opts.message || 'Build failed';
|
|
271
|
-
const { file, line, column, lineText, stack } = opts;
|
|
272
|
-
const framework = (opts.framework || 'unknown').toLowerCase();
|
|
273
|
-
const frameworkLabel = frameworkLabels[framework] || framework;
|
|
274
|
-
const accent = frameworkColors[framework] || '#94a3b8';
|
|
275
|
-
|
|
276
|
-
removeOverlayElement();
|
|
277
|
-
currentOverlayKind = opts.kind || 'compilation';
|
|
278
|
-
|
|
279
|
-
const overlay = document.createElement('div');
|
|
280
|
-
overlay.id = 'absolutejs-error-overlay';
|
|
281
|
-
overlay.setAttribute('data-hmr-overlay', 'true');
|
|
282
|
-
overlay.style.cssText =
|
|
283
|
-
'position:fixed;inset:0;z-index:2147483647;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,rgba(30,41,59,0.98) 100%);backdrop-filter:blur(12px);color:#e2e8f0;font-family:"JetBrains Mono","Fira Code",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;line-height:1.6;overflow:auto;padding:32px;box-sizing:border-box;display:flex;align-items:flex-start;justify-content:center;';
|
|
284
|
-
|
|
285
|
-
const card = document.createElement('div');
|
|
286
|
-
card.style.cssText =
|
|
287
|
-
'max-width:780px;width:100%;background:rgba(30,41,59,0.6);border:1px solid rgba(71,85,105,0.5);border-radius:16px;box-shadow:0 25px 50px -12px rgba(0,0,0,0.5),0 0 0 1px rgba(255,255,255,0.05);overflow:hidden;';
|
|
288
|
-
|
|
289
|
-
const header = document.createElement('div');
|
|
290
|
-
header.style.cssText =
|
|
291
|
-
'display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;background:rgba(15,23,42,0.5);border-bottom:1px solid rgba(71,85,105,0.4);';
|
|
292
|
-
header.innerHTML = `<div style="display:flex;align-items:center;gap:12px;"><span style="font-weight:700;font-size:20px;color:#fff;letter-spacing:-0.02em;">AbsoluteJS</span><span style="padding:5px 10px;border-radius:8px;font-size:12px;font-weight:600;background:${
|
|
293
|
-
accent
|
|
294
|
-
};color:#fff;opacity:0.95;box-shadow:0 2px 4px rgba(0,0,0,0.2);">${
|
|
295
|
-
frameworkLabel
|
|
296
|
-
}</span></div><span style="color:#94a3b8;font-size:13px;font-weight:500;">${
|
|
297
|
-
opts.kind === 'runtime' ? 'Runtime Error' : 'Compilation Error'
|
|
298
|
-
}</span>`;
|
|
299
|
-
card.appendChild(header);
|
|
300
|
-
|
|
301
|
-
const content = document.createElement('div');
|
|
302
|
-
content.style.cssText = 'padding:24px;';
|
|
303
|
-
|
|
304
|
-
// Multi-error nav: visible only when more than one runtime error has
|
|
305
|
-
// fired since the last dismiss. Compilation errors always replace, so
|
|
306
|
-
// they never need this row.
|
|
307
|
-
if (activeMode === 'runtime' && runtimeErrors.length > 1) {
|
|
308
|
-
const navRow = document.createElement('div');
|
|
309
|
-
navRow.style.cssText =
|
|
310
|
-
'display:flex;align-items:center;gap:12px;margin-bottom:20px;padding:10px 14px;background:rgba(71,85,105,0.25);border-radius:10px;border:1px solid rgba(71,85,105,0.4);';
|
|
311
|
-
const prev = document.createElement('button');
|
|
312
|
-
prev.textContent = '◀';
|
|
313
|
-
prev.style.cssText =
|
|
314
|
-
'padding:4px 10px;background:rgba(15,23,42,0.6);color:#cbd5e1;border:1px solid rgba(71,85,105,0.6);border-radius:6px;font-size:13px;cursor:pointer;font-family:inherit;';
|
|
315
|
-
prev.disabled = activeRuntimeIndex === 0;
|
|
316
|
-
if (prev.disabled) prev.style.opacity = '0.4';
|
|
317
|
-
prev.onclick = () => {
|
|
318
|
-
if (activeRuntimeIndex > 0) {
|
|
319
|
-
activeRuntimeIndex -= 1;
|
|
320
|
-
renderOverlay();
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
const next = document.createElement('button');
|
|
324
|
-
next.textContent = '▶';
|
|
325
|
-
next.style.cssText = prev.style.cssText;
|
|
326
|
-
next.disabled = activeRuntimeIndex >= runtimeErrors.length - 1;
|
|
327
|
-
if (next.disabled) next.style.opacity = '0.4';
|
|
328
|
-
next.onclick = () => {
|
|
329
|
-
if (activeRuntimeIndex < runtimeErrors.length - 1) {
|
|
330
|
-
activeRuntimeIndex += 1;
|
|
331
|
-
renderOverlay();
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
const counter = document.createElement('span');
|
|
335
|
-
counter.style.cssText = 'color:#cbd5e1;font-size:13px;';
|
|
336
|
-
counter.textContent = `Error ${activeRuntimeIndex + 1} of ${runtimeErrors.length}`;
|
|
337
|
-
navRow.appendChild(prev);
|
|
338
|
-
navRow.appendChild(next);
|
|
339
|
-
navRow.appendChild(counter);
|
|
340
|
-
content.appendChild(navRow);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
content.appendChild(buildErrorMessageSection(message));
|
|
344
|
-
const locSection = buildLocationSection(file, line, column, lineText);
|
|
345
|
-
if (locSection) content.appendChild(locSection);
|
|
346
|
-
const stackSection = buildStackSection(stack, message);
|
|
347
|
-
if (stackSection) content.appendChild(stackSection);
|
|
348
|
-
if (activeMode === 'runtime') {
|
|
349
|
-
content.appendChild(buildDiagnosticsSection());
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
const footer = document.createElement('div');
|
|
353
|
-
footer.style.cssText =
|
|
354
|
-
'display:flex;justify-content:flex-end;gap:10px;padding-top:8px;';
|
|
355
|
-
|
|
356
|
-
const copy = document.createElement('button');
|
|
357
|
-
copy.textContent = 'Copy';
|
|
358
|
-
copy.style.cssText =
|
|
359
|
-
'padding:10px 16px;background:rgba(71,85,105,0.4);color:#e2e8f0;border:1px solid rgba(71,85,105,0.6);border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:opacity 0.15s,transform 0.15s;';
|
|
360
|
-
copy.onmouseover = () => {
|
|
361
|
-
copy.style.opacity = '0.85';
|
|
362
|
-
};
|
|
363
|
-
copy.onmouseout = () => {
|
|
364
|
-
copy.style.opacity = '1';
|
|
365
|
-
};
|
|
366
|
-
copy.onclick = async () => {
|
|
367
|
-
const text = formatErrorForCopy(opts);
|
|
368
|
-
try {
|
|
369
|
-
await navigator.clipboard.writeText(text);
|
|
370
|
-
copy.textContent = 'Copied';
|
|
371
|
-
setTimeout(() => {
|
|
372
|
-
copy.textContent = 'Copy';
|
|
373
|
-
}, 1500);
|
|
374
|
-
} catch {
|
|
375
|
-
// Clipboard API requires a user gesture + permissions; fall back
|
|
376
|
-
// 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();
|
|
383
|
-
try {
|
|
384
|
-
document.execCommand('copy');
|
|
385
|
-
copy.textContent = 'Copied';
|
|
386
|
-
setTimeout(() => {
|
|
387
|
-
copy.textContent = 'Copy';
|
|
388
|
-
}, 1500);
|
|
389
|
-
} catch {
|
|
390
|
-
copy.textContent = 'Copy failed';
|
|
391
|
-
}
|
|
392
|
-
document.body.removeChild(ta);
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
footer.appendChild(copy);
|
|
396
|
-
|
|
397
|
-
const dismiss = document.createElement('button');
|
|
398
|
-
dismiss.textContent = 'Dismiss';
|
|
399
|
-
dismiss.style.cssText = `padding:10px 20px;background:${
|
|
400
|
-
accent
|
|
401
|
-
};color:#fff;border:none;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;box-shadow:0 2px 8px rgba(0,0,0,0.2);transition:opacity 0.15s,transform 0.15s;`;
|
|
402
|
-
dismiss.onmouseover = () => {
|
|
403
|
-
dismiss.style.opacity = '0.9';
|
|
404
|
-
dismiss.style.transform = 'translateY(-1px)';
|
|
405
|
-
};
|
|
406
|
-
dismiss.onmouseout = () => {
|
|
407
|
-
dismiss.style.opacity = '1';
|
|
408
|
-
dismiss.style.transform = 'translateY(0)';
|
|
409
|
-
};
|
|
410
|
-
dismiss.onclick = hideErrorOverlay;
|
|
411
|
-
footer.appendChild(dismiss);
|
|
412
|
-
content.appendChild(footer);
|
|
413
|
-
card.appendChild(content);
|
|
414
|
-
overlay.appendChild(card);
|
|
415
|
-
if (!document.body) return;
|
|
416
|
-
document.body.appendChild(overlay);
|
|
417
|
-
errorOverlayElement = overlay;
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
export const showErrorOverlay = (opts: ErrorOverlayOptions) => {
|
|
421
|
-
const kind = opts.kind || 'compilation';
|
|
422
|
-
activeMode = kind;
|
|
423
|
-
if (kind === 'runtime') {
|
|
424
|
-
// Suppress duplicates — Angular and other frameworks often re-throw
|
|
425
|
-
// the same error from multiple async boundaries (zone, scheduler,
|
|
426
|
-
// resolver). Identifying by message+stack catches the common case
|
|
427
|
-
// without needing structured equality.
|
|
428
|
-
const sig = `${opts.message ?? ''}::${opts.stack ?? ''}`;
|
|
429
|
-
const isDup = runtimeErrors.some(
|
|
430
|
-
(prev) => `${prev.message ?? ''}::${prev.stack ?? ''}` === sig
|
|
431
|
-
);
|
|
432
|
-
if (!isDup) {
|
|
433
|
-
runtimeErrors.push(opts);
|
|
434
|
-
activeRuntimeIndex = runtimeErrors.length - 1;
|
|
435
|
-
}
|
|
436
|
-
} else {
|
|
437
|
-
pendingCompilationOpts = opts;
|
|
438
|
-
// Compilation errors are global build state — reset runtime queue
|
|
439
|
-
// since old runtime errors from before the build attempt aren't
|
|
440
|
-
// actionable anymore.
|
|
441
|
-
runtimeErrors.length = 0;
|
|
442
|
-
activeRuntimeIndex = 0;
|
|
443
|
-
}
|
|
444
|
-
renderOverlay();
|
|
445
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type {} from '../../types/globals';
|
|
2
|
-
/* Framework detection and manifest lookup utilities */
|
|
3
|
-
|
|
4
|
-
export const detectCurrentFramework = () => {
|
|
5
|
-
if (window.__HMR_FRAMEWORK__) return window.__HMR_FRAMEWORK__;
|
|
6
|
-
if (window.__REACT_ROOT__) return 'react';
|
|
7
|
-
const path = window.location.pathname;
|
|
8
|
-
if (path === '/vue' || path.startsWith('/vue/')) return 'vue';
|
|
9
|
-
if (path === '/svelte' || path.startsWith('/svelte/')) return 'svelte';
|
|
10
|
-
if (path === '/angular' || path.startsWith('/angular/')) return 'angular';
|
|
11
|
-
if (path === '/htmx' || path.startsWith('/htmx/')) return 'htmx';
|
|
12
|
-
if (path === '/html' || path.startsWith('/html/')) return 'html';
|
|
13
|
-
if (path === '/react' || path.startsWith('/react/')) return 'react';
|
|
14
|
-
|
|
15
|
-
return null;
|
|
16
|
-
};
|
|
17
|
-
export const findIndexPath = (
|
|
18
|
-
manifest: Record<string, string> | undefined,
|
|
19
|
-
sourceFile: string | undefined,
|
|
20
|
-
framework: string
|
|
21
|
-
) => {
|
|
22
|
-
if (!manifest) return null;
|
|
23
|
-
|
|
24
|
-
if (sourceFile) {
|
|
25
|
-
const componentName = getComponentNameFromPath(sourceFile);
|
|
26
|
-
const indexKey = componentName ? `${componentName}Index` : null;
|
|
27
|
-
if (indexKey && manifest[indexKey]) {
|
|
28
|
-
return manifest[indexKey];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const frameworkPatterns: Record<string, RegExp> = {
|
|
33
|
-
angular: /angular/i,
|
|
34
|
-
react: /react/i,
|
|
35
|
-
svelte: /svelte/i,
|
|
36
|
-
vue: /vue/i
|
|
37
|
-
};
|
|
38
|
-
const pattern = frameworkPatterns[framework];
|
|
39
|
-
|
|
40
|
-
for (const key in manifest) {
|
|
41
|
-
const value = manifest[key];
|
|
42
|
-
if (
|
|
43
|
-
key.endsWith('Index') &&
|
|
44
|
-
value &&
|
|
45
|
-
(!pattern || pattern.test(key) || value.includes(`/${framework}/`))
|
|
46
|
-
) {
|
|
47
|
-
return value;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return null;
|
|
52
|
-
};
|
|
53
|
-
export const getComponentNameFromPath = (filePath: string) => {
|
|
54
|
-
if (!filePath) return null;
|
|
55
|
-
const parts = filePath.replace(/\\/g, '/').split('/');
|
|
56
|
-
const fileName = parts[parts.length - 1] || '';
|
|
57
|
-
const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|html)$/, '');
|
|
58
|
-
|
|
59
|
-
return baseName
|
|
60
|
-
.split(/[-_]/)
|
|
61
|
-
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
62
|
-
.join('');
|
|
63
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import type {} from '../../../types/globals';
|
|
2
|
-
/* `globalThis.__angularHmr` runtime shim.
|
|
3
|
-
*
|
|
4
|
-
* The HMR injection plugin
|
|
5
|
-
* (`src/dev/angular/hmrInjectionPlugin.ts`) appends per-component
|
|
6
|
-
* `__ng_hmr_load` blocks that subscribe via
|
|
7
|
-
* `globalThis.__angularHmr.on('angular:component-update', cb)`.
|
|
8
|
-
* This file installs that bus.
|
|
9
|
-
*
|
|
10
|
-
* It must run before any component chunk does — the injected blocks
|
|
11
|
-
* `if (… && globalThis.__angularHmr.on)` no-op if the shim isn't
|
|
12
|
-
* defined yet, so a registration would silently miss. We keep the
|
|
13
|
-
* shim setup synchronous + at module scope so it's installed during
|
|
14
|
-
* `hmrClient.ts`'s import-evaluation pass, before page chunks load. */
|
|
15
|
-
|
|
16
|
-
export type AngularHmrEvent =
|
|
17
|
-
| 'angular:component-update'
|
|
18
|
-
| 'angular:component-remount';
|
|
19
|
-
export type AngularComponentUpdate = {
|
|
20
|
-
id: string;
|
|
21
|
-
timestamp: number;
|
|
22
|
-
};
|
|
23
|
-
export type AngularHmrListener = (data: AngularComponentUpdate) => void;
|
|
24
|
-
|
|
25
|
-
type AngularHmrBus = {
|
|
26
|
-
on(event: AngularHmrEvent, cb: AngularHmrListener): void;
|
|
27
|
-
off(event: AngularHmrEvent, cb: AngularHmrListener): void;
|
|
28
|
-
dispatch(event: AngularHmrEvent, data: AngularComponentUpdate): void;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
declare global {
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- Window augmentation requires interface merging
|
|
33
|
-
interface Window {
|
|
34
|
-
__angularHmr?: AngularHmrBus;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
var __angularHmr: AngularHmrBus | undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const installAngularHmrShim = () => {
|
|
41
|
-
const listeners = new Map<AngularHmrEvent, Set<AngularHmrListener>>();
|
|
42
|
-
|
|
43
|
-
const bus: AngularHmrBus = {
|
|
44
|
-
dispatch(event, data) {
|
|
45
|
-
const set = listeners.get(event);
|
|
46
|
-
if (!set) return;
|
|
47
|
-
// Snapshot before iterating — handlers could remove themselves.
|
|
48
|
-
for (const cb of [...set]) {
|
|
49
|
-
try {
|
|
50
|
-
cb(data);
|
|
51
|
-
} catch (err) {
|
|
52
|
-
console.error(
|
|
53
|
-
'[absolutejs] angular HMR listener threw',
|
|
54
|
-
err
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
off(event, cb) {
|
|
60
|
-
listeners.get(event)?.delete(cb);
|
|
61
|
-
},
|
|
62
|
-
on(event, cb) {
|
|
63
|
-
let set = listeners.get(event);
|
|
64
|
-
if (!set) {
|
|
65
|
-
set = new Set();
|
|
66
|
-
listeners.set(event, set);
|
|
67
|
-
}
|
|
68
|
-
set.add(cb);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
return bus;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
if (typeof globalThis !== 'undefined' && !globalThis.__angularHmr) {
|
|
76
|
-
globalThis.__angularHmr = installAngularHmrShim();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export const dispatchAngularComponentRemount = (
|
|
80
|
-
data: AngularComponentUpdate
|
|
81
|
-
) => {
|
|
82
|
-
globalThis.__angularHmr?.dispatch('angular:component-remount', data);
|
|
83
|
-
};
|
|
84
|
-
export const dispatchAngularComponentUpdate = (
|
|
85
|
-
data: AngularComponentUpdate
|
|
86
|
-
) => {
|
|
87
|
-
globalThis.__angularHmr?.dispatch('angular:component-update', data);
|
|
88
|
-
};
|