@nativescript/vite 8.0.0-alpha.65 → 8.0.0-alpha.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/configuration/angular.js +78 -182
  2. package/configuration/angular.js.map +1 -1
  3. package/configuration/base.js +16 -140
  4. package/configuration/base.js.map +1 -1
  5. package/helpers/app-css-state.d.ts +20 -0
  6. package/helpers/app-css-state.js.map +1 -1
  7. package/helpers/flavor.d.ts +13 -0
  8. package/helpers/flavor.js +17 -0
  9. package/helpers/flavor.js.map +1 -1
  10. package/helpers/global-defines.d.ts +16 -4
  11. package/helpers/global-defines.js +44 -4
  12. package/helpers/global-defines.js.map +1 -1
  13. package/helpers/main-entry.js +44 -4
  14. package/helpers/main-entry.js.map +1 -1
  15. package/helpers/ns-core-external-urls.d.ts +32 -0
  16. package/helpers/ns-core-external-urls.js +107 -0
  17. package/helpers/ns-core-external-urls.js.map +1 -0
  18. package/helpers/typescript-check.js +2 -2
  19. package/helpers/typescript-check.js.map +1 -1
  20. package/helpers/workers.d.ts +0 -8
  21. package/helpers/workers.js +43 -381
  22. package/helpers/workers.js.map +1 -1
  23. package/hmr/client/framework-client-strategy.d.ts +17 -9
  24. package/hmr/client/framework-client-strategy.js +3 -4
  25. package/hmr/client/framework-client-strategy.js.map +1 -1
  26. package/hmr/client/hmr-pending-overlay.js +2 -21
  27. package/hmr/client/hmr-pending-overlay.js.map +1 -1
  28. package/hmr/client/index.d.ts +9 -1
  29. package/hmr/client/index.js +48 -2596
  30. package/hmr/client/index.js.map +1 -1
  31. package/hmr/client/overlay-driver.d.ts +10 -0
  32. package/hmr/client/overlay-driver.js +33 -0
  33. package/hmr/client/overlay-driver.js.map +1 -0
  34. package/hmr/client/protocol-dispatch.d.ts +8 -0
  35. package/hmr/client/protocol-dispatch.js +309 -0
  36. package/hmr/client/protocol-dispatch.js.map +1 -0
  37. package/hmr/client/root-reset.d.ts +15 -0
  38. package/hmr/client/root-reset.js +358 -0
  39. package/hmr/client/root-reset.js.map +1 -0
  40. package/hmr/client/strategy-loader.d.ts +24 -0
  41. package/hmr/client/strategy-loader.js +83 -0
  42. package/hmr/client/strategy-loader.js.map +1 -0
  43. package/hmr/client/update-pipeline.d.ts +27 -0
  44. package/hmr/client/update-pipeline.js +464 -0
  45. package/hmr/client/update-pipeline.js.map +1 -0
  46. package/hmr/client/utils.js +3 -2
  47. package/hmr/client/utils.js.map +1 -1
  48. package/hmr/client/ws-transport.d.ts +21 -0
  49. package/hmr/client/ws-transport.js +344 -0
  50. package/hmr/client/ws-transport.js.map +1 -0
  51. package/hmr/frameworks/angular/build/angular-linker.js +4 -0
  52. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -1
  53. package/hmr/frameworks/angular/build/linker-stats.d.ts +18 -0
  54. package/hmr/frameworks/angular/build/linker-stats.js +29 -0
  55. package/hmr/frameworks/angular/build/linker-stats.js.map +1 -0
  56. package/hmr/frameworks/angular/build/ts-fallback-transform.d.ts +5 -0
  57. package/hmr/frameworks/angular/build/ts-fallback-transform.js +138 -0
  58. package/hmr/frameworks/angular/build/ts-fallback-transform.js.map +1 -0
  59. package/hmr/frameworks/angular/build/worker-url-preserve.d.ts +5 -0
  60. package/hmr/frameworks/angular/build/worker-url-preserve.js +140 -0
  61. package/hmr/frameworks/angular/build/worker-url-preserve.js.map +1 -0
  62. package/hmr/frameworks/angular/client/index.d.ts +3 -0
  63. package/hmr/frameworks/angular/client/index.js +28 -42
  64. package/hmr/frameworks/angular/client/index.js.map +1 -1
  65. package/hmr/frameworks/angular/server/ng-component-route.d.ts +43 -0
  66. package/hmr/frameworks/angular/server/ng-component-route.js +113 -0
  67. package/hmr/frameworks/angular/server/ng-component-route.js.map +1 -0
  68. package/hmr/frameworks/angular/server/strategy.js +15 -11
  69. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  70. package/hmr/frameworks/angular/server/websocket-angular-hot-update.d.ts +12 -0
  71. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +39 -0
  72. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -1
  73. package/hmr/frameworks/react/client/strategy.d.ts +12 -0
  74. package/hmr/frameworks/react/client/strategy.js +27 -0
  75. package/hmr/frameworks/react/client/strategy.js.map +1 -0
  76. package/hmr/frameworks/solid/client/strategy.d.ts +7 -0
  77. package/hmr/frameworks/solid/client/strategy.js +391 -0
  78. package/hmr/frameworks/solid/client/strategy.js.map +1 -0
  79. package/hmr/frameworks/solid/server/strategy.js +2 -0
  80. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  81. package/hmr/frameworks/typescript/client/strategy.d.ts +7 -0
  82. package/hmr/frameworks/typescript/client/strategy.js +418 -0
  83. package/hmr/frameworks/typescript/client/strategy.js.map +1 -0
  84. package/hmr/frameworks/typescript/server/strategy.js +2 -0
  85. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  86. package/hmr/frameworks/vue/client/index.d.ts +1 -1
  87. package/hmr/frameworks/vue/client/index.js +40 -319
  88. package/hmr/frameworks/vue/client/index.js.map +1 -1
  89. package/hmr/frameworks/vue/client/navigate-app.d.ts +3 -0
  90. package/hmr/frameworks/vue/client/navigate-app.js +178 -0
  91. package/hmr/frameworks/vue/client/navigate-app.js.map +1 -0
  92. package/hmr/frameworks/vue/client/strategy.d.ts +1 -1
  93. package/hmr/frameworks/vue/client/strategy.js +9 -14
  94. package/hmr/frameworks/vue/client/strategy.js.map +1 -1
  95. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +2 -20
  96. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -1
  97. package/hmr/frameworks/vue/server/strategy.js +3 -0
  98. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  99. package/hmr/helpers/ast-normalizer.js +32 -4
  100. package/hmr/helpers/ast-normalizer.js.map +1 -1
  101. package/hmr/server/css-connect-sync.d.ts +28 -0
  102. package/hmr/server/css-connect-sync.js +78 -0
  103. package/hmr/server/css-connect-sync.js.map +1 -0
  104. package/hmr/server/deps-bundle.js +13 -2
  105. package/hmr/server/deps-bundle.js.map +1 -1
  106. package/hmr/server/framework-strategy.d.ts +30 -0
  107. package/hmr/server/process-code-for-device.js +24 -3
  108. package/hmr/server/process-code-for-device.js.map +1 -1
  109. package/hmr/server/vite-plugin.js +15 -0
  110. package/hmr/server/vite-plugin.js.map +1 -1
  111. package/hmr/server/websocket-hmr-pending.d.ts +0 -8
  112. package/hmr/server/websocket-hmr-pending.js +0 -22
  113. package/hmr/server/websocket-hmr-pending.js.map +1 -1
  114. package/hmr/server/websocket-hot-update.d.ts +3 -0
  115. package/hmr/server/websocket-hot-update.js +63 -36
  116. package/hmr/server/websocket-hot-update.js.map +1 -1
  117. package/hmr/server/websocket-module-bindings.js +23 -5
  118. package/hmr/server/websocket-module-bindings.js.map +1 -1
  119. package/hmr/server/websocket-module-specifiers.d.ts +0 -5
  120. package/hmr/server/websocket-module-specifiers.js +28 -29
  121. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  122. package/hmr/server/websocket-ns-m-paths.d.ts +18 -0
  123. package/hmr/server/websocket-ns-m-paths.js +79 -0
  124. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  125. package/hmr/server/websocket-ns-m-request.d.ts +2 -1
  126. package/hmr/server/websocket-ns-m-request.js +3 -2
  127. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  128. package/hmr/server/websocket-ns-m.js +100 -374
  129. package/hmr/server/websocket-ns-m.js.map +1 -1
  130. package/hmr/server/websocket-served-module-helpers.d.ts +7 -0
  131. package/hmr/server/websocket-served-module-helpers.js +93 -69
  132. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  133. package/hmr/server/websocket.d.ts +0 -1
  134. package/hmr/server/websocket.js +27 -2
  135. package/hmr/server/websocket.js.map +1 -1
  136. package/hmr/shared/ns-globals.d.ts +0 -1
  137. package/hmr/shared/ns-globals.js.map +1 -1
  138. package/hmr/shared/protocol.d.ts +14 -0
  139. package/hmr/shared/protocol.js.map +1 -1
  140. package/hmr/shared/runtime/dev-overlay-ios.d.ts +87 -0
  141. package/hmr/shared/runtime/dev-overlay-ios.js +521 -0
  142. package/hmr/shared/runtime/dev-overlay-ios.js.map +1 -0
  143. package/hmr/shared/runtime/dev-overlay-shared.d.ts +58 -0
  144. package/hmr/shared/runtime/dev-overlay-shared.js +116 -0
  145. package/hmr/shared/runtime/dev-overlay-shared.js.map +1 -0
  146. package/hmr/shared/runtime/dev-overlay-tree.d.ts +59 -0
  147. package/hmr/shared/runtime/dev-overlay-tree.js +712 -0
  148. package/hmr/shared/runtime/dev-overlay-tree.js.map +1 -0
  149. package/hmr/shared/runtime/dev-overlay.d.ts +15 -107
  150. package/hmr/shared/runtime/dev-overlay.js +19 -1336
  151. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  152. package/hmr/shared/runtime/launch-bridge.d.ts +9 -0
  153. package/hmr/shared/runtime/launch-bridge.js +98 -0
  154. package/hmr/shared/runtime/launch-bridge.js.map +1 -0
  155. package/hmr/shared/runtime/overlay-flag.d.ts +9 -0
  156. package/hmr/shared/runtime/overlay-flag.js +34 -0
  157. package/hmr/shared/runtime/overlay-flag.js.map +1 -0
  158. package/hmr/shared/runtime/root-placeholder.js +3 -2
  159. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  160. package/hmr/shared/runtime/session-bootstrap.js +29 -1
  161. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  162. package/hmr/shared/runtime/vendor-resolve.d.ts +22 -0
  163. package/hmr/shared/runtime/vendor-resolve.js +45 -0
  164. package/hmr/shared/runtime/vendor-resolve.js.map +1 -0
  165. package/hmr/shared/vendor/manifest-collect.js +363 -3
  166. package/hmr/shared/vendor/manifest-collect.js.map +1 -1
  167. package/hmr/shared/vendor/manifest.js +5 -1
  168. package/hmr/shared/vendor/manifest.js.map +1 -1
  169. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +31 -0
  170. package/hmr/shared/vendor/vendor-esbuild-plugins.js +140 -1
  171. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -1
  172. package/package.json +1 -3
  173. package/runtime/core-aliases-early.js +3 -2
  174. package/runtime/core-aliases-early.js.map +1 -1
  175. package/helpers/module-runner-patch.d.ts +0 -3
  176. package/helpers/module-runner-patch.js +0 -63
  177. package/helpers/module-runner-patch.js.map +0 -1
  178. package/hmr/server/websocket-css-hot-update.d.ts +0 -33
  179. package/hmr/server/websocket-css-hot-update.js +0 -65
  180. package/hmr/server/websocket-css-hot-update.js.map +0 -1
  181. package/hmr/shared/runtime/http-only-boot.d.ts +0 -2
  182. package/hmr/shared/runtime/http-only-boot.js +0 -172
  183. package/hmr/shared/runtime/http-only-boot.js.map +0 -1
  184. package/hmr/vendor-bootstrap.d.ts +0 -1
  185. package/hmr/vendor-bootstrap.js +0 -30
  186. package/hmr/vendor-bootstrap.js.map +0 -1
  187. package/shims/react-reconciler-constants.d.ts +0 -14
  188. package/shims/react-reconciler-constants.js +0 -21
  189. package/shims/react-reconciler-constants.js.map +0 -1
  190. package/shims/react-reconciler.d.ts +0 -8
  191. package/shims/react-reconciler.js +0 -15
  192. package/shims/react-reconciler.js.map +0 -1
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Internals shared by the dev-overlay backends (boot placeholder, in-tree
3
+ * live overlay, iOS UIWindow overlay): the per-session runtime state held on
4
+ * `globalThis`, core-class resolution that respects the realm rule, and
5
+ * snapshot/text formatting. Not part of the public overlay API — import
6
+ * `dev-overlay.ts` for that.
7
+ */
8
+ import { DEFAULT_SNAPSHOT } from './dev-overlay-snapshots.js';
9
+ import { getGlobalScope } from './global-scope.js';
10
+ import { getVendorRequire } from './vendor-resolve.js';
11
+ const DEFAULT_OVERLAY_POSITION = 'top';
12
+ export function getOverlayGlobal() {
13
+ return getGlobalScope();
14
+ }
15
+ /**
16
+ * Resolve the configured live-overlay position.
17
+ *
18
+ * Reads `globalThis.__NS_HMR_OVERLAY_POSITION__` so a project can
19
+ * override the default at boot time (e.g. inside `app.ts` before the
20
+ * Vite session bootstraps). Falls back to 'top' which gives the
21
+ * toast-style chip with a slide-in animation and safe-area padding.
22
+ */
23
+ export function getHmrDevOverlayPosition() {
24
+ const g = getOverlayGlobal();
25
+ const stored = g.__NS_HMR_OVERLAY_POSITION__;
26
+ if (stored === 'top' || stored === 'bottom' || stored === 'center') {
27
+ return stored;
28
+ }
29
+ return DEFAULT_OVERLAY_POSITION;
30
+ }
31
+ export function getRuntimeState() {
32
+ const g = getOverlayGlobal();
33
+ if (!g.__NS_HMR_DEV_OVERLAY_STATE__) {
34
+ g.__NS_HMR_DEV_OVERLAY_STATE__ = {
35
+ snapshot: { ...DEFAULT_SNAPSHOT },
36
+ bootRefs: null,
37
+ liveRefs: null,
38
+ iosRefs: null,
39
+ iosBuildFailed: false,
40
+ verbose: false,
41
+ updateAutoHideTimer: null,
42
+ updateCycleStartedAt: 0,
43
+ };
44
+ }
45
+ const state = g.__NS_HMR_DEV_OVERLAY_STATE__;
46
+ // Backfill newer fields for legacy state objects (e.g. after hot reload)
47
+ // so we never observe an undefined iosRefs/iosBuildFailed at runtime.
48
+ if (typeof state.iosRefs === 'undefined')
49
+ state.iosRefs = null;
50
+ if (typeof state.iosBuildFailed === 'undefined')
51
+ state.iosBuildFailed = false;
52
+ if (typeof state.updateAutoHideTimer === 'undefined')
53
+ state.updateAutoHideTimer = null;
54
+ if (typeof state.updateCycleStartedAt !== 'number')
55
+ state.updateCycleStartedAt = 0;
56
+ return state;
57
+ }
58
+ export function resolveCoreExport(name) {
59
+ const g = getOverlayGlobal();
60
+ try {
61
+ const reg = g.__nsVendorRegistry;
62
+ if (reg && typeof reg.get === 'function') {
63
+ const mod = reg.get('@nativescript/core');
64
+ const ns = (mod && (mod.default ?? mod)) || mod;
65
+ if (ns && ns[name]) {
66
+ return ns[name];
67
+ }
68
+ }
69
+ }
70
+ catch { }
71
+ try {
72
+ if (g && g[name]) {
73
+ return g[name];
74
+ }
75
+ }
76
+ catch { }
77
+ try {
78
+ const req = getVendorRequire();
79
+ if (req) {
80
+ const mod = req('@nativescript/core');
81
+ const ns = (mod && (mod.default ?? mod)) || mod;
82
+ if (ns && ns[name]) {
83
+ return ns[name];
84
+ }
85
+ }
86
+ }
87
+ catch { }
88
+ try {
89
+ const nativeReq = g.__nativeRequire;
90
+ if (typeof nativeReq === 'function') {
91
+ const mod = nativeReq('@nativescript/core', '/');
92
+ const ns = (mod && (mod.default ?? mod)) || mod;
93
+ if (ns && ns[name]) {
94
+ return ns[name];
95
+ }
96
+ }
97
+ }
98
+ catch { }
99
+ return undefined;
100
+ }
101
+ export function asColor(value) {
102
+ try {
103
+ const Color = resolveCoreExport('Color');
104
+ if (Color) {
105
+ return new Color(value);
106
+ }
107
+ }
108
+ catch { }
109
+ return value;
110
+ }
111
+ export function formatStatusText(snapshot) {
112
+ const progressText = typeof snapshot.progress === 'number' ? ` (${Math.round(Number(snapshot.progress))}%)` : '';
113
+ const primary = `${snapshot.phase || ''}${progressText}`.trim();
114
+ return [primary, snapshot.detail].filter(Boolean).join('\n');
115
+ }
116
+ //# sourceMappingURL=dev-overlay-shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-overlay-shared.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/dev-overlay-shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAoD,MAAM,4BAA4B,CAAC;AAChH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,wBAAwB,GAAuB,KAAK,CAAC;AAgE3D,MAAM,UAAU,gBAAgB;IAC/B,OAAO,cAAc,EAAE,CAAC;AACzB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB;IACvC,MAAM,CAAC,GAAG,gBAAgB,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,CAAC,CAAC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AAG,CAAC,OAAO,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC;YAChD,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACpB,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;QACF,CAAC;IACF,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAa;IACpC,IAAI,CAAC;QACJ,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;IACF,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,OAAO,KAAY,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,QAA4B;IAC5D,MAAM,YAAY,GAAG,OAAO,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACjH,MAAM,OAAO,GAAG,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC;IAChE,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * In-tree overlay backend: the boot placeholder page and the live/update
3
+ * toast chip rendered inside the app's own view tree (Android, and the iOS
4
+ * fallback when the UIWindow backend can't build). Pure margin math
5
+ * (`computeAndroidToastMargin`) is exported separately so the safe-area rules
6
+ * stay unit-testable without a device.
7
+ */
8
+ import { type HmrOverlayPosition, type HmrOverlaySnapshot } from './dev-overlay-snapshots.js';
9
+ import { type BootOverlayRefs, type LiveOverlayRefs } from './dev-overlay-shared.js';
10
+ export declare function buildBootOverlayRefs(snapshot: HmrOverlaySnapshot): BootOverlayRefs | null;
11
+ export declare function applySnapshotToBootRefs(refs: BootOverlayRefs | null, snapshot: HmrOverlaySnapshot): void;
12
+ export declare function updateBootStatusLabel(snapshot: HmrOverlaySnapshot): void;
13
+ export type AndroidSafeAreaInsets = {
14
+ top: number;
15
+ bottom: number;
16
+ left: number;
17
+ right: number;
18
+ };
19
+ export type AndroidToastMargin = {
20
+ top: number;
21
+ right: number;
22
+ bottom: number;
23
+ left: number;
24
+ };
25
+ /**
26
+ * Margin math for the in-tree (Android) live/update toast chip.
27
+ *
28
+ * NativeScript enables edge-to-edge on every Android activity
29
+ * (`@nativescript/core` → `application.android.ts` → `enableEdgeToEdge`),
30
+ * so the page content — and therefore the overlay wrapper we inject into
31
+ * it — extends underneath the status bar and navigation bar. A fixed
32
+ * top/bottom margin leaves the chip tucked behind the system bars, where
33
+ * it gets clipped (Android 15 / API 35 enforces edge-to-edge, so this is
34
+ * now the norm rather than the exception).
35
+ *
36
+ * This pure helper folds the system-bar safe-area insets into the chip's
37
+ * margin so the toast always clears the status bar (top position) /
38
+ * navigation bar (bottom position). It is deterministic and free of
39
+ * native deps so the rules stay unit-testable — the runtime reads the
40
+ * live insets via `readAndroidSafeAreaInsets()` and forwards them here.
41
+ *
42
+ * - 'top': margin.top = baseVerticalInset + safeInsets.top
43
+ * - 'bottom': margin.bottom = baseVerticalInset + safeInsets.bottom
44
+ * - 'center': fixed `centerMargin` all around (vertically centered, so
45
+ * it never approaches the system bars on normal viewports).
46
+ *
47
+ * Horizontal margins always include the relevant safe-area inset so a
48
+ * landscape display cutout / gesture pill doesn't clip the chip edge.
49
+ */
50
+ export declare function computeAndroidToastMargin(input: {
51
+ position: HmrOverlayPosition;
52
+ safeInsets?: AndroidSafeAreaInsets | null;
53
+ baseVerticalInset?: number;
54
+ baseHorizontalInset?: number;
55
+ centerMargin?: number;
56
+ }): AndroidToastMargin;
57
+ export declare function ensureLiveOverlayRefs(snapshot: HmrOverlaySnapshot): LiveOverlayRefs | null;
58
+ export declare function applySnapshotToLiveRefs(refs: Pick<LiveOverlayRefs, 'overlay' | 'titleLabel' | 'statusLabel'> & Partial<Pick<LiveOverlayRefs, 'wasVisible' | 'currentPosition'>>, snapshot: HmrOverlaySnapshot): void;
59
+ export declare function applySnapshotToLiveRefs(refs: null, snapshot: HmrOverlaySnapshot): void;