@nativescript/vite 8.0.0-alpha.4 → 8.0.0-alpha.41
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/README.md +51 -11
- package/bin/cli.cjs +8 -14
- package/configuration/angular.d.ts +34 -1
- package/configuration/angular.js +376 -165
- package/configuration/angular.js.map +1 -1
- package/configuration/base.js +256 -30
- package/configuration/base.js.map +1 -1
- package/configuration/javascript.js +12 -90
- package/configuration/javascript.js.map +1 -1
- package/configuration/solid.js +33 -4
- package/configuration/solid.js.map +1 -1
- package/configuration/typescript.js +10 -90
- package/configuration/typescript.js.map +1 -1
- package/helpers/app-components.d.ts +2 -1
- package/helpers/app-components.js.map +1 -1
- package/helpers/app-css-state.d.ts +8 -0
- package/helpers/app-css-state.js +8 -0
- package/helpers/app-css-state.js.map +1 -0
- package/helpers/bundler-context.d.ts +11 -0
- package/helpers/bundler-context.js +71 -0
- package/helpers/bundler-context.js.map +1 -0
- package/helpers/config-as-json.js +10 -0
- package/helpers/config-as-json.js.map +1 -1
- package/helpers/css-platform-plugin.d.ts +14 -0
- package/helpers/css-platform-plugin.js +43 -25
- package/helpers/css-platform-plugin.js.map +1 -1
- package/helpers/dev-host.d.ts +360 -0
- package/helpers/dev-host.js +692 -0
- package/helpers/dev-host.js.map +1 -0
- package/helpers/dynamic-import-plugin.js +1 -1
- package/helpers/dynamic-import-plugin.js.map +1 -1
- package/helpers/esbuild-platform-resolver.js +4 -1
- package/helpers/esbuild-platform-resolver.js.map +1 -1
- package/helpers/external-configs.d.ts +10 -12
- package/helpers/external-configs.js +54 -35
- package/helpers/external-configs.js.map +1 -1
- package/helpers/global-defines.d.ts +128 -0
- package/helpers/global-defines.js +174 -11
- package/helpers/global-defines.js.map +1 -1
- package/helpers/hmr-scope.d.ts +26 -0
- package/helpers/hmr-scope.js +67 -0
- package/helpers/hmr-scope.js.map +1 -0
- package/helpers/init.js +0 -18
- package/helpers/init.js.map +1 -1
- package/helpers/logging.d.ts +1 -0
- package/helpers/logging.js +65 -4
- package/helpers/logging.js.map +1 -1
- package/helpers/main-entry.d.ts +3 -1
- package/helpers/main-entry.js +444 -50
- package/helpers/main-entry.js.map +1 -1
- package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
- package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
- package/helpers/nativeclass-transform.js +5 -6
- package/helpers/nativeclass-transform.js.map +1 -1
- package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
- package/helpers/nativeclass-transformer-plugin.js +157 -14
- package/helpers/nativeclass-transformer-plugin.js.map +1 -1
- package/helpers/nativescript-package-resolver.js +10 -62
- package/helpers/nativescript-package-resolver.js.map +1 -1
- package/helpers/normalize-id.d.ts +42 -0
- package/helpers/normalize-id.js +60 -0
- package/helpers/normalize-id.js.map +1 -0
- package/helpers/ns-core-url.d.ts +106 -0
- package/helpers/ns-core-url.js +225 -0
- package/helpers/ns-core-url.js.map +1 -0
- package/helpers/optimize-deps.d.ts +16 -0
- package/helpers/optimize-deps.js +17 -0
- package/helpers/optimize-deps.js.map +1 -0
- package/helpers/package-platform-aliases.js +34 -49
- package/helpers/package-platform-aliases.js.map +1 -1
- package/helpers/platform-types.d.ts +2 -0
- package/helpers/platform-types.js +2 -0
- package/helpers/platform-types.js.map +1 -0
- package/helpers/postcss-platform-config.d.ts +17 -1
- package/helpers/postcss-platform-config.js +20 -37
- package/helpers/postcss-platform-config.js.map +1 -1
- package/helpers/project.d.ts +35 -0
- package/helpers/project.js +120 -2
- package/helpers/project.js.map +1 -1
- package/helpers/resolve-main-field-platform.d.ts +20 -0
- package/helpers/resolve-main-field-platform.js +49 -0
- package/helpers/resolve-main-field-platform.js.map +1 -0
- package/helpers/resolver.js +17 -2
- package/helpers/resolver.js.map +1 -1
- package/helpers/theme-core-plugins.js +1 -1
- package/helpers/theme-core-plugins.js.map +1 -1
- package/helpers/ts-config-paths.d.ts +14 -0
- package/helpers/ts-config-paths.js +90 -9
- package/helpers/ts-config-paths.js.map +1 -1
- package/helpers/typescript-check.d.ts +2 -1
- package/helpers/typescript-check.js.map +1 -1
- package/helpers/ui-registration.d.ts +21 -0
- package/helpers/ui-registration.js +156 -0
- package/helpers/ui-registration.js.map +1 -0
- package/helpers/utils.js +1 -2
- package/helpers/utils.js.map +1 -1
- package/helpers/workers.d.ts +20 -19
- package/helpers/workers.js +624 -4
- package/helpers/workers.js.map +1 -1
- package/hmr/client/css-handler.d.ts +2 -1
- package/hmr/client/css-handler.js +50 -26
- package/hmr/client/css-handler.js.map +1 -1
- package/hmr/client/css-update-overlay.d.ts +18 -0
- package/hmr/client/css-update-overlay.js +27 -0
- package/hmr/client/css-update-overlay.js.map +1 -0
- package/hmr/client/framework-client-strategy.d.ts +79 -0
- package/hmr/client/framework-client-strategy.js +19 -0
- package/hmr/client/framework-client-strategy.js.map +1 -0
- package/hmr/client/hmr-pending-overlay.d.ts +13 -0
- package/hmr/client/hmr-pending-overlay.js +60 -0
- package/hmr/client/hmr-pending-overlay.js.map +1 -0
- package/hmr/client/index.js +820 -212
- package/hmr/client/index.js.map +1 -1
- package/hmr/client/utils.d.ts +7 -1
- package/hmr/client/utils.js +207 -29
- package/hmr/client/utils.js.map +1 -1
- package/hmr/entry-runtime.d.ts +2 -1
- package/hmr/entry-runtime.js +256 -69
- package/hmr/entry-runtime.js.map +1 -1
- package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
- package/hmr/frameworks/angular/build/angular-linker.js +109 -0
- package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
- package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
- package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
- package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
- package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
- package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
- package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
- package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
- package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
- package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
- package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
- package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
- package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
- package/hmr/frameworks/angular/build/shared-linker.js +128 -0
- package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
- package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
- package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
- package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
- package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
- package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
- package/hmr/frameworks/angular/build/util.js +155 -0
- package/hmr/frameworks/angular/build/util.js.map +1 -0
- package/hmr/frameworks/angular/client/index.d.ts +1 -0
- package/hmr/frameworks/angular/client/index.js +803 -21
- package/hmr/frameworks/angular/client/index.js.map +1 -1
- package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
- package/hmr/frameworks/angular/client/strategy.js +19 -0
- package/hmr/frameworks/angular/client/strategy.js.map +1 -0
- package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
- package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
- package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
- package/hmr/frameworks/angular/server/linker.js +1 -4
- package/hmr/frameworks/angular/server/linker.js.map +1 -1
- package/hmr/frameworks/angular/server/strategy.js +460 -12
- package/hmr/frameworks/angular/server/strategy.js.map +1 -1
- package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
- package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
- package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +17 -11
- package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +336 -0
- package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
- package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
- package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
- package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
- package/hmr/frameworks/solid/server/strategy.js +291 -16
- package/hmr/frameworks/solid/server/strategy.js.map +1 -1
- package/hmr/frameworks/typescript/server/strategy.js +38 -14
- package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
- package/hmr/frameworks/vue/client/dep-propagation.d.ts +36 -0
- package/hmr/frameworks/vue/client/dep-propagation.js +101 -0
- package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
- package/hmr/frameworks/vue/client/index.d.ts +8 -0
- package/hmr/frameworks/vue/client/index.js +56 -243
- package/hmr/frameworks/vue/client/index.js.map +1 -1
- package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
- package/hmr/frameworks/vue/client/strategy.js +157 -0
- package/hmr/frameworks/vue/client/strategy.js.map +1 -0
- package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
- package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +142 -0
- package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
- package/hmr/frameworks/vue/server/sfc-route-assemble.js +747 -0
- package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
- package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
- package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
- package/hmr/frameworks/vue/server/sfc-route-serve.js +459 -0
- package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +38 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.js +48 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
- package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
- package/hmr/frameworks/vue/server/strategy.js +278 -1
- package/hmr/frameworks/vue/server/strategy.js.map +1 -1
- package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
- package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
- package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
- package/hmr/helpers/ast-normalizer.d.ts +3 -1
- package/hmr/helpers/ast-normalizer.js +77 -10
- package/hmr/helpers/ast-normalizer.js.map +1 -1
- package/hmr/helpers/cjs-named-exports.d.ts +23 -0
- package/hmr/helpers/cjs-named-exports.js +152 -0
- package/hmr/helpers/cjs-named-exports.js.map +1 -0
- package/hmr/helpers/package-exports.d.ts +16 -0
- package/hmr/helpers/package-exports.js +396 -0
- package/hmr/helpers/package-exports.js.map +1 -0
- package/hmr/server/constants.js +20 -5
- package/hmr/server/constants.js.map +1 -1
- package/hmr/server/core-sanitize.d.ts +90 -7
- package/hmr/server/core-sanitize.js +211 -56
- package/hmr/server/core-sanitize.js.map +1 -1
- package/hmr/server/device-transform-helpers.d.ts +24 -0
- package/hmr/server/device-transform-helpers.js +369 -0
- package/hmr/server/device-transform-helpers.js.map +1 -0
- package/hmr/server/framework-strategy.d.ts +108 -11
- package/hmr/server/hmr-module-graph.d.ts +37 -0
- package/hmr/server/hmr-module-graph.js +214 -0
- package/hmr/server/hmr-module-graph.js.map +1 -0
- package/hmr/server/import-map.d.ts +11 -2
- package/hmr/server/import-map.js +95 -44
- package/hmr/server/import-map.js.map +1 -1
- package/hmr/server/index.js +7 -16
- package/hmr/server/index.js.map +1 -1
- package/hmr/server/ns-core-cjs-shape.d.ts +204 -0
- package/hmr/server/ns-core-cjs-shape.js +271 -0
- package/hmr/server/ns-core-cjs-shape.js.map +1 -0
- package/hmr/server/ns-rt-bridge.d.ts +51 -0
- package/hmr/server/ns-rt-bridge.js +131 -0
- package/hmr/server/ns-rt-bridge.js.map +1 -0
- package/hmr/server/ns-rt-route.d.ts +5 -0
- package/hmr/server/ns-rt-route.js +38 -0
- package/hmr/server/ns-rt-route.js.map +1 -0
- package/hmr/server/perf-instrumentation.d.ts +114 -0
- package/hmr/server/perf-instrumentation.js +197 -0
- package/hmr/server/perf-instrumentation.js.map +1 -0
- package/hmr/server/process-code-for-device.d.ts +14 -0
- package/hmr/server/process-code-for-device.js +702 -0
- package/hmr/server/process-code-for-device.js.map +1 -0
- package/hmr/server/require-guard.d.ts +1 -0
- package/hmr/server/require-guard.js +12 -0
- package/hmr/server/require-guard.js.map +1 -0
- package/hmr/server/rewrite-imports.d.ts +2 -0
- package/hmr/server/rewrite-imports.js +600 -0
- package/hmr/server/rewrite-imports.js.map +1 -0
- package/hmr/server/route-helpers.d.ts +7 -0
- package/hmr/server/route-helpers.js +13 -0
- package/hmr/server/route-helpers.js.map +1 -0
- package/hmr/server/server-origin.d.ts +2 -0
- package/hmr/server/server-origin.js +83 -0
- package/hmr/server/server-origin.js.map +1 -0
- package/hmr/server/shared-transform-request.js +13 -7
- package/hmr/server/shared-transform-request.js.map +1 -1
- package/hmr/server/transform-cache-invalidation.d.ts +37 -0
- package/hmr/server/transform-cache-invalidation.js +156 -0
- package/hmr/server/transform-cache-invalidation.js.map +1 -0
- package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
- package/hmr/server/vendor-bare-module-shims.js +80 -0
- package/hmr/server/vendor-bare-module-shims.js.map +1 -0
- package/hmr/server/vite-plugin.js +72 -42
- package/hmr/server/vite-plugin.js.map +1 -1
- package/hmr/server/websocket-core-bridge.d.ts +45 -6
- package/hmr/server/websocket-core-bridge.js +81 -77
- package/hmr/server/websocket-core-bridge.js.map +1 -1
- package/hmr/server/websocket-css-hot-update.d.ts +33 -0
- package/hmr/server/websocket-css-hot-update.js +65 -0
- package/hmr/server/websocket-css-hot-update.js.map +1 -0
- package/hmr/server/websocket-device-transform.d.ts +3 -0
- package/hmr/server/websocket-device-transform.js +7 -0
- package/hmr/server/websocket-device-transform.js.map +1 -0
- package/hmr/server/websocket-graph-upsert.d.ts +15 -0
- package/hmr/server/websocket-graph-upsert.js +20 -0
- package/hmr/server/websocket-graph-upsert.js.map +1 -1
- package/hmr/server/websocket-hmr-pending.d.ts +37 -0
- package/hmr/server/websocket-hmr-pending.js +55 -0
- package/hmr/server/websocket-hmr-pending.js.map +1 -0
- package/hmr/server/websocket-hot-update.d.ts +77 -0
- package/hmr/server/websocket-hot-update.js +360 -0
- package/hmr/server/websocket-hot-update.js.map +1 -0
- package/hmr/server/websocket-import-map-route.d.ts +15 -0
- package/hmr/server/websocket-import-map-route.js +50 -0
- package/hmr/server/websocket-import-map-route.js.map +1 -0
- package/hmr/server/websocket-module-bindings.js +3 -3
- package/hmr/server/websocket-module-bindings.js.map +1 -1
- package/hmr/server/websocket-module-specifiers.d.ts +66 -2
- package/hmr/server/websocket-module-specifiers.js +203 -20
- package/hmr/server/websocket-module-specifiers.js.map +1 -1
- package/hmr/server/websocket-ns-core.d.ts +21 -0
- package/hmr/server/websocket-ns-core.js +311 -0
- package/hmr/server/websocket-ns-core.js.map +1 -0
- package/hmr/server/websocket-ns-entry.d.ts +21 -0
- package/hmr/server/websocket-ns-entry.js +164 -0
- package/hmr/server/websocket-ns-entry.js.map +1 -0
- package/hmr/server/websocket-ns-m-paths.d.ts +1 -1
- package/hmr/server/websocket-ns-m-paths.js +58 -13
- package/hmr/server/websocket-ns-m-paths.js.map +1 -1
- package/hmr/server/websocket-ns-m-request.d.ts +11 -1
- package/hmr/server/websocket-ns-m-request.js +18 -25
- package/hmr/server/websocket-ns-m-request.js.map +1 -1
- package/hmr/server/websocket-ns-m.d.ts +33 -0
- package/hmr/server/websocket-ns-m.js +752 -0
- package/hmr/server/websocket-ns-m.js.map +1 -0
- package/hmr/server/websocket-served-module-helpers.d.ts +82 -0
- package/hmr/server/websocket-served-module-helpers.js +879 -0
- package/hmr/server/websocket-served-module-helpers.js.map +1 -0
- package/hmr/server/websocket-txn.js +2 -8
- package/hmr/server/websocket-txn.js.map +1 -1
- package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
- package/hmr/server/websocket-vendor-unifier.js +4 -9
- package/hmr/server/websocket-vendor-unifier.js.map +1 -1
- package/hmr/server/websocket.d.ts +8 -39
- package/hmr/server/websocket.js +514 -4030
- package/hmr/server/websocket.js.map +1 -1
- package/hmr/shared/ns-globals.d.ts +118 -0
- package/hmr/shared/ns-globals.js +29 -0
- package/hmr/shared/ns-globals.js.map +1 -0
- package/hmr/shared/protocol.d.ts +145 -0
- package/hmr/shared/protocol.js +28 -0
- package/hmr/shared/protocol.js.map +1 -0
- package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
- package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
- package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
- package/hmr/shared/runtime/boot-progress.d.ts +44 -0
- package/hmr/shared/runtime/boot-progress.js +133 -0
- package/hmr/shared/runtime/boot-progress.js.map +1 -0
- package/hmr/shared/runtime/boot-timeline.d.ts +18 -0
- package/hmr/shared/runtime/boot-timeline.js +42 -0
- package/hmr/shared/runtime/boot-timeline.js.map +1 -0
- package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
- package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
- package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
- package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
- package/hmr/shared/runtime/dev-overlay.d.ts +119 -26
- package/hmr/shared/runtime/dev-overlay.js +1153 -261
- package/hmr/shared/runtime/dev-overlay.js.map +1 -1
- package/hmr/shared/runtime/global-scope.d.ts +18 -0
- package/hmr/shared/runtime/global-scope.js +21 -0
- package/hmr/shared/runtime/global-scope.js.map +1 -0
- package/hmr/shared/runtime/hooks.js +2 -1
- package/hmr/shared/runtime/hooks.js.map +1 -1
- package/hmr/shared/runtime/http-only-boot.js +7 -6
- package/hmr/shared/runtime/http-only-boot.js.map +1 -1
- package/hmr/shared/runtime/module-provenance.js +4 -6
- package/hmr/shared/runtime/module-provenance.js.map +1 -1
- package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
- package/hmr/shared/runtime/root-placeholder-view.js +311 -0
- package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
- package/hmr/shared/runtime/root-placeholder.js +371 -197
- package/hmr/shared/runtime/root-placeholder.js.map +1 -1
- package/hmr/shared/runtime/session-bootstrap.js +168 -4
- package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
- package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
- package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
- package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
- package/hmr/shared/vendor/manifest-collect.js +512 -0
- package/hmr/shared/vendor/manifest-collect.js.map +1 -0
- package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
- package/hmr/shared/vendor/manifest-loader.js +5 -3
- package/hmr/shared/vendor/manifest-loader.js.map +1 -1
- package/hmr/shared/vendor/manifest.d.ts +1 -7
- package/hmr/shared/vendor/manifest.js +102 -741
- package/hmr/shared/vendor/manifest.js.map +1 -1
- package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
- package/hmr/shared/vendor/vendor-device-shim.js +208 -0
- package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +16 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.js +203 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
- package/hmr/vendor-bootstrap.d.ts +1 -3
- package/hmr/vendor-bootstrap.js +4 -6
- package/hmr/vendor-bootstrap.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +5 -0
- package/index.js.map +1 -1
- package/package.json +55 -11
- package/runtime/core-aliases-early.js +25 -55
- package/runtime/core-aliases-early.js.map +1 -1
- package/helpers/angular/angular-linker.d.ts +0 -13
- package/helpers/angular/angular-linker.js +0 -194
- package/helpers/angular/angular-linker.js.map +0 -1
- package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
- package/helpers/angular/shared-linker.d.ts +0 -11
- package/helpers/angular/shared-linker.js +0 -75
- package/helpers/angular/shared-linker.js.map +0 -1
- package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
- package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
- package/helpers/angular/util.js +0 -67
- package/helpers/angular/util.js.map +0 -1
- package/helpers/prelink-angular.d.ts +0 -2
- package/helpers/prelink-angular.js +0 -117
- package/helpers/prelink-angular.js.map +0 -1
- package/hmr/server/websocket-angular-entry.js.map +0 -1
- package/hmr/server/websocket-angular-hot-update.js +0 -239
- package/hmr/server/websocket-angular-hot-update.js.map +0 -1
- package/hmr/server/websocket-ns-m-finalize.d.ts +0 -32
- package/hmr/server/websocket-ns-m-finalize.js +0 -73
- package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
- package/hmr/server/websocket-runtime-compat.d.ts +0 -19
- package/hmr/server/websocket-runtime-compat.js +0 -286
- package/hmr/server/websocket-runtime-compat.js.map +0 -1
- package/hmr/server/websocket-vue-sfc.d.ts +0 -35
- package/hmr/server/websocket-vue-sfc.js +0 -1116
- package/hmr/server/websocket-vue-sfc.js.map +0 -1
- package/transformers/NativeClass/index.d.ts +0 -2
- package/transformers/NativeClass/index.js +0 -222
- package/transformers/NativeClass/index.js.map +0 -1
- /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
- /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
- /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
- /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
// Pure snapshot model for the HMR dev overlay: the stage enums and the
|
|
2
|
+
// factories that turn a stage + info into an immutable `HmrOverlaySnapshot`.
|
|
3
|
+
// No view-tree or platform dependencies live here — rendering is in
|
|
4
|
+
// `dev-overlay.ts`, so these factories are trivially unit-testable.
|
|
5
|
+
export const BOOT_TITLE = 'NativeScript Vite preparing dev session...';
|
|
6
|
+
export const DEFAULT_SNAPSHOT = {
|
|
7
|
+
visible: false,
|
|
8
|
+
mode: 'hidden',
|
|
9
|
+
badge: 'HMR',
|
|
10
|
+
title: BOOT_TITLE,
|
|
11
|
+
phase: '',
|
|
12
|
+
detail: '',
|
|
13
|
+
progress: null,
|
|
14
|
+
busy: false,
|
|
15
|
+
blocking: false,
|
|
16
|
+
tone: 'info',
|
|
17
|
+
};
|
|
18
|
+
const HMR_UPDATE_TITLE = 'HMR update applying...';
|
|
19
|
+
const HMR_UPDATE_DONE_TITLE = 'HMR update applied';
|
|
20
|
+
function describeAttempt(info) {
|
|
21
|
+
const attempt = Number(info?.attempt || 0);
|
|
22
|
+
const attempts = Number(info?.attempts || 0);
|
|
23
|
+
if (!attempt || !attempts) {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
return `Attempt ${attempt}/${attempts}`;
|
|
27
|
+
}
|
|
28
|
+
export function createBootOverlaySnapshot(stage, info) {
|
|
29
|
+
const attemptText = describeAttempt(info);
|
|
30
|
+
const phaseInfo = {
|
|
31
|
+
placeholder: {
|
|
32
|
+
visible: true,
|
|
33
|
+
mode: 'boot',
|
|
34
|
+
badge: 'BOOT',
|
|
35
|
+
title: BOOT_TITLE,
|
|
36
|
+
phase: 'Preparing the HTTP HMR bootstrap',
|
|
37
|
+
progress: 4,
|
|
38
|
+
busy: true,
|
|
39
|
+
blocking: true,
|
|
40
|
+
tone: 'info',
|
|
41
|
+
},
|
|
42
|
+
'probing-origin': {
|
|
43
|
+
visible: true,
|
|
44
|
+
mode: 'boot',
|
|
45
|
+
badge: 'BOOT',
|
|
46
|
+
title: BOOT_TITLE,
|
|
47
|
+
phase: 'Contacting the Vite dev server',
|
|
48
|
+
progress: 8,
|
|
49
|
+
busy: true,
|
|
50
|
+
blocking: true,
|
|
51
|
+
tone: 'info',
|
|
52
|
+
},
|
|
53
|
+
'loading-entry-runtime': {
|
|
54
|
+
visible: true,
|
|
55
|
+
mode: 'boot',
|
|
56
|
+
badge: 'BOOT',
|
|
57
|
+
title: BOOT_TITLE,
|
|
58
|
+
phase: 'Loading the entry runtime bridge',
|
|
59
|
+
progress: 16,
|
|
60
|
+
busy: true,
|
|
61
|
+
blocking: true,
|
|
62
|
+
tone: 'info',
|
|
63
|
+
},
|
|
64
|
+
'configuring-import-map': {
|
|
65
|
+
visible: true,
|
|
66
|
+
mode: 'boot',
|
|
67
|
+
badge: 'BOOT',
|
|
68
|
+
title: BOOT_TITLE,
|
|
69
|
+
phase: 'Configuring the import map',
|
|
70
|
+
progress: 26,
|
|
71
|
+
busy: true,
|
|
72
|
+
blocking: true,
|
|
73
|
+
tone: 'info',
|
|
74
|
+
},
|
|
75
|
+
'loading-runtime-bridge': {
|
|
76
|
+
visible: true,
|
|
77
|
+
mode: 'boot',
|
|
78
|
+
badge: 'BOOT',
|
|
79
|
+
title: BOOT_TITLE,
|
|
80
|
+
phase: 'Loading the NativeScript runtime bridge',
|
|
81
|
+
progress: 40,
|
|
82
|
+
busy: true,
|
|
83
|
+
blocking: true,
|
|
84
|
+
tone: 'info',
|
|
85
|
+
},
|
|
86
|
+
'loading-core-bridge': {
|
|
87
|
+
visible: true,
|
|
88
|
+
mode: 'boot',
|
|
89
|
+
badge: 'BOOT',
|
|
90
|
+
title: BOOT_TITLE,
|
|
91
|
+
phase: 'Loading the unified core bridge',
|
|
92
|
+
progress: 54,
|
|
93
|
+
busy: true,
|
|
94
|
+
blocking: true,
|
|
95
|
+
tone: 'info',
|
|
96
|
+
},
|
|
97
|
+
'preloading-style-scope': {
|
|
98
|
+
visible: true,
|
|
99
|
+
mode: 'boot',
|
|
100
|
+
badge: 'BOOT',
|
|
101
|
+
title: BOOT_TITLE,
|
|
102
|
+
phase: 'Preparing the shared style scope',
|
|
103
|
+
progress: 62,
|
|
104
|
+
busy: true,
|
|
105
|
+
blocking: true,
|
|
106
|
+
tone: 'info',
|
|
107
|
+
},
|
|
108
|
+
'installing-css': {
|
|
109
|
+
visible: true,
|
|
110
|
+
mode: 'boot',
|
|
111
|
+
badge: 'BOOT',
|
|
112
|
+
title: BOOT_TITLE,
|
|
113
|
+
phase: 'Applying the app stylesheet',
|
|
114
|
+
progress: 70,
|
|
115
|
+
busy: true,
|
|
116
|
+
blocking: true,
|
|
117
|
+
tone: 'info',
|
|
118
|
+
},
|
|
119
|
+
'importing-main': {
|
|
120
|
+
visible: true,
|
|
121
|
+
mode: 'boot',
|
|
122
|
+
badge: 'BOOT',
|
|
123
|
+
title: BOOT_TITLE,
|
|
124
|
+
phase: 'Importing the app entry',
|
|
125
|
+
// 30 (not 82) so the bar visibly climbs the ~62 points the heartbeat +
|
|
126
|
+
// snippet drive during the long HTTP-module-load phase. The monotonic
|
|
127
|
+
// ratchet in `setBootStage` prevents earlier-but-higher stages from
|
|
128
|
+
// being clobbered.
|
|
129
|
+
progress: 30,
|
|
130
|
+
busy: true,
|
|
131
|
+
blocking: true,
|
|
132
|
+
tone: 'info',
|
|
133
|
+
},
|
|
134
|
+
'waiting-for-app': {
|
|
135
|
+
visible: true,
|
|
136
|
+
mode: 'boot',
|
|
137
|
+
badge: 'BOOT',
|
|
138
|
+
title: BOOT_TITLE,
|
|
139
|
+
phase: 'Waiting for the app root view',
|
|
140
|
+
progress: 94,
|
|
141
|
+
busy: true,
|
|
142
|
+
blocking: true,
|
|
143
|
+
tone: 'info',
|
|
144
|
+
},
|
|
145
|
+
'app-root-committed': {
|
|
146
|
+
visible: true,
|
|
147
|
+
mode: 'boot',
|
|
148
|
+
badge: 'READY',
|
|
149
|
+
title: BOOT_TITLE,
|
|
150
|
+
phase: 'Real app root committed',
|
|
151
|
+
progress: 100,
|
|
152
|
+
busy: false,
|
|
153
|
+
blocking: true,
|
|
154
|
+
tone: 'info',
|
|
155
|
+
},
|
|
156
|
+
ready: {
|
|
157
|
+
visible: true,
|
|
158
|
+
mode: 'boot',
|
|
159
|
+
badge: 'READY',
|
|
160
|
+
title: BOOT_TITLE,
|
|
161
|
+
phase: 'Boot complete',
|
|
162
|
+
progress: 100,
|
|
163
|
+
busy: false,
|
|
164
|
+
blocking: true,
|
|
165
|
+
tone: 'info',
|
|
166
|
+
},
|
|
167
|
+
error: {
|
|
168
|
+
visible: true,
|
|
169
|
+
mode: 'boot',
|
|
170
|
+
badge: 'RETRY',
|
|
171
|
+
title: BOOT_TITLE,
|
|
172
|
+
phase: 'Retrying after a boot failure',
|
|
173
|
+
progress: null,
|
|
174
|
+
busy: true,
|
|
175
|
+
blocking: true,
|
|
176
|
+
tone: 'error',
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
const base = phaseInfo[stage];
|
|
180
|
+
let detail = info?.detail || '';
|
|
181
|
+
if (!detail && stage === 'probing-origin' && info?.origin) {
|
|
182
|
+
detail = `Trying ${info.origin}`;
|
|
183
|
+
}
|
|
184
|
+
if (attemptText) {
|
|
185
|
+
detail = detail ? `${detail} ${attemptText}` : attemptText;
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
...base,
|
|
189
|
+
detail,
|
|
190
|
+
progress: typeof info?.progress === 'number' || info?.progress === null ? info.progress : base.progress,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
export function createConnectionOverlaySnapshot(stage, info) {
|
|
194
|
+
if (stage === 'healthy') {
|
|
195
|
+
return { ...DEFAULT_SNAPSHOT };
|
|
196
|
+
}
|
|
197
|
+
const phaseInfo = {
|
|
198
|
+
connecting: {
|
|
199
|
+
visible: true,
|
|
200
|
+
mode: 'connection',
|
|
201
|
+
badge: 'SOCKET',
|
|
202
|
+
title: 'Waiting for Vite dev server',
|
|
203
|
+
phase: 'Opening websocket connection',
|
|
204
|
+
detail: 'Live updates are paused until the connection is healthy.',
|
|
205
|
+
progress: null,
|
|
206
|
+
busy: true,
|
|
207
|
+
blocking: false,
|
|
208
|
+
tone: 'warn',
|
|
209
|
+
},
|
|
210
|
+
reconnecting: {
|
|
211
|
+
visible: true,
|
|
212
|
+
mode: 'connection',
|
|
213
|
+
badge: 'SOCKET',
|
|
214
|
+
title: 'HMR connection lost',
|
|
215
|
+
phase: 'Trying to reconnect Vite websocket',
|
|
216
|
+
detail: 'The app may be stale until the dev server reconnects.',
|
|
217
|
+
progress: null,
|
|
218
|
+
busy: true,
|
|
219
|
+
blocking: false,
|
|
220
|
+
tone: 'warn',
|
|
221
|
+
},
|
|
222
|
+
synchronizing: {
|
|
223
|
+
visible: true,
|
|
224
|
+
mode: 'connection',
|
|
225
|
+
badge: 'SYNC',
|
|
226
|
+
title: 'HMR connection restored',
|
|
227
|
+
phase: 'Synchronizing live-update state',
|
|
228
|
+
detail: 'Finalizing the module graph before dismissing the overlay.',
|
|
229
|
+
progress: 95,
|
|
230
|
+
busy: true,
|
|
231
|
+
blocking: false,
|
|
232
|
+
tone: 'info',
|
|
233
|
+
},
|
|
234
|
+
offline: {
|
|
235
|
+
visible: true,
|
|
236
|
+
mode: 'connection',
|
|
237
|
+
badge: 'OFFLINE',
|
|
238
|
+
title: 'Vite dev server offline',
|
|
239
|
+
phase: 'Please check your terminal.',
|
|
240
|
+
detail: 'The websocket and HTTP HMR path are both unavailable right now.',
|
|
241
|
+
progress: null,
|
|
242
|
+
busy: true,
|
|
243
|
+
blocking: false,
|
|
244
|
+
tone: 'error',
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
const base = phaseInfo[stage];
|
|
248
|
+
return {
|
|
249
|
+
...base,
|
|
250
|
+
detail: info?.detail || base.detail,
|
|
251
|
+
progress: typeof info?.progress === 'number' || info?.progress === null ? info.progress : base.progress,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
export function createUpdateOverlaySnapshot(stage, info) {
|
|
255
|
+
const phaseInfo = {
|
|
256
|
+
received: {
|
|
257
|
+
visible: true,
|
|
258
|
+
mode: 'update',
|
|
259
|
+
badge: 'HMR',
|
|
260
|
+
title: HMR_UPDATE_TITLE,
|
|
261
|
+
phase: 'Preparing update',
|
|
262
|
+
detail: '',
|
|
263
|
+
progress: 5,
|
|
264
|
+
busy: true,
|
|
265
|
+
blocking: false,
|
|
266
|
+
tone: 'success',
|
|
267
|
+
},
|
|
268
|
+
evicting: {
|
|
269
|
+
visible: true,
|
|
270
|
+
mode: 'update',
|
|
271
|
+
badge: 'HMR',
|
|
272
|
+
title: HMR_UPDATE_TITLE,
|
|
273
|
+
phase: 'Invalidating module cache',
|
|
274
|
+
detail: '',
|
|
275
|
+
progress: 30,
|
|
276
|
+
busy: true,
|
|
277
|
+
blocking: false,
|
|
278
|
+
tone: 'success',
|
|
279
|
+
},
|
|
280
|
+
reimporting: {
|
|
281
|
+
visible: true,
|
|
282
|
+
mode: 'update',
|
|
283
|
+
badge: 'HMR',
|
|
284
|
+
title: HMR_UPDATE_TITLE,
|
|
285
|
+
phase: 'Re-importing entry',
|
|
286
|
+
detail: '',
|
|
287
|
+
progress: 60,
|
|
288
|
+
busy: true,
|
|
289
|
+
blocking: false,
|
|
290
|
+
tone: 'success',
|
|
291
|
+
},
|
|
292
|
+
rebooting: {
|
|
293
|
+
visible: true,
|
|
294
|
+
mode: 'update',
|
|
295
|
+
badge: 'HMR',
|
|
296
|
+
title: HMR_UPDATE_TITLE,
|
|
297
|
+
phase: 'Rebooting Angular',
|
|
298
|
+
detail: '',
|
|
299
|
+
progress: 90,
|
|
300
|
+
busy: true,
|
|
301
|
+
blocking: false,
|
|
302
|
+
tone: 'success',
|
|
303
|
+
},
|
|
304
|
+
complete: {
|
|
305
|
+
visible: true,
|
|
306
|
+
mode: 'update',
|
|
307
|
+
badge: 'HMR',
|
|
308
|
+
title: HMR_UPDATE_DONE_TITLE,
|
|
309
|
+
phase: 'Update applied',
|
|
310
|
+
detail: '',
|
|
311
|
+
progress: 100,
|
|
312
|
+
busy: false,
|
|
313
|
+
blocking: false,
|
|
314
|
+
tone: 'success',
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
const base = phaseInfo[stage];
|
|
318
|
+
return {
|
|
319
|
+
...base,
|
|
320
|
+
detail: info?.detail || base.detail,
|
|
321
|
+
progress: typeof info?.progress === 'number' || info?.progress === null ? info.progress : base.progress,
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
//# sourceMappingURL=dev-overlay-snapshots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-overlay-snapshots.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/dev-overlay-snapshots.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,6EAA6E;AAC7E,oEAAoE;AACpE,oEAAoE;AA4CpE,MAAM,CAAC,MAAM,UAAU,GAAG,4CAA4C,CAAC;AAEvE,MAAM,CAAC,MAAM,gBAAgB,GAAuB;IACnD,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,MAAM;CACZ,CAAC;AAEF,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAClD,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEnD,SAAS,eAAe,CAAC,IAA0B;IAClD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,IAAI,CAAC,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,EAAE,QAAQ,IAAI,CAAC,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC3B,OAA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H,CAAC"}
|
|
@@ -1,38 +1,131 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
export type HmrBootStage
|
|
4
|
-
export type HmrConnectionStage = 'connecting' | 'reconnecting' | 'synchronizing' | 'offline' | 'healthy';
|
|
5
|
-
export type HmrOverlayStageInfo = {
|
|
6
|
-
detail?: string;
|
|
7
|
-
origin?: string;
|
|
8
|
-
progress?: number | null;
|
|
9
|
-
attempt?: number;
|
|
10
|
-
attempts?: number;
|
|
11
|
-
};
|
|
12
|
-
export type HmrOverlaySnapshot = {
|
|
13
|
-
visible: boolean;
|
|
14
|
-
mode: HmrOverlayMode;
|
|
15
|
-
badge: string;
|
|
16
|
-
title: string;
|
|
17
|
-
phase: string;
|
|
18
|
-
detail: string;
|
|
19
|
-
progress: number | null;
|
|
20
|
-
busy: boolean;
|
|
21
|
-
blocking: boolean;
|
|
22
|
-
tone: HmrOverlayTone;
|
|
23
|
-
};
|
|
1
|
+
import { type HmrBootStage, type HmrConnectionStage, type HmrOverlayPosition, type HmrOverlaySnapshot, type HmrOverlayStageInfo, type HmrUpdateStage } from './dev-overlay-snapshots.js';
|
|
2
|
+
export { createBootOverlaySnapshot, createConnectionOverlaySnapshot, createUpdateOverlaySnapshot } from './dev-overlay-snapshots.js';
|
|
3
|
+
export type { HmrBootStage, HmrConnectionStage, HmrOverlayPosition, HmrOverlaySnapshot, HmrOverlayStageInfo, HmrUpdateStage } from './dev-overlay-snapshots.js';
|
|
24
4
|
type HmrOverlayApi = {
|
|
25
5
|
ensureBootPage: (verbose?: boolean) => any | null;
|
|
26
6
|
setBootStage: (stage: HmrBootStage, info?: HmrOverlayStageInfo) => HmrOverlaySnapshot;
|
|
27
7
|
setConnectionStage: (stage: HmrConnectionStage, info?: HmrOverlayStageInfo) => HmrOverlaySnapshot;
|
|
8
|
+
setUpdateStage: (stage: HmrUpdateStage, info?: HmrOverlayStageInfo) => HmrOverlaySnapshot;
|
|
28
9
|
hide: (reason?: string) => void;
|
|
29
10
|
getSnapshot: () => HmrOverlaySnapshot;
|
|
30
11
|
};
|
|
31
|
-
|
|
32
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the configured live-overlay position.
|
|
14
|
+
*
|
|
15
|
+
* Reads `globalThis.__NS_HMR_OVERLAY_POSITION__` so a project can
|
|
16
|
+
* override the default at boot time (e.g. inside `app.ts` before the
|
|
17
|
+
* Vite session bootstraps). Falls back to 'top' which gives the
|
|
18
|
+
* toast-style chip with a slide-in animation and safe-area padding.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getHmrDevOverlayPosition(): HmrOverlayPosition;
|
|
21
|
+
/**
|
|
22
|
+
* Imperative setter for the live-overlay position. Re-applies the
|
|
23
|
+
* current snapshot so the change is visible without waiting for the
|
|
24
|
+
* next HMR cycle. Useful during dev to A/B between top/bottom/center
|
|
25
|
+
* without restarting the app.
|
|
26
|
+
*/
|
|
27
|
+
export declare function setHmrDevOverlayPosition(position: HmrOverlayPosition): void;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the UIWindow level we use for the live/connection overlay. We lift
|
|
30
|
+
* above `UIWindowLevelAlert` so system alerts (and any app-presented modal)
|
|
31
|
+
* stack underneath. When the platform does not expose `UIWindowLevelAlert`
|
|
32
|
+
* we fall back to the documented constant value (2000).
|
|
33
|
+
*/
|
|
34
|
+
export declare function computeIosOverlayWindowLevel(baseAlert?: number | null): number;
|
|
35
|
+
export type IosSafeInsets = {
|
|
36
|
+
top: number;
|
|
37
|
+
bottom: number;
|
|
38
|
+
left: number;
|
|
39
|
+
right: number;
|
|
40
|
+
};
|
|
41
|
+
export type IosRect = {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
};
|
|
47
|
+
export type IosOverlayLayout = {
|
|
48
|
+
backdrop: IosRect;
|
|
49
|
+
panel: IosRect;
|
|
50
|
+
title: IosRect;
|
|
51
|
+
status: IosRect;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Layout math for the live overlay when it runs inside its own UIWindow.
|
|
55
|
+
* Pure, deterministic and independent of UIKit so we can verify the rules
|
|
56
|
+
* (max panel width, position-aware placement, safe-area clamping, sane
|
|
57
|
+
* defaults) from tests.
|
|
58
|
+
*
|
|
59
|
+
* `position` controls where the panel sits vertically:
|
|
60
|
+
* - 'top': hugs `safeInsets.top + toastVerticalInset` so the chip
|
|
61
|
+
* sits just below the notch / Dynamic Island.
|
|
62
|
+
* - 'bottom': hugs `viewHeight - safeInsets.bottom - panelHeight -
|
|
63
|
+
* toastVerticalInset` so the chip sits just above the
|
|
64
|
+
* home indicator / nav bar.
|
|
65
|
+
* - 'center': original modal placement (vertically centered, clamped
|
|
66
|
+
* so it never crosses the top safe-area inset).
|
|
67
|
+
*/
|
|
68
|
+
export declare function computeIosOverlayLayout(input: {
|
|
69
|
+
viewWidth: number;
|
|
70
|
+
viewHeight: number;
|
|
71
|
+
safeInsets?: IosSafeInsets | null;
|
|
72
|
+
titleHeight: number;
|
|
73
|
+
statusHeight: number;
|
|
74
|
+
maxPanelWidth?: number;
|
|
75
|
+
horizontalMargin?: number;
|
|
76
|
+
panelPadding?: number;
|
|
77
|
+
interLabelSpacing?: number;
|
|
78
|
+
minTopInset?: number;
|
|
79
|
+
position?: HmrOverlayPosition;
|
|
80
|
+
toastVerticalInset?: number;
|
|
81
|
+
}): IosOverlayLayout;
|
|
82
|
+
export type AndroidSafeAreaInsets = {
|
|
83
|
+
top: number;
|
|
84
|
+
bottom: number;
|
|
85
|
+
left: number;
|
|
86
|
+
right: number;
|
|
87
|
+
};
|
|
88
|
+
export type AndroidToastMargin = {
|
|
89
|
+
top: number;
|
|
90
|
+
right: number;
|
|
91
|
+
bottom: number;
|
|
92
|
+
left: number;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Margin math for the in-tree (Android) live/update toast chip.
|
|
96
|
+
*
|
|
97
|
+
* NativeScript enables edge-to-edge on every Android activity
|
|
98
|
+
* (`@nativescript/core` → `application.android.ts` → `enableEdgeToEdge`),
|
|
99
|
+
* so the page content — and therefore the overlay wrapper we inject into
|
|
100
|
+
* it — extends underneath the status bar and navigation bar. A fixed
|
|
101
|
+
* top/bottom margin leaves the chip tucked behind the system bars, where
|
|
102
|
+
* it gets clipped (Android 15 / API 35 enforces edge-to-edge, so this is
|
|
103
|
+
* now the norm rather than the exception).
|
|
104
|
+
*
|
|
105
|
+
* This pure helper folds the system-bar safe-area insets into the chip's
|
|
106
|
+
* margin so the toast always clears the status bar (top position) /
|
|
107
|
+
* navigation bar (bottom position). It is deterministic and free of
|
|
108
|
+
* native deps so the rules stay unit-testable — the runtime reads the
|
|
109
|
+
* live insets via `readAndroidSafeAreaInsets()` and forwards them here.
|
|
110
|
+
*
|
|
111
|
+
* - 'top': margin.top = baseVerticalInset + safeInsets.top
|
|
112
|
+
* - 'bottom': margin.bottom = baseVerticalInset + safeInsets.bottom
|
|
113
|
+
* - 'center': fixed `centerMargin` all around (vertically centered, so
|
|
114
|
+
* it never approaches the system bars on normal viewports).
|
|
115
|
+
*
|
|
116
|
+
* Horizontal margins always include the relevant safe-area inset so a
|
|
117
|
+
* landscape display cutout / gesture pill doesn't clip the chip edge.
|
|
118
|
+
*/
|
|
119
|
+
export declare function computeAndroidToastMargin(input: {
|
|
120
|
+
position: HmrOverlayPosition;
|
|
121
|
+
safeInsets?: AndroidSafeAreaInsets | null;
|
|
122
|
+
baseVerticalInset?: number;
|
|
123
|
+
baseHorizontalInset?: number;
|
|
124
|
+
centerMargin?: number;
|
|
125
|
+
}): AndroidToastMargin;
|
|
33
126
|
export declare function ensureHmrDevOverlayRuntimeInstalled(verbose?: boolean): HmrOverlayApi;
|
|
34
127
|
export declare function createHmrBootOverlayPage(verbose?: boolean): any | null;
|
|
35
128
|
export declare function setHmrBootStage(stage: HmrBootStage, info?: HmrOverlayStageInfo): HmrOverlaySnapshot;
|
|
36
129
|
export declare function setHmrConnectionStage(stage: HmrConnectionStage, info?: HmrOverlayStageInfo): HmrOverlaySnapshot;
|
|
130
|
+
export declare function setHmrUpdateStage(stage: HmrUpdateStage, info?: HmrOverlayStageInfo): HmrOverlaySnapshot;
|
|
37
131
|
export declare function hideHmrDevOverlay(reason?: string): void;
|
|
38
|
-
export {};
|