@absolutejs/absolute 0.19.0-beta.1043 → 0.19.0-beta.1045
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/dist/angular/browser.js +10358 -0
- package/dist/angular/browser.js.map +260 -0
- package/dist/angular/components/constants.js +101 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +58 -0
- package/dist/angular/components/core/streamingSlotRegistry.js +114 -0
- package/dist/angular/components/defer-slot-payload.js +6 -0
- package/dist/angular/components/defer-slot-templates.directive.js +44 -0
- package/dist/angular/components/defer-slot.component.js +152 -0
- package/dist/angular/components/image.component.js +202 -0
- package/dist/angular/components/index.js +4 -0
- package/dist/angular/components/stream-slot.component.js +102 -0
- package/dist/angular/hmrPreserveCore.ts +188 -0
- package/dist/angular/index.js +15793 -0
- package/dist/angular/index.js.map +299 -0
- package/dist/angular/server.js +6357 -0
- package/dist/angular/server.js.map +61 -0
- package/dist/build.js +27484 -0
- package/dist/build.js.map +146 -0
- package/dist/cli/config/client.js +527 -0
- package/dist/cli/config/server.js +37130 -0
- package/dist/cli/htmx/htmx.min.js +1 -0
- package/dist/cli/index.js +180085 -0
- package/dist/client/index.js +1267 -0
- package/dist/client/index.js.map +31 -0
- package/dist/core/streamingSlotRegistrar.js +138 -0
- package/dist/core/streamingSlotRegistrar.js.map +10 -0
- package/dist/core/streamingSlotRegistry.js +194 -0
- package/dist/core/streamingSlotRegistry.js.map +11 -0
- package/dist/dev/client/constants.ts +26 -0
- package/dist/dev/client/cssUtils.ts +311 -0
- package/dist/dev/client/domDiff.ts +226 -0
- package/dist/dev/client/domState.ts +423 -0
- package/dist/dev/client/domTracker.ts +61 -0
- package/dist/dev/client/errorOverlay.ts +445 -0
- package/dist/dev/client/frameworkDetect.ts +63 -0
- package/dist/dev/client/handlers/angularHmrShim.ts +88 -0
- package/dist/dev/client/handlers/angularRemount.ts +362 -0
- package/dist/dev/client/handlers/angularRemountWiring.ts +52 -0
- package/dist/dev/client/handlers/html.ts +364 -0
- package/dist/dev/client/handlers/htmx.ts +278 -0
- package/dist/dev/client/handlers/react.ts +108 -0
- package/dist/dev/client/handlers/rebuild.ts +153 -0
- package/dist/dev/client/handlers/svelte.ts +334 -0
- package/dist/dev/client/handlers/vue.ts +292 -0
- package/dist/dev/client/headPatch.ts +233 -0
- package/dist/dev/client/hmrClient.ts +352 -0
- package/dist/dev/client/hmrState.ts +14 -0
- package/dist/dev/client/hmrToast.ts +150 -0
- package/dist/dev/client/moduleVersions.ts +62 -0
- package/dist/dev/client/reactRefreshSetup.ts +31 -0
- package/dist/dev/client/vendor/lview/lViewOps.ts +196 -0
- package/dist/dev/client/vendor/lview/slotConstants.ts +44 -0
- package/dist/dev/client/vendor/reactRefreshRuntime.d.ts +12 -0
- package/dist/dev/client/vendor/reactRefreshRuntime.js +313 -0
- package/dist/image-client/imageClient.js +69 -0
- package/dist/index.js +46260 -0
- package/dist/index.js.map +322 -0
- package/dist/islands/browser.js +259 -0
- package/dist/islands/browser.js.map +15 -0
- package/dist/islands/index.js +2415 -0
- package/dist/islands/index.js.map +37 -0
- package/dist/react/browser.js +374 -0
- package/dist/react/browser.js.map +19 -0
- package/dist/react/components/browser/index.js +467 -0
- package/dist/react/components/index.js +684 -0
- package/dist/react/components/index.js.map +18 -0
- package/dist/react/hooks/index.js +285 -0
- package/dist/react/hooks/index.js.map +14 -0
- package/dist/react/index.js +4258 -0
- package/dist/react/index.js.map +56 -0
- package/dist/react/jsxDevRuntimeCompat.js +90 -0
- package/dist/react/jsxDevRuntimeCompat.js.map +10 -0
- package/dist/react/router/browser.js +95 -0
- package/dist/react/router/browser.js.map +10 -0
- package/dist/react/router/index.js +95 -0
- package/dist/react/router/index.js.map +10 -0
- package/dist/react/server.js +1895 -0
- package/dist/react/server.js.map +26 -0
- package/dist/src/angular/Island.browser.d.ts +34 -0
- package/dist/src/angular/Island.d.ts +29 -0
- package/dist/src/angular/angularDeps.d.ts +2 -0
- package/dist/src/angular/angularPatch.d.ts +1 -0
- package/dist/src/angular/animationProviders.d.ts +2 -0
- package/dist/src/angular/browser.d.ts +14 -0
- package/dist/src/angular/components/constants.d.ts +96 -0
- package/dist/src/angular/components/defer-slot-payload.d.ts +7 -0
- package/dist/src/angular/components/defer-slot-templates.directive.d.ts +21 -0
- package/dist/src/angular/components/defer-slot.component.d.ts +29 -0
- package/dist/src/angular/components/image.component.d.ts +42 -0
- package/dist/src/angular/components/index.d.ts +4 -0
- package/dist/src/angular/components/stream-slot.component.d.ts +20 -0
- package/dist/src/angular/composables/index.d.ts +6 -0
- package/dist/src/angular/composables/usePageContext.d.ts +16 -0
- package/dist/src/angular/composables/useResource.d.ts +57 -0
- package/dist/src/angular/composables/useSubscription.d.ts +33 -0
- package/dist/src/angular/composables/useTimers.d.ts +18 -0
- package/dist/src/angular/createIsland.browser.d.ts +2 -0
- package/dist/src/angular/createIsland.d.ts +2 -0
- package/dist/src/angular/deterministicEnv.d.ts +26 -0
- package/dist/src/angular/hmrPreserveCore.d.ts +21 -0
- package/dist/src/angular/httpTransferCache.d.ts +12 -0
- package/dist/src/angular/index.d.ts +14 -0
- package/dist/src/angular/injectorPatch.d.ts +1 -0
- package/dist/src/angular/islandStore.d.ts +9 -0
- package/dist/src/angular/islands.d.ts +4 -0
- package/dist/src/angular/lowerDeferSyntax.d.ts +18 -0
- package/dist/src/angular/lowerServerIslands.d.ts +1 -0
- package/dist/src/angular/pageHandler.d.ts +48 -0
- package/dist/src/angular/pendingTask.d.ts +1 -0
- package/dist/src/angular/preserveAcrossHmr.d.ts +12 -0
- package/dist/src/angular/renderIsland.d.ts +2 -0
- package/dist/src/angular/requestProviders.d.ts +5 -0
- package/dist/src/angular/resolveAngularPackage.d.ts +19 -0
- package/dist/src/angular/routerRedirectProviders.d.ts +6 -0
- package/dist/src/angular/server.d.ts +4 -0
- package/dist/src/angular/ssrRender.d.ts +13 -0
- package/dist/src/angular/ssrSanitizer.d.ts +3 -0
- package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +7 -0
- package/dist/src/build/angularLinkerPlugin.d.ts +29 -0
- package/dist/src/build/buildAngularVendor.d.ts +40 -0
- package/dist/src/build/buildDepVendor.d.ts +2 -0
- package/dist/src/build/buildEmberVendor.d.ts +24 -0
- package/dist/src/build/buildReactVendor.d.ts +8 -0
- package/dist/src/build/buildSvelteVendor.d.ts +6 -0
- package/dist/src/build/buildVueVendor.d.ts +6 -0
- package/dist/src/build/chainInlineSourcemaps.d.ts +13 -0
- package/dist/src/build/compileAngular.d.ts +40 -0
- package/dist/src/build/compileEmber.d.ts +43 -0
- package/dist/src/build/compileSvelte.d.ts +14 -0
- package/dist/src/build/compileTailwind.d.ts +5 -0
- package/dist/src/build/compileVue.d.ts +22 -0
- package/dist/src/build/externalAssetPlugin.d.ts +2 -0
- package/dist/src/build/generateManifest.d.ts +2 -0
- package/dist/src/build/generateReactIndexes.d.ts +2 -0
- package/dist/src/build/htmlScriptHMRPlugin.d.ts +13 -0
- package/dist/src/build/index.d.ts +2 -0
- package/dist/src/build/islandEntries.d.ts +32 -0
- package/dist/src/build/islandRegistryTransform.d.ts +17 -0
- package/dist/src/build/nativeRewrite.d.ts +5 -0
- package/dist/src/build/optimizeHtmlImages.d.ts +2 -0
- package/dist/src/build/outputLogs.d.ts +1 -0
- package/dist/src/build/parseAngularConfigImports.d.ts +9 -0
- package/dist/src/build/parseVueSpaRoutes.d.ts +20 -0
- package/dist/src/build/resolvePackageImport.d.ts +9 -0
- package/dist/src/build/rewriteImports.d.ts +8 -0
- package/dist/src/build/rewriteImportsPlugin.d.ts +48 -0
- package/dist/src/build/rewriteReactImports.d.ts +7 -0
- package/dist/src/build/runAngularHandlerScan.d.ts +7 -0
- package/dist/src/build/scanAngularHandlerCalls.d.ts +13 -0
- package/dist/src/build/scanAngularPageRoutes.d.ts +10 -0
- package/dist/src/build/scanConventions.d.ts +5 -0
- package/dist/src/build/scanCssEntryPoints.d.ts +1 -0
- package/dist/src/build/scanEntryPoints.d.ts +1 -0
- package/dist/src/build/scanRouteRegistrations.d.ts +23 -0
- package/dist/src/build/scanVueSsrOnlyPages.d.ts +6 -0
- package/dist/src/build/staticIslandPages.d.ts +9 -0
- package/dist/src/build/stylePreprocessor.d.ts +26 -0
- package/dist/src/build/tailwindCompiler.d.ts +8 -0
- package/dist/src/build/updateAssetPaths.d.ts +1 -0
- package/dist/src/build/vendorEntrySource.d.ts +1 -0
- package/dist/src/build/verifyAngularCoreUniqueness.d.ts +2 -0
- package/dist/src/build/vueAutoRouterTransform.d.ts +1 -0
- package/dist/src/build/wrapHTMLScript.d.ts +17 -0
- package/dist/src/build.d.ts +2 -0
- package/dist/src/cli/add/dependencies.d.ts +12 -0
- package/dist/src/cli/cache.d.ts +15 -0
- package/dist/src/cli/config/absolute/AbsoluteConfigPanel.d.ts +6 -0
- package/dist/src/cli/config/absolute/editAbsoluteConfig.d.ts +5 -0
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +14 -0
- package/dist/src/cli/config/client.d.ts +1 -0
- package/dist/src/cli/config/configCert.d.ts +12 -0
- package/dist/src/cli/config/eslint/EslintPanel.d.ts +6 -0
- package/dist/src/cli/config/eslint/configAst.d.ts +18 -0
- package/dist/src/cli/config/eslint/editConfigRule.d.ts +6 -0
- package/dist/src/cli/config/eslint/eslintStyles.d.ts +1 -0
- package/dist/src/cli/config/eslint/resolveConfig.d.ts +3 -0
- package/dist/src/cli/config/eslint/serializeValue.d.ts +9 -0
- package/dist/src/cli/config/guards.d.ts +4 -0
- package/dist/src/cli/config/packageJson/PackageJsonPanel.d.ts +6 -0
- package/dist/src/cli/config/packageJson/editPackageJson.d.ts +9 -0
- package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +9 -0
- package/dist/src/cli/config/page/ConfigShell.d.ts +6 -0
- package/dist/src/cli/config/page/FieldEditor.d.ts +9 -0
- package/dist/src/cli/config/page/PanelHost.d.ts +6 -0
- package/dist/src/cli/config/page/configStyles.d.ts +1 -0
- package/dist/src/cli/config/panels.d.ts +7 -0
- package/dist/src/cli/config/prettier/PrettierPanel.d.ts +6 -0
- package/dist/src/cli/config/prettier/editPrettier.d.ts +5 -0
- package/dist/src/cli/config/prettier/resolvePrettier.d.ts +11 -0
- package/dist/src/cli/config/schema/fromJsonSchema.d.ts +3 -0
- package/dist/src/cli/config/schema/fromType.d.ts +2 -0
- package/dist/src/cli/config/schema/serialize.d.ts +1 -0
- package/dist/src/cli/config/server.d.ts +298 -0
- package/dist/src/cli/config/tsconfig/TsconfigPanel.d.ts +6 -0
- package/dist/src/cli/config/tsconfig/editTsconfig.d.ts +5 -0
- package/dist/src/cli/config/tsconfig/resolveTsconfig.d.ts +8 -0
- package/dist/src/cli/config/tsconfig/tsconfigStyles.d.ts +1 -0
- package/dist/src/cli/discoverInstances.d.ts +5 -0
- package/dist/src/cli/generate/componentTemplates.d.ts +7 -0
- package/dist/src/cli/generate/context.d.ts +30 -0
- package/dist/src/cli/generate/cssStrategy.d.ts +20 -0
- package/dist/src/cli/generate/frameworkKey.d.ts +3 -0
- package/dist/src/cli/generate/frameworks.d.ts +40 -0
- package/dist/src/cli/generate/generateApi.d.ts +3 -0
- package/dist/src/cli/generate/generateComponent.d.ts +4 -0
- package/dist/src/cli/generate/generatePage.d.ts +4 -0
- package/dist/src/cli/generate/naming.d.ts +5 -0
- package/dist/src/cli/generate/navData.d.ts +10 -0
- package/dist/src/cli/generate/outcome.d.ts +17 -0
- package/dist/src/cli/generate/pageTemplates.d.ts +11 -0
- package/dist/src/cli/generate/routeWiring.d.ts +40 -0
- package/dist/src/cli/generate/staticNav.d.ts +5 -0
- package/dist/src/cli/heapDiff.d.ts +1 -0
- package/dist/src/cli/htmx/install.d.ts +6 -0
- package/dist/src/cli/index.d.ts +2 -0
- package/dist/src/cli/inspectData.d.ts +12 -0
- package/dist/src/cli/inspectTui.d.ts +1 -0
- package/dist/src/cli/instanceStatus.d.ts +22 -0
- package/dist/src/cli/interactive.d.ts +2 -0
- package/dist/src/cli/psTui.d.ts +1 -0
- package/dist/src/cli/scripts/add.d.ts +1 -0
- package/dist/src/cli/scripts/analyze.d.ts +1 -0
- package/dist/src/cli/scripts/api.d.ts +1 -0
- package/dist/src/cli/scripts/build.d.ts +1 -0
- package/dist/src/cli/scripts/compile.d.ts +2 -0
- package/dist/src/cli/scripts/dev.d.ts +1 -0
- package/dist/src/cli/scripts/doctor.d.ts +1 -0
- package/dist/src/cli/scripts/env.d.ts +7 -0
- package/dist/src/cli/scripts/eslint.d.ts +16 -0
- package/dist/src/cli/scripts/generate.d.ts +1 -0
- package/dist/src/cli/scripts/htmx.d.ts +1 -0
- package/dist/src/cli/scripts/info.d.ts +1 -0
- package/dist/src/cli/scripts/inspect.d.ts +1 -0
- package/dist/src/cli/scripts/islands.d.ts +1 -0
- package/dist/src/cli/scripts/logs.d.ts +1 -0
- package/dist/src/cli/scripts/ls.d.ts +1 -0
- package/dist/src/cli/scripts/mem.d.ts +1 -0
- package/dist/src/cli/scripts/prettier.d.ts +3 -0
- package/dist/src/cli/scripts/ps.d.ts +1 -0
- package/dist/src/cli/scripts/remove.d.ts +1 -0
- package/dist/src/cli/scripts/routes.d.ts +1 -0
- package/dist/src/cli/scripts/start.d.ts +1 -0
- package/dist/src/cli/scripts/telemetry.d.ts +5 -0
- package/dist/src/cli/scripts/tunnelRelay.d.ts +9 -0
- package/dist/src/cli/scripts/typecheck.d.ts +1 -0
- package/dist/src/cli/scripts/workspace.d.ts +11 -0
- package/dist/src/cli/telemetryEvent.d.ts +1 -0
- package/dist/src/cli/tuiPrimitives.d.ts +14 -0
- package/dist/src/cli/utils.d.ts +15 -0
- package/dist/src/cli/workspaceTui.d.ts +44 -0
- package/dist/src/client/hydrators/react.d.ts +3 -0
- package/dist/src/client/hydrators/svelte.d.ts +2 -0
- package/dist/src/client/hydrators/vue.d.ts +2 -0
- package/dist/src/client/index.d.ts +4 -0
- package/dist/src/client/islandResolver.d.ts +2 -0
- package/dist/src/client/islandRuntime.d.ts +9 -0
- package/dist/src/client/islandStore.d.ts +22 -0
- package/dist/src/client/preserveIslandMarkup.d.ts +16 -0
- package/dist/src/client/streamSwap.d.ts +1 -0
- package/dist/src/constants.d.ts +96 -0
- package/dist/src/core/angularServerModule.d.ts +1 -0
- package/dist/src/core/build.d.ts +14 -0
- package/dist/src/core/currentIslandRegistry.d.ts +7 -0
- package/dist/src/core/devBuild.d.ts +23 -0
- package/dist/src/core/devRouteRegistrationCallsite.d.ts +4 -0
- package/dist/src/core/devVendorPaths.d.ts +17 -0
- package/dist/src/core/index.d.ts +7 -0
- package/dist/src/core/islandManifest.d.ts +3 -0
- package/dist/src/core/islandMarkupAttributes.d.ts +12 -0
- package/dist/src/core/islandPageContext.d.ts +12 -0
- package/dist/src/core/islandSsr.d.ts +6 -0
- package/dist/src/core/islands.d.ts +16 -0
- package/dist/src/core/loadIslandRegistry.d.ts +1 -0
- package/dist/src/core/lookup.d.ts +1 -0
- package/dist/src/core/normalizeIslandProps.d.ts +15 -0
- package/dist/src/core/pageHandlers.d.ts +5 -0
- package/dist/src/core/prepare.d.ts +417 -0
- package/dist/src/core/prerender.d.ts +31 -0
- package/dist/src/core/renderIslandMarkup.d.ts +13 -0
- package/dist/src/core/responseEnhancers.d.ts +10 -0
- package/dist/src/core/staticStreaming.d.ts +25 -0
- package/dist/src/core/streamingSlotRegistrar.d.ts +16 -0
- package/dist/src/core/streamingSlotRegistry.d.ts +2 -0
- package/dist/src/core/streamingSlotWarningScope.d.ts +4 -0
- package/dist/src/core/svelteServerModule.d.ts +1 -0
- package/dist/src/core/vueServerModule.d.ts +1 -0
- package/dist/src/core/wrapPageHandlerWithStreamingSlots.d.ts +2 -0
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +58 -0
- package/dist/src/dev/angular/hmrCompiler.d.ts +2 -0
- package/dist/src/dev/angular/hmrImportGenerator.d.ts +3 -0
- package/dist/src/dev/angular/hmrInjectionPlugin.d.ts +8 -0
- package/dist/src/dev/angular/resolveOwningComponents.d.ts +16 -0
- package/dist/src/dev/angular/vendor/translator/api/ast_factory.d.ts +363 -0
- package/dist/src/dev/angular/vendor/translator/api/import_generator.d.ts +49 -0
- package/dist/src/dev/angular/vendor/translator/context.d.ts +18 -0
- package/dist/src/dev/angular/vendor/translator/translator.d.ts +75 -0
- package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +12 -0
- package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +66 -0
- package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +13 -0
- package/dist/src/dev/assetStore.d.ts +8 -0
- package/dist/src/dev/buildHMRClient.d.ts +1 -0
- package/dist/src/dev/clientManager.d.ts +33 -0
- package/dist/src/dev/configResolver.d.ts +16 -0
- package/dist/src/dev/dependencyGraph.d.ts +10 -0
- package/dist/src/dev/devCert.d.ts +11 -0
- package/dist/src/dev/fileHashTracker.d.ts +2 -0
- package/dist/src/dev/fileWatcher.d.ts +4 -0
- package/dist/src/dev/moduleMapper.d.ts +27 -0
- package/dist/src/dev/moduleServer.d.ts +24 -0
- package/dist/src/dev/moduleVersionTracker.d.ts +7 -0
- package/dist/src/dev/pathUtils.d.ts +8 -0
- package/dist/src/dev/reactComponentClassifier.d.ts +2 -0
- package/dist/src/dev/rebuildTrigger.d.ts +11 -0
- package/dist/src/dev/requestInspector.d.ts +43 -0
- package/dist/src/dev/serverEntryWatcher.d.ts +5 -0
- package/dist/src/dev/simpleHTMLHMR.d.ts +4 -0
- package/dist/src/dev/simpleHTMXHMR.d.ts +4 -0
- package/dist/src/dev/transformCache.d.ts +22 -0
- package/dist/src/dev/tunnel/client.d.ts +20 -0
- package/dist/src/dev/tunnel/protocol.d.ts +85 -0
- package/dist/src/dev/tunnel/relay.d.ts +28 -0
- package/dist/src/dev/webSocket.d.ts +9 -0
- package/dist/src/ember/browser.d.ts +24 -0
- package/dist/src/ember/index.d.ts +2 -0
- package/dist/src/ember/pageHandler.d.ts +35 -0
- package/dist/src/ember/server.d.ts +2 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/islands/browser.d.ts +3 -0
- package/dist/src/islands/index.d.ts +3 -0
- package/dist/src/islands/pageMetadata.d.ts +13 -0
- package/dist/src/islands/sourceMetadata.d.ts +10 -0
- package/dist/src/plugins/devtoolsJson.d.ts +58 -0
- package/dist/src/plugins/hmr.d.ts +163 -0
- package/dist/src/plugins/imageOptimizer.d.ts +67 -0
- package/dist/src/plugins/index.d.ts +3 -0
- package/dist/src/plugins/networking.d.ts +2 -0
- package/dist/src/plugins/openApiPlugin.d.ts +11 -0
- package/dist/src/plugins/pageRouter.d.ts +1 -0
- package/dist/src/react/Island.browser.d.ts +2 -0
- package/dist/src/react/Island.d.ts +2 -0
- package/dist/src/react/bridgeInternals.d.ts +1 -0
- package/dist/src/react/browser.d.ts +3 -0
- package/dist/src/react/components/Head.d.ts +2 -0
- package/dist/src/react/components/Image.d.ts +2 -0
- package/dist/src/react/components/JsonLd.d.ts +4 -0
- package/dist/src/react/components/StreamSlot.browser.d.ts +10 -0
- package/dist/src/react/components/StreamSlot.d.ts +10 -0
- package/dist/src/react/components/SuspenseSlot.browser.d.ts +22 -0
- package/dist/src/react/components/SuspenseSlot.d.ts +37 -0
- package/dist/src/react/components/browser/index.d.ts +5 -0
- package/dist/src/react/components/index.d.ts +5 -0
- package/dist/src/react/createIsland.browser.d.ts +2 -0
- package/dist/src/react/createIsland.d.ts +2 -0
- package/dist/src/react/hooks/index.d.ts +3 -0
- package/dist/src/react/hooks/useIslandStore.d.ts +3 -0
- package/dist/src/react/hooks/useMediaQuery.d.ts +7 -0
- package/dist/src/react/index.d.ts +4 -0
- package/dist/src/react/jsxDevRuntimeCompat.d.ts +8 -0
- package/dist/src/react/pageHandler.d.ts +25 -0
- package/dist/src/react/router/UniversalRouter.d.ts +43 -0
- package/dist/src/react/router/browser.d.ts +2 -0
- package/dist/src/react/router/index.d.ts +2 -0
- package/dist/src/react/server.d.ts +1 -0
- package/dist/src/react/staticAnalyzeSpaRoutes.d.ts +7 -0
- package/dist/src/svelte/browser.d.ts +4 -0
- package/dist/src/svelte/createIsland.browser.d.ts +2 -0
- package/dist/src/svelte/createIsland.d.ts +2 -0
- package/dist/src/svelte/index.d.ts +6 -0
- package/dist/src/svelte/islandStore.d.ts +5 -0
- package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +4 -0
- package/dist/src/svelte/lowerIslandSyntax.d.ts +4 -0
- package/dist/src/svelte/pageHandler.d.ts +28 -0
- package/dist/src/svelte/renderIsland.d.ts +2 -0
- package/dist/src/svelte/renderToPipeableStream.d.ts +12 -0
- package/dist/src/svelte/renderToReadableStream.d.ts +14 -0
- package/dist/src/svelte/renderToString.d.ts +9 -0
- package/dist/src/svelte/resolveIslandHtml.browser.d.ts +2 -0
- package/dist/src/svelte/resolveIslandHtml.d.ts +2 -0
- package/dist/src/svelte/router/browser.d.ts +4 -0
- package/dist/src/svelte/router/goto.d.ts +15 -0
- package/dist/src/svelte/router/hashMode.d.ts +16 -0
- package/dist/src/svelte/router/index.d.ts +4 -0
- package/dist/src/svelte/router/matchPath.d.ts +30 -0
- package/dist/src/svelte/router/page.svelte.d.ts +15 -0
- package/dist/src/svelte/router/prefetchCache.d.ts +17 -0
- package/dist/src/svelte/router/pushState.d.ts +13 -0
- package/dist/src/svelte/router/viewTransitions.d.ts +6 -0
- package/dist/src/svelte/server.d.ts +1 -0
- package/dist/src/svelte/staticAnalyzeSpaRoutes.d.ts +7 -0
- package/dist/src/utils/buildDirectoryLock.d.ts +28 -0
- package/dist/src/utils/cleanStaleOutputs.d.ts +1 -0
- package/dist/src/utils/cleanup.d.ts +9 -0
- package/dist/src/utils/commonAncestor.d.ts +1 -0
- package/dist/src/utils/defineConfig.d.ts +39 -0
- package/dist/src/utils/defineConvention.d.ts +3 -0
- package/dist/src/utils/defineEnv.d.ts +10 -0
- package/dist/src/utils/escapeScriptContent.d.ts +1 -0
- package/dist/src/utils/formatBytes.d.ts +2 -0
- package/dist/src/utils/generateHeadElement.d.ts +4 -0
- package/dist/src/utils/generateSitemap.d.ts +21 -0
- package/dist/src/utils/generatedDir.d.ts +3 -0
- package/dist/src/utils/getDurationString.d.ts +1 -0
- package/dist/src/utils/getEnv.d.ts +1 -0
- package/dist/src/utils/imageClient.d.ts +13 -0
- package/dist/src/utils/imageProcessing.d.ts +33 -0
- package/dist/src/utils/index.d.ts +11 -0
- package/dist/src/utils/inlinePageCss.d.ts +2 -0
- package/dist/src/utils/instanceRegistry.d.ts +13 -0
- package/dist/src/utils/jsonLd.d.ts +3 -0
- package/dist/src/utils/loadConfig.d.ts +57 -0
- package/dist/src/utils/logger.d.ts +56 -0
- package/dist/src/utils/networking.d.ts +2 -0
- package/dist/src/utils/normalizePath.d.ts +9 -0
- package/dist/src/utils/portScan.d.ts +22 -0
- package/dist/src/utils/projectRoot.d.ts +17 -0
- package/dist/src/utils/registerClientScript.d.ts +36 -0
- package/dist/src/utils/resolveConvention.d.ts +10 -0
- package/dist/src/utils/resolveDevPort.d.ts +24 -0
- package/dist/src/utils/runtimeMode.d.ts +3 -0
- package/dist/src/utils/spaRouteCss.d.ts +4 -0
- package/dist/src/utils/spaRouteTypes.d.ts +25 -0
- package/dist/src/utils/ssrErrorPage.d.ts +1 -0
- package/dist/src/utils/startupBanner.d.ts +10 -0
- package/dist/src/utils/startupTimings.d.ts +7 -0
- package/dist/src/utils/streamingSlotMetricSink.d.ts +18 -0
- package/dist/src/utils/streamingSlots.d.ts +76 -0
- package/dist/src/utils/stringModifiers.d.ts +3 -0
- package/dist/src/utils/userAgentFunctions.d.ts +1 -0
- package/dist/src/utils/validateSafePath.d.ts +1 -0
- package/dist/src/vue/Island.browser.d.ts +37 -0
- package/dist/src/vue/Island.d.ts +36 -0
- package/dist/src/vue/browser.d.ts +6 -0
- package/dist/src/vue/components/Image.d.ts +74 -0
- package/dist/src/vue/components/StreamSlot.d.ts +22 -0
- package/dist/src/vue/components/SuspenseSlot.d.ts +26 -0
- package/dist/src/vue/components/index.d.ts +3 -0
- package/dist/src/vue/createIsland.browser.d.ts +13 -0
- package/dist/src/vue/createIsland.d.ts +13 -0
- package/dist/src/vue/defineVuePage.d.ts +6 -0
- package/dist/src/vue/index.d.ts +9 -0
- package/dist/src/vue/pageHandler.d.ts +45 -0
- package/dist/src/vue/routerRedirectProviders.d.ts +45 -0
- package/dist/src/vue/server.d.ts +2 -0
- package/dist/src/vue/staticAnalyzeSpaRoutes.d.ts +7 -0
- package/dist/src/vue/useIslandStore.d.ts +3 -0
- package/dist/svelte/browser.js +309 -0
- package/dist/svelte/browser.js.map +19 -0
- package/dist/svelte/components/AwaitSlot.svelte +39 -0
- package/dist/svelte/components/AwaitSlot.svelte.d.ts +2 -0
- package/dist/svelte/components/Head.svelte +144 -0
- package/dist/svelte/components/Head.svelte.d.ts +2 -0
- package/dist/svelte/components/Image.svelte +164 -0
- package/dist/svelte/components/Image.svelte.d.ts +5 -0
- package/dist/svelte/components/Island.svelte +71 -0
- package/dist/svelte/components/Island.svelte.d.ts +5 -0
- package/dist/svelte/components/JsonLd.svelte +21 -0
- package/dist/svelte/components/JsonLd.svelte.d.ts +2 -0
- package/dist/svelte/components/StreamSlot.svelte +41 -0
- package/dist/svelte/components/StreamSlot.svelte.d.ts +2 -0
- package/dist/svelte/index.js +4371 -0
- package/dist/svelte/index.js.map +60 -0
- package/dist/svelte/router/Link.svelte +124 -0
- package/dist/svelte/router/Link.svelte.d.ts +21 -0
- package/dist/svelte/router/Route.svelte +54 -0
- package/dist/svelte/router/Route.svelte.d.ts +13 -0
- package/dist/svelte/router/Router.svelte +189 -0
- package/dist/svelte/router/Router.svelte.d.ts +16 -0
- package/dist/svelte/router/browser.ts +14 -0
- package/dist/svelte/router/goto.ts +89 -0
- package/dist/svelte/router/hashMode.ts +31 -0
- package/dist/svelte/router/index.ts +23 -0
- package/dist/svelte/router/matchPath.ts +136 -0
- package/dist/svelte/router/page.d.ts +15 -0
- package/dist/svelte/router/page.js +27 -0
- package/dist/svelte/router/prefetchCache.ts +85 -0
- package/dist/svelte/router/pushState.ts +35 -0
- package/dist/svelte/router/viewTransitions.ts +35 -0
- package/dist/svelte/server.js +2996 -0
- package/dist/svelte/server.js.map +33 -0
- package/dist/types/absoluteConfig.d.ts +22 -0
- package/dist/types/angular.d.ts +43 -0
- package/dist/types/build.d.ts +259 -0
- package/dist/types/cli.d.ts +74 -0
- package/dist/types/client.d.ts +70 -0
- package/dist/types/config.d.ts +50 -0
- package/dist/types/conventions.d.ts +26 -0
- package/dist/types/ember.d.ts +39 -0
- package/dist/types/env.d.ts +2 -0
- package/dist/types/eslintConfig.d.ts +68 -0
- package/dist/types/globals.d.ts +163 -0
- package/dist/types/image.d.ts +77 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/island.d.ts +52 -0
- package/dist/types/jsonLd.d.ts +300 -0
- package/dist/types/mediaQuery.d.ts +9 -0
- package/dist/types/messages.d.ts +152 -0
- package/dist/types/metadata.d.ts +51 -0
- package/dist/types/packageJson.d.ts +74 -0
- package/dist/types/packageJsonPanel.d.ts +29 -0
- package/dist/types/prettier.d.ts +26 -0
- package/dist/types/react.d.ts +2 -0
- package/dist/types/sitemap.d.ts +24 -0
- package/dist/types/style-module-shim.d.ts +29 -0
- package/dist/types/svelte.d.ts +2 -0
- package/dist/types/svelteRouter.d.ts +65 -0
- package/dist/types/svelteRouter.ts +91 -0
- package/dist/types/telemetry.d.ts +15 -0
- package/dist/types/tool.d.ts +11 -0
- package/dist/types/tsconfig.d.ts +31 -0
- package/dist/types/typeGuards.d.ts +2 -0
- package/dist/types/userAgentTypes.d.ts +2 -0
- package/dist/types/vue.d.ts +56 -0
- package/dist/types/websocket.d.ts +6 -0
- package/dist/vue/browser.js +512 -0
- package/dist/vue/browser.js.map +22 -0
- package/dist/vue/components/Image.js +264 -0
- package/dist/vue/components/Image.js.map +12 -0
- package/dist/vue/components/index.js +571 -0
- package/dist/vue/components/index.js.map +15 -0
- package/dist/vue/index.js +5238 -0
- package/dist/vue/index.js.map +69 -0
- package/dist/vue/server.js +2251 -0
- package/dist/vue/server.js.map +32 -0
- package/package.json +2 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import type {} from '../../../../types/globals';
|
|
2
|
+
/* Vendored LView slot operations. Direct port from
|
|
3
|
+
* `@angular/core/fesm2022/_debug_node-chunk.mjs` of the small-and-pure
|
|
4
|
+
* helpers we need for per-component remount. The big helpers
|
|
5
|
+
* (renderView / refreshView / destroyLView's full DOM-removal path)
|
|
6
|
+
* stay in Angular — we invoke them indirectly via public
|
|
7
|
+
* `createComponent`. The ones here are slot-manipulation primitives
|
|
8
|
+
* with no transitive dependencies, so vendoring them is safe.
|
|
9
|
+
*
|
|
10
|
+
* Per-Angular-version chore: re-diff against the upstream functions
|
|
11
|
+
* after each minor bump. They've been stable since v17 — the algorithm
|
|
12
|
+
* shape hasn't changed since the LView FLAGS reshuffle. */
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
CHILD_HEAD,
|
|
16
|
+
CHILD_TAIL,
|
|
17
|
+
CLEANUP,
|
|
18
|
+
FLAGS,
|
|
19
|
+
HEADER_OFFSET,
|
|
20
|
+
LFLAG_DESTROYED,
|
|
21
|
+
NEXT,
|
|
22
|
+
ON_DESTROY_HOOKS,
|
|
23
|
+
TVIEW
|
|
24
|
+
} from './slotConstants';
|
|
25
|
+
|
|
26
|
+
export type LView = unknown[];
|
|
27
|
+
export type LContainer = unknown[];
|
|
28
|
+
export type TView = {
|
|
29
|
+
bindingStartIndex: number;
|
|
30
|
+
cleanup: unknown[] | null;
|
|
31
|
+
destroyHooks: unknown[] | null;
|
|
32
|
+
};
|
|
33
|
+
export type TNode = { index: number };
|
|
34
|
+
|
|
35
|
+
/* `isLView` / `isLContainer` shape checks. The runtime distinguishes
|
|
36
|
+
* by whether slot 1 (TVIEW) is an object or undefined — LContainer
|
|
37
|
+
* doesn't have a TView. */
|
|
38
|
+
export const isLView = (v: unknown): v is LView =>
|
|
39
|
+
Array.isArray(v) && typeof (v as unknown[])[TVIEW] === 'object';
|
|
40
|
+
|
|
41
|
+
export const isLContainer = (v: unknown): v is LContainer =>
|
|
42
|
+
Array.isArray(v) && (v as unknown[])[TVIEW] === undefined;
|
|
43
|
+
|
|
44
|
+
export const isDestroyed = (lView: LView): boolean =>
|
|
45
|
+
((lView[FLAGS] as number) & LFLAG_DESTROYED) !== 0;
|
|
46
|
+
|
|
47
|
+
/* Vendored from `replaceLViewInTree(parentLView, oldLView, newLView, index)`.
|
|
48
|
+
* Walks parent's slots looking for the LView/LContainer whose NEXT
|
|
49
|
+
* pointer is `oldLView` and rewires it to `newLView`, then patches
|
|
50
|
+
* CHILD_HEAD / CHILD_TAIL if `oldLView` was at either end, and finally
|
|
51
|
+
* places `newLView` at the indexed slot.
|
|
52
|
+
*
|
|
53
|
+
* Verbatim port — keep it that way to make diff-against-upstream cheap. */
|
|
54
|
+
export const replaceLViewInTree = (
|
|
55
|
+
parentLView: LView,
|
|
56
|
+
oldLView: LView,
|
|
57
|
+
newLView: LView,
|
|
58
|
+
index: number
|
|
59
|
+
): void => {
|
|
60
|
+
const parentTView = parentLView[TVIEW] as TView;
|
|
61
|
+
for (let i = HEADER_OFFSET; i < parentTView.bindingStartIndex; i++) {
|
|
62
|
+
const current = parentLView[i];
|
|
63
|
+
if (
|
|
64
|
+
(isLView(current) || isLContainer(current)) &&
|
|
65
|
+
(current as LView)[NEXT] === oldLView
|
|
66
|
+
) {
|
|
67
|
+
(current as LView)[NEXT] = newLView;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (parentLView[CHILD_HEAD] === oldLView)
|
|
72
|
+
parentLView[CHILD_HEAD] = newLView;
|
|
73
|
+
if (parentLView[CHILD_TAIL] === oldLView)
|
|
74
|
+
parentLView[CHILD_TAIL] = newLView;
|
|
75
|
+
newLView[NEXT] = oldLView[NEXT];
|
|
76
|
+
oldLView[NEXT] = null;
|
|
77
|
+
parentLView[index] = newLView;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/* Vendored from `executeOnDestroys(tView, lView)`. tView.destroyHooks
|
|
81
|
+
* is laid out as `[slotIdx, hook | hookList, slotIdx, hook | hookList, ...]`.
|
|
82
|
+
* Each `hook` is either a function (called with `lView[slotIdx]` as
|
|
83
|
+
* `this`) or an array of `[propertyKey, fn]` pairs (one per directive
|
|
84
|
+
* sharing the slot). NodeInjectorFactory contexts are skipped; they
|
|
85
|
+
* represent injector providers, not directive instances. */
|
|
86
|
+
type NodeInjectorFactoryLike = { multi?: unknown };
|
|
87
|
+
|
|
88
|
+
const isNodeInjectorFactoryLike = (
|
|
89
|
+
value: unknown
|
|
90
|
+
): value is NodeInjectorFactoryLike =>
|
|
91
|
+
typeof value === 'object' &&
|
|
92
|
+
value !== null &&
|
|
93
|
+
value.constructor !== undefined &&
|
|
94
|
+
value.constructor.name === 'NodeInjectorFactory';
|
|
95
|
+
|
|
96
|
+
export const executeOnDestroys = (tView: TView, lView: LView): void => {
|
|
97
|
+
const destroyHooks = tView.destroyHooks;
|
|
98
|
+
if (destroyHooks == null) return;
|
|
99
|
+
|
|
100
|
+
for (let i = 0; i < destroyHooks.length; i += 2) {
|
|
101
|
+
const slotIdx = destroyHooks[i] as number;
|
|
102
|
+
const context = lView[slotIdx];
|
|
103
|
+
if (isNodeInjectorFactoryLike(context)) continue;
|
|
104
|
+
|
|
105
|
+
const toCall = destroyHooks[i + 1];
|
|
106
|
+
if (Array.isArray(toCall)) {
|
|
107
|
+
for (let j = 0; j < toCall.length; j += 2) {
|
|
108
|
+
const propKey = toCall[j] as string;
|
|
109
|
+
const hook = toCall[j + 1] as () => void;
|
|
110
|
+
const callContext = (context as Record<string, unknown>)[
|
|
111
|
+
propKey
|
|
112
|
+
];
|
|
113
|
+
try {
|
|
114
|
+
hook.call(callContext);
|
|
115
|
+
} catch (err) {
|
|
116
|
+
console.error('[absolutejs] onDestroy hook threw', err);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
} else if (typeof toCall === 'function') {
|
|
120
|
+
try {
|
|
121
|
+
(toCall as (this: unknown) => void).call(context);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
console.error('[absolutejs] onDestroy hook threw', err);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/* Vendored from `processCleanups(tView, lView)`. Walks tView.cleanup which
|
|
130
|
+
* is laid out as either:
|
|
131
|
+
* [eventName(string), targetIdx, listenerIdx, indirectIdx, ...]
|
|
132
|
+
* — DOM event listener; lCleanup[indirectIdx] is the unregister fn
|
|
133
|
+
* (or, if indirectIdx is negative, lCleanup[-indirectIdx] is a
|
|
134
|
+
* Subscription whose .unsubscribe() we call)
|
|
135
|
+
* [hookFn(function), contextSlotIdx, ...]
|
|
136
|
+
* — directive output / cleanup callback; call hookFn with
|
|
137
|
+
* lCleanup[contextSlotIdx] as `this`
|
|
138
|
+
* Then walks lView[ON_DESTROY_HOOKS] (component-level destroy hooks,
|
|
139
|
+
* registered via `inject(DestroyRef).onDestroy(...)` etc.) and fires
|
|
140
|
+
* each one. */
|
|
141
|
+
export const processCleanups = (tView: TView, lView: LView): void => {
|
|
142
|
+
const tCleanup = tView.cleanup;
|
|
143
|
+
const lCleanup = lView[CLEANUP] as unknown[] | null;
|
|
144
|
+
|
|
145
|
+
if (tCleanup !== null && lCleanup !== null) {
|
|
146
|
+
for (let i = 0; i < tCleanup.length - 1; i += 2) {
|
|
147
|
+
const entry = tCleanup[i];
|
|
148
|
+
if (typeof entry === 'string') {
|
|
149
|
+
const targetIdx = tCleanup[i + 3] as number;
|
|
150
|
+
try {
|
|
151
|
+
if (targetIdx >= 0) {
|
|
152
|
+
(lCleanup[targetIdx] as () => void)();
|
|
153
|
+
} else {
|
|
154
|
+
(
|
|
155
|
+
lCleanup[-targetIdx] as { unsubscribe: () => void }
|
|
156
|
+
).unsubscribe();
|
|
157
|
+
}
|
|
158
|
+
} catch (err) {
|
|
159
|
+
console.error('[absolutejs] DOM cleanup threw', err);
|
|
160
|
+
}
|
|
161
|
+
i += 2;
|
|
162
|
+
} else if (typeof entry === 'function') {
|
|
163
|
+
const ctxIdx = tCleanup[i + 1] as number;
|
|
164
|
+
try {
|
|
165
|
+
(entry as (this: unknown) => void).call(lCleanup[ctxIdx]);
|
|
166
|
+
} catch (err) {
|
|
167
|
+
console.error('[absolutejs] cleanup callback threw', err);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (lCleanup !== null) {
|
|
174
|
+
lView[CLEANUP] = null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const onDestroyHooks = lView[ON_DESTROY_HOOKS] as Array<() => void> | null;
|
|
178
|
+
if (onDestroyHooks !== null) {
|
|
179
|
+
lView[ON_DESTROY_HOOKS] = null;
|
|
180
|
+
for (const hook of onDestroyHooks) {
|
|
181
|
+
try {
|
|
182
|
+
hook();
|
|
183
|
+
} catch (err) {
|
|
184
|
+
console.error('[absolutejs] DestroyRef hook threw', err);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/* Mark an LView as destroyed so any later
|
|
191
|
+
* destroyLView/cleanUpView no-ops it. Without this flag the LView
|
|
192
|
+
* could get walked twice (e.g. if Angular's tree-walk later finds
|
|
193
|
+
* a stale reference). */
|
|
194
|
+
export const markLViewDestroyed = (lView: LView): void => {
|
|
195
|
+
lView[FLAGS] = ((lView[FLAGS] as number) | LFLAG_DESTROYED) >>> 0;
|
|
196
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type {} from '../../../../types/globals';
|
|
2
|
+
/* Vendored LView slot indices from `@angular/core`. The runtime represents
|
|
3
|
+
* each LView as a flat array; these constants name the structural slots
|
|
4
|
+
* before the per-template slots start at HEADER_OFFSET.
|
|
5
|
+
*
|
|
6
|
+
* Source: `node_modules/@angular/core/fesm2022/_effect-chunk2.mjs`
|
|
7
|
+
* (search for `const HOST = 0;`). These are NOT exported and Angular keeps
|
|
8
|
+
* them tightly held — but they have not shifted since the v9 ivy rewrite,
|
|
9
|
+
* so the maintenance cost is verifying once per Angular minor that
|
|
10
|
+
* `_effect-chunk2.mjs:HOST === 0` etc. still holds.
|
|
11
|
+
*
|
|
12
|
+
* If Angular reorders these, our LView traversal returns wrong slots
|
|
13
|
+
* (e.g. reading PARENT might yield CONTEXT). Symptom: per-component
|
|
14
|
+
* remount throws or silently swaps the wrong subtree. Verify at the
|
|
15
|
+
* top of `angularRemount.ts` via shape checks before doing anything
|
|
16
|
+
* destructive. */
|
|
17
|
+
|
|
18
|
+
export const HOST = 0;
|
|
19
|
+
export const TVIEW = 1;
|
|
20
|
+
export const FLAGS = 2;
|
|
21
|
+
export const PARENT = 3;
|
|
22
|
+
export const NEXT = 4;
|
|
23
|
+
export const T_HOST = 5;
|
|
24
|
+
export const HYDRATION = 6;
|
|
25
|
+
export const CLEANUP = 7;
|
|
26
|
+
export const CONTEXT = 8;
|
|
27
|
+
export const INJECTOR = 9;
|
|
28
|
+
export const ENVIRONMENT = 10;
|
|
29
|
+
export const RENDERER = 11;
|
|
30
|
+
export const CHILD_HEAD = 12;
|
|
31
|
+
export const CHILD_TAIL = 13;
|
|
32
|
+
export const DECLARATION_VIEW = 14;
|
|
33
|
+
export const DECLARATION_COMPONENT_VIEW = 15;
|
|
34
|
+
export const DECLARATION_LCONTAINER = 16;
|
|
35
|
+
export const PREORDER_HOOK_FLAGS = 17;
|
|
36
|
+
export const QUERIES = 18;
|
|
37
|
+
export const ID = 19;
|
|
38
|
+
export const EMBEDDED_VIEW_INJECTOR = 20;
|
|
39
|
+
export const ON_DESTROY_HOOKS = 21;
|
|
40
|
+
export const HEADER_OFFSET = 27;
|
|
41
|
+
|
|
42
|
+
/* LView FLAGS bitfield bits (from same source). We only care about
|
|
43
|
+
* the destroyed bit so that double-destroy is a no-op. */
|
|
44
|
+
export const LFLAG_DESTROYED = 256;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type {} from '../../../types/globals';
|
|
2
|
+
/* Typed surface for the vendored react-refresh runtime bundle
|
|
3
|
+
* (reactRefreshRuntime.js). Colocated with the vendored artifact, mirroring
|
|
4
|
+
* the vendor/lview pattern. Only the members the framework actually uses are
|
|
5
|
+
* declared. */
|
|
6
|
+
|
|
7
|
+
export const createSignatureFunctionForTransform: () => (
|
|
8
|
+
type: unknown
|
|
9
|
+
) => unknown;
|
|
10
|
+
export const injectIntoGlobalHook: (win: Window) => void;
|
|
11
|
+
export const performReactRefresh: () => void;
|
|
12
|
+
export const register: (type: unknown, id: string) => void;
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* VENDORED: react-refresh@0.18.0 runtime (react-refresh/runtime), bundled to
|
|
3
|
+
* browser ESM with NODE_ENV="development". Dev-HMR only; never shipped to a
|
|
4
|
+
* client bundle. Regenerate with: bun run scripts/vendorReactRefresh.ts */
|
|
5
|
+
var __create = Object.create;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
function __accessProp(key) {
|
|
11
|
+
return this[key];
|
|
12
|
+
}
|
|
13
|
+
var __toESMCache_node;
|
|
14
|
+
var __toESMCache_esm;
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
16
|
+
var canCache = mod != null && typeof mod === "object";
|
|
17
|
+
if (canCache) {
|
|
18
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
19
|
+
var cached = cache.get(mod);
|
|
20
|
+
if (cached)
|
|
21
|
+
return cached;
|
|
22
|
+
}
|
|
23
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
24
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
25
|
+
for (let key of __getOwnPropNames(mod))
|
|
26
|
+
if (!__hasOwnProp.call(to, key))
|
|
27
|
+
__defProp(to, key, {
|
|
28
|
+
get: __accessProp.bind(mod, key),
|
|
29
|
+
enumerable: true
|
|
30
|
+
});
|
|
31
|
+
if (canCache)
|
|
32
|
+
cache.set(mod, to);
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
36
|
+
|
|
37
|
+
// node_modules/react-refresh/cjs/react-refresh-runtime.development.js
|
|
38
|
+
var require_react_refresh_runtime_development = __commonJS((exports) => {
|
|
39
|
+
(function() {
|
|
40
|
+
function computeFullKey(signature) {
|
|
41
|
+
if (signature.fullKey !== null)
|
|
42
|
+
return signature.fullKey;
|
|
43
|
+
var fullKey = signature.ownKey;
|
|
44
|
+
try {
|
|
45
|
+
var hooks = signature.getCustomHooks();
|
|
46
|
+
} catch (err) {
|
|
47
|
+
return signature.forceReset = true, signature.fullKey = fullKey;
|
|
48
|
+
}
|
|
49
|
+
for (var i = 0;i < hooks.length; i++) {
|
|
50
|
+
var hook = hooks[i];
|
|
51
|
+
if (typeof hook !== "function")
|
|
52
|
+
return signature.forceReset = true, signature.fullKey = fullKey;
|
|
53
|
+
hook = allSignaturesByType.get(hook);
|
|
54
|
+
if (hook !== undefined) {
|
|
55
|
+
var nestedHookKey = computeFullKey(hook);
|
|
56
|
+
hook.forceReset && (signature.forceReset = true);
|
|
57
|
+
fullKey += `
|
|
58
|
+
---
|
|
59
|
+
` + nestedHookKey;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return signature.fullKey = fullKey;
|
|
63
|
+
}
|
|
64
|
+
function resolveFamily(type) {
|
|
65
|
+
return updatedFamiliesByType.get(type);
|
|
66
|
+
}
|
|
67
|
+
function cloneMap(map) {
|
|
68
|
+
var clone = new Map;
|
|
69
|
+
map.forEach(function(value, key) {
|
|
70
|
+
clone.set(key, value);
|
|
71
|
+
});
|
|
72
|
+
return clone;
|
|
73
|
+
}
|
|
74
|
+
function cloneSet(set) {
|
|
75
|
+
var clone = new Set;
|
|
76
|
+
set.forEach(function(value) {
|
|
77
|
+
clone.add(value);
|
|
78
|
+
});
|
|
79
|
+
return clone;
|
|
80
|
+
}
|
|
81
|
+
function getProperty(object, property) {
|
|
82
|
+
try {
|
|
83
|
+
return object[property];
|
|
84
|
+
} catch (err) {}
|
|
85
|
+
}
|
|
86
|
+
function register(type, id) {
|
|
87
|
+
if (!(type === null || typeof type !== "function" && typeof type !== "object" || allFamiliesByType.has(type))) {
|
|
88
|
+
var family = allFamiliesByID.get(id);
|
|
89
|
+
family === undefined ? (family = { current: type }, allFamiliesByID.set(id, family)) : pendingUpdates.push([family, type]);
|
|
90
|
+
allFamiliesByType.set(type, family);
|
|
91
|
+
if (typeof type === "object" && type !== null)
|
|
92
|
+
switch (getProperty(type, "$$typeof")) {
|
|
93
|
+
case REACT_FORWARD_REF_TYPE:
|
|
94
|
+
register(type.render, id + "$render");
|
|
95
|
+
break;
|
|
96
|
+
case REACT_MEMO_TYPE:
|
|
97
|
+
register(type.type, id + "$type");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function setSignature(type, key) {
|
|
102
|
+
var forceReset = 2 < arguments.length && arguments[2] !== undefined ? arguments[2] : false, getCustomHooks = 3 < arguments.length ? arguments[3] : undefined;
|
|
103
|
+
allSignaturesByType.has(type) || allSignaturesByType.set(type, {
|
|
104
|
+
forceReset,
|
|
105
|
+
ownKey: key,
|
|
106
|
+
fullKey: null,
|
|
107
|
+
getCustomHooks: getCustomHooks || function() {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
if (typeof type === "object" && type !== null)
|
|
112
|
+
switch (getProperty(type, "$$typeof")) {
|
|
113
|
+
case REACT_FORWARD_REF_TYPE:
|
|
114
|
+
setSignature(type.render, key, forceReset, getCustomHooks);
|
|
115
|
+
break;
|
|
116
|
+
case REACT_MEMO_TYPE:
|
|
117
|
+
setSignature(type.type, key, forceReset, getCustomHooks);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function collectCustomHooksForSignature(type) {
|
|
121
|
+
type = allSignaturesByType.get(type);
|
|
122
|
+
type !== undefined && computeFullKey(type);
|
|
123
|
+
}
|
|
124
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_MEMO_TYPE = Symbol.for("react.memo"), PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map, allFamiliesByID = new Map, allFamiliesByType = new PossiblyWeakMap, allSignaturesByType = new PossiblyWeakMap, updatedFamiliesByType = new PossiblyWeakMap, pendingUpdates = [], helpersByRendererID = new Map, helpersByRoot = new Map, mountedRoots = new Set, failedRoots = new Set, rootElements = typeof WeakMap === "function" ? new WeakMap : null, isPerformingRefresh = false;
|
|
125
|
+
exports._getMountedRootCount = function() {
|
|
126
|
+
return mountedRoots.size;
|
|
127
|
+
};
|
|
128
|
+
exports.collectCustomHooksForSignature = collectCustomHooksForSignature;
|
|
129
|
+
exports.createSignatureFunctionForTransform = function() {
|
|
130
|
+
var savedType, hasCustomHooks, didCollectHooks = false;
|
|
131
|
+
return function(type, key, forceReset, getCustomHooks) {
|
|
132
|
+
if (typeof key === "string")
|
|
133
|
+
return savedType || (savedType = type, hasCustomHooks = typeof getCustomHooks === "function"), type == null || typeof type !== "function" && typeof type !== "object" || setSignature(type, key, forceReset, getCustomHooks), type;
|
|
134
|
+
!didCollectHooks && hasCustomHooks && (didCollectHooks = true, collectCustomHooksForSignature(savedType));
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
exports.getFamilyByID = function(id) {
|
|
138
|
+
return allFamiliesByID.get(id);
|
|
139
|
+
};
|
|
140
|
+
exports.getFamilyByType = function(type) {
|
|
141
|
+
return allFamiliesByType.get(type);
|
|
142
|
+
};
|
|
143
|
+
exports.hasUnrecoverableErrors = function() {
|
|
144
|
+
return false;
|
|
145
|
+
};
|
|
146
|
+
exports.injectIntoGlobalHook = function(globalObject) {
|
|
147
|
+
var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
148
|
+
if (hook === undefined) {
|
|
149
|
+
var nextID = 0;
|
|
150
|
+
globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {
|
|
151
|
+
renderers: new Map,
|
|
152
|
+
supportsFiber: true,
|
|
153
|
+
inject: function() {
|
|
154
|
+
return nextID++;
|
|
155
|
+
},
|
|
156
|
+
onScheduleFiberRoot: function() {},
|
|
157
|
+
onCommitFiberRoot: function() {},
|
|
158
|
+
onCommitFiberUnmount: function() {}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
if (hook.isDisabled)
|
|
162
|
+
console.warn("Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled.");
|
|
163
|
+
else {
|
|
164
|
+
var oldInject = hook.inject;
|
|
165
|
+
hook.inject = function(injected) {
|
|
166
|
+
var id = oldInject.apply(this, arguments);
|
|
167
|
+
typeof injected.scheduleRefresh === "function" && typeof injected.setRefreshHandler === "function" && helpersByRendererID.set(id, injected);
|
|
168
|
+
return id;
|
|
169
|
+
};
|
|
170
|
+
hook.renderers.forEach(function(injected, id) {
|
|
171
|
+
typeof injected.scheduleRefresh === "function" && typeof injected.setRefreshHandler === "function" && helpersByRendererID.set(id, injected);
|
|
172
|
+
});
|
|
173
|
+
var oldOnCommitFiberRoot = hook.onCommitFiberRoot, oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function() {};
|
|
174
|
+
hook.onScheduleFiberRoot = function(id, root, children) {
|
|
175
|
+
isPerformingRefresh || (failedRoots.delete(root), rootElements !== null && rootElements.set(root, children));
|
|
176
|
+
return oldOnScheduleFiberRoot.apply(this, arguments);
|
|
177
|
+
};
|
|
178
|
+
hook.onCommitFiberRoot = function(id, root, maybePriorityLevel, didError) {
|
|
179
|
+
var helpers = helpersByRendererID.get(id);
|
|
180
|
+
if (helpers !== undefined) {
|
|
181
|
+
helpersByRoot.set(root, helpers);
|
|
182
|
+
helpers = root.current;
|
|
183
|
+
var alternate = helpers.alternate;
|
|
184
|
+
alternate !== null ? (alternate = alternate.memoizedState != null && alternate.memoizedState.element != null && mountedRoots.has(root), helpers = helpers.memoizedState != null && helpers.memoizedState.element != null, !alternate && helpers ? (mountedRoots.add(root), failedRoots.delete(root)) : alternate && helpers || (alternate && !helpers ? (mountedRoots.delete(root), didError ? failedRoots.add(root) : helpersByRoot.delete(root)) : alternate || helpers || didError && failedRoots.add(root))) : mountedRoots.add(root);
|
|
185
|
+
}
|
|
186
|
+
return oldOnCommitFiberRoot.apply(this, arguments);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
exports.isLikelyComponentType = function(type) {
|
|
191
|
+
switch (typeof type) {
|
|
192
|
+
case "function":
|
|
193
|
+
if (type.prototype != null) {
|
|
194
|
+
if (type.prototype.isReactComponent)
|
|
195
|
+
return true;
|
|
196
|
+
var ownNames = Object.getOwnPropertyNames(type.prototype);
|
|
197
|
+
if (1 < ownNames.length || ownNames[0] !== "constructor" || type.prototype.__proto__ !== Object.prototype)
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
type = type.name || type.displayName;
|
|
201
|
+
return typeof type === "string" && /^[A-Z]/.test(type);
|
|
202
|
+
case "object":
|
|
203
|
+
if (type != null)
|
|
204
|
+
switch (getProperty(type, "$$typeof")) {
|
|
205
|
+
case REACT_FORWARD_REF_TYPE:
|
|
206
|
+
case REACT_MEMO_TYPE:
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
return false;
|
|
210
|
+
default:
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
exports.performReactRefresh = function() {
|
|
215
|
+
if (pendingUpdates.length === 0 || isPerformingRefresh)
|
|
216
|
+
return null;
|
|
217
|
+
isPerformingRefresh = true;
|
|
218
|
+
try {
|
|
219
|
+
var staleFamilies = new Set, updatedFamilies = new Set, updates = pendingUpdates;
|
|
220
|
+
pendingUpdates = [];
|
|
221
|
+
updates.forEach(function(_ref) {
|
|
222
|
+
var family = _ref[0];
|
|
223
|
+
_ref = _ref[1];
|
|
224
|
+
var prevType = family.current;
|
|
225
|
+
updatedFamiliesByType.set(prevType, family);
|
|
226
|
+
updatedFamiliesByType.set(_ref, family);
|
|
227
|
+
family.current = _ref;
|
|
228
|
+
prevType.prototype && prevType.prototype.isReactComponent || _ref.prototype && _ref.prototype.isReactComponent ? _ref = false : (prevType = allSignaturesByType.get(prevType), _ref = allSignaturesByType.get(_ref), _ref = prevType === undefined && _ref === undefined || prevType !== undefined && _ref !== undefined && computeFullKey(prevType) === computeFullKey(_ref) && !_ref.forceReset ? true : false);
|
|
229
|
+
_ref ? updatedFamilies.add(family) : staleFamilies.add(family);
|
|
230
|
+
});
|
|
231
|
+
var update = {
|
|
232
|
+
updatedFamilies,
|
|
233
|
+
staleFamilies
|
|
234
|
+
};
|
|
235
|
+
helpersByRendererID.forEach(function(helpers) {
|
|
236
|
+
helpers.setRefreshHandler(resolveFamily);
|
|
237
|
+
});
|
|
238
|
+
var didError = false, firstError = null, failedRootsSnapshot = cloneSet(failedRoots), mountedRootsSnapshot = cloneSet(mountedRoots), helpersByRootSnapshot = cloneMap(helpersByRoot);
|
|
239
|
+
failedRootsSnapshot.forEach(function(root) {
|
|
240
|
+
var helpers = helpersByRootSnapshot.get(root);
|
|
241
|
+
if (helpers === undefined)
|
|
242
|
+
throw Error("Could not find helpers for a root. This is a bug in React Refresh.");
|
|
243
|
+
failedRoots.has(root);
|
|
244
|
+
if (rootElements !== null && rootElements.has(root)) {
|
|
245
|
+
var element = rootElements.get(root);
|
|
246
|
+
try {
|
|
247
|
+
helpers.scheduleRoot(root, element);
|
|
248
|
+
} catch (err) {
|
|
249
|
+
didError || (didError = true, firstError = err);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
mountedRootsSnapshot.forEach(function(root) {
|
|
254
|
+
var helpers = helpersByRootSnapshot.get(root);
|
|
255
|
+
if (helpers === undefined)
|
|
256
|
+
throw Error("Could not find helpers for a root. This is a bug in React Refresh.");
|
|
257
|
+
mountedRoots.has(root);
|
|
258
|
+
try {
|
|
259
|
+
helpers.scheduleRefresh(root, update);
|
|
260
|
+
} catch (err) {
|
|
261
|
+
didError || (didError = true, firstError = err);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
if (didError)
|
|
265
|
+
throw firstError;
|
|
266
|
+
return update;
|
|
267
|
+
} finally {
|
|
268
|
+
isPerformingRefresh = false;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
exports.register = register;
|
|
272
|
+
exports.setSignature = setSignature;
|
|
273
|
+
})();
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// node_modules/react-refresh/runtime.js
|
|
277
|
+
var require_runtime = __commonJS((exports, module) => {
|
|
278
|
+
var react_refresh_runtime_development = __toESM(require_react_refresh_runtime_development());
|
|
279
|
+
if (false) {} else {
|
|
280
|
+
module.exports = react_refresh_runtime_development;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
// .vendor_react_refresh_tmp/entry.ts
|
|
285
|
+
var import_runtime = __toESM(require_runtime(), 1);
|
|
286
|
+
var import_runtime2 = __toESM(require_runtime(), 1);
|
|
287
|
+
var export_setSignature = import_runtime.setSignature;
|
|
288
|
+
var export_register = import_runtime.register;
|
|
289
|
+
var export_performReactRefresh = import_runtime.performReactRefresh;
|
|
290
|
+
var export_isLikelyComponentType = import_runtime.isLikelyComponentType;
|
|
291
|
+
var export_injectIntoGlobalHook = import_runtime.injectIntoGlobalHook;
|
|
292
|
+
var export_hasUnrecoverableErrors = import_runtime.hasUnrecoverableErrors;
|
|
293
|
+
var export_getFamilyByType = import_runtime.getFamilyByType;
|
|
294
|
+
var export_getFamilyByID = import_runtime.getFamilyByID;
|
|
295
|
+
var export_default = import_runtime2.default;
|
|
296
|
+
var export_createSignatureFunctionForTransform = import_runtime.createSignatureFunctionForTransform;
|
|
297
|
+
var export_collectCustomHooksForSignature = import_runtime.collectCustomHooksForSignature;
|
|
298
|
+
var export__getMountedRootCount = import_runtime._getMountedRootCount;
|
|
299
|
+
|
|
300
|
+
export {
|
|
301
|
+
export_setSignature as setSignature,
|
|
302
|
+
export_register as register,
|
|
303
|
+
export_performReactRefresh as performReactRefresh,
|
|
304
|
+
export_isLikelyComponentType as isLikelyComponentType,
|
|
305
|
+
export_injectIntoGlobalHook as injectIntoGlobalHook,
|
|
306
|
+
export_hasUnrecoverableErrors as hasUnrecoverableErrors,
|
|
307
|
+
export_getFamilyByType as getFamilyByType,
|
|
308
|
+
export_getFamilyByID as getFamilyByID,
|
|
309
|
+
export_default as default,
|
|
310
|
+
export_createSignatureFunctionForTransform as createSignatureFunctionForTransform,
|
|
311
|
+
export_collectCustomHooksForSignature as collectCustomHooksForSignature,
|
|
312
|
+
export__getMountedRootCount as _getMountedRootCount
|
|
313
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// src/constants.ts
|
|
2
|
+
var HOURS_IN_DAY = 24;
|
|
3
|
+
var IMAGE_DEFAULT_DEVICE_SIZES = [
|
|
4
|
+
640,
|
|
5
|
+
750,
|
|
6
|
+
828,
|
|
7
|
+
1080,
|
|
8
|
+
1200,
|
|
9
|
+
1920,
|
|
10
|
+
2048,
|
|
11
|
+
3840
|
|
12
|
+
];
|
|
13
|
+
var IMAGE_DEFAULT_IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];
|
|
14
|
+
var IMAGE_DEFAULT_QUALITY = 75;
|
|
15
|
+
var MILLISECONDS_IN_A_SECOND = 1000;
|
|
16
|
+
var MINUTES_IN_AN_HOUR = 60;
|
|
17
|
+
var SECONDS_IN_A_MINUTE = 60;
|
|
18
|
+
var MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
|
|
19
|
+
var MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
|
|
20
|
+
var TWO_THIRDS = 2 / 3;
|
|
21
|
+
|
|
22
|
+
// src/utils/imageClient.ts
|
|
23
|
+
var DEFAULT_DEVICE_SIZES = IMAGE_DEFAULT_DEVICE_SIZES;
|
|
24
|
+
var DEFAULT_IMAGE_SIZES = IMAGE_DEFAULT_IMAGE_SIZES;
|
|
25
|
+
var DEFAULT_QUALITY = IMAGE_DEFAULT_QUALITY;
|
|
26
|
+
var OPTIMIZATION_ENDPOINT = "/_absolute/image";
|
|
27
|
+
var buildOptimizedUrl = (src, width, quality, basePath = OPTIMIZATION_ENDPOINT) => `${basePath}?url=${encodeURIComponent(src)}&w=${width}&q=${quality}`;
|
|
28
|
+
var getAllSizes = (deviceSizes, imageSizes) => {
|
|
29
|
+
const device = deviceSizes ?? DEFAULT_DEVICE_SIZES;
|
|
30
|
+
const image = imageSizes ?? DEFAULT_IMAGE_SIZES;
|
|
31
|
+
return [...device, ...image].sort((left, right) => left - right);
|
|
32
|
+
};
|
|
33
|
+
var snapToSize = (target, sizes) => {
|
|
34
|
+
for (const size of sizes) {
|
|
35
|
+
if (size >= target)
|
|
36
|
+
return size;
|
|
37
|
+
}
|
|
38
|
+
return sizes[sizes.length - 1] ?? target;
|
|
39
|
+
};
|
|
40
|
+
var generateBlurSvg = (base64Thumbnail) => {
|
|
41
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 320"><filter id="b" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="20"/><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1"/></filter><image filter="url(#b)" x="0" y="0" width="100%" height="100%" href="${base64Thumbnail}"/></svg>`;
|
|
42
|
+
const encoded = encodeURIComponent(svg);
|
|
43
|
+
return `url("data:image/svg+xml,${encoded}")`;
|
|
44
|
+
};
|
|
45
|
+
var generateSrcSet = (src, width, sizes, deviceSizes, imageSizes) => {
|
|
46
|
+
const quality = DEFAULT_QUALITY;
|
|
47
|
+
if (sizes) {
|
|
48
|
+
const allSizes = getAllSizes(deviceSizes, imageSizes);
|
|
49
|
+
return allSizes.map((sizeWidth) => `${buildOptimizedUrl(src, sizeWidth, quality)} ${sizeWidth}w`).join(", ");
|
|
50
|
+
}
|
|
51
|
+
if (width) {
|
|
52
|
+
const allSizes = getAllSizes(deviceSizes, imageSizes);
|
|
53
|
+
const w1x = snapToSize(width, allSizes);
|
|
54
|
+
const w2x = snapToSize(width * 2, allSizes);
|
|
55
|
+
return `${buildOptimizedUrl(src, w1x, quality)} 1x, ${buildOptimizedUrl(src, w2x, quality)} 2x`;
|
|
56
|
+
}
|
|
57
|
+
const devSizes = deviceSizes ?? DEFAULT_DEVICE_SIZES;
|
|
58
|
+
return devSizes.map((sizeWidth) => `${buildOptimizedUrl(src, sizeWidth, quality)} ${sizeWidth}w`).join(", ");
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
getAllSizes,
|
|
62
|
+
generateSrcSet,
|
|
63
|
+
generateBlurSvg,
|
|
64
|
+
buildOptimizedUrl,
|
|
65
|
+
OPTIMIZATION_ENDPOINT,
|
|
66
|
+
DEFAULT_QUALITY,
|
|
67
|
+
DEFAULT_IMAGE_SIZES,
|
|
68
|
+
DEFAULT_DEVICE_SIZES
|
|
69
|
+
};
|